/* ============================================================
   海斗海克斯人格测试 · 精致改版 v3
   单屏：每个状态严格收进视口。自托管展示字体。
   ============================================================ */

@font-face {
  font-family: "Smiley Sans";
  src: url("../fonts/SmileySans-Oblique.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Oxanium";
  src: url("../fonts/oxanium-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Oxanium";
  src: url("../fonts/oxanium-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Oxanium";
  src: url("../fonts/oxanium-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Oxanium";
  src: url("../fonts/oxanium-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg-0: #03060c;
  --bg-1: #060c17;
  --bg-2: #0b1524;
  --panel-hi: rgba(20, 42, 62, 0.94);
  --panel-lo: rgba(8, 15, 26, 0.97);
  --line: rgba(150, 190, 218, 0.14);
  --line-2: rgba(150, 190, 218, 0.24);
  --cyan-line: rgba(92, 231, 221, 0.4);
  --gold-line: rgba(244, 202, 108, 0.46);
  --text: #f3f7f9;
  --text-2: #aebecb;
  --text-3: #708498;
  --cyan: #5ce7dd;
  --cyan-deep: #29b8b0;
  --gold: #f4ca6c;
  --gold-bright: #ffe6ab;
  --purple: #c3a6ff;
  --rose: #ff8fa8;
  --danger: #ff7590;
  --shell: min(1200px, calc(100% - 48px));
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.34);
  --font-display: "Smiley Sans", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", sans-serif;
  --font-tech: "Oxanium", ui-monospace, "SF Mono", Consolas, monospace;
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC",
    "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.85, 0.25, 1);
}

* { box-sizing: border-box; }

html {
  width: 100%;
  height: 100%;
  min-width: 320px;
  overflow: hidden;
  color-scheme: dark;
  background: var(--bg-0);
}

body {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 320px;
  margin: 0;
  overflow: hidden;
  grid-template-rows: 66px minmax(0, 1fr) 34px;
  background:
    radial-gradient(1200px 520px at 50% -14%, rgba(46, 152, 174, 0.2), transparent 60%),
    radial-gradient(760px 520px at 92% 116%, rgba(126, 88, 176, 0.14), transparent 58%),
    radial-gradient(680px 460px at 4% 30%, rgba(30, 120, 150, 0.1), transparent 60%),
    linear-gradient(180deg, #091426 0%, var(--bg-1) 44%, var(--bg-0) 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 背景：海克斯斜纹 + 细网格 */
body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(115deg, transparent 0 49.3%, rgba(92, 231, 221, 0.06) 49.3% 49.6%, transparent 49.6% 100%),
    linear-gradient(65deg, transparent 0 49.3%, rgba(92, 231, 221, 0.04) 49.3% 49.6%, transparent 49.6% 100%),
    linear-gradient(rgba(150, 190, 218, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 190, 218, 0.028) 1px, transparent 1px);
  background-size: 148px 148px, 148px 148px, 46px 46px, 46px 46px;
  -webkit-mask-image: radial-gradient(130% 92% at 50% 36%, black 26%, transparent 100%);
          mask-image: radial-gradient(130% 92% at 50% 36%, black 26%, transparent 100%);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(92, 231, 221, 0.3); color: #fff; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--cyan);
  color: #031312;
  font-weight: 700;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.ambient {
  position: fixed;
  z-index: -2;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  opacity: 0.16;
}
.ambient-cyan { top: 4%; left: -18%; background: #1fcdda; }
.ambient-gold { right: -18%; bottom: -12%; background: #d89c35; }

/* ============ 通用装饰：角标 ============ */
.corner-frame {
  position: relative;
}

/* ============ 页头 / 页脚 ============ */

.site-header {
  display: flex;
  width: var(--shell);
  height: 66px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-size: 18px; font-weight: 800; letter-spacing: 0.16em; }
.brand small {
  margin-top: 6px;
  color: var(--cyan-deep);
  font: 600 9px/1.2 var(--font-tech);
  letter-spacing: 0.34em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--gold-line);
  background: linear-gradient(145deg, #0f3a56, #0a1521);
  box-shadow: inset 0 0 16px rgba(92, 231, 221, 0.34), 0 0 24px rgba(92, 231, 221, 0.14);
  transform: rotate(45deg);
}
.brand-mark::before, .brand-mark::after, .brand-mark i { position: absolute; content: ""; }
.brand-mark::before { inset: 6px; border: 1px solid rgba(92, 231, 221, 0.64); }
.brand-mark::after {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #fff6c9, #5ff9ef 52%, #5879ff);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 6px rgba(92, 231, 221, 0.9));
}

.assistant-promo {
  display: flex;
  min-height: 40px;
  padding: 6px 8px 6px 15px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(92, 231, 221, 0.26);
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(12, 42, 58, 0.92), rgba(18, 25, 39, 0.92));
  color: inherit;
  text-decoration: none;
  transition: 200ms var(--ease);
}
.assistant-promo span { color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }
.assistant-promo strong { color: #dce6ea; font-size: 12px; font-weight: 500; }
.assistant-promo b {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: rgba(92, 231, 221, 0.14);
  color: var(--gold);
  font-size: 14px;
}
.assistant-promo:hover {
  border-color: rgba(92, 231, 221, 0.6);
  box-shadow: 0 8px 28px rgba(12, 165, 175, 0.2);
  transform: translateY(-1px);
}
.assistant-promo:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.app-shell {
  display: grid;
  width: var(--shell);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  align-items: center;
  padding: 12px 0;
  overflow: hidden;
}
.app-shell.is-result-mode,
.app-shell:has(> .result-screen) {
  align-items: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
.app-shell.is-scroll-mode {
  align-items: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
.app-shell.is-scroll-mode > .selection-screen,
.app-shell.is-scroll-mode > .question-screen {
  height: auto;
  min-height: 100%;
  max-height: none;
  padding-bottom: 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  align-content: start;
}

.site-footer {
  display: flex;
  width: var(--shell);
  height: 34px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ============ 通用 ============ */

.screen-enter { animation: screen-in 540ms var(--ease) both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.landing-screen, .selection-screen, .question-screen,
.calculating-screen, .result-screen, .loading-screen, .error-screen {
  max-height: 100%;
  min-height: 0;
}

.eyebrow, .result-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.eyebrow span, .result-kicker span {
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  box-shadow: 0 0 8px currentColor;
}
.result-kicker span:last-child { background: linear-gradient(90deg, currentColor, transparent); }

/* 主按钮 */
.primary-cta, .secondary-cta, .text-button, .reroll-button { border: 0; cursor: pointer; }
.primary-cta {
  position: relative;
  display: inline-flex;
  min-width: 258px;
  min-height: 58px;
  padding: 0 10px 0 27px;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  border-radius: 13px;
  background: linear-gradient(160deg, #ffe6ab 0%, #edc063 46%, #f7db97 100%);
  box-shadow:
    0 16px 40px rgba(210, 152, 48, 0.3),
    0 0 0 1px rgba(120, 82, 20, 0.5),
    inset 0 1px rgba(255, 255, 255, 0.6);
  color: #241a08;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.04em;
  transition: 200ms var(--ease);
}
.primary-cta > span { transform: skewX(-8deg); }
.primary-cta b {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: rgba(36, 26, 8, 0.16);
  font-family: var(--font-tech);
  font-size: 20px;
  font-weight: 700;
}
.primary-cta:hover {
  box-shadow: 0 20px 52px rgba(210, 152, 48, 0.42), inset 0 1px rgba(255, 255, 255, 0.6);
  filter: brightness(1.05);
  transform: translateY(-2px);
}
.primary-cta:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.secondary-cta {
  min-height: 58px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(16, 34, 52, 0.9), rgba(9, 18, 30, 0.9));
  color: #cad6dc;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: 200ms var(--ease);
}
.secondary-cta:hover { border-color: var(--cyan-line); background: linear-gradient(160deg, rgba(18, 44, 62, 0.95), rgba(11, 22, 36, 0.95)); color: var(--text); }

.text-button {
  padding: 8px 12px;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  transition: 150ms ease;
}
.text-button:hover { color: var(--cyan); }

/* ============ 落地页 ============ */

.landing-screen {
  display: grid;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 0.9fr);
  align-items: center;
  gap: clamp(28px, 4vw, 68px);
  padding: 0;
}

.landing-copy h1 {
  max-width: 100%;
  margin: 22px 0 20px;
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.005em;
}
.landing-copy h1 em {
  font-style: normal;
  background: linear-gradient(102deg, #fff0cf 6%, var(--gold) 52%, #dfa74c 92%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 28px rgba(244, 202, 108, 0.22));
}

.landing-lead {
  max-width: 500px;
  margin: 0 0 34px;
  color: var(--text-2);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.95;
}

.landing-facts { display: flex; gap: 14px; margin-top: 32px; }
.landing-facts span {
  display: grid;
  padding: 10px 18px 9px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(16, 34, 52, 0.6), rgba(8, 16, 27, 0.6));
  color: var(--text-3);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.landing-facts i {
  color: var(--gold);
  font: 800 21px/1 var(--font-tech);
  font-style: normal;
}

.landing-visual {
  position: relative;
  display: grid;
  width: 100%;
  height: min(100%, 640px);
  min-height: 0;
  place-items: center;
}

.rune-halo {
  position: absolute;
  width: min(480px, 96%);
  aspect-ratio: 1;
  border: 1px solid rgba(92, 231, 221, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 120px rgba(28, 176, 186, 0.14), inset 0 0 90px rgba(58, 178, 185, 0.07);
}
.rune-halo::before, .rune-halo::after {
  position: absolute;
  inset: 10%;
  border: 1px dashed rgba(244, 202, 108, 0.2);
  border-radius: 50%;
  content: "";
  animation: rotate 46s linear infinite;
}
.rune-halo::after { inset: 24%; border-style: solid; border-color: rgba(195, 166, 255, 0.16); animation-direction: reverse; }
@keyframes rotate { to { transform: rotate(360deg); } }

/* 十六人格预览面板 */
.personality-showcase {
  position: relative;
  z-index: 2;
  width: min(548px, 100%);
  padding: 20px;
  border: 1px solid var(--cyan-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 60% at 50% 0, rgba(92, 231, 221, 0.08), transparent 60%),
    linear-gradient(152deg, var(--panel-hi), var(--panel-lo) 64%, rgba(30, 18, 38, 0.95));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.07);
  transform: rotate(1deg);
}
.personality-showcase::before {
  position: absolute;
  top: -1px;
  right: 16%;
  left: 16%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  content: "";
  filter: blur(0.4px);
}

.showcase-heading {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.showcase-heading span {
  color: var(--cyan);
  font: 700 11px/1 var(--font-tech);
  letter-spacing: 0.16em;
}
.showcase-heading strong { color: #d0dade; font-size: 13px; font-weight: 600; }

.personality-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.personality-preview-card {
  position: relative;
  display: block;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(150, 190, 218, 0.15);
  border-radius: 12px;
  background: #07111c;
  color: inherit;
  cursor: help;
  text-align: left;
  transition: 200ms var(--ease);
}
.personality-preview-card:nth-child(4n + 2) { border-color: rgba(244, 202, 108, 0.28); }
.personality-preview-card:nth-child(4n + 3) { border-color: rgba(195, 166, 255, 0.28); }
.personality-preview-card:nth-child(4n + 4) { border-color: rgba(255, 143, 168, 0.28); }

.personality-preview-art { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: inherit; }
.personality-preview-grid img { width: 100%; height: 100%; object-fit: cover; transition: 260ms var(--ease); }

.personality-preview-card:hover,
.personality-preview-card:focus-visible {
  z-index: 20;
  border-color: rgba(92, 231, 221, 0.72);
  outline: none;
  box-shadow: 0 0 0 2px rgba(92, 231, 221, 0.16), 0 18px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(-3px);
}
.personality-preview-card:hover img, .personality-preview-card:focus img { filter: brightness(0.66); transform: scale(1.1); }

.personality-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  padding: 26px 8px 8px;
  gap: 3px;
  background: linear-gradient(transparent, rgba(3, 8, 14, 0.96));
}
.personality-label b { color: var(--gold); font: 800 12px/1 var(--font-tech); letter-spacing: 0.06em; }
.personality-label strong {
  overflow: hidden;
  color: #f1f5f6;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personality-detail {
  position: absolute;
  z-index: 30;
  bottom: calc(100% + 10px);
  left: 50%;
  display: grid;
  width: 266px;
  padding: 15px 17px;
  gap: 7px;
  border: 1px solid rgba(92, 231, 221, 0.42);
  border-radius: 14px;
  background: rgba(6, 14, 24, 0.98);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.68);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: 170ms var(--ease);
}
.personality-preview-card:nth-child(4n + 1) .personality-detail { left: 0; transform: translate(0, 8px); }
.personality-preview-card:nth-child(4n) .personality-detail { right: 0; left: auto; transform: translate(0, 8px); }
.personality-preview-card:hover .personality-detail,
.personality-preview-card:focus .personality-detail { opacity: 1; transform: translate(-50%, 0); }
.personality-preview-card:nth-child(4n + 1):hover .personality-detail,
.personality-preview-card:nth-child(4n + 1):focus .personality-detail,
.personality-preview-card:nth-child(4n):hover .personality-detail,
.personality-preview-card:nth-child(4n):focus .personality-detail { transform: translate(0, 0); }

.personality-detail-code { color: var(--gold); font: 800 11px/1 var(--font-tech); letter-spacing: 0.14em; }
.personality-detail > strong { color: #fff4d7; font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.personality-detail > span:not(.personality-detail-code) { color: #c4d3d9; font-size: 13px; line-height: 1.7; }
.personality-detail em { color: var(--text-3); font-size: 11px; font-style: normal; }

/* ============ 选人页 ============ */

.selection-screen { display: grid; width: 100%; height: 100%; grid-template-rows: auto auto auto; align-content: center; }
.section-intro { text-align: center; }
.compact-intro { max-width: 720px; margin: 0 auto 26px; }

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 1px solid var(--cyan-line);
  border-radius: 999px;
  background: rgba(92, 231, 221, 0.06);
  color: var(--cyan);
  font: 700 11px/1 var(--font-tech);
  letter-spacing: 0.18em;
}

.section-intro h1, .question-heading h1 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0.01em;
}
.section-intro p, .question-heading p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.section-intro p strong { color: var(--gold); font-weight: 700; }

.hero-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto;
  align-content: center;
  gap: 16px;
}

.hero-card {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-columns: auto 1fr auto;
  padding: 16px 18px;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(17, 36, 54, 0.9), rgba(7, 15, 26, 0.96));
  text-align: left;
  cursor: pointer;
  transition: 200ms var(--ease);
}
/* 角标装饰 */
.hero-card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(var(--cyan), var(--cyan)) top left / 12px 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top left / 1px 12px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 12px 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 1px 12px no-repeat;
  opacity: 0;
  transition: 200ms ease;
}
.hero-card:hover {
  z-index: 1;
  border-color: var(--cyan-line);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}
.hero-card:hover::before { opacity: 0.7; }
.hero-card.is-selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(244, 202, 108, 0.18), var(--shadow-card); }
.hero-card.is-selected::before {
  opacity: 0.85;
  background:
    linear-gradient(var(--gold), var(--gold)) top left / 12px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top left / 1px 12px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 12px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 1px 12px no-repeat;
}
.hero-card:disabled { cursor: default; }

.hero-image-wrap {
  position: relative;
  display: block;
  width: min(124px, 15vh);
  height: min(124px, 15vh);
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #101c28;
}
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: 300ms var(--ease); }
.hero-card:hover .hero-image-wrap img { transform: scale(1.13); }
.hero-image-wrap i { position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(transparent, rgba(3, 9, 15, 0.82)); }

.hero-info { display: grid; min-width: 0; }
.hero-info small {
  color: var(--cyan);
  font: 600 11px/1 var(--font-tech);
  letter-spacing: 0.14em;
}
.hero-info strong {
  margin: 6px 0 4px;
  overflow: hidden;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-info em { overflow: hidden; color: var(--text-3); font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.hero-arrow { align-self: start; color: #55697a; font-family: var(--font-tech); font-size: 18px; transition: 200ms var(--ease); }
.hero-card:hover .hero-arrow { color: var(--gold); transform: translate(2px, -2px); }

.roster-actions { display: flex; margin-top: 24px; align-items: center; justify-content: space-between; gap: 18px; }
.reroll-button {
  padding: 11px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: rgba(12, 28, 45, 0.78);
  color: #b8c6cd;
  font-size: 13px;
  transition: 200ms var(--ease);
}
.reroll-button span { margin-right: 8px; color: var(--cyan); font-size: 16px; }
.reroll-button:hover:not(:disabled) { border-color: var(--cyan-line); color: var(--text); }
.reroll-button:disabled { opacity: 0.45; cursor: default; }
.seed-label { color: var(--text-3); font: 600 10px/1.2 var(--font-tech); letter-spacing: 0.14em; }

/* ============ 答题页 ============ */

.question-screen { display: grid; width: 100%; height: 100%; grid-template-rows: auto auto minmax(0, 1fr); }

.quiz-progress { width: 100%; max-width: 780px; margin: 0 auto 16px; }
.progress-label {
  display: flex;
  margin-bottom: 9px;
  align-items: flex-end;
  justify-content: space-between;
  color: var(--text-3);
  font: 600 11px/1 var(--font-tech);
  letter-spacing: 0.16em;
}
.progress-label strong { color: var(--text); font: 800 22px/1 var(--font-tech); }
.progress-label strong i { color: var(--text-3); font-size: 12px; font-style: normal; }
.progress-track { height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.08); }
.progress-track i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  box-shadow: 0 0 16px rgba(92, 231, 221, 0.6);
  transition: width 520ms var(--ease);
}

.question-heading { max-width: 800px; margin: 0 auto 18px; text-align: center; }
.question-heading > span { color: var(--cyan); font: 700 12px/1 var(--font-tech); letter-spacing: 0.16em; }
.question-heading h1 { margin: 11px 0 6px; font-size: clamp(28px, 3.6vw, 42px); }
.question-heading p { font-size: 13px; color: var(--text-3); }

.augment-grid { display: grid; min-height: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 16px; }

.augment-card {
  position: relative;
  display: flex;
  height: 100%;
  max-height: 402px;
  min-height: 0;
  padding: clamp(18px, 2.6vh, 30px) 24px 22px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(130% 70% at 50% -8%, color-mix(in srgb, var(--rarity-color, var(--cyan)) 9%, transparent), transparent 62%),
    linear-gradient(168deg, rgba(17, 38, 55, 0.97), rgba(7, 14, 24, 0.98) 64%);
  text-align: center;
  cursor: pointer;
  transition: 240ms var(--ease);
}
.augment-card::before {
  position: absolute;
  top: -1px;
  right: 14%;
  left: 14%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--rarity-color, var(--cyan)), transparent);
  content: "";
  filter: blur(0.3px);
}
.augment-card:hover {
  z-index: 1;
  border-color: color-mix(in srgb, var(--rarity-color, var(--cyan)) 62%, transparent);
  box-shadow: 0 28px 66px rgba(0, 0, 0, 0.42), 0 0 0 1px color-mix(in srgb, var(--rarity-color, var(--cyan)) 20%, transparent);
  transform: translateY(-6px);
}

.rarity-kSilver { --rarity-color: #b6d6e2; }
.rarity-kGold { --rarity-color: var(--gold); }
.rarity-kPrismatic { --rarity-color: var(--purple); }

.augment-art { position: relative; display: grid; width: min(128px, 16.5vh); height: min(128px, 16.5vh); place-items: center; }
.augment-art::before {
  position: absolute;
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 50%, transparent);
  border-radius: 26px;
  content: "";
  transform: rotate(45deg);
  box-shadow: 0 0 24px color-mix(in srgb, var(--rarity-color) 18%, transparent);
}
.augment-glow { position: absolute; inset: 14px; border-radius: 50%; background: var(--rarity-color); filter: blur(30px); opacity: 0.16; }
.augment-art img { position: relative; z-index: 1; width: min(102px, 13.2vh); height: min(102px, 13.2vh); object-fit: contain; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55)); }
.augment-art img.is-missing { opacity: 0; }

.augment-copy { display: grid; margin-top: 20px; align-content: start; }
.augment-copy small { margin-top: 0; color: var(--rarity-color); font: 700 11px/1 var(--font-tech); letter-spacing: 0.16em; }
.augment-copy strong {
  margin: 8px 0 9px;
  color: #fff7e6;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.7vw, 23px);
  font-weight: 700;
  line-height: 1.28;
}
.augment-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #a5b6c0;
  font-size: 13px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.choose-label {
  display: flex;
  width: 100%;
  margin-top: 20px;
  padding-top: 14px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: 200ms ease;
}
.choose-label b { font-family: var(--font-tech); }
.augment-card:hover .choose-label { color: var(--rarity-color); }

.augment-card.is-picked {
  border-color: var(--rarity-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rarity-color) 22%, transparent), 0 28px 66px rgba(0, 0, 0, 0.4);
  transform: translateY(-5px) scale(1.016);
}
.augment-card.is-dismissed { opacity: 0.24; transform: scale(0.97); }

/* ============ 加载 / 计算 / 错误 ============ */

.loading-screen, .calculating-screen, .error-screen {
  display: grid;
  height: 100%;
  place-items: center;
  align-content: center;
  text-align: center;
}

.loading-screen p { margin-top: 30px; color: var(--text-2); font: 500 13px/1 var(--font-tech); letter-spacing: 0.14em; }
.loading-rune {
  position: relative;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(244, 202, 108, 0.62);
  box-shadow: inset 0 0 22px rgba(92, 231, 221, 0.16), 0 0 28px rgba(92, 231, 221, 0.12);
  animation: loading-spin 1.4s cubic-bezier(0.56, 0.08, 0.3, 0.9) infinite;
  transform: rotate(45deg);
}
.loading-rune::after { position: absolute; inset: 13px; border: 2px solid var(--cyan); content: ""; }
@keyframes loading-spin { to { transform: rotate(405deg); } }

.scan-emblem {
  position: relative;
  display: grid;
  width: 120px;
  height: 120px;
  place-items: center;
  border: 1px solid var(--cyan-line);
  border-radius: 50%;
}
.scan-emblem::before, .scan-emblem::after { position: absolute; border-radius: inherit; content: ""; }
.scan-emblem::before { inset: 11px; border: 1px dashed rgba(244, 202, 108, 0.4); animation: rotate 6s linear infinite; }
.scan-emblem::after { inset: -16px; border: 1px solid rgba(92, 231, 221, 0.09); }
.scan-emblem b { color: var(--cyan); font: 800 24px/1 var(--font-tech); }

.calculating-screen h1 { margin: 32px 0 18px; font-family: var(--font-display); font-size: clamp(28px, 3.8vw, 42px); font-weight: 800; }
.scan-messages { color: var(--text-3); font-size: 13px; }
.scan-messages p { margin: 8px; transition: 300ms ease; }
.scan-messages p::before { margin-right: 8px; content: "◇"; }
.scan-messages p.is-active { color: #c0cdd3; }
.scan-messages p.is-active::before { color: var(--gold); content: "◆"; }

.error-screen span { color: var(--danger); font: 700 12px/1 var(--font-tech); letter-spacing: 0.16em; }
.error-screen h1 { margin: 14px 0 8px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.error-screen p { max-width: 560px; margin: 0 0 26px; color: var(--text-2); font-size: 14px; }

/* ============ 结果页 ============ */

.result-screen {
  position: relative;
  display: grid;
  width: min(1000px, 100%);
  height: auto;
  min-height: 100%;
  max-height: none;
  margin: 0 auto;
  padding: 0 0 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  align-self: start;
  grid-template-rows: repeat(4, auto);
  align-content: start;
}
.result-kicker { justify-content: center; margin-bottom: 9px; }

.result-card {
  position: relative;
  display: grid;
  min-height: auto;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 1.28fr);
  gap: clamp(18px, 2.2vw, 30px);
  padding: clamp(15px, 2vh, 22px);
  overflow: hidden;
  border: 1px solid var(--cyan-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 95% 3%, rgba(92, 231, 221, 0.13), transparent 30%),
    radial-gradient(circle at 6% 95%, rgba(195, 166, 255, 0.11), transparent 32%),
    linear-gradient(150deg, rgba(16, 40, 57, 0.98), rgba(7, 15, 25, 0.99) 60%, rgba(29, 17, 36, 0.98));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.06);
}
.result-card::before {
  position: absolute;
  top: -1px;
  right: 12%;
  left: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  content: "";
}

.result-character {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(92, 231, 221, 0.26);
  border-radius: 16px;
  background: #07111b;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}
.result-character > img { width: 100%; height: 100%; object-fit: contain; }

.result-main {
  display: grid;
  min-height: auto;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
}

.character-code {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--gold-line);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(14, 34, 50, 0.92), rgba(6, 14, 24, 0.86));
  color: var(--gold);
  font: 800 18px/1 var(--font-tech);
  letter-spacing: 0.2em;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14), 0 6px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}
