:root {
  color-scheme: dark;
  --bg: #07111d;
  --bg-2: #0d1a2b;
  --panel: rgba(20, 34, 52, 0.92);
  --panel-2: rgba(25, 42, 64, 0.88);
  --panel-3: rgba(9, 20, 34, 0.86);
  --border: rgba(134, 163, 198, 0.22);
  --border-strong: rgba(226, 195, 127, 0.32);
  --text: #f3f7ff;
  --muted: #a9b7ca;
  --gold: #f2d99a;
  --gold-2: #caa15b;
  --green: #68dfa0;
  --cyan: #75cce8;
  --blue: #86adf0;
  --violet: #8f7bd7;
  --teal: #35b9a5;
  --danger: #ff8a96;
  --warn: #e9c56d;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --font-ui: "HarmonyOS Sans SC", "MiSans", "Alibaba PuHuiTi 3.0", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --font-data: "Bahnschrift", "DIN Alternate", "Aptos Display", "Segoe UI Variable Display", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", system-ui, sans-serif;
  --font-num: var(--font-data);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 18% 12%, rgba(75, 126, 174, 0.17), transparent 24rem),
    radial-gradient(circle at 78% 4%, rgba(62, 92, 150, 0.15), transparent 26rem),
    radial-gradient(circle at 70% 84%, rgba(21, 92, 116, 0.10), transparent 30rem),
    linear-gradient(135deg, #07111e 0%, #101e34 44%, #071322 100%);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(137, 170, 212, 0.072) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 170, 212, 0.060) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  opacity: 0.78;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 17, 30, 0.12), rgba(7, 17, 30, 0.40)),
    radial-gradient(circle at 50% 0%, rgba(117, 204, 232, 0.08), transparent 34rem);
}

button,
input,
select {
  font: inherit;
}

button,
input,
select,
.status-badge,
.qq-number,
.account-status,
.tab-button span,
.target-rate,
.success-rate,
.analysis-item strong,
.distribution-item strong,
.metric-card strong,
.metrics-row strong,
.single-cell div {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 18px 0 24px;
  border-bottom: 1px solid rgba(226, 195, 127, 0.18);
}

.brand-mark {
  width: 78px;
  height: 78px;
  padding: 6px;
  border: 1px solid rgba(255, 226, 164, 0.36);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 226, 164, 0.18), rgba(85, 214, 255, 0.08)),
    rgba(20, 34, 54, 0.66);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px) saturate(1.18);
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 13px;
}

.account-status {
  display: grid;
  gap: 5px;
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid rgba(104, 223, 160, 0.28);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(104, 223, 160, 0.12), rgba(117, 204, 232, 0.08)),
    rgba(9, 20, 34, 0.62);
  color: var(--text);
}

.account-status span {
  color: var(--muted);
  font-size: 12px;
}

.account-status strong {
  color: var(--green);
  font-size: 15px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--gold);
}

h1 {
  font-size: 42px;
  letter-spacing: 0;
  line-height: 1.08;
  text-wrap: balance;
  font-family: var(--font-data);
  font-weight: 900;
}

h2 {
  font-size: 21px;
  width: fit-content;
  color: var(--gold);
  font-weight: 900;
  text-wrap: balance;
}

.section-head h2::after,
.result-head h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 226, 164, 0.72), rgba(85, 214, 255, 0.26), transparent);
}

.hero-subtitle,
.panel p {
  color: var(--muted);
}

.qq-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.qq-number,
.qq-inline {
  color: #ffe08a;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(226, 195, 127, 0.24);
}

.qq-number {
  padding: 8px 12px;
  border: 1px solid rgba(226, 195, 127, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(226, 195, 127, 0.16), rgba(24, 157, 134, 0.08)),
    rgba(8, 18, 31, 0.58);
}

.copy-qq-button {
  min-height: 36px;
  padding: 8px 13px;
  border-color: rgba(117, 204, 232, 0.28);
  color: #eaf6ff;
  background:
    linear-gradient(135deg, rgba(24, 157, 134, 0.90), rgba(28, 102, 168, 0.88)),
    #0e6f8e;
  box-shadow: 0 10px 22px rgba(18, 147, 165, 0.18);
}

.copy-qq-message {
  min-width: 58px;
  color: #9fd9ef;
  font-size: 13px;
  font-weight: 800;
}

