/* The look of the Cabeça de Bloco videos: Rubik, white heavy type with a drop shadow, dark
   rounded caption boxes, voxel grass, the EU gold of brasil-ue, and amazonas-peru's magenta. */

@font-face {
  font-family: "Rubik Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/fonts/rubik-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Rubik Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/fonts/rubik-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* A game screen in the Cabeça de Bloco look: chunky navy panels with a dark rim and a block's
   depth under them, gold buttons that press down, Rubik at its heaviest with a stroke, voxel
   grass around it all, and the videos' magenta for what's left over. */

:root {
  --ink: #ffffff;
  --shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 18px rgba(0, 0, 0, 0.35);
  --shadow-small: 0 2px 0 rgba(0, 0, 0, 0.35), 0 0 10px rgba(0, 0, 0, 0.3);
  --navy: #1d2540;
  --navy-2: #283257;
  --rim: #0b1020;
  --gold: #ffc61a;
  --gold-dark: #b58a00;
  --green: #009c3b;
  --grass: #4f8f33;
  --grass-2: #4a8a2f;
  --glow: #ff1fd2;
  --great: #22b35e;
  --good: #ffc61a;
  --ok: #ff9a2e;
  --low: #ff4d5e;
  --muted: rgba(255, 255, 255, 0.7);
  --radius: 20px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 600 16px/1.35 "Rubik Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--grass);
  /* Voxel grass, darkening towards the edges like a vignette. */
  background-image:
    radial-gradient(120% 80% at 50% 30%, transparent 40%, rgba(0, 20, 0, 0.45)),
    linear-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.07) 1px, transparent 1px),
    conic-gradient(var(--grass-2) 25%, var(--grass) 0 50%, var(--grass-2) 0 75%, var(--grass) 0);
  background-size: 100% 100%, 18px 18px, 18px 18px, 36px 36px;
  background-attachment: fixed, scroll, scroll, scroll;
  padding-bottom: env(safe-area-inset-bottom);
}
body.modal-open { overflow: hidden; }
#header, main, #footer { max-width: 520px; margin: 0 auto; padding: 0 12px; }
a { color: var(--gold); }

/* Buttons: blocks with their darker side underneath, that press down. */
button { font: inherit; cursor: pointer; border: 0; border-radius: 14px; padding: 10px 14px; background: var(--navy-2); color: var(--ink); font-weight: 800; box-shadow: 0 4px 0 var(--rim); transition: transform 0.06s, box-shadow 0.06s, filter 0.15s; -webkit-tap-highlight-color: transparent; }
button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--rim); }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
button.primary { background: linear-gradient(#ffd84d, var(--gold) 55%); color: #2a1d00; box-shadow: 0 5px 0 var(--gold-dark), 0 8px 16px rgba(0, 0, 0, 0.3); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
button.primary:active:not(:disabled) { box-shadow: 0 2px 0 var(--gold-dark); }
button.primary:hover:not(:disabled) { filter: brightness(1.06); }
button.big { width: 100%; padding: 16px; font-size: 1.25rem; font-weight: 900; letter-spacing: 0.02em; text-transform: uppercase; border-radius: 18px; }
button.secondary { width: 100%; }
button.ghost { background: transparent; box-shadow: none; color: var(--ink); text-shadow: var(--shadow-small); }
button.ghost:active:not(:disabled) { transform: none; }
button.linklike { background: none; box-shadow: none; padding: 0; color: inherit; text-decoration: underline; font-size: inherit; font-weight: inherit; }
input[type="search"], input[type="email"], input[type="text"] {
  font: inherit; font-weight: 700; width: 100%; padding: 13px 16px; border: 3px solid var(--rim); border-radius: 16px; background: #fff; color: #17202a; box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.1);
}
input:focus { outline: none; border-color: var(--gold); }
.row { display: flex; gap: 8px; align-items: center; }
.row > input { flex: 1; }
.row > button { flex: none; }

/* A panel: navy, a dark rim, a block's depth. */
.panel, .dock, .result, .drops, .yesterday, .prose, .error {
  background: linear-gradient(var(--navy-2), var(--navy));
  border: 3px solid var(--rim);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--rim), 0 14px 30px rgba(0, 0, 0, 0.3);
}

/* Header: a slim bar, the brand on one side and the switches on the other. */
.bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 6px; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1; text-shadow: var(--shadow-small); }
.brand strong { font-size: 1.3rem; font-weight: 900; letter-spacing: -0.01em; -webkit-text-stroke: 1.5px var(--rim); paint-order: stroke fill; }
.brand span { font-size: 0.7rem; font-weight: 700; opacity: 0.9; margin-top: 2px; }

