:root {
  --bg: #120d1c; --panel: #1d1629; --lead: #0c0812; --line: #3a2f50;
  --text: #fbf1dc; --muted: #cdbfae;
  --amber: #f2a93b; --amber-d: #d9852a; --ink: #2a1a0a; --teal: #5fd0c4; --rose: #e86a9a;
  --r: 12px; --sh1: 0 1px 2px rgba(0,0,0,.4); --sh2: 0 8px 24px rgba(0,0,0,.4);
  --head: 'Fraunces', Georgia, serif; --body: 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); text-underline-offset: 3px; }
a:hover { color: #ffd88c; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--ink); padding: 8px 12px; border-radius: var(--r); z-index: 50; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 28px; margin-bottom: 16px; }
h3 { font-size: 22px; margin-bottom: 8px; }
p { margin: 0 0 16px; max-width: 70ch; }

/* header */
.top { background: var(--lead); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font: 700 22px/1 var(--head); }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 16px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 12px 0; }
.nav a:hover { color: var(--text); }

/* intro + player */
.intro h1 { font-size: 28px; }
.lede { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.player-sec { background: var(--lead); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stage { position: relative; width: 100%; aspect-ratio: 390 / 660; margin: 0 auto; background: var(--lead); overflow: hidden; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.cover { position: absolute; inset: 0; cursor: pointer; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.c-desk { display: none; }
.start { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); min-height: 56px; padding: 0 32px; border-radius: var(--r); border: 3px solid var(--lead); background: linear-gradient(180deg, #ffd88c, var(--amber) 55%, var(--amber-d)); color: var(--ink); font: 600 18px/1 var(--body); cursor: pointer; box-shadow: var(--sh2); white-space: nowrap; }
.start:hover { filter: brightness(1.06); }
.loader { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: radial-gradient(circle at 50% 40%, #2a1f3d, var(--lead) 70%); }
[data-gf-state="loading"] .loader { display: flex; }
.loader p { margin: 0; color: var(--muted); font-size: 16px; }
.lane { position: relative; width: 128px; height: 32px; }
.p { position: absolute; top: 0; left: 0; width: 28px; height: 28px; border-radius: 6px; border: 2px solid var(--lead); }
.pa { background: var(--amber); animation: pa 2.4s infinite; }
.pb { background: var(--teal); animation: pb 2.4s infinite; }
.pc { background: var(--rose); animation: pc 2.4s infinite; }
@keyframes pa { 0%, 40% { transform: translateX(0); } 48%, 85% { transform: translateX(32px); } 95%, 100% { transform: translateX(0); } }
@keyframes pb { 0%, 18% { transform: translateX(32px); } 26%, 63% { transform: translateX(64px); } 73%, 100% { transform: translateX(32px); } }
@keyframes pc { 0% { transform: translateX(64px); } 8%, 85% { transform: translateX(96px); } 95%, 100% { transform: translateX(64px); } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 2px solid var(--line); background: var(--panel); color: var(--text); font: 600 14px/1 var(--body); cursor: pointer; text-decoration: none; }
.act:hover { border-color: var(--amber); color: var(--text); }
.act svg { fill: none; stroke: currentColor; stroke-width: 2; }
.like[aria-pressed="true"] { background: var(--rose); border-color: var(--rose); color: var(--ink); }
.like[aria-pressed="true"] svg { fill: currentColor; }
.act.primary { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.act.primary:hover { background: #ffc566; color: var(--ink); }
.act.ghost { margin-left: auto; border-color: transparent; background: none; color: var(--muted); }
.msg { font-size: 14px; color: var(--teal); }

/* sections */
section { padding-top: 48px; padding-bottom: 48px; }
section.intro { padding-top: 12px; padding-bottom: 12px; }
section.player-sec { padding: 0; }
.leadline { display: flex; align-items: center; gap: 8px; height: 24px; }
.leadline span { flex: 1; height: 6px; background: var(--lead); border: 1px solid var(--line); border-radius: 4px; }
.leadline i { width: 10px; height: 10px; transform: rotate(45deg); background: var(--amber); }
.leadline i:nth-of-type(2) { background: var(--teal); }
.leadline i:nth-of-type(3) { background: var(--rose); }

.about { display: grid; grid-template-columns: 1fr; gap: 32px; }
.plate { margin: 0; border: 3px solid var(--lead); border-radius: var(--r); background: var(--panel); box-shadow: var(--sh2); padding: 8px 16px; align-self: start; }
.plate div { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plate div:last-child { border-bottom: 0; }
.plate dt { font: 600 14px/1.6 var(--body); color: var(--amber); }
.plate dd { margin: 0; font-size: 16px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 32px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 1fr; gap: 16px; }
.steps li::before { content: counter(s); font: 700 48px/1 var(--head); color: var(--amber); }
.steps img { width: 100%; max-width: 280px; border-radius: var(--r); border: 3px solid var(--lead); box-shadow: var(--sh2); }
.step-text p { margin-bottom: 0; }

.band { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip { list-style: none; margin: 0; padding: 0 0 8px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.strip li { flex: 0 0 200px; scroll-snap-align: start; }
.strip img { width: 100%; border-radius: var(--r); border: 3px solid var(--lead); margin-bottom: 12px; }
.strip p { font-size: 14px; color: var(--muted); margin: 0; }
.strip b { color: var(--text); }

.solver { display: grid; gap: 32px; }
.method { border-left: 4px solid var(--teal); padding-left: 16px; }
.method ol { margin: 0; padding-left: 24px; display: grid; gap: 12px; }
.method li::marker { color: var(--teal); font-weight: 600; }

.stars { width: 100%; max-width: 640px; border-collapse: collapse; margin: 24px 0 16px; font-size: 16px; }
.stars caption { text-align: left; color: var(--muted); font-size: 14px; padding-bottom: 8px; }
.stars th, .stars td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.stars thead th { font-size: 14px; color: var(--amber); }
.stars tbody th { font: 700 22px/1.2 var(--head); }
.note { color: var(--muted); font-size: 14px; }

.photo { background: linear-gradient(135deg, #2a1f3d, var(--panel)); }
.photo-in { display: grid; gap: 24px; align-items: center; }
.big { font: 700 36px/1.2 var(--head); color: var(--amber); margin: 0; max-width: 16ch; }

.tips ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.tips li { padding: 12px 16px; border-left: 4px solid var(--rose); background: var(--panel); border-radius: 0 var(--r) var(--r) 0; }

.qa { margin: 0; }
.qa-row { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
.qa-row:last-child { border-bottom: 1px solid var(--line); }
.qa dt { font: 700 18px/1.2 var(--head); }
.qa dd { margin: 0; color: var(--muted); max-width: 70ch; }

.invite { color: var(--muted); }
.cform { display: grid; gap: 12px; max-width: 560px; margin-bottom: 24px; }
.cform label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.cform input, .cform textarea { font: 400 16px/1.6 var(--body); padding: 8px 12px; border-radius: var(--r); border: 2px solid var(--line); background: var(--panel); color: var(--text); width: 100%; }
.cform input:focus, .cform textarea:focus { border-color: var(--amber); outline: none; }
.crow { display: flex; align-items: center; gap: 12px; }
.clist { display: grid; gap: 12px; max-width: 640px; }
.clist[data-gf-empty]::before { content: "No comments yet. Be the first."; color: var(--muted); }
.c { padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.c header { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.c time { color: var(--muted); font-size: 12px; }
.c p { margin: 4px 0 8px; }
.owner { font-size: 12px; background: var(--amber); color: var(--ink); border-radius: 4px; padding: 0 4px; }
[data-gf-owner] { border-color: var(--amber); }
.reply { background: none; border: 0; color: var(--amber); font: 600 14px/1 var(--body); cursor: pointer; padding: 8px 0; }
.replies { margin-left: 16px; }

/* legal pages */
.doc { padding-top: 32px; padding-bottom: 64px; }
.doc h1 { font-size: 36px; margin-bottom: 24px; }
.doc-body h2 { font-size: 22px; margin: 32px 0 8px; }
.doc-body li { margin-bottom: 8px; max-width: 70ch; }

/* guide pages */
.guide-links { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.guide { padding-bottom: 32px; }
.g-head { padding-top: 24px; padding-bottom: 8px; }
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumb a { color: var(--muted); }
.g-head h1 { font-size: 34px; margin-bottom: 12px; }
.g-lead { font-size: 18px; color: var(--text); }
.g-cta { display: flex; flex-wrap: wrap; gap: 8px; }
.g-frame { padding-top: 24px; padding-bottom: 16px; }
.g-box { width: 100%; max-width: 420px; aspect-ratio: 390 / 720; margin: 0 auto 8px; border: 3px solid var(--lead); border-radius: var(--r); box-shadow: var(--sh2); background: var(--lead); overflow: hidden; }
.g-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.g-frame .note { text-align: center; max-width: none; }
.g-body { padding-top: 16px; padding-bottom: 16px; }
.g-body h2 { font-size: 26px; margin: 40px 0 12px; }
.g-body h3 { font-size: 20px; margin: 24px 0 8px; }
.g-body li { margin-bottom: 8px; max-width: 70ch; }
.g-body img { width: 100%; max-width: 280px; border-radius: var(--r); border: 3px solid var(--lead); box-shadow: var(--sh2); margin: 16px 0; }
.g-body table { border-collapse: collapse; margin: 16px 0; font-size: 16px; }
.g-body th, .g-body td { text-align: left; padding: 8px 16px 8px 0; border-bottom: 1px solid var(--line); }
.g-faq { padding-top: 16px; }
.g-more { padding-top: 8px; padding-bottom: 8px; }
@media (min-width: 760px) { .g-head h1 { font-size: 44px; } }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--lead); padding-top: 24px; padding-bottom: 32px; }
.foot-in { display: grid; gap: 16px; padding: 16px 0; }
.foot-brand { margin: 0; color: var(--muted); }
.foot-brand b { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; }
.foot-links a { display: inline-block; padding: 8px 0; }
.fine { margin: 0; font-size: 12px; color: var(--muted); }

@media (min-width: 640px) {
  .intro h1 { font-size: 36px; }
  .lede { font-size: 16px; }
  .stage { width: min(100%, 1120px, calc((100svh - 150px) * 16 / 9)); min-width: min(100%, 640px); aspect-ratio: 16 / 9; }
  .start { bottom: 6%; }
  .c-phone { display: none; }
  .c-desk { display: block; }
  .actions { max-width: 1120px; }
  h2 { font-size: 36px; }
  .big { font-size: 48px; }
  .strip li { flex-basis: 220px; }
}
@media (min-width: 900px) {
  .about { grid-template-columns: 1.4fr 1fr; gap: 48px; }
  .steps li { grid-template-columns: 56px 1fr 280px; align-items: center; gap: 24px; }
  .steps li::before { align-self: start; }
  .steps li.no-img { grid-template-columns: 56px 1fr; }
  .solver { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .photo-in { grid-template-columns: 1fr 1.2fr; gap: 48px; }
  .strip { overflow: visible; display: grid; grid-template-columns: repeat(5, 1fr); }
  .strip li { flex: none; }
  .tips ul { grid-template-columns: 1fr 1fr; }
  .qa-row { grid-template-columns: 1fr 2fr; gap: 24px; }
  .foot-in { grid-template-columns: 1fr auto; align-items: center; }
}
@media (max-width: 639px) {
  .act { flex: 1 1 auto; }
  .act.ghost { margin-left: 0; }
  .start { width: calc(100% - 48px); max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .p { animation: none; } }
