/* Press Start 2P (clear C/O and H/M), scaled down so it fits the sizes the layout was built for. */
@font-face {
  font-family: "Pixel Press";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 76%;
  src: url(https://fonts.gstatic.com/s/pressstart2p/v16/e3t4euO8T-267oIAQAu6jDQyK3nVivM.woff2) format("woff2");
}

:root {
  --night: #141225;
  --panel: rgba(20, 18, 37, .9);
  --line: #3b3560;
  --cream: #f6e7c8;
  --muted: #a9a3c0;
  --gold: #ffcc33;
  --gold-dark: #a8780f;
  --red: #ff5a5f;
  --pink: #ff7ad9;
  --cyan: #4fc3ff;
  --grass: #5cb85c;
  --brown: #2a1a0e;
  --pixel: "Pixel Press", "Courier New", monospace;
  --body: "Pixelify Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: #8fd3f4;
  color: var(--cream);
  font: 18px/1.45 var(--body);
  font-synthesis: none; /* the pixel font has one weight; fake bold would blur it */
  overflow-x: hidden;
}
[hidden] { display: none !important; }
b { font-weight: 700; }

#world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; image-rendering: pixelated; }
main { position: relative; z-index: 1; }

/* ---------- top bar (in-game) ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.mini-logo, .room-badge {
  font: 700 13px/1 var(--pixel); letter-spacing: .06em; color: var(--cream); text-decoration: none;
  background: var(--panel); padding: 9px 12px; border: 2px solid var(--line);
}
.strike { position: relative; color: var(--muted); }
.strike::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 3px; background: var(--red); transform: rotate(-4deg); }

/* ---------- screens ---------- */
.screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 16px 20px;
  animation: enter .35s ease both;
}
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.bottom-block { margin-top: auto; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ---------- title ---------- */
.title-block { text-align: center; margin-top: 5vh; }
.title { margin: 0; display: flex; flex-direction: column; align-items: center; font-family: var(--pixel); font-weight: 700; line-height: .95; color: var(--cream); }
.title .t-small, .title .t-big {
  text-shadow: -3px 0 var(--brown), 3px 0 var(--brown), 0 -3px var(--brown), 0 3px var(--brown), 6px 6px 0 var(--brown);
}
.t-small { font-size: clamp(22px, 4vw, 38px); letter-spacing: .2em; }
.t-big { position: relative; font-size: clamp(30px, 7.4vw, 92px); color: var(--gold); }
.t-big::after {
  content: ""; position: absolute; left: -3%; right: -3%; top: 54%; height: clamp(3px, .5vw, 6px);
  background: var(--red); box-shadow: 0 0 0 2px var(--brown); transform: rotate(-2.5deg);
}
.subtitle { margin: 18px 0 6px; font: 700 clamp(16px, 2.4vw, 22px) var(--pixel); letter-spacing: .35em; color: #1f5d8c; }
.tagline { margin: 0; padding: 0 8px; font: 400 clamp(11px, 1.6vw, 15px) var(--pixel); color: #2b4f6b; letter-spacing: .04em; }
.title-block, .lobby-top { max-width: 100%; }

/* ---------- panels and controls ---------- */
.panel {
  width: 100%;
  background: var(--panel);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 3px var(--night), 8px 8px 0 3px rgba(0, 0, 0, .35);
  padding: clamp(16px, 3vw, 24px);
}
.home-panel { max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
label, .eyebrow { margin: 0; font: 700 12px var(--pixel); letter-spacing: .14em; color: var(--muted); }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 10px; }

input {
  width: 100%; min-width: 0; padding: 12px 14px;
  border: 3px solid var(--line); border-radius: 0; background: #0c0a19; color: var(--cream);
  font: 500 19px var(--body); outline: none; transition: border-color .15s;
}
input:focus { border-color: var(--gold); }
input:disabled { opacity: .55; }
.code-input { text-transform: uppercase; letter-spacing: .25em; font-family: var(--pixel); font-size: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border: 3px solid var(--brown); border-radius: 0;
  background: var(--cream); color: var(--brown);
  font: 700 15px var(--pixel); letter-spacing: .08em;
  box-shadow: 0 5px 0 var(--brown);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .06s, box-shadow .06s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brown); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 0 5px 0 var(--brown); }
.btn-primary { background: var(--gold); }
.btn-big { width: 100%; padding: 16px; font-size: 19px; letter-spacing: .2em; margin: 4px 0 6px; }

.how { width: 100%; max-width: 460px; }
.how summary { cursor: pointer; font: 700 13px var(--pixel); letter-spacing: .14em; color: var(--cream); text-shadow: 2px 2px 0 var(--brown); list-style: none; text-align: center; }
.how summary::-webkit-details-marker { display: none; }
.how ol { margin: 10px 0 0; padding: 16px 16px 16px 36px; background: var(--panel); border: 2px solid var(--line); font-size: 16px; }
.how li { margin: 4px 0; }
.how li b { color: var(--gold); }

.credit { margin: 4px 0 0; font: 400 12px var(--pixel); letter-spacing: .1em; color: var(--cream); text-shadow: 2px 2px 0 var(--brown); text-align: center; }
.credit b { color: var(--gold); }
.title-credit {
  display: inline-block; margin-top: 14px; padding: 6px 14px;
  font-size: clamp(12px, 1.8vw, 15px); letter-spacing: .14em;
  background: rgba(20, 18, 37, .85); border: 2px solid var(--gold); text-shadow: none;
}

.big-code { margin: 0; font: 700 clamp(40px, 8vw, 64px)/1.1 var(--pixel); letter-spacing: .14em; color: var(--gold); text-shadow: 4px 4px 0 var(--brown); }
.tag { display: inline-block; padding: 4px 10px; background: var(--cyan); color: var(--night); font: 700 12px var(--pixel); letter-spacing: .08em; }
.blink { animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- lobby ---------- */
.lobby-top { text-align: center; margin-top: 4vh; }
.lobby-top .eyebrow { color: #1f5d8c; }
.lobby-top .tagline { margin-top: 8px; }
.lobby-panel { max-width: 860px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.lobby-col { display: flex; flex-direction: column; gap: 10px; }
.ai-status { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.ai-status .dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: 0; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.slots li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #221f3a; border-left: 6px solid var(--c, var(--line)); font-weight: 600; }
.slots li.empty { background: transparent; border: 2px dashed var(--line); color: var(--muted); font-weight: 400; font-size: 15px; }
.pill { margin-left: auto; font: 700 11px var(--pixel); color: var(--gold); letter-spacing: .1em; }

/* ---------- home: modes, account, sign-in ---------- */
.mode-grid { width: 100%; max-width: 920px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: stretch; }
.mode-grid .home-panel { max-width: none; margin: 0; }
.mode-title { margin: 0; font: 400 16px var(--pixel); color: var(--gold); }
.mode-sub { margin: 0 0 6px; font-size: 15px; color: var(--muted); }
.ranked-panel { justify-content: center; }
.signin-box { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 44px; }
.signin-note { margin: 0; font-size: 14px; color: var(--muted); }
.ranked-status { margin: 0; font-size: 15px; color: var(--cream); }
.ranked-status b { color: var(--gold); font-family: var(--pixel); font-size: 13px; }
.home-corner {
  position: fixed; top: 12px; right: 16px; z-index: 5;
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px;
}
.home-corner .btn { padding: 9px 12px; font-size: 12px; }
.account-chip {
  display: flex; align-items: center; gap: 12px; padding: 7px 12px;
  background: var(--panel); border: 2px solid var(--line); font-size: 15px;
}
.account-chip .coins { font: 400 12px var(--pixel); color: var(--gold); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: 400 10px var(--pixel); cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--cream); }

/* ---------- leaderboard ---------- */
.lb-panel { max-width: 640px; margin-top: 2vh; }
.lb-title { margin: 6px 0 16px; text-align: center; font: 400 clamp(20px, 4vw, 30px) var(--pixel); color: var(--gold); }
.tabs { display: flex; justify-content: center; gap: 8px; }
.tab { padding: 10px 18px; background: transparent; border: 2px solid var(--line); color: var(--muted); font: 400 12px var(--pixel); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--night); }
.lb-note { margin: 12px 0; text-align: center; font-size: 14px; color: var(--muted); }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-list li, .lb-me { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #221f3a; }
.lb-list li.me { outline: 2px solid var(--gold); }
.lb-rank { width: 44px; font: 400 14px var(--pixel); color: var(--muted); }
.lb-list li:nth-child(1) .lb-rank { color: #ffd23f; }
.lb-list li:nth-child(2) .lb-rank { color: #d6dbe6; }
.lb-list li:nth-child(3) .lb-rank { color: #e0965a; }
.lb-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font: 400 14px var(--pixel); color: var(--gold); white-space: nowrap; }
.lb-score small { color: var(--muted); font-size: 9px; }
.lb-me { margin-top: 12px; border: 2px dashed var(--gold); }
.lb-empty { padding: 20px; text-align: center; color: var(--muted); }

/* ---------- ranked results ---------- */
.ranked-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.rs-box { padding: 14px; text-align: center; border: 2px solid var(--line); background: #221f3a; }
.rs-box p { margin: 0; }
.rs-big { margin-top: 6px !important; font: 400 clamp(22px, 4vw, 32px) var(--pixel); color: var(--gold); }
.coins-earned { animation: slam .5s cubic-bezier(.2, 1.6, .4, 1) .3s both; }

/* ---------- choose your dog ---------- */
.choose-title { margin: 6px 0 0; font: 700 clamp(28px, 5.5vw, 52px)/1 var(--pixel); color: var(--gold); text-shadow: -3px 0 var(--brown), 3px 0 var(--brown), 0 -3px var(--brown), 0 3px var(--brown), 5px 5px 0 var(--brown); }
.dog-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4vh; max-width: 900px; }
.dog-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 150px; padding: 10px 8px 12px; cursor: pointer;
  background: var(--panel); border: 3px solid var(--line); color: var(--cream);
  box-shadow: 0 5px 0 var(--night); transition: transform .12s, border-color .12s;
  font: inherit;
}
.dog-card:hover:not(:disabled) { transform: translateY(-4px); border-color: var(--muted); }
.dog-card canvas { width: 132px; height: 96px; image-rendering: pixelated; background: linear-gradient(#bfe6f7 0 78%, #5cb85c 78% 84%, #6b4a2b 84%); }
.dog-card .dname { font: 700 15px var(--pixel); letter-spacing: .08em; }
.dog-card .dstatus { font: 400 11px var(--pixel); color: var(--muted); min-height: 14px; }
.dog-card[aria-checked="true"] { border-color: var(--gold); transform: translateY(-6px); box-shadow: 0 5px 0 var(--night), 0 0 0 3px var(--gold); }
.dog-card[aria-checked="true"] .dstatus { color: var(--gold); }
.dog-card:disabled { cursor: not-allowed; opacity: .5; filter: grayscale(.8); }
.choose-panel { max-width: 640px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
.choose-panel .btn-big { width: auto; margin: 0; padding: 16px 22px; }
.choose-panel p { margin: 0; }
.dog-name { font: 700 22px var(--pixel); color: var(--gold); }
#change-dog-btn { width: 100%; }

/* ---------- question ---------- */
.q-panel { max-width: 820px; }
.q-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.q-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.timer { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.timer span { font: 700 34px/1 var(--pixel); color: var(--gold); text-shadow: 3px 3px 0 var(--brown); }
.timer-bar { display: flex; gap: 2px; }
.timer-bar i { width: 7px; height: 12px; background: var(--gold); }
.timer-bar i.off { background: #2c2846; }
.timer.urgent span { color: var(--red); animation: pulse .5s ease-in-out infinite alternate; }
.timer.urgent .timer-bar i:not(.off) { background: var(--red); }
@keyframes pulse { to { transform: scale(1.15); } }
.progress { height: 6px; background: #2c2846; margin: 14px 0 0; }
.progress div { height: 100%; background: var(--grass); transition: width .3s; }

.prompt { margin: 22px 0 18px; font: 700 clamp(28px, 5vw, 50px)/1.1 var(--body); color: var(--cream); }
.prompt.small { font-size: clamp(22px, 3.6vw, 34px); margin: 6px 0 0; }

.answer-form { display: flex; gap: 10px; }
.answer-form input { font-size: 21px; padding: 14px 16px; }
.answer-form .btn { padding: 0 26px; font-size: 18px; }

.feedback { min-height: 70px; margin-top: 14px; }
.feedback .hint { margin: 0; color: var(--muted); font-size: 16px; }
.feedback .judging { display: flex; align-items: center; gap: 12px; }
.paw { display: inline-block; animation: dig .3s steps(2) infinite; }
@keyframes dig { 50% { transform: translateY(4px) rotate(20deg); } }
.feedback .error { margin: 0; color: var(--red); font-weight: 600; animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.verdict { display: grid; gap: 8px; }
.verdict-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.verdict-answer { font: 700 23px var(--body); color: var(--cream); overflow-wrap: anywhere; }
.points { font: 700 20px var(--pixel); color: var(--gold); white-space: nowrap; }
.points small { font: 400 12px var(--pixel); color: var(--muted); }
.comment { margin: 0; color: #cfc8e6; font-size: 16px; font-style: italic; }

/* mainstream meter: underground (left) -> mainstream (right) */
.meter { display: grid; gap: 4px; }
.meter-bar { position: relative; height: 12px; background: linear-gradient(90deg, #6b4a2b 0 20%, #a0603a 20% 40%, #b08a5a 40% 60%, #a6dd8f 60% 80%, #5cb85c 80%); border: 2px solid var(--night); }
.meter-bar i { position: absolute; top: 50%; width: 12px; height: 18px; background: var(--cream); border: 2px solid var(--night); transform: translate(-50%, -50%); }
.meter-labels { display: flex; justify-content: space-between; font: 400 11px var(--pixel); color: var(--muted); }
.meter-labels b { color: var(--cream); }

.player-strip { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.player-strip li { display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: var(--panel); border: 2px solid var(--line); border-left: 6px solid var(--c, var(--line)); font-size: 15px; }
.player-strip .pname { font-weight: 700; }
.player-strip .status { font: 400 11px var(--pixel); color: var(--muted); }
.player-strip .status.answered { color: var(--grass); }
.player-strip li.off { opacity: .45; }

/* ---------- reveal ---------- */
.r-panel { max-width: 820px; }
.next-in { margin: 0; font: 700 13px var(--pixel); color: var(--gold); white-space: nowrap; }
.answers { width: 100%; max-width: 1000px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 45%), 1fr)); gap: 10px; }
.answer-card {
  display: grid; gap: 7px; align-content: start; padding: 14px;
  background: var(--panel); border: 2px solid var(--line); border-top: 6px solid var(--c, var(--line));
  animation: enter .4s ease both;
}
.answer-card { gap: 4px; padding: 10px 14px; }
.answer-card .who { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 700 12px var(--pixel); letter-spacing: .08em; color: var(--muted); }
.answer-card .verdict-answer { font-size: 21px; line-height: 1.2; }
.answer-card.none .verdict-answer { color: var(--muted); }
.answer-card .points { font-size: 17px; }
.card-stats { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-stats .pop { font-size: 13px; color: var(--muted); }
.answer-card .comment { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { display: inline-block; width: fit-content; padding: 3px 8px; font: 700 11px var(--pixel); letter-spacing: .06em; }
.badge.clash { background: var(--pink); color: var(--night); }
.badge.rare { background: #6ff0ff; color: var(--night); }
.badge.bone { background: var(--gold); color: var(--night); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.answer-card.has-bone { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(255, 204, 51, .45); }
.bone-hud { font: 700 11px var(--pixel); letter-spacing: .06em; color: var(--muted); }
.bone-hud.found { color: var(--gold); }

/* ---------- results ---------- */
.results-panel { max-width: 720px; margin-top: 2vh; }
.winner { text-align: center; font: 700 clamp(26px, 5vw, 44px)/1.15 var(--pixel); margin: 6px 0 22px; color: var(--cream); }
.hl { color: var(--gold); }
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ranking li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #221f3a; border-left: 8px solid var(--c, var(--line)); }
.ranking li:first-child { background: linear-gradient(90deg, rgba(255, 204, 51, .18), #221f3a); outline: 2px solid var(--gold); }
.ranking .rank { font: 700 22px var(--pixel); color: var(--muted); width: 28px; }
.ranking .pname { font-weight: 700; font-size: 19px; }
.ranking .sub { font-size: 14px; color: var(--muted); }
.ranking .total { margin-left: auto; text-align: right; font: 700 22px/1.3 var(--pixel); color: var(--gold); }
.ranking .total small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--muted); }
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 16px; }
.highlight { padding: 12px 14px; border: 2px dashed var(--line); }
.highlight p { margin: 4px 0 0; }
.highlight .big { font: 700 20px var(--body); color: var(--cream); }
.highlight .muted { font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 24px; }
.actions .muted { margin: 0; }
.log { margin-top: 22px; }
.log summary { cursor: pointer; font: 700 12px var(--pixel); letter-spacing: .12em; color: var(--muted); text-align: center; list-style: none; }
.log-scroll { overflow-x: auto; margin-top: 12px; }
.log table { width: 100%; border-collapse: collapse; font-size: 15px; }
.log th, .log td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.log th { font: 700 11px var(--pixel); color: var(--muted); letter-spacing: .08em; }
.log td .pts { color: var(--muted); font-size: 12px; }

/* ---------- rarity tiers ---------- */
.tier-legendary { --tier: #ff7ad9; }
.tier-deep { --tier: #6ff0ff; }
.tier-under { --tier: #8fe36a; }
.tier-shallow { --tier: #ffb23f; }
.tier-main { --tier: #b9b4c9; }
.tier-none { --tier: #8f8a9c; }
.tier-label { display: inline-block; width: fit-content; padding: 3px 8px; background: var(--tier); color: var(--night); font: 700 11px var(--pixel); letter-spacing: .08em; }
.tier-legendary.tier-label, .tier-legendary .splash-tier {
  background: linear-gradient(90deg, #ff5a5f, #ffcc33, #8fe36a, #6ff0ff, #b77cff, #ff7ad9, #ff5a5f);
  background-size: 300% 100%; animation: rainbow 1.6s linear infinite;
}
@keyframes rainbow { to { background-position: 300% 0; } }

/* ---------- score splash: a banner over the round header, so the dig below stays visible ---------- */
.splash {
  position: fixed; left: 0; right: 0; top: 60px; z-index: 8;
  display: flex; justify-content: center; pointer-events: none; padding: 0 16px;
}
.splash-inner {
  display: flex; align-items: center; gap: clamp(14px, 3vw, 28px);
  padding: 12px clamp(16px, 3vw, 28px); max-width: min(100%, 860px);
  background: rgba(20, 18, 37, .96); border: 4px solid var(--tier); box-shadow: 0 0 0 4px var(--night), 0 0 50px color-mix(in srgb, var(--tier) 50%, transparent);
  animation: splash-in .45s cubic-bezier(.2, 1.6, .4, 1) both, splash-out .4s ease-in 2.8s forwards;
}
@keyframes splash-in { from { transform: translateY(-30px) scale(.6); opacity: 0; } }
@keyframes splash-out { to { transform: translateY(-40px) scale(.8); opacity: 0; } }
.splash-info { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.splash-tier {
  margin: 0; padding: 4px 12px; background: var(--tier); color: var(--night);
  font: 700 clamp(14px, 2.4vw, 22px) var(--pixel); letter-spacing: .14em;
}
.splash-meters {
  margin: 0; white-space: nowrap; font: 700 clamp(46px, 8vw, 96px)/1 var(--pixel); color: var(--tier);
  text-shadow: 4px 4px 0 var(--night), 0 0 26px color-mix(in srgb, var(--tier) 60%, transparent);
}
.splash-meters small { font-size: .45em; }
.splash-sub { margin: 0; font-size: clamp(14px, 2vw, 18px); color: var(--cream); }
.splash-sub b { color: var(--tier); }
.splash-stamps { display: flex; gap: 10px; min-height: 0; }
.stamp {
  padding: 6px 12px; font: 700 clamp(16px, 3vw, 22px) var(--pixel); letter-spacing: .08em; color: var(--night);
  border: 3px solid var(--night); transform: rotate(-6deg);
  animation: stamp .35s cubic-bezier(.3, 1.8, .5, 1) both; animation-delay: var(--d, 1s);
}
.stamp.bone { background: var(--gold); }
.stamp.clash { background: var(--pink); transform: rotate(5deg); }
@keyframes stamp { from { transform: scale(3) rotate(-20deg); opacity: 0; } }
.splash-total { margin: 0; font: 700 12px var(--pixel); letter-spacing: .12em; color: var(--muted); }
.stamp { font-size: clamp(13px, 2vw, 17px); padding: 4px 10px; }
@media (max-width: 560px) {
  .splash { top: 54px; }
  .splash-inner { flex-direction: column; align-items: stretch; gap: 6px; text-align: center; }
  .splash-info { align-items: center; }
  .splash-meters { text-align: center; }
}
.splash-total b { color: var(--cream); }

.flash { position: fixed; inset: 0; z-index: 7; pointer-events: none; background: var(--flash, #fff); opacity: 0; }
.flash.go { animation: flash .5s ease-out; }
@keyframes flash { from { opacity: .75; } }
.shake { animation: shake-screen .5s steps(2) 2; }
@keyframes shake-screen { 25% { transform: translate(-8px, 4px); } 50% { transform: translate(7px, -5px); } 75% { transform: translate(-5px, -3px); } }

@media (prefers-reduced-motion: reduce) {
  .splash-inner { animation: splash-out .3s ease-in 2.6s forwards; }
  .flash.go, .shake, .stamp { animation: none; }
}

/* ---------- intro: house rules ---------- */
.intro { width: 100%; max-width: 900px; margin-top: 3vh; text-align: center; }
.intro-eyebrow { color: #1f5d8c; }
.intro-title {
  margin: 8px 0 22px; font: 400 clamp(24px, 5vw, 44px)/1.1 var(--pixel); color: var(--gold);
  text-shadow: -3px 0 var(--brown), 3px 0 var(--brown), 0 -3px var(--brown), 0 3px var(--brown), 5px 5px 0 var(--brown);
  animation: enter .4s ease both;
}
.intro-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.intro-card { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: slam .5s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: var(--d, 0s); }
@keyframes slam { from { transform: scale(2.2) rotate(-6deg); opacity: 0; } }
.intro-icon { height: 72px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.intro-icon.bones span { font-size: 44px; animation: hop .7s ease-in-out infinite alternate; }
.intro-icon.bones span:nth-child(2) { animation-delay: .15s; }
.intro-icon.bones span:nth-child(3) { animation-delay: .3s; }
@keyframes hop { from { transform: translateY(6px) rotate(-12deg); } to { transform: translateY(-10px) rotate(12deg); } }
.intro-icon.bonk { gap: 0; }
.intro-icon.bonk canvas { width: 88px; height: 64px; image-rendering: pixelated; }
#intro-dog-a { animation: bonk-a 1.1s ease-in-out infinite; }
#intro-dog-b { transform: scaleX(-1); animation: bonk-b 1.1s ease-in-out infinite; }
@keyframes bonk-a { 0%, 100% { transform: translateX(-10px); } 45%, 55% { transform: translateX(8px); } }
@keyframes bonk-b { 0%, 100% { transform: scaleX(-1) translateX(-10px); } 45%, 55% { transform: scaleX(-1) translateX(8px); } }
.bonk-star { font-size: 30px; color: var(--pink); animation: pop-star 1.1s ease-in-out infinite; }
@keyframes pop-star { 0%, 35%, 70%, 100% { transform: scale(0); } 50% { transform: scale(1.4) rotate(20deg); } }
.intro-big { margin: 0; font: 400 clamp(14px, 2.2vw, 18px)/1.3 var(--pixel); color: var(--gold); }
.intro-text { margin: 0; font-size: 18px; color: var(--cream); }
.intro-text .x2 { color: var(--gold); font-family: var(--pixel); font-size: 15px; }
.intro-text .half { color: var(--pink); }
.intro-count { margin: 24px 0 0; font: 400 14px var(--pixel); color: #1f5d8c; letter-spacing: .1em; }
.intro-count span { display: inline-block; color: var(--red); font-size: 22px; animation: pulse .5s ease-in-out infinite alternate; }

/* ---------- "you got a bone" flash at the start of a bone topic ---------- */
.bone-alert {
  position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 210, 63, .55), rgba(20, 18, 37, .55) 70%);
  animation: ba-fade 1.9s ease-in forwards;
}
@keyframes ba-fade { 0% { opacity: 0; } 12%, 75% { opacity: 1; } 100% { opacity: 0; } }
.bone-alert-inner {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 30px;
  background: rgba(20, 18, 37, .95); border: 4px solid var(--gold); box-shadow: 0 0 0 4px var(--night), 0 0 60px rgba(255, 210, 63, .7);
  animation: slam .45s cubic-bezier(.2, 1.6, .4, 1) both;
}
.ba-bone { font-size: 64px; animation: hop .4s ease-in-out infinite alternate; }
.ba-title { margin: 0; font: 400 clamp(20px, 4vw, 34px) var(--pixel); color: var(--gold); text-align: center; }
.ba-sub { margin: 0; font-size: 19px; color: var(--cream); }
.ba-sub b { color: var(--gold); }
.bone-hud.this-topic { color: var(--night); background: var(--gold); padding: 4px 8px; animation: pulse .6s ease-in-out infinite alternate; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10;
  padding: 12px 18px; background: var(--gold); color: var(--night);
  border: 3px solid var(--night); font: 700 13px var(--pixel); letter-spacing: .05em;
  box-shadow: 0 5px 0 var(--night); max-width: calc(100vw - 32px);
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .screen { padding-top: 58px; }
  .answer-form { flex-direction: column; }
  .answer-form .btn { padding: 12px; }
  .timer span { font-size: 26px; }
  .timer-bar i { width: 4px; height: 10px; }
  .mini-logo { font-size: 11px; }
  .r-panel .q-head { flex-direction: column-reverse; gap: 4px; }
  .home-corner { position: static; width: 100%; justify-content: center; margin-bottom: 8px; }
  .ranked-summary { grid-template-columns: 1fr; }
  /* compact one-line result rows, so the dig stays visible above them */
  .answers { grid-template-columns: 1fr; gap: 4px; }
  .answer-card { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-top-width: 2px; border-left: 5px solid var(--c, var(--line)); }
  .answer-card .who { flex: none; width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .answer-card .verdict-answer { flex: 1; min-width: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .answer-card .tier-label { flex: none; font-size: 9px; padding: 2px 5px; }
  .answer-card .points { font-size: 15px; }
  .answer-card .comment, .answer-card .badges, .card-stats .pop, .card-stats small { display: none; }
  .dog-grid { gap: 8px; }
  .dog-card { width: 112px; padding: 6px 4px 8px; }
  .dog-card canvas { width: 100px; height: 73px; }
  .dog-card .dname { font-size: 12px; }
  .choose-panel { grid-template-columns: 1fr; }
  .choose-panel .btn-big { width: 100%; }
}
