/* Snake Slice — styles de l'interface HTML (la 3D et la toile 2D sont dessinées par le script).
 * Style « arcade de nuit » : panneaux bleu nuit, cartes bleues brillantes, boutons épais, textes blancs cernés. Police Fredoka. */
:root {
  --uz: 1; --ink: #0f1226; --night: #171b36; --night2: #222852; --line: rgba(160, 180, 255, 0.22);
  --blue: #3477ff; --blue-d: #1c47c4; --mint: #22c79c; --mint-d: #128a6a; --coral: #ff4d5e; --coral-d: #b8233a;
  --gold: #ffc93c; --gold-d: #c98d00; --text2: #b8c0e8;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #24262d; color: #fff;
  font-family: Fredoka, 'Arial Rounded MT Bold', 'Segoe UI', sans-serif; font-weight: 600;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
#stage { position: fixed; inset: 0; }
#game, #hud { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
#hud { pointer-events: none; }
/* assombrissement des bords de l'écran (le regard va au centre) */
#stage::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 50%, rgba(8, 9, 18, 0) 60%, rgba(8, 9, 18, 0.42) 100%); }
#hud { z-index: 1; }
#ui { position: fixed; inset: 0; pointer-events: none; font-size: calc(var(--uz) * 18px); }
#ui .layer { position: absolute; inset: 0; pointer-events: none; isolation: isolate; } /* chaque couche à part : rien du menu ne passe au-dessus d'un panneau */
#ui button, #ui .panel { pointer-events: auto; }
.no3d { position: absolute; inset: 0; display: grid; place-items: center; padding: 2em; text-align: center; font-size: 18px; color: #fff; }
svg.i { width: 1.25em; height: 1.25em; fill: currentColor; }
i.coin { display: inline-block; width: 0.95em; height: 0.95em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c0 0 16%, #ffd24a 19% 58%, #e09a00 61% 72%, #ffcc33 75%); box-shadow: 0 0.06em 0 #9a6400; vertical-align: -0.12em; margin-right: 0.28em; }
/* texte blanc cerné de sombre (comme les étiquettes du jeu) */
.out { -webkit-text-stroke: 0.14em var(--ink); paint-order: stroke fill; }

.icon-btn {
  font: inherit; width: 2.4em; height: 2.4em; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  background: rgba(16, 19, 40, 0.72); box-shadow: inset 0 0 0 0.09em var(--line), 0 0.16em 0 rgba(0, 0, 0, 0.35); cursor: pointer;
}
.icon-btn:active { transform: translateY(0.1em); box-shadow: inset 0 0 0 0.09em var(--line), 0 0.06em 0 rgba(0, 0, 0, 0.35); }
.top-right { position: absolute; top: calc(0.6em + env(safe-area-inset-top, 0px)); right: 0.6em; display: flex; gap: 0.45em; }

/* boutons épais : dégradé, reflet en haut, tranche sombre en bas */
.btn {
  font: inherit; font-size: 1.15em; font-weight: 700; color: #fff; border: 0; border-radius: 0.9em; padding: 0.55em 1.1em; margin: 0.3em 0;
  background: linear-gradient(#ffd75a, var(--gold) 55%, #f0ae10); box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.45), 0 0.24em 0 var(--gold-d), 0 0.4em 0.8em rgba(0, 0, 0, 0.3);
  -webkit-text-stroke: 0.12em rgba(15, 18, 38, 0.55); paint-order: stroke fill;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.45em; white-space: nowrap;
}
.btn:active { transform: translateY(0.16em); box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.45), 0 0.08em 0 var(--gold-d); }
.btn.mint { background: linear-gradient(#4fe8bd, var(--mint) 55%, #17ab84); box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.45), 0 0.24em 0 var(--mint-d), 0 0.4em 0.8em rgba(0, 0, 0, 0.3); }
.btn.coral { background: linear-gradient(#ff7a85, var(--coral) 55%, #e8344a); box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.4), 0 0.24em 0 var(--coral-d), 0 0.4em 0.8em rgba(0, 0, 0, 0.3); }
.btn.grey { background: linear-gradient(#4a5288, #353c6e); box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.18), 0 0.24em 0 #1d2246; -webkit-text-stroke: 0; }
.btn.purple { background: linear-gradient(#b08cff, #8f6bff 55%, #7650ee); box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.4), 0 0.24em 0 #4e2fb8, 0 0.4em 0.8em rgba(0, 0, 0, 0.3); }
.btn.mint:active { box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.45), 0 0.08em 0 var(--mint-d); }
.btn.coral:active { box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.4), 0 0.08em 0 var(--coral-d); }
.btn.grey:active { box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.18), 0 0.08em 0 #1d2246; }
.btn.purple:active { box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.4), 0 0.08em 0 #4e2fb8; }
.btn.big { font-size: 1.4em; }
.btn.small { font-size: 0.95em; }

@keyframes wobble { 0%, 100% { transform: rotate(-3deg) scale(1, 1); } 50% { transform: rotate(-3deg) scale(1.04, 0.96); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0.88); opacity: 0; } }

/* Panneaux : bleu nuit, liseré clair, en-tête coloré */
.screen-dim { position: absolute; inset: 0; background: rgba(6, 8, 20, 0.62); display: flex; align-items: center; justify-content: center; pointer-events: auto; animation: fade 0.2s; }
.panel {
  background: linear-gradient(#262d5c, var(--night) 70%); color: #fff; border-radius: 1.3em; padding: 1.1em 1.1em 1.2em; width: min(92vw, 24em);
  box-shadow: inset 0 0 0 0.12em var(--line), inset 0 0.14em 0 rgba(255, 255, 255, 0.12), 0 0.35em 0 rgba(0, 0, 0, 0.35), 0 1em 2.4em rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; align-items: stretch; text-align: center; animation: pop 0.22s ease-out;
}
.panel h2 { margin: 0.1em 0 0.35em; font-size: 1.8em; color: #fff; -webkit-text-stroke: 0.14em var(--ink); paint-order: stroke fill; text-shadow: 0 0.08em 0 var(--ink); }
.panel p { margin: 0.2em 0 0.7em; font-weight: 500; font-size: 0.95em; line-height: 1.35; color: var(--text2); }
.panel .row { display: flex; gap: 0.5em; }
.panel .row .btn { flex: 1; font-size: 0.95em; padding: 0.55em 0.4em; }
.panel .btn { width: 100%; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4em; margin: 0.2em 0 0.6em; }
.stats div { background: rgba(8, 10, 26, 0.45); border-radius: 0.8em; padding: 0.45em 0.3em; display: flex; flex-direction: column; box-shadow: inset 0 0 0 0.09em var(--line); }
.stats b { font-size: 1.35em; }
.stats span { font-weight: 500; font-size: 0.72em; color: var(--text2); }
.big-gold { font-size: 2.3em; font-weight: 700; color: var(--gold); margin: 0.1em 0 0.4em; -webkit-text-stroke: 0.12em var(--ink); paint-order: stroke fill; }
.big-gold i.coin { width: 0.8em; height: 0.8em; }
.results h2 { color: #ff6b7a; }
.results.won h2 { color: #4fe8bd; }

.dbg { position: fixed; left: 6px; bottom: 6px; z-index: 60; font: 12px monospace; color: #fff; background: rgba(0, 0, 0, 0.55); padding: 3px 6px; border-radius: 4px; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .lobby-ui .logo, .lobby-ui .play-btn { animation: none; } }

/* Le menu de l'arène */
.lobby-ui { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none;
  padding: calc(0.6em + env(safe-area-inset-top, 0px)) 0.8em calc(0.9em + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(rgba(10, 12, 26, 0.55), rgba(10, 12, 26, 0) 28%, rgba(10, 12, 26, 0) 55%, rgba(10, 12, 26, 0.7)); }
.lobby-ui button { pointer-events: auto; }
.lobby-ui .coins { align-self: flex-start; background: rgba(16, 19, 40, 0.78); box-shadow: inset 0 0 0 0.09em var(--line); border-radius: 1em; padding: 0.3em 0.85em 0.3em 0.5em; font-size: 1.1em; font-weight: 700; display: flex; align-items: center; }
.lobby-ui .logo { display: flex; flex-direction: column; align-items: center; line-height: 0.8; margin-top: 0.1em; animation: wobble 2.4s ease-in-out infinite; }
.lobby-ui .logo span { font-weight: 700; font-size: 3.4em; -webkit-text-stroke: 0.07em var(--ink); paint-order: stroke fill; text-shadow: 0 0.07em 0 var(--ink), 0 0.25em 0.5em rgba(0, 0, 0, 0.45); }
.lobby-ui .logo .l1 { color: #4fe8bd; }
.lobby-ui .logo .l2 { color: var(--gold); font-size: 3.1em; }
.stage-card { margin-top: 0.6em; background: linear-gradient(rgba(38, 45, 92, 0.92), rgba(23, 27, 54, 0.92)); box-shadow: inset 0 0 0 0.1em var(--line), 0 0.25em 0.8em rgba(0, 0, 0, 0.35); border-radius: 1em; overflow: hidden; text-align: center; min-width: 13.5em; }
.stage-card .st-name { font-size: 0.85em; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.3em 1em; background: linear-gradient(90deg, var(--blue-d), var(--blue), var(--blue-d)); }
.stage-card.th-beach .st-name { background: linear-gradient(90deg, #0b6d8a, #19a8c9, #0b6d8a); }
.stage-card.th-candy .st-name { background: linear-gradient(90deg, #b0287a, #e04aa4, #b0287a); }
.stage-card.th-snow .st-name { background: linear-gradient(90deg, #3c5c94, #6f93cc, #3c5c94); }
.stage-card.th-lava .st-name { background: linear-gradient(90deg, #a8360c, #e8641c, #a8360c); }
.stage-card.th-night .st-name { background: linear-gradient(90deg, #3f2f9c, #6a52d8, #3f2f9c); }
.stage-card.th-meadow .st-name { background: linear-gradient(90deg, #12795c, #1fb386, #12795c); }
.stage-card .st-boss { font-size: 1.35em; font-weight: 700; color: #ff5a6e; display: flex; align-items: center; justify-content: center; gap: 0.35em; margin: 0.25em 0.8em 0; -webkit-text-stroke: 0.1em var(--ink); paint-order: stroke fill; }
.stage-card .st-best { font-size: 0.78em; color: var(--text2); font-weight: 500; padding-bottom: 0.4em; }
.stage-card .st-boss:last-child { margin-bottom: 0.35em; }
.boss-ic { display: inline-block; width: 1.05em; height: 1.05em; border-radius: 50%; background: #ff4d6d; position: relative; box-shadow: 0 0 0 0.08em var(--ink); }
.boss-ic::before, .boss-ic::after { content: ''; position: absolute; top: -0.35em; width: 0; height: 0; border-left: 0.18em solid transparent; border-right: 0.18em solid transparent; border-bottom: 0.5em solid #ff4d6d; }
.boss-ic::before { left: 0.05em; transform: rotate(-20deg); } .boss-ic::after { right: 0.05em; transform: rotate(20deg); }
.lobby-ui .spacer { flex: 1; }
/* choix de l'aspect : flèches rondes, vignette 3D */
.skin-row { display: flex; align-items: center; gap: 0.5em; margin-bottom: 0.45em; }
.skin-row .arrow { font: inherit; width: 2.3em; height: 2.3em; border-radius: 50%; border: 0; color: #fff; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(#5a92ff, var(--blue) 55%, #2a62e8); box-shadow: inset 0 0.08em 0 rgba(255, 255, 255, 0.45), 0 0.18em 0 var(--blue-d); }
.skin-row .arrow:active { transform: translateY(0.1em); box-shadow: inset 0 0.08em 0 rgba(255, 255, 255, 0.45), 0 0.06em 0 var(--blue-d); }
.skin-row .arrow:disabled { opacity: 0.35; }
.skin-box { background: rgba(16, 19, 40, 0.8); box-shadow: inset 0 0 0 0.09em var(--line); border-radius: 1em; padding: 0.3em 0.9em 0.4em; display: flex; flex-direction: column; align-items: center; min-width: 10em; }
.skin-box b { font-size: 1em; } .skin-box small { font-size: 0.7em; color: var(--text2); font-weight: 500; }
img.skin-img { width: 7.2em; height: 4.5em; object-fit: contain; display: block; margin: -0.4em 0 -0.25em; filter: drop-shadow(0 0.15em 0.2em rgba(0, 0, 0, 0.5)); }
/* repli sans 3D : quelques perles */
.snake-prev { display: flex; align-items: center; height: 1.8em; }
.snake-prev .bead { display: inline-block; width: 1.25em; height: 1.25em; border-radius: 50%; margin-left: -0.35em; border: 0.09em solid #1c1a26; }
.snake-prev .bead.head { width: 1.7em; height: 1.5em; border-radius: 45% 60% 60% 45%; }
/* améliorations : cartes bleues brillantes */
.ups { display: flex; gap: 0.45em; width: 100%; max-width: 24em; }
.up-card { font: inherit; flex: 1; border: 0; border-radius: 0.9em; padding: 0.45em 0.2em 0.45em; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 0.12em; cursor: pointer;
  background: linear-gradient(#4f8cff, var(--blue) 45%, #2457dc); box-shadow: inset 0 0 0 0.08em rgba(255, 255, 255, 0.25), inset 0 0.12em 0 rgba(255, 255, 255, 0.35), 0 0.22em 0 var(--blue-d), 0 0.4em 0.8em rgba(0, 0, 0, 0.3); }
.up-card:active { transform: translateY(0.14em); box-shadow: inset 0 0 0 0.08em rgba(255, 255, 255, 0.25), 0 0.08em 0 var(--blue-d); }
.up-card .up-ic { width: 2em; height: 2em; filter: drop-shadow(0 0.08em 0 rgba(10, 20, 60, 0.6)); }
.up-card b { font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.02em; -webkit-text-stroke: 0.1em rgba(15, 18, 38, 0.6); paint-order: stroke fill; }
.up-card b small { font-size: 0.85em; color: #cfe0ff; }
.up-card span { font-size: 0.68em; color: #fff; font-weight: 600; text-align: center; min-height: 2.3em; display: flex; align-items: center; background: rgba(10, 20, 70, 0.35); border-radius: 0.6em; padding: 0 0.5em; }
.up-card em { font-style: normal; font-weight: 700; font-size: 0.92em; background: rgba(10, 20, 70, 0.55); color: #fff; border-radius: 0.6em; padding: 0.12em 0.55em; display: flex; align-items: center; }
.up-card.off { filter: saturate(0.45) brightness(0.8); } .up-card.off em { color: #ffb4b4; }
.play-btn { font-size: 1.75em; width: 100%; max-width: 13.3em; margin-top: 0.55em; padding: 0.42em 1em; }
.lobby-ui .play-btn { animation: pulse 1.3s ease-in-out infinite; }

.count-ring { position: relative; width: 5em; height: 5em; margin: 0.2em auto 0.5em; }
.count-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.count-ring circle { fill: none; stroke-width: 9; }
.count-ring .bg { stroke: rgba(255, 255, 255, 0.12); } .count-ring .fg { stroke: #8f6bff; stroke-dasharray: 276; stroke-linecap: round; transition: stroke-dashoffset 0.1s linear; }
.count-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2em; color: #fff; }
.new-skin { display: flex; align-items: center; gap: 0.6em; justify-content: center; background: rgba(8, 10, 26, 0.45); border-radius: 0.9em; padding: 0.4em 0.6em; margin: 0 0 0.6em; box-shadow: inset 0 0 0 0.12em rgba(255, 201, 60, 0.8); }
.new-skin > div:last-child { display: flex; flex-direction: column; text-align: left; } .new-skin b { color: var(--gold); } .new-skin span { font-weight: 500; color: #fff; }
.new-skin img.skin-img { width: 6em; height: 3.75em; margin: 0; }

/* Suivi de la mission en cours (sous la carte de l'arène) : la mission, son avancée, et toujours ce qu'elle rapporte.
 * Finie : la carte s'allume en vert et porte un bouton doré (pièces + « Récupérer ») qui palpite et brille. */
.mis-track { font: inherit; position: relative; margin-top: 0.5em; display: flex; align-items: center; gap: 0.5em; width: min(100%, 20.5em); border: 0; border-radius: 1em;
  padding: 0.4em 0.45em 0.4em 0.5em; color: #fff; cursor: pointer; text-align: left;
  background: rgba(16, 19, 40, 0.84); box-shadow: inset 0 0 0 0.09em var(--line), 0 0.2em 0 rgba(0, 0, 0, 0.3); }
.mis-track:active { transform: translateY(0.1em); }
.mt-ic { width: 1.7em; height: 1.7em; flex: none; }
.mt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.12em; }
.mt-t b { font-size: 0.82em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-t small { font-size: 0.68em; font-weight: 700; color: #b9ffe6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mis-track .bar { display: block; height: 0.85em; margin-top: 0.1em; }
/* la récompense d'une mission pas encore finie : une étiquette dorée */
.mt-rw { flex: none; display: flex; align-items: center; font-weight: 700; font-size: 0.9em; color: var(--gold); background: rgba(0, 0, 0, 0.38); border-radius: 0.8em;
  padding: 0.25em 0.6em 0.25em 0.45em; box-shadow: inset 0 0 0 0.09em rgba(255, 201, 60, 0.45); -webkit-text-stroke: 0.08em var(--ink); paint-order: stroke fill; }
.mis-track.ready { background: linear-gradient(rgba(30, 128, 100, 0.96), rgba(12, 62, 54, 0.96)); box-shadow: inset 0 0 0 0.13em #4be06a, 0 0 1.1em rgba(75, 224, 106, 0.45), 0 0.2em 0 rgba(0, 0, 0, 0.3); }
.mt-ok { width: 1.7em; height: 1.7em; flex: none; border-radius: 50%; background: #4be06a; color: #fff; display: grid; place-items: center; box-shadow: 0 0.1em 0 #1f8a3a; }
.mt-ok svg { width: 1.1em; height: 1.1em; }
/* le bouton « Récupérer » (doré, épais, il palpite) */
.mt-claim { font: inherit; flex: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 0.35em 0.65em 0.4em; border-radius: 0.75em; color: #fff;
  background: linear-gradient(#ffd75a, var(--gold) 55%, #f0ae10); box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.5), 0 0.22em 0 var(--gold-d), 0 0.3em 0.6em rgba(0, 0, 0, 0.3);
  -webkit-text-stroke: 0.1em rgba(15, 18, 38, 0.55); paint-order: stroke fill; animation: pulse 1.1s ease-in-out infinite; }
.mt-claim:active { transform: translateY(0.14em); box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.5), 0 0.08em 0 var(--gold-d); }
.mt-claim em { font-style: normal; font-weight: 700; font-size: 1.05em; display: flex; align-items: center; }
.mt-claim i.coin { box-shadow: 0 0 0 0.09em rgba(15, 18, 38, 0.6), 0 0.06em 0 #9a6400; }
.mt-claim b { font-size: 0.66em; text-transform: uppercase; margin-top: 0.18em; letter-spacing: 0.02em; }
.mt-claim .gift, .btn .gift { width: 1.3em; height: 1.3em; }
/* un reflet passe sur ce qu'il faut toucher */
.shine { position: relative; overflow: hidden; }
.shine::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: 0; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)); transform: translateX(-160%) skewX(-18deg); animation: shine 2.3s ease-in-out infinite; }
@keyframes shine { 0%, 50% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(360%) skewX(-18deg); } }
/* la main qui tapote le bouton */
.hand { position: absolute; right: 0.4em; bottom: -1.45em; width: 2.2em; height: 2.2em; pointer-events: none; z-index: 3; filter: drop-shadow(0 0.15em 0.15em rgba(0, 0, 0, 0.5)); animation: tap 1.1s ease-in-out infinite; }
.hand svg { width: 100%; height: 100%; display: block; }
@keyframes tap { 0%, 100% { transform: translate(0.35em, 0.5em) rotate(-14deg); } 45% { transform: translate(0, 0) rotate(-14deg) scale(0.9); } }
/* le bouton Missions bouge de temps en temps quand il y a quelque chose à récupérer */
.side-btn.hot { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 72%, 100% { transform: rotate(0); } 76% { transform: rotate(-9deg) scale(1.07); } 81% { transform: rotate(8deg) scale(1.07); } 86% { transform: rotate(-5deg); } 91% { transform: rotate(3deg); } }
/* les pièces qui s'envolent vers le compteur */
.fly-layer { position: absolute; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
i.coin.fly { position: absolute; left: 0; top: 0; width: 1.4em; height: 1.4em; margin: -0.7em 0 0 -0.7em; opacity: 0; }
.coins.bump { animation: bump 0.2s ease-out; }
.lobby-ui .coins { transform-origin: left center; }
@keyframes bump { 50% { transform: scale(1.14); } }
/* boutons ronds sur les côtés (missions, aspects) */
.side { position: absolute; top: 47%; pointer-events: none; }
.side-l { left: 0.5em; } .side-r { right: 0.5em; }
.side-btn { font: inherit; position: relative; pointer-events: auto; width: 4.1em; border: 0; border-radius: 1em; padding: 0.4em 0.1em 0.3em; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 0.1em; cursor: pointer;
  background: linear-gradient(rgba(52, 119, 255, 0.95), rgba(28, 71, 196, 0.95)); box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.35), 0 0.2em 0 #142f88, 0 0.4em 0.8em rgba(0, 0, 0, 0.35); }
.side-btn:active { transform: translateY(0.12em); }
.side-btn .sb-ic { width: 2em; height: 2em; filter: drop-shadow(0 0.08em 0 rgba(10, 20, 60, 0.6)); }
.side-btn b { font-size: 0.68em; -webkit-text-stroke: 0.1em rgba(15, 18, 38, 0.6); paint-order: stroke fill; }
.badge { position: absolute; top: -0.35em; right: -0.35em; min-width: 1.35em; height: 1.35em; border-radius: 0.7em; padding: 0 0.3em; background: #ff3b4e; color: #fff; font-style: normal; font-size: 0.8em; display: grid; place-items: center; box-shadow: 0 0 0 0.12em var(--ink); }
.skin-box { font: inherit; color: #fff; border: 0; cursor: pointer; }
/* quatre améliorations */
.ups { gap: 0.35em; max-width: 26em; }
.up-card { padding: 0.4em 0.1em 0.4em; }
.up-card .up-ic { width: 1.75em; height: 1.75em; }
.up-card b { font-size: 0.72em; }
.up-card span { font-size: 0.6em; min-height: 2.5em; padding: 0 0.35em; }
.up-card em { font-size: 0.82em; padding: 0.12em 0.45em; }
.up-card.free em.ad { background: linear-gradient(#b08cff, #7650ee); box-shadow: 0 0.1em 0 #4e2fb8; }
i.ad-ic { font-style: normal; display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; border-radius: 0.3em; background: #fff; color: #7650ee; font-size: 0.7em; margin-right: 0.35em; }
@media (max-height: 700px) { .lobby-ui .logo span { font-size: 2.7em; } .lobby-ui .logo .l2 { font-size: 2.5em; } .stage-card { margin-top: 0.35em; } }

/* Missions */
.panel.missions, .panel.shop { width: min(94vw, 26em); max-height: calc(100% - 1.5em); }
.ch-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; background: rgba(8, 10, 26, 0.45); border-radius: 0.9em; padding: 0.5em 0.7em; box-shadow: inset 0 0 0 0.09em var(--line); margin-bottom: 0.5em; text-align: left; }
.ch-l b { font-size: 1.1em; } .ch-l small { display: block; font-size: 0.7em; color: var(--text2); font-weight: 500; margin-top: 0.2em; }
.dots { display: flex; gap: 0.25em; margin-top: 0.3em; }
.dots i { width: 0.75em; height: 0.75em; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.dots i.on { background: #4be06a; box-shadow: 0 0 0.4em rgba(75, 224, 106, 0.7); }
.ch-r { display: flex; flex-direction: column; align-items: center; min-width: 6em; }
.ch-r small { font-size: 0.7em; color: var(--gold); }
.ch-r img.skin-img { width: 6em; height: 3.75em; margin: -0.3em 0 -0.2em; }
.ch-coins { font-size: 1.3em; color: var(--gold); -webkit-text-stroke: 0.1em var(--ink); paint-order: stroke fill; }
.mis-list { display: flex; flex-direction: column; gap: 0.35em; overflow-y: auto; touch-action: pan-y; margin-bottom: 0.4em; padding-right: 0.15em; }
.mis { position: relative; flex: none; display: flex; align-items: center; gap: 0.5em; background: rgba(8, 10, 26, 0.45); border-radius: 0.8em; padding: 0.4em 0.5em 0.45em 0.55em; box-shadow: inset 0 0 0 0.09em var(--line); text-align: left; }
.mis.done { background: linear-gradient(rgba(30, 128, 100, 0.6), rgba(12, 62, 54, 0.6)); box-shadow: inset 0 0 0 0.13em #4be06a; }
.mis.claimed { opacity: 0.45; }
.mis .mt-ic, .mis .mt-ok { width: 1.5em; height: 1.5em; }
.mis .mt { flex: 1; min-width: 0; } .mis .mt b { font-size: 0.85em; display: block; }
.bar { position: relative; height: 0.95em; border-radius: 0.5em; background: rgba(255, 255, 255, 0.12); margin-top: 0.25em; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #22c0e8, #4be06a); border-radius: 0.5em; }
.bar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.62em; font-weight: 700; }
.mis .mr { flex: none; display: flex; align-items: center; font-size: 0.85em; min-width: 4.6em; justify-content: center; }
.mis .mr.ok { color: #4be06a; } .mis .mr.ok svg { width: 1.4em; height: 1.4em; }
.mis .hand { right: 0.8em; bottom: -1.2em; font-size: 0.9em; }
.ch-claim { position: relative; }
.ch-claim .hand { right: 18%; bottom: -1.2em; }
.gift-panel h2 { color: var(--gold); font-size: 1.6em; }
.gift-skin { margin: 0.2em auto 0; background: radial-gradient(closest-side, rgba(255, 201, 60, 0.35), rgba(255, 201, 60, 0)); animation: pop 0.4s ease-out; }
.gift-skin img.skin-img { width: 15em; height: 9.4em; display: block; }
.gift-name { font-size: 1.3em; }
.gift-panel p { margin: 0.1em 0 0.6em; color: #4be06a; font-weight: 700; }
/* Aspects */
.shop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.3em; }
.shop-head h2 { margin: 0; }
.shop-head .coins { background: rgba(8, 10, 26, 0.5); border-radius: 1em; padding: 0.25em 0.75em 0.25em 0.5em; font-weight: 700; display: flex; align-items: center; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4em; overflow-y: auto; touch-action: pan-y; margin-bottom: 0.5em; padding: 0.1em 0.15em 0.1em 0; }
.sk-card { font: inherit; color: #fff; border: 0; border-radius: 0.9em; padding: 0.3em 0.2em 0.4em; display: flex; flex-direction: column; align-items: center; gap: 0.15em; cursor: pointer;
  background: rgba(8, 10, 26, 0.5); box-shadow: inset 0 0 0 0.09em var(--line); }
.sk-card.eq { box-shadow: inset 0 0 0 0.16em #4be06a; }
.sk-card.own { background: rgba(40, 60, 130, 0.5); }
.sk-card img.skin-img { width: 100%; height: 3.9em; margin: -0.2em 0 -0.2em; }
.sk-card img.skin-img[data-thumb] { visibility: hidden; }
.sk-card b { font-size: 0.68em; line-height: 1.1; min-height: 2.2em; display: flex; align-items: center; text-align: center; }
.sk-card em { font-style: normal; font-weight: 700; font-size: 0.72em; border-radius: 0.6em; padding: 0.15em 0.5em; display: flex; align-items: center; gap: 0.15em; }
.sk-card em.eq { color: #4be06a; } .sk-card em.eq svg { width: 1.1em; height: 1.1em; }
.sk-card em.own { background: var(--blue); }
.sk-card em.buy { background: rgba(255, 201, 60, 0.18); color: var(--gold); }
.sk-card em.buy.off { color: #ff9aa4; background: rgba(255, 77, 94, 0.15); }
.sk-card em.lock { color: var(--text2); font-weight: 600; font-size: 0.62em; }
.sk-card .lk-ic { width: 1.2em; height: 1.2em; }
.sk-card.locked img.skin-img { filter: brightness(0.75) drop-shadow(0 0.15em 0.2em rgba(0, 0, 0, 0.5)); }
/* jauge de fin de manche */
.gauge { margin: -0.2em auto 0; width: 15em; display: flex; flex-direction: column; align-items: center; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge small { font-size: 0.75em; color: var(--text2); margin-top: -0.2em; }
.mult-tag { font-size: 0.5em; vertical-align: middle; background: #3fd86a; color: #fff; border-radius: 0.5em; padding: 0.05em 0.4em; -webkit-text-stroke: 0; }
#mult-btn { margin-top: 0.4em; }
/* « Non merci » n'apparaît qu'au bout d'un instant (le temps de voir la jauge) */
.btn.late { animation: late-in 2.2s both; }
@keyframes late-in { 0%, 80% { opacity: 0; visibility: hidden; } 100% { opacity: 1; visibility: visible; } }
