/* ============================================
   Claude Quiz — style_1.css (Terminal Theme)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg:           #0D1117;
  --bg-alt:       #161B22;
  --bg-card:      #0D1117;
  --orange:       #DA7756;
  --orange-dim:   #B5603A;
  --orange-light: #DA775620;
  --orange-border:#DA775640;
  --amber:        #F0A30A;
  --white:        #E6EDF3;
  --muted:        #8B949E;
  --border:       #21262D;
  --font: 'JetBrains Mono', 'Courier New', monospace;
}

/* ============================================
   Light Mode Variables
   ============================================ */
[data-theme="light"] {
  --bg:           #FAF9F6;
  --bg-alt:       #F0EDE6;
  --bg-card:      #FAF9F6;
  --orange:       #C5623E;
  --orange-dim:   #A84D2A;
  --orange-light: rgba(197, 98, 62, 0.08);
  --orange-border:rgba(197, 98, 62, 0.25);
  --amber:        #9A6800;
  --white:        #1A1A18;
  --muted:        #706C65;
  --border:       #DDD9D0;
}

[data-theme="light"] body::before {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.012) 2px,
    rgba(0, 0, 0, 0.012) 4px
  );
}

/* Hardcoded color fixes for light mode */
[data-theme="light"] .choice-btn--wrong {
  border-color: #C09090 !important;
  background: rgba(180, 0, 0, 0.05) !important;
}

[data-theme="light"] .footer-copy { color: #999; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--orange);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(218, 119, 86, 0.015) 2px,
    rgba(218, 119, 86, 0.015) 4px
  );
  pointer-events: none;
  z-index: 999;
}

/* Narrow container — mobile-first */
.container {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ============================================
   Header — Terminal Window Bar
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--orange-border);
  padding: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 44px;
  gap: 16px;
}

.header-path {
  font-size: 12px;
  color: var(--muted);
  flex: 1;
  text-align: left;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-path span { color: var(--orange); }

.header-badge {
  font-size: 11px;
  color: var(--orange-dim);
  border: 1px solid var(--orange-border);
  padding: 2px 10px;
  margin-right: 8px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--orange-border);
  font-family: var(--font);
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  padding: 3px 10px;
  letter-spacing: 0.05em;
  transition: color 150ms, border-color 150ms;
  white-space: nowrap;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--orange);
  border-color: var(--orange);
}

/* ============================================
   Hero — Terminal Prompt
   ============================================ */
.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}

.hero-window {
  border: 1px solid var(--orange-border);
  background: var(--bg-alt);
}

.window-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--orange-border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-title {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
  letter-spacing: 0.05em;
}

.window-body {
  padding: 24px 24px 28px;
}

.prompt-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}

.prompt-sign  { color: var(--orange-dim); user-select: none; }
.prompt-cmd   { color: var(--white); }
.prompt-flag  { color: var(--amber); }

.output-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ascii-logo {
  font-size: clamp(3px, calc(1.25vw - 1px), 7px);
  line-height: 1.4;
  color: var(--orange);
  white-space: pre;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
  overflow: hidden;
}

.output-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  line-height: 1.4;
}

.output-title .accent { color: var(--orange); }

.output-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.output-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-item  { font-size: 12px; }
.stat-key   { color: var(--amber); }
.stat-sep   { color: var(--muted); margin: 0 4px; }
.stat-val   { color: var(--white); font-weight: 700; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--orange);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (max-width: 480px) {
  .hero { padding: 32px 0 28px; }
  .window-body { padding: 18px 16px 20px; }
  .output-title { font-size: 15px; }
}

/* ============================================
   Global Stats
   ============================================ */