.character-code::before {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #fff6c9, #f4ca6c);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 0 9px rgba(244, 202, 108, 0.85);
  content: "";
}

.result-hero-chip {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: 46px auto;
  grid-template-rows: auto auto;
  padding: 7px 14px 7px 7px;
  align-items: center;
  column-gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: rgba(4, 10, 17, 0.82);
  backdrop-filter: blur(9px);
}
.result-hero-chip img { width: 46px; height: 46px; grid-row: 1 / 3; border-radius: 10px; object-fit: cover; }
.result-hero-chip small { align-self: end; color: var(--text-3); font-size: 9px; letter-spacing: 0.1em; }
.result-hero-chip strong { align-self: start; color: #eef5f6; font-size: 13px; font-weight: 700; white-space: nowrap; }

.result-heading {
  display: grid;
  align-self: end;
  grid-template-columns: minmax(0, 1fr) clamp(88px, 9vw, 112px);
  grid-template-rows: auto auto auto;
  align-items: end;
  column-gap: clamp(14px, 2vw, 24px);
}
.result-overline {
  display: inline-flex;
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  gap: 9px;
  color: var(--text-3);
  font: 600 11px/1 var(--font-tech);
  letter-spacing: 0.24em;
}
.result-overline::before {
  width: 18px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
  content: "";
}

.result-card h1 {
  grid-column: 1;
  grid-row: 2;
  margin: 11px 0 0;
  color: #fff2d3;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.8vw, 56px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: 0.01em;
}

.result-code { display: flex; grid-column: 1; grid-row: 3; gap: 7px; margin-top: 13px; }
.result-code b {
  display: grid;
  width: 41px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(92, 231, 221, 0.34);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(92, 231, 221, 0.2), rgba(92, 231, 221, 0.04));
  color: var(--cyan);
  font: 800 23px/1 var(--font-tech);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 6px 16px rgba(0, 0, 0, 0.28);
}
.result-code b:nth-child(2) { border-color: rgba(244, 202, 108, 0.36); background: linear-gradient(160deg, rgba(244, 202, 108, 0.22), rgba(244, 202, 108, 0.04)); color: var(--gold); }
.result-code b:nth-child(3) { border-color: rgba(195, 166, 255, 0.36); background: linear-gradient(160deg, rgba(195, 166, 255, 0.22), rgba(195, 166, 255, 0.04)); color: var(--purple); }
.result-code b:nth-child(4) { border-color: rgba(255, 143, 168, 0.36); background: linear-gradient(160deg, rgba(255, 143, 168, 0.22), rgba(255, 143, 168, 0.04)); color: var(--rose); }

