/* PixelPyro Shells · spelprototype. Maten en animaties uit ronde 15. */
:root {
  --bg: #060914; --panel: #11182E; --line: #232E55; --ink: #EEF1FA; --muted: #98A2C0;
  --gold: #FFD43B;
  /* UX review V20: three corner radii (pixel parts 4px, cards 10px, panels 20px) and pills */
  --r-pixel: 4px; --r-card: 10px; --r-panel: 20px; --cream: #F1E2C0; --inkdark: #2B1B12;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Inter, system-ui, sans-serif; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: #8FB4FF; text-decoration: underline; cursor: pointer; }

/* kop */
.top { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.top h1 { font: 400 22px Rye, serif; margin: 0; letter-spacing: 1px; }
.top h1 span { color: var(--gold); }
/* header (UX ronde 2): big logo left, one menu right with the views and the game settings */
.top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.top .brand { display: flex; align-items: center; margin: 0; line-height: 0; }
.top .brand img { height: 56px; width: auto; display: block; }
.top > .menu-btn { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; display: grid; place-items: center; } /* SVG icons, truly centred (the ☰ glyph sat off-centre) */
.top > .menu { top: calc(100% - 4px); right: 16px; }
.menu .tabs { display: grid; gap: 2px; }
.menu .tabs button { all: unset; box-sizing: border-box; display: block; padding: 9px 12px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.menu .tabs button:hover { background: #18214A; }
.menu .tabs button[aria-pressed="true"] { color: var(--gold); background: #18214A; border: 0; }
.menu .msw > span { white-space: nowrap; }
.menu .adv { font-size: 10.5px; font-weight: 700; color: var(--gold); border: 1px solid rgba(255,212,59,.5); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.menu > div > button small, .menu #gameMenu button small { display: inline; margin-left: 4px; color: var(--muted); }
@media (max-width: 480px) { .top { padding: 8px 14px; } .top .brand img { height: 48px; } }
.tabs { display: flex; gap: 6px; }
.tabs button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rm { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }

main { max-width: 1280px; margin: 0 auto; padding: 24px 16px 24px; }
.play { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.explain { flex: 1; min-width: 260px; max-width: 520px; }
.explain h2 { margin-top: 0; font-size: 17px; }

/* telefoon */
.phone { position: relative; width: 360px; max-width: 100%; background: linear-gradient(#0B1230, #060914 70%); border-radius: var(--r-panel); padding: 16px 14px 18px; border: 2px solid #2B3766; overflow: clip; }
.fx.shake, .sky.shake { animation: shake .4s; }
.fx, .sky { will-change: transform; } /* own layers: the shake and the gliding city do not repaint the game */
@keyframes shake { 20% { transform: translate(-3px, 2px); } 40% { transform: translate(3px, -2px); } 60% { transform: translate(-2px, 1px); } 80% { transform: translate(1px, -1px); } }
.lbl { position: relative; z-index: 5; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; text-shadow: 0 1px 2px #060914, 0 0 10px #060914; }
/* compact sky with a low pixel skyline (UX review V2); the fireworks canvas (.fx) still runs from the top of the phone */
/* the night city from the show (city37, 20 districts, seamless), slowly gliding past like the show camera (UX ronde 4) */
.sky { position: relative; height: 172px; margin: 0 -14px; background: #03040a url("../assets/show/city-night.png") 0 100% / auto 202px repeat-x; image-rendering: pixelated; }
@media (max-width: 480px) { .sky { height: 150px; } }
.fx { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 4; pointer-events: none; }
.banner { position: absolute; inset: 0; display: grid; place-items: center; font: 32px Rye, serif; color: var(--gold); text-shadow: 0 2px 0 #5E4700, 0 0 18px rgba(255,212,59,.6); opacity: 0; transform: scale(.6); transition: opacity .35s, transform .35s cubic-bezier(.2,1.6,.4,1); pointer-events: none; z-index: 6; }
.banner.on { opacity: 1; transform: scale(1); }

/* rek, plank, buis */
.bench { display: flex; align-items: flex-end; gap: 6px; position: relative; z-index: 2; }
.rack { flex: 1; display: grid; grid-template-columns: 1fr 7px repeat(5, 1fr); gap: 2px; align-items: end; }
/* Bonus game (test rule 18 Oct): one kind of box, 25 in a grid; opening pops the lid, the box shrinks away and the
   prize behind it jumps forward. After the last pick the other boxes open one by one, dimmed. */
#phone:has(.finale:not([hidden])) :is(.bench, .plank, .sct, .score, .actions, #fill) { display: none; }
#phone:has(.finale:not([hidden])) .sky { display: none; } /* the Bonus game always fits on screen (UX ronde 4) */
.finale { margin-top: 8px; }
.finale h3 { margin: 0; font: 26px Rye, serif; color: var(--gold); text-align: center; text-shadow: 0 2px 0 #5E4700; }
.finale .sub { margin: 4px 0 10px; text-align: center; font-size: 13px; color: var(--muted); min-height: 2.6em; }
.fgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fbox { --d: 0s; position: relative; min-width: 0; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; }
.fbox:disabled { cursor: default; }
.fbox .bx { position: absolute; inset: 14% 12% 10%; }
.fbox .lid, .fbox .body { position: absolute; left: 0; right: 0; }
.fbox .lid { top: 0; height: 24%; left: -5%; right: -5%; z-index: 2; border-radius: 3px; background: #C9965A; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.fbox .body { top: 21%; bottom: 0; border-radius: 0 0 4px 4px; background: #A9773F; box-shadow: 0 4px 0 #5A3B1A; display: grid; place-items: center; font: 800 1.15em/1 Inter, system-ui, sans-serif; font-style: normal; color: rgba(255,240,210,.7); }
.fbox:not(:disabled):hover .bx { transform: translateY(-2px); transition: transform .15s; }
.fbox:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.fbox .pz { position: absolute; inset: 0; display: grid; place-items: center; font: 800 1.4em/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--gold); text-shadow: 0 0 12px rgba(255,212,59,.45); opacity: 0; transform: scale(.2); pointer-events: none; }
.fbox.open .lid, .fbox.open .body { opacity: 0; }
.fbox.open::before { content: ""; position: absolute; inset: 62% 14% 10%; border-radius: 50%; background: radial-gradient(rgba(255,212,59,.14), transparent 70%); }
.fbox.open.zero::before, .fbox.rest::before { background: radial-gradient(rgba(255,255,255,.07), transparent 70%); }
.fbox.open .pz { opacity: 1; transform: none; }
.fbox.zero .pz { color: var(--muted); text-shadow: none; font-size: 1.2em; }
.fbox.big .pz { font-size: 1.85em; text-shadow: 0 0 18px rgba(255,212,59,.9); }
.fbox.open:not(.rest) { border-radius: 10px; box-shadow: inset 0 0 0 1.5px rgba(255,212,59,.55); background: rgba(255,212,59,.07); }
.fbox.open.zero:not(.rest) { box-shadow: inset 0 0 0 1.5px rgba(152,162,192,.45); background: rgba(255,255,255,.03); }
.fbox.rest .pz { opacity: .45; }
.fbox.rest.big .pz, .fbox.rest.win .pz { opacity: .6; }
/* the opening animation */
.fbox.pop .bx { animation: fwobble .32s ease-in-out var(--d) both; }
.fbox.pop .lid { animation: flid .6s cubic-bezier(.3,.7,.4,1) calc(var(--d) + .28s) both; }
.fbox.pop .body { animation: fbody .45s ease-in calc(var(--d) + .32s) both; }
.fbox.pop .pz { animation: fprize .55s cubic-bezier(.2,1.6,.4,1) calc(var(--d) + .5s) both; }
.fbox.pop.rest .pz { animation-name: fprize-dim; }
.fbox.pop.big::after { content: ""; position: absolute; inset: 15%; border-radius: 50%; border: 3px solid var(--gold); opacity: 0; animation: fring .8s ease-out calc(var(--d) + .55s); }
.fbox.pop.zero::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(rgba(160,170,200,.55), transparent 70%); opacity: 0; animation: fpuff .7s ease-out calc(var(--d) + .4s); }
@keyframes fwobble { 0%, 100% { transform: none; } 25% { transform: rotate(-6deg) scale(1.04); } 60% { transform: rotate(5deg) scale(1.04); } }
@keyframes flid { 0% { transform: none; opacity: 1; } 35% { transform: translateY(-14px) rotate(-10deg); opacity: 1; } 100% { transform: translate(-18px, -46px) rotate(-55deg); opacity: 0; } }
@keyframes fbody { 0% { transform: none; opacity: 1; } 30% { transform: scale(1.08, .9); opacity: 1; } 100% { transform: scale(.15) translateY(40%); opacity: 0; } }
@keyframes fprize { 0% { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.3); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes fprize-dim { 0% { transform: scale(.4); opacity: 0; } 100% { transform: none; opacity: .5; } }
@keyframes fring { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes fpuff { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.6) translateY(-30%); opacity: 0; } }
/* last pick: the closed boxes breathe, the chosen box shakes with a drum roll before it opens */
.fgrid.last .fbox:not(.open) .bx { animation: fbreathe 1.4s ease-in-out infinite; }
.fbox.suspense .bx { animation: fshake .11s linear infinite; }
@keyframes fbreathe { 0%, 100% { transform: none; filter: none; } 50% { transform: translateY(-2px) scale(1.04); filter: drop-shadow(0 0 6px rgba(255,212,59,.55)); } }
@keyframes fshake { 0%, 100% { transform: none; } 25% { transform: translateX(-2px) rotate(-3deg); } 75% { transform: translateX(2px) rotate(3deg); } }
body.reduce .fbox .bx { animation: none !important; }
body.reduce .fbox *, body.reduce .fbox::after { animation: none !important; }
.fprizes { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 5px; margin: 0 0 12px; }
.fprizes .fpl { font-size: 12px; color: var(--muted); margin-right: 2px; }
.fpz { min-width: 30px; padding: 3px 7px; border-radius: 999px; border: 1.5px solid rgba(255,212,59,.45); color: rgba(255,212,59,.8); font: 800 13px/1 Inter, system-ui, sans-serif; text-align: center; }
.fpz.best { border-color: var(--gold); color: var(--gold); padding: 3px 10px; }
.fpz.got { background: var(--gold); border-color: var(--gold); color: #3A2A00; }
.fpz.new { animation: fgot .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes fgot { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: none; } }
body.reduce .fpz { animation: none; }
.fstat { display: flex; justify-content: space-between; gap: 8px; margin: 10px 0 0; font-size: 13px; }
.fstat b { color: var(--gold); }
.rv-line .rn.fin { color: var(--gold); }
.rv-bonus { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 3px; border-radius: 6px; background: #34449A; font: 800 13px Inter, system-ui, sans-serif; color: var(--gold); }
.rv-line .rv-empty { margin: 0 4px; white-space: nowrap; }
.wall { align-self: stretch; margin: 8px 0 4px; border-radius: 2px 2px 0 0; background: linear-gradient(90deg, #5E3A1A, #8F5F33 45%, #4E3016); box-shadow: 0 0 0 1px #2A1808; }
.slot { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; }
.slot img { width: 100%; height: auto; display: block; transform-origin: 47% 95%; }
.slot.locked { cursor: default; }
.slot.empty::after { content: "+"; position: absolute; inset: 14% 8% 4% 8%; display: grid; place-items: center; border: 1.5px dashed #6E7AA6; border-radius: 4px; color: #8C97BD; font-size: 18px; }
.slot.sel::before { content: ""; position: absolute; inset: -3px; border: 2px solid var(--gold); border-radius: 6px; }
.slot .lock { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); font-size: 10px; font-weight: 700; letter-spacing: .6px; color: var(--gold); text-transform: uppercase; }
.slot img { touch-action: none; user-select: none; -webkit-user-drag: none; }
/* stamps in the corner of a box, like the stamps on the results screen (UX ronde 7):
   not possible = a red-edged disc with ✕ and the box dimmed; the cracked code = a gold disc with ✓ */
.slot.warn::after, .slot.nothere::after, .rack.won .slot:not(.locked)::after { content: ""; position: absolute; right: -6%; bottom: 0; width: 42%; aspect-ratio: 1; background: center / contain no-repeat; pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.55)); }
.slot.warn::after { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10.4' fill='%232B1D24' stroke='%23E05A46' stroke-width='2'/><path d='M8.3 8.3l7.4 7.4M15.7 8.3l-7.4 7.4' stroke='%23F7D2C9' stroke-width='2.4' stroke-linecap='round'/></svg>"); }
.slot.warn img { opacity: .5; filter: grayscale(.4); }
/* UX ronde 9: amber ≠ = not on this slot (it may fit another); the box stays bright. Red ✕ = not in the code at all */
.slot.nothere::after { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10.4' fill='%232A2410' stroke='%23E3A823' stroke-width='2'/><path d='M7.6 10h8.8M7.6 14h8.8M14.4 6.9l-4.8 10.2' fill='none' stroke='%23FFE58A' stroke-width='2' stroke-linecap='round'/></svg>"); }
.rack.won .slot:not(.locked)::after { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10.4' fill='%23FFD43B' stroke='%235E4700' stroke-width='1.6'/><path d='M7.4 12.4l3.1 3.1 6.1-7' fill='none' stroke='%232B1B12' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
.slot.lifted img { opacity: .25; }
/* first time: arrow above slot 2 (24 okt) */
.slot .tap-hint { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); color: var(--gold); font-size: 15px; line-height: 1; pointer-events: none; animation: tapHint 1s ease-in-out infinite; text-shadow: 0 0 8px rgba(255,212,59,.6); }
@keyframes tapHint { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
.reduce .slot .tap-hint { animation: none; }
.slot.target::before { content: ""; position: absolute; inset: -3px; border: 2px dashed var(--gold); border-radius: 6px; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0,0,0,.6)); }
.drag-ghost img { width: 100%; height: auto; display: block; }
.slot.hop { animation: hop .52s cubic-bezier(.3,1.5,.5,1); }
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-10px) rotate(-3deg); } 70% { transform: rotate(2deg); } 100% { transform: none; } }
/* gerammel in rust, zoals in de GIF (besluit 3 okt): één keer per 3,6 s, verschoven per doos */
.slot.owned img { animation: rattle 3.6s infinite; }
@keyframes rattle {
  0%, 50%, 72.2%, 100% { transform: none; }
  52.8% { transform: rotate(1.6deg) translateY(-1px); }
  55.6% { transform: rotate(-2.2deg) translateY(-1.4px); }
  58.3% { transform: rotate(1.7deg) translateY(-1px); }
  61.1% { transform: rotate(-1deg) translateY(-.6px); }
  63.9% { transform: rotate(.6deg); }
  66.7% { transform: rotate(-.3deg); }
}
.tube { width: 34px; flex: none; }
.tube svg { width: 100%; height: auto; display: block; }
.tube.kick { animation: kick .25s; }
.tube.lit .tfuse { stroke: #141210; }
@keyframes kick { 40% { transform: translateY(3px) scaleY(.94); } }
.plank { height: 12px; margin: -3px -2px 0; border-radius: 3px; background: linear-gradient(#7A4E26, #4E3016); box-shadow: 0 3px 0 #2A1808; position: relative; }
.plank .fuse { position: absolute; left: 4px; right: 36px; top: 5px; height: 2px; background: repeating-linear-gradient(90deg, #D2B57E 0 4px, #7A5A2E 4px 7px); border-radius: 2px; }
.plank .ash { position: absolute; left: 4px; top: 4px; height: 4px; width: 0; background: #141210; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.plank .spark { position: absolute; top: 1px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(#fff, #FFD43B 45%, rgba(255,138,0,0) 70%); opacity: 0; box-shadow: 0 0 12px 4px rgba(255,190,60,.7); }
.crk { position: absolute; width: 3.5px; height: 3.5px; border-radius: 50%; background: #FFE7A0; box-shadow: 0 0 4px 1px #FFB13B; pointer-events: none; animation: crk .38s ease-out forwards; }
@keyframes crk { to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }

/* stempels en Sparks onder het rek (onthulling) */
.stamp { position: absolute; right: -6%; top: -8%; width: 46%; opacity: 0; transform: scale(2.4) rotate(-25deg); transition: transform .22s cubic-bezier(.3,1.5,.5,1), opacity .15s; z-index: 3; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); pointer-events: none; }
.stamp svg { width: 100%; height: auto; display: block; }
.stamp.on { opacity: 1; transform: rotate(-10deg); }
.sparkline { display: grid; grid-template-columns: 1fr 7px repeat(5, 1fr); gap: 2px; margin-right: 40px; margin-top: 8px; font-size: 12.5px; font-weight: 700; text-align: center; color: var(--gold); min-height: 18px; }
.sparkline span { opacity: 0; transition: opacity .3s; }
.sparkline span.on { opacity: 1; }
.sparkline span.dim { color: #6E7AA6; }

/* tellers */
.sct { font-size: 12px; font-weight: 600; color: var(--muted); margin: 16px 0 6px; display: flex; justify-content: space-between; gap: 8px; }
.score { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.sc { display: flex; align-items: center; gap: 8px; background: #111833; border: 1px solid var(--line); border-radius: 12px; padding: 8px 9px; transition: opacity .2s; }
.sc .bd { width: 34px; height: 34px; flex: none; }
.sc .bd svg { width: 100%; height: 100%; display: block; }
.sc b { font: 700 22px/1 Inter, sans-serif; display: block; }
.sc small { font-size: 11.5px; color: var(--muted); }
.sc.zero { opacity: .4; }
.sc.nil .bd { opacity: .45; } /* a played 0 keeps its contrast; only the badge dims (V19) */
.score.n4 { grid-template-columns: repeat(4, 1fr); gap: 4px; }
.score.n4 .sc { flex-direction: column; gap: 2px; padding: 6px 4px; text-align: center; }
.score.n4 .sc .bd { width: 28px; height: 28px; }
.score.n4 .sc b { font-size: 19px; }
.sc b.pop { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.35); } }

.btn { display: block; width: 100%; background: var(--gold); color: var(--inkdark); border: 0; font-weight: 700; padding: 12px; border-radius: 999px; cursor: pointer; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); margin-top: 8px; font-weight: 600; }

/* geschiedenis */
.hist { margin-top: 14px; display: grid; gap: 6px; }
.hist .h { display: flex; align-items: center; gap: 2px; width: 100%; padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; border-radius: 8px; cursor: pointer; }
.hist .h:hover { background: rgba(255,255,255,.04); }
.hist .h img { width: 30px; height: 30px; }
.hist .rn { font-size: 11px; color: var(--muted); width: 22px; }
.ms { margin-left: auto; display: flex; gap: 6px; font-size: 12px; font-weight: 700; color: #D7DCEA; }
.ms span { display: flex; align-items: center; gap: 2px; }
.ms svg { width: 13px; height: 13px; }

/* kiezer */
.sheet { position: fixed; bottom: 0; left: 0; width: 100%; max-height: min(64vh, 560px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; background: #0E1530; border: 1px solid #2B3766; border-bottom: 0; border-radius: 18px 18px 0 0; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); z-index: 40; box-shadow: 0 -12px 40px rgba(0,0,0,.6); transform: translateY(100%); transition: transform .22s cubic-bezier(.2,.8,.3,1); }
.sheet.open { transform: none; }
.sheet[hidden] { display: none; }
.scrim { position: fixed; inset: 0; z-index: 39; background: rgba(3,5,14,.45); }
.scrim[hidden] { display: none; }
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sh-x { width: 44px; height: 44px; margin: -6px -6px -6px 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.sh-x:hover { background: rgba(255,255,255,.06); color: var(--ink); }
body.reduce .sheet { transition: none; }
.sheet h3 { font-size: 14px; margin: 0 0 2px; }
.sheet .sub { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.pick { position: relative; border: 1px solid transparent; background: #111833; border-radius: 8px; padding: 2px 2px 3px; cursor: pointer; }
.pick img { width: 100%; height: auto; display: block; }
.pick .n { position: absolute; right: 3px; top: 2px; font-size: 10px; font-weight: 800; background: var(--gold); color: var(--inkdark); border-radius: 999px; padding: 0 5px; }
.pick .sp { display: block; min-height: 2.6em; line-height: 1.3; font-size: 11px; font-weight: 700; color: #FFD9A0; text-align: center; }
.pick .sp.no { color: #8C97BD; font-weight: 500; }
.pick[aria-pressed="true"] { border-color: var(--gold); }
.pick.no img { opacity: .28; filter: grayscale(.6); }
.pick.no::after { content: ""; position: absolute; right: 4px; top: 4px; width: 34%; aspect-ratio: 1; background: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10.4' fill='%232B1D24' stroke='%23E05A46' stroke-width='2'/><path d='M8.3 8.3l7.4 7.4M15.7 8.3l-7.4 7.4' stroke='%23F7D2C9' stroke-width='2.4' stroke-linecap='round'/></svg>"); filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.55)); } /* same stamp as on the Rack (UX ronde 7) */
.pick.no .sp { color: #D08578; font-weight: 600; }
.pick.nothere::after { content: ""; position: absolute; right: 4px; top: 4px; width: 34%; aspect-ratio: 1; background: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10.4' fill='%232A2410' stroke='%23E3A823' stroke-width='2'/><path d='M7.6 10h8.8M7.6 14h8.8M14.4 6.9l-4.8 10.2' fill='none' stroke='%23FFE58A' stroke-width='2' stroke-linecap='round'/></svg>"); filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.55)); }
.pick.nothere .sp { color: #B79A5E; }
.pick.nothere img { opacity: .6; } /* calmer than the red ✕ (.28): you can still pick it, it just doesn't fit this slot */
.pick.inrack::after { content: none; } /* a Shell already in the Rack needs no stamp in the picker */
.sheet .row { display: flex; gap: 8px; margin-top: 10px; }
.sheet .row button { flex: 1; padding: 8px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; }

/* onthulling */
.rv-title { font: 400 20px Rye, serif; color: var(--gold); text-align: center; margin: 6px 0 2px; }
.rv-sub { text-align: center; font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.rv-block { margin: 10px 0 16px; }
.rv-block h4 { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.earn { display: grid; gap: 6px; margin: 8px 0 14px; }
.earn .e { display: flex; align-items: center; gap: 10px; background: #111833; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.earn .e img { width: 42px; height: 42px; }
.earn .e .t { flex: 1; font-size: 13px; }
.earn .e .t small { display: block; color: var(--muted); font-size: 11.5px; }
.earn .e .plus { font-weight: 800; color: var(--gold); }
.earn .e.up { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.up-tag { display: inline-block; font-size: 10.5px; font-weight: 800; background: var(--gold); color: var(--inkdark); border-radius: 999px; padding: 0 6px; margin-left: 4px; }

/* collectie */
.coll-head h2 { margin: 0 0 4px; font: 400 26px Rye, serif; color: var(--gold); }
.coll { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@media (max-width: 900px) { .coll { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .coll { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: #0E1530; border: 1px solid var(--line); border-radius: var(--r-card); padding: 8px 10px 12px; text-align: center; }
.card img, .card video { width: 100%; height: auto; display: block; aspect-ratio: 1; object-fit: contain; border-radius: 8px; }
.card h3 { font-size: 13.5px; margin: 2px 0 4px; }
.card .meta { font-size: 12px; color: var(--muted); min-height: 18px; }
.card .act { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--gold); border: 1px solid rgba(255,212,59,.5); border-radius: 999px; padding: 3px 11px; text-decoration: none; }
.card.owned .act { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* Sparks-label (component uit src/components/sparks-label.js) wordt in app.js geïnjecteerd */

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

/* instellingen in de zijkolom */
.settings { background: #0E1530; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 20px; }
.settings h2 { margin: 0 0 8px; font-size: 15px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.seg button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--inkdark); border-color: var(--gold); font-weight: 700; }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.small { font-size: 12.5px; margin: 8px 0 0; }
code { background: #111833; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* account (UX ronde 8: compact, real data; see the block at the end) */
.acc { display: grid; gap: 18px; }
.acc h3 { font-size: 15px; margin: 0 0 8px; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; color: var(--muted); vertical-align: middle; margin-left: 4px; }
.tag.gift { color: #FF8A98; border-color: #8E0B20; }
.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mcard { background: #0E1530; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mcard video, .mcard img { width: 100%; aspect-ratio: 1; display: block; object-fit: contain; }
.mcard .info { padding: 8px 12px 12px; display: grid; gap: 4px; }
.mcard .info small { color: var(--muted); font-size: 12px; }
.bar { height: 6px; background: #1A2244; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); }
.plain { margin: 0; padding-left: 18px; }
.plain li { margin: 4px 0; font-size: 14px; }

/* spelserver (stap 1) */
.rows { display: flex; gap: 6px; margin: 6px 0 2px; }
.rows button { min-height: 32px; padding: 2px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; }
.rows button small { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.rows button[aria-pressed="true"] small { color: var(--inkdark); }
.rows button[aria-pressed="true"] { background: var(--gold); color: var(--inkdark); border-color: var(--gold); font-weight: 700; }
.srvmsg { margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: #5a1d1d; color: #ffd9d9; font-size: 13px; }
.login { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.login h3 { margin: 0; }
.lbl .link { font: inherit; color: var(--muted); text-decoration: underline; background: none; border: 0; cursor: pointer; padding: 0; }

/* collectie als type-overzicht (13 okt) */
.set-progress { grid-column: 1 / -1; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; display: grid; gap: 6px; }
.set-progress .bar { height: 8px; border-radius: 999px; background: #1a2340; overflow: hidden; }
.set-progress .bar i { display: block; height: 100%; background: var(--gold); }
.coll button.card { font: inherit; color: inherit; cursor: pointer; }
.coll .card .media { position: relative; }
.coll .card .count { position: absolute; right: 8px; top: 8px; background: var(--gold); color: var(--inkdark); font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.coll .card.missing { opacity: .6; }
.chip { margin-left: 8px; font: inherit; font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }

/* filters en bundel per type (13 okt) */
.filters { display: grid; gap: 6px; margin: 4px 0 12px; }
.filters.span { grid-column: 1 / -1; margin: 0; }
.filters > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filters .fl { font-size: 12px; color: var(--muted); width: 44px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--gold); color: var(--inkdark); border-color: var(--gold); font-weight: 700; }
.fchip .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.fchip.clear { justify-self: start; }
.mcard .media { position: relative; }
.mcard .count, .coll .card .count { position: absolute; right: 8px; top: 8px; background: var(--gold); color: var(--inkdark); font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.pager button { font: inherit; width: 32px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 16px; }
.pager span { font-size: 12px; color: var(--muted); }
.coll .card button.act { font: inherit; font-size: 12px; font-weight: 600; background: transparent; cursor: pointer; }


/* reeks en deelkaart (besluit 14 okt) */
.sct .streak { color: #F5C451; font-weight: 700; }
.share { display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--r-card); background: rgba(245, 196, 81, 0.08); border: 1px solid rgba(245, 196, 81, 0.35); margin-bottom: 4px; }
.share pre { margin: 0; font: 12px/1.35 ui-monospace, Menlo, monospace; white-space: pre; overflow-x: auto; color: inherit; }

/* testklok (alleen lokaal, 14 okt) */
.devbar { margin: 12px 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.devbar h2 { margin: 0 0 4px; font-size: 14px; }
.devbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.devbtns .btn { width: auto; padding: 8px 12px; font-size: 13px; }

/* Puzzelmodus en kladblok (14 okt) */
.pick.used img { opacity: .6; }
.pick.used .sp { color: var(--muted); font-weight: 600; }
.notes-wrap { overflow-x: auto; }
.notes { border-collapse: collapse; width: 100%; font-size: 11px; }
.notes th { font-weight: 600; color: var(--muted); padding: 2px; }
.notes td { padding: 2px; text-align: center; }
.notes .sw { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: middle; }
.notes .shp svg { width: 18px; height: 18px; color: var(--ink); vertical-align: middle; }
.notes .gap td { height: 6px; }
.nc { width: 100%; min-width: 30px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: #111833; color: var(--ink); cursor: pointer; font-weight: 800; font-size: 14px; }
.nc.m1 { background: #3A1A1A; color: #FF8A7A; border-color: #6B2B26; }
.nc.m2 { background: #16301F; color: #8FE3A8; border-color: #2B5E3B; }

/* uitleg */
.tut { position: absolute; inset: 0; z-index: 30; background: rgba(5, 8, 20, .82); display: flex; align-items: flex-start; justify-content: center; padding: 48px 12px 14px; overflow-y: auto; border-radius: inherit; }
.tut-card { position: relative; background: #0E1530; border: 1px solid #2B3766; border-radius: 16px; padding: 16px 16px 14px; max-width: 340px; width: 100%; font-size: 13.5px; line-height: 1.45; }
.tut-card h3 { font: 400 19px Rye, serif; color: var(--gold); margin: 2px 0 8px; }
.tut-card p { margin: 0 0 8px; }
.tut-n { font-size: 11px; color: var(--muted); }
.tut-x { position: absolute; right: 8px; top: 6px; border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.tut-badges { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 4px; }
.tut-badges li { display: flex; align-items: center; gap: 8px; }
.tut-badges svg { width: 22px; height: 22px; }
.tut-card p svg { width: 18px; height: 18px; vertical-align: -4px; margin: 0 3px; }
.tut-dots { display: flex; justify-content: center; gap: 5px; margin: 10px 0; }
.tut-dots span, .rv-dots button { width: 7px; height: 7px; border-radius: 50%; background: #2B3766; border: 0; padding: 0; }
.tut-dots span.on, .rv-dots button.on { background: var(--gold); }
.tut-nav { display: flex; gap: 8px; }
.tut-nav .btn { flex: 1; margin: 0; }

/* compact weekoverzicht */
.rv-sum { text-align: center; font-size: 13px; line-height: 1.5; margin: 2px 0 10px; }
.rv-sum .gold { color: var(--gold); }
.rv-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.rv-tabs button { flex: 1; padding: 6px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-weight: 600; }
.rv-tabs button[aria-selected="true"] { background: var(--gold); color: var(--inkdark); border-color: var(--gold); }
.up-dot { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 999px; background: #B23A2A; color: #fff; font-size: 10.5px; }
.rv-swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rv-swipe::-webkit-scrollbar { display: none; }
.rv-row { flex: 0 0 100%; scroll-snap-align: start; }
.rv-row h4 { margin: 0 0 6px; font-size: 13px; }
.rv-line { display: flex; align-items: center; gap: 2px; margin-bottom: 5px; }
.rv-line .rn { width: 34px; font-size: 11px; color: var(--muted); font-weight: 600; flex: none; }
.rv-line i { width: 4px; }
.rv-line .mb { position: relative; width: 34px; height: 34px; flex: none; }
.rv-line .mb img { width: 34px; height: 34px; display: block; }
.rv-line .st { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; animation: stampIn .35s both; }
.rv-line .st svg { width: 17px; height: 17px; display: block; }
@keyframes stampIn { from { transform: scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }
.reduce .rv-line .st { animation: none; }
.rv-sp { margin-left: auto; font-weight: 800; color: var(--gold); font-size: 12.5px; }
.rv-sp.dim { color: var(--muted); font-weight: 500; }
.rv-dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 2px; }
.rv-dots button { cursor: pointer; width: 9px; height: 9px; }
.rv-note { margin: 6px 0 10px; }
.earn .e.slim { padding: 3px 10px; gap: 8px; }
.earn .e.slim img { width: 28px; height: 28px; }
.earn .e.slim .t { font-size: 12.5px; }

/* menu (☰), 14 okt */
.lbl-r { display: inline-flex; align-items: center; gap: 8px; }
.menu-btn { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 8px; width: 30px; height: 26px; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.menu-btn[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }
.menu { position: absolute; right: 12px; top: 44px; z-index: 20; min-width: 230px; background: #0E1530; border: 1px solid #2B3766; border-radius: 12px; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.6); display: grid; gap: 2px; }
.menu[hidden] { display: none; }
.menu > button, .menu .msw, #gameMenu > button { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13.5px; }
.menu > button:hover, .menu .msw:hover, #gameMenu > button:hover { background: #18214A; }
.menu .msw input { margin: 0; accent-color: var(--gold); }
.menu .msw small { display: block; color: var(--muted); font-size: 11.5px; }
.rv-rowtabs { margin: 0 0 8px; }

/* inloggen (stap 2) */
.login .sub { margin: 2px 0 10px; }
.login .muted.small { margin: 4px 0 0; text-align: center; }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 8px; }
.login .or::before, .login .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lform { display: grid; gap: 6px; }
.lform label { font-size: 12.5px; color: var(--muted); }
.lform input { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0B1230; color: var(--ink); }
.lform input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.lform .link { justify-self: center; margin-top: 4px; }
.lmsg { font-size: 13px; margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(110, 200, 140, .12); }
.lmsg.err { background: rgba(178, 58, 42, .18); color: #FFB4A6; }
.btn.wait { opacity: .6; cursor: progress; }
.devlogin { margin-top: 16px; font-size: 13px; }
.devlogin summary { cursor: pointer; color: var(--muted); }
.devlogin .btn { margin-top: 6px; }
.menu .macc { font-size: 12px; color: var(--muted); padding: 6px 10px 4px; }
.menu .macc b { color: var(--ink); font-weight: 600; }
.menu > button small { display: block; color: var(--muted); font-size: 11.5px; }
.menu > button { flex-wrap: wrap; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; width: auto; }

/* wallets beheren (14 okt) */
.wl { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.wl li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #111833; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.wl code { font-size: 13px; margin-right: auto; }
.wl .tag { font-size: 11px; font-weight: 700; color: var(--inkdark); background: var(--gold); border-radius: 999px; padding: 2px 8px; }
.wl button { font: inherit; font-size: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.wl button.danger { color: #FFB4A6; border-color: #6B2B26; }
.sheet .row button:disabled { opacity: .5; cursor: default; }

/* om-en-om (testregel 15 okt): welke telling deze Launch geeft */
.sct .fbk { font-weight: 700; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; }
.sct .fbk.s { background: rgba(245, 196, 81, .18); color: var(--gold); }
.sct .fbk.f { background: rgba(160, 170, 210, .16); color: #C9D2F0; }
.sct .left { color: #FFD9A0; font-weight: 600; } /* alleen lokaal: nog X codes */
.finale .act-row { margin-top: 12px; }
/* a cracked Rack keeps its code, in gold (UX review V9) */
.rack.won .slot:not(.locked) img { filter: drop-shadow(0 0 7px rgba(255,212,59,.65)); }
.won-tag { color: var(--gold); font-weight: 700; }
#see { margin-top: 8px; }
/* a button you cannot press yet reads as a status, not as a dimmed gold button (UX review V7) */
.btn.todo:disabled { opacity: 1; background: transparent; color: var(--gold); border: 1.5px dashed rgba(255,212,59,.45); }
/* free player: what you play for (UX review V14) */
.freeplay { margin: 6px 0 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,212,59,.08); border: 1px solid rgba(255,212,59,.25); color: var(--cream); font-size: 12.5px; line-height: 1.4; }
/* picker legend (UX review V6) */
.sub.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
.sub.legend b { color: var(--ink); }
/* finished Bonus grid: every one of the 25 boxes keeps a cell, so the grid has no holes (UX review V16) */
.fbox.rest { border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(152,162,192,.22); background: rgba(255,255,255,.025); }
/* the main action stays in thumb reach at the bottom of the screen (UX review V3) */
.actions { position: sticky; bottom: 0; z-index: 5; margin: 0 -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(7,10,24,0), rgba(7,10,24,.96) 30%); }
/* V8: no empty counter tiles before the first Launch; the rhythm chip says what it means */
.score.idle { display: none; }
.score-empty { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #2B3766; border-radius: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.4; text-align: center; }
.fbk-l { color: var(--muted); }
/* V15: the newest Launch stands out in the history */
.hist .h.last { box-shadow: inset 2px 0 0 var(--gold); background: rgba(255,212,59,.05); padding-left: 4px; }
.hist .h.last .rn { color: var(--gold); font-weight: 700; }
/* V17: titles stay readable over the fireworks */
.rv-title, .rv-sum { position: relative; z-index: 5; text-shadow: 0 1px 2px #060914, 0 0 12px #060914, 0 0 24px #060914; }
.rv-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.rv-legend svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }
/* V11: one-time tips */
.tipcard { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-card); background: #13204A; border: 1px solid #34449A; font-size: 12.5px; line-height: 1.45; }
.tipcard svg { width: 15px; height: 15px; vertical-align: -3px; }
.tip-ok { flex: none; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gold); background: transparent; color: var(--gold); font-weight: 700; cursor: pointer; }
/* V13: the level ladder and progress per Shell in the results */
.ladder { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ladder b { color: var(--ink); }
.e .to-next { display: block; font-size: 11.5px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.notes .sw-n { display: block; font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 2px; }
/* V18: collection as a 5 × 5 grid, color × shape */
.cmx { display: grid; grid-template-columns: auto repeat(5, minmax(0, 76px)); gap: 6px; align-items: center; margin: 16px 0 8px; }
.cmx-h { font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: center; }
.cmx-r { text-align: right; padding-right: 4px; }
.cmx-c { position: relative; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: #0E1530; cursor: pointer; aspect-ratio: 1; }
.cmx-c:disabled { cursor: default; background: transparent; border-style: dashed; }
.cmx-c img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cmx-c .count { position: absolute; right: 2px; top: 2px; font-size: 11px; font-weight: 800; background: var(--gold); color: var(--inkdark); border-radius: 999px; padding: 0 5px; }
.cmx-c .wait { position: absolute; left: 2px; bottom: 2px; font-size: 11px; }
.cmx-c.owned:hover { border-color: var(--gold); }
@media (max-width: 480px) { .cmx { grid-template-columns: auto repeat(5, minmax(0, 1fr)); gap: 4px; } .cmx-h { font-size: 10.5px; } }
.coll-mx { max-width: 520px; }
/* picker: the Clear row stays in view at the bottom of the sheet */
.sheet .row { position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); background: #0E1530; padding: 10px 0 4px; margin-bottom: -4px; }
/* the rhythm chip never breaks over two lines */
.fbk { white-space: nowrap; }
/* focus ring that fits the theme (V19) */
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn:focus-visible { outline-offset: 3px; }
/* V9: the cracked code stands out in gold */
/* rows bar: Rack pills (or Launch N of 10) left, show and time left right (UX ronde 2) */
.rows-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.rows-bar .rows { margin: 0; gap: 4px; flex-wrap: wrap; }
.rows-bar .tl { white-space: nowrap; }
.rows-bar .rd { color: var(--ink); }
/* compact counters: one row of chips instead of big tiles (UX ronde 2) */
.score, .score.n4 { display: flex; gap: 6px; margin-bottom: 10px; }
.score .sc, .score.n4 .sc { flex: 1; flex-direction: row; justify-content: center; gap: 6px; padding: 5px 6px; border-radius: 999px; text-align: left; }
.score .sc .bd, .score.n4 .sc .bd { width: 20px; height: 20px; }
.score .sc > div { display: flex; align-items: baseline; gap: 4px; }
.score .sc b, .score.n4 .sc b { font-size: 16px; }
.score .sc small { font-size: 11px; }
.sct { margin: 10px 0 6px; }
#gameMenu { display: grid; gap: 2px; }
#gameMenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
/* desktop (UX ronde 2): use the width, the Launch history sits next to the playing field */
.hist-h { margin: 4px 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
@media (min-width: 960px) {
  .phone:has(> .hist) { width: 920px; padding: 22px 26px 24px; display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); column-gap: 40px; align-content: start; }
  .phone:has(> .hist) .sky { margin: 0 -8px; height: 202px; }
  .phone:has(> .hist) > * { grid-column: 1; }
  .phone:has(> .hist) > .hist { grid-column: 2; grid-row: 1 / span 40; margin-top: 0; align-self: start; padding-top: 4px; }
}
/* responsive header (UX ronde 2): on a phone one ☰ menu with everything; from 860px the views sit in the header
   and the button only holds the game settings (⚙) */
.tabs-inline, .ic-d { display: none; }
@media (min-width: 860px) {
  .top { justify-content: flex-start; gap: 28px; padding: 12px 28px; }
  .top .brand img { height: 64px; }
  .tabs-inline { display: flex; gap: 6px; margin-left: auto; }
  .tabs-inline button { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; cursor: pointer; }
  .tabs-inline button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .menu .tabs { display: none; }
  .menu #gameMenu > hr:first-child { display: none; }
  .ic-m { display: none; }
  .ic-d { display: block; }
}
/* collection: bigger on desktop (UX ronde 2) */
@media (min-width: 860px) {
  .coll-mx { max-width: 820px; }
  .cmx { grid-template-columns: auto repeat(5, minmax(0, 132px)); gap: 12px; }
  .cmx-h { font-size: 13px; }
  .cmx-c { padding: 10px; border-radius: 14px; }
}
@media (min-width: 860px) { .top:has(#gameMenu:empty) > .menu-btn { visibility: hidden; } }
@media (max-width: 480px) {
  .rows-bar .tl-show { display: none; }
  .rows-bar .rows { flex-wrap: nowrap; }
  .rows-bar .rows button { padding: 2px 9px; font-size: 12.5px; }
  .rows-bar .rows button small { font-size: 10.5px; }
}
.rows button { white-space: nowrap; }
@media (max-width: 480px) {
  /* four counters on a phone: icon and number only (the icons carry the meaning, aria-labels stay) */
  .score.n4 .sc small { display: none; }
  .score.n4 { gap: 4px; }
}
/* QA 5: the header menu sits above the tutorial overlay */
.top { z-index: 60; }
.top > .menu { z-index: 61; }
/* ---------- UX ronde 3 ---------- */
/* phone: one frame instead of two, more room for the Rack (mobile 3) */
@media (max-width: 480px) {
  main { padding: 10px 0 12px; }
  .phone { border: 0; border-radius: 0; padding: 12px 12px 18px; }
  .sky, .actions { margin-left: -12px; margin-right: -12px; }
  .actions { padding-left: 12px; padding-right: 12px; }
}
/* history rows line up and fit at 360 px (mobile 2) */
.hist .h { padding-left: 8px; }
.hist .h.last { padding-left: 8px; }
.hist .ms { margin-left: auto; justify-content: flex-end; }
@media (max-width: 400px) { .hist .h img { width: 26px; height: 26px; } .hist .ms { gap: 5px; } }
.ladder .step { white-space: nowrap; }
/* tablet: one roomier column, centered (desktop 3, 4) */
@media (min-width: 600px) and (max-width: 959px) { .phone { width: min(600px, 100%); } }
.play { justify-content: center; }
/* the test panel only exists locally (desktop 1) */
body:not(.dev) .explain { display: none; }
/* desktop: one width for every Play view, roomy play column, history in a card (desktop 5, 7, 8) */
@media (min-width: 960px) {
  main { max-width: 1072px; }
  .top { padding-inline: max(28px, calc((100% - 1040px) / 2)); }
  .phone { width: 100%; max-width: 1040px; }
  .phone:has(> .hist) { width: 100%; max-width: 1040px; grid-template-columns: minmax(0, 540px) minmax(300px, 1fr); column-gap: 44px; }
  .phone:has(> .hist) > .hist { background: #0B1230; border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; }
  .phone:not(:has(> .hist)) > :not(.fx):not(.tut):not(.sheet):not(.scrim) { max-width: 600px; margin-inline: auto; }
  .actions { position: static; margin: 0; padding: 8px 0 0; background: none; }
  .phone:has(.finale:not([hidden])) > .hist { opacity: .45; }
  .tut-card { max-width: 420px; }
  .picker { grid-template-columns: repeat(5, minmax(0, 92px)); justify-content: center; gap: 8px; }
  .sheet { max-height: min(80vh, 640px); }
  .coll-mx, .coll-head { max-width: 820px; margin-inline: auto; }
  .cmx-c { padding: 4px; overflow: hidden; }
  .cmx-c img { transform: scale(1.18); }
}
.sct .res-cap { margin-left: auto; color: var(--muted); font-weight: 600; }
/* phone: a dark backdrop behind the open ☰ menu */
@media (max-width: 859px) { .top > .menu:not([hidden])::before { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(5,8,20,.55); } }
.menu .msw small.adv { display: inline-block; }
/* ---------- UX ronde 4 ---------- */
/* a row of a wide button and a small square icon button (share) */
.act-row { display: flex; gap: 8px; margin-top: 8px; }
.act-row > .btn { margin-top: 0; }
.act-row > .btn:not(.icon) { flex: 1; }
.act-row > .btn[hidden] { display: none; }
.btn.icon { flex: none; width: 52px; display: grid; place-items: center; padding: 0; }
.btn.icon.done { border-color: var(--gold); color: var(--gold); }
/* the Bonus game fits on the screen: the grid shrinks on short screens */
.fgrid { max-width: min(100%, calc(100svh - 360px)); margin-inline: auto; }
.finale .sub { min-height: 0; margin-bottom: 8px; }
/* picker: only the grid scrolls; the Clear button really stays put (UX ronde 4) */
.sheet:has(> .picker) { display: flex; flex-direction: column; overflow: hidden; }
.sheet > .picker { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 2px; }
.sheet:has(> .picker) > .row { position: static; flex: none; margin: 10px 0 0; padding: 0; background: none; }
/* phone: the pages next to the game keep their side margins; your Shells two per row (UX ronde 4) */
@media (max-width: 480px) {
  #view-collection, #view-account, #view-home { padding: 0 16px; }
}
/* Home (UX ronde 4) */
.top .brand a { display: block; line-height: 0; }
.home { max-width: 640px; margin: 0 auto; display: grid; gap: 20px; }
.home-hero { position: relative; height: 190px; border-radius: var(--r-panel); overflow: hidden; border: 1px solid #2B3766; }
.home-city { position: absolute; inset: 0; background: #03040a url("../assets/show/city-night.png") 0 100% / auto 202px repeat-x; image-rendering: pixelated; }
.home-show { position: absolute; left: 18px; top: 14px; }
.home-show h2 { margin: 0; font: 400 32px Rye, serif; color: var(--gold); text-shadow: 0 2px 0 #5E4700, 0 0 16px #03040a; }
.home-show p { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--ink); text-shadow: 0 1px 3px #03040a, 0 0 10px #03040a; }
.home-sec h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-size: 12.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.home-sec h3 small { font-size: 12.5px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.home-racks { display: grid; gap: 8px; }
.home-rack { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: var(--r-card); border: 1px solid var(--line); background: #0E1530; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.home-rack:hover { background: #13204A; }
.home-rack.hot { border-color: rgba(255,212,59,.45); }
.home-rack span { font-size: 13px; color: var(--muted); }
.home-rack em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.home-rack.done em { color: var(--muted); }
.home-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.home-stats div { padding: 10px 6px; border-radius: var(--r-card); border: 1px solid var(--line); background: #0E1530; text-align: center; }
.home-stats b { display: block; font-size: 18px; }
.home-stats small { font-size: 11.5px; color: var(--muted); }
.home-links { display: flex; gap: 8px; margin-top: 8px; }
.home-links .btn { margin: 0; }
.home-help { margin: 0; text-align: center; }
@media (max-width: 480px) { .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-hero { height: 160px; } }
/* a type already in the Rack (UX ronde 5) */
.pick.inrack { cursor: default; opacity: .45; }
.pick.inrack .sp { color: var(--muted); font-weight: 600; }
/* a screen that fits does not scroll: no rubber band around the page (UX ronde 5) */
html, body { overscroll-behavior: none; }
/* the animated city on a canvas (game/js/city.js); the CSS background above is only the fallback */
.sky canvas.city, .home-city canvas.city { position: absolute; left: 0; bottom: 0; display: block; image-rendering: pixelated; will-change: transform; } /* drawn at the strip's own pixel size, scaled up crisp (UX ronde 9) */
.sky.city-live, .home-city.city-live { background: #03040a; overflow: hidden; }
/* ---------- UX ronde 6 ---------- */
.btn .go-sub { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 600; opacity: .8; }
/* compact result counters: icon and number; the label only on wider screens */
.score .sc, .score.n4 .sc { padding: 3px 6px; }
.score .sc .bd, .score.n4 .sc .bd { width: 22px; height: 22px; }
.score .sc b, .score.n4 .sc b { font-size: 16px; }
@media (max-width: 600px) { .score .sc small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.score-empty { padding: 7px 10px; }
/* the room that freed up goes to the sky: more air above the Rack */
@media (max-width: 480px) { .sky { height: 180px; } }
/* room between the plank and the result row now the status line is gone */
.plank ~ .score-empty, .plank ~ .score { margin-top: 14px; }
.plank ~ .sct ~ .score-empty, .plank ~ .sct ~ .score { margin-top: 0; }
/* the fireworks canvas spans the whole card, also in the desktop grid (UX ronde 7) */
.phone:has(> .hist) > .fx { grid-column: 1 / -1; grid-row: 1; }
/* the cracking Launch stands out in the history (UX ronde 7) */
.hist .h.crack { background: linear-gradient(90deg, rgba(255,212,59,.16), rgba(255,212,59,.04)); box-shadow: inset 0 0 0 1px rgba(255,212,59,.55); }
.hist .h.crack .rn { color: var(--gold); font-weight: 800; }
.hist .h.crack .rn::after { content: " ✓"; }
/* Rack pills: lighter (UX ronde 7) */
.rows button { min-height: 30px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; }
.rows button small { font-size: 10.5px; font-weight: 600; }
.rows button[aria-pressed="true"] { font-weight: 700; }
@media (max-width: 480px) { .rows-bar .rows button { min-height: 28px; padding: 1px 9px; font-size: 12px; } }
.hist .h .rn { white-space: nowrap; width: 30px; flex: none; }

/* ---------- UX ronde 8: Collection and Account fit the screen ---------- */
/* a page title only on phones: on desktop the inline menu already says where you are */
.page-title { margin: 0; font: 400 22px Rye, serif; color: var(--gold); }
.page-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* UX ronde 10: no visible page title; still there for screen readers */
.coll-head { margin: 0; }
.coll-mx .set-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; }
.coll-mx .set-progress .bar { flex: 1 1 120px; height: 6px; }
.coll-mx .set-progress small { flex-basis: 100%; font-size: 12px; }
.cmx { margin: 12px 0 6px; }
a.cmx-c { display: block; color: inherit; text-decoration: none; border-style: dashed; background: transparent; }
a.cmx-c:hover, a.cmx-c:focus-visible { border-color: var(--gold); border-style: solid; }
/* UX ronde 9: on hover the ghost fades and a light overlay says what the tile does; on touch screens (no hover) a
   small "Buy" stays at the bottom of the tile */
a.cmx-c { overflow: hidden; }
a.cmx-c img { transition: opacity .15s; }
a.cmx-c .buy { position: absolute; inset: 0; display: grid; place-items: center; padding: 4px; text-align: center; font: 800 12px/1.15 Inter, system-ui, sans-serif; color: var(--gold); background: rgba(232, 236, 248, .12); opacity: 0; transition: opacity .15s; pointer-events: none; }
a.cmx-c:hover img, a.cmx-c:focus-visible img { opacity: .3; }
a.cmx-c:hover .buy, a.cmx-c:focus-visible .buy { opacity: 1; }
@media (hover: none) {
  a.cmx-c .buy { inset: auto 0 3px; padding: 0; background: none; opacity: 1; font-size: 0; }
  a.cmx-c .buy::after { content: "Buy"; font-size: 10px; }
}
@media (min-width: 860px) { a.cmx-c .buy { font-size: 14px; } }
/* account */
.acc-season { display: grid; gap: 8px; background: #0E1530; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.acc-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; font-size: 14px; }
.acc-row .muted { font-size: 12.5px; }
.season-bar { display: flex; gap: 5px; }
.season-bar .wk { flex: 1; display: flex; gap: 2px; }
.season-bar span span { flex: 1; height: 7px; border-radius: 2px; background: #1A2244; }
.season-bar span span.done { background: #6E7AA6; }
.season-bar span span.now { background: var(--gold); }
.acc-more summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.acc-more ul { margin-top: 6px; }
.acc-more li { font-size: 13px; color: var(--muted); }
.acc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.acc-stats div { background: #0E1530; border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 7px; display: grid; gap: 1px; min-width: 0; }
.acc-stats b { font-size: 17px; white-space: nowrap; }
.acc-stats small { color: var(--muted); font-size: 11px; line-height: 1.2; }
.acc-rounds { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 172px; overflow-y: auto; }
.acc-rounds li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #0E1530; border: 1px solid var(--line); font-size: 13px; }
.acc-rounds .rn { font-weight: 700; width: 70px; flex: none; }
.acc-rounds .rks { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.acc-rounds .rk { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.acc-rounds .rk.won { border-color: var(--gold); color: var(--gold); }
.acc-rounds .rk small { font-weight: 600; opacity: .85; }
.acc-rounds .rsp { font-weight: 700; color: var(--gold); white-space: nowrap; }
.acc-rounds .live { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.acc-levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.acc-levels div { display: grid; gap: 2px; text-align: center; }
.acc-levels b { font-size: 16px; }
.acc-levels small { font-size: 11px; color: var(--muted); }
.acc-levels i { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--gold) calc(var(--p) * 100%), #1A2244 0); }
.acc-levels .zero { opacity: .5; }
.acc .filters { margin: 0 0 8px; }
.acc .filters > div { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.mine { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 700px) { .mine { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; } }
.mcard { border-radius: 10px; }
.mcard .media img { padding: 4px 4px 0; box-sizing: border-box; }
.mcard .media .tag.gift { position: absolute; left: 2px; top: 2px; margin: 0; font-size: 9px; padding: 0 5px; background: #0E1530; }
.mcard .info { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; padding: 2px 6px 4px; font-size: 11px; }
.mcard .info .id { color: var(--muted); }
.mcard .info .sp { font-weight: 800; color: var(--gold); white-space: nowrap; }
.mcard > .bar { height: 3px; border-radius: 0; }
@media (min-width: 860px) {
  .acc { max-width: 820px; margin: 0 auto; }
  .acc-stats { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
/* the 5 × 5 grid also fits the height of the screen (header, progress and labels take ~300 px) */
@media (min-width: 860px) {
  .cmx { grid-template-columns: auto repeat(5, minmax(0, min(132px, calc((100svh - 320px) / 5)))); justify-content: center; }
}
.mine-empty { grid-column: 1 / -1; margin: 0; }
.acc-none p { margin: 0 0 10px; font-size: 14px; }
.acc-none .btn { display: inline-flex; width: auto; padding-inline: 18px; text-decoration: none; }
/* UX ronde 10: overview after the Bonus game, what your Shells earn with this Rack */
.rsum { display: grid; gap: 10px; }
.rsum h3 { margin: 0; text-align: center; font: 400 22px Rye, serif; color: var(--gold); }
.rsum-big { margin: 0; text-align: center; font-size: 16px; }
.rsum-big b { font-size: 26px; color: var(--gold); }
.rsum-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: min(46svh, 420px); overflow-y: auto; }
.rsum-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 12px; background: #0E1530; border: 1px solid var(--line); }
.rsum-list img { width: 44px; height: 44px; display: block; }
.rsum-list .t { display: grid; gap: 1px; min-width: 0; font-size: 13.5px; }
.rsum-list .t .muted { font-size: 12px; }
.rsum-list .t small { color: var(--muted); font-size: 11.5px; }
.rsum-list .n { display: grid; justify-items: end; gap: 3px; }
.rsum-list .n b { font-size: 17px; color: var(--gold); }
.rsum .small { text-align: center; margin: 0; }
.rsum .act-row { margin-top: 2px; }
.linkish { justify-self: center; background: none; border: 0; padding: 4px; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }
/* UX ronde 10: filter buttons the same width, 5 per row; a color is a tinted button, a shape shows its outline */
.acc .filters { display: grid; gap: 6px; }
.acc .filters > div[role="group"] { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; overflow: visible; }
.acc .fchip { justify-content: center; gap: 4px; min-width: 0; min-height: 32px; padding: 4px 6px; font-size: 12px; white-space: nowrap; }
.acc .fchip span { overflow: hidden; text-overflow: ellipsis; }
.acc .fchip svg { width: 13px; height: 13px; flex: none; }
.fchip.fcol { border-color: color-mix(in srgb, var(--c) 70%, transparent); background: color-mix(in srgb, var(--c) 16%, transparent); }
.fchip.fcol[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.acc .fchip.clear { justify-self: start; }
/* phones: a shape is its icon alone (the names did not fit five across); the name stays for screen readers */
@media (max-width: 559px) {
  .acc .fchip:not(.fcol):not(.clear) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .acc .fchip:not(.fcol):not(.clear) svg { width: 17px; height: 17px; }
  .acc .fchip.fcol { font-size: 11.5px; padding: 4px 3px; }
}
@media (min-width: 700px) { .acc .filters > div[role="group"] { grid-template-columns: repeat(5, minmax(0, 110px)); } }
/* levels as buttons: tap to filter */
.acc-levels button { display: grid; gap: 2px; justify-items: center; padding: 6px 2px 4px; border: 1px solid transparent; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; }
.acc-levels button:hover { border-color: var(--line); }
.acc-levels button[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 212, 59, .08); }
.acc-levels button[aria-pressed="true"] small { color: var(--gold); }
.acc-levels button i { width: 100%; }
/* UX ronde 11: a Ghost in the picker looks playable: brighter outline, a soft glow and a plain "Ghost" label (was a faint
   wireframe with a grey "Not owned") */
.pick.ghost img { filter: brightness(1.75) drop-shadow(0 0 5px rgba(201, 206, 220, .28)); }
.pick.ghost .sp { color: #C9D1E3; font-weight: 600; }
.pick.ghost.nothere img { opacity: .7; }
.pick.ghost.nothere .sp { color: #B79A5E; font-weight: 500; }
.pick.ghost.no .sp { color: #D08578; }
.pick.ghost.no img { filter: none; } /* not in the code: stays faded like any other */
/* UX ronde 11: hover in the header and the menu (only with a mouse: on touch a hover would stick after a tap) */
.tabs-inline button, .menu-btn { transition: background-color .15s, border-color .15s, color .15s; }
.top .brand a { transition: filter .15s; }
@media (hover: hover) {
  .tabs-inline button:not([aria-pressed="true"]):hover { border-color: var(--gold); color: var(--gold); background: rgba(255, 212, 59, .07); }
  .menu-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(255, 212, 59, .07); }
  .menu > button:not(:disabled):hover, #gameMenu > button:not(:disabled):hover, .menu .msw:hover { background: rgba(255, 212, 59, .08); color: var(--gold); }
  .top .brand a:hover { filter: drop-shadow(0 0 10px rgba(255, 212, 59, .35)); }
}

/* ---------- UX ronde 11: the setting (night sky, skyline) ---------- */
/* the night sky of the show behind every page: the show's sky colours (STIJLGIDS) and single-pixel stars in the upper
   part. Static fixed layers: drawn once, the GPU only composites them (light on old phones) */
html { background: linear-gradient(#03040a 0%, #060918 40%, #0b0f25 85%) fixed #03040a; }
body { background: transparent; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .7;
  background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc5NicgaGVpZ2h0PSc5Nicgc2hhcGUtcmVuZGVyaW5nPSdjcmlzcEVkZ2VzJz48cmVjdCB4PSc0MScgeT0nMTknIHdpZHRoPScyJyBoZWlnaHQ9JzInIGZpbGw9JyNGRkQ0M0InIGZpbGwtb3BhY2l0eT0nMC4zNScvPjxyZWN0IHg9JzknIHk9JzY4JyB3aWR0aD0nMicgaGVpZ2h0PScyJyBmaWxsPScjRUVGMUZBJyBmaWxsLW9wYWNpdHk9JzAuNycvPjxyZWN0IHg9Jzc0JyB5PSc3JyB3aWR0aD0nMicgaGVpZ2h0PScyJyBmaWxsPScjOEVBMEZGJyBmaWxsLW9wYWNpdHk9JzAuNScvPjxyZWN0IHg9JzQnIHk9JzExJyB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPScjRkZENDNCJyBmaWxsLW9wYWNpdHk9JzAuODUnLz48cmVjdCB4PSc4JyB5PSczMCcgd2lkdGg9JzEnIGhlaWdodD0nMScgZmlsbD0nI0VFRjFGQScgZmlsbC1vcGFjaXR5PScwLjg1Jy8+PHJlY3QgeD0nNycgeT0nNzInIHdpZHRoPScxJyBoZWlnaHQ9JzEnIGZpbGw9JyNFRUYxRkEnIGZpbGwtb3BhY2l0eT0nMC41Jy8+PHJlY3QgeD0nODAnIHk9JzgwJyB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPScjOEVBMEZGJyBmaWxsLW9wYWNpdHk9JzAuMzUnLz48cmVjdCB4PSc3MycgeT0nNzQnIHdpZHRoPScxJyBoZWlnaHQ9JzEnIGZpbGw9JyNGRkQ0M0InIGZpbGwtb3BhY2l0eT0nMC4zNScvPjxyZWN0IHg9JzI4JyB5PSc1JyB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPScjOEVBMEZGJyBmaWxsLW9wYWNpdHk9JzAuNScvPjxyZWN0IHg9JzM3JyB5PSc1Mycgd2lkdGg9JzEnIGhlaWdodD0nMScgZmlsbD0nIzk4QTJDMCcgZmlsbC1vcGFjaXR5PScwLjM1Jy8+PHJlY3QgeD0nNzMnIHk9JzM5JyB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPScjOEVBMEZGJyBmaWxsLW9wYWNpdHk9JzAuNScvPjxyZWN0IHg9JzEzJyB5PSc3NCcgd2lkdGg9JzEnIGhlaWdodD0nMScgZmlsbD0nIzhFQTBGRicgZmlsbC1vcGFjaXR5PScwLjUnLz48cmVjdCB4PSc0NycgeT0nMTInIHdpZHRoPScxJyBoZWlnaHQ9JzEnIGZpbGw9JyM4RUEwRkYnIGZpbGwtb3BhY2l0eT0nMC4zNScvPjxyZWN0IHg9JzcyJyB5PSc3JyB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPScjOEVBMEZGJyBmaWxsLW9wYWNpdHk9JzAuNScvPjxyZWN0IHg9JzYzJyB5PSc4Nycgd2lkdGg9JzEnIGhlaWdodD0nMScgZmlsbD0nIzhFQTBGRicgZmlsbC1vcGFjaXR5PScwLjg1Jy8+PHJlY3QgeD0nNDAnIHk9JzU5JyB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPScjOEVBMEZGJyBmaWxsLW9wYWNpdHk9JzAuODUnLz48cmVjdCB4PSc0NicgeT0nMzgnIHdpZHRoPScxJyBoZWlnaHQ9JzEnIGZpbGw9JyM5OEEyQzAnIGZpbGwtb3BhY2l0eT0nMC41Jy8+PHJlY3QgeD0nODknIHk9JzMxJyB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPScjRUVGMUZBJyBmaWxsLW9wYWNpdHk9JzAuNycvPjxyZWN0IHg9JzY3JyB5PSc2Mycgd2lkdGg9JzEnIGhlaWdodD0nMScgZmlsbD0nIzk4QTJDMCcgZmlsbC1vcGFjaXR5PScwLjg1Jy8+PHJlY3QgeD0nMzYnIHk9Jzc3JyB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPScjRUVGMUZBJyBmaWxsLW9wYWNpdHk9JzAuMzUnLz48cmVjdCB4PSc2NScgeT0nNTMnIHdpZHRoPScxJyBoZWlnaHQ9JzEnIGZpbGw9JyM5OEEyQzAnIGZpbGwtb3BhY2l0eT0nMC43Jy8+PHJlY3QgeD0nMTknIHk9JzYyJyB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPScjRkZENDNCJyBmaWxsLW9wYWNpdHk9JzAuMzUnLz48cmVjdCB4PSc4NScgeT0nOScgd2lkdGg9JzEnIGhlaWdodD0nMScgZmlsbD0nIzhFQTBGRicgZmlsbC1vcGFjaXR5PScwLjcnLz48cmVjdCB4PSc0MycgeT0nODgnIHdpZHRoPScxJyBoZWlnaHQ9JzEnIGZpbGw9JyM5OEEyQzAnIGZpbGwtb3BhY2l0eT0nMC44NScvPjwvc3ZnPg==") 0 0 / 192px 192px repeat; image-rendering: pixelated;
  -webkit-mask-image: linear-gradient(#000 0 55%, transparent 85%); mask-image: linear-gradient(#000 0 55%, transparent 85%); }
/* a faint skyline at the bottom of the screen: another district on every page, as if you walk along the city */
body::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 101px; z-index: -1; pointer-events: none; opacity: .28;
  background: url("../assets/show/city-night.png") -640px 100% / auto 101px repeat-x; image-rendering: pixelated;
  -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); }
body[data-view="play"]::after { background-position-x: -1240px; }
body[data-view="collection"]::after { background-position-x: -260px; }
body[data-view="account"]::after { background-position-x: -1660px; }
@media (min-width: 960px) { body::after { height: 202px; background-size: auto 202px; opacity: .3; }
  body[data-view="home"]::after { background-position-x: -1280px; } body[data-view="play"]::after { background-position-x: -2480px; }
  body[data-view="collection"]::after { background-position-x: -520px; } body[data-view="account"]::after { background-position-x: -3320px; } }
/* a warm glow rising from the city */
main::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 45vh; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 100%, rgba(255, 170, 60, .07), transparent 65%); }
main { padding-bottom: 120px; }
/* the header stays readable over the stars: a dark, almost solid bar */
.top { background: rgba(4, 6, 15, .94); }
/* section headers in one language: a gold pixel burst, the label in small caps, and the Rack's fuse running to the edge */
.home-sec h3, .acc h3, .hist-h { display: flex; align-items: center; justify-content: flex-start; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.home-sec h3::before, .acc h3::before, .hist-h::before { content: ""; width: 9px; height: 9px; flex: none; image-rendering: pixelated;
  background: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'><g fill='%23FFD43B'><rect x='4' y='0' width='1' height='2'/><rect x='4' y='7' width='1' height='2'/><rect x='0' y='4' width='2' height='1'/><rect x='7' y='4' width='2' height='1'/><rect x='3' y='3' width='3' height='3'/><rect x='1' y='1' width='1' height='1'/><rect x='7' y='1' width='1' height='1'/><rect x='1' y='7' width='1' height='1'/><rect x='7' y='7' width='1' height='1'/></g></svg>"); }
.home-sec h3::after, .acc h3::after, .hist-h::after { content: ""; order: 2; flex: 1; min-width: 16px; height: 2px; opacity: .45; background: repeating-linear-gradient(90deg, #D2B57E 0 4px, #7A5A2E 4px 7px); }
.home-sec h3 > small, .acc h3 > small, .hist-h > span { order: 3; text-transform: none; letter-spacing: 0; }
/* panels feel like crafted objects (like the Shell boxes): a light top edge and a dark bottom edge */
.home-rack, .home-stats > div, .acc-season, .acc-stats div, .acc-rounds li, .acc-levels button, .set-progress, .score-empty, .rsum-list li, .mcard, .phone {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -2px 0 rgba(0, 0, 0, .35); }
.home-rack { border-bottom-width: 3px; }
.phone { background: linear-gradient(rgba(11, 18, 48, .9), rgba(6, 9, 20, .92) 70%); }
/* desktop: one width everywhere (the header's 1040), Home in two columns */
@media (min-width: 960px) {
  .home { max-width: 1040px; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; column-gap: 28px; }
  .home > .home-hero { grid-column: 1 / -1; height: 230px; }
  .home > .home-sec:nth-of-type(2) { grid-column: 1; grid-row: 2 / span 3; }
  .home > .home-sec:nth-of-type(3), .home > .home-help { grid-column: 2; }
  .acc, .coll-mx, .coll-head { max-width: 1040px; }
}
/* the logbook: roomier rows (the Shells no longer touch their edge) and an empty dashed row per Launch to come */
.hist { gap: 6px; }
.hist .h { min-height: 44px; padding: 6px 12px; gap: 4px; border: 1px solid transparent; border-radius: 10px; background: rgba(14, 21, 48, .55); }
.hist .h .rn { width: 30px; flex: none; }
.hist .h img { width: 30px; height: 30px; }
.hist .h .ms { margin-left: auto; }
.hist .h.last { padding-left: 12px; box-shadow: inset 3px 0 0 var(--gold); }
.hist .ghostrow { background: none; border: 1px dashed #2B3766; cursor: default; color: #3A4675; }
.hist .ghostrow .rn { color: #3A4675; font-weight: 700; }
.hist .ghostrow i { flex: 1; border-top: 1px dashed #1E2750; margin-left: 6px; }
.hist .ghostrow:hover { background: none; }
/* levels as cards (they also read as filter buttons): count, name and the share of your Shells */
.acc-levels { gap: 6px; }
.acc-levels button { padding: 8px 4px 7px; border: 1px solid var(--line); background: #0E1530; gap: 1px; }
.acc-levels button b { font-size: 17px; line-height: 1.2; }
.acc-levels button small { font-size: 11px; color: var(--muted); }
.acc-levels button em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--gold); opacity: .85; }
.acc-levels button.zero em { color: var(--muted); }
.acc-levels button[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 212, 59, .1); }
@media (hover: hover) { .acc-levels button:hover { border-color: rgba(255, 212, 59, .5); } }
/* Rack states on Home (UX ronde 11) */
.home-rack { position: relative; overflow: hidden; }
.home-rack b { display: inline-flex; align-items: center; gap: 6px; }
.home-rack .rk-check { width: 18px; height: 18px; }
.home-rack.won { border-color: rgba(255, 212, 59, .25); }
.home-rack.progress::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p) * 100%); background: var(--gold); opacity: .8; }
/* Bonus waiting: a soft gold glow that breathes; only its opacity animates (cheap on any phone) */
.home-rack.bonus { border-color: var(--gold); }
.home-rack.bonus::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 18px rgba(255, 212, 59, .35); animation: rkGlow 3s ease-in-out infinite; }
@keyframes rkGlow { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
body.reduce .home-rack.bonus::before { animation: none; opacity: .6; }
@media (prefers-reduced-motion: reduce) { .home-rack.bonus::before { animation: none; opacity: .6; } }
/* a final pass on small inconsistencies (UX ronde 11) */
.flame { width: 1em; height: 1em; vertical-align: -.12em; margin-right: .25em; }
.link { color: var(--muted); }
@media (hover: hover) { .link:hover { color: var(--gold); } }
#clr { font-weight: 700; }
.acc-stats div { text-align: center; justify-items: center; } /* like the tiles on Home */
/* the payout one Shell at a time (UX ronde 12): waiting rows are quiet, the counting row lights up, labels land in turn */
.rsum-list li { transition: opacity .25s, border-color .25s; }
.rsum-list.anim li.wait { opacity: .45; }
.rsum-list.anim li.now { border-color: rgba(255, 212, 59, .55); }
.rsum-list.anim .up-tag:not(.in) { visibility: hidden; }
.rsum-list .up-tag.in { animation: stampIn .35s both; }
.rsum-more { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 13px; }
.rsum-more .linkish { display: inline-flex; align-items: center; gap: 5px; }
.rsum > .btn { margin: 2px 0 0; }
@media (max-width: 480px) {
  .hist .h { padding: 6px 8px; gap: 2px; }
  .hist .h .rn { width: 24px; }
  .hist .h img { width: 28px; height: 28px; }
  .hist .h.last { padding-left: 8px; }
  .hist .h .ms { gap: 4px; }
}
.hist .h, .hist-h { min-width: 0; max-width: 100%; }
.hist-h > span { white-space: nowrap; }

/* ---------- UX ronde 12 ---------- */
/* Home on desktop: two equal columns (the Racks don't need the extra width, the Shell tiles do) */
@media (min-width: 960px) { .home { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.home-stats b { overflow-wrap: anywhere; }
/* hover on every button, not only in the header (UX ronde 12) */
.btn { transition: background-color .15s, border-color .15s, color .15s, filter .15s; }
@media (hover: hover) {
  .btn:not(:disabled):not(.ghost):hover { filter: brightness(1.08); }
  .btn.ghost:not(:disabled):hover { border-color: var(--gold); color: var(--gold); background: rgba(255, 212, 59, .07); }
}
.fin-done { display: grid; gap: 8px; margin-top: 10px; }
.fin-done .btn { margin: 0; }
