:root {
  --lacquer: #101512;
  --ivory: #f6f1e7;
  --ink: #1c1915;
  --muted: #5e564c;
  --line: #e2d9c9;
  --cinnabar: #c44832;
  --gold: #a6793d;
  --gold-soft: #e7c9a2;
  --felt: #14382c;
  --focus: #a6793d;
  --serif: "Fraunces", "Noto Serif SC", "Songti SC", serif;
  --sans: "Outfit", "Noto Sans SC", "PingFang SC", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(196, 162, 101, 0.18), transparent 50%),
    radial-gradient(700px 420px at -10% 8%, rgba(196, 72, 50, 0.16), transparent 46%),
    var(--lacquer);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
body:lang(zh), body:lang(zh-Hans) { font-size: 17px; }
img, svg { max-width: 100%; }
a { color: inherit; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ivory);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.site-header {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 6px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 0 8px;
}
.site-nav, .subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}
.site-nav {
  padding: 8px 0 10px;
  border-top: 1px solid rgba(231, 201, 162, 0.18);
}
.site-nav a, .subnav a {
  text-decoration: none;
  padding: 6px 0;
}
.site-nav a {
  color: rgba(246, 241, 231, 0.72);
  font-size: 15px;
  letter-spacing: 0.12em;
}
.site-nav a[aria-current="page"] {
  color: var(--ivory);
  box-shadow: inset 0 -2px 0 var(--cinnabar);
}
.subnav {
  padding: 0 0 12px;
  gap: 4px 14px;
}
.subnav a {
  color: rgba(246, 241, 231, 0.58);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.subnav a[aria-current="page"] { color: var(--gold-soft); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand-tile { display: inline-flex; line-height: 0; }
.brand-tile .tile {
  width: 22px;
  height: 26px;
  padding: 1px 2px 2px;
  border-radius: 3px;
  cursor: default;
}
.lang-menu { margin-left: auto; position: relative; }
.lang-menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  border: 1px solid rgba(231, 201, 162, 0.55);
  border-radius: 999px;
  background: rgba(246, 241, 231, 0.06);
  font-size: 14px;
  line-height: 1.2;
  color: var(--ivory);
}
.lang-menu summary:hover,
.lang-menu[open] summary {
  border-color: var(--gold-soft);
  background: rgba(231, 201, 162, 0.14);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::marker { content: ""; }
.lang-menu summary::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid var(--gold-soft);
  border-bottom: 1.5px solid var(--gold-soft);
  transform: rotate(45deg);
}
.lang-menu[open] summary::after {
  margin-top: 2px;
  transform: rotate(225deg);
}
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(260px, 72vw);
  max-height: min(70vh, 420px);
  overflow: auto;
  margin: 0;
  padding: 6px;
  background: #1a2420;
  border: 1px solid rgba(231, 201, 162, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.lang-list a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  color: rgba(246, 241, 231, 0.84);
}
.lang-list a:hover { color: var(--ivory); background: rgba(231, 201, 162, 0.1); }
.lang-list a[aria-current="page"] { color: var(--ivory); background: rgba(231, 201, 162, 0.14); }
html[dir="rtl"] .lang-menu { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .lang-list { right: auto; left: 0; }
html[dir="rtl"] .topbar,
html[dir="rtl"] .hero-grid,
html[dir="rtl"] .site-nav,
html[dir="rtl"] .subnav { direction: rtl; }

.hero, .page-hero {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 72px;
}
.page-hero { padding-bottom: 48px; }
.kicker {
  margin: 0 0 12px;
  color: var(--gold-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}
.hero h1, .page-hero h1 {
  margin: 0;
  max-width: none;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.25;
  letter-spacing: 0;
}
html[lang="zh-Hans"] .hero h1,
html[lang="zh-Hans"] .page-hero h1,
html[lang="zh-Hant"] .hero h1,
html[lang="zh-Hant"] .page-hero h1,
html[lang="ja"] .hero h1,
html[lang="ja"] .page-hero h1,
html[lang="ko"] .hero h1,
html[lang="ko"] .page-hero h1 { white-space: nowrap; }
html[lang="ja"] { --sans: "Noto Sans JP", "Outfit", sans-serif; --serif: "Noto Serif JP", "Fraunces", serif; }
html[lang="ko"] { --sans: "Noto Sans KR", "Outfit", sans-serif; --serif: "Noto Serif KR", "Fraunces", serif; }
html[lang="zh-Hant"] { --sans: "Noto Sans TC", "PingFang TC", sans-serif; --serif: "Noto Serif TC", "Fraunces", serif; }
html[lang="ar"] { --sans: "Noto Sans Arabic", "Outfit", sans-serif; --serif: "Noto Naskh Arabic", "Fraunces", serif; }
html[lang="hi"] { --sans: "Noto Sans Devanagari", "Outfit", sans-serif; }
html[lang="th"] { --sans: "Noto Sans Thai", "Outfit", sans-serif; }
html[lang="ru"], html[lang="uk"], html[lang="bg"], html[lang="el"] {
  --sans: "Noto Sans", "Outfit", sans-serif;
  --serif: "Noto Serif", "Fraunces", serif;
}
.page-hero .btn.ghost { color: var(--ivory); border-color: rgba(231, 201, 162, 0.55); }
.hero h1 em, .page-hero h1 em { font-style: italic; font-weight: 500; color: var(--gold-soft); }
.page-hero,
.hero-grid > div:first-child { container-type: inline-size; }
.lede {
  max-width: 100%;
  margin: 16px 0 0;
  font-size: 18px;
  font-size: clamp(6px, 1.22cqw, 18px);
  line-height: 1.4;
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  color: rgba(246, 241, 231, 0.84);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: end;
}
.hero-grid > * { min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px 22px; align-items: center; margin-top: 28px; }
.hero-actions a.quiet { color: var(--gold-soft); }
.fan { display: flex; justify-content: flex-end; align-items: flex-end; min-height: 150px; padding: 12px 8px 20px; }
.fan-tile { margin-left: -22px; transform: rotate(var(--r)); }

.fan-tile:first-child { margin-left: 0; }
.fan .tile { width: 68px; height: 94px; cursor: default; }

.sheet {
  width: min(1120px, calc(100% - 32px));
  margin: -36px auto 48px;
  background: var(--ivory);
  color: var(--ink);
  color-scheme: light;
  border-radius: 32px;
  padding: 56px 56px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}
.sheet a { color: #8d2f22; }
.prose { max-width: 68ch; }
.prose h2, .sheet h2, .sheet h3 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.prose h2, .sheet h2 { font-size: clamp(32px, 4vw, 44px); margin: 2.2rem 0 0.6rem; }
.prose p, .prose li { font-size: 18px; line-height: 1.75; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.callout {
  margin: 28px 0;
  padding-left: 18px;
  border-left: 3px solid var(--cinnabar);
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.crumbs { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--muted); }

.path { margin-top: 12px; }
.path-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.path-row:last-child { border-bottom: 1px solid var(--line); }
.path-row .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  color: var(--gold);
}
.path-row strong { display: block; font-size: 22px; letter-spacing: -0.03em; }
.path-row small { color: var(--muted); font-size: 15px; }
.path-row:hover .num { color: var(--cinnabar); }
.path-row i { font-style: normal; color: var(--gold); }

.recipe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
}

.tile {
  display: inline-block;
  width: 54px;
  height: 74px;
  flex: none;
  border: 1px solid rgba(176, 156, 124, 0.55);
  padding: 3px 4px 4px;
  overflow: hidden;
  vertical-align: top;
  border-radius: 7px;
  background:
    radial-gradient(ellipse at 30% 8%, #fffefb, transparent 46%),
    linear-gradient(165deg, #fffdf8 0%, #f4ecde 72%, #e6d5bb 100%);
  box-shadow:
    0 2px 3px rgba(70, 54, 32, 0.14),
    inset 1px 1px 0 rgba(255, 255, 255, 0.95);
  cursor: pointer;
  scroll-snap-align: start;
}
.tile-face, .tile svg { display: block; width: 100%; height: 100%; }
.tile-figure { margin: 12px 0 4px; }
.tile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 14px;
  background: var(--felt);
  border-radius: 16px;
}
.tile-row .tile { width: 50px; height: 68px; cursor: default; }
.tile-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.tile.is-selected { transform: translateY(-8px); box-shadow: 0 0 0 2px var(--gold), 0 8px 10px rgba(70, 54, 32, 0.16), inset 1px 1px 0 rgba(255, 255, 255, 0.95); }
.tile.is-locked { cursor: not-allowed; }
.tile:focus-visible, .btn:focus-visible, .tab:focus-visible, a:focus-visible, .offer-btn:focus-visible, .lang-menu summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.rack, .choices, .row-actions, .offer { display: flex; flex-wrap: wrap; gap: 10px; }
.rack { flex-wrap: nowrap; overflow-x: auto; padding: 16px 8px 8px; scroll-snap-type: x proximity; }
.rack-rail {
  margin-top: 8px;
  background: linear-gradient(#7a5433, #3e2918);
  border-radius: 14px;
  padding: 0 8px 8px;
}
.rack-meta, .attempt-meta, .pass-kicker { color: var(--muted); font-size: 14px; }
.felt {
  min-height: 250px;
  margin: 10px 0 18px;
  padding: 28px 8% 22px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 50% 42%, #246b4e, #0e2a20 72%);
  box-shadow: inset 0 0 0 12px #6a3d24, inset 0 0 0 16px #c4a265, 0 18px 40px rgba(16, 21, 18, 0.18);
}
.felt-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.felt-you {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ivory);
  border: 1px solid rgba(231, 201, 162, 0.7);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}
.seat { text-align: center; color: rgba(246, 241, 231, 0.72); letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; }
.seat.is-active span { color: white; box-shadow: inset 0 -1px 0 var(--cinnabar); }
.pass-bar h3 { margin: 0 0 8px; font-size: 32px; }
.blind-box { margin: 8px 0; padding: 10px 0 0; border-top: 1px dashed var(--line); }
.coach { min-height: 1.4em; }
.coach.ok { color: #1d6b45; }
.coach.bad { color: #9c3324; }
.coach.warn { color: #8a5a12; }
.btn, .offer-btn, .tab {
  appearance: none;
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 16px;
  font: 600 15px/1 var(--sans);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn.solid, a.btn.solid { background: var(--cinnabar); color: white; border: 0; }
.btn.ghost, .tab, .offer-btn { background: transparent; color: var(--ink); border: 1px solid #cfc3ae; }
.hero .btn.solid { color: white; }
.tab.is-on, .offer-btn.is-on { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.text-btn { border: 0; background: none; color: #8d2f22; cursor: pointer; font: inherit; padding: 0; }
.stage { margin: 12px 0 18px; }
.stage .tile { width: 84px; height: 116px; }
.discard-line { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.exposed { letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.win-banner { padding-top: 8px; }
.offer-result strong { font-family: var(--serif); font-size: 28px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.next-lesson {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.next-lesson span { font-family: var(--serif); font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.04em; line-height: 1; }
.next-lesson small { color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 48px;
  color: rgba(246, 241, 231, 0.78);
}
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.site-footer a { color: var(--gold-soft); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.disclaimer { grid-column: 1 / -1; max-width: 78ch; font-size: 13px; color: rgba(246, 241, 231, 0.62); }
.footer-brand { margin: 0; font-family: var(--serif); font-size: 28px; color: var(--ivory); }

@media (max-width: 800px) {
  .hero-grid, .footer-grid, .path-row { grid-template-columns: 1fr; }
  .path-row { gap: 4px; }
  .hero h1, .page-hero h1 { font-size: clamp(20px, 5.4vw, 32px); }
  .sheet { padding: 32px 20px 16px; border-radius: 22px; }
  .fan { justify-content: flex-start; min-height: 120px; }
  .fan .tile { width: 52px; height: 72px; }
  .felt { border-radius: 28px; min-height: 0; }
  .site-nav { gap: 4px 14px; }
  .site-nav a { letter-spacing: 0.06em; }
  .tile-row .tile { width: 44px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile.is-selected { transform: none; }
  .fan-tile { transform: none; }
}
::selection { background: #e7c9a2; color: #1c1915; }