.result-hero-avatar {
  width: clamp(88px, 9vw, 112px);
  height: auto;
  aspect-ratio: 1;
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: end;
  border: 1px solid rgba(244, 202, 108, 0.58);
  border-radius: 18px;
  background: #08131e;
  object-fit: cover;
  box-shadow:
    0 0 0 4px rgba(92, 231, 221, 0.07),
    0 14px 30px rgba(0, 0, 0, 0.38),
    inset 0 1px rgba(255, 255, 255, 0.12);
}

.result-summary {
  position: relative;
  margin: 16px 0 18px;
  padding: 14px 22px;
  border: 1px solid rgba(244, 202, 108, 0.18);
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(90deg, rgba(244, 202, 108, 0.09), rgba(92, 231, 221, 0.025) 64%, transparent);
  color: #e9f0f2;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.72;
  letter-spacing: 0.035em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7), 0 0 18px rgba(92, 231, 221, 0.08);
}

/* 四轴档案面板 · 2×2 */
.axis-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 14px 26px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.008));
}
.axis-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 13px;
  row-gap: 7px;
}
.axis-row:nth-child(1) { --c: var(--cyan); }
.axis-row:nth-child(2) { --c: var(--gold); }
.axis-row:nth-child(3) { --c: var(--purple); }
.axis-row:nth-child(4) { --c: var(--rose); }

