/* Kaizen Ninja Level 1: layout, HUD, cards, room frame, touch pads.
   Everything inside #frame is laid out in logical px on a 960 x 540 screen; ui.js scales #frame to fit the window
   (letterboxed) and sets --k to that scale. Touch pads and the portrait warning sit outside #frame in real CSS px.
   Tokens follow ../styles/styles.css: ink, paper, orange, yellow, plus the navy of the plant signs. */
:root {
  color-scheme: dark;
  --ink: #15151d;
  --paper: #f6f4ef;
  --white: #ffffff;
  --orange: #f26522;
  --orange-text: #c2410c;
  --yellow: #f6b800;
  --navy: #1b2550;
  --navy-2: #111833;
  --navy-3: #2a3770;
  --red: #d7262a;
  --green: #17803d;
  --muted: #5b6070;
  --line: #e2ded5;
  --letterbox: #0b0d14;
  --head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
  --k: 1;
  --tap: 56px;            /* smallest button height in logical px; touch devices raise it to 56 CSS px */
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--letterbox); color: var(--white); font-family: var(--body); font-size: 18px; line-height: 1.35; overflow: hidden;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; touch-action: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#game { position: fixed; inset: 0; overflow: hidden; background: var(--letterbox); }
#frame { position: absolute; left: 0; top: 0; width: 960px; height: 540px; transform-origin: 0 0; overflow: hidden; background: #10121a; contain: layout paint; }
#stage, #stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#debug { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#fade { position: absolute; inset: 0; background: var(--navy-2); opacity: 0; pointer-events: none; transition: opacity .4s ease; }
#fade.on { opacity: 1; }
#fade.instant { transition: none; }
#bubbles, #toasts { position: absolute; inset: 0; pointer-events: none; }

/* ------------------------------------------------------------------ boot */
#boot { position: absolute; inset: 0; display: grid; place-items: center; background: var(--navy-2); z-index: 50; }
.boot-box { width: 420px; text-align: center; }
/* the Kaizen Ninja logo symbol (Kirsten's file, Oct 28; traced to two shapes so it stays sharp at any size). It was
   drawn on black: its white part needs a dark ground, so on a light card it sits on a navy tile (.hired .k-mark) */
