/* HolyMoly theme: black, gold, emerald, charcoal, warm amber. */
:root {
    --black: #0b0b0b; --charcoal: #2b2b2b; --charcoal-2: #1a1a1a; --gold: #c9a227; --gold-2: #f0d060;
    --emerald: #0f6b4f; --emerald-2: #19a37a; --amber: #ffb347; --cream: #f4e9c8; --muted: #9a9a9a;
    --felt: #0d4a36; --felt-edge: #083424; --danger: #d94b4b;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
html, body { margin: 0; background: var(--black); color: var(--cream); font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: var(--gold-2); }
h1, h2, h3 { margin: 0 0 8px; letter-spacing: .3px; }
h1 { font-size: 1.8rem; }
h1:focus { outline: none; }
/* Keyboard focus is always visible (H-29): a gold ring on anything you can tab to. Mouse and touch never show it. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; border-radius: 8px; }
section[id] { scroll-margin-top: 80px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.card { background: linear-gradient(180deg, #171717, #111); border: 1px solid var(--charcoal); border-radius: 14px; padding: 16px; }
/* Buttons in the style of the HolyMoly logo: a glossy black face inside a rounded gold-metal frame, gold lettering.
   Primary actions are solid gold metal like the wordmark; colored variants keep their face color inside the same frame. */
:root {
    --metal: linear-gradient(135deg, #fff2a8 0%, #f0d060 18%, #c9a227 42%, #7a5e12 62%, #e8c45a 82%, #fff2a8 100%);
    --gloss: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 45%, rgba(0,0,0,0) 50%, rgba(0,0,0,.25) 100%);
}
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; position: relative;
    border: 2px solid transparent; border-radius: 14px; padding: 10px 18px;
    background: var(--gloss) padding-box, linear-gradient(180deg, #1c1c1c, #070707) padding-box, var(--metal) border-box;
    color: var(--gold-2); font-weight: 800; letter-spacing: .4px; font-size: .95rem; text-decoration: none;
    text-shadow: 0 1px 0 #000, 0 0 10px rgba(240,208,96,.25);
    box-shadow: 0 2px 0 #000, 0 6px 14px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
    transition: transform .08s, box-shadow .15s, filter .15s;
}
.btn:hover { box-shadow: 0 2px 0 #000, 0 6px 18px rgba(0,0,0,.6), 0 0 14px rgba(240,208,96,.35), inset 0 1px 0 rgba(255,255,255,.18); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #000, 0 3px 8px rgba(0,0,0,.5); }
.btn:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.btn:disabled, .btn.disabled { cursor: not-allowed; filter: grayscale(.85) brightness(.7); box-shadow: 0 2px 0 #000; }
.btn.gold {
    background: var(--gloss) padding-box, linear-gradient(180deg, #fff2a8 0%, #f0d060 22%, #c9a227 55%, #8a6d14 100%) padding-box,
        linear-gradient(135deg, #fffbe0, #c9a227 40%, #5c460c 70%, #fff2a8) border-box;
    color: #0b0b0b; text-shadow: 0 1px 0 rgba(255,242,168,.6);
}
.btn.emerald {
    background: var(--gloss) padding-box, linear-gradient(180deg, #23c08f, #0f6b4f 70%, #08402f) padding-box, var(--metal) border-box;
    color: #fff; text-shadow: 0 1px 0 #04291d;
}
.btn.amber {
    background: var(--gloss) padding-box, linear-gradient(180deg, #ffcf7a, #ffb347 40%, #c97a12) padding-box, var(--metal) border-box;
    color: #0b0b0b; text-shadow: 0 1px 0 rgba(255,230,180,.6);
}
.btn.danger {
    background: var(--gloss) padding-box, linear-gradient(180deg, #ee6b6b, #d94b4b 45%, #8e2323) padding-box, var(--metal) border-box;
    color: #fff; text-shadow: 0 1px 0 #4a0f0f;
}
.btn.big { padding: 16px 22px; font-size: 1.05rem; border-radius: 18px; }
.btn.small { padding: 4px 10px; font-size: .75rem; border-radius: 10px; }
.btn.block { width: 100%; }
.tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: #222; color: var(--muted); }
.tag.gold { background: var(--gold); color: var(--black); }
.tag.emerald { background: var(--emerald); color: #fff; }   /* the darker green: white text on it passes WCAG AA */
.tag.amber { background: var(--amber); color: var(--black); }
.tag.danger { background: var(--danger); color: #fff; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.sandbox { border: 1px dashed var(--amber); background: #1d1708; color: var(--amber); padding: 10px 12px; border-radius: 10px; font-size: .85rem; }
.notice { border-left: 3px solid var(--gold); background: #141414; padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th, table.list td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #222; }
table.list th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: #222; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
input.text { background: #161616; color: var(--cream); border: 1px solid #3a3a3a; border-radius: 8px; padding: 10px 12px; font-size: 1rem; width: 100%; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(201,162,39,.55); } 50% { box-shadow: 0 0 0 10px rgba(201,162,39,0); } }
.pop { animation: pop .35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.slide-in { animation: slidein .4s ease-out both; }
@keyframes slidein { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: flex; overflow-y: auto; overscroll-behavior: contain; z-index: 50; padding: 16px; }
/* Centred when it fits; when a card is taller than the screen it starts at the top and the overlay scrolls. */
.overlay > * { margin: auto; }
/* A hand or game result waits for the domino slam (and the Capicu burst) to play first. */
.after-domino { animation: holdoff 1.7s steps(1, end) both; }
.after-capicu { animation: holdoff 3.9s steps(1, end) both; }
/* A locked hand: the LOCKED banner holds over the board first. */
.after-lock { animation: holdoff 2.2s steps(1, end) both; }
@keyframes holdoff { 0%, 99% { opacity: 0; pointer-events: none; } 100% { opacity: 1; } }
.overlay .card { max-width: 520px; width: 100%; border-color: var(--gold); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
@media (prefers-reduced-motion: reduce) { .pulse, .pop, .slide-in { animation: none; } }
/* A crash: the page's card (PageErrorBoundary), or this bar when the whole connection is lost. Blazor shows the bar. */
.card.crash { max-width: 560px; margin: 24px auto; border-color: var(--gold); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.card.crash h2 { color: var(--gold-2); margin-top: 0; }
/* The full error page (Error.razor), for a request that failed on the server. */
.card.server-error { max-width: 560px; margin: 32px auto; text-align: center; border-color: var(--gold); display: grid; justify-items: center; gap: 6px; }
.card.server-error h1 { color: var(--gold-2); margin: 4px 0 0; }
.card.server-error .mark { border-radius: 16px; }
.card.server-error .row { justify-content: center; margin-top: 6px; }
#blazor-error-ui {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    padding: 12px max(16px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
    background: #141414; border-top: 2px solid var(--gold); color: #eee; text-align: center; box-shadow: 0 -10px 30px rgba(0,0,0,.6);
}
#blazor-error-ui .btn { margin-left: 10px; }
/* outdated.js: a browser too old for Blazor. Covers the page, which cannot work anyway. */
#outdated-browser {
    position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; padding: 24px 16px; background: rgba(11,11,11,.97); color: #eee; text-align: center; font-size: 1.1rem; line-height: 1.5;
}
#outdated-browser p { max-width: 520px; margin: 0; }
.table-people { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.person { display: flex; gap: 8px; align-items: center; background: #141414; border: 1px solid #262626; border-radius: 10px; padding: 6px 10px; font-size: .9rem; }
.broke { border-color: var(--amber); }
.broke .btn { margin: 8px 8px 8px 0; }

/* Legal pages: readable line length, plain lists. */
.legal-page { max-width: 820px; margin: 0 auto; line-height: 1.6; }
.legal-page h1 { margin-bottom: 4px; }
.legal-page h2 { margin-top: 22px; font-size: 1.15rem; }
.legal-page ul { padding-left: 20px; }
.legal-page li { margin: 6px 0; }
footer.legal .legal-links { margin-top: 6px; }
footer.legal .legal-links a { color: inherit; text-decoration: underline; }
footer.legal .build-line { margin-top: 4px; font-size: 11px; opacity: .65; }


/* Admin pages */
.admin-nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 12px; border: 1px solid #333; border-radius: 12px; }
.admin-nav a { color: inherit; }
.card.stat { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.card.stat strong { font-size: 2rem; }
.admin-account { user-select: all; font-size: 1rem; }
.report-player summary { cursor: pointer; }

/* Icon buttons (issue #106): the icon over its name, no box; a chip under it for a price or an on/off state. */
.icon-btn { position: relative; display: inline-grid; justify-items: center; align-content: start; gap: 4px; padding: 4px 6px; background: none; border: 0;
    color: var(--gold-2); font: inherit; font-weight: 800; font-size: .85rem; text-align: center; text-decoration: none; cursor: pointer; border-radius: 12px; }
.icon-btn img { width: 56px; height: 56px; filter: drop-shadow(0 5px 9px rgba(0,0,0,.6)); transition: transform .15s ease, filter .15s ease; }
.icon-btn:hover img, .icon-btn:focus-visible img { transform: translateY(-2px) scale(1.06); filter: drop-shadow(0 7px 14px rgba(240,208,96,.35)); }
.icon-btn:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.icon-btn:disabled { cursor: default; opacity: .45; filter: grayscale(.7); }
.icon-btn:disabled:hover img { transform: none; }
.icon-btn.lg img { width: 76px; height: 76px; }
.icon-btn.sm img { width: 40px; height: 40px; }
.icon-btn .chip { font-size: .7rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--gold); color: var(--black); white-space: nowrap; }
.icon-btn .chip.on { background: var(--emerald); color: #fff; }
.icon-btn .chip.off { background: var(--charcoal); color: #bbb; }
.icon-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .icon-btn img { transition: none; } }

/* Rules & Help (Rules.razor): a tab per topic. Each is a link (/rules#odds); the chosen one shows, the first by default. */
.help-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.help-tabs a { font-size: .85rem; font-weight: 800; border: 1px solid #333; border-radius: 999px; padding: 6px 12px; color: #c9c3b3; text-decoration: none; }
.help-tabs a:hover { border-color: var(--gold); }
.help-tabs a.on { background: var(--gold); color: #111; border-color: var(--gold); }
.help-panel { display: none; scroll-margin-top: 80px; }
.help-panel:target, .help-panels:not(:has(.help-panel:target)) .help-panel:first-child { display: block; }
table.odds td.num, table.odds th.num { text-align: right; font-variant-numeric: tabular-nums; }
.odds-link { font-size: .8rem; color: var(--gold-2); text-decoration: underline; }
.btn.block + .odds-link { display: block; text-align: center; margin-top: 6px; }


/* Solid bones (TableFelt, DominoTile): a top face and the three side walls you can see on the leaning table. */
.b3 { display: block; position: relative; transform-style: preserve-3d; }
.b3 > span { position: absolute; display: block; }
.b3-top { inset: 0; border-radius: 5px; overflow: hidden; transform: translateZ(var(--d)); background: var(--bone-face, linear-gradient(150deg, #fffbf1 0%, #f6efdf 45%, #e6d9bd 100%));
    box-shadow: inset 0 1px 0 #fff, inset 1px 0 0 #fff8, inset -1px -2px 2px rgba(120,95,50,.4); }
.b3-top svg { display: block; width: 100%; height: 100%; }
.b3-groove { stroke: #fff; stroke-width: 1; opacity: .9; }
.b3-pin { stroke: #6d5413; stroke-width: .5; }
.b3-s { left: 3px; right: 3px; top: calc(100% - 1px); height: var(--d); transform-origin: 50% 0; transform: rotateX(90deg); background: linear-gradient(0deg, #f0e6ce, var(--bone-side, #c9b88f) 55%, #84734f); }
.b3-w { left: 1px; top: 3px; bottom: 3px; width: var(--d); transform-origin: 0 50%; transform: rotateY(-90deg); background: linear-gradient(90deg, #a08c63, #e2d5b5); }
.b3-e { left: calc(100% - 1px); top: 3px; bottom: 3px; width: var(--d); transform-origin: 0 50%; transform: rotateY(-90deg); background: linear-gradient(90deg, #8b7852, #c8b78e); }
.b3-sh { inset: 2px -2px -6px 2px; border-radius: 6px; background: rgba(0,0,0,.55); filter: blur(5px); }

/* The shuffle before the deal (shuffle.js, issue #179): face-down bones flying over the page; your real bones wait hidden. */
.hm-shuffle { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.hm-shuffle.skippable { pointer-events: auto; cursor: pointer; }
.hm-bone { position: absolute; left: 0; top: 0; border-radius: 4px; will-change: transform;
    background: radial-gradient(circle at 50% 50%, var(--gold-2) 0 9%, transparent 10%), linear-gradient(145deg, #3a1d4f, #26123a);
    border: 2px solid var(--gold); box-shadow: 0 3px 8px rgba(0,0,0,.5); }
.hm-skip { position: absolute; transform: translate(-50%, -50%); font-size: .8rem; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,.65); color: var(--cream); }
body.hm-dealing .hand-area .hand > * { visibility: hidden; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.seg label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid #3a3a3a; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .9rem; }
.seg input { accent-color: var(--gold); }
.seg label:has(input:checked) { border-color: var(--gold); background: rgba(201,162,39,.15); color: var(--gold-2); }
/* Touch targets at least 44 px tall (#324). */
.seg label, input.text, .check-row { min-height: 44px; }
.check-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.icon-btn { min-width: 44px; min-height: 44px; }
/* A heading that receives focus after a step (#324) is a landing point, not a control: no ring. */
:is(h1, h2)[tabindex="-1"]:focus { outline: none; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* "Quick update in m:ss" under the header before a deploy (#274). */
.maintenance {
    display: flex; gap: 8px; justify-content: center; align-items: center; text-align: center;
    background: var(--gold); color: var(--black); font-weight: 700; font-size: .95rem;
    padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Rule the Block: the table entrance and terms before Enter Game (#300; approved mockup screens 1 and 2). */
.rtb-entry { max-width: 560px; margin: 16px auto; display: flex; flex-direction: column; gap: 10px; }
.rtb-entry h1 { margin: 0; color: var(--cream); }
.rtb-eyebrow { font-size: .75rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold-2); font-weight: 700; }
.rtb-label { margin: 6px 0 0; font-size: .75rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.rtb-desc { margin: 0; line-height: 1.5; }
.rtb-rivals { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.rtb-rivals li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.rtb-ribbons { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rtb-ribbons li { border: 1px solid #444; border-radius: 999px; padding: 3px 10px; font-size: .85rem; }
.rtb-ribbons li.req { border-color: var(--gold); color: var(--gold-2); }
.rtb-next { margin: 0; }
.rtb-all-receipts { align-self: flex-start; color: var(--gold-2); font-weight: 700; text-decoration: none; }
.rtb-terms { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; background: #141414; border: 1px solid #2c2c2c; border-radius: 12px; padding: 10px 12px; }
.rtb-terms dt { margin: 0; } .rtb-terms dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.rtb-terms dd.pos { color: var(--emerald-2); }
.rtb-actions { display: flex; flex-direction: column; gap: 8px; }
/* The game receipt (#303; approved mockup screens 5 and 6). */
.rtb-receipt { display: flex; flex-direction: column; gap: 8px; text-align: left; margin: 8px 0; }
.rtb-receipt h3.rtb-label { margin: 4px 0 0; }
.rtb-terms dd.neg { color: var(--danger); }
/* Badges (#304; art approved 2026-11-03, #319): SVG; not yet earned is grey with a dashed ring. The ring is the fallback. */
.rtb-badge-art { flex: 0 0 auto; width: 52px; height: 52px; filter: grayscale(1) brightness(.55); }
.rtb-badge-art.on { filter: none; }
.rtb-citybadge { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--muted); }
.rtb-citybadge .rtb-badge-art { width: 46px; height: 46px; }
.rtb-marker { display: flex; gap: 10px; align-items: center; }
.rtb-badge { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; border: 2px dashed var(--gold); display: grid; place-items: center; text-align: center;
    font-size: .6rem; line-height: 1.05; color: var(--gold-2); background: #141414; padding: 4px; overflow: hidden; }
.rtb-badge.on { border-style: solid; background: radial-gradient(circle, #2a2410, #141414); }
/* A rival's playing style (#305). */
.rtb-style { font-size: .7rem; letter-spacing: .6px; text-transform: uppercase; color: var(--gold-2); border: 1px solid #4a4020; border-radius: 999px; padding: 1px 8px; }
/* The trophy passport (#313; approved mockup screen 8). */
.rtb-passport { max-width: 720px; }
.rtb-citybadges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; }
.rtb-stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.rtb-stamps li { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: .72rem; color: var(--muted); }
.rtb-stamps img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 2px solid #444; filter: grayscale(1) brightness(.4); }
.rtb-stamps li.on { color: var(--cream); }
.rtb-stamps li.on img { border-color: var(--gold); filter: none; }
/* Text for screen readers only. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rtb-replay { margin-left: 8px; font-size: .75rem; text-transform: none; letter-spacing: 0; }
.rtb-skip { animation: rtb-gone 0s linear 6s forwards; }
@keyframes rtb-gone { to { visibility: hidden; } }
/* Game effects (#316; approved 2026-11-03): transforms and opacity only, 1.6 s at most, kept off the tiles, the turn,
   the counts, the score and the stake. The receipt is readable from the first frame. */
.rtb-receipt { position: relative; overflow: hidden; }
.rtb-fx-deco { position: absolute; pointer-events: none; }
.rtb-chip { display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: -1px; border-radius: 50%; background: var(--gold); border: 2px dashed #7a5f10; box-sizing: border-box; animation: rtb-stake .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rtb-stake { from { transform: translate(-40px, 24px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.rtb-fx-sweep { top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(100deg, transparent, rgba(240,208,96,.28), transparent); transform: translateX(-120%); animation: rtb-sweep 1s ease-out .1s both; }
@keyframes rtb-sweep { to { transform: translateX(320%); } }
.rtb-fx-pulse { display: inline-block; animation: rtb-pulse .9s ease-out .4s both; }
@keyframes rtb-pulse { 40% { transform: scale(1.12); } 100% { transform: none; } }
.rtb-fx-settle { animation: rtb-settle .5s ease-out both; }
@keyframes rtb-settle { from { opacity: .3; } to { opacity: 1; } }
.rtb-fx-reveal { animation: rtb-reveal .55s cubic-bezier(.2,.8,.3,1.2) .5s both; }
@keyframes rtb-reveal { from { transform: translateY(14px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.rtb-fx-stamp { position: relative; display: inline-flex; animation: rtb-stamp .6s cubic-bezier(.2,.8,.3,1.3) .2s both; }
@keyframes rtb-stamp { 0% { transform: scale(1.8) rotate(-14deg); opacity: 0; } 70% { transform: scale(.94) rotate(2deg); opacity: 1; } 100% { transform: none; } }
.rtb-fx-ring { inset: -6px; border-radius: 50%; border: 3px solid var(--gold-2); opacity: 0; animation: rtb-ring .9s ease-out .7s both; }
@keyframes rtb-ring { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.rtb-fx-bones { inset: 0; overflow: hidden; }
.rtb-fx-bones i { position: absolute; top: -30px; width: 10px; height: 18px; border-radius: 2px; background: #f3ead6; border: 1px solid #8d8268; opacity: 0; animation: rtb-fall 1.6s ease-in var(--d) both; }
@keyframes rtb-fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(420px) rotate(var(--r)); opacity: 0; } }
.rtb-fx-crown { position: relative; display: inline-flex; border-radius: 50%; overflow: hidden; animation: rtb-crown .8s cubic-bezier(.2,.8,.3,1.2) .2s both; }
@keyframes rtb-crown { from { transform: translateY(-40px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.rtb-fx-shine { inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); animation: rtb-shine 1.4s ease-out 1s both; }
@keyframes rtb-shine { to { transform: translateX(120%); } }
/* The World Championship (#320, #322; approved 2026-11-03). The door: the Capitolio and the road there. */
.rtb-champ-door { width: 100%; max-width: 100%; height: 160px; object-fit: cover; border-radius: 12px; }
.rtb-quote { margin: 0; padding-left: 10px; border-left: 3px solid var(--gold); font-style: italic; line-height: 1.5; }
/* The celebration: about eight seconds, each step at its own --at. Skip, Done or reduced motion: everything at once. */
.rtb-champ { position: relative; overflow: hidden; text-align: center; align-items: center; }
.rtb-champ > * { position: relative; z-index: 1; }
.rtb-champ > .rtb-champ-hall { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.rtb-champ-hall img { width: 100%; height: 100%; object-fit: cover; opacity: .22; animation: rtb-hall 1.2s ease-out both; }
@keyframes rtb-hall { from { opacity: 0; transform: scale(1.08); } }
.rtb-champ-at { animation: rtb-reveal .6s cubic-bezier(.2,.8,.3,1.2) var(--at, 0s) both; }
.rtb-champ-stamp { animation: rtb-stamp .6s cubic-bezier(.2,.8,.3,1.3) var(--at, 0s) both; }
.rtb-champ .rtb-champ-crown { animation-delay: .8s; }
.rtb-champ .rtb-fx-shine { animation-delay: 1.8s; }
.rtb-champ-crown .rtb-badge-art { width: 96px; height: 96px; }
.rtb-champ-name { margin: 0; font-size: 1.1rem; color: var(--gold-2); }
.rtb-champ .rtb-citybadges { justify-content: center; gap: 10px; }
.rtb-champ-gallery { flex-wrap: wrap; justify-content: center; }
.rtb-champ-gallery li { flex: 0 1 84px; font-size: .78rem; }
.rtb-champ .rtb-terms, .rtb-champ .rtb-actions { width: 100%; text-align: left; }
.rtb-champ .rtb-skip { animation-delay: 7.5s; }
.rtb-champ.done, .rtb-champ.done * { animation: none !important; }
.rtb-champ.done .rtb-fx-deco { display: none; }
/* Reduced motion: the phone's setting unless Settings > Motion says Full, or Motion: Reduced. Same information, at once. */
@media (prefers-reduced-motion: reduce) {
    html:not([data-motion="full"]) .rtb-skip { display: none; }
    html:not([data-motion="full"]) :is(.rtb-fx, .rtb-fx *) { animation: none !important; }
    html:not([data-motion="full"]) .rtb-fx-deco { display: none; }
}
html[data-motion="reduced"] .rtb-skip { display: none; }
html[data-motion="reduced"] :is(.rtb-fx, .rtb-fx *) { animation: none !important; }
html[data-motion="reduced"] .rtb-fx-deco { display: none; }

/* Offline club games (2026-11-14): played in person, scored by hand. Big tap targets for the scorer at the table. */
.offline-picks { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.offline-pick { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: 12px; background: #141414; border: 1px solid var(--charcoal); flex-wrap: wrap; }
.offline-pick input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--emerald-2); }
.offline-pick.on { background: #0f2a20; border-color: var(--emerald-2); }
.offline-pick.off { opacity: .6; }
.offline-pick-name { font-weight: 800; flex: 1; min-width: 120px; }
.offline-why { color: var(--amber); }
.offline-pot { display: flex; flex-direction: column; align-items: flex-end; }
.offline-pot strong { color: var(--gold-2); font-size: 1.4rem; }
.offline-board { display: flex; flex-direction: column; gap: 8px; }
.offline-row { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 10px; border-radius: 12px; background: #141414; border: 1px solid var(--charcoal); }
.offline-row.me { background: #10261d; border-color: var(--emerald-2); }
.offline-row.lock { background: #1a1414; border-color: #4a2a2a; }
.offline-deduct { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #1a1414; border: 1px solid #4a2a2a; }
.offline-deduct label { flex-basis: 100%; }
.offline-deduct input { flex: 1 1 160px; min-width: 0; }
.offline-row .btn.small { min-height: 44px; min-width: 56px; }
.offline-who { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.offline-points { width: 44px; text-align: center; font-size: 1.6rem; font-weight: 900; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.offline-row.lock .offline-points { color: #e8a0a0; }
.offline-result h2 { color: var(--gold-2); }
.offline-object { margin-top: 12px; }
.offline-object textarea { width: 100%; box-sizing: border-box; margin: 8px 0; }
.offline-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.offline-log li.undone { text-decoration: line-through; opacity: .6; }
.offline-recent { margin: 10px 0 0; padding-left: 18px; }

/* The private feedback form (docs/INSIGHTS-PLAN.md). */
.feedback-form { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.feedback-form label { font-weight: 600; margin-top: 6px; }
.feedback-form textarea, .feedback-form select, .feedback-form input[type=text] { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px; border-radius: 10px; border: 1px solid var(--charcoal); background: #141414; color: inherit; font: inherit; }
.feedback-form fieldset { border: 0; padding: 0; margin: 0; }
.feedback-form legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.feedback-form .feedback-check { font-weight: 400; gap: 8px; align-items: flex-start; }
.feedback-form .feedback-check input { width: 22px; height: 22px; flex: none; }
.feedback-form .feedback-diag { margin: 0 0 0 30px; }
/* The feedback invitation: a small dialog in the lobby. */
.feedback-invite { max-width: 420px; width: 100%; }
.feedback-invite-actions { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.feedback-invite-actions .btn { min-height: 48px; display: flex; align-items: center; justify-content: center; text-align: center; }
.link-btn { background: none; border: 0; padding: 10px 0; min-height: 44px; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
