/* ═══════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════ */
:root {
  --bg: #f5f9f5;
  --panel: #ffffff;
  --text: #1a2b1f;
  --muted: #6b7e71;
  --line: #dce9de;
  --soft: #ecf4ee;
  --accent: #6c8d71;
  --accent-strong: #3d6346;
  --shadow-sm: 0 2px 8px rgba(40, 68, 48, .04);
  --shadow: 0 8px 32px rgba(40, 68, 48, .07);
  --shadow-lg: 0 20px 56px rgba(40, 68, 48, .10);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  --content-w: 1120px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  font-size: 15px;
}

/* ── Layout ── */
.shell {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 36px 48px 80px;
}

/* ── Screen toggle ── */
.screen { display: none; }
.screen.active { display: block; }

/* ═══════════════════════════════
   HEADER
   ═══════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 249, 245, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 48px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-strong);
  text-decoration: none;
  letter-spacing: -.03em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.site-logo span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  transition: color .15s, background .15s;
}
.nav-link:hover {
  color: var(--accent-strong);
  background: var(--soft);
}
.nav-cta {
  padding: 9px 20px;
  font-size: 14px;
  margin-left: 6px;
}

/* ═══════════════════════════════
   CARDS & BUTTONS
   ═══════════════════════════════ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
  transition: all .18s ease;
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { cursor: not-allowed; opacity: .45; transform: none; }

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius-xs);
  box-shadow: 0 4px 16px rgba(61, 99, 70, .20);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(61, 99, 70, .28); }

.btn-secondary {
  background: var(--panel);
  color: var(--accent-strong);
  padding: 14px 32px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 15px;
}
.btn-secondary:hover { background: var(--soft); }

.btn-ghost {
  background: transparent;
  color: var(--accent-strong);
  padding: 14px 0;
  font-weight: 600;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
  border: 0;
}
.btn-ghost:hover { color: var(--text); transform: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 13px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--accent-strong);
  font-weight: 600;
  letter-spacing: .02em;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* ═══════════════════════════════
   SECTION SHARED
   ═══════════════════════════════ */
.section-kicker {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  margin-bottom: 10px;
  letter-spacing: .02em;
}
.section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  letter-spacing: -.03em;
  line-height: 1.18;
  font-weight: 800;
}
.section-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 680px;
}

/* ═══════════════════════════════
   HOME — HERO
   ═══════════════════════════════ */
.hero {
  padding: 72px 64px;
  margin-top: 0;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 141, 113, .09), transparent 70%);
  pointer-events: none;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 28px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1.15;
  letter-spacing: -.035em;
  font-weight: 800;
  max-width: 760px;
}
.hero .sub {
  margin-top: 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 660px;
}

/* Stat items (like sbti.dev) */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
}
.stat-item {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-item strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: -.02em;
}
.stat-note {
  font-size: 12px;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

/* ═══════════════════════════════
   PAGE HERO (types, test)
   ═══════════════════════════════ */
.page-hero {
  padding: 56px 56px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 141, 113, .08), transparent 70%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -.035em;
  font-weight: 800;
  max-width: 720px;
  margin-top: 4px;
}
.page-hero-sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 640px;
}
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}
.page-hero-hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--accent);
  line-height: 1.6;
}

/* ═══════════════════════════════
   HOME — 3 FEATURED TYPES
   ═══════════════════════════════ */
.featured-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.featured-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.featured-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--soft);
  display: block;
  padding: 20px;
}
.featured-body {
  padding: 18px 20px 22px;
  border-top: 1px solid var(--line);
}
.featured-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: .03em;
  margin-bottom: 4px;
}
.featured-body h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.featured-body p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ═══════════════════════════════
   HOME — 5 MODELS
   ═══════════════════════════════ */
.models-section {
  margin-top: 72px;
}
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.model-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 28px;
  background: var(--panel);
  transition: transform .18s, box-shadow .18s;
}
.model-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.model-dims {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  font-family: var(--mono);
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.model-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.model-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

/* ═══════════════════════════════
   HOME — FAQ (card layout like sbti.dev)
   ═══════════════════════════════ */
.faq-section {
  margin-top: 72px;
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.faq-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 28px;
  background: var(--panel);
  transition: transform .18s, box-shadow .18s;
}
.faq-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.faq-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.faq-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}
.faq-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

