/* Wrestling Showdown game board. Same look as the site: teal pixel grid, Press Start 2P / Anton / Barlow Condensed,
   black pixel-corner outlines (.px). Board layout follows Cards/docs/BoardLayout.jpeg; camera, cards and Boosts follow
   section 7 of Cards/docs/build-prompt.md. */
:root{
  --teal:#7fd4cf; --ink:#0a0a0a; --burst:#f7c85a; --paper:#fff; --mat:#f3efe2; --rope:#e8452c;
  --grp:#2f6fe0; --stk:#e03a2f; --sub:#1f9f3f;
  --pixel:'Press Start 2P','Courier New',monospace;
  --display:'Anton','Impact','Arial Narrow',sans-serif;
  --body:'Barlow Condensed','Arial Narrow',sans-serif;
  --push:5px;
}
*{box-sizing:border-box}
/* No page scrolling: the page is exactly the window, and the board's camera moves instead */
html,body{height:100%}
body{margin:0;display:flex;flex-direction:column;overflow:hidden;background:var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Crect width='3' height='3' fill='%230a0a0a' fill-opacity='.07'/%3E%3C/svg%3E");
  color:var(--ink);font-family:var(--body);font-weight:600;font-size:1.15rem;line-height:1.3;padding:0 0 .5rem}
img{display:block;max-width:100%}
button{font:inherit;color:inherit}

/* Pixel corners (same as the site) */
.px{--b:4px;--c:var(--ink);--sh:transparent;--off:0px;border:0;border-radius:0;
  box-shadow:
    0 calc(-1 * var(--b)) 0 0 var(--c), 0 var(--b) 0 0 var(--c),
    calc(-1 * var(--b)) 0 0 0 var(--c), var(--b) 0 0 0 var(--c),
    var(--off) var(--off) 0 0 var(--sh),
    var(--off) calc(var(--off) + var(--b)) 0 0 var(--sh),
    calc(var(--off) + var(--b)) var(--off) 0 0 var(--sh)}

.top{flex:none;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.4rem 1.2rem;padding:.5rem 1rem}
.top h1{margin:0;font-family:var(--display);font-weight:400;font-size:clamp(1.2rem,3vw,2rem);line-height:1;letter-spacing:.01em;
  text-shadow:.06em .06em 0 var(--burst),.08em .08em 0 var(--ink)}
.mode{font-family:var(--pixel);font-size:.55rem;background:var(--burst);padding:.45rem .6rem;line-height:1.4}
.top .btn{padding:.55em .8em}

/* Rules window (match page): a pixel box in the middle of the screen over a dimmed board. Only the text scrolls. */
.rules{padding:0;background:var(--paper);color:var(--ink);width:min(40rem,100vw - 32px);max-height:min(85dvh,46rem);
  --sh:var(--ink);--off:var(--push);overflow:visible}
.rules::backdrop{background:rgb(10 10 10 / .6)}
.rules-box{display:flex;flex-direction:column;max-height:inherit}
.rules-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;border-bottom:4px solid var(--ink);background:var(--burst)}
.rules-head h2{margin:0;font-family:var(--pixel);font-size:clamp(.75rem,2.2vw,1rem);line-height:1.4;font-weight:400}
.rules-text{overflow-y:auto;overscroll-behavior:contain;padding:.4rem 1.2rem 1.2rem;font-size:1.1rem;line-height:1.4}
.rules-text h3{margin:1.1rem 0 .5rem;font-family:var(--pixel);font-size:.7rem;line-height:1.5;font-weight:400}
.rules-text ol,.rules-text ul{margin:0;padding-left:1.4rem}
.rules-text li + li{margin-top:.3rem}
.rules-text p{margin:.5rem 0 0}
/* the X: two pixel bars, no text needed */
.rules .x{position:relative;flex:none;width:2.4rem;height:2.4rem;padding:0}
.rules .x::before,.rules .x::after{content:"";position:absolute;left:50%;top:50%;width:60%;height:4px;background:var(--ink);transform:translate(-50%,-50%) rotate(45deg)}
.rules .x::after{transform:translate(-50%,-50%) rotate(-45deg)}
/* the Profile button sits at the top right of every top bar (js/profile-window.js), hidden until signed in */
.top .profile-open[hidden],.tutorial-pending .top .profile-open{display:none}   /* main menu: hidden until the first-login question is answered */
/* the Profile window: the Profile page in a frame, with its X in a bar at the top right (js/profile-window.js) */
.profile-window{height:min(85dvh,46rem)}
.profile-window .rules-box{height:100%}
.profile-frame{flex:1;min-height:0;width:100%;border:0;background:var(--teal)}   /* the page's own colour: no white flash while it loads */
.profile-foot{flex:none;display:flex;justify-content:flex-end;padding:.5rem .8rem;border-bottom:4px solid var(--ink);background:var(--paper)}
/* inside that window the Profile page has no top bar of its own (profile.html adds .in-window) */
.in-window .top{display:none}

/* Chunky buttons that sink when pressed */
.btn{font-family:var(--pixel);font-size:clamp(.55rem,1.4vw,.75rem);line-height:1.3;text-transform:uppercase;background:var(--burst);padding:.75em 1em;cursor:pointer;
  --sh:var(--ink);--off:var(--push);transition:transform .1s,box-shadow .1s;margin:0 var(--push) var(--push) 0}
.btn:hover{transform:translate(-2px,-2px);--off:calc(var(--push) + 2px)}
.btn:active{transform:translate(var(--push),var(--push));--off:0px}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none;--off:var(--push)}
.btn.quiet{background:var(--paper)}
a.btn{color:inherit;text-decoration:none}
.btn.small{font-size:.55rem;padding:.6em 1.1em}   /* the small white Back buttons */
@media (max-width:767px){.btn.small{min-height:44px;min-width:6rem}}   /* easy to tap, never full width */
.btn.num{font-size:clamp(.9rem,2.4vw,1.3rem);min-width:2.6em;padding:.6em}
button:focus-visible,[role="button"]:focus-visible{outline:4px solid var(--ink);outline-offset:4px}

/* The board: a light mat in a red frame.
   --cw = your wrestler card width: fills the window across deck + 5 cards + deck, 240px at most (180px+ on a 1280px-wide window)
   --dw = deck / discard width, --row = width of a card row */
.board{--gap:12px;--pad:14px;--frame:8px;
  --cw:min(240px,(100vw - 1rem - 2 * var(--frame) - 2 * var(--pad) - 6 * var(--gap)) / 6.24);
  --dw:calc(var(--cw) * .62);
  --row:calc(5 * var(--cw) + 2 * var(--dw) + 6 * var(--gap));
  /* CARD_ARENA_GAP: space between each card row and the arena / name panels, the same above and below. Room for the
     biggest lift (your picked card rises 8% of its 1.4 x --cw height) plus the opponent's glow (24px blur + 10px), plus air */
  --card-arena-gap:calc(var(--cw) * 1.4 * .08 + 44px);
  container-type:inline-size;margin:0 auto;width:min(100% - 1rem,40rem);background:var(--mat);border:var(--frame) solid var(--rope);outline:4px solid var(--ink)}
.board.live{width:calc(var(--row) + 2 * var(--pad) + 2 * var(--frame));flex:1;min-height:0;display:flex;flex-direction:column}
.loading{font-family:var(--pixel);font-size:.75rem;text-align:center;padding:3rem 1rem;line-height:1.8}
.loading a{color:inherit}
/* Skeleton placeholders while something loads: a soft grey block with a white sheen, quiet enough to sit on any page.
   Where a placeholder lies on a colour (a profile band, a board panel, a name tag) it's a light wash of white over that
   colour instead (--skel-base below), so it reads as loading into it. The sheen stops for reduced motion. */
