@font-face { font-family: 'Bricolage Grotesque'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-style: normal; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); }
/* CAPCHA — « portail de sécurité » : papier administratif, encre, tampons rouges, jaune de signalisation. */
:root {
  --bg: #070b0f; --ink: #10202a; --paper: #f6f1e4; --paper-2: #ebe4d2; --fg: #eaf2f0; --dim: #8fa6a8;
  --yellow: #ffd23f; --red: #ff3b4e; --green: #2de2c0; --tint: #2de2c0;
  --display: 'Bricolage Grotesque', 'Arial Black', 'Helvetica Neue', Impact, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  --body: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pressure: 0;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.45; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.no-gl body { background: radial-gradient(120% 90% at 50% 20%, #12303a, #070b0f 70%); }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(2, 4, 6, .6) 100%); }
body:has(.game-root[data-pressure="high"]) .vignette { background: radial-gradient(ellipse at center, transparent 35%, rgba(2, 4, 6, .75) 100%), radial-gradient(ellipse at center, transparent 35%, rgba(255, 30, 60, .38) 120%); animation: vpulse .8s ease-in-out infinite; }
@keyframes vpulse { 50% { opacity: .72; } }
.scanlines { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.skip { position: absolute; left: -999px; top: 0; z-index: 99; background: var(--yellow); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#app { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; width: 100%; max-width: 820px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px 28px; display: flex; flex-direction: column; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 29; pointer-events: none; }
.corner { position: fixed; top: 12px; right: 12px; z-index: 20; }

/* ---------- boutons ---------- */
.btn { font: 800 1.05rem/1 var(--display); letter-spacing: .01em; border: 2.5px solid var(--ink); background: var(--paper); color: var(--ink); padding: 15px 22px; min-height: 52px; border-radius: 10px; cursor: pointer; box-shadow: 0 5px 0 #000, 0 0 0 0 transparent; display: inline-flex; align-items: center; justify-content: center; gap: 12px; text-align: center; transition: transform .08s, box-shadow .08s, background .15s; position: relative; flex-wrap: wrap; }
.btn small { display: block; font: 500 .75rem/1.2 var(--mono); opacity: .7; flex-basis: 100%; letter-spacing: 0; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #000; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #000; }
.btn.primary { background: var(--yellow); font-size: 1.25rem; padding: 18px 28px; flex-wrap: nowrap; }
.btn.primary .box { width: 24px; height: 24px; border: 3px solid var(--ink); border-radius: 5px; background: #fff; display: inline-block; position: relative; flex: none; }
.btn.primary:hover .box::after { content: ''; position: absolute; left: 5px; top: 0; width: 7px; height: 14px; border: solid var(--ink); border-width: 0 3.5px 3.5px 0; transform: rotate(40deg); }
.btn.ghost { background: rgba(246, 241, 228, .08); color: var(--fg); border-color: rgba(246, 241, 228, .5); box-shadow: 0 5px 0 rgba(0, 0, 0, .7); }
.btn.ghost.disabled { opacity: .55; cursor: not-allowed; border-style: dashed; }
.btn.small { min-height: 40px; padding: 10px 14px; font-size: .9rem; }
.icon-btn { width: 42px; height: 42px; border-radius: 10px; border: 2px solid rgba(246, 241, 228, .35); background: rgba(7, 11, 15, .6); color: var(--fg); cursor: pointer; display: grid; place-items: center; padding: 0; backdrop-filter: blur(6px); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { border-color: var(--yellow); color: var(--yellow); }
.icon-btn[aria-pressed="true"] { color: var(--red); }

/* ---------- écran titre ---------- */
.title-root #app, #app.title-root { justify-content: center; }
.screen.title { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 0 10px; animation: rise .6s cubic-bezier(.2, .9, .3, 1) both; }
.ticket { font: 600 .75rem/1 var(--mono); letter-spacing: .14em; color: var(--yellow); border: 1.5px dashed rgba(255, 210, 63, .6); padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; max-width: 100%; }
.logo { margin: 0; font: 800 clamp(3.6rem, 15vw, 8.4rem)/.86 var(--display); letter-spacing: -.045em; display: flex; align-items: flex-start; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .8)); }
.logo .lg { color: var(--paper); -webkit-text-stroke: 0; }
.logo .lg.y { color: var(--yellow); }
.logo sup { font: 600 clamp(.9rem, 2.4vw, 1.4rem)/1 var(--mono); color: var(--dim); margin-left: 4px; letter-spacing: 0; }
.tag { font: 800 clamp(1.15rem, 3.6vw, 1.7rem)/1.15 var(--display); margin: 10px 0 0; letter-spacing: -.01em; }
.typo { font: 400 .78rem/1.3 var(--mono); color: var(--dim); margin: 0 0 14px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 18px 0 8px; }
.best { font: 400 .8rem/1.4 var(--mono); color: var(--dim); margin: 14px 0 0; }
.best span { color: var(--yellow); text-transform: uppercase; letter-spacing: .1em; margin-right: 8px; }
.fine { font: 400 .75rem/1.5 var(--mono); color: #6b8082; max-width: 52ch; margin: 22px 0 0; }

/* ---------- narrateur ---------- */
.speaker { display: flex; align-items: flex-end; gap: 14px; width: 100%; text-align: left; }
.speaker.big { max-width: 640px; margin-top: 18px; }
.avatar { flex: none; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #2b4d5c, #12252e); border: 3px solid var(--paper); box-shadow: 0 4px 0 #000, 0 0 0 4px rgba(7, 11, 15, .6), 0 0 22px color-mix(in srgb, var(--tint) 40%, transparent); overflow: hidden; position: relative; align-self: flex-start; transition: box-shadow .4s; }
.big .avatar { width: 128px; height: 128px; }
.warden { width: 100%; height: 100%; display: block; --px: 0px; --py: 0px; --pupil: 1; }
.warden .w-pupil { transform: translate(var(--px), var(--py)) scale(var(--pupil)); transform-box: fill-box; transform-origin: center; transition: transform .12s; }
.warden .w-eyes { animation: blink 5.5s infinite; transform-origin: 60px 57px; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.08); } }
.warden .w-sweat { opacity: 0; transition: opacity .2s; }
.warden .w-dark { opacity: 0; transition: opacity .5s; }
.warden[data-stage="1"] .w-dark, .warden[data-stage="2"] .w-dark { opacity: 1; }
.warden[data-stage="2"] { animation: twitch 3s infinite; }
.warden[data-stage="2"] .w-pupil { animation: jit .35s infinite steps(2); }
@keyframes twitch { 0%, 92%, 100% { transform: translate(0); } 94% { transform: translate(1.5px, -1px) rotate(1.5deg); } 96% { transform: translate(-1.5px, 1px) rotate(-1.5deg); } }
@keyframes jit { 50% { translate: .8px -.6px; } }
.speaker[data-mood="angry"] .avatar { animation: tremble .18s 6; }
@keyframes tremble { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.bubble { position: relative; flex: 1; min-width: 0; background: var(--paper); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 4px 16px 16px 16px; padding: 10px 16px 12px; min-height: 5.2rem; box-shadow: 5px 5px 0 rgba(0, 0, 0, .75); cursor: default; }
.bubble::before { content: ''; position: absolute; left: -11px; top: 22px; width: 18px; height: 18px; background: var(--paper); border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); }
.nameplate { display: block; font: 600 .75rem/1 var(--mono); letter-spacing: .12em; color: #b0281f; margin-bottom: 5px; text-transform: uppercase; }
.nameplate i { font-style: normal; color: #4a4838; letter-spacing: .04em; }
.bubble-text { margin: 0; font: 500 1.02rem/1.35 var(--body); min-height: 2.7em; }
.bubble.typing .bubble-text::after { content: '▍'; margin-left: 1px; animation: caret .5s steps(2) infinite; color: #b0281f; }
@keyframes caret { 50% { opacity: 0; } }
.bubble.pop { animation: popin .22s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes popin { from { transform: scale(.94); } }
.speaker[data-mood="angry"] .bubble { background: #ffe3dd; }
.speaker[data-mood="worried"] .bubble { background: #eef3d9; }
.speaker[data-mood="impressed"] .bubble { background: #fff3c4; }

/* ---------- partie ---------- */
.game-root { gap: 14px; }
.stage { display: flex; flex-direction: column; gap: 14px; transition: opacity .5s, filter .5s; }
.stage.dim, .game-root:has(.stage.dim) .ledger { opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; pointer-events: none; }
.stage.shake { animation: shake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translate3d(-3px, 0, 0); } 20%, 80% { transform: translate3d(6px, 2px, 0); } 30%, 50%, 70% { transform: translate3d(-10px, -2px, 0); } 40%, 60% { transform: translate3d(10px, 2px, 0); } }
.flash { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; }
.flash.good { background: radial-gradient(circle at 50% 40%, rgba(88, 255, 156, .5), rgba(88, 255, 156, 0) 70%); animation: fl .55s ease-out; }
.flash.bad { background: radial-gradient(circle, rgba(255, 30, 60, 0), rgba(255, 30, 60, .45)); animation: fl .6s ease-out; }
@keyframes fl { 0% { opacity: 1; } 100% { opacity: 0; } }

.hud { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; background: rgba(7, 11, 15, .72); border: 2px solid rgba(246, 241, 228, .22); border-radius: 12px; padding: 8px 10px 8px 14px; backdrop-filter: blur(8px); }
.hud-l { display: flex; flex-direction: column; gap: 3px; }
.brand { font: 800 .8rem/1 var(--display); letter-spacing: .04em; color: var(--yellow); }
.lvl-num { font: 600 .75rem/1 var(--mono); letter-spacing: .06em; color: var(--fg); text-transform: uppercase; white-space: nowrap; }
.pips { list-style: none; margin: 0; padding: 0; display: flex; gap: 3px; min-width: 0; }
.pips li { flex: 1; height: 10px; max-width: 28px; border-radius: 2px; background: rgba(246, 241, 228, .14); transition: background .3s, transform .3s; }
.pips li.done { background: var(--green); }
.pips li.now { background: var(--yellow); animation: nowp 1.2s ease-in-out infinite; }
@keyframes nowp { 50% { opacity: .45; } }
.hud-r { display: flex; align-items: center; gap: 12px; }
.strikes { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.strikes-lbl, .clock-lbl { font: 600 .75rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.strike-row { display: flex; gap: 4px; }
.strike { width: 24px; height: 24px; border: 2px solid rgba(246, 241, 228, .4); border-radius: 5px; display: grid; place-items: center; position: relative; }
.strike b { font: 800 .9rem/1 var(--display); color: var(--red); opacity: 0; transform: scale(3) rotate(-25deg); }
.strike.on { border-color: var(--red); background: rgba(255, 59, 78, .18); }
.strike.on b { opacity: 1; transform: none; transition: transform .25s cubic-bezier(.2, 1.8, .4, 1), opacity .1s; }
.strike.hit { animation: hitpop .6s; }
@keyframes hitpop { 30% { transform: scale(1.7) rotate(8deg); box-shadow: 0 0 22px var(--red); } }
.clock { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 62px; }
.clock-val { font: 800 1.55rem/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--green); transition: color .3s; text-shadow: 0 0 12px color-mix(in srgb, currentColor 40%, transparent); }
[data-pressure="mid"] .clock-val { color: var(--yellow); }
[data-pressure="high"] .clock-val { color: var(--red); }
.clock.beat .clock-val { animation: beat .35s ease-out; }
@keyframes beat { 0% { transform: scale(1.3); } 100% { transform: scale(1); } }
[data-pressure="high"] .clock-val { animation: jitter .12s infinite steps(2); }
@keyframes jitter { 50% { transform: translate(1px, -1px); } }

/* ---------- carte captcha ---------- */
.card { position: relative; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 8px 0 #000, 0 0 0 2px color-mix(in srgb, var(--tint) 60%, transparent), 0 0 40px color-mix(in srgb, var(--tint) 25%, transparent); overflow: hidden; min-height: 250px; display: flex; flex-direction: column; font-family: var(--body); }
.card[data-pressure] {}
[data-pressure="high"] .card { box-shadow: 0 8px 0 #000, 0 0 0 3px var(--red), 0 0 46px rgba(255, 59, 78, .55); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--ink); color: var(--paper); padding: 9px 14px; font: 600 .78rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.threat { color: var(--yellow); letter-spacing: .2em; white-space: nowrap; font-size: .75rem; }
.cap-slot { flex: 1; display: flex; flex-direction: column; }
.cap-host { padding: 16px; flex: 1; display: flex; flex-direction: column; align-items: stretch; animation: capin .35s ease-out; }
@keyframes capin { from { opacity: 0; transform: translateY(8px); } }
.card-foot { padding: 6px 14px; font: 400 .75rem/1.3 var(--mono); color: #4a4838; border-top: 1px dashed #c8c0a8; background: var(--paper-2); }
.card.entering { animation: cardin .4s cubic-bezier(.2, .9, .3, 1); }
@keyframes cardin { from { opacity: 0; transform: translateX(40px) rotate(1.2deg); } }
.card.leaving { animation: cardout .26s ease-in forwards; }
@keyframes cardout { to { opacity: 0; transform: translateX(-50px) rotate(-1.5deg); } }
.card.struck .cap-host { filter: grayscale(.7); pointer-events: none; }
.card.solved .cap-host { pointer-events: none; }
.mount-err { font: 500 .95rem var(--mono); color: #7a1d1d; }
.banner { position: absolute; inset: 0; z-index: 5; display: none; place-items: center; background: var(--ink); color: var(--paper); text-align: center; }
.banner.show { display: grid; }
.bn-in { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; animation: bnin .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes bnin { from { transform: scale(1.5); opacity: 0; } }
.bn-k { font: 600 .8rem/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--yellow); }
.bn-n { font: 800 clamp(4rem, 14vw, 6.5rem)/.9 var(--display); letter-spacing: -.04em; color: var(--paper); }
.bn-t { font: 500 1rem/1.2 var(--mono); color: var(--dim); }
/* tampons */
.stamp { position: absolute; z-index: 6; left: 50%; top: 50%; pointer-events: none; display: none; flex-direction: column; align-items: center; padding: 6px 22px; border: 6px double currentColor; border-radius: 10px; font-family: var(--display); transform: translate(-50%, -50%) rotate(-9deg); mix-blend-mode: multiply; background: rgba(246, 241, 228, .82); box-shadow: 0 0 0 4px rgba(246, 241, 228, .3); }
.stamp b { font: 800 clamp(1.6rem, 6.5vw, 2.8rem)/1 var(--display); letter-spacing: .04em; white-space: nowrap; }
.stamp i { font: 600 .85rem/1 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
.stamp.ok { color: #0e8a6d; } .stamp.bad { color: #c8102e; }
.stamp.show { display: flex; animation: stampin .3s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes stampin { from { transform: translate(-50%, -50%) rotate(-9deg) scale(3); opacity: 0; } to { transform: translate(-50%, -50%) rotate(-9deg) scale(1); opacity: 1; } }
.bar { height: 12px; border-radius: 99px; background: rgba(246, 241, 228, .14); border: 2px solid rgba(7, 11, 15, .9); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--green); transform-origin: left; transition: background .3s; border-radius: 99px; }
[data-pressure="mid"] .bar i { background: var(--yellow); }
[data-pressure="high"] .bar i { background: var(--red); animation: barp .4s ease-in-out infinite; }
@keyframes barp { 50% { filter: brightness(1.6); } }
.verdict { min-height: 1.4em; font: 600 .8rem/1.3 var(--mono); letter-spacing: .04em; text-align: center; color: #ffd9dd; opacity: 0; transition: opacity .2s; text-transform: uppercase; }
.verdict.show { opacity: 1; background: rgba(7, 11, 15, .7); padding: 8px 12px; border-radius: 8px; border: 1.5px solid var(--red); }

/* ---------- écran de fin ---------- */
.screen.end { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.verdict-card { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 10px 0 #000, 0 0 60px rgba(0, 0, 0, .6); width: min(620px, 100%); padding: 26px 22px 22px; text-align: center; position: relative; animation: cardin .5s cubic-bezier(.2, .9, .3, 1); margin: auto; }
.big-stamp { display: inline-block; font: 800 clamp(2.4rem, 10vw, 4.4rem)/1 var(--display); letter-spacing: .06em; padding: 4px 24px; border: 7px double currentColor; border-radius: 12px; transform: rotate(-6deg); animation: stampin2 .45s .15s cubic-bezier(.2, 1.4, .4, 1) both; margin-bottom: 10px; }
@keyframes stampin2 { from { transform: rotate(-6deg) scale(3.2); opacity: 0; } to { transform: rotate(-6deg) scale(1); opacity: 1; } }
.end.over .big-stamp { color: #c8102e; } .end.win .big-stamp { color: #0e8a6d; }
.verdict-card h2 { margin: 6px 0 0; font: 800 1.9rem/1.1 var(--display); letter-spacing: -.02em; }
.rank-label { margin: 14px 0 0; font: 600 .75rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #4a4838; }
.rank { margin: 4px 0 14px; font: 800 clamp(1.2rem, 4.4vw, 1.65rem)/1.15 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 18px; }
.stat { background: var(--paper-2); border: 2px solid var(--ink); border-radius: 8px; padding: 8px 4px; }
.stat dt { font: 600 .75rem/1.1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #4a4838; }
.stat dd { margin: 4px 0 0; font: 800 1.15rem/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.verdict-card .speaker { margin-bottom: 18px; }
.verdict-card .avatar { width: 72px; height: 72px; }
.verdict-card .bubble { background: #fff; min-height: 4.4rem; }
.verdict-card .actions { margin: 0; }
.verdict-card .btn.ghost { color: var(--ink); background: transparent; border-color: var(--ink); box-shadow: 0 5px 0 rgba(0, 0, 0, .8); }
.end.win .verdict-card { box-shadow: 0 10px 0 #000, 0 0 70px rgba(45, 226, 192, .45); }
.end.over .verdict-card { box-shadow: 0 10px 0 #000, 0 0 70px rgba(255, 59, 78, .4); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  #app { padding-left: 12px; padding-right: 12px; }
  .hud { grid-template-columns: 1fr auto; gap: 8px 10px; padding: 8px 10px; }
  .hud-c { grid-column: 1 / -1; grid-row: 2; }
  .hud-r { gap: 8px; }
  .clock { min-width: 52px; } .clock-val { font-size: 1.3rem; }
  .strike { width: 20px; height: 20px; }
  .avatar { width: 66px; height: 66px; border-width: 2.5px; }
  .big .avatar { width: 84px; height: 84px; }
  .bubble { padding: 8px 12px 10px; } .bubble-text { font-size: .95rem; }
  .nameplate i { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .speaker { gap: 12px; }
  .corner { top: 8px; right: 8px; }
  .actions .btn { width: 100%; }
}
@media (max-width: 380px) { .brand { display: none; } .strikes-lbl, .clock-lbl { font-size: .75rem; } }
@media (max-height: 900px) and (min-width: 700px) { .game-root, .stage { gap: 10px; } .game-root .avatar { width: 72px; height: 72px; } .game-root .bubble { min-height: 4.2rem; padding-top: 8px; padding-bottom: 9px; } .game-root .bubble-text { min-height: 2.5em; font-size: .98rem; } .hud { padding-top: 6px; padding-bottom: 6px; } #app { padding-top: 10px; padding-bottom: 14px; } }
@media (max-height: 640px) and (min-width: 700px) { .avatar { width: 64px; height: 64px; } .bubble { min-height: 4rem; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .warden .w-eyes { animation: none; }
}

/* ---------- registre de conformité (règles vertes / rouges) ---------- */
.eye-slot { width: 100%; height: clamp(80px, 20vh, 190px); flex: none; }
.rule-head { font: 600 .75rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); padding: 2px 2px 0; }
.rule { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; border: 2.5px solid var(--ink); box-shadow: 0 4px 0 #000; animation: rulein .45s cubic-bezier(.2, 1.3, .4, 1) both; color: var(--ink); }
.rule.ok { background: #bff3de; border-color: #0b6a52; }
.rule.bad { background: #ffd0d4; border-color: #a50f26; animation: rulein .45s cubic-bezier(.2, 1.3, .4, 1) both, rulebad .5s .1s; }
@keyframes rulein { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes rulebad { 25%, 75% { translate: -5px 0; } 50% { translate: 5px 0; } }
.rule-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 1rem/1 var(--display); color: #fff; background: #0e8a6d; }
.rule.bad .rule-ic { background: #c8102e; }
.rule-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rule-b b { font: 800 .92rem/1.2 var(--display); }
.rule-b span { font: 500 .88rem/1.3 var(--body); overflow-wrap: anywhere; }
.rule em { font: 600 .75rem/1.2 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: .05em; opacity: .75; white-space: nowrap; padding-top: 3px; }
@media (max-width: 640px) {
  .btn.primary { font-size: 1.05rem; padding: 16px 14px; gap: 10px; }
  .btn.primary .box { width: 20px; height: 20px; }
  .eye-slot { height: 88px; }
  .verdict-card { padding: 18px 14px 14px; } .big-stamp { font-size: 2.2rem; border-width: 5px; }
  .verdict-card h2 { font-size: 1.45rem; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 6px; } .stat dd { font-size: .95rem; } .stat dt { font-size: .75rem; }
  .verdict-card .speaker { margin-bottom: 12px; } .verdict-card .avatar { width: 54px; height: 54px; } .verdict-card .bubble { min-height: 0; }
  .verdict-card .actions { gap: 10px; } .verdict-card .actions .btn { width: auto; flex: 1 1 40%; min-height: 46px; padding: 10px; }
  .verdict-card .actions .btn.primary { flex-basis: 100%; }
  .screen.end { padding: 10px 10px 24px; align-items: start; }
}
.screen.end { background: rgba(4, 7, 10, .55); }

.end-open .confetti { z-index: 1; }

/* ---------- registre : hors flux, hauteur fixe, zéro décalage ---------- */
.ledger { position: relative; margin-top: 12px; }
.ledger-bar { width: 100%; height: 58px; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--paper-2); color: var(--ink); font: 500 .84rem/1.25 var(--body); text-align: left; cursor: pointer; box-shadow: 0 4px 0 #000; overflow: hidden; }
.ledger-bar[data-kind="ok"] { background: #bff3de; border-color: #0b6a52; }
.ledger-bar[data-kind="bad"] { background: #ffd0d4; border-color: #a50f26; }
.ledger-bar.new { animation: lbnew .5s; }
@keyframes lbnew { 30% { filter: brightness(1.15); transform: scale(1.015); } }
.lb-ic { font: 800 1.1rem/1 var(--display); opacity: .6; flex: none; }
.lb-text { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lb-count { font: 700 .75rem/1 var(--mono); white-space: nowrap; flex: none; }
.lb-more { font-size: .8rem; opacity: .6; flex: none; }
.ledger-list { display: none; list-style: none; margin: 0; padding: 0; flex-direction: column; gap: 8px; }
.ledger.open .ledger-list { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; max-height: 62vh; overflow-y: auto; z-index: 35; padding: 12px; background: rgba(7, 11, 15, .96); border: 2px solid var(--yellow); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
.ledger.open .lb-more { transform: rotate(180deg); }
.rule-head { font: 600 .75rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); padding: 2px 2px 0; }
.rule { grid-template-columns: 26px 1fr auto; }
@media (min-width: 1280px) {
  .ledger.ledger-wide { position: fixed; right: 10px; top: 88px; width: clamp(200px, calc((100vw - 820px) / 2 - 24px), 270px); height: 520px; margin: 0; z-index: 3; }
  .ledger-wide .ledger-bar { display: none; }
  .ledger-wide .ledger-list { display: flex; position: static; max-height: 520px; overflow: hidden; padding: 0; background: none; border: 0; box-shadow: none; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .ledger-wide .rule { grid-template-columns: 26px 1fr; } .ledger-wide .rule em { grid-column: 2; padding: 0; }
  .ledger-wide .rule:nth-child(n+6) { display: none; }
}
.ol-root .ledger { margin-top: 10px; }
@media (max-width: 640px) {
  .verdict-card .actions .btn { flex-basis: 100%; }
  .ledger-bar { height: 54px; font-size: .8rem; }
}

body:has(> .ol-root) #app { visibility: hidden !important; }

/* ---------- r3 : un seul point de focus, rien ne bouge ---------- */
.game-root .bubble { height: 82px; min-height: 0; overflow: hidden; }
.game-root .bubble-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 0; }
.game-root .avatar { align-self: flex-start; }
.ledger { margin: 0; }
.ledger-bar { display: none; }
.ledger-btn { position: relative; font: 800 1.15rem/1 var(--display); flex: none; }
.ledger-btn .lb-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--yellow); color: var(--ink); font: 700 .75rem/18px var(--mono); font-style: normal; text-align: center; padding: 0 4px; }
.ledger-btn.new { animation: lbnew .5s; }
.ledger-btn[data-kind="bad"] { border-color: var(--red); color: var(--red); }
.ledger-btn[data-kind="ok"] { border-color: var(--green); color: var(--green); }
@media (min-width: 1280px) { .game-root:not(.online) .ledger-btn { display: none; } }
.rule-toast { position: fixed; left: 50%; bottom: 14px; transform: translate(-50%, 30px); width: min(520px, calc(100vw - 24px)); z-index: 34; pointer-events: none; opacity: 0; transition: opacity .25s, transform .25s; }
.rule-toast.show { opacity: 1; transform: translate(-50%, 0); }
.rule-toast .rule { margin: 0; animation: none; }
@media (min-width: 1280px) { .game-root:not(.online) .rule-toast { display: none; } }
.ch-n { font: 800 1.7rem/1 var(--display); color: var(--yellow); margin-right: 12px; letter-spacing: -.03em; }
.card-head { justify-content: flex-start; }
.card-head .ch-title { flex: 1; min-width: 0; }
.stamp { top: 56px; left: auto; right: 14px; transform: rotate(6deg); padding: 2px 12px; border-width: 4px; background: rgba(246, 241, 228, .9); }
.stamp b { font-size: clamp(1.1rem, 4vw, 1.5rem); }
.stamp.show { animation: stampc .3s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes stampc { from { transform: rotate(6deg) scale(2.4); opacity: 0; } to { transform: rotate(6deg) scale(1); opacity: 1; } }
.stamp i { display: none; }
.online .hud-l { display: none; }
.online .hud { grid-template-columns: 1fr auto; }
@media (max-width: 640px) {
  .game-root, .stage { gap: 8px; }
  #app { padding-top: 8px; }
  .brand { display: none; }
  .lv-w { display: none; }
  .hud { grid-template-columns: auto 1fr; padding: 6px 8px; gap: 6px 8px; }
  .hud-c { grid-column: 1 / -1; grid-row: 2; }
  .hud-r { grid-column: 2; justify-self: end; gap: 6px; }
  .hud-l { grid-column: 1; }
  .lvl-num { font-size: .95rem; font-weight: 700; }
  .icon-btn { width: 36px; height: 36px; }
  .strikes-lbl, .clock-lbl { display: none; }
  .clock { min-width: 44px; } .clock-val { font-size: 1.25rem; }
  .pips li { height: 6px; }
  .online .hud { grid-template-columns: 1fr auto; } .online .hud-c { grid-column: 1; grid-row: 1; align-self: center; } .online .hud-r { grid-column: 2; grid-row: 1; }
  .game-root .avatar { width: 48px; height: 48px; border-width: 2px; }
  .game-root .bubble { height: 74px; padding: 7px 10px; border-radius: 4px 12px 12px 12px; }
  .game-root .bubble::before { top: 14px; }
  .game-root .nameplate { display: none; }
  .game-root .bubble-text { -webkit-line-clamp: 3; font-size: .84rem; line-height: 1.28; }
  .card-head { padding: 7px 12px; } .ch-n { font-size: 1.4rem; margin-right: 10px; } .ch-title { font-size: .75rem; }
  .card { min-height: 0; }
  .cap-host { padding: 12px; }
}
@media (max-width: 640px) { .rule-toast { bottom: 10px; } }

/* ---------- r4 : tout tient dans l'écran, chrono dans le HUD ---------- */
.hud { position: sticky; top: 0; z-index: 10; overflow: hidden; }
.hud .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; border: 0; border-radius: 0; background: rgba(246, 241, 228, .12); }
.hud .bar i { border-radius: 0; }
.hud { padding-bottom: 12px; }
.game-root .card { min-height: 0; }
.online .card { min-height: 200px; }
.cap-slot { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.online .card { max-height: calc(100dvh - 210px); }
.btn.ghost { background: rgba(7, 11, 15, .82); }
.ticket { line-height: 1.55; }
@media (max-width: 640px) {
  .game-root { padding-bottom: 12px; }
  .online .card { max-height: calc(100dvh - 252px); }
  .hud { padding-bottom: 10px; }
}
@media (min-width: 700px) and (max-height: 880px) {
  .eye-slot { height: clamp(70px, 14vh, 130px); }
  .logo { font-size: clamp(3.4rem, 12vw, 6.6rem); }
  .screen.title { padding: 8px 0 4px; } .ticket { margin-bottom: 6px; } .actions { margin: 10px 0 4px; } .fine { margin-top: 12px; }
  .speaker.big { margin-top: 8px; } .big .avatar { width: 100px; height: 100px; }
}

/* ---------- r5 : zéro décalage, tout tient ---------- */
#app.game-root { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.game-root:not(.online) .stage { flex: 1 1 auto; min-height: 0; }
.game-root:not(.online) .card { flex: 1 1 auto; min-height: 0; max-height: 880px; }
.card-foot { height: 42px; padding: 5px 14px; font: 500 .75rem/1.25 var(--mono); color: #4a4838; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: none; align-content: center; }
.card-foot.v-ok { background: #bff3de; color: #064c3a; border-top-color: #0b6a52; font-weight: 600; }
.card-foot.v-bad { background: #ffd0d4; color: #7d0a1c; border-top-color: #a50f26; font-weight: 600; }
.lvl-num { font-size: .92rem; }
.cap-host { animation: capin .3s ease-out; }
@keyframes capin { from { transform: translateY(6px); } }
.game-root .bubble-text.fit { font-size: .76rem; line-height: 1.2; -webkit-line-clamp: 4; }
.rule-toast { display: none !important; }
.bn-d { margin-top: 12px; font: 600 .75rem/1.4 var(--mono); letter-spacing: .06em; color: var(--yellow); text-transform: uppercase; display: flex; flex-direction: column; gap: 3px; max-width: 32ch; }
.bn-d i { font: 500 .78rem/1.3 var(--body); font-style: italic; color: var(--dim); text-transform: none; letter-spacing: 0; }
.dossier { text-align: left; margin: 0 0 14px; padding: 10px 12px; background: var(--paper-2); border: 2px dashed rgba(16, 32, 42, .5); border-radius: 10px; }
.dossier h3 { margin: 0 0 6px; font: 600 .75rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #4a4838; }
.dossier ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font: 500 .78rem/1.3 var(--mono); color: var(--ink); }
.dossier li::before { content: '§ '; color: #c8102e; font-weight: 700; }
@media (max-width: 640px) { .dossier li:nth-child(n+4) { display: none; } .dossier { padding: 8px 10px; margin-bottom: 10px; } .dossier ul { font-size: .75rem; } }
@media (max-width: 640px) { .game-root:not(.online) .card { max-height: none; } }
@media (max-height: 700px) {
  .ticket, .typo, .fine { display: none; }
  .screen.title { padding: 6px 0; gap: 2px; }
  .logo { font-size: clamp(3rem, 14vw, 5rem); }
  .eye-slot { height: 56px; }
  .actions { margin: 10px 0 0; gap: 10px; }
  .btn { min-height: 46px; padding: 10px 16px; } .btn.primary { padding: 12px 16px; }
  .speaker.big { margin-top: 4px; } .big .avatar { width: 64px; height: 64px; }
  .tag { font-size: 1.05rem; }
}

.card-foot { box-shadow: 0 -10px 10px -10px rgba(0, 0, 0, .35); position: relative; }

/* ---------- r6 : chrome compact constant, jamais de chevauchement ---------- */
.cap-slot.more { -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent); mask-image: linear-gradient(#000 calc(100% - 26px), transparent); }
.cap-host { transform-origin: top center; }
.ledger-wide .ledger-list:not(:has(.rule)) { visibility: hidden; }
.typo { color: #c3d3d3; text-shadow: 0 1px 6px #000, 0 0 12px #000; margin-bottom: 10px; }
.tag { text-shadow: 0 2px 10px #000; }
@media (max-height: 900px) and (min-width: 641px) {
  .game-root .avatar { width: 58px; height: 58px; }
  .game-root .bubble { height: 66px; padding-top: 6px; padding-bottom: 6px; }
  .game-root .nameplate { margin-bottom: 2px; }
}
@media (max-width: 640px) {
  .game-root .avatar { width: 40px; height: 40px; }
  .game-root .bubble { height: 56px; padding: 5px 9px; }
  .game-root .bubble-text { font-size: .8rem; line-height: 1.2; -webkit-line-clamp: 2; }
  .game-root .bubble-text.fit { font-size: .75rem; -webkit-line-clamp: 3; }
  .card-foot { height: 36px; font-size: .75rem; padding: 4px 10px; }
  .card-head { padding: 5px 12px; }
  .cap-host { padding: 10px; }
}
/* en ligne, téléphone : une seule ligne de bandeau, Gérard muet pendant la course */
@media (max-width: 820px) {
  .online .speaker { display: none; }
  .online .hud { grid-template-columns: 1fr auto; padding: 4px 8px 9px; }
  .online .hud .pips { max-width: none; } .online .hud-c { display: block; }
  .online .hud-r .sound { display: none; }
  .online .card { max-height: calc(100dvh - 197px); }
}
.cap-host { animation: none !important; }
.speaker.big .bubble-text { min-height: 2.8em; }
@media (max-width: 640px) { .speaker.big .bubble-text { min-height: 5.6em; } }
@media (max-height: 700px) { .speaker.big .bubble-text { min-height: 5.2em; font-size: .9rem; } }

/* ---------- r7 : plus de zoom ; action principale collée en bas du défileur ---------- */
.pin-action { position: sticky !important; bottom: 0; z-index: 4; box-shadow: 0 -10px 14px -10px rgba(0, 0, 0, .35); }
.game-root:not(.online) .card { flex: 0 1 auto; }
.cap-host { justify-content: safe center; }
.cap-slot { display: flex; flex-direction: column; }
.cap-host { flex: 1 0 auto; }
@media (max-width: 640px) and (max-height: 720px) {
  .pips { display: none; }
  .hud { padding-bottom: 8px; }
  .game-root .avatar { width: 32px; height: 32px; }
  .game-root .bubble { height: 46px; padding: 4px 8px; }
  .game-root .bubble-text { font-size: .76rem; } .game-root .bubble-text.fit { font-size: .75rem; -webkit-line-clamp: 3; }
  .game-root, .stage { gap: 6px; }
}

@media (max-width: 640px) and (max-height: 720px) {
  .game-root .bubble { height: 42px; }
  .card-head { padding: 3px 12px; } .ch-n { font-size: 1.15rem; margin-right: 8px; }
  .cap-host { padding: 6px 8px; }
  #app { padding-top: 6px; padding-bottom: 8px !important; }
}
.bubble { isolation: isolate; }
.bubble::before { z-index: -1; }
.game-root .bubble { overflow: visible; }
.game-root:not(.online) .card { flex: 1 1 auto; }
#app.game-root { overflow: clip; }
.stage > .hud, .stage > .speaker { flex: none; }

@media (max-width: 640px) and (max-height: 720px) {
  .hud { padding-top: 4px; padding-bottom: 7px; }
  .game-root .bubble { height: 40px; }
  .card-head { padding: 2px 12px; } .card { border-width: 2px; }
  .cap-host { padding: 4px 6px; }
  #app { padding-top: 4px; padding-bottom: 6px !important; }
  .game-root, .stage { gap: 5px; }
}
@media (max-width: 640px) and (max-height: 720px) {
  .card-foot { height: 30px; padding: 3px 10px; font-size: .75rem; line-height: 1.15; }
  .game-root .bubble { height: 37px; padding: 3px 8px; }
  .game-root .bubble-text, .game-root .bubble-text.fit { font-size: .75rem; line-height: 1.12; }
  .game-root .avatar { width: 30px; height: 30px; }
}

.strike.heal { animation: healpop .9s; }
@keyframes healpop { 0% { box-shadow: 0 0 0 0 var(--green); transform: scale(1.5); border-color: var(--green); } 100% { box-shadow: 0 0 0 14px transparent; transform: none; } }


/* ---------- r8 ---------- */
.strike { width: auto; height: auto; border: 0; background: none; padding: 0 1px; }
.strike b { display: block; font: 400 1.35rem/1 var(--display); color: var(--red); opacity: 1; transform: none; text-shadow: 0 0 10px rgba(255, 59, 78, .55); transition: color .25s, text-shadow .25s; }
.strike.on { background: none; border: 0; }
.strike.on b { color: #3b4a52; text-shadow: none; opacity: 1; transform: none; }
.strike.on b::after { content: ''; }
.strike-row { gap: 1px; }
.strikes-lbl { display: block; }
.lv-t { display: none; }
.card-foot { font-size: .75rem; }
.screen.end .verdict-card .actions { position: sticky; bottom: -2px; z-index: 5; background: linear-gradient(transparent, var(--paper) 30%); padding: 14px 0 4px; margin: 0; }
@media (max-width: 640px) {
  .strikes-lbl, .clock-lbl { display: block; font-size: .75rem; }
  .game-root .bubble { height: 52px; }
  .game-root .bubble-text, .game-root .bubble-text.fit { font-size: .75rem; line-height: 1.15; -webkit-line-clamp: 3; }
  .card-foot { font-size: .75rem; height: 36px; line-height: 1.15; }
}
@media (max-width: 640px) and (max-height: 720px) {
  .card-head { display: none; }
  .strikes-lbl, .clock-lbl { display: none; }
  .game-root .bubble { height: 51px; padding: 3px 8px; }
  .game-root .bubble-text, .game-root .bubble-text.fit { font-size: .75rem; line-height: 1.12; -webkit-line-clamp: 3; }
  .card-foot { height: 34px; padding: 3px 10px; font-size: .75rem; line-height: 1.1; }
  .screen.end { align-items: start; }
}

.screen.end .verdict-card { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); overflow: hidden; }
.screen.end .vc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.screen.end .verdict-card .actions { position: static; background: none; padding: 12px 0 0; flex: none; }
.screen.end { align-items: center; }

/* ---------- r9 : budget d'espace téléphone ---------- */
.cap-slot { scroll-padding-bottom: calc(var(--pin-h, 0px) + 8px); }
.screen.end .vc-body { padding-bottom: 10px; }
@media (max-width: 640px) {
  .icon-btn { width: 42px; height: 42px; }
  .cap-host .ak-st { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
  .cap-host .ak-st > * { flex: none; }
  .cap-host .ak-note { display: none; }
}
@media (max-width: 640px) and (max-height: 720px) {
  .game-root .bubble { height: 38px; padding: 4px 8px; }
  .game-root .bubble-text, .game-root .bubble-text.fit { font-size: .75rem; line-height: 1.1; -webkit-line-clamp: 2; }
  .cap-host .ak-mock { display: none; }
  .hud { padding-top: 3px; padding-bottom: 6px; }
}
@media (max-width: 820px) { .online .ledger-btn { display: none; } .online .hud { padding-top: 2px; padding-bottom: 8px; } }


/* ---------- r10 : cinéma, tampons, budget desktop ---------- */
.slam { position: fixed; inset: 0; z-index: 28; display: grid; place-content: center; justify-items: center; gap: 10px; pointer-events: none; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 60%); }
.slam b { font: 800 clamp(3.6rem, 20vw, 13rem)/1 var(--display); letter-spacing: .05em; padding: .05em .28em; border: .09em double currentColor; border-radius: .14em; background: rgba(246, 241, 228, .94); box-shadow: 0 .06em 0 #000, 0 0 90px rgba(0, 0, 0, .55); transform: rotate(-7deg); animation: slamin .5s cubic-bezier(.2, 1.6, .4, 1) both, slamshake .5s .35s; max-width: 94vw; white-space: nowrap; }
.slam i { font: 600 clamp(.9rem, 3vw, 1.4rem)/1 var(--mono); font-style: normal; letter-spacing: .3em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 10px #000; animation: slamfade .4s .5s both; }
.slam.win b { color: #0e8a6d; } .slam.over b { color: #c8102e; }
@keyframes slamin { from { transform: rotate(-7deg) scale(4.2); opacity: 0; } to { transform: rotate(-7deg) scale(1); opacity: 1; } }
@keyframes slamshake { 20% { translate: -14px 8px; } 40% { translate: 12px -9px; } 60% { translate: -8px 5px; } 80% { translate: 5px -3px; } }
@keyframes slamfade { from { opacity: 0; transform: translateY(10px); } }
.bn-p { margin-top: 10px; font: 700 .8rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--red); border: 2px solid var(--red); padding: 4px 10px; border-radius: 6px; animation: slamfade .5s .1s both; }
.screen.end .vc-body { padding-top: 26px; }
.stamp { max-width: calc(100% - 28px); right: 20px; transform: rotate(4deg); }
@keyframes stampc { from { transform: rotate(4deg) scale(2.4); opacity: 0; } to { transform: rotate(4deg) scale(1); opacity: 1; } }
@media (max-width: 640px) { .stamp b { font-size: 1.1rem; } .stamp { padding: 1px 8px; border-width: 3px; } }
.btn small { opacity: 1; color: inherit; }
.btn.ghost.disabled { opacity: 1; color: #d6e1e1; border-color: #9fb0b0; }
.btn.ghost.disabled small { color: #cbd8d8; }
.speaker.big .bubble { min-height: 0; }
/* desktop : on rend de la hauteur à la carte (titre dans le HUD, narrateur sur une ligne) */
@media (min-width: 641px) and (max-height: 900px) {
  .card-head { display: none; }
  .lv-t { display: inline; font-weight: 500; opacity: .9; }
  .lvl-num { white-space: nowrap; }
  .game-root .bubble { height: 46px; padding-top: 4px; padding-bottom: 4px; }
  .game-root .bubble-text { -webkit-line-clamp: 2; line-height: 1.2; min-height: 0; }
  .game-root .nameplate { display: none; }
  .game-root .avatar { width: 44px; height: 44px; }
  .game-root .bubble::before { top: 12px; }
  .hud { padding-top: 4px; padding-bottom: 9px; }
  #app { padding-top: 6px; padding-bottom: 8px; }
  .game-root, .stage { gap: 8px; }
}

.game-root.cine .stage, .game-root.cine .ledger { opacity: 0; transform: scale(.97); pointer-events: none; transition: opacity .25s, transform .25s; }
.tier-beat { position: fixed; inset: 0; z-index: 27; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; pointer-events: none; }
.tier-beat i { font: 600 clamp(1rem, 4vw, 1.5rem)/1 var(--mono); font-style: normal; letter-spacing: .5em; text-transform: uppercase; color: var(--yellow); text-shadow: 0 2px 12px #000; animation: slamfade .4s both; }
.tier-beat b { font: 800 clamp(5rem, 24vw, 14rem)/.9 var(--display); letter-spacing: -.04em; color: var(--paper); text-shadow: 0 .05em 0 #000, 0 0 60px var(--tint, #2de2c0); animation: beatin .55s cubic-bezier(.2, 1.5, .4, 1) both; }
.tier-beat span { font: 600 clamp(1rem, 4vw, 1.6rem)/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(7, 11, 15, .7); padding: 8px 16px; border: 2px solid var(--red); border-radius: 6px; animation: slamfade .5s .25s both; }
@keyframes beatin { from { transform: scale(3.4); opacity: 0; } to { transform: none; opacity: 1; } }
.flash.win { background: radial-gradient(circle at 50% 45%, rgba(255, 245, 200, .85), rgba(255, 220, 120, 0) 70%); animation: fl .8s ease-out; }
.bark { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 7; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: 6px 10px; font: 500 .8rem/1.25 var(--body); box-shadow: 0 4px 0 #000; pointer-events: none; animation: slamfade .25s both; }
.bark.out { opacity: 0; transition: opacity .3s; }

/* r12 : le 3D reste présent pendant le jeu sur téléphone */
.hud { background: rgba(7, 11, 15, .5); backdrop-filter: blur(3px); }
@media (max-width: 640px) { .card-head { display: none; } .game-root .bubble { height: 40px; padding: 4px 8px; } .game-root .bubble-text, .game-root .bubble-text.fit { font-size: .75rem; line-height: 1.12; -webkit-line-clamp: 2; } .game-root .nameplate { display: none; } .pips li { height: 5px; } }
.game-root.cine .stage, .game-root.cine .ledger { transition: opacity .18s; }
@media (max-width: 640px) { .cap-host { padding: 4px 6px; } .cap-host .ak-mock { display: none; } .cap-host .ak-w { box-shadow: 0 2px 8px rgba(0,0,0,.2); } }