.boot-mark, .k-mark { display: inline-block; width: 39px; height: 52px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='20 14 346 458'%3E%3Cpath fill='%23FF6600' d='M23 137.5 138 53.5V171L363 17.5 23 459z'/%3E%3Cpath fill='%23fff' d='M195 326.5 141.5 405 354 468z'/%3E%3C/svg%3E") center / contain no-repeat; }
.boot-text { font-family: var(--head); font-weight: 600; font-size: 22px; margin: 14px 0 12px; }
.boot-bar { height: 14px; border-radius: 999px; background: #2a3150; overflow: hidden; border: 2px solid #3a4470; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .2s ease; }
.boot-error .boot-bar { display: none; }
.boot-error .boot-text { font-size: 20px; line-height: 1.4; }

/* ------------------------------------------------------------------ HUD */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; font-family: var(--head); }
.hud-top { position: absolute; left: 10px; right: 10px; top: 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pill { display: flex; align-items: center; gap: 10px; background: rgba(17, 24, 51, .82); border: 2px solid rgba(255,255,255,.18); border-radius: 14px; padding: 6px 12px; min-height: 48px; }
.hud-left .lives { display: flex; gap: 4px; }
.head { width: 32px; height: 32px; border-radius: 50%; background-color: #2a3150; background-repeat: no-repeat; border: 2px solid var(--white); display: inline-block; }
.head.lost { opacity: .25; filter: grayscale(1); border-color: #8a90a6; }
.hud-sword { width: 64px; height: 30px; display: grid; place-items: center; border-radius: 8px; }
.hud-sword img { width: 62px; height: auto; transform: rotate(-12deg); }
.hud-sword.off img { opacity: .42; filter: grayscale(1) brightness(1.5); }
.hud-sword.on { background: rgba(246, 184, 0, .22); box-shadow: 0 0 0 2px var(--yellow) inset; }
.hud-stars { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 22px; min-width: 64px; }
.hud-stars img { width: 26px; height: 26px; }
.hud-mid { flex: 1; display: flex; justify-content: center; min-width: 0; }
.hud-mid > div { background: rgba(17, 24, 51, .72); border-radius: 12px; padding: 3px 14px 4px; text-align: center; text-shadow: 0 2px 0 rgba(0,0,0,.45); max-width: 100%; }
.hud-area { font-weight: 700; font-size: 22px; letter-spacing: .03em; line-height: 1.15; }
.hud-obj { font-family: var(--body); font-weight: 800; font-size: 18px; color: #fff3c4; line-height: 1.2; }
.hud-right { gap: 8px; padding-right: 8px; }
.hud-score { text-align: right; line-height: 1; margin-right: 4px; }
.hud-score small { display: block; font-size: 13px; letter-spacing: .12em; color: #c9cdd6; font-weight: 600; text-transform: uppercase; }
.hud-score b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hud-btn { pointer-events: auto; width: 44px; height: 44px; border-radius: 12px; border: 2px solid rgba(255,255,255,.5); background: rgba(255,255,255,.08); display: grid; place-items: center; cursor: pointer; padding: 0; }
.hud-btn svg { width: 22px; height: 22px; }
.hud-btn:hover { background: rgba(255,255,255,.18); }
.hud-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.strip { position: absolute; left: 0; right: 0; bottom: 0; height: 32px; display: flex; justify-content: center; align-items: center; gap: 4px;
  background: linear-gradient(rgba(17,24,51,.0), rgba(17,24,51,.86) 30%); font-weight: 700; font-size: 18px; letter-spacing: .1em; }
.strip span { padding: 1px 10px; border-radius: 6px; color: rgba(255,255,255,.4); }
.strip span.lit { color: var(--ink); background: var(--yellow); }
.strip span.blink { animation: blink .35s ease 3; }
@keyframes blink { 50% { background: var(--white); color: var(--ink); } }

/* fight HUD */
.hud-fight { position: absolute; left: 10px; right: 10px; top: 8px; display: grid; grid-template-columns: 1fr 210px 1fr; gap: 10px; align-items: start; }
.hud-fight .pill { min-height: 56px; }
.hearts { display: flex; gap: 3px; }
.hearts svg { width: 23px; height: 22px; }
.f-ninja { justify-self: start; }
.f-mid { text-align: center; background: rgba(17, 24, 51, .72); border-radius: 12px; padding: 2px 8px 4px; white-space: nowrap; }
.f-score { font-family: var(--body); font-weight: 800; font-size: 18px; line-height: 1.2; }
.f-score small { font-size: 13px; letter-spacing: .12em; color: #c9cdd6; text-transform: uppercase; margin-right: 6px; }
.f-clock { font-size: 34px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.f-clock.low { color: #ffb4a0; }
.f-tricks { font-family: var(--body); font-weight: 800; font-size: 18px; color: #fff3c4; }
.f-tim { justify-self: end; flex-direction: row; }
.chaos { width: 180px; }
.chaos-label { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; letter-spacing: .1em; color: #ffd0c4; }
.chaos-bar { height: 16px; border-radius: 999px; background: #3a1c26; border: 2px solid #ffd0c4; overflow: hidden; }
.chaos-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff7a3d, var(--red)); width: 100%; transition: width .15s ease; }
.chaos-bar i.half { background: linear-gradient(90deg, var(--yellow), #ff7a3d); }
.tim-face { width: 48px; height: 48px; border-radius: 50%; background-repeat: no-repeat; background-color: #3a1c26; border: 2px solid var(--white); }

/* ------------------------------------------------------------------ banner, toasts, bubble */
#banner { position: absolute; left: 0; right: 0; top: 168px; z-index: 12; pointer-events: none; display: flex; justify-content: center; }
#banner .band { width: 100%; text-align: center; background: rgba(17, 24, 51, .9); border-block: 4px solid var(--orange); padding: 14px 24px;
  font-family: var(--head); font-weight: 700; font-size: 38px; letter-spacing: .03em; line-height: 1.15; animation: bandIn .35s ease both; }
#banner .band small { display: block; font-family: var(--body); font-size: 22px; font-weight: 800; color: #fff3c4; letter-spacing: 0; }
#banner .band.gemba { background: var(--orange); border-color: var(--yellow); color: var(--ink); font-size: 52px; letter-spacing: .06em; animation: bandIn .25s ease both, flash .4s ease .25s 2; }
#banner .band.out { animation: bandOut .3s ease both; }
@keyframes bandIn { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bandOut { to { transform: scaleY(0); opacity: 0; } }
@keyframes flash { 50% { filter: brightness(1.35); } }
#toasts { z-index: 11; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 74px; }
.toast { background: rgba(17, 24, 51, .92); border: 2px solid var(--yellow); color: var(--white); border-radius: 999px; padding: 6px 18px;
  font-weight: 800; font-size: 19px; box-shadow: 0 3px 0 rgba(0,0,0,.35); animation: toastIn .25s ease both; max-width: 640px; text-align: center; }
.toast.out { animation: toastOut .35s ease both; }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-10px); opacity: 0; } }
.bubble { position: absolute; transform: translate(-50%, -100%); max-width: 330px; background: var(--white); color: var(--ink);
  border: 3px solid var(--orange); border-radius: 14px; padding: 8px 12px; font-family: var(--head); font-weight: 600;
  font-size: 19px; line-height: 1.2; box-shadow: 0 4px 0 rgba(0,0,0,.25); text-align: center; z-index: 9; }
.bubble::after { content: ''; position: absolute; left: var(--tail, 50%); bottom: -12px; margin-left: -8px; border: 8px solid transparent; border-top-color: var(--orange); border-bottom: 0; }
.bubble b { display: block; font-size: 14px; letter-spacing: .08em; color: var(--red); }
/* bin 7's orange ring and its "Bin 7" tag (bay 1) */
.bintag { position: absolute; border: 4px solid var(--orange); border-radius: 50%; box-shadow: 0 0 0 2px var(--white), inset 0 0 0 2px var(--white); z-index: 8; pointer-events: none; }
.bintag b { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px); background: var(--orange); color: var(--ink); border: 2px solid var(--white);
  border-radius: 999px; padding: 1px 12px 2px; font-family: var(--head); font-weight: 700; font-size: 20px; line-height: 1.15; white-space: nowrap; box-shadow: 0 3px 0 rgba(0,0,0,.3); }

/* ------------------------------------------------------------------ fight trick prompt */
/* the panel sits under the fight HUD and ends about where Tim's head starts (screen y 285); without a question Tim's
   line is inside it, so nothing he says is hidden behind it (ui.js hides his floating bubble while it is up; with a
   question, below, his trick line is not shown) */
#prompt { position: absolute; left: 0; right: 0; top: 98px; z-index: 13; display: flex; justify-content: center; pointer-events: none; }
.pr { width: 680px; background: rgba(17, 24, 51, .95); border: 4px solid var(--yellow); border-radius: 18px; padding: 8px 18px 10px; text-align: center; pointer-events: auto;
  box-shadow: 0 6px 0 rgba(0,0,0,.4); animation: bandIn .2s ease both; }
.pr h2 { margin: 0 0 4px; font-family: var(--head); font-weight: 700; font-size: 30px; line-height: 1.15; letter-spacing: .05em; color: var(--yellow); }
.pr-say { margin: 0 0 8px; font-family: var(--head); font-weight: 600; font-size: 20px; line-height: 1.22; color: var(--white); text-wrap: balance; }
.pr-say b { color: #ffb4a0; font-size: 16px; letter-spacing: .08em; margin-right: 8px; }
/* with a question (text-l1.js fight.questions) the panel is nearly the frame's width and the question sits on a paper
   card, left aligned like a quiz question, so it does not read as Tim's words. Kirsten's 10 take 2 or 3 lines (the
   longest, 46 words, just fits 3; a wider font makes it 4 and the panel grows). The panel then ends at about y 346,
   over the fighters' upper bodies; his tell (the box or the stack at his feet) stays in view. */
.pr.has-q { width: 920px; }
.pr-q { margin: 2px 0 10px; padding: 8px 14px 9px; background: var(--paper); color: var(--ink); border-radius: 12px; text-align: left;
  font-family: var(--body); font-weight: 800; font-size: 21px; line-height: 1.28; text-wrap: pretty; }
.pr-btns { display: flex; gap: 16px; justify-content: center; }
.pr-btns .btn { flex: 1; font-size: 24px; }
.pr-bar { height: 10px; margin-top: 10px; border-radius: 999px; background: #2a3150; overflow: hidden; }
.pr-bar i { display: block; height: 100%; background: var(--yellow); width: 100%; }
.pr.res { border-color: var(--white); }
.pr .res-big { font-family: var(--head); font-weight: 700; font-size: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.pr .res-big.right { color: #7dffa8; }
.pr .res-big.wrong { color: #ffb4a0; }
.pr .res-line { font-weight: 800; font-size: 20px; margin-top: 4px; }
.pr .res-hint { font-weight: 700; font-size: 18px; margin-top: 6px; color: var(--yellow); }   /* the Timer hint (first time-out of a fight) */
.mark { width: 36px; height: 36px; flex: none; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 6px 22px; border-radius: 14px;
  border: 3px solid var(--ink); background: var(--white); color: var(--ink); font-family: var(--head); font-weight: 600; font-size: 21px; line-height: 1.1;
  box-shadow: 0 4px 0 var(--ink); cursor: pointer; text-align: center; transition: transform .06s ease, box-shadow .06s ease; }
.btn:hover { background: #fff7e0; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--orange); color: var(--ink); }
.btn.primary:hover { background: #ff7a3d; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.btn.small { font-size: 18px; padding: 4px 14px; }
.btn:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.on-dark .btn:not(.primary):not(.ghost) { border-color: var(--ink); }
.on-dark .btn:focus-visible, .on-dark .toggle:focus-visible, .on-dark .link:focus-visible { outline-color: var(--yellow); }
.btn kbd, .kbd { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 7px; border: 2px solid currentColor; font-family: var(--head); font-size: 18px; font-weight: 700; line-height: 1; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px; border-radius: 999px; border: 2px solid currentColor; background: transparent; color: inherit;
  font-weight: 800; font-size: 18px; cursor: pointer; }
.toggle .dot { width: 14px; height: 14px; border-radius: 50%; background: #8a90a6; }
.toggle[aria-pressed="true"] .dot { background: #5ee08a; box-shadow: 0 0 0 3px rgba(94,224,138,.25); }
.toggle:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.link { background: none; border: 0; padding: 6px 4px; color: inherit; font-weight: 800; font-size: 18px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; min-height: 40px; }
.link:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------------ cards */
#cards { position: absolute; inset: 0; z-index: 20; display: none; }
#cards.open { display: block; }
.scrim { position: absolute; inset: 0; background: rgba(11, 13, 20, .58); }
.scrim.light { background: linear-gradient(rgba(11,13,20,.55), rgba(11,13,20,.1) 60%); }
.scrim.solid { background: var(--navy-2); }
.card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 760px; max-height: 512px; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 8px 0 rgba(0,0,0,.4); overflow: hidden;
  animation: cardIn .22s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translate(-50%, -46%); } }
.card-head { background: var(--navy); color: var(--white); padding: 12px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 4px solid var(--orange); }
.card-head h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 30px; letter-spacing: .03em; line-height: 1.1; flex: 1; }
.card-body { padding: 16px 24px; overflow-y: auto; flex: 1; min-height: 0; }
.card-body p { margin: 0 0 8px; }
.card-foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; padding: 12px 22px 18px; }
.card-foot.split { justify-content: space-between; }
.lead { font-size: 20px; font-weight: 700; }
.small-note { font-size: 18px; color: var(--muted); }

/* title */
.c-title { position: absolute; inset: 0; color: var(--white); }
.c-title .bg { position: absolute; inset: 0; background:
  radial-gradient(ellipse 46% 70% at 50% 46%, rgba(17,24,51,.78), rgba(17,24,51,.5) 60%, rgba(11,13,20,.2)),
  linear-gradient(rgba(11,13,20,.25), rgba(11,13,20,.65)); }
.c-title .tim-art { position: absolute; left: -6px; bottom: 0; height: 330px; pointer-events: none; }
.c-title .ninja-art { position: absolute; right: -8px; bottom: 0; height: 360px; pointer-events: none; }
.c-title .mid { position: absolute; left: 50%; top: 0; bottom: 0; transform: translateX(-50%); width: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.c-title h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 66px; line-height: .95; letter-spacing: .04em; text-shadow: 0 4px 0 var(--ink), 0 0 18px rgba(0,0,0,.5); }
.c-title .sub { font-family: var(--head); font-weight: 700; font-size: 28px; color: var(--orange); letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 2px 0 var(--ink); margin-top: -2px; }
.c-title .tagline { font-weight: 800; font-size: 20px; color: #fff3c4; text-shadow: 0 2px 0 rgba(0,0,0,.6); margin: 4px 0 8px; max-width: 460px; }
.c-title .btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.c-title .btns .btn { min-width: 190px; }
.c-title .btns .btn.wide { flex-basis: 100%; max-width: 400px; }
.c-title .links { display: flex; gap: 18px; justify-content: center; margin-top: 2px; }
.c-title .toggles { display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.c-title .foot { font-size: 18px; color: #e3e6ef; text-shadow: 0 1px 0 rgba(0,0,0,.6); margin-top: 6px; text-wrap: balance; }
.c-title .credit { font-size: 16px; color: #b9bfd0; }

/* how to play */
.card.c-howto { width: 900px; }
.howto-grid { display: grid; grid-template-columns: 300px 1fr; gap: 8px 26px; }
.c-howto .card-foot { padding-top: 6px; padding-bottom: 14px; }
.touch-only { display: none; }
body.coarse .touch-only { display: list-item; }
body.coarse .c-howto .keys { display: none; }
body.coarse .howto-grid { grid-template-columns: 1fr; }
.howto-grid h2 { grid-column: 1 / -1; margin: 0 0 2px; font-family: var(--body); font-size: 20px; font-weight: 800; line-height: 1.3; }
.keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; }
.keys li { display: grid; grid-template-columns: 124px 1fr; gap: 8px; align-items: baseline; font-size: 18px; line-height: 1.25; }
.keys li b { font-family: var(--head); font-weight: 700; color: var(--orange-text); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; align-content: start; }
.rules li { font-size: 18px; line-height: 1.25; padding-left: 16px; position: relative; }
.rules li::before { content: ''; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); transform: rotate(45deg); }
.rules li b { font-family: var(--head); font-weight: 700; }

/* intro cards */
.c-intro { position: absolute; inset: 0; display: flex; flex-direction: column; color: var(--white); }
.c-intro .ibody { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px 40px 0; }
.c-intro .ifoot { display: flex; justify-content: flex-end; align-items: center; padding: 0 26px 22px; gap: 12px; position: relative; z-index: 2; }
.c-intro .ifoot .dots { position: absolute; left: 50%; transform: translateX(-50%); }
.c-intro .skip { position: absolute; top: 18px; right: 22px; z-index: 3; }
.c-intro.warn .skip { top: 40px; }
.c-intro .dots { display: flex; gap: 8px; }
.c-intro .dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.3); }
.c-intro .dots i.on { background: var(--yellow); }
.c-intro.paper .dots i { background: #d6d1c4; }
.c-intro.paper .dots i.on { background: var(--orange); }
.c-intro.warn { background: #0c0c10; }
.c-intro.warn::before, .c-intro.warn::after { content: ''; position: absolute; left: 0; right: 0; height: 26px; background: repeating-linear-gradient(-45deg, var(--red) 0 26px, #0c0c10 26px 52px); }
.c-intro.warn::before { top: 0; } .c-intro.warn::after { bottom: 0; }
.c-intro.warn .ifoot { padding-bottom: 40px; }
.warn-word { font-family: var(--head); font-weight: 700; font-size: 92px; color: var(--red); letter-spacing: .12em; line-height: 1; animation: warnPulse 1s ease infinite; text-shadow: 0 0 30px rgba(215,38,42,.5); }
.warn-line { font-family: var(--head); font-weight: 700; font-size: 40px; margin-top: 18px; line-height: 1.15; }
@keyframes warnPulse { 50% { opacity: .55; } }
.c-intro.navy { background: radial-gradient(ellipse at 30% 40%, var(--navy-3), var(--navy-2)); }
.c-intro.paper { background: var(--paper); color: var(--ink); }
.talk { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center; text-align: left; width: 100%; }
.talk canvas { width: 300px; height: 325px; }
.talk .say { background: var(--white); color: var(--ink); border: 4px solid var(--orange); border-radius: 20px; padding: 18px 22px; font-family: var(--head); font-weight: 600; font-size: 24px; line-height: 1.3; position: relative; min-height: 190px; box-shadow: 0 5px 0 rgba(0,0,0,.3); }
.talk .say::before { content: ''; position: absolute; left: -22px; top: 70px; border: 12px solid transparent; border-right-color: var(--orange); border-left: 0; border-width: 12px 20px 12px 0; }
.talk .say b { display: block; font-size: 16px; letter-spacing: .1em; color: var(--red); margin-bottom: 4px; }
.hired h1 { font-family: var(--head); font-weight: 700; font-size: 50px; line-height: 1.05; color: var(--orange-text); margin: 0 0 18px; }
.hired p { font-size: 26px; font-weight: 700; max-width: 640px; margin: 0 auto; line-height: 1.35; }
.hired .motto { margin-top: 14px; font-size: 22px; font-style: italic; color: var(--muted); }
.hired .k-mark { box-sizing: content-box; width: 45px; height: 60px; padding: 10px 14px; margin-bottom: 14px; border-radius: 16px;
  background-color: var(--navy-2); background-origin: content-box; }
.lvl { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: center; text-align: left; width: 100%; }
.c-intro .side { position: absolute; left: 0; bottom: 0; width: 330px; height: auto; z-index: 1; pointer-events: none; }   /* her flat bottom cut sits on the card edge */
.lvl h1 { font-family: var(--head); font-weight: 700; font-size: 36px; margin: 0 0 14px; line-height: 1.1; }
.letters { display: flex; gap: 6px; margin: 0 0 16px; }
.letters span { width: 46px; height: 54px; display: grid; place-items: center; border-radius: 10px; font-family: var(--head); font-weight: 700; font-size: 32px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.35); border: 2px solid rgba(255,255,255,.18); position: relative; }
.letters span.lit { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.letters span.done::after { content: ''; position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; border: 2px solid var(--white); }
.on-paper .letters span, .card .letters span { background: #e8e4da; color: #8a8f9c; border-color: #d6d1c4; }
.on-paper .letters span.lit, .card .letters span.lit { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.defs { display: grid; gap: 10px; }
.defs p { margin: 0; font-size: 22px; font-weight: 700; display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: baseline; line-height: 1.3; }
.defs p i { font-style: normal; font-family: var(--head); font-weight: 700; font-size: 28px; color: var(--yellow); }
.point { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: center; text-align: left; width: 100%; }
.point canvas { width: 250px; height: 340px; }
.point .big { font-family: var(--head); font-weight: 700; font-size: 32px; line-height: 1.15; margin: 0 0 14px; }
.point p { font-size: 22px; font-weight: 700; margin: 0 0 10px; line-height: 1.35; }
.point p.gemba { font-size: 19px; color: #fff3c4; }

/* versus */
.c-versus { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(105deg, #4a0f16 0 49.6%, var(--yellow) 49.6% 50.4%, var(--navy-2) 50.4%); }
.c-versus .tim-crouch { position: absolute; left: 30px; bottom: 80px; height: 370px; }
.c-versus .ninja-crouch { position: absolute; right: 10px; bottom: 80px; height: 330px; }
.c-versus .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; background: #0b0d14; border-top: 4px solid var(--yellow); }
.c-versus h1 { position: absolute; left: 0; right: 0; top: 22px; margin: 0; text-align: center; font-family: var(--head); font-weight: 700; font-size: 46px; letter-spacing: .04em; color: var(--white); text-shadow: 0 4px 0 var(--ink); }
.c-versus h1.vs-names { display: flex; flex-direction: row-reverse; justify-content: center; align-items: baseline; }
.c-versus h1.vs-names span { flex: 1 1 0; }
.c-versus h1.vs-names .vs-a { text-align: left; padding-left: 40px; }
.c-versus h1.vs-names .vs-b { text-align: right; padding-right: 40px; }
.c-versus h1 em { font-style: normal; display: inline-block; color: var(--yellow); font-size: 64px; margin: 0 14px; transform: translateY(6px) rotate(-6deg); }
/* Tim's line in a dialog strip along the floor, like a fighting game */
.c-versus .vs-say { position: absolute; left: 18px; right: 170px; bottom: 6px; height: 72px; display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center; }
.c-versus .vs-say img { width: 62px !important; height: auto; }
.c-versus .vs-say .say { font-family: var(--head); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--white); }
.c-versus .vs-say .say b { display: block; font-size: 14px; letter-spacing: .1em; color: #ff8a7a; }
.c-versus .vs-foot { position: absolute; right: 18px; bottom: 12px; }

/* weapons */
.weapons { display: grid; gap: 12px; }
.weapon { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; background: var(--white); border: 3px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.weapon .ic { height: 70px; display: grid; place-items: center; }
.weapon .ic img { max-width: 104px; max-height: 66px; }
.weapon .ic svg { width: 76px; height: 50px; }
.weapon p { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.weapon p b { font-family: var(--head); font-weight: 700; color: var(--orange-text); }

/* pause, game over, outcome */
.pause-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pause-btns .btn { width: 100%; }
.pause-btns .wide { grid-column: 1 / -1; }
.toggles-row { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.card.c-pause, .card.c-confirm { width: 620px; }
.c-gameover .gbody { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; }
.c-gameover canvas { width: 220px; height: 238px; }
.quote { font-family: var(--head); font-weight: 600; font-size: 24px; line-height: 1.25; margin: 0 0 12px; }
.quote b { display: block; font-size: 15px; letter-spacing: .1em; color: var(--red); }
.tip { background: #fff3c4; border: 2px solid var(--yellow); border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 18px; margin-top: 10px; }
/* at the top, so the live arena below shows her victory pose next to Tim */
.card.c-outcome { top: 14px; transform: translateX(-50%); width: 700px; animation: outIn .3s ease both; }
@keyframes outIn { from { opacity: 0; transform: translate(-50%, -20px); } }
.c-outcome .card-head h1 { font-size: 34px; }
.c-outcome .card-body { padding: 10px 22px 4px; }
.c-outcome .card-body p { margin-bottom: 4px; }
.c-outcome .card-foot { padding-top: 6px; padding-bottom: 14px; }
.c-outcome .card-head { justify-content: center; text-align: center; }
.c-outcome .card-head h1 { font-size: 38px; letter-spacing: .05em; }
.c-outcome.defeated .card-head { background: var(--green); border-bottom-color: var(--yellow); }
.c-outcome.wounded .card-head { background: var(--orange-text); border-bottom-color: var(--yellow); }
.c-outcome.foughtBack .card-head { background: #5a1520; border-bottom-color: var(--red); }
.c-outcome .card-body { text-align: center; }
.c-outcome .card-body p { font-size: 22px; font-weight: 700; }

/* win */
.card.c-win { width: 900px; max-height: 520px; }
.c-win .card-head { justify-content: space-between; }
.c-win .card-head h1 { font-size: 34px; }
.c-win .card-body { padding: 14px 22px 8px; scroll-behavior: smooth; }
.c-win .card-body:focus-visible { outline: 4px solid var(--yellow); outline-offset: -4px; }
.w-outcome { font-size: 22px; font-weight: 800; margin: 0 0 12px; color: var(--green); }
.w-outcome.wounded { color: var(--orange-text); }
.w-sec { border-top: 3px solid var(--line); padding: 12px 0; }
.w-sec h2 { margin: 0 0 8px; font-family: var(--head); font-weight: 700; font-size: 24px; letter-spacing: .04em; }
.w-sec h2 small { font-family: var(--body); font-size: 18px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ba figure { margin: 0; }
.ba .ph { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 3px solid var(--ink); background: #2a3150; }
.ba .ph canvas, .ba .ph img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ba figcaption { font-weight: 800; font-size: 18px; margin-top: 6px; }
.ba figcaption b { font-family: var(--head); color: var(--orange-text); }
.gain { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gain .g { background: var(--white); border: 3px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.gain .g h3 { margin: 0 0 6px; font-family: var(--head); font-weight: 700; font-size: 21px; color: var(--orange-text); letter-spacing: .05em; }
.gain .g p { margin: 0 0 6px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.gain-note { font-size: 18px; font-weight: 700; margin: 10px 0 0; }
.trapped { margin: 10px 0 0; text-align: center; font-family: var(--head); font-weight: 700; font-size: 38px; letter-spacing: .04em; background: var(--ink); color: var(--yellow); border-radius: 12px; padding: 6px; }
.w-letters { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.w-letters .letters { margin: 0; }
.w-letters p { margin: 0; font-size: 22px; font-weight: 800; }
.run { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 12px; align-items: stretch; }
.run div { background: var(--white); border: 3px solid var(--line); border-radius: 14px; padding: 8px 12px; font-weight: 800; font-size: 18px; }
.run div b { display: block; font-family: var(--head); font-size: 28px; color: var(--ink); line-height: 1.1; }
.run div.spotted { border-color: var(--yellow); background: #fff8dc; }
.run div.spotted b { font-size: 40px; }
.take { background: var(--white); border: 3px dashed var(--ink); border-radius: 14px; padding: 12px 16px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.take h3 { margin: 0 0 6px; font-family: var(--head); font-size: 24px; font-weight: 700; }
.take p { margin: 0 0 6px; font-size: 19px; font-weight: 700; line-height: 1.3; }
.take p b { font-family: var(--head); color: var(--orange-text); }
.w-tim { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.w-tim canvas { width: 110px; height: 119px; }
.reflect { text-align: center; font-family: var(--head); font-weight: 700; font-size: 26px; line-height: 1.2; color: var(--navy); margin: 4px 0; }
.c-win .card-foot { border-top: 3px solid var(--line); padding-top: 10px; padding-bottom: 12px; }
.c-win .soon { font-size: 18px; color: var(--muted); font-weight: 800; }

/* Tim's reaction at the door exit */
.c-reaction { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 100%, var(--navy-3), transparent 70%); }
.c-reaction .rise { position: absolute; right: 120px; bottom: 34px; animation: rise .45s ease-out both; }
.c-reaction .crates { position: absolute; right: 70px; bottom: -14px; display: flex; gap: 0; }
.c-reaction .crates img, .c-reaction .crates i { width: 132px; height: 128px; display: block; margin-left: -12px; }
.c-reaction .crates i { background: #b98a4e; border: 3px solid #5a3d1c; }
.c-reaction .bubble { left: 330px; top: 200px; transform: translate(-50%, -100%); max-width: 440px; font-size: 26px; animation: toastIn .3s ease .3s both; }
.c-reaction .bubble::after { left: 80%; }
.c-reaction .react-next { position: absolute; left: 40px; bottom: 30px; }
@keyframes rise { from { transform: translateY(70%); } }

/* shots gallery (?shots=1, a build tool, not a player screen) */
.c-gallery { position: absolute; inset: 0; overflow-y: auto; background: var(--navy-2); padding: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; }
.c-gallery figure { margin: 0; background: #1d2547; border-radius: 10px; padding: 6px; }
.c-gallery canvas { width: 100%; height: auto; display: block; border-radius: 6px; }
.c-gallery figcaption { font-size: 14px; font-weight: 700; margin-top: 4px; color: #e3e6ef; }
.c-gallery.one { grid-template-columns: 1fr; justify-items: center; overflow: hidden; }   /* ?shots=1&only=<id>: one photo, as big as the frame allows */
.c-gallery.one canvas { width: auto; height: 480px; }

/* ------------------------------------------------------------------ room frame (rooms.js fills it; ui.roomHeader builds the header) */
.card.room { position: absolute; inset: 0; transform: none; left: 0; top: 0; width: auto; max-height: none; border: 0; border-radius: 0; box-shadow: none; animation: none;
  background: radial-gradient(ellipse at 50% 0%, var(--navy-3), var(--navy-2) 70%); color: var(--white); display: flex; flex-direction: column; overflow: hidden; }
.room-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 8px 18px; background: var(--navy); border-bottom: 4px solid var(--orange); min-height: 64px; }
.room-head .rh-title { font-family: var(--head); font-weight: 700; font-size: 24px; letter-spacing: .04em; }
.room-head .rh-title small { display: block; font-family: var(--body); font-size: 18px; font-weight: 800; color: #fff3c4; letter-spacing: 0; }
.room-head .rh-right { text-align: right; font-weight: 800; font-size: 18px; line-height: 1.25; }
.room-head .rh-right b { font-family: var(--head); font-size: 22px; color: var(--yellow); }
.ring { position: relative; width: 56px; height: 56px; }
.ring svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: rgba(255,255,255,.18); }
.ring .left { stroke: var(--yellow); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.ring.low .left { stroke: #ff7a3d; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.ring.off { visibility: hidden; }
.room-body { flex: 1; min-height: 0; position: relative; padding: 12px 18px; display: flex; flex-direction: column; }
.room-ninja { position: absolute; left: 0; bottom: 0; width: 150px; height: 154px; pointer-events: none; }
.room-tim { position: absolute; right: 0; bottom: 0; width: 210px; height: 230px; pointer-events: none; }
/* the stand-in room (used until rooms.js exists) */
.sr-q { font-family: var(--head); font-weight: 600; font-size: 26px; line-height: 1.2; margin: 0 0 6px; }
.sr-hint { font-size: 18px; font-weight: 700; color: #fff3c4; margin: 0 0 8px; }
.sr-main { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; flex: 1; min-height: 0; padding-left: 130px; }
.sr-photo { border-radius: 10px; overflow: hidden; border: 3px solid var(--white); align-self: start; aspect-ratio: 16 / 9; background: #2a3150; }
.sr-photo canvas { width: 100%; height: 100%; display: block; }
.sr-opts { display: grid; gap: 10px; align-content: start; }
.sr-opts .btn { justify-content: flex-start; text-align: left; font-size: 19px; }
.sr-opts .btn.right { background: #c9f5d8; border-color: var(--green); }
.sr-opts .btn.wrong { background: #ffd9d2; border-color: var(--red); }
.sr-feedback { background: var(--paper); color: var(--ink); border-radius: 14px; border: 3px solid var(--ink); padding: 10px 14px; font-size: 19px; font-weight: 700; display: grid; gap: 6px; }
.sr-feedback .res-big { font-family: var(--head); font-size: 26px; display: flex; align-items: center; gap: 8px; }
.sr-feedback .res-big.right { color: var(--green); } .sr-feedback .res-big.wrong { color: var(--red); }
.sr-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 0 120px; }
.sr-center h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 40px; }
.sr-center p { margin: 0; font-size: 22px; font-weight: 700; max-width: 620px; }

/* ------------------------------------------------------------------ touch controls (outside #frame, real CSS px) */
#touch { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.tpad { position: absolute; pointer-events: auto; width: 72px; height: 72px; border-radius: 22px; background: rgba(255,255,255,.2); border: 3px solid rgba(255,255,255,.75);
  display: grid; place-items: center; touch-action: none; box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.tpad svg { width: 34px; height: 34px; }
.tpad img { width: 58px; height: auto; pointer-events: none; }
.tpad.down { background: rgba(246,184,0,.55); transform: translateY(2px); }
.tpad.left { left: max(12px, env(safe-area-inset-left)); bottom: 14px; }
.tpad.right { left: calc(max(12px, env(safe-area-inset-left)) + 84px); bottom: 14px; }
.tpad.jump { right: max(12px, env(safe-area-inset-right)); bottom: 14px; width: 84px; height: 84px; border-radius: 50%; }
.tpad.sword { right: calc(max(12px, env(safe-area-inset-right)) + 96px); bottom: 14px; border-radius: 50%; }
.tpad.star { right: calc(max(12px, env(safe-area-inset-right)) + 6px); bottom: 110px; border-radius: 50%; }
.tpad.pause { right: max(10px, env(safe-area-inset-right)); top: 10px; width: 56px; height: 56px; border-radius: 16px; }
.tpad.off { opacity: .35; }
#touch.cards .tpad:not(.pause) { display: none; }
#touch.cards .tpad.pause { display: none; }
body.coarse { --tap: max(56px, calc(56px / var(--k))); }
body.coarse .hud-btn { display: none; }
body.coarse .toggle, body.coarse .link { min-height: var(--tap); }
body.coarse .btn { min-width: var(--tap); }   /* short labels (Skip, Print) stay at least 56 CSS px wide too */
body.coarse .hud-right { margin-right: calc(64px / var(--k)); }
body.phone .strip { display: none; }
/* phones: the trick panel's buttons are taller (56 CSS px), so the title is a little smaller to keep the panel above
   the fighters' heads */
body.phone .pr { padding-top: 6px; }
body.phone .pr h2 { font-size: 26px; margin-bottom: 2px; }

/* portrait phone */
#rotate { position: absolute; inset: 0; z-index: 60; background: var(--navy-2); display: grid; place-items: center; padding: 24px; text-align: center; }
.rotate-box p { font-family: var(--head); font-weight: 700; font-size: 24px; line-height: 1.3; margin: 18px 0 0; max-width: 300px; }
.rotate-phone { width: 64px; height: 108px; margin: 0 auto; border: 5px solid var(--white); border-radius: 14px; position: relative; animation: turn 2s ease-in-out infinite; }
.rotate-phone::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 14px; height: 4px; margin-left: -7px; border-radius: 2px; background: var(--white); }
@keyframes turn { 0%, 30% { transform: none; } 60%, 100% { transform: rotate(-90deg); } }

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .warn-word { animation: none; }
}

/* ------------------------------------------------------------------ print: only the TAKE THESE TO YOUR FLOOR card */
@media print {
  body { background: #fff; color: #000; overflow: visible; }
  #game { position: static; }
  #frame { transform: none !important; position: static; width: auto; height: auto; overflow: visible; background: #fff; contain: none; }
  #frame > *:not(#cards) { display: none !important; }
  #cards .scrim, #cards .card > *:not(.card-body), .card-body > *:not(.w-take) { display: none !important; }
  #cards .card { position: static; transform: none; border: 0; box-shadow: none; width: auto; max-height: none; overflow: visible; animation: none; background: #fff; }
  .card-body { overflow: visible; }
  .w-sec.w-take { border: 0; }
  .take { grid-template-columns: 1fr; border: 3px dashed #000; }
  .take .btn { display: none; }
  #touch, #rotate { display: none !important; }
}

/* ------------------------------------------------------------------ ways in and out (Oct 25) */
/* a card opened over the room (the room's pause card): above the room, the room stays under it */
.card-root.stacked { position: absolute; inset: 0; z-index: 40; }
.card.c-rpause { width: 560px; }
/* a navy wait that lasts more than a moment says so */
#fade .fade-msg { position: absolute; left: 0; right: 0; bottom: 46%; text-align: center; color: rgba(255,255,255,.82); font-weight: 800; font-size: 22px;
  letter-spacing: .02em; opacity: 0; transition: opacity .3s ease; }
#fade.msg .fade-msg { opacity: 1; }
/* intro: Back to title, top left (Skip is top right) */
.c-intro .to-title { position: absolute; top: 18px; left: 22px; z-index: 3; }
.c-intro.warn .to-title { top: 40px; }
.c-versus .vs-foot { display: flex; gap: 12px; flex-direction: row-reverse; align-items: center; }
.c-versus .vs-foot .btn.ghost { color: var(--white); }
/* the end of Gemba Challenge only */
.card.c-booth { width: 620px; }
.c-booth .booth-big { font-family: var(--head); font-size: 34px; margin-bottom: 6px; }
.c-booth .booth-rooms { list-style: none; margin: 0 0 12px; padding: 0; font-size: 20px; font-weight: 700; }
.c-booth .booth-rooms li { padding: 3px 0; }
/* the versus foot holds Next and Back to title: Tim's line keeps clear of both */
.c-versus .vs-say { right: 300px; }
/* leaderboard and class mode: card forms, the board table, the class line on the title */
.card.c-board { width: 800px; }
.card.c-join { width: 660px; }
.kn-form { margin: 0 0 6px; }
.kn-form .lead { margin-bottom: 8px; }
.kn-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.kn-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; font-size: 16px; font-weight: 800; color: var(--muted); }
.kn-field input { font-family: var(--body); font-size: 21px; font-weight: 700; color: var(--ink); background: var(--white); border: 3px solid var(--ink);
  border-radius: 14px; min-height: var(--tap); padding: 6px 14px; width: 100%; -webkit-user-select: text; user-select: text; }
.kn-field input:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: 0 4px 0 var(--ink); }
.form-msg { margin: 6px 0 4px; font-weight: 800; color: var(--orange-text); min-height: 1.35em; }
.join-class { margin: 0 0 4px; font-family: var(--head); font-size: 24px; font-weight: 700; color: var(--navy); }
.join-class:empty { display: none; }
.board-list h2 { margin: 0 0 6px; font-family: var(--head); font-weight: 700; font-size: 22px; letter-spacing: .03em; }
.board-table { width: 100%; border-collapse: collapse; font-size: 19px; }
.board-table th { text-align: left; padding: 2px 8px 4px; font-size: 15px; font-weight: 800; color: var(--muted); border-bottom: 3px solid var(--line); }
.board-table td { padding: 5px 8px; border-bottom: 2px solid var(--line); }
.board-table .col-rank { width: 46px; font-family: var(--head); font-weight: 700; color: var(--muted); }
.board-table .col-name b { font-weight: 800; }
.board-table .col-name small { margin-left: 10px; font-size: 16px; font-weight: 700; color: var(--muted); }
.board-table .col-name em { margin-left: 10px; padding: 1px 9px; border-radius: 999px; background: var(--orange-text); color: var(--white); font-style: normal; font-size: 14px; font-weight: 800; }
.board-table .col-spotted, .board-table .col-score { text-align: right; white-space: nowrap; }
.board-table td.col-score { font-family: var(--head); font-weight: 700; font-size: 21px; }
.board-table tr.me td { background: #fff3c4; }
.c-title .class-chip { display: flex; align-items: center; gap: 12px; padding: 2px 6px 2px 16px; border: 2px solid var(--yellow); border-radius: 999px;
  background: rgba(17, 24, 51, .78); font-weight: 800; font-size: 18px; }
.c-title .class-chip .link { min-height: 36px; font-size: 16px; }
/* a keyboard on a touch device (body.kbd, ui.js): the key hints come back, and the sword and star pads show their keys */
body.coarse.kbd .c-howto .keys { display: grid; }
body.coarse.kbd .howto-grid { grid-template-columns: 300px 1fr; }
body.coarse.kbd .knr-help-k { display: block; }
body.coarse.kbd .knr-btn .knr-kbd { display: grid; }
.pad-key { display: none; position: absolute; top: -9px; right: -9px; min-width: 26px; height: 26px; padding: 0 5px; place-items: center; border-radius: 8px;
  border: 2px solid var(--ink); background: var(--white); color: var(--ink); font-family: var(--head); font-size: 16px; font-weight: 700; line-height: 1; }
body.kbd .pad-key { display: grid; }
/* the call to action after the fight (text-l1.js cta; it shows only once its link is set) */
a.btn { text-decoration: none; }
.w-cta .cta { display: flex; align-items: center; gap: 20px; padding: 14px 18px; border: 3px solid var(--orange); border-radius: 14px; background: #fff3e6; }
.cta .cta-text { flex: 1; }
.cta .cta-line { margin: 0 0 12px; font-family: var(--head); font-weight: 700; font-size: 24px; line-height: 1.2; }
.cta .cta-qr { flex: none; width: 136px; text-align: center; font-size: 14px; font-weight: 800; line-height: 1.2; color: var(--muted); }
.cta .cta-qr svg { display: block; width: 136px; height: 136px; margin-bottom: 4px; border-radius: 8px; background: var(--white); }
body.phone .cta .cta-qr { display: none; }
.c-outcome .cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin-top: 6px; }
.c-outcome .cta-row p { margin: 0; font-size: 18px; }