.section-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 4px;
  padding: 8px;
  border: 1px solid rgba(134, 163, 198, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(24, 43, 66, 0.58), rgba(7, 16, 28, 0.54)),
    rgba(9, 20, 34, 0.48);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

.tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid rgba(143, 184, 230, 0.18);
  color: #c8d8eb;
  background:
    linear-gradient(180deg, rgba(28, 45, 67, 0.72), rgba(12, 25, 43, 0.82));
  box-shadow: none;
}

.tab-button span {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  border: 1px solid rgba(143, 184, 230, 0.22);
  border-radius: 999px;
  color: #9fd9ef;
  background: rgba(8, 18, 31, 0.42);
  font-size: 12px;
  font-weight: 900;
}

.tab-button:not(:last-child)::after {
  content: "›";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-52%);
  color: rgba(159, 217, 239, 0.70);
  font-family: var(--font-data);
  font-size: 23px;
  font-weight: 900;
  pointer-events: none;
}

.tab-button.active {
  border-color: rgba(226, 195, 127, 0.42);
  color: #fff3ce;
  background:
    linear-gradient(90deg, rgba(24, 157, 134, 0.35), rgba(28, 102, 168, 0.32)),
    rgba(11, 25, 43, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tab-button.active span {
  border-color: rgba(255, 226, 164, 0.38);
  color: #fff0ad;
  background: rgba(226, 195, 127, 0.12);
}

.notice-tab-button {
  overflow: visible;
}

.notice-unread-dot {
  position: absolute;
  left: 9px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff4f66;
  box-shadow: 0 0 0 3px rgba(255, 79, 102, 0.14), 0 0 14px rgba(255, 79, 102, 0.45);
}

.notice-unread-dot.hidden {
  display: none;
}

.tab-button:focus-visible {
  outline: 3px solid rgba(85, 214, 255, 0.24);
  outline-offset: 2px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel > .panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(85, 214, 255, 0.65), rgba(255, 226, 164, 0.54), transparent);
}

.tab-panel > .panel::after,
.license-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 36, 56, 0.34), rgba(7, 16, 28, 0.18)),
    radial-gradient(circle at 24px 18px, rgba(117, 204, 232, 0.06), transparent 16rem);
}

.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(28, 45, 68, 0.62), rgba(9, 18, 31, 0.58)),
    rgba(14, 26, 45, 0.50);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

#mainPanel > .panel::before,
.license-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(85, 214, 255, 0.75), rgba(255, 226, 164, 0.66), transparent);
}

#mainPanel > .panel:nth-of-type(1) {
  background:
    linear-gradient(135deg, rgba(24, 44, 69, 0.68), rgba(11, 25, 43, 0.62)),
    rgba(14, 26, 45, 0.56);
}

#mainPanel > .panel:nth-of-type(2),
.target-result {
  border-color: rgba(117, 204, 232, 0.28);
  background:
    linear-gradient(145deg, rgba(21, 43, 70, 0.70), rgba(8, 20, 38, 0.74)),
    rgba(10, 24, 46, 0.62);
}

#mainPanel > .panel:nth-of-type(3) {
  border-color: rgba(143, 123, 215, 0.24);
  background:
    linear-gradient(145deg, rgba(28, 35, 69, 0.70), rgba(9, 20, 38, 0.74)),
    rgba(10, 24, 46, 0.62);
}

.result-panel {
  border-color: rgba(104, 223, 160, 0.30);
  background:
    linear-gradient(145deg, rgba(17, 51, 47, 0.70), rgba(8, 22, 31, 0.76)),
    rgba(10, 24, 46, 0.62);
}

.section-head,
.result-head,
.analysis-header,
.target-summary,
.single-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head,
.result-head {
  margin-bottom: 18px;
}

.section-head p,
.result-head p {
  margin-bottom: 0;
  max-width: 780px;
  line-height: 1.7;
}

