/* Styles propres à chaque jeu. Ils s'appuient uniquement sur les variables de da.css. */

/* ===================== Chrono fantôme ===================== */
.chrono-game { position: absolute; inset: 0; overflow: hidden; display: grid; grid-template-rows: 1fr auto; }
.distract { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.distract.party { animation: bgparty .73s steps(1) infinite; }
@keyframes bgparty { 0% { background: rgba(255, 61, 127, .08); } 33% { background: rgba(47, 91, 255, .08); } 66% { background: rgba(255, 194, 26, .14); } }
.chrono-center { position: relative; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 20px; pointer-events: none; }
.chrono-label { font-family: var(--font-display); font-size: clamp(20px, 3vw, 34px); }
.chrono-display { font-size: clamp(64px, 15vw, 190px); line-height: 1; min-height: 1em; color: var(--ink); text-shadow: .04em .04em 0 var(--pink); font-variant-numeric: tabular-nums; }
.chrono-display.ghosted { opacity: 0; transition: opacity 1s linear; }
.chrono-detail { font-weight: 700; font-size: 19px; min-height: 1.5em; }
/* Zone du bouton : toujours au-dessus de tout, jamais recouverte. */
.chrono-zone { position: relative; z-index: 10; display: grid; justify-items: center; gap: 8px; padding: 10px 0 4vh; }
.chrono-btn {
  width: clamp(140px, 22vh, 200px); aspect-ratio: 1; border-radius: 50%; border: 5px solid var(--ink); cursor: pointer;
  font-family: var(--font-display); font-size: clamp(30px, 5vh, 46px); color: var(--ink); background: var(--yellow);
  box-shadow: 0 10px 0 var(--ink); transition: transform .05s, box-shadow .05s; touch-action: manipulation; user-select: none;
}
.chrono-btn[data-mode='stop'] { background: var(--pink); color: #fff; }
.chrono-btn:active { transform: translateY(8px); box-shadow: 0 2px 0 var(--ink); }

.fake-chrono { position: absolute; white-space: nowrap; font-variant-numeric: tabular-nums; }
.decoy { position: absolute; left: 50%; top: 3%; transform: translateX(-50%) rotate(-2deg); padding: 8px 20px; text-align: center; background: var(--card); border: var(--line); border-radius: 14px; box-shadow: 4px 4px 0 var(--blue); animation: pop .3s; }
.decoy small { display: block; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.decoy span { font-size: 40px; font-variant-numeric: tabular-nums; }
.fact, .notif { position: absolute; max-width: 300px; padding: 10px 14px; border: var(--line); border-radius: 14px; font-weight: 600; font-size: 15px; transform: rotate(var(--r, 0deg)); animation: pop .25s; }
.fact { background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); }
.fact b, .notif b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 16px; }
.notif { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--green); border-radius: 18px; }
.notif b { color: var(--green); }
.ghost { position: absolute; left: -90px; font-size: 70px; animation: ghostfly 4s linear forwards; }
@keyframes ghostfly { 25% { transform: translate(28vw, -30px) rotate(12deg); } 50% { transform: translate(56vw, 25px) rotate(-10deg); } 75% { transform: translate(84vw, -20px) rotate(10deg); } 100% { transform: translate(115vw, 10px); } }
.lie { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); text-align: center; font-family: var(--font-mono); font-size: clamp(60px, 13vw, 160px); line-height: 1; color: var(--green); text-shadow: .04em .04em 0 var(--ink); animation: blink .15s steps(1) infinite; }
.lie small { display: block; font-family: var(--font-display); font-size: .25em; color: var(--pink); }
@keyframes blink { 50% { opacity: .2; } }

.illus-chrono-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 250, 240, .9) 1.2px, transparent 1.5px) 0 0 / 14px 14px, var(--ink); background-blend-mode: soft-light; }
.illus-chrono { font-size: clamp(44px, 8vw, 84px); color: var(--yellow); text-shadow: 4px 4px 0 var(--pink); font-variant-numeric: tabular-nums; }
.illus-ghost { position: absolute; right: 10%; bottom: 10%; font-size: 64px; animation: bob 2.4s ease-in-out infinite; }

