/* VOICE: RouteNGdle's, moved from the airport to the record shop: quiet paper, one loud picture.
   IDEA: crate digging. You flip through a crate, pull one record, and read its hype stickers.
   PICTURE: the sleeve, with the vinyl sliding out and spinning while you dig.
   COLOUR and TYPE: shrink-wrap paper, deep groove ink, a hype-sticker red and a label teal; Archivo, wide for the wordmark.
   LAYOUT: City2City's: picture left, the side column right; stacked on a phone. */
:root {
  --paper: #eef0ee; --surface: #fbfbfa; --ink: #191c20; --ink-soft: #5c6470; --rule: #d3d8d6;
  --red: #d9412b; --blue: #13707a; --accent: var(--red); --on-accent: #fff; --good: #2e8b57; --epic: #7a4fd0; --legendary: #9a6a00;
  --vinyl: #121315; --groove: #23262b;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #0f1214; --surface: #171b1e; --ink: #e8ecee; --ink-soft: #9aa4ad; --rule: #2b3338;
  --red: #ff7259; --blue: #5fc2cb; --accent: var(--red); --on-accent: #1a0f0c; --good: #5cc28a; --epic: #b9a0ff; --legendary: #f0c14b;
  --vinyl: #050607; --groove: #1b1e22; color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #0f1214; --surface: #171b1e; --ink: #e8ecee; --ink-soft: #9aa4ad; --rule: #2b3338;
  --red: #ff7259; --blue: #5fc2cb; --accent: var(--red); --on-accent: #1a0f0c; --good: #5cc28a; --epic: #b9a0ff; --legendary: #f0c14b;
  --vinyl: #050607; --groove: #1b1e22; color-scheme: dark; }
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; overflow-x: clip; }
body { background: var(--paper); color: var(--ink); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bar { display: flex; align-items: center; gap: 10px; padding: 12px clamp(16px, 3vw, 28px); height: 64px; }
.wordmark { margin: 0; font-size: 27px; font-weight: 850; font-stretch: 125%; font-variation-settings: 'wdth' 125; letter-spacing: -0.015em; line-height: 1; }
.wordmark span { color: var(--accent); }
.edition { margin: 0 0 0 6px; flex: 1; color: var(--ink-soft); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The edge: records in a row, black discs with red labels on sleeve cream
   (brand/README.md, "The edges"). Fixed colours, the same in both themes. */
.edge { display: block; height: 8px; background: #efe6d2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Ccircle cx='6' cy='4' r='3.4' fill='%23121315'/%3E%3Ccircle cx='6' cy='4' r='1.3' fill='%23d9412b'/%3E%3C/svg%3E") repeat-x; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); max-width: 1240px; margin: 0 auto; }
.deck { position: sticky; top: 0; align-self: start; height: calc(100dvh - 71px); display: grid; place-items: center; padding: clamp(20px, 4vw, 48px); min-height: 420px; overflow: hidden; }
.side { padding: 20px clamp(16px, 2.4vw, 28px) 40px; }
@media (max-width: 820px) { .layout { grid-template-columns: minmax(0, 1fr); } .deck { position: relative; height: auto; min-height: 0; padding: 22px 16px 8px; } }

/* The picture: a sleeve with its record half out. */
.crate { position: relative; width: 460px; max-width: 100%; aspect-ratio: 1.42; }
.record { position: absolute; z-index: 0; top: 4%; left: 30%; width: 70.4%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, var(--label, var(--red)) 0 15%, var(--vinyl) 15.5% 17%, transparent 17.5%),
    repeating-radial-gradient(circle, var(--vinyl) 0 2px, var(--groove) 2.5px 3px),
    var(--vinyl);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35); transition: left 0.6s cubic-bezier(0.2, 0.8, 0.3, 1); }
.record::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent 0 20%, rgba(255,255,255,0.09) 25%, transparent 32% 70%, rgba(255,255,255,0.06) 76%, transparent 82%); }
.record::before { content: ''; position: absolute; inset: 48.5%; border-radius: 50%; background: var(--paper); z-index: 1; }
.crate.digging .record { left: 10%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sleeve { position: absolute; z-index: 1; top: 0; left: 0; width: 70.4%; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: var(--surface); box-shadow: 0 14px 34px rgba(0,0,0,0.28), inset 0 0 0 1px rgba(0,0,0,0.06); }
.sleeve img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.sleeve img[hidden] { display: none; }
/* A drawn sleeve, when there's no cover to show. */
.blank { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 9%; background: linear-gradient(150deg, hsl(var(--h) 45% 46%), hsl(calc(var(--h) + 40) 50% 26%)); color: #fff; }
.blank b { font-size: clamp(18px, 4.6vw, 30px); font-weight: 850; line-height: 1.02; font-stretch: 112%; font-variation-settings: 'wdth' 112; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.blank span { font-size: clamp(12px, 2.6vw, 15px); font-weight: 650; opacity: 0.88; }
.blank::after { content: ''; position: absolute; right: -18%; bottom: -18%; width: 62%; aspect-ratio: 1; border-radius: 50%; border: 10px solid rgba(255,255,255,0.12); }
/* While digging: flicking through the crate. */
.flip { position: absolute; inset: 0; display: none; place-items: center; padding: 10%; background: var(--surface); text-align: center; font-weight: 800; font-size: clamp(15px, 3.6vw, 21px); line-height: 1.15; color: var(--ink-soft); }
.crate.digging .flip { display: grid; white-space: pre-line; }
/* Covers that may be explicit start blurred; one tap shows them. */
.sleeve.veiled > img, .sleeve.veiled > .blank { filter: blur(26px) saturate(0.6); transform: scale(1.2); }
.veil { position: absolute; inset: 0; z-index: 2; display: none; place-content: center; justify-items: center; gap: 10px; padding: 12%; text-align: center; color: #fff; background: rgba(10, 12, 14, 0.35); }
.sleeve.veiled .veil { display: grid; }
.veil p { margin: 0; font-weight: 800; font-size: clamp(14px, 3.4vw, 17px); text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.veil button { min-height: 44px; padding: 0 18px; border: 1.5px solid #fff; border-radius: 10px; background: rgba(0,0,0,0.25); color: #fff; font-weight: 800; cursor: pointer; }
.cover-tools { display: flex; justify-content: center; gap: 16px; min-height: 36px; margin-top: 10px; }

/* The side column. */
.album h2 { margin: 0; font-size: clamp(24px, 5vw, 32px); line-height: 1.08; font-weight: 850; text-wrap: balance; overflow-wrap: anywhere; }
.album .by { margin: 4px 0 0; font-size: 17px; font-weight: 650; }
.album .meta { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }
.album .meta a { color: var(--blue); font-weight: 700; text-decoration: none; }
.album .meta a:hover { text-decoration: underline; }
.lead { margin: 0; color: var(--ink-soft); font-size: 15px; }
.roll { display: flex; gap: 10px; align-items: center; margin: 16px 0 6px; flex-wrap: wrap; }
.btn { min-height: 46px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 750; font-stretch: 112%; font-variation-settings: 'wdth' 112; font-size: 17px; cursor: pointer; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-soft); cursor: pointer; min-height: 44px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--red); }

.r-common { --c: var(--ink-soft); } .r-uncommon { --c: var(--good); } .r-rare { --c: var(--blue); } .r-epic { --c: var(--epic); } .r-legendary { --c: var(--legendary); }
h3 { margin: 22px 0 10px; font-size: 15px; font-weight: 750; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.link-btn { padding: 6px 0; border: 0; background: none; color: var(--ink-soft); font-size: 14px; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.link-btn[hidden] { display: none; }

/* Hype stickers: a rounded label in the sticker's rarity colour, slapped on a little crooked. */
.stickers { list-style: none; margin: 0; padding: 4px 0 0; display: grid; gap: 12px; }
.sticker { position: relative; padding: 10px 14px 9px; border-radius: 16px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 35%, transparent); transform: rotate(var(--tilt, 0deg)); }
.sticker .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sticker b { color: var(--c); font-size: 14px; font-weight: 850; letter-spacing: 0.05em; text-transform: uppercase; overflow-wrap: anywhere; }
.sticker .rpm { flex: none; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.sticker .desc { display: block; margin-top: 2px; font-size: 14px; line-height: 1.35; }
.sticker small { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sticker.new::after { content: 'New'; position: absolute; top: -9px; right: 12px; padding: 1px 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.sticker.landing { animation: slap 0.36s cubic-bezier(0.2, 0.8, 0.3, 1.15) both; }
@keyframes slap { from { opacity: 0; transform: translateY(-6px) scale(1.18) rotate(var(--tilt, 0deg)); } to { opacity: 1; transform: scale(1) rotate(var(--tilt, 0deg)); } }
/* What a sticker covers: earned, but no RPM of their own. */
.takes { list-style: none; margin: 8px 0 0; padding: 6px 0 0; border-top: 1px dashed color-mix(in srgb, var(--c) 40%, transparent); display: grid; gap: 3px; }
.takes li { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--ink-soft); }
.takes li::before { content: "└"; font-weight: 700; }
.takes li b { flex: 1; font-size: 12.5px; color: var(--ink); letter-spacing: 0.04em; }
.takes li span { font-size: 11px; font-weight: 800; text-transform: uppercase; }

.score { margin: 14px 0 4px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--rule); }
.score[hidden] { display: none; }
.score p { margin: 0; }
.points { font-size: 15px; color: var(--ink-soft); }
.points b { font-size: clamp(28px, 7vw, 36px); font-weight: 850; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
.cls { margin-top: 8px !important; font-size: 14px; color: var(--ink-soft); }
.pill { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--c); color: var(--c); font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.c-diamond { --c: var(--blue); } .c-multi-platinum { --c: var(--epic); } .c-platinum { --c: var(--ink); } .c-gold { --c: var(--legendary); } .c-silver { --c: var(--ink-soft); } .c-bargain-bin { --c: var(--red); }
.score.landing { animation: pop 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.15) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.share { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share small { color: var(--ink-soft); font-size: 13px; }

.panel { margin: 24px 0 0; padding-top: 6px; border-top: 2px dashed var(--rule); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.stats div { padding: 8px 10px; border-radius: 10px; background: var(--paper); }
.stats dt { font-size: 12px; color: var(--ink-soft); }
.stats dd { margin: 0; font-size: 18px; font-weight: 850; font-variant-numeric: tabular-nums; }
.history { list-style: none; margin: 10px 0 0; padding: 0; }
.history li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.history li:first-child { border-top: 0; }
.history button { display: grid; text-align: left; padding: 0; border: 0; background: none; cursor: pointer; }
.history button b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history button span { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .val { display: grid; justify-items: end; }
.history .val b { font-variant-numeric: tabular-nums; }
.history .val small { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--c); }
.crate-group summary { margin: 12px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 9px; border: 1.5px solid var(--c); border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--c); text-transform: uppercase; }
.small { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
/* Tabs: the roll and the leaderboards. */
.tabs { display: flex; gap: 4px; max-width: 1240px; margin: 0 auto; padding: 10px clamp(16px, 3vw, 28px) 0; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-weight: 750; text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
[hidden] { display: none !important; }
.boards { max-width: 1240px; margin: 0 auto; padding: 12px clamp(16px, 3vw, 28px) 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); }
@media (max-width: 820px) { .boards { grid-template-columns: minmax(0, 1fr); } }
.boards h2 { margin: 6px 0 2px; font-size: clamp(22px, 4.6vw, 28px); font-weight: 850; }
.boards .sub { margin: 0 0 10px; color: var(--ink-soft); font-size: 14px; }
.board { list-style: none; margin: 0; padding: 0; }
.board li { border-top: 1px solid var(--rule); }
.board li:first-child { border-top: 0; }
.board button { width: 100%; display: grid; grid-template-columns: 28px 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border: 0; background: none; text-align: left; cursor: pointer; }
.board .rank { font-weight: 850; font-size: 17px; color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }
.board li:nth-child(1) .rank { color: var(--legendary); }
.thumb { position: relative; width: 48px; height: 48px; border-radius: 3px; overflow: hidden; background: linear-gradient(150deg, hsl(var(--h) 45% 46%), hsl(calc(var(--h) + 40) 50% 26%)); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.veiled img { filter: blur(8px); transform: scale(1.3); }
.board .what { display: grid; }
.board .what b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .what span { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .val { display: grid; justify-items: end; }
.board .val b { font-weight: 850; font-variant-numeric: tabular-nums; }
.board .val small { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--c); }
.empty { padding: 18px 0; color: var(--ink-soft); font-size: 15px; }
.loading { padding: 40px 16px; text-align: center; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .sticker.landing, .score.landing { animation: none; } .crate.digging .record { animation: none; } }

/* Site additions: the day's state and the footer. */
.daily { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.daily b { color: var(--ink); }
.off-board { margin: 6px 0 0; font-size: 13px; color: var(--red); font-weight: 700; }
.dev-only[hidden] { display: none !important; }
.mine { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }

/* The header's round icon buttons (making-a-daily-game.md, 2.4). */
.icon-btn { position: relative; width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--rule); border-radius: 50%; background: transparent; font-weight: 750; font-size: 17px; cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn[hidden] { display: none; }
/* A red dot on What's new until you've opened the latest entry. */
.unread-dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--paper); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 860px) { .bar { height: 56px; } .wordmark { font-size: 23px; } }
/* The wordmark is long: below 480px the edition line would be cut to a letter. */
@media (max-width: 480px) { .edition { display: none; } }

/* Dialogs: How to play, Your stats, What's new. */
dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 26px 26px 22px; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(14, 20, 32, 0.45); }
dialog h2 { margin: 0 0 12px; font-size: 24px; font-weight: 800; font-stretch: 112%; font-variation-settings: 'wdth' 112; }
dialog h3 { margin: 22px 0 10px; font-size: 15px; font-weight: 700; }
dialog p, dialog li { font-size: 15px; }
.close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; }
.close:hover { background: var(--paper); }
.changes { list-style: none; margin: 0; padding: 0; }
.changes > li { border-top: 1px solid var(--rule); padding: 14px 0 4px; margin: 0; }
.changes > li:first-child { border-top: 0; padding-top: 2px; }
.changes h3 { margin: 2px 0 6px; }
.changes ul { color: var(--ink-soft); }
.change-date { margin: 0; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tip { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--paper); }
/* Your stats: a bar for each recent dig's RPM (on a log scale), the latest marked. */
.chart { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.chart li { display: grid; grid-template-columns: 52px minmax(0, 1fr) 82px; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-soft); }
.chart .track { display: block; height: 14px; border-radius: 4px; background: var(--paper); overflow: hidden; }
.chart .fill { display: block; height: 100%; border-radius: 4px; background: var(--ink-soft); }
.chart li.latest { color: var(--ink); font-weight: 750; }
.chart li.latest .fill { background: var(--accent); }
.chart .v { text-align: right; font-variant-numeric: tabular-nums; }

/* The end of a dig: the result, Share result, how everyone did, the countdown. */
.result-line { margin: 0 0 6px !important; font-size: 17px; font-weight: 750; }
.squares { margin: 8px 0 0 !important; font-size: 18px; letter-spacing: 1px; overflow-wrap: anywhere; }
.share-text { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--paper); font: 14px/1.4 var(--font); white-space: pre-wrap; user-select: all; }
.everyone { margin: 12px 0 0; display: grid; gap: 6px; justify-items: start; }
.everyone p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.next { margin: 10px 0 0 !important; font-size: 14px; color: var(--ink-soft); }
.next b { color: var(--ink); }
/* The City2City box (making-a-daily-game.md, 8). */
.xpromo { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; margin: 16px 0 0; padding: 12px; border: 1.5px solid var(--rule); border-radius: 10px; color: var(--ink); text-decoration: none; }
.xpromo img { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; }
.xpromo small { display: block; color: var(--ink-soft); font-size: 12px; }
.xpromo b { display: block; font-size: 17px; font-weight: 800; }
.xpromo span { display: block; font-size: 14px; color: var(--ink-soft); }
.xpromo em { display: block; margin-top: 4px; font-style: normal; font-weight: 750; color: var(--accent); }
.xpromo:hover { border-color: var(--ink); }

/* The footer (making-a-daily-game.md, 2.6). */
.colophon { max-width: 1240px; margin: 14px auto 0; padding: 18px clamp(16px, 3vw, 28px) 36px; font-size: 13px; color: var(--ink-soft); }
.colophon p { margin: 4px 0; }
.colophon a { color: var(--accent); text-underline-offset: 3px; }
#stats .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#stats .stats dd { font-size: 17px; }
