/* Moondle: night sky, gold light. Flat panels, hairline borders, small letter-spaced labels. */
:root {
  --bg: #0E1020;
  --panel: #11142A;      /* page-level panels (menu, cards) */
  --card: #141730;       /* inputs, tiles */
  --raise: #1A1E3C;      /* hover */
  --text: #ECE8DF;
  --muted: #A3A8C3;
  --faint: #6E7496;
  --line: #232744;
  --line-strong: #353A5C;
  --gold: #E8B04B;
  --gold-ink: #0E1020;
  --radius: 6px;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  /* Side gutters respect phone notches / rounded corners (viewport-fit=cover). */
  --gutter-l: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
  /* Vertical space the game needs around the board (header, ladder, title, answer box).
     The board takes whatever is left, so the whole level fits on screen without scrolling. */
  --chrome: 300px;
}
/* Settings > High contrast */
:root[data-contrast="high"] { --muted: #D2D5E6; --faint: #A9AECB; --line: #3E4468; --line-strong: #5A6190; --text: #FFFFFF; }

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: clamp(15px, 0.85rem + 0.25vw, 17px)/1.5 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
::selection { background: var(--gold); color: var(--gold-ink); }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 14px var(--gutter-r) max(48px, env(safe-area-inset-bottom)) var(--gutter-l); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Small letter-spaced labels: the main type device of the site. */
.eyebrow { font: 600 .68rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0; }
.eyebrow.muted { color: var(--muted); }
/* A section label followed by a dashed rule that runs to the edge. */
.rule { display: flex; align-items: center; gap: 14px; font: 600 .68rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 32px 0 14px; }
.rule::after { content: ''; flex: 1; border-top: 1px dashed var(--line-strong); }
.page-title { font: 400 clamp(2.4rem, 1.6rem + 3vw, 3.4rem)/1 var(--serif); margin: 8px 0 10px; letter-spacing: -.01em; }
.lede { color: var(--muted); margin: 0 0 8px; font-size: 1.05rem; }

/* ---------------------------------------------------------------- Header */

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; padding-top: env(safe-area-inset-top); }
.brand { min-width: 0; }
.wordmark { font: 400 clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem)/1 var(--serif); margin: 0; letter-spacing: .005em; }
.wordmark a { color: inherit; text-decoration: none; }
.dateline { margin: 0 0 4px; }