.section-side-note {
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid rgba(117, 204, 232, 0.30);
  border-radius: 12px;
  color: #d9f5ff;
  background:
    linear-gradient(135deg, rgba(24, 157, 134, 0.18), rgba(28, 102, 168, 0.14)),
    rgba(8, 20, 34, 0.54);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.status-badge {
  padding: 8px 12px;
  border: 1px solid rgba(122, 240, 164, 0.35);
  border-radius: 999px;
  color: var(--green);
  background: rgba(122, 240, 164, 0.1);
  font-weight: 800;
}

.status-badge.warn {
  border-color: rgba(255, 211, 107, 0.35);
  color: var(--warn);
  background: rgba(255, 211, 107, 0.1);
}

.preference-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid rgba(143, 184, 230, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(24, 157, 134, 0.08), rgba(226, 195, 127, 0.06)),
    rgba(7, 17, 29, 0.38);
}

.preference-guide strong {
  color: #f8df9c;
  font-size: 14px;
}

.preference-guide span {
  color: #c5d5e8;
  font-size: 13px;
  font-weight: 800;
}

.guide-star {
  color: #ffd85c;
}

.guide-check {
  color: #5fe19c;
}

.guide-cross {
  color: #ff7588;
}

.reshape-count-badge {
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid rgba(255, 216, 92, 0.34);
  border-radius: 999px;
  color: #fff0ad;
  background: rgba(255, 216, 92, 0.08);
}

.reshape-count-badge.warn {
  border-color: rgba(255, 117, 136, 0.40);
  color: #ffc0c8;
  background: rgba(255, 117, 136, 0.08);
}

.artifact-grid {
  display: grid;
  gap: 12px;
}

.substat-row {
  display: grid;
  grid-template-columns: 1.15fr 0.75fr 0.75fr 0.9fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(143, 184, 230, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(33, 55, 82, 0.70), rgba(16, 31, 53, 0.84)),
    rgba(20, 34, 54, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.substat-row-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d9e9fb;
}

.preference-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(143, 184, 230, 0.22);
  font-size: 13px;
  font-weight: 900;
}

.preference-chip.reshape,
.preference-select.reshape {
  color: #fff0ad;
}

.preference-chip.useful,
.preference-select.useful {
  color: #b7ffd4;
}

.preference-chip.waste,
.preference-select.waste {
  color: #ffc0c8;
}

.substat-row.preference-reshape {
  border-color: rgba(255, 216, 92, 0.54);
  background:
    linear-gradient(135deg, rgba(255, 216, 92, 0.10), rgba(30, 49, 73, 0.70)),
    rgba(22, 27, 34, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 216, 92, 0.08);
}

.substat-row.preference-useful {
  border-color: rgba(95, 225, 156, 0.42);
  background:
    linear-gradient(135deg, rgba(95, 225, 156, 0.08), rgba(30, 49, 73, 0.70)),
    rgba(12, 38, 35, 0.80);
}

.substat-row.preference-waste {
  border-color: rgba(255, 117, 136, 0.46);
  background:
    linear-gradient(135deg, rgba(255, 117, 136, 0.09), rgba(30, 49, 73, 0.70)),
    rgba(38, 18, 31, 0.78);
}

.analysis-panel {
  margin-top: 16px;
}

.artifact-analysis-head,
.result-hero-card {
  padding: 16px;
  border-radius: 13px;
  border: 1px solid rgba(226, 195, 127, 0.26);
  background:
    linear-gradient(135deg, rgba(226, 195, 127, 0.10), rgba(117, 204, 232, 0.07), rgba(143, 123, 215, 0.04)),
    rgba(10, 20, 34, 0.58);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
}

.analysis-title {
  color: var(--gold);
  font-weight: 900;
}

.analysis-grid,
.distribution-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.target-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.analysis-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.analysis-item,
.distribution-item,
.single-cell,
.recommend-card > div,
.metrics-row > div,
.single-result {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(143, 184, 230, 0.25);
  background:
    linear-gradient(145deg, rgba(30, 49, 73, 0.66), rgba(10, 23, 40, 0.58)),
    rgba(11, 22, 38, 0.50);
  backdrop-filter: blur(10px) saturate(1.06);
  -webkit-backdrop-filter: blur(10px) saturate(1.06);
}

.license-panel {
  max-width: 860px;
  margin: 34px auto 0;
  border-color: rgba(226, 195, 127, 0.26);
  background:
    linear-gradient(145deg, rgba(28, 48, 72, 0.62), rgba(9, 18, 31, 0.58)),
    rgba(12, 24, 40, 0.48);
}