.global-stats {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.hero-stats {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.stats-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stats-output {
  padding-left: 20px;
  border-left: 2px solid var(--orange-border);
  margin-left: 4px;
}

.stats-count-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.stats-count {
  font-size: 40px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stats-count-loading {
  font-size: 24px;
  color: var(--muted);
  animation: blink 1s step-end infinite;
  letter-spacing: 0.1em;
}

.stats-count-unit {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.stats-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* 自分も達成済みのとき */
.stats-block--self-cleared .stats-count {
  color: var(--amber);
}

.stats-self-note {
  display: inline-block;
  font-size: 10px;
  color: var(--amber);
  border: 1px solid rgba(240, 163, 10, 0.3);
  padding: 1px 8px;
  margin-top: 6px;
  letter-spacing: 0.06em;
}

@media (max-width: 480px) {
  .stats-count { font-size: 32px; }
}

/* ============================================
   Chapters — 1列リスト
   ============================================ */
.chapters {
  padding: 40px 0 56px;
}

.section-header {
  margin-bottom: 24px;
}

.section-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}

.section-prompt .prompt-sign { color: var(--orange-dim); }
.section-cmd   { color: var(--white); }
.section-comment {
  font-size: 12px;
  color: var(--muted);
  margin-left: 20px;
}

/* 1列リスト */
.chapter-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--orange-border);
}

/* Row item */
.chapter-card {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 180ms;
  animation: fadeInUp 350ms ease both;
  -webkit-tap-highlight-color: transparent;
}

.chapter-card:last-child { border-bottom: none; }

/* Left accent bar */
.chapter-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--orange);
  opacity: 0;
  transition: opacity 180ms;
}

.chapter-card:hover {
  background: var(--bg-alt);
}

.chapter-card:hover::before { opacity: 1; }

.chapter-card:focus-visible {
  outline: 1px solid var(--orange);
  outline-offset: -1px;
}

/* card-inner: full row layout */
.card-inner {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 16px 14px 20px;
  gap: 14px;
  min-height: 0;
}

/* Chapter number */
.card-number {
  font-size: 10px;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 32px;
}

.card-number::before { content: '['; color: var(--muted); }
.card-number::after  { content: ']'; color: var(--muted); }

/* Body: title + desc */
.card-body {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer: questions + arrow (inline, right side) */
.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

.card-questions {
  font-size: 10px;
  color: var(--orange-dim);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.card-arrow {
  font-size: 12px;
  color: var(--orange);
  transition: transform 180ms;
}

.chapter-card:hover .card-arrow { transform: translateX(3px); }

/* ============================================
   Cleared State
   ============================================ */
.chapter-card--cleared {
  background: rgba(218, 119, 86, 0.06);
  border-bottom-color: rgba(218, 119, 86, 0.2);
}

/* 達成済みは左ボーダーを常時表示 */
.chapter-card--cleared::before {
  opacity: 1;
}

.card-number--cleared {
  color: var(--orange);
  letter-spacing: 0.06em;
}

.chapter-card--cleared .card-title {
  color: var(--orange);
}

.card-cleared-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--orange);
  border: 1px solid var(--orange-border);
  padding: 1px 6px;
  background: rgba(218, 119, 86, 0.1);
  white-space: nowrap;
}

.card-arrow--cleared {
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  transition: none;
}

/* Stagger */
.chapter-card:nth-child(1)  { animation-delay: 0ms; }
.chapter-card:nth-child(2)  { animation-delay: 40ms; }
.chapter-card:nth-child(3)  { animation-delay: 80ms; }
.chapter-card:nth-child(4)  { animation-delay: 120ms; }
.chapter-card:nth-child(5)  { animation-delay: 160ms; }
.chapter-card:nth-child(6)  { animation-delay: 200ms; }
.chapter-card:nth-child(7)  { animation-delay: 240ms; }
.chapter-card:nth-child(8)  { animation-delay: 280ms; }
.chapter-card:nth-child(9)  { animation-delay: 320ms; }
.chapter-card:nth-child(10) { animation-delay: 360ms; }
.chapter-card:nth-child(11) { animation-delay: 400ms; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--orange-border);
  padding: 28px 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-prompt {
  font-size: 12px;
  color: var(--muted);
}

.footer-prompt .orange { color: var(--orange-dim); }

.footer-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-copy {
  font-size: 10px;
  color: #444;
}
.footer-copy a {
  color: var(--orange);
  text-decoration: none;
}
.footer-copy a:hover {
  text-decoration: underline;
}