#site-nav { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); box-shadow: none; }
.icon-btn:hover { background: var(--raise); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn[aria-pressed="false"] { color: var(--faint); }

/* ---------------------------------------------------------------- Menu + settings (a modal panel) */

.sheet { width: min(460px, calc(100vw - 24px)); max-height: min(760px, calc(100dvh - 24px)); margin: auto; padding: 0;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 30px 80px -20px #000000cc, 0 0 0 1px #00000040; overflow: auto; overscroll-behavior: contain; }
.sheet::backdrop { background: #05060Ecc; backdrop-filter: blur(3px); }
.sheet[open] { animation: sheet-in .18s ease-out; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.sheet-body { padding: 26px 24px 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.sheet-head h2 { font: 400 2.2rem/1 var(--serif); margin: 8px 0 0; }
.sheet .rule { margin: 22px 0 12px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 96px; padding: 14px 8px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); color: var(--text); text-decoration: none;
  font: 600 .72rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-align: center; box-shadow: inset 0 -2px 0 #00000040; }
.tile svg { width: 22px; height: 22px; color: var(--muted); }
.tile:hover { background: var(--raise); }
.tile:hover svg { color: var(--text); }
.tile[aria-current="page"] { border-color: var(--gold); color: var(--gold); }
.tile[aria-current="page"] svg { color: var(--gold); }

.link-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-top: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); text-decoration: none; background: transparent; }
.link-row:hover { background: var(--raise); }
.link-row svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.link-row .lr-text { flex: 1; min-width: 0; }
.link-row strong { display: block; font-weight: 600; font-size: .95rem; }
.link-row span span { color: var(--muted); font-size: .82rem; }
.link-row .arrow { color: var(--gold); }
.sheet-foot { margin: 22px 0 0; padding-top: 14px; border-top: 1px dashed var(--line-strong); color: var(--faint); font-size: .8rem; }

.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; box-shadow: none; color: var(--gold);
  font: 600 .7rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.back-link:hover { background: none; text-decoration: underline; text-underline-offset: 4px; }

.setting { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: 0; }
.setting h3 { font: 600 .78rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 5px; }
.setting p { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }
/* On/off switch: a sliding block that says what it is. */
.switch { position: relative; flex: none; width: 76px; height: 36px; min-height: 36px; padding: 0; border-radius: 4px; background: #0A0C18; border: 1px solid var(--line-strong); box-shadow: inset 0 2px 4px #00000060; }
.switch::before { content: 'OFF'; position: absolute; top: 4px; left: 4px; width: 36px; height: 26px; display: grid; place-items: center; border-radius: 3px;
  background: var(--line-strong); color: var(--muted); font: 700 .62rem/1 var(--sans); letter-spacing: .12em; transition: transform .15s ease, background .15s; }
.switch[aria-checked="true"] { border-color: var(--gold); }
.switch[aria-checked="true"]::before { content: 'ON'; transform: translateX(32px); background: var(--gold); color: var(--gold-ink); }
@media (prefers-reduced-motion: reduce) { .switch::before { transition: none; } }

/* ---------------------------------------------------------------- Buttons, inputs, cards */

button { cursor: pointer; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--card); padding: 12px 18px; min-height: 44px;
  font: 600 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; box-shadow: inset 0 -2px 0 #00000040; }
button:hover { background: var(--raise); }
button.primary, .row button { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); box-shadow: inset 0 -2px 0 #00000030; }
button.primary:hover, .row button:hover { background: #F0BE60; }
button:disabled { opacity: .6; cursor: progress; }
button.ghost { background: transparent; box-shadow: none; }
button.danger { border-color: #8A4B55; color: #F0B4B4; background: transparent; }
button.danger:hover { background: #2A1420; }
button.wide { width: 100%; }
a.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; text-decoration: none; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text); padding: 10px 18px; box-shadow: inset 0 -2px 0 #00000040;
  font: 600 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
a.button:hover { background: var(--raise); }
a.button.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.status { min-height: 1.4em; color: var(--muted); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest:empty { display: none; }
.suggestion { font: inherit; color: var(--text); background: var(--raise); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; text-transform: none; letter-spacing: normal; }
.suggestion:hover, .suggestion:focus-visible { border-color: var(--text); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-top: 12px; }
.card > .eyebrow:first-child, .card > .rule:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- The game */

/* Level ladder: five segments; each fills with its moon once played. */
.ladder { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0; margin: 14px 0 4px; }
.ladder li { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border: 1px solid var(--line); border-radius: 4px;
  font: 600 .72rem/1 var(--sans); letter-spacing: .14em; color: var(--faint); font-variant-numeric: tabular-nums; background: #0E102099; }
.ladder li.current { border-color: var(--gold); color: var(--gold); background: #E8B04B14; }
.ladder li.done { border-color: var(--line-strong); color: var(--text); background: var(--panel); font-size: .95rem; letter-spacing: 0; }
.puzzle-title { font: 600 .68rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 10px 0 0; text-align: center; }

/* Phones (one column): the game fills the screen; the board centres in the free space and the
   answer box sits low, where thumbs reach. Wider layouts below switch to two columns. */
.wrap.game { display: flex; flex-direction: column; min-height: 100svh; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.play { display: flex; flex-direction: column; flex: 1; gap: 4px; }
.stage { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; min-width: 0; }
.panel { min-width: 0; }
/* As wide as the column allows, but never taller than the screen minus the rest of the game. */
.board-wrap { position: relative; padding-top: 1.1em; /* room for top labels that wrap at small sizes */ width: min(100%, max(var(--board-min, 230px), calc((100svh - var(--chrome)) * 400 / 350))); transition: width .35s ease; }
/* One column, after answering: the board makes room so the whole result card fits on screen too. */
.play.answered { --board-min: 240px; } /* app.js sets --chrome to the measured height of everything else */
@media (prefers-reduced-motion: reduce) { .board-wrap { transition: none; } }

.board { position: relative; width: 100%; aspect-ratio: 400 / 350; container-type: inline-size; }
.board svg { display: block; width: 100%; height: 100%; overflow: visible; }
.board .moon { fill: url(#moonTex); stroke: #4A5070; stroke-width: .8; transition: fill .25s, stroke .25s; }
.board .stars { opacity: calc(1 - var(--day, 0)); transition: opacity 1.4s ease .3s; } /* the board's own stars come out with the sky's */
.board .moon.miss { fill: transparent; stroke: #7A80A3; stroke-dasharray: 5 5; }
.board .blackout, .board .diamond { opacity: 0; transition: opacity .15s; }
.board .corona { opacity: 0; transform: scale(.55); transform-box: fill-box; transform-origin: center; transition: opacity .3s ease-out, transform .3s ease-out; }
.board .halo { transition: opacity .3s; }
.board svg.total .blackout { opacity: 1; }
.board svg.total .corona { opacity: 1; transform: scale(1); }
.board svg.total .halo { opacity: .1; }
.board svg.total .diamond { animation: ring .3s ease-out forwards; }
@keyframes ring { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .board * { transition: none !important; animation-duration: 1ms !important; } }

.board-labels { position: absolute; inset: 0; pointer-events: none; }
/* Labels scale with the board itself (container units), so they stay readable and never crowd at any size. */
.board-label { position: absolute; max-width: 32%; text-align: center; font-size: .85rem; font-size: clamp(11px, 3.4cqi, 17px);
  line-height: 1.25; font-weight: 500; transform: translate(-50%, 0); text-wrap: balance; }
.board-label.above { transform: translate(-50%, -100%); }
.board-label.miss { color: var(--muted); }

.guess { margin-top: 6px; }
.guess label { display: block; margin-bottom: 8px; }
.guess p { margin: 8px 0 0; }
/* Answer box and its button read as one control. */
.row { display: flex; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); padding: 4px; }
.row:focus-within { border-color: var(--gold); }
.row input { flex: 1; min-width: 0; min-height: 46px; background: transparent; border: 0; padding: 10px 12px; font-size: max(16px, 1.05rem); /* 16px+ stops iOS zooming in */ }
.row input:focus-visible { outline: none; }
.row input::placeholder { color: var(--faint); }
.row button { min-height: 46px; border-radius: 4px; }

.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.result-head p { margin: 0; }
.answer { font-size: 1.3rem; font-weight: 600; overflow-wrap: anywhere; margin-top: 6px !important; }
.points { text-align: right; }
.points span:first-child { display: block; font: 400 2.4rem/1 var(--serif); color: var(--gold); font-variant-numeric: tabular-nums; }
.points span:last-child { font: 600 .62rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.tier-name { font: 400 2rem/1.1 var(--serif); margin: 12px 0 4px; }
#r-explain { color: var(--muted); margin: 0; }
/* Tier scale: one connected strip, the earned tier lit. */
.pills { list-style: none; display: flex; padding: 0; margin: 14px 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.pills li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border-left: 1px solid var(--line);
  font-size: .72rem; line-height: 1.2; color: var(--muted); }
.pills li:first-child { border-left: 0; }
.pills .pe { font-size: 1rem; line-height: 1.1; }
.pills .pn { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .04em; }
.pills .pp { font-weight: 700; font-variant-numeric: tabular-nums; }
/* Five tiers on a narrow card: moon + points (names stay for screen readers; the earned name is shown big above). */
@media (max-width: 480px) {
  .pills.many .pn { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
.pills li.on { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.checklist svg { width: 20px; height: 20px; }
.checklist .verdict { font: 600 .64rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.checklist .fits .verdict { color: var(--gold); }
.checklist .misses .verdict { color: var(--faint); }
#next, #share, #report { width: 100%; }

.summary { display: grid; gap: 12px; align-content: start; }
.summary .card { margin-top: 12px; }
.big-score { font: 400 3.4rem/1 var(--serif); margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.big-score .muted { font-size: 1.6rem; }
.summary-list { list-style: none; padding: 0; margin: 16px 0; counter-reset: lvl; }
.summary-list li { display: grid; grid-template-columns: 2.2em 1.6em 1fr auto; align-items: center; gap: 6px; padding: 9px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; counter-increment: lvl; }
.summary-list li::before { content: '0' counter(lvl); font: 600 .68rem/1 var(--sans); letter-spacing: .14em; color: var(--faint); }
.summary-list .sl-tier { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.share { font: 1.4rem/1.4 var(--sans); background: #0A0C18; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 14px; white-space: pre-wrap; margin: 0 0 10px; }
/* Record: one connected grid of numbers. */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.stats div { padding: 14px 12px 12px; border-left: 1px solid var(--line-strong); min-width: 0; }
.stats div:first-child { border-left: 0; }
.stats dt { font-size: .74rem; color: var(--muted); line-height: 1.25; }
.stats dd { margin: 8px 0 0; font: 600 1.8rem/1 var(--sans); letter-spacing: -.02em; color: var(--gold); font-variant-numeric: tabular-nums; }
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
}

/* Wide screens (laptops, desktops, tablets in landscape): board on the left, answer and result on the right.
   The board sizes from the screen height, so a whole level is visible at once. */
@media (min-width: 860px) {
  .wrap.game { max-width: 1180px; padding-top: 22px; }
  .game .play { display: grid; flex: none; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 32px; align-items: start; }
  .game .stage { justify-content: flex-start; }
  .game .panel { padding-top: 40px; }
  .game .board-wrap { width: min(100%, max(320px, calc((100svh - 190px) * 400 / 350))); }
  .game .summary { grid-template-columns: 1fr 1fr; align-items: start; }
}
/* Phones and small tablets held sideways: same two columns, header squeezed so the board gets the height. */
@media (orientation: landscape) and (max-height: 560px) and (min-width: 560px) {
  .wrap.game { max-width: none; padding-top: 6px; padding-bottom: 12px; }
  .game .wordmark { font-size: 1.6rem; }
  .game .dateline, .game .puzzle-title { display: none; }
  .game .ladder { margin: 6px 0 2px; }
  .game .ladder li { height: 24px; }
  .game .play { display: grid; flex: none; grid-template-columns: minmax(0, 1fr) minmax(260px, 46%); gap: 16px; align-items: start; }
  .game .stage { justify-content: flex-start; }
  .game .board-wrap { width: min(100%, max(200px, calc((100svh - 96px) * 400 / 350))); }
  .game .summary { grid-template-columns: 1fr 1fr; align-items: start; }
}
/* Shorter screens: a more compact result card (the checklist already says what the explanation line says). */
@media (max-height: 720px) {
  .game .card { padding: 14px 16px; margin-top: 8px; }
  .game #r-explain { display: none; }
  .game .tier-name { font-size: 1.5rem; margin: 6px 0 0; }
  .game .pills { margin: 8px 0; }
  .game .checklist li { padding: 6px 0; }
  .game .points span:first-child { font-size: 1.9rem; }
}
/* Short screens (small phones, browser bars showing): drop the hint line, keep everything on one screen. */
@media (max-height: 640px) {
  :root { --chrome: 290px; }
  .game .guess p, .game .dateline { display: none; }
  .game .ladder { margin-top: 8px; }
}
/* Very small phones (e.g. 320px wide): tighter chrome so the board stays big. */
@media (max-width: 360px) {
  :root { --chrome: 280px; }
  .pills li { font-size: .68rem; }
  .stats dt { font-size: .68rem; }
  .sheet-body { padding: 22px 16px 18px; }
}
/* Big monitors and TVs: a little larger overall. */
@media (min-width: 1600px) and (min-height: 900px) {
  body { font-size: 18px; }
  .wrap.game { max-width: 1400px; }
}

/* ---------------------------------------------------------------- Content pages */

.prose { max-width: 640px; margin-top: 28px; }
.prose > h1.tier-name { font: 400 clamp(2.4rem, 1.6rem + 3vw, 3.4rem)/1 var(--serif); margin: 8px 0 12px; }
.prose h2 { font: 600 .68rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 36px 0 14px; display: flex; align-items: center; gap: 14px; }
.prose h2::after { content: ''; flex: 1; border-top: 1px dashed var(--line-strong); }
.prose p, .prose li { color: #D8D6E2; line-height: 1.7; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--text); font-weight: 600; }
.prose .muted { color: var(--muted); }
.field { margin: 16px 0; }
.field label { display: block; font-weight: 500; margin-bottom: 8px; }
.field input { width: 100%; min-height: 48px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px; font-size: max(16px, 1rem); }
.field input:focus-visible { outline: none; border-color: var(--gold); }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
fieldset.plain { border: 0; padding: 0; margin: 0; }
.field-legend { font: 400 1.5rem var(--serif); padding: 0; }

/* FAQ: questions as labelled sections. */
.faq-tiers { list-style: none; padding: 0; margin: 14px 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.faq-tiers li { display: grid; grid-template-columns: 1.8em 1fr auto; gap: 10px; align-items: center; margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); }
.faq-tiers li:first-child { border-top: 0; }
.faq-tiers b { color: var(--gold); font-variant-numeric: tabular-nums; }
.faq-tiers span.muted { font-size: .85rem; }

/* Account (logbook) */
.acct-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.acct-row > div { min-width: 0; }
.acct-email { margin: 0; overflow-wrap: anywhere; }
.synced { margin: 12px 0 0; color: var(--gold); font-weight: 500; font-size: .9rem; }
.danger-zone { margin-top: 40px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.danger-zone h2 { margin-top: 0 !important; }
.or { text-align: center; margin: 12px 0; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }
.friend-code { font: 400 2.2rem/1.1 var(--serif); letter-spacing: .08em; color: var(--gold); margin: 6px 0; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 6px; margin: 8px 0 4px; flex-wrap: wrap; }
.tabs button { flex: 1 1 auto; }
.tabs button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.table-scroll { overflow-x: auto; }
.board-table { width: 100%; border-collapse: collapse; }
.board-table th, .board-table td { text-align: left; padding: 10px 6px; border-top: 1px solid var(--line); }
.board-table th { font: 600 .66rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.board-table tr.you td { color: var(--gold); font-weight: 700; }
.board-table td:nth-child(3) { white-space: nowrap; }
.people { list-style: none; padding: 0; margin: 0; }
.people li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.people li span { flex: 1; min-width: 8em; }
.people button { padding: 6px 12px; }

.site-foot { margin-top: 48px; padding-top: 16px; border-top: 1px dashed var(--line-strong); display: flex; gap: 18px; flex-wrap: wrap; font-size: .82rem; color: var(--faint); }
.site-foot a { color: var(--muted); }

/* ---------------------------------------------------------------- Background sky (sky.js) */

#sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(1px 1px at 12% 18%, #ECE8DF88, transparent 60%), radial-gradient(1px 1px at 78% 12%, #ECE8DF66, transparent 60%),
    radial-gradient(1.5px 1.5px at 35% 72%, #ECE8DF55, transparent 60%), radial-gradient(1px 1px at 88% 64%, #ECE8DF77, transparent 60%),
    radial-gradient(1px 1px at 6% 88%, #ECE8DF55, transparent 60%), radial-gradient(1.5px 1.5px at 55% 36%, #ECE8DF44, transparent 60%),
    radial-gradient(1px 1px at 22% 46%, #ECE8DF66, transparent 60%), radial-gradient(1px 1px at 67% 90%, #ECE8DF55, transparent 60%),
    linear-gradient(180deg, #121530 0%, var(--bg) 55%, #0A0B17 100%); }
/* Painted sky (npm run art): wide image on landscape screens, tall one on portrait phones. */
#sky.painted { background: var(--bg) url("art/sky-wide.webp") center bottom / cover no-repeat; }
@media (orientation: portrait) { #sky.painted { background-image: url("art/sky-tall.webp"); } }
/* Daylight over the night sky (sky.js setDaylight): a deep day blue that lifts as the moons cover the sun.
   Kept dark enough for the cream text; it thins out at the very bottom so the hills and horizon glow still show. */
#sky .daylight { position: absolute; inset: 0; opacity: var(--day, 0); transition: opacity 1.4s ease .3s;
  background: linear-gradient(180deg, #173057 0%, #203E6B 50%, #28466F 80%, rgba(40, 70, 111, .55) 90%, rgba(40, 70, 111, 0) 97%); }
@media (prefers-reduced-motion: reduce) { #sky .daylight, .board .stars { transition: none; } }
.flyer { position: absolute; left: 0; top: 0; will-change: transform; }
.flyer svg { display: block; overflow: visible; }
.flyer.comet svg { filter: drop-shadow(0 0 6px #FFD27A88); }
.flyer .blink { animation: blink 1.2s steps(2) infinite; }
.flyer .blink.b2 { animation-delay: .6s; }
.flyer .flame { transform-origin: 14px 15px; animation: flame .18s ease-in-out infinite alternate; }
@keyframes blink { 50% { opacity: .2; } }
@keyframes flame { to { transform: scaleX(.6); } }
@media (prefers-reduced-motion: reduce) { .flyer { display: none; } }

/* Today, worldwide (stats.js) */
.world-headline { font: 400 1.7rem/1.15 var(--serif); margin: 10px 0 4px; }
.hist { margin: 16px 0 6px; }
.hist .bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; border-bottom: 1px solid var(--line-strong); }
.hist .bars span { flex: 1; background: var(--line-strong); border-radius: 2px 2px 0 0; min-height: 2px; }
.hist .bars span.mine { background: var(--gold); }
.hist figcaption { display: flex; justify-content: space-between; margin-top: 6px; }
.world-levels { list-style: none; padding: 0; margin: 12px 0 0; }
.world-levels li { border-top: 1px solid var(--line); padding: 12px 0; }
.world-levels p { margin: 3px 0; }
.wl-level { color: var(--faint); font: 600 .66rem/1 var(--sans); text-transform: uppercase; letter-spacing: .18em; margin-right: 6px; }
.wl-answer { overflow-wrap: anywhere; }
.wl-tier { color: var(--muted); font-size: .85rem; }
.chip { display: inline-block; border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 8px; margin: 4px 2px 0 0; }
.chip.you { border-color: var(--gold); color: var(--gold); }
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1F1F1F; border-color: #fff;
  text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 500; }
.google-btn:hover { background: #F1F1F1; }

/* Rating (stats.js) */
.stars { display: flex; gap: 4px; margin: 10px 0 4px; }
.star { width: 48px; height: 48px; padding: 0; font-size: 1.7rem; line-height: 1; color: #7A80A3; /* 3:1+ on the card */ background: transparent; border-color: transparent; box-shadow: none; letter-spacing: 0; }
.star.lit { color: var(--gold); }
.star:hover { color: var(--text); background: transparent; }
.star.lit:hover { color: var(--gold); }
.card-title { margin-top: 0 !important; }
.card-end { margin-bottom: 0 !important; }
.prose .tier-name { line-height: 1.15; }