.auth-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
  padding: 6px;
  border: 1px solid rgba(143, 184, 230, 0.18);
  border-radius: 13px;
  background: rgba(7, 17, 29, 0.42);
}

.auth-mode {
  min-width: 112px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.auth-mode.active {
  border-color: rgba(226, 195, 127, 0.34);
  color: #fff3ce;
  background:
    linear-gradient(90deg, rgba(24, 157, 134, 0.32), rgba(28, 102, 168, 0.26)),
    rgba(12, 25, 43, 0.88);
}

.license-hints {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.license-hints > div {
  padding: 12px;
  border: 1px solid rgba(143, 184, 230, 0.20);
  border-radius: 12px;
  background: rgba(7, 17, 29, 0.42);
}

.license-hints strong,
.license-hints span {
  display: block;
}

.license-hints strong {
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 6px;
}

.license-hints span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.purchase-card {
  margin-top: 16px;
  padding: 18px 20px 16px;
  border: 1px solid rgba(226, 195, 127, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(20, 36, 55, 0.74), rgba(9, 19, 34, 0.84)),
    rgba(9, 19, 34, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 10px 24px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px) saturate(1.03);
  -webkit-backdrop-filter: blur(8px) saturate(1.03);
}

.purchase-card,
.purchase-card p,
.purchase-card span,
.purchase-card a,
.purchase-card div {
  font-weight: 800;
}

.purchase-card-head {
  display: grid;
  gap: 8px 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.purchase-head-copy h3 {
  margin: 6px 0 0;
  color: #f7fbff;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.28;
}

.purchase-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(226, 195, 127, 0.18);
  color: #ffe9b9;
  font-size: 11px;
  letter-spacing: 0.02em;
  background:
    linear-gradient(90deg, rgba(238, 183, 77, 0.10), rgba(48, 199, 178, 0.08)),
    rgba(12, 25, 43, 0.6);
}

.purchase-price-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 12px;
  text-align: left;
  border: 1px solid rgba(104, 223, 160, 0.14);
  background:
    linear-gradient(135deg, rgba(104, 223, 160, 0.08), rgba(27, 115, 211, 0.04)),
    rgba(8, 21, 37, 0.56);
}

.purchase-price-chip strong {
  color: #fff1c4;
  font-size: 24px;
  line-height: 1;
  font-family: var(--font-data);
}

.purchase-price-chip span {
  color: #7fe2b6;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.purchase-meta-line {
  margin: 8px 0 0;
  color: #9fd9ef;
  font-size: 12px;
  line-height: 1.6;
}

.purchase-description,
.purchase-wish,
.purchase-note {
  margin: 10px 0 0;
  line-height: 1.68;
}

.purchase-description {
  color: #d9e9f7;
  font-size: 13px;
  text-shadow: 0 0 18px rgba(117, 204, 232, 0.12);
}

.purchase-wish {
  color: #ffe7ad;
  font-size: 14px;
}

.purchase-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(143, 184, 230, 0.10);
}

.purchase-inline-item {
  color: #e4edf8;
  font-size: 12px;
  text-decoration: none;
}

.purchase-inline-item:hover {
  color: #8fe6ff;
}

.purchase-note {
  color: #94abc5;
  font-size: 12px;
}

.metric-card.featured {
  border-color: rgba(85, 214, 255, 0.32);
  background: linear-gradient(145deg, rgba(27, 57, 90, 0.86), rgba(13, 27, 49, 0.78));
}

.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-card.desirable {
  border-color: rgba(255, 216, 92, 0.46);
  background:
    linear-gradient(145deg, rgba(255, 216, 92, 0.10), rgba(13, 27, 49, 0.78)),
    rgba(11, 22, 38, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 216, 92, 0.06);
}

.stat-card.neutral {
  border-color: rgba(95, 225, 156, 0.34);
  background:
    linear-gradient(145deg, rgba(95, 225, 156, 0.08), rgba(13, 27, 49, 0.78)),
    rgba(11, 22, 38, 0.72);
}

.stat-card.undesirable {
  border-color: rgba(255, 117, 136, 0.36);
  background:
    linear-gradient(145deg, rgba(255, 117, 136, 0.08), rgba(13, 27, 49, 0.78)),
    rgba(11, 22, 38, 0.72);
}