/* Settings: sound and language, behind ⚙. */
.settings { position: relative; flex: none; }
.settings summary { list-style: none; display: grid; place-items: center; width: 40px; height: 36px; border-radius: 10px; background: var(--navy); border: 2px solid var(--rim); box-shadow: 0 3px 0 var(--rim); font-size: 1.2rem; cursor: pointer; user-select: none; }
.settings summary::-webkit-details-marker { display: none; }
.settings[open] summary { background: var(--gold); color: #2a1d00; }
.settings .menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 190px; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--navy); border: 3px solid var(--rim); border-radius: 16px; box-shadow: 0 6px 0 var(--rim), 0 14px 30px rgba(0, 0, 0, 0.4); }
.settings .menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; text-align: left; font-size: 0.92rem; box-shadow: 0 3px 0 var(--rim); }
.langs { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 2px dashed rgba(255, 255, 255, 0.15); }
.langs button.on { background: var(--gold); color: #2a1d00; }

/* The stage: HUD, goal, board, dock. */
main#app { min-height: 100svh; }
.stage { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.hud { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; min-height: 58px; }
/* The logo: the emblem, then the name in the videos' heaviest type, gold with a navy rim. */
.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--gold); min-width: 0; }
.logo img { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 4px 0 var(--rim)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3)); }
/* The same block depth as the panels and buttons: under the rimmed name, a navy copy of it
   (rim and all) 5px lower, as their solid side, then the soft shadow on the ground. */