/* ============================================
   Quiz Page — Shared Header
   ============================================ */
.header-back {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: color 150ms;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-back:hover { color: var(--orange); }

/* ============================================
   Quiz Page — Layout
   ============================================ */
.quiz-main {
  padding: 32px 0 56px;
  min-height: calc(100vh - 44px - 80px);
}

.hidden { display: none !important; }

/* ============================================
   Loading / Error
   ============================================ */
.quiz-loading,
.quiz-error {
  padding: 32px 0;
}

.loading-dots {
  margin-top: 16px;
  padding-left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.loading-label { font-size: 12px; color: var(--muted); }

.error-output {
  margin-top: 12px;
  padding-left: 20px;
}
.error-code {
  font-size: 12px;
  color: #F85149;
  margin-right: 12px;
}

/* ============================================
   Progress Bar
   ============================================ */
.quiz-progress {
  margin-bottom: 20px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.progress-track {
  height: 3px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--orange);
  transition: width 400ms ease;
}

/* ============================================
   Quiz Window
   ============================================ */
.quiz-window {
  border: 1px solid var(--orange-border);
  background: var(--bg-alt);
}

/* Question text */
.q-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.6;
  margin: 20px 0 20px;
  letter-spacing: -0.01em;
}

/* Choices */
.q-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.choice-btn {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 150ms, background 150ms, color 150ms;
  -webkit-tap-highlight-color: transparent;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--orange);
  background: var(--orange-light);
  color: var(--orange);
}

.choice-label {
  color: var(--amber);
  flex-shrink: 0;
  font-weight: 700;
}

.choice-btn:hover:not(:disabled) .choice-label { color: var(--orange); }

.choice-btn--correct {
  border-color: var(--orange) !important;
  background: rgba(218, 119, 86, 0.12) !important;
  color: var(--orange) !important;
}
.choice-btn--correct .choice-label { color: var(--orange) !important; }

.choice-btn--wrong {
  border-color: #4A3030 !important;
  background: rgba(255, 0, 0, 0.06) !important;
  color: var(--muted) !important;
  text-decoration: line-through;
}

.choice-btn--dim {
  opacity: 0.4;
}

/* ============================================
   Result Area
   ============================================ */
.q-result {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  animation: fadeInUp 250ms ease both;
}

.result-header {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.result-body {
  padding-left: 12px;
  border-left: 2px solid var(--orange-border);
  margin-bottom: 16px;
}

.result-status {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.result-status--correct { color: var(--orange); }
.result-status--wrong   { color: #F85149; }

.result-correct-answer {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.result-explanation {
  font-size: 12px;
  color: var(--white);
  line-height: 1.75;
  opacity: 0.8;
}
.result-explanation a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.result-footer {
  margin-top: 8px;
}

.next-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--orange);
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
  transition: opacity 150ms;
}

.next-btn:hover { opacity: 0.75; }

/* ============================================
   Complete Screen
   ============================================ */
.complete-screen {
  animation: fadeInUp 300ms ease both;
}

.complete-window {
  border: 1px solid var(--orange-border);
  background: var(--bg-alt);
}

.comp-output {
  margin: 20px 0;
}

.comp-chapter-line {
  font-size: 11px;
  margin-bottom: 16px;
}
.comp-key { color: var(--muted); }
.comp-chapter { color: var(--amber); }

.comp-box {
  border: 1px solid var(--orange-border);
  padding: 16px;
  margin-bottom: 20px;
  background: var(--bg);
}

.comp-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.comp-row:last-child { margin-bottom: 0; }

.comp-key  { color: var(--amber); min-width: 72px; }
.comp-sep  { color: var(--muted); }
.comp-val  { color: var(--white); font-weight: 700; font-size: 16px; }

.comp-status {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
}
.comp-status--cleared { color: var(--orange); }
.comp-status--passed  { color: var(--amber); }
.comp-status--failed  { color: var(--muted); }

/* Cleared banner */
.comp-cleared-msg {
  margin-bottom: 20px;
  animation: fadeInUp 300ms ease 100ms both;
}

.comp-cleared-banner {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 10px 16px;
  text-align: center;
  background: var(--orange-light);
  margin-bottom: 6px;
}

.comp-cleared-sub {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.04em;
}

/* Share */
.comp-share {
  margin-bottom: 20px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-left: 20px;
}

.share-btn {
  display: block;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px 14px;
  background: var(--bg);
  text-align: left;
  transition: border-color 150ms, color 150ms;
  letter-spacing: 0.03em;
}

.share-btn:hover {
  border-color: var(--orange-border);
  color: var(--orange);
}

/* Navigation */
.comp-nav {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.retry-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--orange);
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
  transition: opacity 150ms;
}
.retry-btn:hover { opacity: 0.75; }

.back-btn {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 150ms;
}
.back-btn:hover { color: var(--orange); }

/* Secondary button */
.btn-secondary {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 14px;
  transition: color 150ms, border-color 150ms;
}
.btn-secondary:hover {
  color: var(--orange);
  border-color: var(--orange-border);
}

/* ============================================
   Full Clear Trigger Bar
   ============================================ */
.full-clear-trigger {
  background: rgba(218, 119, 86, 0.08);
  border-bottom: 1px solid rgba(218, 119, 86, 0.25);
  animation: fadeInUp 300ms ease both;
}

.full-clear-trigger .container {
  padding-block: 10px;
}

.fct-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 12px;
  color: var(--orange);
  cursor: pointer;
  letter-spacing: 0.05em;
  padding: 0;
  transition: opacity 150ms;
}