.analysis-item strong,
.distribution-item strong,
.metric-card strong,
.single-cell div {
  display: block;
  margin-top: 5px;
  font-size: 21px;
  line-height: 1.15;
  font-family: var(--font-num);
}

.target-result {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
}

.target-rate,
.success-rate {
  font-size: 38px;
  font-weight: 900;
  color: var(--green);
  text-shadow: 0 0 26px rgba(111, 240, 162, 0.18);
  font-family: var(--font-num);
}

.result-panel .success-rate {
  display: none;
}

.result-distribution {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.rv-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.rv-card.good strong,
.grade-card.good strong {
  color: var(--green);
}

.rv-card.bad strong,
.grade-card.bad strong {
  color: var(--danger);
}

.grade-card.warn strong {
  color: var(--warn);
}

.metric-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.metric-label::before {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 900;
}

.metric-label.up::before {
  content: "↗";
  color: #9dffd0;
  background: rgba(95, 225, 156, 0.12);
  border: 1px solid rgba(95, 225, 156, 0.22);
}

.metric-label.down::before {
  content: "↘";
  color: #ffb3be;
  background: rgba(255, 117, 136, 0.12);
  border: 1px solid rgba(255, 117, 136, 0.22);
}

.metric-label.mark::before {
  content: "◆";
  color: #ffe08a;
  background: rgba(226, 195, 127, 0.12);
  border: 1px solid rgba(226, 195, 127, 0.22);
}

.metric-label.avg::before {
  content: "∑";
  color: #9fd9ef;
  background: rgba(117, 204, 232, 0.10);
  border: 1px solid rgba(117, 204, 232, 0.20);
}

.metric-label.rv::before {
  content: "RV";
  width: 25px;
  color: #c6d9ff;
  background: rgba(134, 173, 240, 0.10);
  border: 1px solid rgba(134, 173, 240, 0.20);
}

.form-grid,
.license-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.license-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  margin-top: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #d3e5f7;
  font-size: 13px;
  font-weight: 800;
}

.preferred-crit-label {
  color: #ffe08a;
  text-shadow: 0 0 16px rgba(226, 195, 127, 0.18);
}

.hidden-hard-target {
  display: none !important;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(149, 190, 238, 0.34);
  border-radius: 10px;
  padding: 0 12px;
  background:
    linear-gradient(180deg, rgba(9, 22, 39, 0.98), rgba(5, 14, 25, 0.98));
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  color-scheme: dark;
}

option {
  background-color: #071525;
  color: var(--text);
  font-family: var(--font-ui);
}

option:checked,
option:hover {
  background-color: #263a55;
  color: #ffffff;
}

option:disabled {
  color: #718097;
}

