/* Multipotes : un ciel de nuit violet où les nombres-personnages brillent en couleurs vives.
   Les scènes d'histoire ont chacune leur propre décor lumineux. */
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('../fonts/baloo2-800.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 600; font-display: swap; src: url('../fonts/baloo2-600.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url('../fonts/nunito-600.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('../fonts/nunito-800.woff2') format('woff2'); }

:root {
  --night: #1C1442;
  --night-2: #2A1F63;
  --night-3: #3B2D86;
  --line: #4E3FA3;
  --text: #FFFFFF;
  --text-dim: #CFC6F5;
  --sun: #FFC93C;
  --sun-d: #D99A00;
  --coral: #FF5E7E;
  --coral-d: #C9304F;
  --mint: #34D399;
  --mint-d: #109868;
  --sky: #56CCF2;
  --card: #FFFDF7;
  --card-ink: #2A1F55;
  --bad: #FF4D6D;
  --good: #2BD67B;
  --display: 'Baloo 2', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --emoji: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-weight: 600;
  font-size: 16px;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
[hidden] { display: none !important; }

#app { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; }
.screen {
  min-height: 100%;
  display: flex; flex-direction: column; gap: 14px;
  padding-top: calc(var(--safe-t) + 8px);
  padding-bottom: calc(var(--safe-b) + 20px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  max-width: 560px; margin: 0 auto;
  animation: screen-in .35s ease-out both;
}
@keyframes screen-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Barre du haut ---------- */
.bar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; min-height: 52px; }
.bar-title { margin: 0; text-align: center; font: 800 1.35rem/1 var(--display); letter-spacing: .01em; text-wrap: balance; }
.bar-right { display: flex; justify-content: flex-end; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center;
  background: var(--night-2); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); font-size: 1.4rem; line-height: 1;
}
.icon-btn span { font: 800 2rem/1 var(--display); margin-top: -4px; }
.icon-btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.icon-btn.small { width: 38px; height: 38px; font-size: 1.1rem; border-radius: 12px; }

.lead { margin: 0; color: var(--text-dim); line-height: 1.45; max-width: 60ch; }
.h2 { margin: 6px 0 0; font: 800 1.1rem/1.2 var(--display); color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.h3 { margin: 10px 0 4px; font: 800 1.05rem/1.2 var(--display); }

/* ---------- Personnages ---------- */
.char { width: 100%; height: 100%; display: grid; grid-template-rows: 100%; grid-template-columns: 100%; place-items: end center; min-height: 0; }
.char svg.ch { width: 100%; height: 100%; overflow: visible; display: block; }
.ch-body { font-family: var(--display); font-weight: 800; }
.ch-acc { font-family: var(--emoji); }
.ch-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.2s infinite; }
.ch-pupils { animation: look 6s ease-in-out infinite; }
.ch-legs path, .ch-arms path { transform-box: fill-box; }
.leg-l, .leg-r { transform-origin: top center; }
.arm-l { transform-origin: top right; } .arm-r { transform-origin: top left; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes look { 0%, 30% { transform: translate(0, 0); } 40%, 60% { transform: translate(-4px, 1px); } 70%, 100% { transform: translate(2px, -1px); } }
.char.idle svg { animation: bob 2.4s ease-in-out infinite; }
.char.idle .arm-r { animation: wave 2.4s ease-in-out infinite; }
.char.d1 svg, .char.d1 .arm-r { animation-delay: -.8s; }
.char.d2 svg, .char.d2 .arm-r { animation-delay: -1.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5%); } }
@keyframes wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
.char.pop-in { animation: pop-in .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.char.pop-in.d1 { animation-delay: .12s; } .char.pop-in.d2 { animation-delay: .24s; }
@keyframes pop-in { from { transform: scale(0) rotate(-12deg); opacity: 0; } }
.char.mirror { transform: scaleX(-1); opacity: .75; filter: saturate(.6) brightness(1.15); }
.char.shadow svg { filter: brightness(0) opacity(.35); }

/* ---------- Écran around YOU ---------- */
.splash { justify-content: center; align-items: center; gap: 18px; background: radial-gradient(circle at 50% 45%, var(--night-3), var(--night) 70%); max-width: none; }
.ay-logo { position: relative; width: 220px; height: 220px; display: grid; place-items: center; animation: ay-in 1s cubic-bezier(.3, 1.4, .5, 1) both; }
.ay-orbit { position: absolute; inset: 0; border: 3px dashed rgba(255,255,255,.35); border-radius: 50%; animation: spin 6s linear infinite; }
.ay-dot { position: absolute; top: -9px; left: calc(50% - 9px); width: 18px; height: 18px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 18px var(--sun); }
.ay-around { font: 600 1.4rem/1 var(--body); letter-spacing: .28em; color: var(--text-dim); margin-top: -40px; }
.ay-you { position: absolute; top: 50%; font: 800 4.4rem/1 var(--display); letter-spacing: .02em; margin-top: -18px;
  background: linear-gradient(90deg, var(--sun), var(--coral), #B388EB, var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ay-presents { margin: 0; color: var(--text-dim); letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; animation: fade 1s .8s both; }
@keyframes ay-in { from { transform: scale(.3) rotate(-90deg); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Menu ---------- */
.hub-home { position: absolute; top: calc(var(--safe-t) + 10px); left: max(16px, env(safe-area-inset-left, 0px)); z-index: 3; }
.menu { position: relative; gap: 12px; justify-content: center; }
.sky-stars { position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(ellipse at 50% 0%, var(--night-3), var(--night) 65%); }
.sky-stars i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #FFF6C9; box-shadow: 0 0 6px #FFF6C9; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .2; } }
.menu-head { text-align: center; padding-top: 10px; }
.edition { margin: 0; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); }
.edition b { color: var(--sun); }
.logo { margin: 2px 0 0; font: 800 clamp(2.9rem, 14vw, 4.4rem)/1 var(--display); letter-spacing: -.01em; }
.logo span { display: inline-block; color: var(--c); text-shadow: 0 4px 0 rgba(0,0,0,.35); animation: letter 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * 120ms); }
@keyframes letter { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 80% { transform: translateY(-10px) rotate(-6deg); } 90% { transform: translateY(0) rotate(3deg); } }
.tagline { margin: 4px auto 0; color: var(--text-dim); max-width: 30ch; line-height: 1.35; }
.menu-show { display: grid; grid-template-columns: 1fr auto 1fr auto 1.25fr; align-items: end; gap: 2px; height: 128px; padding: 0 4px; }
.ms { height: 100%; }
.ms-x { font: 800 2rem/1 var(--display); color: var(--text-dim); padding-bottom: 34px; }
.menu-btns { display: flex; flex-direction: column; gap: 12px; }
.big-btn {
  display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 18px; border-radius: 22px;
  background: var(--bc); color: var(--card-ink); box-shadow: inset 0 -6px 0 var(--bd), 0 8px 20px rgba(0,0,0,.25);
  transition: transform .1s;
}
.big-btn:active { transform: translateY(3px); box-shadow: inset 0 -3px 0 var(--bd); }
.big-btn b { display: block; font: 800 1.45rem/1.05 var(--display); }
.big-btn small { display: block; font-weight: 700; opacity: .8; }
.bb-ico { font-size: 2rem; width: 52px; height: 52px; display: grid; place-items: center; background: rgba(255,255,255,.45); border-radius: 16px; font-family: var(--emoji); flex: none; }
.big-btn.sun { --bc: var(--sun); --bd: var(--sun-d); }
.big-btn.coral { --bc: var(--coral); --bd: var(--coral-d); color: #fff; }
.big-btn.coral .bb-ico { background: rgba(255,255,255,.25); }
.big-btn.mint { --bc: var(--mint); --bd: var(--mint-d); }
.menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mid-btn { padding: 14px 10px; border-radius: 18px; background: var(--night-2); box-shadow: inset 0 -5px 0 rgba(0,0,0,.25); font: 800 1.05rem/1 var(--display); }
.mid-btn:active { transform: translateY(2px); }

/* ---------- Chapitres ---------- */
.chap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chap {
  display: flex; flex-direction: column; align-items: stretch; text-align: left; border-radius: 22px; overflow: hidden;
  background: var(--night-2); box-shadow: inset 0 -5px 0 rgba(0,0,0,.25);
}
.chap:active { transform: translateY(2px); }
.chap-char { height: 112px; padding-top: 8px; background: radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--cc) 55%, transparent), transparent 70%); }
.chap-info { padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.chap-info b { font: 800 1.15rem/1.1 var(--display); }
.chap-info small { color: var(--text-dim); font-size: .78rem; line-height: 1.25; min-height: 2.5em; }
.star { color: rgba(255,255,255,.2); font-size: 1.1rem; }
.star.on { color: var(--sun); text-shadow: 0 0 8px rgba(255,201,60,.6); }

/* ---------- Scène d'histoire ---------- */
.story { gap: 10px; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--night-3); }
.dots i.done { background: var(--text-dim); }
.dots i.now { background: var(--sun); transform: scale(1.35); }
.stage {
  position: relative; height: min(46vh, 380px); min-height: 270px; border-radius: 26px; overflow: hidden;
  background: linear-gradient(var(--sky1), var(--sky2) 72%, var(--ground) 72%);
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.12);
}
.stage::after { content: ""; position: absolute; left: 0; right: 0; top: 72%; height: 10px; background: rgba(255,255,255,.18); }
.decor .dc { position: absolute; font-family: var(--emoji); font-size: 2rem; opacity: .9; animation: float 5s ease-in-out infinite; }
.decor .dc0, .decor .dc1 { animation: float 5s ease-in-out infinite, drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { translate: -14px 0; } to { translate: 14px 0; } }
.dc0 { left: 6%; top: 8%; } .dc1 { right: 8%; top: 14%; animation-delay: -2s !important; } .dc2 { left: 44%; top: 4%; font-size: 1.5rem !important; animation-delay: -3.5s !important; }
@keyframes float { 50% { transform: translateY(-8px) rotate(4deg); } }
.stage.counting .decor { opacity: .35; transition: opacity .4s; }
.stage.revealed .board { opacity: .28; transform: scale(.94); transition: opacity .5s, transform .5s; }

.actor { position: absolute; bottom: 4%; width: 30%; height: 50%; z-index: 2; transition: transform .6s cubic-bezier(.4, 1.4, .5, 1), left .6s; }
.actor-a { left: 4%; transform: translateX(-160%); }
.actor-b { right: 4%; transform: translateX(160%); }
.actor-a.in, .actor-b.in { transform: translateX(0); transition: none; }
.actor-a.in { animation: jump-in-l .55s cubic-bezier(.3, .7, .4, 1) both; }
.actor-b.in { animation: jump-in-r .55s cubic-bezier(.3, .7, .4, 1) both; }
@keyframes jump-in-l { 0% { transform: translateX(-160%) translateY(0); } 55% { transform: translateX(-30%) translateY(-45%) rotate(-10deg); } 82% { transform: translateX(0) translateY(0) scale(1.12, .84); } 100% { transform: translateX(0) scale(1); } }
@keyframes jump-in-r { 0% { transform: translateX(160%) translateY(0); } 55% { transform: translateX(30%) translateY(-45%) rotate(10deg); } 82% { transform: translateX(0) translateY(0) scale(1.12, .84); } 100% { transform: translateX(0) scale(1); } }
.actor-a.in.side { transform: translateX(-8%) scale(.82); transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); animation: none; }
.actor-b.in.side { transform: translateX(8%) scale(.82); transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); animation: none; }
.actor-a.in.merge { transform: translateX(95%) translateY(-10%) rotate(25deg) scale(.9); transition: transform .4s cubic-bezier(.6, 0, .9, .5); animation: none; }
.actor-b.in.merge { transform: translateX(-95%) translateY(-10%) rotate(-25deg) scale(.9); transition: transform .4s cubic-bezier(.6, 0, .9, .5); animation: none; }
/* Les deux personnages se regardent. */
.actor-a .ch-pupils { animation: none; transform: translate(4px, 0); }
.actor-b .ch-pupils { animation: none; transform: translate(-4px, 0); }
/* La bouche bouge quand un personnage parle. */
.ch-mouth { transform-box: fill-box; transform-origin: center; }
.char.talking .ch-mouth { animation: talk .14s ease-in-out infinite alternate; }
.char.talking svg { animation: talk-bob .34s ease-in-out infinite !important; }
@keyframes talk { from { transform: scaleY(.3) scaleX(1.05); } to { transform: scaleY(1.35) scaleX(.95); } }
@keyframes talk-bob { 50% { transform: translateY(-4%) scale(1.03, .97); } }
.dust { position: absolute; bottom: 4%; width: 30%; height: 14%; z-index: 1; pointer-events: none; }
.dust::before, .dust::after { content: ""; position: absolute; bottom: 0; width: 34%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.75); animation: dust .6s ease-out forwards; }
.dust::before { left: 8%; } .dust::after { right: 8%; animation-delay: .04s; }
@keyframes dust { from { transform: scale(.2); opacity: .9; } to { transform: scale(1.4) translateY(-30%); opacity: 0; } }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 8; }
.confetti.fixed { position: fixed; z-index: 40; }
.actor.walking svg { animation: hop .26s ease-in-out infinite; }
.actor.walking .leg-l { animation: legs .26s ease-in-out infinite alternate; }
.actor.walking .leg-r { animation: legs .26s ease-in-out infinite alternate-reverse; }
@keyframes hop { 50% { transform: translateY(-6%); } }
@keyframes legs { from { transform: rotate(18deg); } to { transform: rotate(-18deg); } }
.actor-p { left: 50%; width: 34%; height: 52%; transform: translateX(-50%) scale(0); z-index: 3; }
.actor-p { transition: transform .55s cubic-bezier(.3, 1.8, .5, 1); }
.actor-p.show { transform: translateX(-50%) scale(1); }
.actor-p.show .char:not(.talking) svg { animation: dance 1.1s ease-in-out infinite; }
@keyframes dance { 0%, 100% { transform: rotate(0) translateY(0); } 25% { transform: rotate(-7deg) translateY(-6%); } 50% { transform: rotate(0) translateY(0) scale(1.04, .96); } 75% { transform: rotate(7deg) translateY(-6%); } }
.actor.jump svg { animation: jump .5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes jump { 40% { transform: translateY(-22%) scale(1.06, .94); } }
.actor .char:not(.mirror) svg { animation: bob 2.6s ease-in-out infinite; }

.bubble {
  position: absolute; top: 60%; z-index: 5; max-width: 62%; padding: 8px 12px; border-radius: 16px; background: var(--card); color: var(--card-ink);
  font: 800 .92rem/1.2 var(--display); box-shadow: 0 4px 10px rgba(0,0,0,.2); animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1);
}
.bubble.left { left: 4%; top: 32%; border-bottom-left-radius: 4px; }
.bubble.right { right: 4%; top: 32%; border-bottom-right-radius: 4px; }
.bubble.center { left: 50%; top: 24%; transform: translateX(-50%); }