.axis-gem {
  display: grid;
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--c) 42%, transparent);
  border-radius: 11px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, transparent), color-mix(in srgb, var(--c) 4%, transparent));
  color: var(--c);
  font: 800 23px/1 var(--font-tech);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}
.axis-head { grid-column: 2; display: flex; align-items: baseline; justify-content: flex-start; gap: 6px; }
.axis-head span { flex: 0 0 auto; color: #e8eff2; font-size: 18px; font-weight: 700; white-space: nowrap; }
.axis-head em { flex: 0 0 auto; color: var(--c); font: 800 16px/1 var(--font-tech); font-style: normal; white-space: nowrap; }

.axis-scale { grid-column: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.axis-scale > span { color: var(--text-3); font-size: 10px; letter-spacing: 0.02em; transition: color 200ms ease; }
.axis-scale > span.is-on { color: var(--c); font-weight: 700; }
.axis-scale > i {
  position: relative;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(92, 231, 221, 0.34), rgba(255, 255, 255, 0.06) 50%, rgba(255, 143, 168, 0.34));
}
.axis-scale > i u {
  position: absolute;
  top: 50%;
  left: var(--axis);
  width: 13px;
  height: 13px;
  border: 2px solid #0a1420;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 0 13px color-mix(in srgb, var(--c) 65%, transparent);
  transform: translate(-50%, -50%);
}

/* 数据直觉环形表 */
.data-verdict {
  display: grid;
  margin-top: 14px;
  padding: 16px 18px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(92, 231, 221, 0.3);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 8% 50%, rgba(92, 231, 221, 0.12), transparent 27%),
    linear-gradient(120deg, rgba(92, 231, 221, 0.075), rgba(244, 202, 108, 0.025) 72%, rgba(92, 231, 221, 0.012));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.045), 0 12px 28px rgba(0, 0, 0, 0.12);
}
.data-ring {
  position: relative;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--v) * 1%), rgba(255, 255, 255, 0.09) 0);
}
.data-ring::before { position: absolute; inset: 5px; border-radius: 50%; background: #0a1926; content: ""; }
.data-ring b { position: relative; color: var(--cyan); font: 800 24px/1 var(--font-tech); text-shadow: 0 0 16px rgba(92, 231, 221, 0.28); }
.data-body { min-width: 0; }
.data-body > span { display: block; margin-bottom: 7px; color: var(--cyan); font: 700 12px/1 var(--font-tech); letter-spacing: 0.15em; text-shadow: 0 0 14px rgba(92, 231, 221, 0.22); }
.data-body p {
  margin: 0;
  color: #dbe5e9;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.58;
  letter-spacing: 0.025em;
}
.data-body em { color: var(--gold); font-style: normal; font-weight: 700; text-shadow: 0 0 14px rgba(244, 202, 108, 0.14); }

.share-actions { display: grid; grid-template-columns: 1fr 0.72fr; gap: 12px; margin-top: 10px; }
.share-button { width: 100%; }
.share-actions .primary-cta, .share-actions .secondary-cta { min-height: 50px; }

.text-button { position: absolute; top: -8px; right: 0; margin: 0; }
.share-feedback { position: absolute; right: 0; bottom: -20px; left: 0; min-height: 18px; margin: 0; color: var(--gold); font-size: 12px; text-align: center; }

/* ============ 平板 ============ */

@media (max-width: 920px) {
  body { grid-template-rows: 56px minmax(0, 1fr) 28px; }
  .site-header { height: 56px; }
  .site-footer { height: 28px; font-size: 11px; }
  .app-shell { padding: 10px 0; }
  .landing-screen { grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1.08fr); gap: 24px; }
  .landing-copy h1 { font-size: clamp(38px, 5.6vw, 58px); }
  .landing-visual { min-height: 0; }
  .hero-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .augment-card { padding-right: 16px; padding-left: 16px; }
}