/* ═══════════════════════════════
   HOME — BOTTOM ACTIONS
   ═══════════════════════════════ */
.home-bottom-actions {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.bottom-link {
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--panel);
  transition: background .15s, transform .15s;
}
.bottom-link:hover {
  background: var(--soft);
  transform: translateY(-1px);
}

/* ═══════════════════════════════
   TYPES SCREEN
   ═══════════════════════════════ */
.page-header {
  margin-bottom: 36px;
}
.page-header h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.page-header p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 580px;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.type-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.type-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--soft);
  display: block;
  padding: 16px;
}
.type-card-body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}
.type-card-code {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.type-card-name {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: .02em;
}
.type-card-intro {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.type-card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: .01em;
}

/* ═══════════════════════════════
   TEST SCREEN
   ═══════════════════════════════ */
.test-wrap {
  margin: 24px auto 0;
  padding: 44px 52px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  max-width: 780px;
}

.test-intro {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.test-intro-title {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.25;
  margin-top: 4px;
  max-width: 560px;
}
.test-intro-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.progress {
  flex: 1;
  min-width: 180px;
  height: 6px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: inherit;
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
.progress-text {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: .03em;
}

.quiz-card {
  flex: 1;
  animation: cardIn .28s cubic-bezier(.4, 0, .2, 1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.quiz-title {
  font-size: 18px;
  line-height: 1.75;
  white-space: pre-wrap;
  color: var(--text);
  font-weight: 500;
}

.quiz-options { display: grid; gap: 10px; margin-top: 28px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}
.quiz-option:hover {
  border-color: var(--accent);
  background: #f6faf7;
  transform: translateX(3px);
}
.quiz-option.selected {
  border-color: var(--accent-strong);
  background: var(--soft);
  font-weight: 600;
}
.quiz-option-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  transition: all .15s;
}
.quiz-option.selected .quiz-option-dot {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: inset 0 0 0 3px #fff;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.quiz-nav button {
  min-width: 110px;
  text-align: center;
  font-size: 14px;
  padding: 12px 24px;
}

/* ═══════════════════════════════
   RESULT SCREEN
   ═══════════════════════════════ */
.result-wrap {
  margin-top: 24px;
  padding: 40px 44px;
}
.result-layout { display: grid; gap: 20px; }

.result-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 28px;
  background: var(--panel);
}

.poster-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: var(--soft);
  overflow: hidden;
}
.poster-panel.no-image { display: none; }
.poster-image {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: var(--radius-xs);
}

.type-kicker {
  font-size: 12px;
  color: var(--accent-strong);
  letter-spacing: .06em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.type-name {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: -.035em;
  font-weight: 800;
}
.type-subname {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}
.match-badge {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 14px;
  font-family: var(--mono);
}
.type-intro {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  font-style: italic;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.score-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 16px;
  background: var(--panel);
}
.score-item .k { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.score-item .v { font-size: 20px; font-weight: 800; color: var(--accent-strong); font-family: var(--mono); }

.analysis-box h3,
.dim-box h3,
.note-box h3 { font-size: 16px; margin-bottom: 16px; font-weight: 700; }

.analysis-box p {
  color: #2c3e31;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.dim-list { display: grid; gap: 10px; }
.dim-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 18px;
  background: var(--panel);
}
.dim-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.dim-item-name { font-size: 14px; font-weight: 700; }
.dim-item-score {
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 14px;
  font-family: var(--mono);
}
.dim-item p { color: var(--muted); font-size: 14px; line-height: 1.75; }

/* Detail page — dimension card grid */
.detail-section .dim-list {
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.dim-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 24px;
  background: var(--panel);
  transition: transform .18s, box-shadow .18s;
}
.dim-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.dim-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.dim-card-model {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-strong);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.dim-card-level {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--mono);
  flex-shrink: 0;
}
.dim-card-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
}
.dim-card-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.dim-bar-track {
  height: 5px;
  background: var(--soft);
  border-radius: 999px;
  margin: 8px 0 6px;
  overflow: hidden;
}
.dim-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: inherit;
  transition: width .3s ease;
}

.note-box p { color: var(--muted); font-size: 14px; line-height: 1.75; }

.author-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
}
.author-box summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.author-box summary::-webkit-details-marker { display: none; }
.author-box summary::after {
  content: 'Expand';
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: .03em;
}
.author-box[open] summary::after { content: 'Collapse'; }
.author-content {
  border-top: 1px solid var(--line);
  padding: 0 24px 24px;
}
.author-content p {
  margin-top: 14px;
  color: #2c3e31;
  font-size: 15px;
  line-height: 1.85;
}