.fct-btn:hover { opacity: 0.75; }

.fct-star  { font-size: 14px; animation: blink 2s step-end infinite; }
.fct-text  { flex: 1; }
.fct-arrow { color: var(--orange-dim); transition: transform 150ms; }
.fct-btn:hover .fct-arrow { transform: translateX(3px); }

/* ============================================
   All Clear Modal
   ============================================ */
.all-clear-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.all-clear-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.all-clear-window {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-alt);
  border: 1px solid var(--orange);
  box-shadow:
    0 0 32px rgba(218, 119, 86, 0.25),
    0 0 64px rgba(218, 119, 86, 0.10),
    inset 0 0 1px rgba(218, 119, 86, 0.2);
  animation: modalIn 300ms ease both;
}

.all-clear-window .window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  border-left: 1px solid var(--orange-border);
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 0 14px;
  height: 100%;
  align-self: stretch;
  display: flex;
  align-items: center;
  transition: color 150ms, background 150ms;
  letter-spacing: 0.04em;
}

.modal-close-btn:hover {
  color: var(--orange);
  background: rgba(218, 119, 86, 0.08);
}

/* Achievement Banner */
.modal-banner {
  text-align: center;
  margin: 24px 0 20px;
  padding: 24px 16px;
  border: 1px solid var(--orange);
  background: var(--bg);
  position: relative;
}

.modal-banner-stars {
  font-size: 10px;
  color: var(--orange-dim);
  letter-spacing: 0.3em;
  margin-bottom: 14px;
}

.modal-banner-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(218, 119, 86, 0.5);
}

.modal-banner-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

/* Stats box */
.modal-stats {
  margin: 0 0 20px;
  border: 1px solid var(--orange-border);
  padding: 16px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-stat-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.modal-stat-key    { color: var(--amber); min-width: 80px; }
.modal-stat-sep    { color: var(--muted); }
.modal-stat-val    { color: var(--white); font-weight: 700; }
.modal-stat-status { color: var(--orange); font-weight: 700; letter-spacing: 0.06em; }

.modal-stat-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--orange);
  border: 1px solid var(--orange-border);
  padding: 1px 8px;
  background: rgba(218, 119, 86, 0.12);
  white-space: nowrap;
}

/* Share section */
.modal-share {
  margin-bottom: 20px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* Footer / dismiss */
.modal-footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.modal-dismiss-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
  transition: color 150ms;
}

.modal-dismiss-btn:hover { color: var(--orange); }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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