.board { position: absolute; left: 10px; right: 10px; top: 10px; height: 54%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; z-index: 1; }
.grow { display: flex; align-items: center; gap: 6px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.55); opacity: 0; transform: scale(.4); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }
.grow.in { opacity: 1; transform: scale(1); }
.grow.lit { background: #fff; box-shadow: 0 0 0 3px var(--sun), 0 4px 10px rgba(0,0,0,.15); animation: lit .3s cubic-bezier(.3, 1.8, .5, 1); }
.grow.lit .gcount { color: #E8590C; }
@keyframes lit { 50% { transform: scale(1.1); } }
.its { display: flex; }
.it { font-family: var(--emoji); font-size: calc(var(--it) * .82); width: var(--it); height: var(--it); display: grid; place-items: center; line-height: 1; }
.grow.in .it { animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d); }
.empty { width: calc(var(--it) * 4); height: var(--it); border: 2px dashed rgba(42,31,85,.45); border-radius: 999px; display: grid; place-items: center; font: 800 calc(max(var(--it), 16px) * .55)/1 var(--display); color: rgba(42,31,85,.6); }
.tip { margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--night-2); color: var(--text-dim); line-height: 1.4; }
.gcount { min-width: 30px; font: 800 calc(max(var(--it), 16px) * .8)/1 var(--display); color: var(--card-ink); text-align: right; }