.result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ═══════════════════════════════
   DETAIL PAGE
   ═══════════════════════════════ */
.breadcrumb {
  margin-bottom: 24px;
}
.breadcrumb a {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
  transition: color .15s;
}
.breadcrumb a:hover { color: var(--text); }

.detail-top {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
}
.detail-poster-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.detail-poster {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}
.detail-info {
  padding: 8px 0;
}
.detail-cta {
  margin-top: 24px;
}

.detail-section {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.detail-section h2 {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -.02em;
}
.detail-desc {
  font-size: 15px;
  color: #2c3e31;
  line-height: 1.95;
  white-space: pre-wrap;
}

.detail-nav {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.detail-nav-link:hover {
  background: var(--soft);
  transform: translateY(-2px);
}
.detail-nav-link.next { text-align: right; }
.detail-nav-dir {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: .02em;
}
.detail-nav-code {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}
.detail-nav-name {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
}
.empty-state h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}
.empty-state p {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 15px;
}

/* ═══════════════════════════════
   FOOTER
   ═══════════════════════════════ */
.site-footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 48px 48px 52px;
  display: grid;
  grid-template-columns: 1.4fr auto 1fr;
  gap: 48px;
}
.footer-brand strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-strong);
}
.footer-brand p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 400px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color .15s;
}
.footer-links a:hover { color: var(--accent-strong); }
.footer-note strong {
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}
.footer-note p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
}

/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */
/* ═══════════════════════════════
   AI TEST PAGE — PROMPT BOX
   ═══════════════════════════════ */
.prompt-box {
  margin-top: 24px;
  padding: 28px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.prompt-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  margin-bottom: 12px;
  letter-spacing: .02em;
}
.prompt-text {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 20px;
}
.prompt-box .btn-primary {
  min-width: 180px;
}

/* ═══════════════════════════════
   AI TEST PAGE
   ═══════════════════════════════ */