.logo-word { position: relative; isolation: isolate; font-size: 1.55rem; font-weight: 900; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; -webkit-text-stroke: 5px var(--rim); paint-order: stroke fill; }
.logo-word::before { content: attr(data-text); position: absolute; inset: 0; z-index: -1; transform: translateY(5px); color: var(--rim); text-shadow: 0 6px 12px rgba(0, 0, 0, 0.35); }
.logo-num { align-self: flex-start; margin-top: 2px; padding: 2px 7px; border-radius: 8px; background: var(--navy); border: 2px solid var(--rim); box-shadow: 0 3px 0 var(--rim), 0 6px 10px rgba(0, 0, 0, 0.25); color: var(--gold); font-size: 0.75rem; font-weight: 900; font-variant-numeric: tabular-nums; }
/* The attempts sit over the board's top corner, like a game's lives. */
.attempts { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; gap: 6px; }
.attempt { min-width: 52px; padding: 5px 8px; font-size: 0.82rem; font-weight: 900; border-radius: 10px; background: var(--navy); color: var(--muted); border: 2px solid var(--rim); box-shadow: 0 3px 0 var(--rim); font-variant-numeric: tabular-nums; }
.attempt:disabled { opacity: 1; }
.attempt.now { color: #fff; border-color: var(--gold); animation: glow 1.4s ease-in-out infinite; }
.attempt.great { background: var(--great); color: #fff; }
.attempt.good { background: var(--good); color: #2a1d00; }
.attempt.ok { background: var(--ok); color: #2a1d00; }
.attempt.low { background: var(--low); color: #fff; }
.attempt.on { outline: 3px solid #fff; outline-offset: 1px; }
@keyframes glow { 50% { box-shadow: 0 3px 0 var(--rim), 0 0 14px rgba(255, 198, 26, 0.7); } }

/* The goal: a gold ribbon with notched ends. */
.goal { position: relative; margin: 4px 14px 0; padding: 6px 22px 9px; text-align: center; background: linear-gradient(#ffd84d, var(--gold)); color: #2a1d00; border: 3px solid var(--rim); border-radius: 12px; box-shadow: 0 5px 0 var(--rim); line-height: 1.05; }
.goal::before, .goal::after { content: ""; position: absolute; top: 10px; width: 22px; height: 100%; background: var(--gold-dark); border: 3px solid var(--rim); z-index: -1; }
.goal::before { left: -16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.goal::after { right: -16px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
.goal small { display: block; font-size: 0.66rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.75; }
.goal span { font-size: 1.55rem; font-weight: 900; letter-spacing: -0.01em; }
.goal.skeleton { min-height: 58px; }

/* The arena: the board seen through a game window, the meter over its bottom edge. */
.arena { position: relative; height: clamp(300px, 52svh, 540px); width: 100%; margin: 4px auto 0; border: 3px solid var(--rim); border-radius: 24px; overflow: hidden; box-shadow: 0 6px 0 var(--rim), inset 0 0 0 3px rgba(255, 255, 255, 0.12), 0 14px 30px rgba(0, 0, 0, 0.35); background: #6aa845 linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)) top / 100% 46px no-repeat; }
/* Before play, a smaller board, so the title card and its button fit on a phone. */
.phase-ready .arena { height: clamp(240px, 40svh, 480px); }
/* The board starts under the attempts' strip, so the tray's label never hides under them. */
.board-slot { position: absolute; inset: 46px 0 0; display: grid; place-items: center; }
.board-slot > .board:not(.voxel) { width: min(88%, 380px); }
.board { position: relative; margin: 0 auto; width: min(100%, 380px); aspect-ratio: 1; }
.board.voxel { width: 100%; height: 100%; overflow: hidden; }
.board.voxel canvas { display: block; width: 100%; height: 100%; }
.vlabels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.vlabel { position: absolute; top: 0; left: 0; text-align: center; white-space: nowrap; line-height: 1.05; text-shadow: var(--shadow); color: #fff; -webkit-text-stroke: 1px rgba(11, 16, 32, 0.6); paint-order: stroke fill; }
.vlabel-name { font-weight: 800; font-size: 0.95rem; }
.vlabel-value { font-weight: 900; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.vlabel.bad .vlabel-name, .vlabel.bad .vlabel-value { color: #ffd1d6; }
.vlabel.target-label .vlabel-name { font-size: 1.05rem; }

.meter { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 8px; border-radius: 16px; background: rgba(11, 16, 32, 0.78); border: 2px solid var(--rim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: none; --tone: #9aa6c4; }
.meter.great { --tone: var(--great); } .meter.good { --tone: var(--good); } .meter.ok { --tone: var(--ok); } .meter.low { --tone: var(--low); }
.meter-track { position: relative; flex: 1; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.35); overflow: hidden; }
/* The fill, in blocks like the tray's. */
.meter-fill { height: 100%; background: linear-gradient(rgba(255, 255, 255, 0.35), transparent 55%), repeating-linear-gradient(90deg, transparent 0 9px, rgba(0, 0, 0, 0.18) 9px 10px), var(--tone); transition: width 0.25s ease-out, background-color 0.3s; }
.meter-mark { position: absolute; top: 0; bottom: 0; left: 90%; width: 2px; background: rgba(255, 255, 255, 0.5); }
.meter-text { display: flex; flex-direction: column; align-items: flex-end; min-width: 76px; line-height: 1.05; }
.meter-text b { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; text-shadow: var(--shadow-small); }
.meter-text span { font-size: 0.68rem; font-weight: 800; color: #ffa8ec; white-space: nowrap; }

/* The flat board's own fx. */
.target-bg { fill: #e9dcb8; }
.target-edge { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.target rect { transform-box: fill-box; }
.target { width: 100%; height: 100%; overflow: visible; }
.fx { position: absolute; inset: 0; pointer-events: none; }
.falling { position: absolute; left: 50%; top: 20%; width: 34%; height: 34%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25)); }
.float { position: absolute; left: 50%; top: 42%; font-weight: 900; padding: 4px 12px; border-radius: 12px; white-space: nowrap; font-size: 1.05rem; background: rgba(11, 16, 32, 0.8); text-shadow: var(--shadow-small); }
.float.bad { color: #ffd1d6; }

/* The dock under the board. */
.dock { display: flex; flex-direction: column; gap: 10px; padding: 14px; transition: opacity 0.2s; }
.dock.waiting { opacity: 0.55; pointer-events: none; }
.dock-head { display: flex; justify-content: space-between; align-items: baseline; }
.attempt-label { font-size: 0.85rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); }
.tray-label { font-size: 0.85rem; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.picker { display: flex; flex-direction: column; gap: 10px; }
.howto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.howto li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 0.8rem; font-weight: 800; line-height: 1.2; padding: 8px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); }
.howto .step { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--rim); font-size: 1.3rem; }
.hint { margin: 0; font-size: 0.82rem; color: var(--muted); text-align: center; }
.hint.small { font-size: 0.75rem; margin-top: -4px; }
button.play { font-size: 1.5rem; padding: 18px; animation: breathe 1.8s ease-in-out infinite; }
button.drop.armed:not(:disabled) { animation: breathe 1.8s ease-in-out infinite; }
/* A glow, not a scale: the button stays put under a finger. */
@keyframes breathe { 50% { box-shadow: 0 5px 0 var(--gold-dark), 0 0 0 5px rgba(255, 216, 77, 0.45), 0 8px 24px rgba(255, 198, 26, 0.45); } }

/* Search: results pop over the hand. */
.search-box { position: relative; }
.search-box input { padding-left: 42px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317202a' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6.5'/%3E%3Cpath d='M15 15l5 5'/%3E%3C/svg%3E") no-repeat 14px center / 18px; }
.results { list-style: none; margin: 6px 0 0; padding: 4px; background: #fff; border: 3px solid var(--rim); border-radius: 16px; box-shadow: 0 6px 0 var(--rim), 0 16px 30px rgba(0, 0, 0, 0.4); position: absolute; left: 0; right: 0; z-index: 5; overflow: hidden; color: #17202a; }
.results:empty { display: none; }
.results li.none { padding: 12px 14px; color: #5d6d7e; }
.hit { display: flex; align-items: center; gap: 10px; width: 100%; background: #fff; color: #17202a; box-shadow: none; border-radius: 10px; text-align: left; padding: 7px 10px; font-weight: 800; }
.hit:hover:not(:disabled), .hit:focus-visible { background: #fff3c4; }
.hit:active:not(:disabled) { transform: scale(0.98); box-shadow: none; }
/* Voxel icons: blocks in the piece's colour, the edge a shade darker (as the silhouettes). */
.icon { width: 36px; height: 36px; flex: none; --c: #3fa34d; }
.icon .b { fill: var(--c); }
.icon .e { fill: var(--c); filter: brightness(0.72); }
.hit:disabled .icon { --c: #b9c2cb; }
.name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind { font-size: 0.72rem; color: #5d6d7e; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* The hand: the pieces as cards, in the order they'll fall. */
.hand { list-style: none; margin: 0 -14px; padding: 12px 18px 12px; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.hand::-webkit-scrollbar { display: none; }
.card { position: relative; flex: none; width: 86px; scroll-snap-align: start; --c: #3fa34d; }
.card-face { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border-radius: 16px; background: #fff; color: #17202a; border: 3px solid var(--rim); box-shadow: 0 4px 0 var(--rim), inset 0 -6px 0 color-mix(in srgb, var(--c) 30%, transparent); }
.card-face .icon { width: 46px; height: 46px; }
.card-face .name { width: 100%; text-align: center; font-size: 0.74rem; font-weight: 800; }
.card .order { position: absolute; top: -8px; left: -6px; width: 26px; height: 26px; border-radius: 9px; background: var(--gold); color: #2a1d00; font-size: 0.85rem; display: grid; place-items: center; font-weight: 900; border: 2px solid var(--rim); }
.card-x { position: absolute; top: -8px; right: -6px; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--low); color: #fff; font-size: 1.1rem; line-height: 1; border: 2px solid var(--rim); box-shadow: none; }
.card.sel .card-face { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 10px 0 var(--rim), 0 0 0 3px var(--gold); }
.card-move { display: flex; justify-content: space-between; gap: 4px; margin-top: 2px; }
.card-move button { flex: 1; padding: 4px 0; font-size: 0.8rem; border-radius: 10px; box-shadow: 0 3px 0 var(--rim); }
.card.add .card-face { background: transparent; color: var(--muted); border: 3px dashed rgba(255, 255, 255, 0.35); box-shadow: none; justify-content: center; min-height: 104px; }
.card.add .plus { font-size: 2rem; line-height: 1; font-weight: 900; }
.card.new { animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.6, 1); }
@keyframes pop { from { transform: scale(0.4) translateY(20px); opacity: 0; } }
.empty-hand { margin: 0; color: var(--muted); font-size: 0.9rem; padding: 14px; border: 3px dashed rgba(255, 255, 255, 0.25); border-radius: 16px; text-align: center; }

/* An attempt's tally: each piece, ticking in. */
.drops { list-style: none; margin: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; box-shadow: none; background: rgba(0, 0, 0, 0.18); border-width: 2px; }
.dock .drops li { animation: slidein 0.3s backwards; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes slidein { from { opacity: 0; transform: translateX(-12px); } }
.drops li { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 700; }
.drops .icon { width: 24px; height: 24px; }
.drops .area { font-variant-numeric: tabular-nums; font-weight: 900; }
.drops .bounced { color: #ffb3bb; }
.drops .bounced .name { text-decoration: line-through; }
.drops .mark { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; font-size: 0.8rem; font-weight: 900; background: var(--great); color: #fff; }
.drops .bounced .mark { background: var(--low); }
.drops .total { flex-wrap: wrap; border-top: 2px dashed rgba(255, 255, 255, 0.2); margin-top: 6px; padding-top: 8px; font-weight: 900; color: var(--gold); }
.drops .total .name { flex-basis: 100%; white-space: normal; }
.summary { display: flex; align-items: center; gap: 12px; }
.summary-pct { font-size: 1.8rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.summary-pct small { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.summary .stars { font-size: 1.5rem; flex: 1; justify-content: center; }
.error { color: #fff; background: #b3263a; padding: 10px; text-align: center; font-weight: 800; }
.loading, .empty { text-align: center; padding: 40px 0; text-shadow: var(--shadow-small); font-weight: 800; }

/* The result: a level-complete card over everything. */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: start center; overflow-y: auto; padding: max(24px, env(safe-area-inset-top)) 14px 40px; background: radial-gradient(circle at 50% 30%, rgba(40, 50, 90, 0.75), rgba(5, 8, 18, 0.88)); }
.overlay[hidden] { display: none; }
.result { position: relative; width: 100%; max-width: 440px; padding: 22px 18px 18px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.result.enter { animation: rise 0.45s cubic-bezier(0.2, 1.3, 0.5, 1); }
@keyframes rise { from { transform: translateY(40px) scale(0.9); opacity: 0; } }
.result-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 0; font-size: 1.4rem; line-height: 1; border-radius: 12px; }
.kicker { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 900; color: var(--gold); }
.stars { display: flex; justify-content: center; gap: 6px; font-size: 3.2rem; line-height: 1; }
.star { color: rgba(255, 255, 255, 0.15); -webkit-text-stroke: 3px var(--rim); paint-order: stroke fill; }
.star.on { color: var(--gold); filter: drop-shadow(0 4px 0 var(--gold-dark)); }
.stars .star:nth-child(2) { transform: translateY(-10px) scale(1.15); }
.stars.pop .star.on { animation: starpop 0.5s cubic-bezier(0.3, 1.8, 0.5, 1) backwards; animation-delay: calc(0.3s + var(--i) * 0.22s); }
@keyframes starpop { from { transform: scale(0) rotate(-40deg); } }
.summary .stars .star:nth-child(2) { transform: none; }
.verdict { margin: 2px 0 0; font-size: 1.5rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; -webkit-text-stroke: 1.5px var(--rim); paint-order: stroke fill; text-shadow: 0 3px 0 var(--rim); }
.big-pct { font-size: 4.2rem; font-weight: 900; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; -webkit-text-stroke: 4px var(--rim); paint-order: stroke fill; text-shadow: 0 6px 0 var(--rim); }
.big-pct.great { color: #7dffb0; } .big-pct.good { color: var(--gold); } .big-pct.ok { color: #ffc27d; } .big-pct.low { color: #ff9aa5; }
.sub { margin: -4px 0 0; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.22); }
.stat b { font-size: 1.1rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat small { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; }
.share-line { font: 800 0.95rem/1.4 "Rubik Variable", system-ui, sans-serif; background: rgba(0, 0, 0, 0.25); border: 2px dashed rgba(255, 255, 255, 0.2); border-radius: 12px; padding: 10px; margin: 0; white-space: pre-wrap; }
.share { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.share-btn { font-weight: 900; }
.share-btn.wa { background: #25d366; color: #fff; box-shadow: 0 4px 0 #128c4a; }
.share-btn.x { background: #000; color: #fff; }
/* The countdown to the next puzzle: a game's timer, in blocks. */
.countdown { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 16px; background: rgba(0, 0, 0, 0.22); }
.cd-label { font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.cd-clock { display: flex; align-items: flex-start; gap: 4px; }
.cd-clock i { font-style: normal; font-size: 1.6rem; font-weight: 900; line-height: 46px; color: var(--gold); animation: blink 1s steps(2, start) infinite; }
.cd-block { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cd-block b { min-width: 54px; padding: 4px 6px; border-radius: 12px; background: var(--rim); border: 2px solid rgba(255, 255, 255, 0.08); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45), inset 0 -4px 0 rgba(255, 255, 255, 0.05); color: var(--gold); font-size: 1.9rem; font-weight: 900; line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; }
.cd-block small { font-size: 0.65rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.countdown.ready { gap: 10px; }
.countdown.ready small { font-size: 1rem; font-weight: 900; color: #fff; }
@keyframes blink { to { visibility: hidden; } }
.leaderboard table { width: 100%; border-collapse: collapse; font-size: 0.9rem; text-align: left; }
.leaderboard td { padding: 7px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); font-weight: 700; }
.leaderboard td:first-child { width: 30px; text-align: center; }
.leaderboard tr.me { background: rgba(255, 198, 26, 0.22); font-weight: 900; }
.name-form { display: flex; gap: 6px; margin-bottom: 8px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: var(--s); height: var(--s); animation: fall var(--t) cubic-bezier(0.3, 0.4, 0.6, 1) var(--d) both; }
@keyframes fall { to { transform: translateY(105vh) rotate(var(--r)); } }

/* Under the stage. */
.yesterday { margin: 14px 0; padding: 12px 14px; }
.yesterday summary { cursor: pointer; font-weight: 900; }
.yesterday .drops { background: none; border: 0; padding: 8px 0 0; }

/* Footer */
#footer { margin-top: 28px; padding-bottom: 120px; font-size: 0.9rem; }
.whatsapp { display: block; text-align: center; padding: 14px; border-radius: 18px; background: #128c4a; color: #fff; text-decoration: none; font-weight: 900; border: 3px solid var(--rim); box-shadow: 0 6px 0 var(--rim); text-shadow: var(--shadow-small); }
.links { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0 6px; text-shadow: var(--shadow-small); font-weight: 800; }
.links a, .links button { color: #fff; }
.by { margin: 0; font-size: 0.8rem; font-weight: 700; text-shadow: var(--shadow-small); }

/* Consent */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 520px; margin: 0 auto; background: var(--navy); border: 3px solid var(--rim); border-radius: var(--radius); padding: 14px; z-index: 50; box-shadow: 0 6px 0 var(--rim), 0 10px 30px rgba(0, 0, 0, 0.4); font-size: 0.9rem; }
.consent p { margin: 0 0 10px; }
.consent .row { justify-content: flex-end; }

/* Static pages */
.prose { line-height: 1.6; padding: 4px 18px 14px; }
.prose h1 { font-weight: 900; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .confetti { display: none; }
}