/* ===================== Trouve la langue ===================== */
.langue-game { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; width: min(94%, 1250px); margin: 0 auto; padding: 28px 0 60px; align-items: start; }
.mystery { background: var(--ink); color: var(--paper); border-radius: 24px; padding: 26px; box-shadow: 8px 8px 0 var(--blue); text-align: center; transform: rotate(-.7deg); }
.mystery small { font-weight: 700; opacity: .8; }
.mystery-text { font-size: clamp(36px, 6vw, 78px); font-weight: 800; line-height: 1.25; color: var(--yellow); margin-top: 10px; overflow-wrap: anywhere; font-family: var(--font-body), 'Noto Sans', 'Segoe UI', 'Nirmala UI', 'Leelawadee UI', 'Ebrima', 'Myanmar Text', 'Khmer UI', sans-serif; }
.guess { display: flex; gap: 10px; margin-top: 26px; align-items: flex-start; }
.guess-field { position: relative; flex: 1; }
.guess-field input { font-size: 19px; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--card); border: var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.suggest li { padding: 8px 12px; border-radius: 9px; font-weight: 700; cursor: pointer; }
.suggest li.on, .suggest li:hover { background: var(--blue); color: #fff; }
.tries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.try { padding: 4px 12px; border: 2px solid var(--ink); border-radius: 99px; background: var(--pink); color: #fff; font-weight: 700; text-decoration: line-through; text-decoration-thickness: 2px; }
.hints { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.hints .hint:nth-child(2) { grid-row: span 2; }
.hint { background: var(--card); border: var(--line); border-radius: 16px; padding: 12px 16px; box-shadow: 4px 4px 0 var(--ink); animation: pop .3s; }
.hint.locked { background: transparent; border-style: dashed; border-color: var(--ink-soft); color: var(--ink-soft); box-shadow: none; animation: none; padding: 8px 16px; }
.hint-head { display: flex; align-items: center; gap: 10px; font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: .05em; margin-bottom: 6px; }
.hint-n { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-family: var(--font-display); font-size: 15px; flex: none; }
.hint.locked .hint-n { background: var(--ink-soft); }
.hint.locked .hint-head { margin: 0; }
.hint-value { font-size: 22px; font-weight: 800; }
.hint .guess { margin-top: 4px; }
.hint .guess-field input { font-size: 16px; padding: 7px 12px; }
.tr-list { display: grid; gap: 2px; margin: 10px 0 6px; max-height: 130px; overflow-y: auto; font-size: 17px; }
.silhouette { display: block; width: 100%; max-height: 220px; }
.silhouette path { fill: var(--ink); stroke: var(--pink); stroke-width: 2; stroke-linejoin: round; }
.flag { display: block; height: 110px; border: var(--line); border-radius: 8px; }
.anagram { display: flex; flex-wrap: wrap; gap: 6px; }
.anagram span { width: 38px; height: 44px; display: grid; place-items: center; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 8px; font-family: var(--font-display); font-size: 22px; box-shadow: 2px 2px 0 var(--ink); }
.anagram span:nth-child(odd) { transform: rotate(-3deg); }
.anagram span:nth-child(even) { transform: rotate(3deg); }

.illus-langue { position: absolute; inset: 0; display: grid; place-items: center; background: var(--blue); }
.illus-bubble { background: var(--card); border: var(--line); border-radius: 26px 26px 26px 4px; padding: 16px 26px; font-size: clamp(26px, 4vw, 44px); font-weight: 800; box-shadow: 6px 6px 0 var(--ink); transform: rotate(var(--r, -3deg)); transition: transform .3s cubic-bezier(.2, 1.6, .4, 1); }
.illus-q { position: absolute; right: 10%; top: 6%; font-family: var(--font-display); font-size: 110px; color: var(--yellow); text-shadow: 5px 5px 0 var(--ink); animation: wiggle 2s infinite; }
.illus-beer { position: absolute; left: 8%; bottom: 6%; font-size: 60px; animation: bob 2.6s ease-in-out infinite; }

@media (max-width: 1100px) {
  .langue-game { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hints { grid-template-columns: 1fr; }
}

/* ===================== Boule de neige ===================== */
.boule-game { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; background: var(--grain), var(--paper); }
.boule-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.boule-opts { position: absolute; z-index: 3; top: 22px; left: 50%; transform: translateX(-50%); width: min(94%, 1020px); display: grid; grid-template-columns: 1fr 1fr; gap: 18px; visibility: hidden; }
.boule-game.playing .boule-opts { visibility: visible; }
.boule-opt { min-height: 104px; padding: 10px 16px 14px; border: var(--line); border-radius: 18px; color: #fff; cursor: pointer; text-align: center; box-shadow: 4px 4px 0 var(--ink); opacity: .82; transition: transform .1s, opacity .1s, box-shadow .1s; display: grid; align-content: center; gap: 4px; }
.boule-opt.left { background: var(--pink); }
.boule-opt.right { background: var(--blue); }
.boule-opt small { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.boule-opt span { font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.boule-opt.on { opacity: 1; transform: translateY(-4px) scale(1.02); box-shadow: 6px 8px 0 var(--ink), 0 0 0 5px var(--yellow); }
.boule-timer { position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 10px; background: var(--paper-2); border-bottom: 2px solid var(--ink); visibility: hidden; }
.boule-game.playing .boule-timer { visibility: visible; }
.boule-timer i { display: block; height: 100%; background: var(--yellow); transform-origin: left; }
.boule-gate-label { position: absolute; z-index: 1; left: 0; top: 0; color: #fff; font-weight: 800; text-align: center; line-height: 1.1; pointer-events: none; opacity: 0; overflow-wrap: anywhere; text-shadow: 2px 2px 0 var(--ink); will-change: transform; }
.boule-power { position: absolute; z-index: 2; left: 0; top: 0; padding: 4px 16px; background: var(--ink); color: var(--yellow); border-radius: 99px; font-size: clamp(20px, 3vw, 32px); white-space: nowrap; pointer-events: none; box-shadow: 3px 3px 0 var(--pink); will-change: transform; }
.boule-boss-label { position: absolute; z-index: 2; left: 0; top: 0; padding: 4px 14px; background: var(--pink); color: #fff; border: var(--line); border-radius: 10px; font-family: var(--font-display); font-size: 20px; white-space: nowrap; pointer-events: none; }
.boule-fx { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.boule-pop { position: absolute; transform: translate(-50%, 0); padding: 6px 16px; border: var(--line); border-radius: 12px; font-weight: 800; font-size: 22px; max-width: 80vw; text-align: center; animation: boulepop 1.5s ease-out forwards; }
.boule-pop.good { background: var(--green); color: var(--ink); }
.boule-pop.bad { background: var(--ink); color: var(--pink); }
@keyframes boulepop { 0% { transform: translate(-50%, 20px) scale(.6); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1.1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -90px) scale(1); opacity: 0; } }
.boule-intro { position: absolute; z-index: 5; left: 50%; top: 12%; transform: translateX(-50%) rotate(-1deg); width: min(92%, 480px); text-align: center; box-shadow: 8px 8px 0 var(--blue); }
.boule-intro h3 { font-size: 32px; margin-bottom: 12px; }
.boule-recap { text-align: left; margin-bottom: 18px; max-height: 42vh; overflow-y: auto; padding-right: 4px; }
.boule-recap .who { white-space: normal; font-size: 15px; }
.boule-recap .who small { display: block; font-weight: 600; color: var(--ink-soft); }
.boule-recap li.miss { background: #ffe3ec; }
.result-panel:has(.boule-recap) { max-width: 720px; margin-top: 3vh; }

.illus-boule { position: absolute; inset: 0; background: var(--paper-2); overflow: hidden; }
.ib-slope { position: absolute; left: 50%; bottom: 0; width: 86%; height: 78%; transform: translateX(-50%); background: #fff; clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); }
.ib-gate { position: absolute; top: 24%; width: 34%; height: 34%; display: grid; place-items: center; border: var(--line); color: #fff; font-weight: 800; font-size: clamp(15px, 2.2vw, 24px); text-align: center; padding: 4px; }
.ib-gate.left { right: 50%; background: var(--pink); }
.ib-gate.right { left: 50%; background: var(--blue); }
.ib-ball { position: absolute; bottom: 7%; left: 30%; width: 62px; height: 62px; margin-left: -31px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-shadow: inset -8px -8px 0 var(--paper-2); transition: left .45s cubic-bezier(.2, 1.5, .4, 1); animation: bob 1s ease-in-out infinite; }
.ib-ball.right { left: 70%; }

/* ===================== Sant'Attack ===================== */
.santa-game { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; background: var(--grain), var(--paper-2); }
.santa-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.santa-hud { position: absolute; z-index: 2; top: 12px; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 22px; pointer-events: none; }
.santa-lives { display: flex; gap: 4px; font-size: 34px; line-height: 1; }
.santa-lives span { color: transparent; -webkit-text-stroke: 2px var(--ink-soft); }
.santa-lives span.on { color: var(--pink); -webkit-text-stroke: 2px var(--ink); }
.santa-time { font-size: clamp(30px, 5vw, 54px); line-height: 1; padding: 4px 20px; background: var(--ink); color: var(--yellow); border-radius: 99px; box-shadow: 4px 4px 0 var(--pink); font-variant-numeric: tabular-nums; }
.santa-banner { position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%) rotate(-1.5deg); padding: 8px 20px; background: var(--yellow); border: var(--line); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); font-family: var(--font-display); font-size: clamp(16px, 2.4vw, 24px); white-space: nowrap; pointer-events: none; animation: santabanner 2.6s ease-out forwards; }
@keyframes santabanner { 0% { opacity: 0; transform: translateX(-50%) translateY(20px) rotate(-1.5deg) scale(.8); } 10%, 80% { opacity: 1; transform: translateX(-50%) rotate(-1.5deg) scale(1); } 100% { opacity: 0; transform: translateX(-50%) rotate(-1.5deg); } }
.santa-intro { position: absolute; z-index: 5; left: 50%; top: 14%; transform: translateX(-50%) rotate(-1deg); width: min(92%, 480px); text-align: center; box-shadow: 8px 8px 0 var(--pink); }
.santa-intro h3 { font-size: 32px; margin-bottom: 12px; }

.illus-santa { position: absolute; inset: 0; overflow: hidden; background: #fffdf7; }
.is-sleigh { position: absolute; left: 50%; bottom: 14%; width: 34px; height: 58px; margin-left: -17px; background: var(--pink); border: 3.5px solid var(--ink); border-radius: 10px; box-shadow: inset 0 -18px 0 var(--green), 0 0 0 0 transparent; animation: issleigh 2.6s ease-in-out infinite; }
.is-sleigh::after { content: ''; position: absolute; left: 50%; top: 9px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); box-shadow: 0 0 0 5px #fff, 0 0 0 7px var(--ink); }
@keyframes issleigh { 0%, 100% { transform: translateX(-90px) rotate(-10deg); } 50% { transform: translateX(90px) rotate(10deg); } }
.is-shot { position: absolute; top: -12%; width: 26px; height: 26px; border: 3px solid var(--ink); border-radius: 50%; background: #fff; animation: isfall 3.1s linear infinite; }
.is-shot.s1 { background: var(--pink); border-radius: 4px; }
.is-shot.s2 { background: var(--blue); }
.is-shot.s3 { background: var(--yellow); width: 16px; height: 16px; }
@keyframes isfall { to { transform: translateY(420px) rotate(200deg); } }

/* ===================== Reproduis le son ===================== */
.synth-levels { width: min(94%, 1050px); margin: 5vh auto; text-align: center; }
.synth-levels h3 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 10px; }
.synth-levels p { font-weight: 600; margin-bottom: 26px; }
.synth-level-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.synth-level { display: grid; gap: 6px; padding: 22px 14px; border: var(--line); border-radius: 20px; box-shadow: var(--shadow); cursor: pointer; background: var(--green); color: var(--ink); transition: transform .1s, box-shadow .1s; font-weight: 600; }
.synth-level[data-n='1'] { background: var(--yellow); }
.synth-level[data-n='2'] { background: var(--blue); color: #fff; }
.synth-level[data-n='3'] { background: var(--pink); color: #fff; }
.synth-level:hover { transform: translate(-3px, -4px) rotate(-1deg); box-shadow: 9px 10px 0 var(--ink); }
.synth-level b { font-family: var(--font-display); font-weight: 400; font-size: 28px; }
.synth-level .big { font-size: 20px; font-weight: 800; }
.synth-level small { opacity: .9; }

.synth-game { width: min(96%, 1180px); margin: 0 auto; padding: 18px 0 40px; }
.synth-panel { background: var(--card); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--blue); padding: 18px; }
.synth-screen { position: relative; border: var(--line); border-radius: 16px; overflow: hidden; background: var(--ink); }
.synth-scope { display: block; width: 100%; height: clamp(150px, 26vh, 250px); }
.synth-env { display: block; width: 100%; height: 88px; border-top: 2px solid rgba(255, 250, 240, .25); }
.synth-legend { position: absolute; top: 8px; right: 12px; display: flex; gap: 14px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.synth-legend .me { color: var(--yellow); }
.synth-legend .cible { color: var(--pink); }
.synth-info { margin: 12px 2px; min-height: 2.9em; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.synth-info b { color: var(--ink); }
.synth-knobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 14px 8px; padding: 16px 10px; border: var(--line); border-radius: 16px; background: var(--paper-2); }
.knob-wrap { display: grid; justify-items: center; gap: 5px; text-align: center; }
.knob-wrap b { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; line-height: 1.1; }
.knob-val { font-size: 13px; background: var(--ink); color: var(--yellow); padding: 1px 10px; border-radius: 99px; white-space: nowrap; }
.knob { --v: 0; position: relative; width: 78px; height: 78px; border-radius: 50%; cursor: ns-resize; touch-action: none;
  background: conic-gradient(from 225deg, var(--pink) calc(var(--v) * 270deg), var(--card) 0 270deg, transparent 0);
  border: var(--line); box-shadow: 3px 4px 0 var(--ink); }
.knob::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--ink); }
.knob i { position: absolute; inset: 9px; border-radius: 50%; transform: rotate(calc(-135deg + var(--v) * 270deg)); }
.knob i::after { content: ''; position: absolute; left: 50%; top: 5px; width: 6px; height: 20px; margin-left: -3px; border-radius: 3px; background: var(--yellow); }
.knob:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
.synth-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.synth-actions .spacer { flex: 1; }
.synth-recap { text-align: left; margin-bottom: 14px; }
.synth-recap .who { white-space: normal; }
.synth-recap .who small { display: block; font-weight: 600; color: var(--ink-soft); }
.synth-recap .rk { font-size: 20px; }
.result-panel:has(.synth-recap) { max-width: 680px; margin-top: 3vh; }
.illus-synth { position: absolute; inset: 0; width: 100%; height: 100%; }

@media (max-width: 820px) {
  .synth-level-grid { grid-template-columns: 1fr 1fr; }
}

/* ===================== Tape Lutin ===================== */
.lutin-game { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; user-select: none; touch-action: manipulation; }
.lutin-hud { display: flex; justify-content: center; gap: clamp(20px, 6vw, 80px); padding: 14px 16px 6px; text-align: center; }
.lutin-hud small { display: block; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.lutin-score { font-size: clamp(30px, 6vh, 52px); line-height: 1; min-width: 3ch; padding: 2px 18px; background: var(--ink); color: var(--yellow); border-radius: 99px; box-shadow: 4px 4px 0 var(--pink); }
.lutin-combo { display: flex; gap: 5px; align-items: center; height: clamp(34px, 6vh, 56px); }
.lutin-combo i { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--card); transition: transform .1s; }
.lutin-combo i.on { background: var(--green); transform: scale(1.2); }
.lutin-time { height: 10px; margin: 4px 0; background: var(--paper-2); border-block: 2px solid var(--ink); }
.lutin-time i { display: block; height: 100%; background: var(--pink); transform-origin: left; }
.lutin-arena { flex: 1; min-height: 0; display: grid; place-items: center; padding: 10px; }
.lutin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 2vmin, 22px); width: min(92vw, calc(100vh - 230px), 640px); aspect-ratio: 1; transition: transform .55s cubic-bezier(.3, 1.4, .5, 1); }
.lutin-grid.mirror { transform: scaleX(-1); }
.lutin-grid.rot { transform: rotate(180deg); }
.lutin-grid.mirror.rot { transform: rotate(180deg) scaleX(-1); }

.lutin-cell { position: relative; overflow: hidden; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 14px; -webkit-tap-highlight-color: transparent; --b: var(--pink); }
.lutin-cell[data-box="blue"] { --b: var(--blue); }
.lutin-cell[data-box="yellow"] { --b: var(--yellow); }
.lutin-cell[data-box="green"] { --b: var(--green); }
.lutin-char { position: absolute; left: 14%; right: 14%; top: 2%; height: 62%; transform: translateY(165%); transition: transform .13s cubic-bezier(.3, 1.6, .5, 1); }
.lutin-char svg { display: block; width: 100%; height: 100%; }
.lutin-cell.up .lutin-char { transform: translateY(0); }
.lutin-cell.bonk .lutin-char { transform: translateY(18%) scale(1.25, .55); transition-duration: .06s; }
.lutin-box { position: absolute; z-index: 2; left: 6%; right: 6%; bottom: 3%; height: 43%; background: var(--b); border: var(--line); border-radius: 10px; box-shadow: inset -10px -8px 0 rgba(29, 23, 101, .14); }
.lutin-box i { position: absolute; left: 50%; top: 0; bottom: 0; width: 16%; margin-left: -8%; background: var(--card); border-inline: 3px solid var(--ink); }
.lutin-lid { position: absolute; z-index: 3; left: 2%; right: 2%; bottom: 44%; height: 12%; background: var(--b); border: var(--line); border-radius: 8px; transform-origin: 4% 100%; transition: transform .13s cubic-bezier(.3, 1.6, .5, 1); }
.lutin-cell.up .lutin-lid { transform: rotate(-58deg) translateY(-30%); }
.lutin-key { position: absolute; z-index: 4; right: 10%; bottom: 8%; width: 30%; aspect-ratio: 1; display: grid; place-items: center; background: var(--ink); color: var(--paper); border-radius: 8px; font-family: var(--font-mono); font-size: clamp(13px, 3vmin, 22px); }
.lutin-cell.miss .lutin-box { animation: lutinmiss .2s 2; }
@keyframes lutinmiss { 50% { transform: translateX(-5px) rotate(-2deg); } }
.lutin-game.stunned .lutin-score { box-shadow: 4px 4px 0 var(--ink-soft); }
.lutin-game.shake .lutin-arena { animation: lutinshake .35s; }
@keyframes lutinshake { 20% { transform: translate(-9px, 5px) rotate(-1.5deg); } 50% { transform: translate(8px, -6px) rotate(1.5deg); } 80% { transform: translate(-5px, 3px); } }
/* Papier cadeau : on ne voit plus ce qui sort */
.lutin-cover { position: absolute; z-index: 5; inset: 0; border: var(--line); border-radius: 14px; transform: scale(0) rotate(-20deg); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); pointer-events: none;
  background: repeating-linear-gradient(45deg, var(--yellow) 0 14px, var(--pink) 14px 28px); }
.lutin-cell.covered .lutin-cover { transform: scale(1) rotate(0); }

.lutin-overlay, .lutin-floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.lutin-float { position: absolute; transform: translate(-50%, 0); font-family: var(--font-display); font-size: clamp(22px, 5vmin, 40px); white-space: nowrap; text-shadow: 2px 2px 0 var(--card); animation: lutinfloat .9s ease-out forwards; }
.lutin-float.good { color: var(--green); -webkit-text-stroke: 1.5px var(--ink); }
.lutin-float.bad { color: var(--pink); -webkit-text-stroke: 1.5px var(--ink); font-size: clamp(30px, 7vmin, 56px); }
.lutin-float.combo { color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); font-size: clamp(26px, 6vmin, 48px); }
@keyframes lutinfloat { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -70px); } }
.lutin-banner { position: absolute; z-index: 7; left: 50%; bottom: 14px; padding: 5px 16px; background: var(--ink); color: var(--yellow); border-radius: 99px; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; pointer-events: none; white-space: nowrap; animation: lutinbanner 2.4s ease-out forwards; }
@keyframes lutinbanner { 0% { opacity: 0; transform: translate(-50%, 16px); } 12%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }
.lutin-popup { position: absolute; left: 50%; top: 44%; width: min(80vw, 380px); transform: translate(-50%, -50%) rotate(var(--r, 0deg)); padding: 16px 20px; background: var(--card); border: var(--line); border-radius: 16px; box-shadow: 8px 8px 0 var(--blue); font-weight: 600; animation: fade .2s; }
.lutin-popup b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; margin-bottom: 4px; }
.lutin-game.disco { animation: lutindisco .3s steps(1) infinite; }
.lutin-game.disco .lutin-grid { animation: lutinhue .5s linear infinite; }
@keyframes lutindisco { 0% { background: var(--pink); } 25% { background: var(--yellow); } 50% { background: var(--blue); } 75% { background: var(--green); } }
@keyframes lutinhue { 0% { filter: hue-rotate(0deg) saturate(1.6); } 100% { filter: hue-rotate(360deg) saturate(1.6); } }
@property --lx { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --ly { syntax: "<percentage>"; inherits: false; initial-value: 55%; }
.lutin-dark { position: absolute; inset: 0; background: radial-gradient(circle 17vmin at var(--lx) var(--ly), transparent 0 55%, rgba(12, 9, 50, .97) 100%); animation: lutinlamp 3.2s ease-in-out infinite alternate, fade .3s; }
@keyframes lutinlamp { 0% { --lx: 34%; --ly: 40%; } 25% { --lx: 64%; --ly: 52%; } 50% { --lx: 42%; --ly: 76%; } 75% { --lx: 62%; --ly: 82%; } 100% { --lx: 50%; --ly: 44%; } }
.lutin-blizzard { position: absolute; inset: 0; background: rgba(255, 255, 255, .35); animation: fade .4s; }
.lutin-blizzard i { position: absolute; left: -30vmin; border-radius: 50%; background: #fff; filter: blur(6px); opacity: .95; animation: lutinsnow 1.6s linear infinite; }
@keyframes lutinsnow { to { transform: translateX(calc(100vw + 60vmin)); } }

.lutin-intro { position: absolute; z-index: 9; left: 50%; top: 9%; transform: translateX(-50%) rotate(-1deg); width: min(94%, 540px); text-align: center; box-shadow: 8px 8px 0 var(--green); }
.lutin-intro h3 { font-size: 32px; margin-bottom: 12px; }
.lutin-legends { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.lutin-legend { display: grid; justify-items: center; gap: 2px; font-weight: 800; font-size: 13px; line-height: 1.15; }
.lutin-legend span { width: 58px; height: 58px; }
.lutin-legend svg { width: 100%; height: 100%; }
.illus-lutin { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4%; align-items: center; padding: 6%; background: var(--paper-2); }
.illus-lutin .lutin-cell { aspect-ratio: 1; cursor: default; }

/* ===================== Trouve le Père Noël ===================== */
.pere-game { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; user-select: none; background: var(--grain), var(--paper-2); }
.pere-hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 8px 18px; }
.pere-wanted { display: flex; align-items: center; gap: 8px; }
.pere-wanted small { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.pere-portrait { display: block; width: 56px; height: 56px; background: var(--yellow); border: var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-4deg); }
.pere-portrait svg { display: block; width: 100%; height: 100%; }
.pere-time { font-size: clamp(30px, 6vh, 54px); line-height: 1; padding: 4px 22px; background: var(--ink); color: var(--yellow); border-radius: 99px; box-shadow: 4px 4px 0 var(--pink); font-variant-numeric: tabular-nums; }
.pere-time.low { background: var(--pink); color: #fff; box-shadow: 4px 4px 0 var(--ink); animation: pulse .4s ease-in-out infinite alternate; }
.pere-round { justify-self: end; font-family: var(--font-display); font-size: clamp(18px, 3vw, 28px); }
.pere-stage { flex: 1; min-height: 0; padding: 0 10px 10px; }
.pere-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.pere-game.wrong .pere-stage { animation: lutinshake .3s; }
.pere-floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.pere-float { position: absolute; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: clamp(26px, 5vmin, 44px); white-space: nowrap; -webkit-text-stroke: 1.5px var(--ink); text-shadow: 2px 2px 0 var(--card); animation: perefloat 1s ease-out forwards; }
.pere-float.good { color: var(--green); }
.pere-float.bad { color: var(--pink); }
@keyframes perefloat { 0% { opacity: 0; margin-top: 10px; } 15% { opacity: 1; margin-top: 0; } 100% { opacity: 0; margin-top: -70px; } }
.pere-banner { position: absolute; z-index: 4; left: 50%; bottom: 22px; padding: 5px 16px; background: var(--ink); color: var(--yellow); border-radius: 99px; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; pointer-events: none; white-space: nowrap; animation: lutinbanner 2.4s ease-out forwards; }
.pere-intro { position: absolute; z-index: 5; left: 50%; top: 12%; transform: translateX(-50%) rotate(-1deg); width: min(92%, 460px); text-align: center; box-shadow: 8px 8px 0 var(--blue); display: grid; justify-items: center; gap: 6px; }
.pere-intro .pere-portrait { width: 120px; height: 120px; transform: rotate(3deg); margin: 6px 0; }
.pere-intro h3 { font-size: 32px; }
.illus-pere { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2%; padding: 5%; background: #fffdf7; align-items: center; }
.illus-pere span { animation: bob 2.2s ease-in-out infinite; }
.illus-pere span.is-pere { filter: drop-shadow(0 0 0 var(--yellow)); background: var(--yellow); border-radius: 50%; box-shadow: 0 0 0 3px var(--ink); }
.illus-pere svg { display: block; width: 100%; height: auto; }

/* ===================== Xtrem riff ===================== */
[data-lane="green"] { --lane: var(--green); }
[data-lane="pink"] { --lane: var(--pink); }
[data-lane="yellow"] { --lane: var(--yellow); }
[data-lane="blue"] { --lane: var(--blue); }
[data-lane="orange"] { --lane: var(--orange); }

.riff-menu { width: min(94%, 980px); margin: 0 auto; padding: 22px 0 50px; display: grid; gap: 22px; }
.riff-song { text-align: center; }
.riff-title { font-size: clamp(30px, 5vw, 56px); margin: 10px 0 6px; text-shadow: .05em .05em 0 var(--pink); }
.riff-song p { font-weight: 600; margin: 0; }
.riff-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.riff-level { display: grid; gap: 4px; padding: 16px 10px; border: var(--line); border-radius: 18px; box-shadow: var(--shadow); cursor: pointer; background: var(--green); color: var(--ink); font-weight: 700; transition: transform .1s, box-shadow .1s; }
.riff-level[data-n="1"] { background: var(--yellow); }
.riff-level[data-n="2"] { background: var(--blue); color: #fff; }
.riff-level[data-n="3"] { background: var(--pink); color: #fff; }
.riff-level b { font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.riff-level small { opacity: .85; font-weight: 600; }
.riff-level:hover { transform: translate(-2px, -3px); box-shadow: 8px 9px 0 var(--ink); }
.riff-level.on { transform: translate(-2px, -4px) rotate(-1.5deg); box-shadow: 8px 9px 0 var(--ink), 0 0 0 6px var(--card), 0 0 0 10px var(--ink); }
.riff-settings h3 { font-size: 22px; margin-bottom: 12px; }
.riff-row { display: grid; grid-template-columns: 210px 1fr auto; align-items: center; gap: 14px; margin-bottom: 12px; font-weight: 700; }
.riff-row input[type=range] { width: 100%; accent-color: var(--pink); }
.riff-row b { min-width: 80px; text-align: right; }
.riff-keys { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.riff-keys i { font-style: normal; font-size: 12px; font-weight: 800; text-transform: uppercase; margin-left: 8px; }
.riff-key { min-width: 46px; height: 46px; padding: 0 10px; border: var(--line); border-radius: 10px; background: var(--lane, var(--card)); font-family: var(--font-mono); font-size: 17px; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.riff-key.wait { background: var(--ink); color: var(--yellow); }
.riff-go { text-align: center; }
.riff-go p { margin-top: 12px; }

.riff-game { position: absolute; inset: 0; overflow: hidden; user-select: none; touch-action: none; background: var(--grain), var(--paper); transition: background-color .3s; }
.riff-game.xtrem { background-color: var(--yellow); }
.riff-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.riff-hud { position: absolute; z-index: 2; top: 48px; display: grid; gap: 8px; pointer-events: none; }
.riff-hud.left { left: 3vw; justify-items: start; }
.riff-hud.right { right: 3vw; justify-items: center; }
.riff-score { font-size: clamp(26px, 4.6vw, 54px); line-height: 1; padding: 6px 18px; background: var(--ink); color: var(--yellow); border-radius: 16px; box-shadow: 4px 4px 0 var(--pink); font-variant-numeric: tabular-nums; }
.riff-line { display: flex; align-items: center; gap: 10px; }
.riff-mult { font-family: var(--font-display); font-size: clamp(28px, 5vw, 56px); line-height: 1; color: var(--ink); text-shadow: 3px 3px 0 var(--card); }
.riff-mult[data-m="2"] { color: var(--green); }
.riff-mult[data-m="3"] { color: var(--blue); }
.riff-mult[data-m="4"] { color: var(--pink); }
.riff-mult[data-m="6"], .riff-mult[data-m="8"] { color: var(--pink); text-shadow: 3px 3px 0 var(--ink); animation: pulse .3s ease-in-out infinite alternate; }
.riff-combo { font-weight: 800; font-size: 15px; }
.riff-gauge { position: relative; width: 44px; height: min(34vh, 260px); border: var(--line); border-radius: 22px; background: var(--card); overflow: hidden; box-shadow: 4px 4px 0 var(--ink); }
.riff-gauge i { position: absolute; inset: 0; background: linear-gradient(var(--pink), var(--blue)); transform-origin: bottom; transform: scaleY(0); }
.riff-gauge::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 3px dashed var(--ink); }
.riff-gauge span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); font-family: var(--font-display); font-size: 16px; letter-spacing: .1em; color: var(--ink); mix-blend-mode: difference; filter: invert(1); }
.riff-gauge.ready { animation: pulse .35s ease-in-out infinite alternate; box-shadow: 4px 4px 0 var(--pink); }
.riff-hint { padding: 4px 12px; background: var(--pink); color: #fff; border: var(--line); border-radius: 10px; font-family: var(--font-display); font-size: 18px; animation: pulse .35s ease-in-out infinite alternate; }
.riff-top { position: absolute; z-index: 2; top: 0; left: 0; right: 0; pointer-events: none; }
.riff-progress { height: 8px; background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.riff-progress i { display: block; height: 100%; background: var(--pink); transform-origin: left; transform: scaleX(0); }
.riff-section { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 2px 14px; background: var(--card); border: 2px solid var(--ink); border-radius: 99px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.riff-section:empty { display: none; }
.riff-count { position: absolute; z-index: 3; left: 50%; top: 38%; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: clamp(90px, 22vw, 220px); color: var(--yellow); -webkit-text-stroke: 4px var(--ink); text-shadow: 8px 8px 0 var(--pink); pointer-events: none; }
.riff-pads { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: none; grid-template-columns: repeat(5, 1fr) 0.7fr; gap: 6px; padding: 6px; height: 17%; }
.riff-pad { border: var(--line); border-radius: 14px; background: var(--lane, var(--ink)); opacity: .82; font-family: var(--font-display); font-size: 22px; color: var(--yellow); touch-action: none; }
.riff-pad:active { opacity: 1; transform: scale(.96); }
@media (pointer: coarse) { .riff-pads { display: grid; } }

.illus-riff { position: absolute; inset: 0; overflow: hidden; background: var(--paper-2); perspective: 420px; }
.ir-road { position: absolute; left: 14%; right: 14%; top: -40%; bottom: -10%; background: var(--ink); transform: rotateX(52deg); transform-origin: bottom; border: 4px solid var(--ink); }
.ir-note { position: absolute; top: 0; width: 9%; height: 7%; border-radius: 50%; border: 3px solid var(--card); background: var(--green); animation: irfall 3.2s linear infinite; }
.ir-note.l0 { left: 26%; background: var(--green); }
.ir-note.l1 { left: 36%; background: var(--pink); }
.ir-note.l2 { left: 46%; background: var(--yellow); }
.ir-note.l3 { left: 56%; background: var(--blue); }
.ir-note.l4 { left: 66%; background: var(--orange); }
@keyframes irfall { 0% { transform: translateY(-40px) scale(.45); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(300px) scale(1.25); } }
.ir-line { position: absolute; left: 18%; right: 18%; bottom: 10%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3%; }
.ir-line b { height: 22px; border-radius: 50%; border: 4px solid var(--lane); background: rgba(255, 250, 240, .15); }

@media (max-width: 700px) {
  .riff-row { grid-template-columns: 1fr auto; }
  .riff-row span { grid-column: 1 / -1; }
  .riff-keys { grid-column: 1 / -1; }
  .riff-hud { top: 40px; }
  .riff-gauge { width: 32px; height: 24vh; }
}

/* Xtrem riff : combo et réussites bien visibles */
.riff-mult { font-size: clamp(44px, 7vw, 86px); }
.riff-pips { display: grid; grid-template-columns: repeat(5, 12px); gap: 4px; }
.riff-pips i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); }
.riff-pips i.on { background: var(--pink); }
.riff-bigcombo { position: absolute; z-index: 2; left: 3vw; top: 46%; display: grid; justify-items: center; pointer-events: none; }
.riff-bigcombo b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(60px, 11vw, 150px); line-height: .9; color: var(--ink); text-shadow: .05em .05em 0 var(--yellow); }
.riff-bigcombo[data-m="2"] b { color: var(--green); text-shadow: .05em .05em 0 var(--ink); }
.riff-bigcombo[data-m="3"] b { color: var(--blue); text-shadow: .05em .05em 0 var(--ink); }
.riff-bigcombo[data-m="4"] b { color: var(--pink); text-shadow: .05em .05em 0 var(--ink); }
.riff-bigcombo small { font-weight: 800; font-size: clamp(13px, 1.6vw, 20px); text-transform: uppercase; letter-spacing: .08em; background: var(--ink); color: var(--paper); padding: 2px 12px; border-radius: 99px; }
.riff-game.xtrem .riff-bigcombo b { color: var(--pink); text-shadow: .05em .05em 0 var(--ink); }
.riff-miss { position: absolute; z-index: 3; left: 50%; top: 62%; transform: translate(-50%, 0); padding: 2px 18px; background: var(--ink); color: var(--pink); border-radius: 12px; font-family: var(--font-display); font-size: clamp(22px, 3.4vw, 38px); pointer-events: none; opacity: 0; }
.riff-milestones { position: absolute; z-index: 3; left: 0; right: 0; top: 24%; display: grid; justify-items: center; gap: 6px; pointer-events: none; }
.riff-milestone { padding: 6px 22px; background: var(--yellow); border: var(--line); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); font-family: var(--font-display); font-size: clamp(24px, 4vw, 46px); white-space: nowrap; animation: riffmilestone 1.1s ease-out forwards; }
@keyframes riffmilestone { 0% { opacity: 0; transform: scale(.5) rotate(-6deg); } 15% { opacity: 1; transform: scale(1.12) rotate(-3deg); } 75% { opacity: 1; transform: scale(1) rotate(-3deg); } 100% { opacity: 0; transform: translateY(-30px) rotate(-3deg); } }
@media (max-width: 700px) { .riff-bigcombo { top: 30%; } }

/* ===================== Xmas AutoFight ===================== */
.fight-sprite { display: block; }
.fight-sprite svg { display: block; width: 100%; height: 100%; }
.fight-atelier { width: min(97%, 1500px); margin: 0 auto; padding: 16px 0 40px; display: grid; gap: 16px; }
.fight-atelier h4 { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin: 0 0 8px; }
.fight-picks { display: grid; grid-template-columns: 1.1fr 1.3fr 1.3fr; gap: 14px; }
.fight-pick { background: var(--card); border: var(--line); border-radius: 18px; padding: 12px; box-shadow: 4px 4px 0 var(--ink); }
.fight-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fight-opt { display: grid; gap: 2px; align-content: start; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font-size: 13px; line-height: 1.25; }
.fight-opt b { font-size: 14px; }
.fight-opt .mono { font-size: 11.5px; color: var(--blue); }
.fight-opt small { color: var(--ink-soft); font-weight: 600; }
.fight-opt .fight-sprite { width: 40px; height: 40px; }
.fight-opt.on { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -2px); }
.fight-opt.on .mono { color: var(--ink); }
.fight-work { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.fight-editor { background: var(--card); border: var(--line); border-radius: 18px; padding: 12px; box-shadow: 4px 4px 0 var(--pink); }
.fight-edit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fight-edit-box { display: grid; grid-template-columns: auto 1fr; height: min(58vh, 560px); border: var(--line); border-radius: 12px; overflow: hidden; background: var(--ink); }
.fight-gutter { padding: 12px 8px 12px 10px; overflow: hidden; text-align: right; font: 500 14px/1.5 var(--font-mono); color: rgba(255, 250, 240, .4); user-select: none; }
.fight-gutter span { display: block; }
.fight-gutter span.bad { color: #fff; background: var(--pink); border-radius: 4px; }
.fight-code { width: 100%; height: 100%; padding: 12px; border: 0; resize: none; outline: none; background: transparent; color: var(--paper); font: 500 14px/1.5 var(--font-mono); tab-size: 2; white-space: pre; overflow: auto; caret-color: var(--yellow); }
.fight-status { margin-top: 8px; padding: 7px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; border: 2px solid var(--ink); }
.fight-status.ok { background: var(--green); }
.fight-status.bad { background: var(--pink); color: #fff; }
.fight-doc { background: var(--card); border: var(--line); border-radius: 18px; padding: 10px 12px; box-shadow: 4px 4px 0 var(--blue); max-height: calc(min(58vh, 560px) + 92px); overflow-y: auto; font-size: 14px; }
.fight-doc details { border-bottom: 2px dashed var(--paper-2); padding: 6px 0; }
.fight-doc summary { cursor: pointer; font-weight: 800; }
.fight-doc p { margin: 8px 0; }
.fight-doc pre { margin: 8px 0; padding: 10px; background: var(--ink); color: var(--paper); border-radius: 10px; font: 500 12.5px/1.45 var(--font-mono); overflow-x: auto; }
.fight-fn { display: grid; gap: 2px; padding: 6px 0; }
.fight-fn button { justify-self: start; padding: 1px 8px; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); font-size: 13px; cursor: pointer; text-align: left; }
.fight-fn button:hover { background: var(--pink); color: #fff; }
.fight-fn span { color: var(--ink-soft); font-weight: 600; font-size: 13px; }
.fight-launch { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.fight-train { display: grid; gap: 6px; justify-items: center; text-align: center; max-width: 240px; }
.fight-train small { font-weight: 600; color: var(--ink-soft); }
.fight-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fight-level { display: grid; gap: 2px; align-content: start; padding: 10px; border: var(--line); border-radius: 14px; background: var(--green); color: var(--ink); cursor: pointer; text-align: left; font-size: 12.5px; opacity: .72; }
.fight-level[data-n="1"] { background: var(--yellow); }
.fight-level[data-n="2"] { background: var(--blue); color: #fff; }
.fight-level[data-n="3"] { background: var(--pink); color: #fff; }
.fight-level b { font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.fight-level ul { margin: 4px 0 0; padding-left: 16px; font-weight: 600; }
.fight-level.on { opacity: 1; box-shadow: 4px 4px 0 var(--ink), 0 0 0 4px var(--card), 0 0 0 7px var(--ink); transform: translateY(-3px); }

.fight-combat { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; padding: 14px; }
.fight-stage { display: grid; place-items: center; min-height: 0; min-width: 0; }
.fight-board { position: relative; width: min(100%, calc((100vh - 110px) * 11 / 9)); border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 8px 8px 0 var(--ink); background: #fffdf7; }
.fight-grid { position: absolute; inset: 0; display: grid; }
.fight-cell { border: 1px solid rgba(29, 23, 101, .12); transition: background-color .15s; }
.fight-cell.alt { background: rgba(29, 23, 101, .045); }
.fight-cell.wall { background: var(--green) repeating-linear-gradient(45deg, transparent 0 8px, rgba(29, 23, 101, .25) 8px 12px); border: 2px solid var(--ink); border-radius: 8px; }
.fight-cell.danger { background: rgba(255, 61, 127, .38); box-shadow: inset 0 0 0 2px var(--pink); animation: fightdanger .5s ease-in-out infinite alternate; }
@keyframes fightdanger { to { background: rgba(255, 61, 127, .62); } }
.fight-cell.hit-me { background: var(--yellow); }
.fight-cell.hit-foe { background: var(--pink); }
.fight-layer { position: absolute; inset: 0; pointer-events: none; }
.fight-token { position: absolute; padding: 6%; transition: left .16s ease-out, top .16s ease-out, opacity .4s, transform .4s; display: grid; padding: .5%; }
.fight-token .fight-sprite { width: 100%; height: 100%; padding: 8%; }
.fight-token.boss .fight-sprite { padding: 0; filter: drop-shadow(0 0 0 var(--ink)); }
.fight-token.me .fight-sprite { background: var(--yellow); border-radius: 50%; border: 2px solid var(--ink); }
.fight-token.guard .fight-sprite { box-shadow: 0 0 0 5px var(--blue); }
.fight-token.dead { opacity: 0; transform: scale(.3) rotate(40deg); }
.fight-token.hurt { animation: fighthurt .3s; }
@keyframes fighthurt { 30% { transform: translate(-6%, 3%) rotate(-6deg); } 60% { transform: translate(5%, -3%) rotate(5deg); } }
.fight-hp { position: absolute; left: 12%; right: 12%; bottom: 2%; height: 7%; min-height: 4px; background: var(--ink); border-radius: 99px; overflow: hidden; }
.fight-hp b { display: block; height: 100%; width: 100%; background: var(--green); transition: width .25s; }
.fight-token.boss .fight-hp b, .fight-token.minion .fight-hp b { background: var(--pink); }
.fight-float { position: absolute; left: 50%; top: -6%; transform: translateX(-50%); font-family: var(--font-display); font-size: clamp(16px, 2.4vw, 30px); white-space: nowrap; -webkit-text-stroke: 1px var(--ink); animation: perefloat .9s ease-out forwards; z-index: 3; }
.fight-float.good { color: var(--yellow); }
.fight-float.bad { color: var(--pink); }
.fight-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; background: var(--card); border: var(--line); border-radius: 18px; padding: 14px; box-shadow: 5px 5px 0 var(--pink); }
.fight-turn { font-family: var(--font-display); font-size: 26px; }
.fight-who { display: grid; gap: 3px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.fight-bar { position: relative; height: 24px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.fight-bar i { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--green); transition: width .25s; }
.fight-bar.boss i { background: var(--pink); }
.fight-bar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; }
.fight-strikes { display: flex; gap: 6px; }
.fight-strikes i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper-2); }
.fight-strikes i.on { background: var(--pink); }
.fight-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.fight-controls .btn.on { background: var(--ink); color: var(--yellow); }
.fight-journal { flex: 1; min-height: 80px; overflow-y: auto; border: 2px solid var(--ink); border-radius: 12px; background: #fff; padding: 8px 10px; font-size: 13px; line-height: 1.35; font-weight: 600; }
.fight-journal .sep { margin-top: 6px; font-family: var(--font-display); font-weight: 400; color: var(--ink); }
.fight-journal .me { color: var(--blue); }
.fight-journal .foe { color: #c2185b; }
.fight-journal .err { background: var(--pink); color: #fff; padding: 2px 6px; border-radius: 6px; margin: 3px 0; }
.fight-end { display: grid; gap: 8px; }
.fight-end p { margin: 0; font-size: 14px; }

.illus-fight { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; background: var(--ink); padding: 8%; gap: 6%; }
.illus-fight pre { margin: 0; color: var(--yellow); font: 500 clamp(11px, 1.3vw, 15px)/1.5 var(--font-mono); }
.if-duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; }
.if-duel b { font-family: var(--font-display); font-weight: 400; font-size: 34px; color: var(--pink); }
.if-duel .fight-sprite { width: 72%; }
.if-me { animation: bob 1.6s ease-in-out infinite; }
.if-boss { animation: bob 1.6s ease-in-out infinite reverse; }

@media (max-width: 1100px) {
  .fight-picks, .fight-work { grid-template-columns: 1fr; }
  .fight-launch { grid-template-columns: 1fr; justify-items: center; }
  .fight-levels { grid-template-columns: 1fr 1fr; width: 100%; }
  .fight-combat { position: static; grid-template-columns: 1fr; }
  .fight-board { width: 100%; }
}

/* ===================== Aim practice ===================== */
.aim-game { position: absolute; inset: 0; display: flex; flex-direction: column; user-select: none; background: var(--grain), var(--paper-2); }
.aim-hud { display: flex; justify-content: center; gap: clamp(18px, 6vw, 70px); padding: 8px 16px; text-align: center; }
.aim-hud small { display: block; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.aim-hud b { display: inline-block; min-width: 4ch; font-size: clamp(24px, 4.5vh, 40px); line-height: 1.1; padding: 2px 16px; background: var(--ink); color: var(--yellow); border-radius: 99px; box-shadow: 3px 3px 0 var(--pink); font-weight: 500; font-variant-numeric: tabular-nums; }
.aim-stage { flex: 1; min-height: 0; padding: 0 10px 10px; }
/* Viseur façon FPS : curseur système (aucun retard d'affichage) */
.aim-canvas { display: block; width: 100%; height: 100%; touch-action: none;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg stroke='%231d1765' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M16 2v8M16 22v8M2 16h8M22 16h8'/%3E%3C/g%3E%3Cg stroke='%2300e08a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M16 3v6M16 23v6M3 16h6M23 16h6'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='1.6' fill='%2300e08a'/%3E%3C/svg%3E") 16 16, crosshair; }
.aim-game.oops .aim-stage { animation: lutinshake .35s; }
.aim-banner { position: absolute; z-index: 3; left: 50%; top: 22%; transform: translateX(-50%); padding: 4px 22px; background: var(--yellow); border: var(--line); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); font-family: var(--font-display); font-size: clamp(26px, 4.5vw, 52px); white-space: nowrap; pointer-events: none; animation: riffmilestone 1.4s ease-out forwards; }
.aim-intro { position: absolute; z-index: 4; left: 3%; top: 50%; transform: translateY(-40%) rotate(-1deg); width: min(92%, 340px); box-shadow: 7px 7px 0 var(--pink); pointer-events: none; font-size: 15px; }
.aim-intro h3 { font-size: 30px; margin-bottom: 8px; }
.aim-intro ul { margin: 0 0 10px; padding-left: 18px; font-weight: 600; }
.aim-intro li { margin-bottom: 3px; }
.aim-intro li.warn { color: #0b7a55; font-weight: 800; }
.illus-aim { position: absolute; inset: 0; background: #fffdf7; background-image: linear-gradient(rgba(29,23,101,.07) 2px, transparent 2px), linear-gradient(90deg, rgba(29,23,101,.07) 2px, transparent 2px); background-size: 40px 40px; overflow: hidden; }
.ia-target { position: absolute; width: 16%; aspect-ratio: 1; margin: -8% 0 0 -8%; border-radius: 50%; border: 3px solid var(--ink);
  background: radial-gradient(circle, var(--yellow) 0 20%, var(--pink) 20% 46%, #fff 46% 72%, var(--pink) 72%); animation: iapop 2.4s ease-in-out infinite; }
@keyframes iapop { 0%, 100% { transform: scale(0); } 10%, 45% { transform: scale(1); } 55% { transform: scale(0); } }
.ia-cross { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px; animation: iacross 2.4s ease-in-out infinite;
  background: linear-gradient(var(--ink), var(--ink)) center / 4px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) center / 100% 4px no-repeat; }
@keyframes iacross { 0%, 100% { transform: translate(-280%, -150%); } 30% { transform: translate(120%, -210%); } 60% { transform: translate(-20%, 110%); } 85% { transform: translate(230%, 150%); } }
@media (max-width: 900px) {
  .aim-intro { left: 50%; top: 8px; transform: translateX(-50%); font-size: 13px; padding: 12px; }
  .aim-intro h3 { font-size: 22px; }
}

/* ===================== Découpage précis ===================== */
.cut-game { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--grain), var(--paper-2); user-select: none; }
.cut-head { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 10px 16px 6px; }
.cut-name { font-size: clamp(22px, 3.4vw, 34px); }
.cut-target { display: flex; align-items: center; gap: 8px; padding: 4px 16px; background: var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--pink); }
.cut-target b { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 4.5vw, 46px); color: var(--yellow); }
.cut-target span { color: var(--paper); font-size: 28px; font-weight: 800; }
.cut-stage { flex: 1; min-height: 0; padding: 0 10px; }
.cut-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.cut-foot { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 10px 16px 14px; min-height: 92px; }
.cut-help { margin: 0; max-width: 520px; font-weight: 700; }
.cut-verdict { display: grid; gap: 2px; text-align: center; }
.cut-verdict b { font-family: var(--font-display); font-weight: 400; font-size: 28px; }
.cut-verdict span { font-weight: 700; }
.cut-err { display: inline-block; justify-self: center; padding: 2px 12px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 99px; }
.cut-small { display: block; font-weight: 600; color: var(--ink-soft); font-size: 13px; }
.illus-cut { position: absolute; inset: 0; background: #fffdf7; overflow: hidden; }
.ic-half { position: absolute; top: 18%; bottom: 18%; background: var(--pink); border: 4px solid var(--ink); animation: icsplit 2.6s ease-in-out infinite; }
.ic-half.left { left: 22%; width: 20%; border-right-width: 2px; --d: -14px; }
.ic-half.right { left: 42%; width: 36%; border-left-width: 2px; --d: 14px; }
@keyframes icsplit { 0%, 35% { transform: none; } 55%, 90% { transform: translateX(var(--d)); } 100% { transform: none; } }
.ic-line { position: absolute; left: 42%; top: 6%; bottom: 6%; border-left: 4px dashed var(--ink); animation: icline 2.6s ease-in-out infinite; }
@keyframes icline { 0%, 30% { opacity: 1; } 45%, 100% { opacity: 0; } }
.ic-label { position: absolute; top: 46%; padding: 2px 10px; background: var(--ink); color: var(--yellow); border-radius: 10px; font-family: var(--font-display); font-weight: 400; font-size: clamp(14px, 2vw, 22px); opacity: 0; animation: iclabel 2.6s ease-in-out infinite; }
.ic-label.l { left: 22%; }
.ic-label.r { left: 56%; }
@keyframes iclabel { 0%, 50% { opacity: 0; } 60%, 90% { opacity: 1; } 100% { opacity: 0; } }

/* ===================== Lava Escape ===================== */
.lava-game { position: absolute; inset: 0; display: flex; flex-direction: column; user-select: none; background: var(--grain), var(--paper-2); transition: box-shadow .2s; }
.lava-game.inverted { box-shadow: inset 0 0 0 8px var(--blue); }
.lava-game.burnt .lava-stage { animation: lutinshake .4s; }
.lava-hud { display: flex; justify-content: center; gap: clamp(16px, 6vw, 60px); padding: 8px 16px; text-align: center; }
.lava-hud small { display: block; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.lava-hud b { display: inline-block; min-width: 4ch; font-size: clamp(22px, 4.2vh, 38px); line-height: 1.1; padding: 2px 16px; background: var(--ink); color: var(--yellow); border-radius: 99px; box-shadow: 3px 3px 0 var(--orange); font-weight: 500; font-variant-numeric: tabular-nums; }
.lava-speed { display: inline-block; margin-top: 6px; padding: 3px 12px; border: 2px solid var(--ink); border-radius: 99px; background: var(--orange); font-weight: 800; font-size: 13px; }
.lava-stage { flex: 1; min-height: 0; padding: 0 8px 8px; }
.lava-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.lava-banner { position: absolute; z-index: 3; left: 50%; top: 24%; transform: translateX(-50%); padding: 4px 22px; background: var(--yellow); border: var(--line); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); font-family: var(--font-display); font-size: clamp(24px, 4.5vw, 48px); white-space: nowrap; pointer-events: none; animation: riffmilestone 1.8s ease-out forwards; }
.lava-intro { position: absolute; z-index: 4; left: 50%; top: 18%; transform: translateX(-50%) rotate(-1deg); width: min(92%, 420px); text-align: center; box-shadow: 8px 8px 0 var(--orange); }
.lava-intro h3 { font-size: 32px; margin-bottom: 10px; }
.illus-lava { position: absolute; inset: 0; overflow: hidden; background: #fffdf7; }
.il-walls { position: absolute; inset: 0; background:
  linear-gradient(var(--ink), var(--ink)) 10% 20% / 30% 9% no-repeat,
  linear-gradient(var(--ink), var(--ink)) 85% 38% / 35% 9% no-repeat,
  linear-gradient(var(--ink), var(--ink)) 20% 58% / 40% 9% no-repeat,
  linear-gradient(var(--ink), var(--ink)) 0 0 / 7% 100% no-repeat,
  linear-gradient(var(--ink), var(--ink)) 100% 0 / 7% 100% no-repeat; }
.il-elf { position: absolute; width: 14%; left: 44%; top: 66%; animation: ilclimb 3s ease-in-out infinite; }
@keyframes ilclimb { 0%, 10% { transform: none; } 25%, 35% { transform: translate(-240%, 0); } 50%, 60% { transform: translate(-240%, -170%); } 75%, 85% { transform: translate(160%, -170%); } 100% { transform: none; } }
.il-lava { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(var(--orange), var(--pink)); border-top: 4px solid var(--yellow); animation: illava 3s ease-in-out infinite; }
@keyframes illava { 0% { height: 14%; } 90% { height: 30%; } 100% { height: 14%; } }

/* ===================== Polyrythmie ===================== */
.poly-intro { min-height: 100%; display: flex; align-items: center; justify-content: center; gap: 4vw; flex-wrap: wrap; padding: 24px 16px 40px; }
.poly-intro-card { width: min(94vw, 480px); text-align: center; box-shadow: 8px 8px 0 var(--blue); display: grid; justify-items: center; gap: 8px; }
.poly-intro-card h3 { font-size: clamp(30px, 5vw, 44px); }
.poly-hands { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin: 6px 0; }
.poly-hand { display: grid; gap: 2px; padding: 12px 8px; border: var(--line); border-radius: 16px; color: #fff; font-weight: 700; }
.poly-hand.l { background: var(--pink); }
.poly-hand.r { background: var(--blue); }
.poly-hand b { font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 1; }
.poly-hand small { opacity: .9; }
.poly-clock { display: block; width: min(80vw, 46vh); aspect-ratio: 1; }
.poly-clock.small { width: min(80vw, 380px); }
.poly-score { font-family: var(--font-display); font-size: clamp(54px, 10vw, 86px); line-height: 1; }
.poly-score.ok { color: var(--green); -webkit-text-stroke: 2px var(--ink); }
.poly-score.ko { color: var(--pink); -webkit-text-stroke: 2px var(--ink); }

.poly-game { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px 14px; user-select: none; }
.poly-label { font-family: var(--font-display); font-size: clamp(22px, 3.4vw, 34px); }
.poly-game .poly-clock { flex: 0 1 auto; width: min(86vw, 44vh); }
.poly-strip { display: block; width: min(96vw, 900px); height: 64px; background: var(--card); border: var(--line); border-radius: 14px; }
.poly-pads { flex: 1; min-height: 90px; width: min(96vw, 900px); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.poly-pad { position: relative; display: grid; place-content: center; justify-items: center; gap: 2px; border: var(--line); border-radius: 22px; color: #fff; cursor: pointer; touch-action: none; box-shadow: 0 7px 0 var(--ink); transition: transform .05s, box-shadow .05s; }
.poly-pad.l { background: var(--pink); }
.poly-pad.r { background: var(--blue); }
.poly-pad b { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 6vh, 56px); line-height: 1; }
.poly-pad span { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.poly-pad.hit { animation: polyhit .14s ease-out; }
@keyframes polyhit { 0% { transform: translateY(6px); box-shadow: 0 1px 0 var(--ink); filter: brightness(1.25); } 100% { transform: none; } }
.poly-fb { position: absolute; top: 8px; right: 10px; padding: 1px 10px; border: 2px solid var(--ink); border-radius: 99px; color: var(--ink); font-size: 13px; font-weight: 800; }
.poly-fb:empty { display: none; }

.illus-poly { position: absolute; inset: 0; background: var(--ink); display: grid; place-items: center; }
.ip-ring { position: absolute; border-radius: 50%; border: 10px solid rgba(255, 250, 240, .12); }
.ip-ring.o { width: 72%; aspect-ratio: 1; height: auto; max-height: 86%; }
.ip-ring.i { width: 44%; aspect-ratio: 1; max-height: 54%; }
.ip-ring i { position: absolute; inset: 0; }
.ip-ring i::after { content: ''; position: absolute; left: 50%; top: -15px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; border: 3px solid var(--card); }
.ip-ring.o i::after { background: var(--blue); }
.ip-ring.i i::after { background: var(--pink); }
.ip-needle { position: absolute; left: 50%; top: 50%; width: 4px; height: 36%; margin-left: -2px; background: var(--yellow); border-radius: 2px; transform-origin: 50% 0; animation: ipspin 2.4s linear infinite; }
@keyframes ipspin { from { transform: rotate(180deg); } to { transform: rotate(540deg); } }

/* ---------- Jeu 14 : Calcul mental express ---------- */
.calc-game { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; overflow: auto; }
.calc-intro { max-width: 520px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.calc-play { width: min(100%, 900px); display: grid; justify-items: center; gap: 12px; text-align: center; }
.calc-label { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--pink); }
.calc-q { font-family: var(--font-display); font-size: clamp(38px, 8vw, 88px); line-height: 1.1; color: var(--ink); text-shadow: .045em .045em 0 var(--yellow); overflow-wrap: anywhere; }
.calc-q[data-len='mid'] { font-size: clamp(32px, 6.5vw, 72px); }
.calc-q[data-len='long'] { font-size: clamp(26px, 4.8vw, 56px); }
.calc-eq { font-family: var(--font-display); font-size: 34px; line-height: 1; color: var(--blue); }
.calc-form { display: flex; gap: 10px; width: min(100%, 460px); }
.calc-input { flex: 1; min-width: 0; font-size: clamp(26px, 5vw, 38px); text-align: center; padding: 8px 12px; border: var(--line); border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.calc-form .btn { flex: none; }
.calc-timer { width: min(100%, 460px); height: 16px; border: var(--line); border-radius: 99px; background: var(--card); overflow: hidden; }
.calc-timer i { display: block; height: 100%; background: var(--green); transform-origin: left; }
.calc-timer.hurry i { background: var(--pink); }
.calc-secs { font-size: 15px; font-weight: 700; min-height: 1.2em; }
.calc-verdict { min-height: 2.4em; display: grid; gap: 6px; justify-items: center; font-weight: 800; font-size: 20px; }
.calc-verdict.ok { color: var(--green); font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.calc-verdict.ko b { color: var(--pink); font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.calc-recap .who { font-size: 14px; }

.illus-calc { position: absolute; inset: 0; background: #22305a; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 16px; }
.ic-q { color: #fffdf7; font-size: clamp(20px, 3.4vw, 34px); text-align: center; text-shadow: 3px 3px 0 var(--pink); }
.ic-bar { width: min(70%, 320px); height: 12px; border: 2px solid #fffdf7; border-radius: 99px; overflow: hidden; }
.ic-bar i { display: block; height: 100%; background: var(--yellow); transform-origin: left; animation: icbar 2.4s linear forwards; }
@keyframes icbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- Jeu 15 : La grille ---------- */
.grille-game { position: absolute; inset: 0; overflow: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px; padding: 16px; }
.grille-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; width: min(92vw, 62vh, 460px); padding: 8px; background: var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--pink); }
.grille-cell { aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 7px; background: #fffdf7; color: var(--ink); font-family: var(--font-display); font-size: clamp(22px, 5vh, 40px); line-height: 1; padding: 0; cursor: default; }
.grille-board.armed .grille-cell:not(.filled) { cursor: pointer; background: #fff3c4; }
.grille-board.armed .grille-cell:not(.filled):hover { background: var(--yellow); }
.grille-cell.black, .grille-tile.black { background: var(--ink) !important; box-shadow: inset 0 0 0 3px rgba(255, 253, 247, .2); }
.grille-cell.ok { background: #b9f0d8; }
.grille-cell.ko { background: #ffc6d8; }
.grille-cell.ok.ko { background: linear-gradient(135deg, #b9f0d8 50%, #ffc6d8 50%); }
.grille-side { display: grid; gap: 12px; justify-items: center; width: min(100%, 460px); }
.grille-prompt { font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 24px); text-align: center; min-height: 2.4em; display: grid; place-items: center; }
.grille-keys { display: grid; gap: 6px; justify-items: center; }
.grille-keys.nudge { animation: grillenudge .3s; }
@keyframes grillenudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.grille-krow { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.grille-key { min-width: 36px; height: 44px; padding: 0 6px; border: var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font-family: var(--font-display); font-size: 20px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.grille-key:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.grille-key.on { background: var(--yellow); transform: translateY(-3px); box-shadow: 0 6px 0 var(--ink); }
.grille-key.black { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body, inherit); font-weight: 800; font-size: 13px; }
.grille-key.black i { width: 18px; height: 18px; background: var(--ink); border-radius: 4px; }
.grille-imposed { display: grid; gap: 8px; justify-items: center; }
.grille-imposed[hidden], .grille-keys[hidden] { display: none; }
.grille-tile { width: 64px; height: 64px; display: grid; place-items: center; border: var(--line); border-radius: 12px; background: var(--yellow); color: var(--ink); font-family: var(--font-display); font-size: 38px; line-height: 1; padding: 0; }
.grille-tile.big { width: 84px; height: 84px; font-size: 52px; box-shadow: 5px 5px 0 var(--ink); animation: grillepop .25s ease-out; }
@keyframes grillepop { from { transform: scale(.6) rotate(-8deg); } }
.grille-res { display: flex; align-items: center; gap: 10px; }
.grille-tile.reserve { width: 52px; height: 52px; font-size: 30px; cursor: pointer; background: #dfe6ff; }
.grille-tile.reserve.empty { background: transparent; border-style: dashed; cursor: default; }
.grille-tile.reserve.on { background: var(--yellow); transform: translateY(-3px); box-shadow: 0 5px 0 var(--ink); }
.grille-reminder { text-align: center; max-width: 420px; margin: 0; }
.grille-final { display: grid; gap: 10px; justify-items: center; margin-bottom: 16px; }
.grille-final .grille-board { width: min(80vw, 300px); box-shadow: 4px 4px 0 var(--pink); }
.grille-final .grille-cell { font-size: 22px; }
.grille-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; text-align: left; }
.grille-lists h4 { margin: 0 0 4px; }
.grille-words { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14px; }
.grille-words li { display: flex; gap: 6px; align-items: baseline; }
.grille-words li b { flex: 1; letter-spacing: .05em; }
.grille-words li.ok span:last-child { color: var(--green); font-weight: 800; }
.grille-words li.ko { color: var(--pink); }
.grille-words li.ko b { text-decoration: line-through; }

.illus-grille-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: var(--blue); }
.illus-grille { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; width: min(60%, 220px); padding: 6px; background: var(--ink); border-radius: 10px; box-shadow: 5px 5px 0 var(--yellow); }
.illus-grille i { aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px; background: #fffdf7; font: 400 clamp(12px, 2vw, 20px)/1 var(--font-display); font-style: normal; color: var(--ink); }
.illus-grille i.on { animation: grillepop .2s ease-out; }
.illus-grille i.black { background: var(--ink); box-shadow: inset 0 0 0 2px rgba(255, 253, 247, .2); }

/* ---------- Jeu 16 : On repasse le code ---------- */
.code-game { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; padding: 14px; }
.code-intro { max-width: 520px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.code-play { width: min(100%, 760px); display: grid; gap: 10px; justify-items: center; }
.code-head { width: 100%; display: flex; justify-content: space-between; align-items: baseline; }
.code-num { font-family: var(--font-display); font-size: 26px; }
.code-num small { font-size: 16px; opacity: .6; }
.code-secs { font-weight: 700; }
.code-timer { width: 100%; height: 10px; border: var(--line); border-radius: 99px; background: var(--card); overflow: hidden; }
.code-timer i { display: block; height: 100%; background: var(--blue); transform-origin: left; }
.code-timer.hurry i { background: var(--pink); }
.code-photo { width: 100%; max-width: 560px; border: var(--line); border-radius: 14px; overflow: hidden; box-shadow: 5px 5px 0 var(--ink); background: #ccd; line-height: 0; }
.code-svg { display: block; width: 100%; height: auto; }
.code-q { font-weight: 800; font-size: clamp(17px, 2.2vw, 21px); text-align: center; margin: 4px 0; max-width: 680px; }
.code-opts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 600px) { .code-opts { grid-template-columns: 1fr; } }
.code-opt { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.code-opt b { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--paper-2); font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.code-opt.on { background: var(--yellow); transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.code-opt.on b { background: var(--ink); color: #fff; }
.code-review { display: grid; gap: 8px; text-align: left; margin-bottom: 16px; max-height: 50vh; overflow: auto; }
.code-review details { border: 2px solid var(--ink); border-radius: 10px; padding: 8px 10px; background: var(--card); }
.code-review details.ko { border-color: var(--pink); }
.code-review summary { display: flex; gap: 8px; cursor: pointer; font-weight: 700; font-size: 15px; }
.code-review summary span { flex: 1; }
.code-review summary i { font-style: normal; color: var(--green); }
.code-review details.ko summary i { color: var(--pink); }
.code-review ul { margin: 8px 0 4px; padding-left: 18px; font-size: 14px; }
.code-review li.good { color: var(--green); font-weight: 800; }
.code-review li.bad { color: var(--pink); font-weight: 800; text-decoration: line-through; }
.code-review p { margin: 4px 0 0; }
.illus-code { position: absolute; inset: 0; display: grid; place-items: center; background: var(--ink); }
.illus-code .code-svg { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Jeu 17 : Ekip Ekip ---------- */
.ekip-intro { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; overflow: auto; }
.ekip-card { max-width: 560px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.ekip-keys { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.ekip-key { display: grid; grid-template-columns: auto auto; gap: 4px 10px; align-items: center; padding: 10px 14px; border: var(--line); border-radius: 14px; color: #fff; text-align: left; box-shadow: 4px 4px 0 var(--ink); }
.ekip-key.red { background: #e8344f; }
.ekip-key.blue { background: #2f6bff; }
.ekip-key b { font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.ekip-key span { font-weight: 700; font-size: 13px; }
.ekip-game { position: absolute; inset: 0; background: #0d0a33; }
.ekip-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ekip-hud { position: absolute; left: 10px; top: 8px; display: grid; gap: 2px; padding: 6px 12px; border-radius: 12px; background: rgba(255, 253, 247, .92); border: 2px solid var(--ink); pointer-events: none; }
.ekip-hud b { font-size: 22px; }
.ekip-hud span { font-weight: 800; color: var(--pink); font-size: 14px; }
.illus-ekip { position: absolute; inset: 0; }
.ekip-illus { width: 100%; height: 100%; display: block; }
.ekip-binds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
@media (max-width: 560px) { .ekip-binds { grid-template-columns: 1fr; } }
.ekip-bind { display: grid; gap: 6px; padding: 10px; border: 2px solid var(--ink); border-radius: 12px; text-align: left; width: 100%; }
.ekip-bind.red { background: #ffe1e6; }
.ekip-bind.blue { background: #e0e9ff; }
.ekip-bind h4 { margin: 0 0 2px; }
.ekip-bind label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
.ekip-bindkey { min-width: 120px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.ekip-bindkey.on { background: var(--yellow); animation: grillenudge .6s infinite; }

/* ---------- Jeu 18 : Roue des Monstres ---------- */
.roue-game { position: absolute; inset: 0; overflow: auto; padding: 12px; display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.roue-hud { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: center; padding: 8px 12px; border: var(--line); border-radius: 14px; background: var(--card); }
.roue-region { font-family: var(--font-display); font-size: 20px; }
.roue-badges { display: inline-flex; gap: 4px; }
.roue-badges i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper-2); }
.roue-badges i.on { background: var(--yellow); box-shadow: inset 0 0 0 3px #fff3c4; }
.roue-badges.elite i { border-radius: 4px; transform: rotate(45deg); width: 15px; height: 15px; margin: 0 2px; }
.roue-badges.elite i.on { background: var(--pink); }
.roue-potions { font-weight: 800; }
.roue-main { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .roue-main { grid-template-columns: 1fr; } }
.roue-left { display: grid; justify-items: center; gap: 10px; text-align: center; }
.roue-title { font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 26px); min-height: 1.3em; }
.roue-wheel { position: relative; width: min(100%, 440px, 58vh); aspect-ratio: 1; }
.roue-canvas { width: 100%; height: 100%; display: block; }
.roue-pointer { position: absolute; left: 50%; top: -6px; width: 0; height: 0; margin-left: -16px; border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid var(--ink); filter: drop-shadow(0 3px 0 var(--yellow)); }
.roue-msg { font-weight: 800; font-size: 18px; min-height: 2.6em; max-width: 460px; display: flex; gap: 10px; align-items: center; justify-content: center; }
.roue-msg-sprite { width: 72px; height: 72px; flex: none; animation: grillepop .3s ease-out; }
.roue-right { display: grid; gap: 10px; }
.roue-right h4 { margin: 4px 0 0; }
.roue-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.roue-card { display: grid; justify-items: center; gap: 2px; padding: 8px 6px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); text-align: center; }
.roue-card.fight { box-shadow: 3px 3px 0 var(--ink); }
.roue-card.bench { opacity: .6; }
.roue-card b { font-size: 14px; line-height: 1.1; }
.roue-sprite { width: 64px; height: 64px; image-rendering: pixelated; object-fit: contain; }
.roue-types { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.roue-type { padding: 0 6px; border-radius: 99px; color: #fff; font-size: 11px; font-weight: 800; text-shadow: 0 1px 0 rgba(0,0,0,.4); border: 1.5px solid var(--ink); }
.roue-foe { display: grid; gap: 6px; padding: 10px; border: var(--line); border-radius: 14px; background: #fff3f6; }
.roue-foe:empty { display: none; }
.roue-foe-head { display: flex; gap: 8px; align-items: center; font-size: 18px; }
.roue-foe-team { display: flex; flex-wrap: wrap; gap: 6px; }
.roue-mini { display: grid; justify-items: center; width: 74px; text-align: center; }
.roue-mini .roue-sprite { width: 56px; height: 56px; }
.roue-mini small { font-size: 11px; font-weight: 700; line-height: 1.1; }
.roue-odds { position: relative; height: 26px; border: 2px solid var(--ink); border-radius: 99px; background: #ffc6d8; overflow: hidden; }
.roue-odds i { position: absolute; left: 0; top: 0; bottom: 0; background: #7fe0b8; }
.roue-odds span { position: relative; display: block; text-align: center; line-height: 22px; font-weight: 800; font-size: 13px; }
.roue-journal summary { cursor: pointer; font-weight: 800; }
.roue-log { max-height: 180px; overflow: auto; margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.illus-roue { position: absolute; inset: 0; display: grid; place-items: center; background: var(--blue); }
.roue-illus { width: min(70%, 220px); aspect-ratio: 1; display: block; }
.illus-roue .roue-pointer { top: calc(50% - min(35%, 110px) - 8px); }

/* Roue des Monstres : scène de combat */
.roue-arena { --sky1: #bfe3ff; --sky2: #fdf6e6; --ground1: #9bd67a; --ground2: #6fbf5a; --plat: #5d9e45; --plat2: #3f7a2e;
  position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 240px; border: var(--line); border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 46%, var(--ground1) 46.2%, var(--ground2) 100%); box-shadow: 5px 5px 0 var(--ink); }
.roue-arena::before { content: ''; position: absolute; inset: 46% 0 0; background: repeating-linear-gradient(100deg, transparent 0 34px, rgba(255,255,255,.12) 34px 60px); pointer-events: none; }
.roue-arena.theme-glaciers { --sky1: #cfe9ff; --sky2: #f4fbff; --ground1: #e6f4ff; --ground2: #b9dcf3; --plat: #9cc8e6; --plat2: #6fa3c7; }
.roue-arena.theme-volcans { --sky1: #ffc7a3; --sky2: #ffeedd; --ground1: #c98a5a; --ground2: #9c5f3a; --plat: #7d4a2b; --plat2: #5a311a; }
.roue-arena.theme-aurores { --sky1: #3a2f7a; --sky2: #8a7bd6; --ground1: #7cc3a8; --ground2: #4f9b85; --plat: #3f7d6c; --plat2: #2b5a4d; }
.ra-side { position: absolute; width: 46%; height: 50%; }
.ra-side.foe { right: 3%; top: 6%; }
.ra-side.me { left: 2%; bottom: 0; height: 58%; width: 52%; }
.ra-platform { position: absolute; left: 4%; right: 4%; bottom: 6%; height: 26%; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, var(--plat) 0 55%, var(--plat2) 56% 100%); box-shadow: 0 6px 0 rgba(29,23,101,.25); }
.ra-side.me .ra-platform { bottom: -6%; height: 30%; }
.ra-mon { position: absolute; width: calc(var(--k, 1) * min(34%, 120px)); height: auto; aspect-ratio: 1; transform: translateX(-50%); image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(29,23,101,.25)); animation: ra-idle 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); transform-origin: 50% 100%; }
.ra-side.me .ra-mon { width: calc(var(--k, 1) * min(40%, 150px)); }
@keyframes ra-idle { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4%; } }
.roue-arena.fighting .ra-side.me .ra-mon { animation: ra-lunge-me .45s ease-in-out infinite; animation-delay: var(--d, 0s); }
.roue-arena.fighting .ra-side.foe .ra-mon { animation: ra-lunge-foe .45s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes ra-lunge-me { 0%, 100% { translate: 0 0; } 50% { translate: 8% -8%; } }
@keyframes ra-lunge-foe { 0%, 100% { translate: 0 0; } 50% { translate: -8% 6%; } }
.roue-arena.won .ra-side.foe .ra-mon, .roue-arena.lost .ra-side.me .ra-mon { animation: ra-ko .9s ease-in forwards; }
.roue-arena.won .ra-side.me .ra-mon, .roue-arena.lost .ra-side.foe .ra-mon { animation: ra-cheer .35s ease-in-out 3; animation-delay: var(--d, 0s); }
@keyframes ra-ko { 0% { opacity: 1; filter: brightness(2.5); } 25% { filter: brightness(1); translate: 0 0; } 100% { opacity: 0; translate: 0 30%; } }
@keyframes ra-cheer { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14%; } }
.ra-tag { position: absolute; display: grid; gap: 1px; padding: 6px 12px; max-width: 48%; background: rgba(255,253,247,.94); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); z-index: 20; }
.ra-tag.foe { left: 3%; top: 6%; }
.ra-tag.me { right: 3%; bottom: 8%; text-align: right; }
.ra-tag small { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; color: var(--pink); }
.ra-tag b { font-family: var(--font-display); font-weight: 400; font-size: clamp(15px, 1.8vw, 20px); line-height: 1.1; }
.ra-tag-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.ra-tag.me .ra-tag-line { justify-content: flex-end; }
.ra-tag-line em { font-style: normal; font-weight: 700; }
.ra-empty { position: absolute; left: 0; right: 0; top: 18%; text-align: center; font-family: var(--font-display); font-size: 20px; color: var(--ink); opacity: .7; }
.roue-arena.theme-aurores .ra-empty { color: #fff; }
.roue-odds[hidden] { display: none; }

/* ---------- Jeu 19 : Last Xmas (3D) ---------- */
.xm-intro { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; overflow: auto; }
.xm-card { max-width: 520px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.xm-game { position: absolute; inset: 0; overflow: hidden; background: #cfe3f5; touch-action: none; user-select: none; }
.xm-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: ew-resize; touch-action: none; }
.xm-hud { position: absolute; left: 8px; right: 8px; top: 6px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 3; }
.xm-hud > div { display: grid; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 12px; background: rgba(255,253,247,.92); box-shadow: 3px 3px 0 var(--ink); }
.xm-hud b { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.1; }
.xm-hud span { font-size: 12px; font-weight: 800; }
.xm-hud-r { text-align: right; }
.xm-count { position: absolute; transform: translate(-50%, -100%); padding: 2px 14px; border: 3px solid var(--ink); border-radius: 99px; background: #2f5bff; color: #fff; font-family: var(--font-display); font-size: 26px; line-height: 1.2; pointer-events: none; z-index: 2; box-shadow: 0 3px 0 var(--ink); }
.xm-count.low { background: #ff3d7f; animation: xm-pulse .5s infinite; }
@keyframes xm-pulse { 50% { transform: translate(-50%, -100%) scale(1.15); } }
.xm-boss { position: absolute; left: 50%; top: 58px; width: min(80%, 520px); height: 22px; transform: translateX(-50%); border: 3px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; display: none; z-index: 3; }
.xm-boss.on { display: block; }
.xm-boss i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ff3d7f, #ff7a1a); transition: width .1s; }
.xm-boss span { position: relative; display: block; text-align: center; font-weight: 900; font-size: 12px; line-height: 16px; color: var(--ink); letter-spacing: .08em; }
.xm-fx { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.xm-float { position: absolute; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: 30px; -webkit-text-stroke: 2px var(--ink); animation: xm-up 1.1s ease-out forwards; white-space: nowrap; }
.xm-float.good { color: #7fffc4; font-size: 34px; }
.xm-float.bad { color: #ff3d7f; }
@keyframes xm-up { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }
.xm-banner { position: absolute; left: 0; right: 0; top: 34%; display: grid; justify-items: center; gap: 4px; padding: 14px 10px; background: rgba(29,23,101,.85); color: #fff; text-align: center; opacity: 0; transform: scaleY(0); transition: opacity .25s, transform .25s; pointer-events: none; z-index: 4; }
.xm-banner.on { opacity: 1; transform: none; }
.xm-banner small { color: #7fe0b8; font-weight: 900; font-size: 16px; }
.xm-banner b { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 4vw, 40px); color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); }
.xm-banner span { font-weight: 700; }
.xm-big { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: clamp(48px, 11vw, 120px); color: var(--yellow); -webkit-text-stroke: 3px var(--ink); opacity: 0; pointer-events: none; z-index: 5; white-space: nowrap; }
.xm-big.on { animation: xm-big 1s ease-out forwards; }
@keyframes xm-big { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.9); } }
.illus-xm { position: absolute; inset: 0; }
.xm-illus { width: 100%; height: 100%; display: block; }
.xm-hp { position: absolute; width: 56px; height: 8px; transform: translate(-50%, -50%); border: 2px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.xm-hp.big { width: 72px; }
.xm-hp i { display: block; height: 100%; background: #ff3d7f; }
.xm-hp.thrower i { background: #2f5bff; }
.xm-float.crit { color: #ffc21a; font-size: 20px; }
.xm-float.shield { color: #8fdcff; }
.xm-cards { position: absolute; inset: 0; display: none; place-items: center; padding: 16px; background: rgba(13,10,51,.55); z-index: 6; }
.xm-cards.on { display: grid; }
.xm-cards-in { display: grid; gap: 14px; justify-items: center; max-width: 900px; width: 100%; }
.xm-cards-in > b { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 3.4vw, 34px); color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); text-align: center; }
.xm-cards-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
@media (max-width: 640px) { .xm-cards-row { grid-template-columns: 1fr; } }
.xm-card { position: relative; display: grid; gap: 8px; align-content: start; justify-items: center; text-align: center; padding: 22px 14px 16px; border: 3px solid var(--ink); border-radius: 18px; background: #fffdf7; color: var(--ink); font: inherit; cursor: pointer; box-shadow: 0 6px 0 var(--ink); transition: transform .1s; animation: xm-card-in .35s ease-out backwards; }
.xm-card:nth-child(2) { animation-delay: .08s; } .xm-card:nth-child(3) { animation-delay: .16s; }
.xm-card:hover { transform: translateY(-4px) rotate(-1deg); background: #fff6d6; }
.xm-card.curse { background: #2a1e5c; color: #fff; }
.xm-card.curse:hover { background: #3a2a7a; }
.xm-card i { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 50%; background: var(--yellow); color: var(--ink); font-style: normal; font-weight: 900; }
.xm-card strong { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.1; }
.xm-card span { font-size: 14px; font-weight: 600; line-height: 1.3; }
.xm-card small { font-size: 12px; font-weight: 800; opacity: .7; }
@keyframes xm-card-in { from { opacity: 0; transform: translateY(30px) scale(.9); } }
.xm-stats { position: absolute; left: 8px; top: 62px; display: grid; gap: 1px; min-width: 128px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 12px; background: rgba(255,253,247,.9); box-shadow: 3px 3px 0 var(--ink); pointer-events: none; z-index: 3; font-size: 12px; }
.xm-stats div { display: flex; justify-content: space-between; gap: 10px; }
.xm-stats span { font-weight: 700; opacity: .75; }
.xm-stats b { font-weight: 900; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .xm-stats { top: auto; bottom: 8px; grid-template-columns: 1fr 1fr; column-gap: 12px; font-size: 11px; } }