.ai-content {
  max-width: 800px;
}
.ai-section {
  margin-bottom: 36px;
}
.ai-section h2 {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.ai-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: 28px;
}
.ai-block ol, .ai-block ul {
  padding-left: 20px;
  margin-top: 8px;
}
.ai-block li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 4px;
}
.ai-block p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 8px;
}
.ai-block h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--accent-strong);
}
.ai-block h3:first-child { margin-top: 0; }
.ai-block hr {
  border: none;
  border-top: 2px dashed var(--line);
  margin: 28px 0;
}
.ai-block pre {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 20px;
  overflow-x: auto;
  white-space: pre-wrap;
}
.ai-block code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 4px;
}
.ai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ai-table th, .ai-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.ai-table th {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.ai-table td {
  color: var(--text);
}
.ai-table tr:last-child td { border-bottom: none; }
.ai-table td:first-child {
  font-weight: 700;
  font-family: var(--mono);
}

/* Active nav link */
.nav-link--active { color: var(--accent-strong); }

/* Links used as buttons */
a.btn-primary, a.btn-secondary, a.btn-ghost, a.btn-reddit {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
a.featured-card { text-decoration: none; color: inherit; display: block; }
a.type-card { text-decoration: none; color: inherit; display: block; }

/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */
@media (max-width: 960px) {
  .shell { padding: 28px 28px 64px; }
  .header-inner, .footer-inner { padding-left: 28px; padding-right: 28px; }
  .hero { padding: 48px 36px; }
  .page-hero { padding: 40px 36px; }
  .featured-types { grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
  .test-wrap { padding: 32px; }
  .result-wrap { padding: 28px; }
  .result-top { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: 1fr 1fr; }
  .detail-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .detail-section .dim-list { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-note { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .featured-types { grid-template-columns: 1fr; gap: 14px; }
  .faq-grid { grid-template-columns: 1fr; }
  .models-grid { grid-template-columns: 1fr; }
  .detail-top { grid-template-columns: 1fr; }
  .detail-poster-wrap { max-width: 360px; }
  .detail-section .dim-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shell { padding: 16px 16px 48px; }
  .header-inner, .footer-inner { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 32px 24px; }
  .hero h1 { font-size: 26px; }
  .page-hero { padding: 32px 24px; margin-bottom: 24px; }
  .page-hero h1 { font-size: 22px; }
  .hero-stats { gap: 16px; }
  .stat-item strong { font-size: 18px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary,
  .hero-actions .btn-ghost { text-align: center; }
  .page-hero-actions { flex-direction: column; align-items: stretch; }
  .page-hero-actions .btn-primary,
  .page-hero-actions .btn-secondary,
  .page-hero-actions .btn-ghost { text-align: center; }
  .test-wrap { padding: 24px 20px; }
  .test-intro-title { font-size: 18px; }
  .result-wrap { padding: 20px; }
  .result-layout { gap: 14px; }
  .score-grid { grid-template-columns: 1fr; }
  .quiz-title { font-size: 16px; }
  .quiz-option { padding: 14px 16px; font-size: 14px; }
  .quiz-nav button, .quiz-nav a { min-width: 90px; padding: 11px 18px; font-size: 13px; }
  .type-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .type-card-code { font-size: 16px; }
  .type-card-intro { font-size: 13px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .site-nav .nav-link { display: none; }
  .header-inner { height: 52px; }
  .btn-primary, .btn-secondary { padding: 12px 24px; font-size: 14px; }
  .section-title { font-size: 22px; }
  .section-sub { font-size: 14px; }
  .page-header h1 { font-size: 24px; }
  .home-bottom-actions { flex-direction: column; }
  .detail-nav { grid-template-columns: 1fr; }
  .detail-nav-link.next { text-align: left; }
  .prompt-box { padding: 20px; }
  .prompt-text { font-size: 15px; }
  .ai-block { padding: 20px 16px; }
  .ai-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ai-table th, .ai-table td { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .panel { padding: 20px; }
  .featured-body { padding: 14px 16px 18px; }
  .featured-body h3 { font-size: 17px; }
  .faq-card { padding: 22px; }
  .faq-card h3 { font-size: 15px; }
  .model-card { padding: 22px; }
  .dim-card { padding: 18px; }
  .dim-card-name { font-size: 15px; }
  .result-actions { flex-direction: column; align-items: stretch; }
  .result-actions .btn-primary,
  .result-actions .btn-secondary { text-align: center; }
}

/* ═══════════════════════════════
   SHARE FAB (floating bottom-right)
   ═══════════════════════════════ */
.share-fab {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.share-fab a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: transform .18s, box-shadow .18s;
}
.share-fab a:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.share-fab .share-fb  { background: #1877F2; }
.share-fab .share-tw  { background: #000; }
.share-fab .share-rd  { background: #D93900; }

a.btn-reddit,
a.btn-reddit:link,
a.btn-reddit:visited,
a.btn-reddit:active {
  background: #D93900;
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(217,57,0,.25);
  transition: all .18s ease;
}
a.btn-reddit:hover { background: #c02f00; box-shadow: 0 6px 24px rgba(217,57,0,.35); transform: translateY(-1px); color: #fff; }
a.btn-reddit svg { width: 18px; height: 18px; fill: #fff; flex-shrink: 0; }
.share-fab svg { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 600px) {
  .share-fab { right: 14px; bottom: 16px; }
  .share-fab a { width: 38px; height: 38px; }
  .share-fab svg { width: 17px; height: 17px; }
}