input:focus,
select:focus {
  border-color: rgba(85, 214, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(85, 214, 255, 0.12);
}

button {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  color: white;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.primary-action {
  width: 100%;
  margin-top: 18px;
  min-height: 56px;
  font-size: 17px;
  background: linear-gradient(90deg, #c77820 0%, #bd4638 58%, #8f2b4e 100%);
  box-shadow: 0 14px 32px rgba(189, 70, 56, 0.20);
}

.secondary-action {
  margin-top: 14px;
  background: linear-gradient(90deg, #159982 0%, #167cad 100%);
  box-shadow: 0 10px 24px rgba(22, 124, 173, 0.17);
}

.compact-action {
  width: min(220px, 100%);
}

#activateBtn {
  background: linear-gradient(90deg, #139775, #225ec4);
  box-shadow: 0 10px 24px rgba(34, 94, 196, 0.18);
}

#targetCalcBtn {
  background: linear-gradient(90deg, #159982 0%, #167cad 100%);
}

#singleBtn {
  background: linear-gradient(90deg, #179b80 0%, #1090a8 100%);
}

.ghost-button {
  border: 1px solid rgba(133, 164, 204, 0.35);
  background: linear-gradient(90deg, rgba(68, 86, 112, 0.78), rgba(35, 49, 72, 0.82));
  box-shadow: 0 10px 25px rgba(12, 22, 38, 0.18);
}

.message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.recommend-card,
.metrics-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.recommend-card strong {
  font-size: 28px;
  color: var(--gold);
  text-shadow: 0 0 22px rgba(255, 226, 164, 0.14);
  font-family: var(--font-ui);
}

.metrics-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.muted,
.metrics-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.metrics-row strong {
  font-size: 22px;
  font-family: var(--font-num);
}

.reason-box {
  display: none;
}

.notice-panel {
  border-color: rgba(226, 195, 127, 0.24);
}

.mail-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(226, 195, 127, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(226, 195, 127, 0.16), rgba(32, 58, 86, 0.40) 42%, rgba(10, 21, 36, 0.88)),
    rgba(13, 25, 42, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 245, 219, 0.05);
}

.mail-sidebar {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 160px;
  border: 1px solid rgba(255, 226, 164, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 226, 164, 0.12), rgba(10, 20, 34, 0.42)),
    rgba(7, 17, 29, 0.42);
}

.mail-sidebar img {
  width: 66px;
  height: 66px;
  border-radius: 12px;
  object-fit: cover;
}

.mail-sidebar span,
.mail-attachments span {
  border: 1px solid rgba(226, 195, 127, 0.32);
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffe9b1;
  background: rgba(226, 195, 127, 0.10);
  font-size: 12px;
  font-weight: 800;
}

.mail-body {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
}

.mail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.mail-body h3 {
  margin: 0;
  color: var(--gold);
  font-size: 24px;
  line-height: 1.25;
}

.mail-body p {
  max-width: 72ch;
  margin: 0;
  line-height: 1.8;
}

.mail-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.single-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.single-head {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(133, 164, 204, 0.22);
  background: rgba(10, 20, 34, 0.66);
}

.single-head.ok {
  border-color: rgba(111, 240, 162, 0.34);
}

.single-head.bad {
  border-color: rgba(255, 126, 148, 0.34);
  background: linear-gradient(135deg, rgba(86, 24, 47, 0.58), rgba(10, 20, 34, 0.70));
}

.single-head h3 {
  margin: 0;
  font-size: 26px;
}

.single-note {
  margin: 12px 0 0;
}

.single-cell.reshape {
  border-color: rgba(255, 226, 164, 0.54);
}

.single-cell.target {
  border-color: rgba(117, 204, 232, 0.56);
  background:
    linear-gradient(145deg, rgba(30, 66, 105, 0.88), rgba(14, 31, 58, 0.86));
  box-shadow: inset 0 0 0 1px rgba(117, 204, 232, 0.09), 0 12px 26px rgba(20, 68, 132, 0.12);
}

.single-cell.target strong {
  color: #ffffff;
}

.single-cell.target div {
  color: #d8f2ff;
  font-size: 30px;
}

.single-status-ok {
  color: var(--green);
}

.single-status-bad {
  color: var(--danger);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr auto;
  }

  .hero .ghost-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .substat-row,
  .form-grid,
  .license-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-summary-grid,
  .license-hints,
  .section-tabs,
  .metrics-row,
  .single-grid,
  .result-distribution {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .hero,
  .section-head,
  .result-head,
  .analysis-header,
  .target-summary,
  .single-head {
    align-items: flex-start;
    flex-direction: column;
    display: flex;
  }

  .brand-mark {
    width: 64px;
    height: 64px;
  }

  h1 {
    font-size: 31px;
  }

  h2 {
    font-size: 20px;
  }

  .form-grid,
  .license-grid,
  .license-hints,
  .recommend-card,
  .metrics-row,
  .single-grid,
  .analysis-grid,
  .distribution-grid,
  .target-meta-grid,
  .rv-bars,
  .mail-card,
  .substat-row {
    grid-template-columns: 1fr;
  }

  .section-tabs {
    gap: 8px;
    padding: 7px;
  }

  .tab-button {
    min-height: 44px;
    padding: 10px 12px;
  }

  .mail-sidebar {
    min-height: auto;
    grid-template-columns: auto 1fr;
    justify-items: start;
    padding: 12px;
  }

  .mail-sidebar img {
    width: 48px;
    height: 48px;
  }

  .purchase-card {
    padding: 16px;
  }

  .purchase-card-head {
    grid-template-columns: 1fr;
  }

  .purchase-price-chip {
    min-width: 0;
    text-align: left;
    align-items: flex-start;
  }

  .purchase-inline-links {
    flex-direction: column;
    align-items: flex-start;
  }
}
