@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Noto+Sans+SC:wght@400;500;700;800;900&display=swap');

:root {
  --paper: #f7ecd2;
  --ink: #24448a;
  --ink-soft: #5a6c9e;
  --line: #2b4d93;
  --cream: #fff8ee;
  --pink: #ffd7e6;
  --blue: #d9edff;
  --amber: #ffe3b4;
  --shadow: 10px 10px 0 rgba(43, 77, 147, 0.14);
  --shadow-soft: 0 24px 60px rgba(43, 77, 147, 0.08);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --max-width: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 143, 186, 0.18), transparent 26%),
    radial-gradient(circle at 88% 9%, rgba(124, 188, 255, 0.18), transparent 24%),
    linear-gradient(180deg, var(--paper) 0%, #f7eed9 42%, #f5ebd4 100%);
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(36, 68, 138, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 68, 138, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.85), transparent 92%);
}
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
}
.brand-chip,
.nav-pill,
.mini-pill,
.badge-pill,
.matrix-chip,
.sidebar-tag,
.dim-level,
.match-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.92);
  box-shadow: 4px 4px 0 rgba(43, 77, 147, 0.12);
}
.brand-chip {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-pill,
.action-btn,
.pill-btn,
.hero-link,
.result-btn {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.92);
  box-shadow: 6px 6px 0 rgba(43, 77, 147, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.nav-pill:hover,
.action-btn:hover,
.pill-btn:hover,
.hero-link:hover,
.matrix-chip:hover,
.result-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(43, 77, 147, 0.14);
}
.nav-primary,
.action-primary,
.hero-link-primary,
.result-btn-primary { background: linear-gradient(135deg, #ffe6b6 0%, #ffd79d 100%); }
.action-secondary,
.hero-link-secondary,
.result-btn-secondary { background: linear-gradient(135deg, rgba(217, 237, 255, 0.95), rgba(233, 243, 255, 0.98)); }
.site-main { width: 100%; padding-bottom: 44px; }
body[data-screen="home"] .site-main { padding-bottom: 0; }
body[data-screen="test"] .site-main { padding-bottom: 0; }
body[data-screen="result"] {
  scrollbar-width: thin;
  scrollbar-color: var(--line) rgba(255, 248, 238, 0.92);
}
body[data-screen="result"]::-webkit-scrollbar {
  width: 14px;
}
body[data-screen="result"]::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.94), rgba(217, 237, 255, 0.76));
  border-left: 1px solid rgba(43, 77, 147, 0.16);
}
body[data-screen="result"]::-webkit-scrollbar-thumb {
  min-height: 56px;
  border-radius: 999px;
  border: 3px solid rgba(255, 248, 238, 0.94);
  background: linear-gradient(180deg, #24448a 0%, #5b8be4 64%, #ffd79d 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
body[data-screen="result"]::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #1f3b77 0%, #4f78c6 64%, #ffcb77 100%);
}
[hidden] {
  display: none !important;
}
.screen { display: none; }
.screen.active { display: block; }
.screen-shell {
  width: min(calc(100% - 24px), var(--max-width));
  margin: 0 auto;
}
.home-shell {
  padding: 0;
  display: grid;
  gap: 0;
}
#home .home-shell {
  min-height: 100vh;
  align-content: stretch;
}
.panel {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.96), rgba(255, 251, 245, 0.92));
  box-shadow: var(--shadow), var(--shadow-soft);
}
.panel::after {
  content: '';
  position: absolute;
  inset: auto auto -42px -42px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 143, 186, 0.16), rgba(255, 143, 186, 0));
  pointer-events: none;
}
.hero-panel { padding: 28px; }
.home-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: visible;
  padding: 0;
}
.home-hero::before,
.home-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(12px);
  z-index: 0;
}
.home-hero::before {
  width: 420px;
  height: 420px;
  top: 2%;
  right: 10%;
  background: radial-gradient(circle, rgba(124, 188, 255, 0.14), rgba(124, 188, 255, 0));
}
.home-hero::after {
  width: 320px;
  height: 320px;
  left: 4%;
  bottom: 4%;
  background: radial-gradient(circle, rgba(255, 143, 186, 0.12), rgba(255, 143, 186, 0));
}
.hero-kicker {
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(217, 237, 255, 0.95), rgba(255, 255, 255, 0.95));
  border: 2px solid var(--line);
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 4px 4px 0 rgba(43, 77, 147, 0.1);
}
.section-title {
  margin: 16px 0 0;
  font-size: 28px;
  line-height: 1.2;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.02fr) minmax(340px, 0.98fr);
  gap: 2px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-copy {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 0;
  max-width: 640px;
  padding-left: 34px;
}
.hero-title {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(52px, 8.2vw, 88px);
  line-height: 0.92;
  letter-spacing: 0;
  font-weight: 900;
}
.hero-title span {
  display: block;
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 10px;
}
.hero-token,
.hero-mark {
  display: inline-block;
  font-style: normal;
  letter-spacing: -0.06em;
}
.hero-token {
  margin-right: 0.12em;
}
.hero-sub,
.panel-head p,
.muted {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-actions .action-btn {
  padding: 14px 22px;
  font-size: 14px;
}
.home-stage {
  position: relative;
  min-height: 520px;
  max-width: 410px;
  width: 100%;
  justify-self: center;
  transform: translateX(-18px);
  padding: 0;
}
.stage-card {
  position: absolute;
  width: 250px;
  border-radius: 28px;
  border: 2px solid var(--line);
  background: rgba(255, 248, 238, 0.94);
  box-shadow: 10px 10px 0 rgba(43, 77, 147, 0.12);
  overflow: hidden;
  transform-origin: center center;
  will-change: transform;
}
.stage-card::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 2px dashed rgba(43, 77, 147, 0.16);
  pointer-events: none;
}
.stage-card-back {
  top: 12px;
  right: 44px;
  transform: rotate(-10deg);
  animation: stageFloatA 8s ease-in-out infinite;
}
.stage-card-mid {
  top: 82px;
  right: 6px;
  transform: rotate(8deg);
  animation: stageFloatB 9s ease-in-out infinite;
}
.stage-card-front {
  top: 164px;
  right: 78px;
  transform: rotate(-3deg);
  animation: stageFloatC 7.5s ease-in-out infinite;
}
.stage-image {
  position: relative;
  display: block;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.82);
}
.mini-pill,
.badge-pill,
.sidebar-tag,
.dim-level,
.match-chip {
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
}
.floating-card h3,
.feature-card h3,
.split-panel h3,
.matrix-panel h3,
.research-card h3,
.test-summary h3,
.analysis-panel h3,
.top3-panel h3,
.dim-panel h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.3; }
.floating-card p,
.feature-card p,
.split-panel p,
.research-card p,
.analysis-panel p,
.top3-panel p,
.result-subtext,
.dim-note { margin: 0; font-size: 13px; line-height: 1.85; color: var(--ink-soft); }
.floating-card ul,
.step-list { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.floating-divider { height: 1px; margin: 12px 0; border-top: 2px dashed rgba(43, 77, 147, 0.24); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature-card,
.research-card,
.split-card,
.match-card,
.question {
  border-radius: var(--radius-lg);
  border: 2px solid var(--line);
  box-shadow: 8px 8px 0 rgba(43, 77, 147, 0.12);
  overflow: hidden;
}
.feature-card { padding: 20px; min-height: 180px; display: grid; align-content: start; gap: 12px; background: linear-gradient(145deg, rgba(255, 248, 238, 0.98), rgba(255, 224, 236, 0.82)); }
.feature-card[data-tone="blue"] { background: linear-gradient(145deg, rgba(255, 248, 238, 0.98), rgba(217, 237, 255, 0.86)); }
.feature-card[data-tone="amber"] { background: linear-gradient(145deg, rgba(255, 248, 238, 0.98), rgba(255, 227, 180, 0.86)); }
.feature-index {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-size: 14px;
  font-weight: 700;
}
.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
  padding: 20px;
  align-items: stretch;
}
.split-card { padding: 22px; background: linear-gradient(145deg, rgba(255, 248, 238, 0.98), rgba(217, 237, 255, 0.82)); }
.split-card[data-tone="pink"] { background: linear-gradient(145deg, rgba(255, 248, 238, 0.98), rgba(255, 224, 236, 0.82)); }
.step-list { display: grid; gap: 12px; padding-left: 0; list-style: none; }
.step-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 2px solid rgba(43, 77, 147, 0.18);
  background: rgba(255, 255, 255, 0.55);
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 2px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-size: 18px;
  font-weight: 700;
  background: rgba(255, 248, 238, 0.85);
}
.matrix-panel { padding: 24px; display: grid; gap: 18px; }
.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.matrix-layout {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.matrix-column {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--line);
  box-shadow: 7px 7px 0 rgba(43, 77, 147, 0.1);
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.98), rgba(255, 255, 255, 0.72));
}
.matrix-column[data-tone="pink"] { background: linear-gradient(180deg, rgba(255, 248, 238, 0.98), rgba(255, 224, 236, 0.78)); }
.matrix-column[data-tone="blue"] { background: linear-gradient(180deg, rgba(255, 248, 238, 0.98), rgba(217, 237, 255, 0.82)); }
.matrix-column[data-tone="amber"] { background: linear-gradient(180deg, rgba(255, 248, 238, 0.98), rgba(255, 227, 180, 0.76)); }
.matrix-column h4,
.match-card strong,
.question h3,
.dim-name { margin: 0; font-size: 15px; line-height: 1.4; }
.matrix-column p,
.match-card p,
.question-meta,
.dim-item p,
.author-content p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink-soft); }
.matrix-stack { margin-top: 14px; display: grid; gap: 10px; }
.matrix-chip {
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.matrix-chip small { font-size: 11px; font-weight: 600; opacity: 0.75; }
.matrix-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}
.research-card { padding: 22px; background: linear-gradient(145deg, rgba(255, 248, 238, 0.98), rgba(217, 237, 255, 0.82)); }
.research-card[data-tone="pink"] { background: linear-gradient(145deg, rgba(255, 248, 238, 0.98), rgba(255, 224, 236, 0.82)); }
.cta-stack { display: grid; gap: 12px; margin-top: 14px; }
.cta-stack .hero-link { width: 100%; justify-content: space-between; }
.test-shell {
  display: grid;
  min-height: 100vh;
  padding: 0;
}
.test-stage {
  width: min(100%, 920px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 36px) 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 2.6vw, 28px);
}
.test-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 2px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}
.back-link::before {
  content: '←';
  font-size: 14px;
  color: var(--ink);
}
.test-progress-inline {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.9);
  box-shadow: 6px 6px 0 rgba(43, 77, 147, 0.1);
}
.progress-inline-count,
.progress-inline-percent {
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.progress-inline-count { min-width: 86px; }
.progress-inline-percent { color: var(--ink-soft); }
.progress-track {
  position: relative;
  height: 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}
.progress-track > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff9fc6, #7cbcff 58%, #ffe0a5 100%);
  transition: width 0.24s ease;
}
.question-stage {
  min-height: 0;
  display: grid;
}
.question {
  padding: 22px;
  background: rgba(255, 251, 246, 0.88);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  backdrop-filter: blur(8px);
}
.question[data-tone="pink"] { border-color: rgba(43, 77, 147, 0.2); }
.question[data-tone="blue"] { border-color: rgba(43, 77, 147, 0.2); }
.question[data-tone="amber"] { border-color: rgba(43, 77, 147, 0.2); }
.focus-question {
  min-height: clamp(420px, 62vh, 580px);
  padding: clamp(26px, 4vw, 44px);
  display: grid;
  align-content: center;
  gap: clamp(20px, 2.8vw, 28px);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(217, 237, 255, 0.34), rgba(217, 237, 255, 0)),
    radial-gradient(circle at bottom left, rgba(255, 215, 230, 0.28), rgba(255, 215, 230, 0)),
    rgba(255, 251, 246, 0.9);
  box-shadow: 12px 12px 0 rgba(43, 77, 147, 0.12), 0 24px 58px rgba(43, 77, 147, 0.08);
}
.focus-question-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}
.question-meta {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px solid rgba(43, 77, 147, 0.16);
  background: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.question-title {
  margin: 0;
  font-size: clamp(28px, 4.1vw, 42px);
  line-height: 1.55;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: pre-wrap;
}
.options {
  display: grid;
  gap: 14px;
}
.option { position: relative; display: block; }
.option input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.option-shell {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 24px;
  border: 2px solid rgba(43, 77, 147, 0.16);
  background: rgba(255, 255, 255, 0.82);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  box-shadow: 5px 5px 0 rgba(43, 77, 147, 0.06);
}
.option-shell:hover {
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 rgba(43, 77, 147, 0.1);
  border-color: var(--line);
}
.option input:checked + .option-shell {
  border-color: var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(217, 237, 255, 0.88));
  transform: translate(-1px, -1px);
  box-shadow: 8px 8px 0 rgba(43, 77, 147, 0.14);
}
.option-code {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 2px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-size: 17px;
  font-weight: 700;
  background: rgba(255, 248, 238, 0.95);
}
.option-text { font-size: 16px; line-height: 1.85; color: var(--ink); }
.test-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.test-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.test-nav-btn {
  min-width: 132px;
  justify-content: center;
}
.action-btn:disabled,
.pill-btn:disabled,
.result-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: 3px 3px 0 rgba(43, 77, 147, 0.08);
}
.result-shell { padding: 10px 0 40px; display: grid; gap: 20px; }
.result-shell.leaderboard-only .result-hero,
.result-shell.leaderboard-only .result-grid,
.result-shell.leaderboard-only .dim-panel {
  display: none;
}
.result-shell.leaderboard-only .leaderboard-panel {
  min-height: calc(100vh - 20px);
  align-content: start;
}
.result-hero {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
  align-items: stretch;
}
.poster-card {
  position: relative;
  border-radius: calc(var(--radius-xl) - 8px);
  border: 2px solid var(--line);
  padding: 18px;
  background: linear-gradient(145deg, rgba(255, 248, 238, 0.92), rgba(255, 224, 236, 0.82)), linear-gradient(180deg, rgba(217, 237, 255, 0.6), rgba(255, 248, 238, 0));
  box-shadow: 8px 8px 0 rgba(43, 77, 147, 0.1);
  display: grid;
  align-content: space-between;
  gap: 14px;
}
.poster-card::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 24px;
  border: 2px dashed rgba(43, 77, 147, 0.18);
}
.poster-image {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 460px;
  min-height: 260px;
  object-fit: contain;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(43, 77, 147, 0.14);
}
.poster-caption {
  position: relative;
  z-index: 1;
  padding: 12px 14px;
  border-radius: 18px;
  border: 2px solid rgba(43, 77, 147, 0.18);
  background: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.result-summary { display: grid; align-content: start; gap: 18px; padding: 4px 4px 4px 10px; }
.result-type {
  margin: 0;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-weight: 900;
  color: var(--ink);
}
.result-subtext { font-size: 15px; line-height: 1.95; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
}
.analysis-panel,
.top3-panel,
.dim-panel { padding: 22px; }
.analysis-panel { background: linear-gradient(160deg, rgba(255, 248, 238, 0.98), rgba(217, 237, 255, 0.8)); }
.top3-panel { background: linear-gradient(160deg, rgba(255, 248, 238, 0.98), rgba(255, 224, 236, 0.82)); }
.top3-list { display: grid; gap: 12px; margin-top: 16px; }
.match-card { padding: 16px; background: rgba(255, 255, 255, 0.72); display: grid; gap: 8px; }
.match-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.leaderboard-panel {
  padding: 22px;
  display: grid;
  gap: 18px;
  background: linear-gradient(160deg, rgba(255, 248, 238, 0.98), rgba(217, 237, 255, 0.8));
}
.leaderboard-head,
.leaderboard-subhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.leaderboard-head h3,
.leaderboard-subhead h4 {
  margin: 0;
}
.leaderboard-head p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.leaderboard-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.leaderboard-panel-actions {
  display: none;
  flex-wrap: wrap;
  gap: 12px;
}
.result-shell.leaderboard-only .leaderboard-panel-actions {
  display: flex;
}
.leaderboard-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.leaderboard-stat {
  padding: 22px;
  border-radius: 26px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 7px 7px 0 rgba(43, 77, 147, 0.08);
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 10px;
  min-height: 170px;
}
.leaderboard-stat span,
.leaderboard-stat small {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}
.leaderboard-stat strong {
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-size: clamp(38px, 4.8vw, 54px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}
.leaderboard-group {
  display: grid;
  gap: 12px;
}
.leaderboard-top3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.leaderboard-card {
  padding: 18px;
  border-radius: 24px;
  border: 2px solid rgba(43, 77, 147, 0.18);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 6px 6px 0 rgba(43, 77, 147, 0.08);
  display: grid;
  gap: 10px;
}
.leaderboard-card.is-first {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 227, 180, 0.92));
}
.leaderboard-card-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: rgba(255, 248, 238, 0.94);
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-size: 18px;
  font-weight: 700;
}
.leaderboard-card strong,
.leaderboard-row strong {
  font-size: 16px;
  line-height: 1.4;
}
.leaderboard-card p,
.leaderboard-row small,
.leaderboard-empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.leaderboard-list {
  display: grid;
  gap: 10px;
}
.leaderboard-row {
  padding: 14px 16px;
  border-radius: 22px;
  border: 2px solid rgba(43, 77, 147, 0.16);
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  box-shadow: 5px 5px 0 rgba(43, 77, 147, 0.06);
}
.leaderboard-row.is-current {
  border-color: var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 230, 182, 0.9));
}
.leaderboard-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: rgba(255, 248, 238, 0.94);
  font-family: 'Fraunces', 'Noto Sans SC', serif;
  font-size: 18px;
  font-weight: 700;
}
.leaderboard-type {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.leaderboard-metrics {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}
.leaderboard-empty {
  padding: 18px;
  border-radius: 20px;
  border: 2px dashed rgba(43, 77, 147, 0.18);
  background: rgba(255, 255, 255, 0.54);
}
.dim-panel { background: linear-gradient(160deg, rgba(255, 248, 238, 0.98), rgba(255, 227, 180, 0.78)); display: grid; gap: 16px; }
.dim-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.dim-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dim-item {
  padding: 16px;
  border-radius: 22px;
  border: 2px solid rgba(43, 77, 147, 0.18);
  background: rgba(255, 255, 255, 0.68);
  display: grid;
  gap: 10px;
  box-shadow: 5px 5px 0 rgba(43, 77, 147, 0.08);
}
.dim-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.dim-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(43, 77, 147, 0.2);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}
.dim-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff9fc6, #7cbcff 55%, #ffe0a5 100%);
  transition: width 0.28s ease;
}
.author-panel { padding: 0; background: linear-gradient(160deg, rgba(255, 248, 238, 0.98), rgba(217, 237, 255, 0.78)); }
.author-panel summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}
.author-panel summary::-webkit-details-marker { display: none; }
.author-toggle {
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 4px 4px 0 rgba(43, 77, 147, 0.1);
  font-size: 12px;
  font-weight: 700;
}
.author-content { padding: 0 22px 22px; border-top: 2px dashed rgba(43, 77, 147, 0.14); }
.author-copy { display: grid; gap: 12px; margin-top: 18px; }
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes stageFloatA {
  0%, 100% { transform: rotate(-10deg) translateY(0); }
  50% { transform: rotate(-7deg) translateY(-10px); }
}
@keyframes stageFloatB {
  0%, 100% { transform: rotate(8deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-14px); }
}
@keyframes stageFloatC {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-1deg) translateY(-12px); }
}
@media (max-width: 1100px) {
  .hero-grid,
  .split-panel,
  .result-hero,
  .result-grid,
  .matrix-footer,
  .test-shell { grid-template-columns: 1fr; }
  .home-hero { min-height: auto; }
  .home-stage {
    min-height: 560px;
    max-width: 520px;
  }
  .matrix-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-title { max-width: 100%; }
  .hero-copy { padding-left: 0; }
  .home-stage {
    transform: none;
    justify-self: end;
  }
}
@media (max-width: 760px) {
  .screen-shell { width: min(calc(100% - 16px), var(--max-width)); }
  .hero-panel,
  .matrix-panel,
  .analysis-panel,
  .top3-panel,
  .dim-panel,
  .question,
  .author-panel summary,
  .author-content,
  .split-panel,
  .research-card,
  .feature-card,
  .result-hero { padding: 18px; }
  .hero-grid { gap: 18px; }
  .hero-title { font-size: clamp(42px, 14vw, 62px); }
  .hero-copy { gap: 18px; }
  .home-stage {
    min-height: 360px;
    max-width: 320px;
    padding: 0 0 0;
    margin-top: 8px;
  }
  .stage-card { width: 168px; }
  .stage-card-back {
    top: 0;
    right: 20px;
  }
  .stage-card-mid {
    top: 74px;
    right: -4px;
  }
  .stage-card-front {
    top: 148px;
    right: 46px;
  }
  .feature-grid,
  .dim-list,
  .matrix-layout,
  .leaderboard-top3 { grid-template-columns: 1fr; }
  .test-stage {
    min-height: auto;
    padding: 14px 0 18px;
    gap: 14px;
  }
  .question-stage { align-items: start; }
  .test-topbar {
    display: grid;
    gap: 10px;
  }
  .test-progress-inline {
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-radius: 24px;
    padding: 12px 14px;
  }
  .progress-inline-count,
  .progress-inline-percent { font-size: 16px; }
  .focus-question {
    min-height: auto;
    align-content: start;
    gap: 16px;
    padding: 22px;
  }
  .question-title {
    font-size: clamp(24px, 7.8vw, 34px);
    line-height: 1.5;
  }
  .option-shell {
    grid-template-columns: 40px 1fr;
    gap: 12px;
    padding: 15px 16px;
    border-radius: 20px;
  }
  .option-code {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 16px;
  }
  .option-text { font-size: 15px; }
  .test-bottombar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .test-bottom-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .test-nav-btn { width: 100%; }
  .leaderboard-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }
  .leaderboard-metrics {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
    padding-left: 68px;
  }
  .result-type { font-size: clamp(34px, 13vw, 52px); }
  .leaderboard-panel {
    padding: 18px;
    gap: 14px;
  }
  .leaderboard-card,
  .leaderboard-stat {
    padding: 16px;
  }
}