.skel{display:block;position:relative;overflow:hidden;background:var(--skel-base,#e4e4e4);border:4px solid var(--ink);box-shadow:var(--push) var(--push) 0 var(--ink)}
.skel::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,#fff,transparent);opacity:.7;transform:translateX(-100%);animation:skel-sheen 1.4s linear infinite}
.pc-band .skel,.panel .skel,.h-name .skel{--skel-base:rgb(255 255 255 / .4)}
@keyframes skel-sheen{to{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){.skel::after{animation:none;opacity:0}}
/* the match's placeholder (match.html): the camera's whole space, under the board's own padding */
/* no block here: the arena's own mat shows through, with only the sheen moving over it */
.board .camera > .skel{position:absolute;inset:var(--pad);--skel-base:transparent;border:0;box-shadow:none}
/* Placeholders that are the size of what replaces them (Decks, Profile, Friends, match history, the main menu).
   A line of text is one line tall in its own line-height (1lh), with no border or shadow so it sits inside a text
   box; its width is set where it's used. A placeholder profile card has the same band, name tag and lines as
   playerCard() (js/profile-card.js). */
.skel-line{height:1lh;width:100%;border:0;box-shadow:none}
.skel-art{flex:none;width:4.5rem;aspect-ratio:1}   /* the profile card's portrait (.pc-art) */
.skel-profile{--pc:#888888;--pc-ink:var(--ink)}   /* the band in the colour a card with no colour picked shows (profile-card.js) */
.skel-profile .pc-band{padding-right:calc(44px + .5rem)}   /* the room the paint bucket takes on your own card */
.skel-row{--pc:#888888}   /* a history row's name tag: the same fallback colour as the card */
.fav-list .skel{width:100%;aspect-ratio:1}   /* the favourite wrestler squares, before the pictures */
/* Quick Chat (js/quick-chat.js): the phrase menu under the top bar, and the bubbles over the board */
.chat-menu{position:fixed;top:4.5rem;right:1rem;z-index:20;width:min(24rem,100vw - 2rem);max-height:70dvh;overflow:auto;
  background:var(--paper);color:var(--ink);border:4px solid var(--ink);padding:.6rem .8rem}
.chat-menu h3{margin:.5rem 0 .3rem;font-size:.6rem}
.chat-phrases{display:flex;flex-wrap:wrap;gap:.4rem}
.chat-phrases .btn{font-size:.55rem;padding:.6em .7em}
.chat-menu .err{margin:.4rem 0 0;min-height:1.2em;font-family:var(--body);color:var(--stk)}
.chat-menu .chat-mute{margin-top:.3rem;font-size:.55rem}
.chat-feed{position:fixed;top:4.5rem;left:50%;transform:translateX(-50%);z-index:19;display:flex;flex-direction:column;align-items:center;gap:.4rem;pointer-events:none}
.chat-bubble{margin:0;padding:.5rem .8rem;font-size:.6rem;background:var(--paper);color:var(--ink);border:3px solid var(--ink);max-width:90vw}
.chat-bubble.mine{background:var(--burst)}
.away{font-family:var(--pixel);font-size:.6rem;line-height:1.6;background:var(--burst);margin:0;padding:.5rem 1rem;text-align:center}
.room{display:block;font-size:1.4rem;letter-spacing:.2em;margin-top:.8rem;user-select:all}

/* Camera: a window onto the tall stage. The stage slides up and down (no page scrolling). */
.camera{flex:1;min-height:0;overflow:hidden;position:relative;touch-action:pan-x pinch-zoom}   /* a vertical drag scrolls the board (board.js), not the page */
.stage{position:relative;display:grid;gap:var(--card-arena-gap);padding:var(--pad);will-change:transform}   /* board.js pans it (CAMERA_PAN_MS) */

/* Card rows: deck | five slots | deck, all in the 750 x 1050 card shape */
.side{display:grid;gap:var(--gap);grid-template-columns:var(--dw) repeat(5,var(--cw)) var(--dw);align-items:center;justify-content:center}
.side.opp{grid-template-areas:"wdeck s0 s1 s2 s3 s4 fdeck"}
.side.me{grid-template-areas:"fdeck s0 s1 s2 s3 s4 wdeck" "fdisc boosts boosts boosts boosts boosts wdisc";padding-bottom:3.2rem} /* room for the Use button and "Not now" tag */
.side.me .discard{align-self:end}
.slot,.pile{position:relative;width:100%;aspect-ratio:750/1050;background:#1b1b1b;padding:0;border:0;border-radius:4%}
.discard-icon{width:100%;height:100%;object-fit:contain;padding:22% 18%;image-rendering:pixelated}
.pile > .flip{display:block;width:100%;height:100%;cursor:pointer;border-radius:4%}
.slot.empty{background:transparent;box-shadow:inset 0 0 0 2px rgba(10,10,10,.18)}
.side.me .slot{cursor:default}
.side.me .slot[data-pickable]{cursor:pointer}
.slot{transition:transform calc(.15s * var(--anim, 1)) ease-out}
/* The pick highlight: one element per side that slides (150 ms) to the card you point at or picked.
   Pointing = lighter preview, picked = solid. The opponent's shows only their final pick, glowing in their colour,
   and keeps that look once they've chosen their number. While they pick, it flashes (see .opp-picking below). */
.side{position:relative}
.hl{position:absolute;left:0;top:0;z-index:2;pointer-events:none;border-radius:4%;opacity:0;transition:transform calc(.15s * var(--anim, 1)) ease-out,opacity calc(.15s * var(--anim, 1)),box-shadow calc(.15s * var(--anim, 1))}
.hl.instant{transition:none}
.hl.on{opacity:1}
.hl.mine{--c:var(--me);box-shadow:0 0 0 3px color-mix(in srgb,var(--c) 50%,transparent),0 0 0 6px color-mix(in srgb,var(--ink) 25%,transparent)}
/* Opponent picking: their panel loops their colour, fade, yellow, fade (OPP_PICK_FLASH_MS in board.js).
   With reduced motion it holds a steady glow in their colour. */
@property --flash{syntax:'<color>';inherits:false;initial-value:transparent}
@keyframes opp-pick{0%,100%{--flash:var(--opp)}25%,75%{--flash:transparent}50%{--flash:var(--burst)}}
.opp-picking .panel.theirs{--flash:var(--opp);animation:opp-pick var(--opp-flash-ms) linear infinite}
.opp-picking .panel.theirs{filter:drop-shadow(0 0 6px var(--flash)) drop-shadow(0 0 12px var(--flash))}
.count{position:absolute;right:-4px;bottom:-4px;font-family:var(--pixel);font-size:clamp(.4rem,calc(var(--cw) * .045),.65rem);background:var(--paper);padding:.35em .45em;box-shadow:0 0 0 2px var(--ink)}
.glow{animation:glow calc(1s * var(--anim, 1)) steps(2) infinite}
@keyframes glow{50%{box-shadow:0 0 0 3px var(--burst),0 0 0 6px var(--ink)}}

/* Boost cards: the same size as your wrestler cards, in one row under them (no magnify). Hover = a light lift and
   highlight, like the wrestler cards. A playable Boost glows and shows a Use button under it; one you can't play right
   now has dimmed art and a "Not now" tag; a used one is face down in the same place. */
.boosts{display:flex;justify-content:center;gap:var(--gap)}
.boost-slot{position:relative;flex:none;width:var(--cw)}
.boost{position:relative;border-radius:4%;cursor:default;transition:transform calc(.15s * var(--anim, 1)) ease-out,box-shadow calc(.15s * var(--anim, 1))}
.boost[data-pickable]:hover{transform:translateY(-4%);box-shadow:0 0 0 3px color-mix(in srgb,var(--me) 50%,transparent),0 0 0 6px color-mix(in srgb,var(--ink) 25%,transparent)}
.boost[data-pickable]{cursor:pointer}   /* only a Boost you can play right now reacts to the pointer */
.boost.dim .c-art{filter:brightness(.4) saturate(.5)}
.b-tag{display:none;position:absolute;left:50%;bottom:0;transform:translate(-50%,50%);z-index:1;font-family:var(--pixel);font-size:clamp(.32rem,calc(var(--cw) * .05),.6rem);line-height:1;white-space:nowrap;background:var(--paper);color:var(--ink);padding:.45em .6em;box-shadow:0 0 0 2px var(--ink)}
.boost.dim .b-tag{display:block}
.boost .bback{display:none}
.boost.used .pcard{display:none}
.boost.used .bback{display:block}
.b-use{position:absolute;left:50%;top:calc(100% + .7rem);transform:translateX(-50%);margin:0;z-index:2;font-size:clamp(.45rem,calc(var(--cw) * .055),.75rem)}
.b-use:hover{transform:translateX(-50%) translateY(-2px)}
.b-use:active{transform:translateX(-50%) translateY(var(--push))}

/* ---- Cards (cards.js): a picture plus text layers, laid out like the printed cards.
   --u = 1/750 of the card's width, so every size below is in printed-card pixels and the card looks the same at any size.
   --fit = shrink factor set by cards.js when a text would overflow its box (a longer translation, say). ---- */
.card{position:relative;display:block;width:100%;aspect-ratio:750/1050;container-type:inline-size;--u:calc(100cqw / 750);
  background:#000;color:#fff;border-radius:4%;overflow:hidden;font-family:var(--pixel);font-weight:400;line-height:1.15;text-align:center}
.card img{display:block;max-width:none;image-rendering:pixelated}
/* card text is real text you can select and copy; only the pictures opt out */
.card img,.c-art,.discard-icon{user-select:none;-webkit-user-drag:none}
.card [data-fit]{overflow:hidden}
/* wrestler: header, grey frame with name bar and portrait, three moves, credit */
.wcard > *{position:absolute}
.c-head{left:0;right:0;top:calc(14 * var(--u));height:calc(62 * var(--u));display:flex;align-items:center;justify-content:center;white-space:nowrap;font-size:calc(36 * var(--u) * var(--fit, 1))}
.w-frame{left:calc(117 * var(--u));top:calc(97 * var(--u));width:calc(516 * var(--u));height:calc(600 * var(--u));background:#676966;border-radius:calc(8 * var(--u))}
.w-grip{top:calc(142 * var(--u));width:calc(28 * var(--u));height:calc(70 * var(--u));background:repeating-linear-gradient(#2b2934 0 calc(10 * var(--u)),transparent 0 calc(16 * var(--u)))}
.w-grip.l{left:calc(122 * var(--u))} .w-grip.r{left:calc(600 * var(--u))}
.w-name{left:calc(155 * var(--u));top:calc(118 * var(--u));width:calc(442 * var(--u));height:calc(96 * var(--u));padding:0 calc(12 * var(--u));line-height:1.3;background:#82847f;border-radius:calc(40 * var(--u));
  color:#000;display:flex;align-items:center;justify-content:center;font-size:calc(34 * var(--u) * var(--fit, 1))}
.w-art{left:calc(167 * var(--u));top:calc(236 * var(--u));width:calc(420 * var(--u));height:calc(420 * var(--u));object-fit:cover}
.w-notch{left:calc(349 * var(--u));top:calc(662 * var(--u));border:calc(28 * var(--u)) solid transparent;border-bottom:0;border-top:calc(26 * var(--u)) solid #858784}
.w-move{left:calc(62 * var(--u));width:calc(672 * var(--u));height:calc(92 * var(--u));display:flex;align-items:center;gap:calc(18 * var(--u))}
.w-move.m1{top:calc(705 * var(--u))} .w-move.m2{top:calc(806 * var(--u))} .w-move.m3{top:calc(907 * var(--u))}
/* the move played in this showdown (data-played on the card, set by cards.js): only its badge is highlighted (brighter,
   with a thick ink inset outline), the name stays as it is, and the other two moves dim. No yellow, nothing changes size */
.wcard[data-played] .w-move.played .badge{filter:brightness(1.35);box-shadow:inset 0 0 0 calc(6 * var(--u)) var(--ink)}
.wcard[data-played] .w-move:not(.played){opacity:.4}
/* data-flash (the card has just turned face up): the badge flashes on and off 3 times in hard steps, then stays highlighted */
.wcard[data-flash] .w-move.played .badge{animation:badge-flash calc(.4s * var(--anim, 1)) step-end 3}
@keyframes badge-flash{0%{filter:brightness(1.35);box-shadow:inset 0 0 0 calc(6 * var(--u)) var(--ink)}50%{filter:none;box-shadow:none}}
.badge{flex:none;width:calc(175 * var(--u));height:100%;display:flex;align-items:center;justify-content:center;border-radius:calc(8 * var(--u));color:#fff;font-weight:400;font-size:calc(50 * var(--u))}
.card .badge.t-STK{background:#b31a11} .card .badge.t-SUB{background:#23682c} .card .badge.t-GRP{background:#2141a1}
.w-mv{flex:1;min-width:0;height:100%;display:flex;align-items:center;text-align:left;line-height:1.3;font-size:calc(38 * var(--u) * var(--fit, 1))}
.wcard .c-credit{right:calc(20 * var(--u));bottom:calc(10 * var(--u));width:calc(700 * var(--u));height:calc(30 * var(--u));text-align:right;white-space:nowrap;font-size:calc(18 * var(--u) * var(--fit, 1))}
/* finisher and Boost: title, picture, rule text in a white-bordered box */
.p-face{position:absolute;inset:0;display:flex;flex-direction:column;padding:calc(10 * var(--u)) calc(49 * var(--u)) calc(14 * var(--u))}
.c-title{flex:none;min-height:calc(67 * var(--u));display:flex;align-items:center;justify-content:center;padding:calc(4 * var(--u)) 0;line-height:1.3;font-size:calc(40 * var(--u) * var(--fit, 1))}
.bcard .c-title{min-height:calc(88 * var(--u))}
.c-art{flex:1 1 auto;min-height:0;background:center / cover no-repeat;image-rendering:pixelated}
.c-box{flex:none;min-height:calc(318 * var(--u));border:calc(17 * var(--u)) solid #fff;background:#000;display:flex;align-items:center;justify-content:center;padding:calc(12 * var(--u))}
.c-rule{line-height:1.4;font-size:calc(36 * var(--u) * var(--fit, 1))}
.bcard .p-face{padding-bottom:calc(43 * var(--u))}
.pcard .c-credit{flex:none;height:calc(32 * var(--u));display:flex;align-items:center;justify-content:flex-end;margin-right:calc(-29 * var(--u));white-space:nowrap;font-size:calc(18 * var(--u) * var(--fit, 1))}
/* backs */
.back > *{position:absolute}
.wb-tri{left:calc(54 * var(--u));top:calc(226 * var(--u));width:calc(636 * var(--u))}   /* places the triangle where it sits on the printed back */
.wb-head{z-index:1;left:calc(66 * var(--u));top:calc(96 * var(--u));width:calc(618 * var(--u));height:calc(172 * var(--u));padding:0 calc(24 * var(--u));background:#e7a11f;color:#000;
  display:flex;align-items:center;justify-content:center;line-height:1.15;font-size:calc(62 * var(--u) * var(--fit, 1))}
.wb-studio{left:0;right:0;top:calc(872 * var(--u));height:calc(100 * var(--u));line-height:1.5;font-size:calc(30 * var(--u) * var(--fit, 1))}
.fb-frame{left:calc(66 * var(--u));top:calc(80 * var(--u));width:calc(618 * var(--u));height:calc(512 * var(--u));border:calc(17 * var(--u)) solid #646464;background:#e7a11f;display:flex;flex-direction:column}
.fb-title{flex:none;height:calc(87 * var(--u));color:#000;display:flex;align-items:center;justify-content:center;line-height:1.2;font-size:calc(44 * var(--u) * var(--fit, 1))}
.fb-art{flex:1 1 auto;min-height:0;width:100%;object-fit:cover}
.fb-brain{left:calc(205 * var(--u));top:calc(625 * var(--u));width:calc(340 * var(--u))}
.fb-studio{left:0;right:0;top:calc(930 * var(--u));height:calc(70 * var(--u));color:#ae1a1a;text-transform:uppercase;display:flex;align-items:center;justify-content:center;white-space:nowrap;font-size:calc(34 * var(--u) * var(--fit, 1))}
.bb-panel{left:calc(66 * var(--u));top:calc(66 * var(--u));width:calc(618 * var(--u));height:calc(918 * var(--u));background:#23682c;display:flex;flex-direction:column}
.bb-art{flex:none;width:100%;height:calc(749 * var(--u))}
.bb-word{flex:1;min-height:0;color:#000;display:flex;align-items:center;justify-content:center;line-height:1;text-shadow:calc(8 * var(--u)) calc(8 * var(--u)) 0 #e54f0c;font-size:calc(100 * var(--u) * var(--fit, 1))}

/* Middle: your panel | arena | opponent panel. Panels sit low so they stay in view on your turn. */
.mid{display:grid;grid-template-columns:1fr 1.5fr 1fr;gap:var(--gap);align-items:end;width:var(--row);justify-self:center}
/* Score panels. Desktop (768px and up): one row each (name, Round, Wins, Points) with one blank line between, the gap
   being exactly one line of panel text. Phones: the same HTML as one full-width line (see the 767px block below). */
.panel{background:var(--me);color:var(--me-ink);font-family:var(--pixel);font-size:clamp(.45rem,calc(var(--cw) * .055),.8rem);line-height:1.9;text-align:center;padding:.8em .6em;margin:4px;
  display:flex;flex-direction:column;justify-content:center;gap:1lh}
.panel.theirs{background:var(--opp);color:var(--opp-ink)}
.panel h2{font-size:1.15em;margin:0;font-weight:400}
.panel h2 small{font-size:.65em;display:block}
/* icon then name, centred together as one group (both panels the same way); the name box stretches to the icon's
   height so their tops and bottoms line up. "went first" stays outside, under the group */
.panel-who{display:inline-flex;align-items:stretch;justify-content:center;gap:.4em;max-width:100%;vertical-align:middle}
/* the player's icon: their favourite wrestler's portrait (profile-card.js portraitOf), square, in a black outline.
   Sized from the card width, not the text, so it keeps its size when a long name shrinks to fit */
.panel-icon{--icon:clamp(2.5rem,calc(var(--cw) * .3),4.5rem);flex:none;width:var(--icon);height:var(--icon);object-fit:cover;object-position:top;
  border:3px solid var(--ink);background:#1b1b1b;image-rendering:pixelated}
/* the name in a white box with black text and a black outline, on every colour (on white only the outline shows).
   The username is one line that never wraps (profile-card.js fitNames shrinks it to fit); "(you)" goes under it, smaller */
.panel-name{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:.1em .4em;background:var(--paper);color:var(--ink);border:3px solid var(--ink);text-align:center}
.name-line{white-space:nowrap}
.name-you{font-size:.7em;line-height:1.4}
.panel .name-time{display:none}   /* the phone's copy of the time (see the 767px block); desktop shows it in the rows */
/* desktop: each panel sits beside its own player's cards (the opponent's row is above the arena, yours below) */
.mid .panel.theirs{align-self:start}
.panel p{display:contents}   /* its lines become rows of the panel */
.arena{position:relative;aspect-ratio:1.8;background:#e8e1cd;box-shadow:inset 0 0 0 3px var(--rope),inset 0 0 0 7px var(--mat),inset 0 0 0 9px var(--rope);overflow:hidden}
.arena canvas,.duel,.fx{position:absolute;inset:0;width:100%;height:100%}
.arena [hidden]{display:none}
.duel{display:flex;align-items:center;justify-content:center;gap:8%}
/* --s is the card's size in the showdown (1 = normal, 1.15 = a counter that works, .85 = the loser): scale from the bottom
   centre, with the individual scale property so the shake and lunge (transform) still run. 74% leaves room for 1.15 */
.duel > div{height:74%;aspect-ratio:750/1050;border-radius:4%;box-shadow:0 0 0 3px var(--c,var(--ink));scale:var(--s,1);transform-origin:50% 100%}
.duel > .resize{animation:resize calc(.2s * var(--anim, 1)) steps(3,end) both}   /* the change: quick and hard, no bounce or fade */
@keyframes resize{from{scale:var(--from)}to{scale:var(--s)}}
.duel.flip-in .b{animation:flip-in calc(.5s * var(--anim, 1)) ease-out both}   /* the reveal: their card turns, yours is face up already */
@keyframes flip-in{from{transform:rotateY(90deg)}}
.duel.hit-left .a{animation:lunge-r calc(.7s * var(--anim, 1)) ease-in-out}
.duel.hit-left .b{animation:shake calc(.5s * var(--anim, 1)) calc(.3s * var(--anim, 1))}
.duel.hit-right .b{animation:lunge-l calc(.7s * var(--anim, 1)) ease-in-out}
.duel.hit-right .a{animation:shake calc(.5s * var(--anim, 1)) calc(.3s * var(--anim, 1))}
@keyframes lunge-r{40%{transform:translateX(45%) rotate(8deg)}}
@keyframes lunge-l{40%{transform:translateX(-45%) rotate(-8deg)}}
@keyframes shake{20%,60%{transform:translateX(-8%) rotate(-6deg)}40%,80%{transform:translateX(8%) rotate(6deg)}}
.fx{display:flex;align-items:center;justify-content:center;gap:6%;pointer-events:none;z-index:2}
.fx:empty{display:none}
.fx > .card{pointer-events:auto;height:86%;width:auto;box-shadow:0 0 0 3px var(--ink);animation:pop calc(.35s * var(--anim, 1)) ease-out}
@keyframes pop{from{transform:scale(.4) rotate(-10deg);opacity:0}}
.coin{width:clamp(2.4rem,7vw,4.5rem);aspect-ratio:1;border-radius:50%;background:var(--burst);box-shadow:0 0 0 4px var(--ink);display:grid;place-items:center;font-family:var(--pixel);font-size:clamp(.8rem,2vw,1.4rem)}
.flip .coin{animation:spin calc(1s * var(--anim, 1)) cubic-bezier(.2,.7,.3,1)}
@keyframes spin{from{transform:rotateY(0) translateY(-40%)}to{transform:rotateY(1800deg)}}
.toss{display:flex;gap:.3em;font-size:clamp(4.5rem,16vw,9rem)}   /* who goes first: your coin left, theirs right */
.toss .coin-icon{position:relative;width:1em;height:1em;transition:transform calc(.35s * var(--anim, 1)) ease-in}
.toss.flipping .coin-icon{animation:spin calc(1s * var(--anim, 1)) cubic-bezier(.2,.7,.3,1)}   /* both at once, like the coin flip */
/* the winner lands on the loser, covering 80% of it (.8em of the coin plus the .3em gap) */
.toss.mine-won .mine{transform:translateX(1.1em);z-index:1} .toss.they-won .theirs{transform:translateX(-1.1em);z-index:1}
.banner{background:var(--ink);color:var(--burst);font-family:var(--display);font-weight:400;font-size:clamp(1rem,4.2cqw,2.6rem);line-height:1.05;max-width:92%;text-align:center;padding:.4em .8em;--c:var(--burst);animation:pop .35s ease-out}
.banner small{display:block;font-family:var(--pixel);font-size:.3em;color:var(--paper);margin-top:.8em}
.t-GRP{background:var(--grp)} .t-STK{background:var(--stk)} .t-SUB{background:var(--sub)}

/* Bottom bar, always in view under the camera: what just happened, then the turn indicator and your buttons */
.bar{flex:none;display:grid;gap:.4rem;padding:.5rem var(--pad) .6rem;border-top:3px solid var(--rope)}
/* Message box: every result and turn message, in the same pixel box as the status. Fixed width and two lines tall
   so the bar keeps its size when the message changes (and stays reserved while there is no message) */
.caption{justify-self:center;width:min(100% - 2 * var(--push), 42rem);min-height:calc(3.2em + 1.4em);margin:4px auto calc(4px + var(--push));
  display:grid;place-items:center;padding:.7em 1em;background:var(--paper);--sh:var(--ink);--off:var(--push);
  font-family:var(--pixel);font-size:clamp(.6rem,1.5vw,.85rem);line-height:1.6;text-align:center}
.caption:empty{visibility:hidden}
.caption .coin-icon{width:1.5em;height:1.5em;vertical-align:-.4em}
.caption b[class^="t-"]{font-family:var(--pixel);font-size:.6em;color:var(--paper);padding:.2em .4em;vertical-align:.15em}
.turn{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.6rem 1rem;min-height:3rem}
.status{margin:4px;background:var(--paper);font-family:var(--pixel);font-size:clamp(.5rem,1.2vw,.72rem);line-height:1.6;padding:.7em 1em;text-align:center}
.my-turn .status{background:var(--me);color:var(--me-ink)}
/* first pick: the prompt in the site yellow; the buttons are Grapple (blue), Submission (green) and Strike (red), each
   with its coin (the internal ids are still rock, paper, scissors) */
.btn .coin-icon{width:1.4em;height:1.4em;vertical-align:-.4em}
[data-phase="rps"] .status{background:var(--burst);color:var(--ink)}
/* move timer: your turn's countdown next to the status box, red with 10 seconds or less left (board.js tick) */
.countdown{margin:4px;min-width:2.6em;background:var(--paper);font-family:var(--pixel);font-size:clamp(.6rem,1.4vw,.85rem);padding:.6em .5em;text-align:center}
.countdown.hurry{color:var(--stk)}
.status .hurry{background:var(--ink);color:var(--paper);padding:0 .3em}   /* readable on any player colour */
.btn.rps-rock{background:var(--grp)} .btn.rps-paper{background:var(--sub)} .btn.rps-scissors{background:var(--stk)}
.actions{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem}
.end-note{flex-basis:100%;margin:0;text-align:center;font-size:clamp(.5rem,1.2vw,.72rem);line-height:1.6}   /* end screen: "<name> wants a rematch" */

/* Phone and narrow windows: wrestler cards fit 5 across the width; decks, discards and Boosts share the row under
   your cards; the opponent's decks sit in a thin row above their cards; the panels stack above and below the arena.
   The card width (--cw) and the grid that makes room for it must switch at the same width, or the decks don't fit. */
@media (max-width:767px){
  .board{--gap:6px;--pad:6px;--frame:5px;
    --cw:calc((100vw - .75rem - 2 * var(--frame) - 2 * var(--pad) - 4 * var(--gap)) / 5);
    --row:calc(5 * var(--cw) + 4 * var(--gap))}
  .board.live{width:calc(100vw - .75rem)}
  /* two rows: the logo on its own centred row, the buttons under it (they wrap if a small phone can't fit them on one row).
     min-height reserves the buttons' row before they appear, so the board below doesn't jump */
  .top{padding:.35rem .5rem;gap:.3rem .5rem;flex-wrap:wrap;min-height:calc(1.05rem + 44px + 1rem)}
  .top h1{font-size:1.05rem;flex-basis:100%;text-align:center}
  .mode{font-size:.42rem;padding:.4rem .45rem}
  .top .btn{font-size:.45rem;padding:.5em .6em;min-height:44px}
  .top h1{white-space:nowrap}
  .side{grid-template-columns:repeat(10,minmax(0,1fr));width:var(--row);justify-self:center}
  .side.opp{grid-template-areas:"wdeck . . . . . . . . fdeck" "s0 s0 s1 s1 s2 s2 s3 s3 s4 s4"}
  .side.me{grid-template-areas:"s0 s0 s1 s1 s2 s2 s3 s3 s4 s4" "fdeck fdeck fdisc fdisc . . wdisc wdisc wdeck wdeck" "boosts boosts boosts boosts boosts boosts boosts boosts boosts boosts";padding-bottom:2.6rem}
  .side .pile{align-self:end}
  .mid{grid-template-columns:1fr}
  /* score bars: the icon, the name box (username, then "(you)" and the time side by side), then Round / Wins / Points
     as a small table of 3 lines. board.js shrinks the text a step if it doesn't fit, so it never wraps or gets cut */
  .panel{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;gap:0 1.6em;white-space:nowrap;overflow:hidden}
  .panel h2 small{display:inline;margin-left:.6em}
  .panel p{display:grid;justify-items:start;line-height:1.5}
  .panel p [data-time]{display:none}   /* shown in the name box instead */
  .panel-who{align-items:center}
  .panel-icon{--icon:2.4lh}   /* about as tall as the name box's two lines */
  .panel-name{display:grid;grid-template-columns:auto auto;justify-content:center;column-gap:.8em}
  .panel-name .name-line{grid-column:1 / -1}
  .panel h2 .name-time{display:inline;font-size:.7em;line-height:1.4}
  .panel h2 .name-you,.panel h2 .name-time{margin:0}   /* not the "went first" spacing */
  .mid .panel.theirs{align-self:auto}
  .panel.theirs{order:-1}
  .arena{aspect-ratio:2}
}
/* A phone held upright: the opponent's bar above the arena, mine below it, between the arena and my cards. CSS order
   only, so the HTML order (and the screen reader order) stay as they are. Sideways phones keep the stacked layout above. */
@media (max-width:767px) and (orientation:portrait){
  .mid > .panel:not(.theirs){order:1}
  .mid > .arena{order:0}
}
/* Small phones: smaller text */
@media (max-width:440px){
  .mode{display:none} /* phone: no room for the mode label next to the title, menu and button */
  .panel{font-size:.45rem;padding:.6em .5em;line-height:1.7}
  .count{font-size:.38rem}
  .bar{padding:.35rem var(--pad) .45rem;gap:.25rem}
  .caption{font-size:.55rem}
  .turn{gap:.3rem .6rem;min-height:2.6rem}
}
/* Animation speed (Account settings, js/anim-speed.js): every animation time above is multiplied by --anim. Reduced
   motion: nothing slides, spins or shakes; the camera cuts and cards fade in place. Pages without the setting (no
   data-anim on <html>) follow the device's reduce-motion setting as before. */
[data-anim="reduced"] *{animation:none!important;transition:none!important}
/* the only fade: the camera between the centre and your cards (REDUCED.cameraFadeMs) */
[data-anim="reduced"] .stage.fade-in{animation:fade-in var(--anim-fade,700ms) ease-in-out!important}
/* a card turning face up (the reveal, a finisher, a Boost played): slow and simple, no bounce or zoom (REDUCED.flipMs) */
[data-anim="reduced"] :is(.duel.flip-in .b,.fx > .card){animation:flip-in var(--anim-flip,600ms) ease-in-out both!important}
/* your Boosts rise a little in place on your turn and drop back after (REDUCED.riseMs) */
[data-anim="reduced"] .boost{transition:transform var(--anim-rise,300ms) ease-in-out!important}
[data-anim="reduced"] .my-turn .boost,[data-anim="reduced"] .my-turn .boost[data-pickable]:hover{transform:translateY(-6%)}
/* "you can play this": a steady outline instead of the blinking glow */
[data-anim="reduced"] .glow{box-shadow:0 0 0 3px var(--burst),0 0 0 6px var(--ink)}
@keyframes fade-in{from{opacity:0}}
@media (prefers-reduced-motion:reduce){:root:not([data-anim]) *{animation:none!important;transition:none!important}}

/* Password screen (until real sign-in exists) */

/* Profile page: the language switch is two radio buttons drawn as chunky buttons; the chosen one is yellow */
.profile{display:grid;justify-items:center;gap:1.5rem;padding:2rem 1rem;text-align:center}
.profile h2{margin:0;font-family:var(--pixel);font-size:clamp(.8rem,2.4vw,1.1rem);background:var(--paper);padding:.6rem .9rem}
/* The setting boxes (Language dropdown, js/lang-pick.js, and the Tutorial toggle on Account settings): one white pixel
   box each, a small label on top and the current value under it. The Language box's stepped pixel arrow points right,
   and down while its list is open; it turns yellow only while pressed or open. The list hangs right under it, sharing
   its border, always white with black text; the language under the mouse or arrow keys, and the current one, get a
   light grey highlight. The Tutorial box has a small Yes / No button inside it. */
.lang-pick{display:grid;justify-items:center;gap:.9rem}
.pick-box{display:grid;gap:.35rem;align-content:center;width:100%;min-height:4.8rem;font-family:var(--pixel);text-align:left;color:var(--ink);
  background-color:var(--paper);cursor:pointer;padding:.8rem 1rem;--sh:var(--ink);--off:var(--push);-webkit-tap-highlight-color:transparent}
.pick-label{font-size:.6rem;line-height:1.6}   /* the same size in both boxes, so the labels line up */
.pick-value{font-size:.8rem;line-height:1.3}
.pick-box:focus{outline:none}
.pick-box:focus-visible{outline:3px solid var(--ink);outline-offset:6px}   /* keyboard only, never after a click or tap */
/* Account settings: the two boxes side by side, the same width and height, as wide as the Change username + Change
   password pair together and with its gap (stacked and full width on a phone). 36rem so the Tutorial box's label lines
   and its small Yes / No button fit side by side without touching (on a phone the full width is enough). */
.prefs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;width:min(100%,36rem)}
.prefs .lang-pick{display:flex;min-width:0}
.prefs .dropdown{flex:1;min-width:0}
.prefs .dropdown .pick-box{height:100%}
/* The text is bigger and bold everywhere: the root size grows 15%, so the rem and em sizes grow with it; the rest of the text
   is bold. The pixel font is not bolded (it smears) */
html{font-size:115%}
body{font-weight:700}
.px{font-weight:400}
.pick-label.two-lines{white-space:pre-line}   /* the line break is in the text itself (settings.showRules), so each language picks where it breaks */
.toggle{flex:1;min-width:0;margin:0 var(--push) var(--push) 0;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:.8rem}
/* Yes / No on the right, centred between the label's two lines. It always takes the room of the longest value (3
   letters in this pixel font, where every letter is the same width), so the label never moves or rewraps between Yes
   and No; each label line stays on one line. */
.toggle .pick-label > span{white-space:nowrap}
/* Yes / No is a small button inside the white box: black outline, yellow for Yes, white for No (the box itself stays
   white). It runs from the top of the label's first line to the bottom of its second, and has one width for both
   (3 letters + its padding and border), so it's the same size on Yes and No and nothing moves. The whole box
   is still the one button you press. */
.toggle .pick-value{align-self:stretch;display:flex;align-items:center;justify-content:center;width:calc(3ch + 1em + 6px);padding:0 .5em;
  background:var(--paper);border:3px solid var(--ink);box-shadow:3px 3px 0 var(--ink)}   /* as tall as the two label lines, top to bottom */
.toggle[aria-pressed="true"] .pick-value{background:var(--burst)}
.settings > .err{margin:0;min-height:1.2em;color:var(--stk)}
.dropdown{position:relative;min-width:13rem;margin:0 var(--push) var(--push) 0}
.dropdown .pick-box{padding-right:2.6rem;background:var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 10' shape-rendering='crispEdges'%3E%3Cpath fill='%230a0a0a' d='M0 0v10h1V9h1V8h1V7h1V6h1V4H4V3H3V2H2V1H1V0z'/%3E%3C/svg%3E") no-repeat right 1rem center/.55rem auto}
.dropdown .pick-box[aria-expanded="true"]{background-size:1.1rem auto;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 5' shape-rendering='crispEdges'%3E%3Cpath fill='%230a0a0a' d='M0 0h10v1H9v1H8v1H7v1H6v1H4V4H3V3H2V2H1V1H0z'/%3E%3C/svg%3E")}
.dropdown .pick-box:active,.dropdown .pick-box[aria-expanded="true"]{background-color:var(--burst)}
.dropdown ul{position:absolute;z-index:5;top:100%;left:0;right:0;margin:0;padding:0;list-style:none;background:var(--paper);color:var(--ink);
  font-family:var(--pixel);font-size:1rem;line-height:1.4;--sh:var(--ink);--off:var(--push)}
.dropdown ul[hidden]{display:none}
.dropdown ul:focus{outline:none}
.dropdown li{padding:.55em .9em;cursor:pointer;-webkit-tap-highlight-color:transparent}
.dropdown li.active,.dropdown li[aria-selected="true"]{background:#e2e2e2}


/* Account pages (sign up, sign in, profile): normal scrolling pages, unlike the board */
body.page{overflow-y:auto;height:auto;min-height:100%}
.auth{display:grid;gap:.5rem;width:min(100%,24rem);text-align:left}
.auth[hidden],[data-view][hidden]{display:none}
.auth h2{justify-self:center;margin:0 0 .8rem}
.auth label{display:grid;gap:.3rem;font-family:var(--pixel);font-size:.6rem;line-height:1.5;margin-top:.5rem}
.auth input{font:inherit;font-family:var(--body);font-size:1.15rem;padding:.45rem .7rem;border:4px solid var(--ink);background:var(--paper);width:100%}
.auth input:focus-visible{outline:4px solid var(--burst);outline-offset:0}
/* sign-up: the age and agreement tick box, the box on the left of its sentence, then a link to the policies */
.auth .agree{grid-template-columns:auto 1fr;align-items:start;column-gap:.6rem;font-family:var(--body);font-size:1.05rem;line-height:1.3}
.auth .agree input{width:1.4rem;height:1.4rem;margin:.1rem 0 0;padding:0;accent-color:var(--ink)}
/* sign-up: the age slider. .unset = not moved yet: no thumb, so no age looks chosen */
.age-slider{width:100%;accent-color:var(--ink)}
.age-slider.unset::-webkit-slider-thumb{opacity:0}
.age-slider.unset::-moz-range-thumb{opacity:0}
.age-ends{display:flex;justify-content:space-between;font-family:var(--body);font-size:1rem}
.age-shown{margin:0;text-align:center}
.auth .legal-link{font-family:var(--body);font-size:1rem;color:inherit}
/* Account settings: Delete my account, folded away at the bottom; the button in the Strike red */
.delete-account{width:min(100%,24rem);font-family:var(--body);font-size:1.05rem}
.delete-account summary{cursor:pointer;text-decoration:underline;text-align:center}
.delete-account p{margin:0}
.btn.danger{background:var(--stk);color:var(--ink)}   /* black on this red is 4.54:1 (passes AA); white would be 4.36:1 */
.auth small{font-size:.95rem;line-height:1.25}
/* the user ID and its Reroll button side by side, wrapping on a narrow phone (js/user-id-pick.js) */
.uid-pick{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem}
.uid-pick .btn{margin-top:0}
.uid-pick.alone{justify-content:center}
/* Account settings, Change user ID: the two IDs in big white boxes on the left, Reroll between them on the right and
   Set user ID under it */
.uid-form{width:min(100%,30rem)}
.uid-grid{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.3rem 1rem;
  grid-template-areas:"lnow ." "fnow reroll" "lnew reroll" "fnew set"}
.uid-l-now{grid-area:lnow}.uid-f-now{grid-area:fnow}.uid-l-new{grid-area:lnew}.uid-f-new{grid-area:fnew}
.uid-grid .uid-box{grid-area:reroll;align-self:center}
.uid-grid .uid-set{grid-area:set;margin-top:0;justify-self:stretch}
.uid-grid [hidden]{display:none}
.uid-field{display:block;min-height:1.4em;padding:.55rem .8rem;background:var(--paper);color:var(--ink);border:4px solid var(--ink);
  font-family:var(--body);font-size:1.25rem;font-weight:700;overflow-wrap:anywhere}
#uid-shown{overflow-wrap:anywhere}   /* a long ID like ElectricHedgehog#1234 wraps on a phone */
.uid{display:inline-block;padding:.45rem .8rem;background:var(--paper);font-size:.9rem;overflow-wrap:anywhere}   /* padding keeps the .px outline off the letters */
.pc-id{margin:0;padding:.3rem .7rem 0;font-size:.95rem}
.pc-id:last-child{padding-bottom:.6rem}
.auth small.good{color:var(--sub)}
.auth small.bad,.auth .err{color:var(--stk)}
.auth .err{margin:.4rem 0 0;min-height:1.3em}
.auth .btn{justify-self:center;margin-top:.5rem}
.link{justify-self:center;background:none;border:0;padding:.3rem;font:inherit;text-decoration:underline;cursor:pointer}
.link:focus-visible{outline:4px solid var(--ink)}
.profile a{color:inherit}
.account,.menu,[data-view]{display:grid;justify-items:center;gap:.6rem;width:min(100%,24rem)}
.account p,.menu p,.switch{margin:0;text-align:center}
.menu h2{margin:0 0 .6rem}
.menu .btn{width:min(100%,18rem);text-align:center}   /* one width for every label: 18rem fits the longest translation (Portuguese history, 21 letters) */
.switch{margin-top:1rem}
.buy{display:grid;justify-items:center;gap:.6rem;margin-top:1rem}
.refund{width:min(100%,24rem);margin-top:1.5rem}   /* Account settings' refund part */
.refund-no{display:grid;justify-items:center;gap:.4rem}
.refund select{width:100%;font:inherit;padding:.55rem .8rem;border:4px solid var(--ink);background:var(--paper);color:var(--ink)}   /* "Don't have a code?" and the Buy button under the code form */
.bought{margin:0 0 .6rem;background:var(--burst);padding:.8rem 1rem;text-align:center;line-height:1.35}   /* "Check your email" after buying */

/* Profile: the colour menu (opened by the paint bucket on your card): swatches are radio buttons drawn as squares */
/* A speech bubble floating under the bucket (profile.html places it and sets --tail, the tail's middle). The tail is
   a stepped pixel triangle: black (::before) under white (::after), 4px smaller, so it joins the .px outline. */
.colour-menu{position:absolute;z-index:50;width:min(20rem,100vw - 32px);display:grid;justify-items:center;gap:1.1rem;padding:1rem;background:var(--paper)}
.colour-menu::before,.colour-menu::after{content:"";position:absolute;bottom:100%}
.colour-menu::before{left:calc(var(--tail) - 14px);width:28px;height:16px;background:var(--ink);
  clip-path:polygon(12px 0,16px 0,16px 4px,20px 4px,20px 8px,24px 8px,24px 12px,28px 12px,28px 16px,0 16px,0 12px,4px 12px,4px 8px,8px 8px,8px 4px,12px 4px)}
.colour-menu::after{left:calc(var(--tail) - 10px);width:20px;height:12px;background:var(--paper);
  clip-path:polygon(8px 0,12px 0,12px 4px,16px 4px,16px 8px,20px 8px,20px 12px,0 12px,0 8px,4px 8px,4px 4px,8px 4px)}
.colour-menu[hidden]{display:none}
.swatches{display:grid;grid-template-columns:repeat(6,minmax(0,2.4rem));gap:.55rem}
.swatch{position:relative;aspect-ratio:1;background:var(--sw);cursor:pointer;box-shadow:0 0 0 3px var(--ink)}
.swatch input{position:absolute;opacity:0;width:1px;height:1px}
.swatch:has(:checked){box-shadow:0 0 0 3px var(--paper),0 0 0 7px var(--ink)}
.swatch:has(:focus-visible){outline:4px solid var(--burst);outline-offset:6px}
.swatch.custom{grid-column:span 6;aspect-ratio:auto;display:flex;align-items:center;justify-content:center;gap:.6rem;padding:.35rem .6rem;
  background:var(--paper);font-family:var(--pixel);font-size:.55rem;text-transform:uppercase}
.swatch.custom input[type=color]{position:static;opacity:1;width:2.2rem;height:1.6rem;padding:0;border:2px solid var(--ink);background:none;cursor:pointer}
/* your board panel, in your colour, to the right of the card (under it on a phone) */
.you-preview{--cw:200px;grid-area:prev}
.you-preview .panel{margin:4px;text-align:center}
.you-preview .panel h2{background:none;box-shadow:none;padding:0;margin:0;font-family:inherit;font-size:1.15em;font-weight:400}   /* the board panel heading, not the Profile page heading */
.stats{text-align:center}
.stats h3{font-family:var(--pixel);font-size:.7rem;margin:0 0 1.2rem;background:var(--paper);padding:.6rem .9rem;display:inline-block}
/* Account settings page (settings.html): two buttons, then one form at a time (.auth: full width up to 24rem) */
.settings .choices{display:flex;flex-wrap:wrap;justify-content:center;gap:1rem;width:min(100%,36rem)}   /* as wide as the settings boxes */
.settings .choices .btn{flex:1 1 0}
.btn[aria-pressed="true"]{transform:translate(var(--push),var(--push));--off:0px}   /* the form that's open: looks pressed */
.auth .err.good{color:var(--sub)}
.settings .forgot-note{text-align:center}
@media (max-width:767px){.settings .choices{flex-direction:column} .settings .choices .btn{flex:none}   /* phone: stacked, full width */
  .settings .back{width:calc(min(100%,24rem) - var(--push))}   /* same width as the change buttons */
  .settings .lang-pick{width:min(100%,24rem)} .settings .dropdown{width:calc(100% - var(--push))}
  .prefs{grid-template-columns:1fr;width:100%}   /* phone: stacked, each full width; the page's 16px padding is the gap */
  .prefs #anim-pick{order:1} .prefs .pref-tut{order:2} .prefs .pref-rules{order:3}   /* Language, Animation speed, Tutorial, Rules */
  .prefs .lang-pick{width:100%}}
.stats dl{display:flex;justify-content:center;gap:2.5rem;margin:0}
.stats dd{font-family:var(--pixel);font-size:1.2rem;margin:.4rem 0 0}
/* the Volume box on the Profile page: the same box as the Account settings switches (.pick-box), the label over the bar */
.volume{display:grid;gap:.35rem;width:min(100%,24rem);font-family:var(--pixel);color:var(--ink);background-color:var(--paper);
  padding:.8rem 1rem;--sh:var(--ink);--off:var(--push)}
.volume label{font-size:.6rem;line-height:1.6}
.volume input{width:100%;min-height:2.75rem;margin:0}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}   /* read by screen readers only */

/* Show / Hide button inside the right edge of a password field (play/index.html adds them) */
.pw{position:relative;display:block;margin-top:-.2rem}
.pw input{padding-right:6.2rem}   /* room for the longest label, "Ocultar" */
.pw input::-ms-reveal,.pw input::-ms-clear{display:none}   /* Edge's own eye button would double up */
.pw-toggle{position:absolute;top:4px;right:4px;bottom:4px;min-width:3.6rem;padding:0 .6rem;border:0;background:var(--burst);
  font-family:var(--pixel);font-size:.55rem;text-transform:uppercase;cursor:pointer;touch-action:manipulation}
.pw-toggle:focus-visible{outline:3px solid var(--ink);outline-offset:-3px}

/* Deck builder (decks.html): two tabs, the name field, every wrestler in the pool as a card, and a bar that stays at
   the bottom of the screen. As many cards per row as fit, so it still works when the pool grows; 2 per row on a phone. */
.decks{display:grid;justify-items:center;gap:1.2rem;padding:2rem 1rem 1rem;width:100%;max-width:80rem;margin:0 auto}
.decks h2{margin:0;font-family:var(--pixel);font-size:clamp(.8rem,2.4vw,1.1rem);background:var(--paper);padding:.6rem .9rem}
.deck-tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:1rem}
.deck-tabs .btn{display:grid;gap:.5em;text-transform:none;min-width:10rem}
.deck-tabs .btn small{font-size:.8em;opacity:.8}
.deck-tabs .btn[aria-selected="true"]{background:var(--burst);transform:translate(var(--push),var(--push));--off:0px}
#deck-panel{display:grid;justify-items:center;gap:.8rem;width:100%}
.deck-name{display:grid;gap:.3rem;width:min(100%,24rem);font-family:var(--pixel);font-size:.6rem;line-height:1.5}
.deck-name input{font:inherit;font-family:var(--body);font-size:1.15rem;padding:.45rem .7rem;border:4px solid var(--ink);background:var(--paper);width:100%}
.deck-name input:focus-visible{outline:4px solid var(--burst);outline-offset:0}
.deck-hint{margin:0;text-align:center;font-size:1.05rem}
.pool{list-style:none;margin:0;padding:0;width:100%;display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.pick{display:grid;gap:.4rem;width:100%;padding:0;border:0;background:none;font:inherit;color:inherit;cursor:pointer;text-align:center;
  -webkit-tap-highlight-color:transparent;transition:transform .12s}
.pick .card{transition:box-shadow .12s}
.pick:hover:not(:disabled) .card{transform:translateY(-3px)}
.pick[aria-pressed="true"] .card{box-shadow:0 0 0 5px var(--me),0 0 0 9px var(--ink)}   /* in the deck: ringed in your colour */
.pick:disabled{opacity:.4;cursor:not-allowed}
.pick:focus-visible{outline:4px solid var(--ink);outline-offset:6px}
.pick-fin{font-size:1rem;line-height:1.15}
.deck-bar{position:sticky;bottom:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.8rem 1rem;
  padding:.8rem 1rem;background:var(--paper);border-top:4px solid var(--ink)}
.deck-count{font-family:var(--pixel);font-size:.8rem;background:var(--burst);padding:.5rem .7rem}
.deck-msg{flex-basis:100%;margin:0;min-height:1.2em;text-align:center;color:var(--stk)}
.deck-msg.good{color:var(--sub)}
.ask-text{margin:.4rem 0 0}
.ask-buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:.8rem;margin-top:1rem}
.deck-pick .err.good{color:var(--sub)}   /* the Report window's "Thanks" (js/report.js) */
@media (max-width:767px){
  .pool{grid-template-columns:repeat(2,1fr)}
  .deck-tabs{width:100%}
  .deck-tabs .btn{flex:1 1 0;min-width:0}
  .deck-bar .btn{flex:1 1 auto}
  .pick-fin,.skel-pick .skel-line{min-height:2.3rem}   /* two lines on a phone: a long name wraps, and every row stays the same height */
  .decks-page .deck-hint{min-height:2.6em}   /* the hint wraps to two lines on a phone */
}
/* Decks page (decks.html): the bottom bar sits at the bottom of the screen even when the page is short (the main area
   grows), and the placeholders show at the real sizes before the cards arrive */
body.decks-page{min-height:100dvh}   /* not 100%: the bar would hide behind a phone's address bar */
.decks-page main.decks{flex:1 0 auto;align-content:start}
.decks-page .decks h2{min-height:calc(1.3em + 1.2rem)}   /* one line of text plus the heading's padding */
.decks-page .deck-name > span{min-height:1.5em}   /* the label's one line (the input has its own height) */
.decks-page .deck-hint{min-height:1.3em}
.decks-page .deck-tabs .skel-line{width:6em}   /* about "Deck 1" */
.decks-page .deck-count .skel-line{width:7em}   /* "10 / 10", so the buttons beside it don't move when the number comes */
.decks-page .deck-bar{padding-bottom:calc(.8rem + env(safe-area-inset-bottom))}   /* phones with a home bar */
.skel-pick{display:grid;gap:.4rem;font-size:1rem;line-height:1.15}   /* a placeholder .pick: the card, then the finisher's line */
.skel-pick > .skel{aspect-ratio:750/1050;border-radius:4%}
.skel-pick .skel-line{justify-self:center;width:60%}
.pool-msg{grid-column:1/-1;margin:0;text-align:center;color:var(--stk)}   /* cards.json didn't load */

/* "Choose your deck" window (js/deck-pick.js): a Rules-style window listing saved decks and Random deck */
.deck-options{list-style:none;margin:.8rem 0 0;padding:0;display:grid;gap:.8rem}
.deck-option{display:grid;gap:.5rem;width:100%;padding:.8rem;border:4px solid var(--ink);background:var(--paper);font:inherit;color:inherit;
  text-align:left;cursor:pointer}
.deck-option:hover:not(:disabled),.deck-option:focus-visible{background:var(--burst);outline:none}
.deck-option:disabled{opacity:.5;cursor:wait}
.dp-name{font-family:var(--pixel);font-size:.7rem;line-height:1.5}
.dp-art{display:grid;grid-template-columns:repeat(10,1fr);gap:3px}
.dp-art img{width:100%;aspect-ratio:1;object-fit:cover;object-position:top;border:2px solid var(--ink);image-rendering:pixelated}
@media (max-width:767px){.dp-art{grid-template-columns:repeat(5,1fr)}}
.dp-build{margin:1rem 0 0;font-family:var(--pixel);font-size:.65rem}
.dp-build a{color:inherit}
.level-option{grid-template-columns:auto 1fr;align-items:center;gap:.8rem}   /* Vs CPU level: the wrestler's picture, then the level */
.level-option img{width:3.5rem;aspect-ratio:1;object-fit:cover;object-position:top;border:3px solid var(--ink);background:#1b1b1b;image-rendering:pixelated}
.level-option small{display:block;font-size:.8em;margin-top:.3em}
.deck-pick .err{min-height:1.2em;color:var(--stk)}

/* A number on a menu button or tab: friend requests and challenges waiting (index.html, friends.html) */
.btn .n{display:inline-block;min-width:1.8em;margin-left:.4em;padding:.25em .4em;background:var(--stk);color:var(--paper);text-align:center}
.btn .n[hidden]{display:none}

/* Profile card (js/profile-card.js): a band in the player's colour behind their favourite wrestler and name, with
   black text (white only on black) from inkOn() in colors.js (--pc-ink), then their record on white. Same everywhere it shows. */
.player-card{display:grid;background:var(--paper);text-align:left;margin:4px}   /* no width:100%: with the 4px margin for the pixel border it would stick out */
.pc-band{display:flex;align-items:center;gap:.8rem;padding:.6rem;background:var(--pc);color:var(--pc-ink)}
.pc-band:not(:last-child){border-bottom:var(--b) solid var(--ink)}   /* the line between band and stats: as thick as the card's .px border */
.pc-art{flex:none;width:4.5rem;aspect-ratio:1;object-fit:cover;object-position:top;border:3px solid var(--ink);background:#1b1b1b;image-rendering:pixelated}
.pc-name{min-width:0;margin:0;padding:.2em .45em;background:var(--paper);color:var(--ink);border:3px solid var(--ink);font-family:var(--pixel);font-size:clamp(.7rem,2.6vw,.9rem);font-weight:400;line-height:1.4;white-space:nowrap}   /* never split: fitNames shrinks it */
.pc-record,.pc-vs{margin:0;padding:.5rem .7rem 0;font-size:1.05rem}
.pc-record:last-child,.pc-vs:last-child{padding-bottom:.6rem}
.pc-actions{display:flex;flex-wrap:wrap;gap:.8rem;padding:.7rem .7rem .9rem}
.pc-actions .btn{flex:1 1 auto}

/* Friends page and the Challenge a friend view: one column of cards */
.friends-page{gap:1rem}
.friends-page h3:not(.pc-name),[data-view="history"] h3,.recent-title{margin:.6rem 0 0;font-family:var(--pixel);font-size:.65rem;font-weight:400;background:var(--paper);padding:.5rem .7rem}
.friends-page .deck-tabs .btn{min-width:0;display:inline-block}
.friends-page > .err{margin:0;min-height:1.3em;color:var(--stk)}
/* the message line under the tabs takes no room while it's empty (out of the grid, so no gap either); it stays in
   the page, so screen readers still hear a message when one appears */
.friends-page > .err:empty{position:absolute}
.friends-page .err.good{color:var(--sub)}
.friends-view,#tab-add{display:grid;justify-items:center;gap:.8rem;width:min(100%,24rem)}
.friends-view[hidden],#tab-add[hidden]{display:none}
.friend-list{list-style:none;margin:0;padding:0;display:grid;gap:1rem;width:100%}
.friends-view .none,.friend-list .none{margin:0;text-align:center}
/* the Friends tab uses the page's width: the cards fill it in columns (one column on a phone) */
.friends-view{width:min(100%,70rem)}
.friends-view .friend-list{grid-template-columns:repeat(auto-fill,minmax(min(100%,19rem),1fr));align-items:start}
.friends-view .friend-list > .none,.friends-view > .none{grid-column:1/-1}
.friend-search{width:100%;display:grid;gap:.3rem;font-family:var(--body);font-size:1.1rem;text-align:left}
.friend-search input{width:100%;padding:.6rem .8rem;font:inherit;background:var(--paper);color:var(--ink);border:4px solid var(--ink)}
.friend-search input:focus-visible{outline:4px solid var(--burst);outline-offset:0}
.friends-view .err{margin:0;min-height:1.3em;color:var(--stk)}

/* Profile page: your card and the favourite wrestler picker (small pictures, the chosen one ringed) */
.my-card{display:grid;justify-items:center;gap:1rem;width:min(100%,40rem)}
.my-card > h3{font-family:var(--pixel);font-size:.7rem;margin:0;background:var(--paper);padding:.6rem .9rem}
/* card | board preview; the colour menu floats over them (absolute, placed from here) */
.card-row{position:relative;display:grid;grid-template-columns:minmax(0,24rem) 13rem;grid-template-areas:"card prev";justify-content:center;align-items:center;column-gap:1.2rem;width:100%}
.card-preview{grid-area:card}
.colour-err{margin:0;min-height:1.3em;color:var(--stk)}
.pc-band{position:relative}
.pc-edit{position:absolute;top:.2rem;right:.2rem;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;background:none;color:inherit;cursor:pointer}
.pc-edit svg{display:block;shape-rendering:crispEdges}   /* 24px: 2px per pixel of the 12-pixel drawing */
.pc-edit:focus-visible{outline:3px solid var(--burst);outline-offset:0}
.pc-band:has(.pc-edit){padding-right:calc(44px + .5rem)}   /* the name never runs under the bucket */
/* phone: the board preview goes under the card, full width (.profile's 1rem padding is the 16px each side) */
@media (max-width:767px){
  .card-row{grid-template-columns:minmax(0,1fr);grid-template-areas:"card" "prev";row-gap:1rem}
  .colour-menu{width:calc(100vw - 32px)}
}
.favourite{border:0;margin:0;padding:0;width:100%}
.favourite legend{font-family:var(--pixel);font-size:.6rem;margin:0 auto .8rem;padding:0}
.fav-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(3.2rem,1fr));gap:.5rem}
.fav{position:relative;cursor:pointer;box-shadow:0 0 0 3px var(--ink)}
.fav img{width:100%;aspect-ratio:1;object-fit:cover;object-position:top;background:#1b1b1b;image-rendering:pixelated}
.fav input{position:absolute;opacity:0;width:1px;height:1px}
.fav:has(:checked){box-shadow:0 0 0 3px var(--paper),0 0 0 7px var(--ink)}
.fav:has(:focus-visible){outline:4px solid var(--burst);outline-offset:6px}
.favourite .err{margin:.6rem 0 0;min-height:1.3em;color:var(--stk)}

/* Match history (index.html#history): opponent in their colour, result, score, date */
/* match history (history.html): the page number between the two arrows */
.pager{display:flex;align-items:center;justify-content:center;gap:1rem}
.pager[hidden]{display:none}
/* the page number: a white box the same size as the arrow buttons beside it (the .btn font, padding and shadow) */
.pager span{font-size:clamp(.55rem,1.4vw,.75rem);line-height:1.3;padding:.75em 1em;background:var(--paper);white-space:nowrap;
  --sh:var(--ink);--off:var(--push);margin:0 var(--push) var(--push) 0}
.history{list-style:none;margin:0;padding:0;display:grid;gap:.5rem;width:100%}
.h-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:.3rem .8rem;padding:.5rem .6rem;background:var(--paper);text-align:left;box-shadow:0 0 0 3px var(--ink)}
.h-name{justify-self:start;max-width:100%;padding:.2rem .45rem;background:var(--pc);color:var(--pc-ink);font-family:var(--pixel);font-size:.6rem;line-height:1.5;overflow-wrap:anywhere}
.h-result{font-family:var(--pixel);font-size:.6rem;font-weight:400}
.h-result.win{color:var(--sub)} .h-result.loss{color:var(--stk)}
.h-score{font-family:var(--pixel);font-size:.6rem}
.h-row time{grid-column:1 / -1;font-size:.95rem}
[data-view="history"] .none,[data-view="history"] .err{margin:0;text-align:center}
[data-view="history"] .err{color:var(--stk);min-height:1.3em}

/* Tutorial (js/tutorial.js). The coach: white with a black border, Kylo's picture, one line and its buttons. It never
   moves, slides, fades or resizes; only the outline on the board moves.
   PC: fixed at the bottom right of the board's view, above the buttons bar (tutorial.js settle()).
   Phone: at the bottom of the screen in the page flow, full width with a 16px gap, so the board shrinks above it and
   nothing is covered. */
.coach{position:fixed;right:16px;bottom:16px;z-index:20;width:min(20rem,calc(100vw - 32px));display:flex;gap:.8rem;align-items:flex-start;
  background:var(--paper);border:4px solid var(--ink);padding:.8rem;font-family:var(--body);font-size:1.15rem;line-height:1.35}
.coach > img{flex:none;width:3.5rem;aspect-ratio:1;object-fit:cover;object-position:top;border:3px solid var(--ink);background:#1b1b1b;image-rendering:pixelated}
.coach-body{display:grid;gap:.6rem;min-width:0}
.coach-text{margin:0;overflow:hidden}   /* tutorial.js sets its height to the longest line; text sits at the top */
.coach-actions{display:flex;flex-wrap:wrap;gap:.4rem;min-height:2.6rem}   /* keeps its room when there's no Next */
.coach-rules{justify-self:start}
/* what the coach is talking about: a thick outline; anything you can't press right now is dimmed */
.coach-target{outline:5px solid var(--ink);outline-offset:3px;box-shadow:0 0 0 11px var(--burst);position:relative;z-index:2}   /* above the dimmed parts */
.coach-target.coach-blink{animation:coach-blink .4s step-end 3}   /* a new line: three hard blinks, then solid (tutorial.js flash) */
@keyframes coach-blink{0%{outline-color:transparent}50%{outline-color:var(--ink)}}
/* a new line: the whole box flashes yellow once, for 0.43s (20% longer than the old two blinks), then white, in one hard
   step. The marked words switch the other way, so they are white while the box is yellow (tutorial.js flash restarts it) */
.coach.coach-new{animation:coach-yellow .43s step-end 1}
.coach.coach-new .coach-key{animation:coach-key .43s step-end 1}
@keyframes coach-yellow{from{background:var(--burst)}to{background:var(--paper)}}
@keyframes coach-key{from{background:var(--paper)}to{background:var(--burst)}}
/* reduced motion: the box never flashes (tutorial.js doesn't add coach-new), and this guard keeps it white and the marked
   words yellow even if the class ever shows up. The outline is solid, with no blink */
[data-anim="reduced"] .coach.coach-new{animation:none;background:var(--paper)}
[data-anim="reduced"] .coach.coach-new .coach-key{animation:none;background:var(--burst)}
[data-anim="reduced"] .coach-target.coach-blink{animation:none}
@media (prefers-reduced-motion:reduce){:root:not([data-anim]) .coach.coach-new{animation:none;background:var(--paper)}:root:not([data-anim]) .coach.coach-new .coach-key{animation:none;background:var(--burst)}:root:not([data-anim]) .coach-target.coach-blink{animation:none}}
.coach-key{background:var(--burst);color:var(--ink)}   /* the instruction in a line: [[...]] in en.json */
.tutorial #board [data-act]:not([data-pickable]){opacity:.4}
.tutorial-locked #menu,.tutorial-locked #profile-open{display:none}   /* the first tutorial: Skip tutorial is the way out */
@media (max-width:767px){
  .coach{position:static;width:auto;margin:0 16px 16px;font-size:1rem;padding:.6rem}
  .coach > img{width:2.6rem}
}
/* a phone held upright: a smaller box, so the arena above it shows more. Rules sits on Next's row; buttons stay 44px tall.
   tutorial.js settle() caps the text at 5 lines here and scrolls the rest inside the box. */
@media (max-width:767px) and (orientation:portrait){
  .coach{font-size:.9rem;padding:.45rem;gap:.5rem}
  .coach > img{width:2rem}
  .coach-body{grid-template-columns:minmax(0,1fr) auto;gap:.35rem .5rem}
  .coach-text{grid-column:1/-1;line-height:1.25}
  .coach-actions{grid-column:1;min-height:2.75rem}
  .coach-actions .btn,.coach-rules{min-height:44px}
  .coach-rules{grid-column:2;justify-self:end}
}
/* main menu, first time only: just this box under "Welcome!" ("New to Wrestling Showdown? Play the tutorial"); Skip
   turns it into "Are you sure?" in place. No fade. Phone: full width with a 16px gap each side. */
/* The menu keeps its size while the box is up: its buttons stay in place, hidden, and the box lies over the menu's own
   space under the heading (1.95em = the heading's line at its 1.5em and 1.3 line-height; .6rem its gap). Its two
   dropdowns stack, the menu's width. */
.menu.first-login{position:relative}
.menu.first-login > :not(h2):not(.tutorial-ask){visibility:hidden}
.menu.first-login > .tutorial-ask{position:absolute;left:0;right:0;top:calc(1.95em + .6rem);width:auto;max-width:none;margin:0}
.menu.first-login .prefs{grid-template-columns:1fr}
.tutorial-ask{display:grid;background:var(--paper);border:4px solid var(--ink);padding:.8rem 1rem;margin-bottom:.6rem;text-align:center;max-width:32rem}   /* wide enough for the two dropdowns side by side */
.ask-step{display:grid;gap:.5rem;justify-items:center}
.tutorial-ask[hidden],.ask-step[hidden]{display:none}   /* their display:grid would otherwise beat hidden */
.tutorial-ask p{margin:0;font-family:var(--body);font-size:1.15rem}
.tutorial-ask .sure-title,.sure .sure-title{font-family:var(--pixel);font-size:clamp(.9rem,2.6vw,1.2rem);line-height:1.4}
.tutorial-ask .ask-prefs{width:100%;margin-bottom:.9rem}   /* Language and Animation speed at the top of the box (the .prefs grid: two equal columns, stacked on a phone) */
@media (max-width:767px){.tutorial-ask{width:calc(100vw - 32px);max-width:none;box-sizing:border-box}
  .tutorial-ask .lang-pick{width:100%} .tutorial-ask .dropdown{width:calc(100% - var(--push));min-width:0}}   /* full width: the box's 16px padding is the gap */
/* Set up your profile, before the first tutorial (tutorial.js setupProfile()): a window like the Rules window; one column */
.setup .setup-card{flex:none;display:grid;justify-items:center;padding:.8rem 1.2rem 0}
/* the fixed bottom: a line like the title's, then the note and Save / Later, always in view */
.setup-foot{flex:none;padding:.2rem 1.2rem .9rem;border-top:4px solid var(--ink);text-align:center}
.setup-foot p{margin:.5rem 0 0}
.setup .setup-card .player-card{width:min(100%,24rem)}
.setup .swatches{justify-content:center}
.setup-note{font-size:.95rem}
.setup .err{min-height:1.2em;color:var(--stk)}
.setup-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.8rem;margin-top:.8rem}
/* "Are you sure?" on Skip tutorial (tutorial.js): the main menu's confirm step, in a window like the Rules window */
.rules.sure{width:min(26rem,100vw - 32px)}
.sure .rules-text{text-align:center;padding-top:1.2rem}
.sure .sure-title{margin:0}

/* Keyboard and controller focus (js/nav.js): nav-keys is on while a key or a pad is used, off after a mouse or touch press.
   Solid and inside the box (outline-offset 3px), so nothing around it changes size. Clipped only by overflow:hidden parents. */
.nav-keys :focus{outline:4px solid var(--ink);outline-offset:3px}