/* ============ 手机 ============ */

@media (max-width: 640px) {
  :root { --shell: min(100% - 24px, 520px); }
  body { grid-template-rows: 50px minmax(0, 1fr) 24px; }
  .site-header { height: 50px; min-height: 0; gap: 8px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .assistant-promo { min-height: 34px; padding: 4px 6px 4px 11px; gap: 7px; }
  .assistant-promo span, .assistant-promo strong { font-size: 11px; }
  .assistant-promo b { width: 23px; height: 23px; font-size: 12px; }
  .site-footer { height: 24px; min-height: 0; justify-content: center; font-size: 10px; }
  .site-footer span:last-child { display: none; }
  .app-shell { height: 100%; min-height: 0; padding: 8px 0; align-items: center; }

  /* 落地页 */
  .landing-screen { display: grid; min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 16px; padding: 0; }
  .landing-copy { text-align: center; }
  .eyebrow { justify-content: center; font-size: 12px; }
  .landing-copy h1 { margin: 10px auto 8px; font-size: clamp(36px, 10.5vw, 46px); }
  .landing-lead { max-width: 360px; margin: 0 auto 14px; font-size: 14px; line-height: 1.7; }
  .primary-cta { min-width: 232px; min-height: 50px; font-size: 17px; }
  .primary-cta b { width: 36px; height: 36px; }
  .landing-facts { justify-content: center; gap: 8px; margin-top: 14px; }
  .landing-facts span { padding: 7px 13px 6px; }
  .landing-facts i { font-size: 17px; }

  .landing-visual { width: 100%; height: auto; min-height: 0; }
  .rune-halo { width: min(300px, 86%); }
  .personality-showcase { width: min(360px, 100%); max-height: 100%; padding: 12px; border-radius: 18px; transform: none; }
  .showcase-heading { margin-bottom: 10px; }
  .showcase-heading span { font-size: 9px; }
  .showcase-heading strong { font-size: 12px; }
  .personality-preview-grid { gap: 6px; }
  .personality-preview-card { border-radius: 10px; }
  .personality-label { padding: 20px 6px 6px; gap: 2px; }
  .personality-label b { font-size: 10px; }
  .personality-label strong { font-size: 11px; }
  .personality-detail { width: 250px; padding: 13px 15px; }
  .personality-detail > strong { font-size: 18px; }
  .personality-detail > span:not(.personality-detail-code) { font-size: 12px; }

  /* 选人页 */
  .selection-screen { min-height: 0; }
  .app-shell.is-scroll-mode > .selection-screen,
  .app-shell.is-scroll-mode > .question-screen { min-height: 100%; max-height: none; }
  .app-shell.is-scroll-mode .hero-grid { grid-template-rows: repeat(3, clamp(148px, 24vh, 210px)); }
  .app-shell.is-scroll-mode .hero-card { height: 100%; min-height: 0; }
  .compact-intro { margin-bottom: 10px; }
  .step-pill { padding: 5px 11px; font-size: 9px; }
  .section-intro h1 { margin: 8px 0 4px; font-size: 26px; }
  .section-intro p { font-size: 12px; line-height: 1.5; }
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hero-card { position: relative; display: block; height: 100%; max-height: none; padding: 0; overflow: hidden; }
  .hero-image-wrap { width: 100%; height: 100%; border: 0; border-radius: inherit; }
  .hero-info { position: absolute; right: 0; bottom: 0; left: 0; padding: 22px 9px 8px; background: linear-gradient(transparent, rgba(3, 9, 15, 0.95)); }
  .hero-info small, .hero-info em { display: none; }
  .hero-info strong { margin: 0; font-size: 15px; }
  .hero-arrow { position: absolute; top: 8px; right: 8px; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: rgba(4, 11, 18, 0.72); color: var(--gold); font-size: 15px; }
  .roster-actions { display: flex; margin-top: 8px; }
  .reroll-button { padding: 7px 13px; font-size: 11px; }
  .reroll-button span { font-size: 13px; }
  .seed-label { font-size: 9px; }

  /* 答题页 */
  .quiz-progress { margin-bottom: 9px; }
  .progress-label { margin-bottom: 5px; font-size: 10px; }
  .progress-label strong { font-size: 17px; }
  .question-heading { margin-bottom: 9px; }
  .question-heading > span { font-size: 10px; }
  .question-heading h1 { margin: 6px 0 3px; font-size: 25px; }
  .question-heading p { font-size: 11px; }
  .augment-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, clamp(148px, 23vh, 276px));
    align-content: start;
    gap: 10px;
  }
  .augment-card {
    display: grid;
    height: 100%;
    max-height: none;
    min-height: 0;
    padding: 13px 15px;
    grid-template-columns: clamp(136px, 38vw, 184px) minmax(0, 1fr) 34px;
    align-items: center;
    gap: 14px;
    border-radius: var(--radius-md);
    text-align: left;
  }
  .augment-card:hover { transform: none; }
  .augment-art { width: min(100%, 164px); height: auto; overflow: visible; aspect-ratio: 1; }
  .augment-art::before { display: none; }
  .augment-glow { inset: 6%; opacity: 0.24; }
  .augment-art img {
    width: 100%;
    height: 100%;
    transform: scale(1.02);
    transform-origin: center;
  }
  .augment-copy { position: relative; z-index: 1; margin: 0; align-content: center; }
  .augment-copy small { margin: 0; font-size: 12px; letter-spacing: 0.12em; }
  .augment-copy strong { margin: 6px 0 7px; font-size: 26px; line-height: 1.2; }
  .augment-copy p { color: #c0cdd3; font-size: 15px; line-height: 1.56; -webkit-line-clamp: 3; }
  .choose-label { display: grid; width: 34px; height: 34px; margin: 0; padding: 0; place-items: center; border: 1px solid var(--line-2); border-radius: 10px; border-top: 1px solid var(--line-2); font-size: 0; }
  .choose-label b { font-size: 17px; }
  .augment-card.is-picked { transform: scale(1.01); }

  /* 结果页：从顶部自然向下排列，立绘完整展示 */
  .result-screen { width: 100%; min-height: 100%; height: auto; max-height: none; grid-template-rows: repeat(4, auto); align-content: start; }
  .result-kicker { margin-bottom: 4px; font-size: 10px; }
  .result-card { grid-template-columns: 1fr; gap: 11px; padding: 12px; border-radius: var(--radius-md); }
  .result-character { min-height: 0; height: auto; aspect-ratio: 4 / 3; border-radius: 12px; }
  .result-character > img { object-position: center; }
  .result-main { grid-template-rows: auto auto auto auto; align-content: start; }
  .result-heading {
    align-self: start;
    grid-template-columns: minmax(0, 1fr) clamp(76px, 22vw, 92px);
    column-gap: 12px;
  }
  .result-overline { font-size: 9px; letter-spacing: 0.18em; }
  .result-overline::before { width: 12px; }
  .result-card h1 { margin: 8px 0 0; font-size: 28px; }
  .result-code { gap: 5px; margin-top: 8px; }
  .result-code b { width: 33px; height: 35px; border-radius: 8px; font-size: 20px; }
  .result-hero-avatar { width: clamp(76px, 22vw, 92px); border-radius: 15px; }
  .result-summary {
    margin: 11px 0 12px;
    padding: 10px 13px;
    border-left-width: 3px;
    border-radius: 0 10px 10px 0;
    font-size: 16px;
    line-height: 1.68;
    letter-spacing: 0.025em;
  }
  .axis-list { align-content: center; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; padding: 9px 13px; }
  .axis-row { grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto; padding: 5px 0; column-gap: 9px; border-bottom: 0; }
  .axis-gem { grid-row: auto; width: 30px; height: 30px; border-radius: 8px; font-size: 16px; }
  .axis-head span { font-size: 15px; }
  .axis-head em { font-size: 13px; }
  .axis-scale { display: none; }
  .data-verdict { margin-top: 9px; padding: 11px 12px; grid-template-columns: auto minmax(0, 1fr); gap: 11px; }
  .data-ring { width: 52px; height: 52px; }
  .data-ring::before { inset: 4px; }
  .data-ring b { font-size: 20px; }
  .data-body > span { margin-bottom: 5px; font-size: 10px; }
  .data-body p { display: -webkit-box; overflow: hidden; font-size: 14px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .share-actions { grid-template-columns: 1fr 0.72fr; margin-top: 6px; gap: 8px; }
  .share-actions .primary-cta, .share-actions .secondary-cta { min-height: 44px; border-radius: 11px; font-size: 14px; }
  .share-actions .primary-cta { min-width: 0; padding-left: 15px; }
  .share-actions .primary-cta b { width: 31px; height: 31px; }
  .text-button { top: -7px; padding: 5px; font-size: 10px; }
  .share-feedback { bottom: -19px; font-size: 10px; }
  .calculating-screen h1 { font-size: 26px; }
  .error-screen h1 { font-size: 27px; }
}

@media (max-width: 380px) {
  .augment-card {
    padding-right: 11px;
    padding-left: 11px;
    grid-template-columns: 118px minmax(0, 1fr) 32px;
    gap: 9px;
  }
  .augment-art { width: 112px; }
  .augment-copy small { font-size: 10px; }
  .augment-copy strong { margin: 5px 0 6px; font-size: 22px; }
  .augment-copy p { font-size: 13px; line-height: 1.48; -webkit-line-clamp: 2; }
  .choose-label { width: 32px; height: 32px; }
}

/* ============ 矮视口 ============ */

@media (max-height: 700px) {
  body { grid-template-rows: 48px minmax(0, 1fr); }
  .site-header { height: 48px; }
  .site-footer { display: none; }
  .landing-copy h1 { font-size: clamp(32px, 8.6vw, 44px); }
  .landing-lead { margin-bottom: 12px; font-size: 12px; line-height: 1.5; }
  .landing-facts { margin-top: 10px; }
  .landing-facts span { padding: 6px 12px 5px; }
  .landing-screen { gap: 12px; }
  .showcase-heading { display: none; }
  .personality-showcase { width: min(286px, 90%); }
  .personality-label { padding: 16px 5px 5px; }
  .personality-label b { font-size: 9px; }
  .personality-label strong { font-size: 10px; }
  .result-summary { margin: 10px 0 12px; font-size: 16px; line-height: 1.68; }
  .data-body p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .share-actions { margin-top: 4px; }
  .share-actions .primary-cta, .share-actions .secondary-cta { min-height: 40px; }
  .share-actions .primary-cta b { width: 28px; height: 28px; }

  /* 矮屏结果页：四轴压成 2×2 紧凑网格 */
  .result-card { padding: clamp(13px, 1.8vh, 18px); }
  .result-card h1 { font-size: clamp(30px, 3.6vw, 44px); }
  .result-code b { height: 40px; }
  .axis-list {
    align-content: center;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 20px;
    padding: 8px 16px;
  }
  .axis-row {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto;
    padding: 7px 0;
    column-gap: 11px;
    border-bottom: 0;
  }
  .axis-gem { grid-row: auto; width: 34px; height: 34px; font-size: 18px; border-radius: 9px; }
  .axis-head span { font-size: 16px; }
  .axis-head em { font-size: 14px; }
  .axis-scale { display: none; }
  .data-verdict { margin-top: 11px; padding: 10px 14px; }
  .data-ring { width: 50px; height: 50px; }
  .data-ring b { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ 结果页 · 海斗助手下载引导 ============ */
.assistant-cta {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 18px 18px 20px;
  border: 2px solid #eac15e;
  border-radius: 18px;
  background:
    radial-gradient(circle at 9% 50%, rgba(255, 230, 171, 0.42), transparent 28%),
    linear-gradient(112deg, rgba(244, 202, 108, 0.3), rgba(92, 231, 221, 0.16) 82%);
  box-shadow:
    0 0 0 4px rgba(244, 202, 108, 0.08),
    0 18px 46px rgba(210, 152, 48, 0.28),
    inset 0 1px rgba(255, 255, 255, 0.18);
  color: inherit;
  text-decoration: none;
  transition: 200ms var(--ease);
}
.assistant-cta::before {
  position: absolute;
  top: 0;
  right: 8%;
  left: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  content: "";
  pointer-events: none;
}
.assistant-cta:hover {
  border-color: var(--gold);
  box-shadow: 0 18px 44px rgba(210, 152, 48, 0.3), inset 0 1px rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.assistant-cta:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.assistant-cta-mark {
  display: grid;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  overflow: hidden;
  place-items: center;
  border-radius: 15px;
  background: #071a34;
  box-shadow: 0 8px 22px rgba(210, 152, 48, 0.28);
}
.assistant-cta-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 63% 52%;
  transform: scale(1.38);
}
.assistant-cta-copy { display: grid; gap: 4px; min-width: 0; }
.assistant-cta-copy strong {
  color: #fff4d4;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px rgba(244, 202, 108, 0.26);
}
.assistant-cta-copy small { color: #d9e5e8; font-size: 13px; font-weight: 600; }
.assistant-cta b {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff0bc, #f2c45d 72%, #e7ad38);
  color: #291c06;
  font: 800 16px/1 var(--font-tech);
  box-shadow: 0 10px 24px rgba(210, 152, 48, 0.36), inset 0 1px rgba(255, 255, 255, 0.58);
  white-space: nowrap;
  transition: 200ms var(--ease);
}
.assistant-cta:hover b { filter: brightness(1.08); transform: translateX(2px); }

@media (max-width: 640px) {
  .assistant-cta { margin-top: 14px; gap: 13px; padding: 14px 12px 14px 14px; border-radius: 16px; }
  .assistant-cta-mark { width: 48px; height: 48px; border-radius: 12px; }
  .assistant-cta-copy strong { font-size: 19px; }
  .assistant-cta-copy small { color: #d0dde1; font-size: 11px; line-height: 1.4; }
  .assistant-cta b { padding: 11px 13px; border-radius: 10px; font-size: 13px; }
}

@media (max-width: 380px) {
  .assistant-cta { gap: 9px; padding-right: 9px; padding-left: 10px; }
  .assistant-cta-mark { width: 42px; height: 42px; }
  .assistant-cta-copy strong { font-size: 17px; }
  .assistant-cta-copy small { font-size: 9px; }
  .assistant-cta b { padding: 10px 9px; font-size: 11px; }
}

@media (max-height: 700px) {
  .assistant-cta { margin-top: 7px; padding-top: 9px; padding-bottom: 9px; }
  .assistant-cta-copy small { display: none; }
}