.burst { position: absolute; left: 50%; top: 70%; width: 10px; height: 10px; z-index: 4; pointer-events: none; }
.burst.go::before, .burst.go::after {
  content: ""; position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, rgba(255,255,255,.6) 30%, transparent 62%);
  animation: burst .7s ease-out forwards;
}
.burst.go::after { background: repeating-conic-gradient(var(--sun) 0 10deg, transparent 10deg 30deg); mask: radial-gradient(circle, transparent 30%, #000 32%, #000 60%, transparent 62%); -webkit-mask: radial-gradient(circle, transparent 30%, #000 32%, #000 60%, transparent 62%); animation-duration: .9s; }
@keyframes burst { from { transform: scale(.1); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

.equation { display: flex; justify-content: center; align-items: center; gap: 10px; font: 800 2.6rem/1 var(--display); }
.eq-n, .eq-r { color: var(--c); text-shadow: 0 3px 0 rgba(0,0,0,.35); min-width: 1ch; text-align: center; }
.eq-op { color: var(--text-dim); font-size: 2rem; }
.eq-r.reveal { animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1); }
.swap-note { margin: -6px 0 0; text-align: center; color: var(--text-dim); font-size: .85rem; }
.story-card { background: var(--card); color: var(--card-ink); border-radius: 20px; padding: 14px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.story-text { margin: 0; font-size: 1.08rem; line-height: 1.5; font-weight: 700; }
.story-text .sent { color: rgba(42,31,85,.4); transition: color .25s, background .25s; border-radius: 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.story-text .sent.read { color: var(--card-ink); }
.story-text .sent.cur { color: var(--card-ink); background: #FFE08A; box-shadow: 0 0 0 3px #FFE08A; }
.rhyme {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px;
  background: color-mix(in srgb, var(--c) 30%, var(--night-2)); border: 3px solid var(--c);
  animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1);
}
.rh-emoji { font-family: var(--emoji); font-size: 2.2rem; flex: none; }
.rhyme b { display: block; font: 800 1.2rem/1.25 var(--display); }
.rhyme .rw { display: inline-block; animation: word-in .45s cubic-bezier(.3, 1.8, .5, 1) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes word-in { from { opacity: 0; transform: translateY(60%) scale(.6); } }
.rhyme small { color: var(--text-dim); }
.story-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pill { padding: 12px 18px; border-radius: 999px; font: 800 1.02rem/1 var(--display); background: var(--night-2); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.pill:active { transform: translateY(2px); }
.pill:disabled { opacity: .35; }
.pill.primary { background: var(--sun); color: var(--card-ink); box-shadow: inset 0 -5px 0 var(--sun-d); }
.pill.danger { background: var(--bad); color: #fff; box-shadow: inset 0 -4px 0 #B3243F; }
.pill.ghost.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad); }
.pill.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* ---------- Quiz ---------- */
.quiz-body { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.q-count { margin: 0; text-align: center; color: var(--text-dim); }
.q-chars { display: grid; grid-template-columns: 1fr auto 1fr auto 1.2fr; align-items: end; height: 150px; }
.qc { height: 100%; }
.q-op { font: 800 2rem/1 var(--display); color: var(--text-dim); padding-bottom: 40px; }
.q-text { margin: 0; text-align: center; font: 800 2.4rem/1 var(--display); }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ans { padding: 18px 0; border-radius: 20px; background: var(--card); color: var(--card-ink); font: 800 2rem/1 var(--display); box-shadow: inset 0 -6px 0 #D8D0F0; }
.ans:active { transform: translateY(2px); }
.ans.right { background: var(--good); color: #fff; box-shadow: inset 0 -6px 0 #13994F; animation: pop-in .4s; }
.ans.wrong { background: var(--bad); color: #fff; box-shadow: inset 0 -6px 0 #B3243F; animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.q-feedback { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; background: var(--night-2); border-radius: 20px; padding: 14px; font-size: 1.05rem; line-height: 1.4; }
.q-feedback .ok { color: var(--good); font: 800 1.4rem/1 var(--display); }
.q-feedback .no { color: var(--sun); font: 800 1.4rem/1 var(--display); }

.end-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 10px 0; }
.end-card h2 { margin: 4px 0 0; font: 800 1.8rem/1.1 var(--display); text-wrap: balance; }
.end-card p { margin: 0; color: var(--text-dim); max-width: 34ch; line-height: 1.4; }
.end-char { width: 160px; height: 180px; }
.big-stars .star { font-size: 3rem; display: inline-block; }
.big-stars .star.pop { animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1); }
.end-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.record-new { color: var(--sun) !important; font: 800 1.3rem/1 var(--display); animation: pulse 1s ease-in-out infinite; }
.review { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; }
.review li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--night-2); border-left: 6px solid var(--c); }
.review li b { font: 800 1.15rem/1.1 var(--display); }
.review li span { grid-column: 1; color: var(--text-dim); font-size: .92rem; }
.review li .icon-btn { grid-row: 1 / 3; grid-column: 2; }

/* ---------- Préparation (rapide / compétition) ---------- */
.setup-hero { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; background: var(--night-2); border-radius: 22px; padding: 12px 14px; }
.setup-hero p { margin: 0; line-height: 1.45; }
.sh-char { height: 130px; display: flex; }
.sh-char.duo .char { width: 50%; }
.picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.chip { padding: 12px 0; border-radius: 16px; font: 800 1.4rem/1 var(--display); background: var(--night-2); color: var(--text-dim); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.chip.on { background: var(--cc); color: var(--card-ink); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 0 0 2px #fff; }
.chip.all { font-size: .95rem; color: var(--text); }
.record { margin: 0; color: var(--text-dim); text-align: center; }
.record b { color: var(--sun); }
.go-btn { justify-content: center; margin-top: 6px; }
.seg { display: flex; background: var(--night-2); border-radius: 18px; padding: 4px; gap: 4px; }
.seg-b { flex: 1; padding: 12px 6px; border-radius: 14px; font: 800 1rem/1.1 var(--display); color: var(--text-dim); }
.seg-b.on { background: var(--sun); color: var(--card-ink); box-shadow: inset 0 -4px 0 var(--sun-d); }
.seg.small .seg-b { padding: 9px 6px; font-size: .95rem; }
.levels { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Mode rapide ---------- */
.rapide { gap: 10px; }
.r-top { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.timer { position: relative; height: 34px; border-radius: 999px; background: var(--night-2); overflow: hidden; }
.timer-fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--mint), var(--sun)); transform-origin: left; transition: transform 1s linear; }
.timer.hurry .timer-fill { background: linear-gradient(90deg, var(--coral), var(--sun)); }
.timer.hurry { animation: pulse .5s ease-in-out infinite; }
.timer-num { position: relative; display: grid; place-items: center; height: 100%; font: 800 1.2rem/1 var(--display); color: var(--card-ink); font-variant-numeric: tabular-nums; }
.r-score { text-align: center; background: var(--night-2); border-radius: 16px; padding: 4px 14px; }
.r-pts { display: block; font: 800 1.8rem/1 var(--display); color: var(--sun); font-variant-numeric: tabular-nums; }
.r-pts.bump { animation: pop-in .3s; }
.r-score small { color: var(--text-dim); font-size: .75rem; }
.r-streak { min-height: 1.6em; text-align: center; font: 800 1.1rem/1.4 var(--display); color: var(--sun); }
.flame { display: inline-block; font-family: var(--emoji); transform: scale(var(--s)); animation: bob .6s ease-in-out infinite; }
.r-q { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; height: min(22vh, 150px); padding: 0 12%; }
.rq-c { height: 100%; }
.rq-op { font: 800 2.2rem/1 var(--display); color: var(--text-dim); padding-bottom: 30%; }
.r-display { text-align: center; font: 800 2.6rem/1 var(--display); background: var(--card); color: var(--card-ink); border-radius: 20px; padding: 12px; min-height: 66px; font-variant-numeric: tabular-nums; }
.r-typed { color: #6A4DE0; }
.r-display.ok { background: var(--good); color: #fff; }
.r-display.ok .r-typed { color: #fff; }
.r-display.no { background: var(--bad); color: #fff; animation: shake .4s; }
.r-display.no .r-typed { color: #fff; }
.r-hint { margin: 0; min-height: 2.6em; text-align: center; color: var(--sun); font-weight: 800; line-height: 1.3; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key { padding: 14px 0; border-radius: 18px; background: var(--night-3); font: 800 1.8rem/1 var(--display); box-shadow: inset 0 -5px 0 rgba(0,0,0,.3); }
.key:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); background: var(--line); }
.key.soft { font-size: 1.1rem; color: var(--text-dim); background: var(--night-2); }
.countdown { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(28,20,66,.82); font: 800 6rem/1 var(--display); color: var(--sun); z-index: 20; }
.countdown.go { animation: count .7s ease-out; }
@keyframes count { from { transform: scale(2); opacity: 0; } 40% { opacity: 1; transform: scale(1); } }

/* ---------- Compétition ---------- */
.duel { padding: 0; gap: 0; height: 100%; min-height: 100%; max-width: none; display: grid; grid-template-rows: 1fr auto 1fr; }
.duel-back { position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); top: calc(50% - 23px); z-index: 6; }
.half { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 12px max(16px, env(safe-area-inset-left, 0px)); transition: background .3s; }
.half.h0 { background: linear-gradient(180deg, #3B2D86, #2A1F63); padding-bottom: calc(var(--safe-b) + 14px); }
.half.h1 { background: linear-gradient(0deg, #1F4E79, #183A5A); padding-top: calc(var(--safe-t) + 14px); }
.vs-duo .half.h1 { transform: rotate(180deg); padding-top: 12px; padding-bottom: calc(var(--safe-t) + 14px); }
.half.won { background: linear-gradient(180deg, #19A86B, #0F7A4C); }
.half.lost { filter: saturate(.6) brightness(.85); }
.h-head { display: flex; justify-content: space-between; align-items: center; }
.h-name { font: 800 1.1rem/1 var(--display); }
.pips { display: flex; gap: 5px; }
.pips i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.18); }
.pips i.on { background: var(--sun); box-shadow: 0 0 8px var(--sun); }
.h-q { text-align: center; font: 800 3.4rem/1 var(--display); }
.h-ans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dans { padding: 24px 0; border-radius: 16px; background: var(--card); color: var(--card-ink); font: 800 2rem/1 var(--display); box-shadow: inset 0 -5px 0 #D8D0F0; }
.dans.right { background: var(--good); color: #fff; box-shadow: inset 0 -5px 0 #13994F; }
.dans.wrong { background: var(--bad); color: #fff; box-shadow: inset 0 -5px 0 #B3243F; animation: shake .4s; }
.dans.robot-press { outline: 4px solid var(--sky); }
.is-robot .dans { pointer-events: none; }
.robot-box { height: 110px; display: flex; justify-content: center; }
.robot-box .char { width: 110px; }
.duel-mid { min-height: 54px; display: grid; place-items: center; background: var(--night); padding: 6px 60px; text-align: center; }
.mid-msg { font: 800 1rem/1.25 var(--display); color: var(--sun); }
.duel-over { position: fixed; inset: 0; z-index: 10; background: rgba(28,20,66,.94); display: grid; place-items: center; padding: 20px; animation: fade .3s; }

/* ---------- Galerie ---------- */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
.g-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; border-radius: 18px; background: var(--night-2); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); text-align: center; }
.g-card b { font: 800 .98rem/1.1 var(--display); }
.g-card small { color: var(--text-dim); font-size: .72rem; line-height: 1.2; }
.g-char { width: 80px; height: 96px; }
.g-card.locked b { color: var(--text-dim); }
.sheet { position: fixed; inset: 0; z-index: 15; background: rgba(15,10,40,.75); display: grid; place-items: end center; animation: fade .2s; }
.sheet-card {
  position: relative; width: 100%; max-width: 560px; border-radius: 28px 28px 0 0; padding: 20px 20px calc(var(--safe-b) + 24px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 35%, var(--night-2)), var(--night-2) 60%);
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; animation: sheet-up .35s cubic-bezier(.3, 1.3, .5, 1);
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-x { position: absolute; right: 14px; top: 14px; }
.sheet-char { width: 170px; height: 200px; }
.sheet-card h2 { margin: 0; font: 800 1.9rem/1 var(--display); }
.nick { margin: 0; color: var(--cc); font: 800 1.1rem/1 var(--display); filter: brightness(1.3); }
.power { margin: 6px 0 0; font-size: 1.1rem; line-height: 1.45; max-width: 32ch; }
.pairs { margin: 0 0 8px; color: var(--text-dim); font: 800 1.05rem/1.3 var(--display); }

/* ---------- Réglages ---------- */
.set-list { display: flex; flex-direction: column; gap: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--night-2); }
.set-row b { display: block; font: 800 1.1rem/1.2 var(--display); }
.set-row small { display: block; color: var(--text-dim); line-height: 1.3; }
.set-row .seg { flex: none; background: var(--night); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 58px; height: 34px; border-radius: 999px; background: var(--night); position: relative; transition: background .2s; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--text-dim); transition: transform .2s, background .2s; }
.switch:checked { background: var(--mint); }
.switch:checked::after { transform: translateX(24px); background: #fff; }
.confirm { background: var(--night-2); border: 2px solid var(--bad); border-radius: 18px; padding: 14px; text-align: center; }
.confirm p { margin: 0 0 6px; }
.about { text-align: center; color: var(--text-dim); font-size: .85rem; line-height: 1.5; margin-top: auto; }
.about b { color: var(--sun); }

/* ---------- Ma progression ---------- */
.mid-btn.wide { grid-column: 1 / -1; }
.pg-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pg-sum div { background: var(--night-2); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.pg-sum b { font: 800 1.6rem/1.1 var(--display); color: var(--sun); font-variant-numeric: tabular-nums; }
.pg-sum b small { font-size: 1rem; color: var(--text-dim); }
.pg-sum span { color: var(--text-dim); font-size: .85rem; line-height: 1.25; }
.pg-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; color: var(--text-dim); }
.pg-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pg-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.pg-wrap { overflow-x: auto; }
.pg-grid { display: grid; grid-template-columns: repeat(12, minmax(26px, 1fr)); gap: 2px; min-width: 330px; }
.pg-cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; font: 800 .68rem/1 var(--display); font-variant-numeric: tabular-nums; padding: 0; }
.pg-cell.head { color: var(--c); font-size: .95rem; }
.pgl0 { background: var(--night-2); color: rgba(255,255,255,.35); }
.pgl1 { background: var(--coral); color: #fff; }
.pgl2 { background: var(--sun); color: var(--card-ink); }
.pgl3 { background: #7FE0B0; color: var(--card-ink); }
.pgl4 { background: var(--good); color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.lead.small { font-size: .85rem; }
.pg-tables { display: flex; flex-direction: column; gap: 8px; }
.pg-table { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 10px; align-items: center; }
.pg-t { font: 800 1.3rem/1 var(--display); color: var(--c); text-align: center; }
.pg-bar { height: 12px; border-radius: 999px; background: var(--night-2); overflow: hidden; }
.pg-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--good)); border-radius: 999px; }
.pg-n { font: 800 .85rem/1 var(--display); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pg-s .star { font-size: .9rem; }

/* Multipotes : la question avant la réponse */
.mp-ask { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: var(--night-2); box-shadow: inset 0 0 0 2px var(--sun); animation: pop-in .4s cubic-bezier(.3, 1.6, .5, 1); }
.mp-ask-t { margin: 0; text-align: center; font: 800 1.5rem/1.1 var(--display); color: var(--sun); }
.mp-ask-b { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mp-ask-fb { margin: 0; text-align: center; font: 800 1.2rem/1.2 var(--display); }

/* Les phrases pas encore dites restent cachées : on ne dévoile jamais la réponse avant la question. */
.story-text .sent:not(.read):not(.cur) { display: none; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 24px); transform: translateX(-50%); z-index: 30;
  background: var(--card); color: var(--card-ink); padding: 10px 18px; border-radius: 999px; font: 800 1rem/1.2 var(--display);
  box-shadow: 0 8px 20px rgba(0,0,0,.35); animation: pop-in .3s cubic-bezier(.3, 1.6, .5, 1); max-width: calc(100% - 32px); text-align: center;
}

@media (min-width: 520px) {
  .chap-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-height: 680px) {
  .stage { height: 40vh; min-height: 240px; }
  .menu-show { height: 100px; }
  .r-q { height: 17vh; }
  .key { padding: 11px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Essai gratuit et achat d'un module ---------- */
.trial-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--sun) 16%, var(--night-2)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--sun) 45%, transparent);
  font: 700 .95rem/1.2 var(--body); text-align: left; }
.trial-bar i { white-space: nowrap; font-style: normal; font-weight: 800; color: var(--sun); }
.trial-bar b { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--sun); color: var(--card-ink); font: 800 .95rem/1 var(--display); }
.trial-bar.end { background: color-mix(in srgb, var(--coral) 18%, var(--night-2)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--coral) 55%, transparent); }
.locked .big-btn { filter: grayscale(.55) brightness(.85); }
.locked .big-btn .bb-ico::after { content: '🔒'; position: absolute; font-size: 1.1rem; transform: translate(18px, 16px); }
.locked .big-btn .bb-ico { position: relative; }
.pw, .pw-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  background: rgba(12, 8, 34, .78); backdrop-filter: blur(4px); overflow-y: auto; animation: pw-in .2s ease-out; }
.pw-gate { z-index: 70; }
@keyframes pw-in { from { opacity: 0; } }
.pw-card { position: relative; width: min(100%, 440px); padding: 22px 18px 18px; border-radius: 26px; background: var(--night-2);
  box-shadow: 0 18px 50px rgba(0,0,0,.45), inset 0 0 0 2px var(--line); display: flex; flex-direction: column; gap: 10px; }
.pw-card h2 { margin: 0; font: 800 1.7rem/1.1 var(--display); }
.pw-card p { margin: 0; line-height: 1.4; }
.pw-kicker { color: var(--sun); font-weight: 800; font-size: .9rem; padding-right: 44px; }
.pw-x { position: absolute; top: 10px; right: 10px; }
.pw-list { margin: 2px 0 4px; padding-left: 1.2em; color: var(--text-dim); line-height: 1.5; font-size: .95rem; }
.pw-or { text-align: center; color: var(--text-dim); font-size: .9rem; margin-top: 4px !important; }
.pw-pack { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; padding: 12px 14px; }
.pw-pack small { font: 700 .85rem/1.2 var(--body); color: var(--text-dim); text-align: right; }
.pw-note { font-size: .82rem; color: var(--text-dim); text-align: center; }
.pw-restore { align-self: center; }
.pw-in { width: 100%; padding: 14px; border-radius: 14px; border: 0; font: 800 1.5rem/1 var(--display); text-align: center; background: var(--card); color: var(--card-ink); }
.pw-err { color: var(--bad); font-weight: 800; text-align: center; }
.pill.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }

/* ---------- Question posée à l'enfant : on voit clairement qu'il faut toucher ---------- */
.lc-how { margin: 0; text-align: center; font: 800 1.05rem/1.2 var(--display); color: var(--text); opacity: .9; }
.mp-ask-b { gap: 14px; }
.mp-ask .ans { min-height: 72px; padding: 10px; border-radius: 18px; background: var(--card); color: var(--card-ink); font: 800 2.2rem/1 var(--display);
  box-shadow: inset 0 -6px 0 #D8CFF5, 0 6px 14px rgba(0,0,0,.25); }
.mp-ask .ans.right { background: var(--good); color: #fff; box-shadow: inset 0 -6px 0 #159a55; }
.mp-ask .ans.wrong { background: var(--bad); color: #fff; box-shadow: inset 0 -6px 0 #B3243F; }
.mp-ask:not(.done) .ans, .lcheck:not(.done) .ans { animation: ans-hint 1.8s ease-in-out infinite; }
.mp-ask:not(.done) .ans:nth-child(2), .lcheck:not(.done) .ans:nth-child(2) { animation-delay: .25s; }
.mp-ask:not(.done) .ans:nth-child(3), .lcheck:not(.done) .ans:nth-child(3) { animation-delay: .5s; }
.mp-ask:not(.done) .ans:nth-child(4), .lcheck:not(.done) .ans:nth-child(4) { animation-delay: .75s; }
@keyframes ans-hint { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.06); } 90% { transform: scale(.98); } }
.tone-ados .lcheck:not(.done) .ans { animation: none; }
/* Tant que l'enfant n'a pas répondu, on ne peut pas passer à la suite. */
.asking .story-actions [data-x="next"], .asking .story-actions [data-x="skip"] { opacity: .3; pointer-events: none; animation: none; }
@media (prefers-reduced-motion: reduce) { .mp-ask .ans, .lcheck .ans { animation: none !important; } }
/* Le menu ne doit jamais écraser les personnages : il défile plutôt (le bandeau d'essai ajoute une ligne). */
.menu > * { flex-shrink: 0; }
.menu { justify-content: safe center; }

/* ---------- Espace parents : progrès et rappels ---------- */
.big-btn.sky { --bc: var(--sky); --bd: #2A9BC4; }
.pa-nav { display: flex; flex-direction: column; gap: 12px; }
.pa-h { margin: 18px 0 8px; font: 800 1.15rem/1.2 var(--display); }
.pa-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pa-kpi { padding: 12px; border-radius: 16px; background: var(--night-2); display: flex; flex-direction: column; gap: 2px; }
.pa-kpi b { font: 800 1.7rem/1 var(--display); color: var(--sun); }
.pa-kpi small { color: var(--text-dim); font-weight: 700; line-height: 1.25; }
.pa-advice, .pa-next { margin: 12px 0 0; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--sky) 16%, var(--night-2)); line-height: 1.4; }
.pa-next { background: color-mix(in srgb, var(--mint) 16%, var(--night-2)); }
.pa-chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 120px; padding: 10px 8px 0; border-radius: 16px; background: var(--night-2); }
.pa-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.pa-bar i { display: block; width: 100%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--sky); }
.pa-bar.today i { background: var(--sun); }
.pa-bar span { font-size: .62rem; color: var(--text-dim); font-weight: 700; padding-bottom: 6px; }
.pa-games { display: flex; flex-direction: column; gap: 10px; }
.pa-game { padding: 12px 14px; border-radius: 16px; background: var(--night-2); box-shadow: inset 4px 0 0 var(--gc); display: flex; flex-direction: column; gap: 6px; }
.pa-g-head { display: flex; justify-content: space-between; gap: 8px; }
.pa-g-head b { font: 800 1.05rem/1.2 var(--display); }
.pa-g-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.pa-g-bar i { display: block; height: 100%; background: var(--mint); border-radius: 99px; }
.pa-game small { color: var(--text-dim); font-weight: 600; line-height: 1.3; }
.pa-miss { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--text-dim); }
.pa-miss span { display: inline-block; margin: 2px 6px 0 0; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--text); }
.pa-note { margin-top: 14px; font-size: .85rem; color: var(--text-dim); text-align: center; }
.pa-empty { text-align: center; padding: 24px 8px; line-height: 1.5; }
.pa-big { font-size: 3rem; margin: 0; }
.pa-time { padding: 8px 10px; border-radius: 12px; border: 0; font: 800 1.1rem/1 var(--display); background: var(--card); color: var(--card-ink); }
.pa-days-row { flex-wrap: wrap; gap: 8px; }
.pa-days { display: flex; gap: 6px; flex-wrap: wrap; }
.pa-days .hchip { min-width: 38px; padding: 8px 0; border-radius: 12px; background: var(--night-3); font: 800 .95rem/1 var(--display); }
.pa-days .hchip.on { background: var(--sun); color: var(--card-ink); }

/* Compte parent facultatif (engine/js/compte.js) : écran « Mon compte » et sa fenêtre dans un jeu seul */
.cp { display: flex; flex-direction: column; gap: 12px; }
.cp-l { font-weight: 800; margin-bottom: -6px; }
.cp .cp-in { font-size: 1.15rem; }
.cp #cp-code { font-size: 1.6rem; letter-spacing: .3em; }
.cp .end-btns { margin-top: 0; }
