/* Yuki & Co — prototype 0.1
   Mise en page : un écran de téléphone (colonne de 480 px au plus), fond nuit bleu marine,
   la carte de Laponie en plein écran, les jeux empilés en colonne (en-tête, plateau, boutons). */
:root {
  color-scheme: dark;
  --navy: #0F1D2E;      /* fond de l'appli */
  --night: #0B1626;     /* autour de l'appli, plateaux */
  --panel: #162940;     /* cartes, boutons secondaires */
  --panel-2: #13243A;
  --line: #24395A;
  --line-2: #2E4A70;
  --ink: #F2F6FB;       /* texte */
  --soft: #C9D6E6;
  --muted: #A7B6CB;
  --faint: #7F90AA;
  --ice: #8EC5FF;       /* flocons, focus */
  --orange: #FF9A3D;    /* action principale */
  --orange-deep: #C2621A;
  --gold: #F4B860;      /* étoiles, série */
  --gold-deep: #B9822F;
  --mint: #7DDBA3;      /* réussi */
  --coral: #F28B82;     /* effacer, badges */
  --paper: #FBF7EF;     /* cartes postales */
  --paper-ink: #16233B;
  --paper-sub: #5A6B85;
  --f-display: "Fredoka", "Baloo 2", "Nunito", system-ui, sans-serif;
  --f-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
}

html { height: 100%; box-sizing: border-box; background: var(--night); }
*, *::before, *::after { box-sizing: inherit; }
body {
  height: 100%; margin: 0; overflow: hidden;
  background: var(--night); color: var(--ink);
  font-family: var(--f-body); font-size: 15px;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; touch-action: manipulation; }
/* Samsung Internet en mode sombre inverse les commandes « natives » (apparence par défaut) : nos boutons sombres y devenaient clairs
   et les blocs de glace sombres (5/11, retour d'un joueur). Tous nos boutons et champs sont dessinés par ce CSS. */
button, input[type="text"], input[type="email"], input[type="search"], input[type="number"] { -webkit-appearance: none; appearance: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ice); outline-offset: 2px; }

#app { position: relative; height: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; overflow: clip; background: var(--navy); isolation: isolate; }
@media (min-width: 520px) { #app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, 0.5); } }

.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; overflow: clip;
  padding-left: var(--gut); padding-right: var(--gut-r);
  animation: screen-in 0.22s ease-out both;
}

/* ---------- Boutons, pastilles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 16px; border: 0; cursor: pointer;
  font-family: var(--f-body); font-weight: 800; font-size: 16px; text-decoration: none;
}
.btn-primary { background: var(--orange); color: #0E1C2E; box-shadow: 0 5px 0 var(--orange-deep); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--orange-deep); }
.btn-cta { width: 100%; min-height: 62px; border-radius: 20px; font-family: var(--f-display); font-weight: 600; font-size: 26px; box-shadow: 0 6px 0 var(--orange-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-danger { width: 100%; color: var(--coral); border-color: rgba(242, 139, 130, 0.45); }
.btn-danger-solid { background: var(--coral); color: #2A0E0B; }
.round {
  width: 44px; height: 44px; flex: none; padding: 0; cursor: pointer;
  border-radius: 50%; background: var(--panel); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.chips { display: flex; gap: 6px; }
.chip { display: flex; align-items: center; gap: 6px; padding: 5px 11px 5px 8px; border-radius: 14px; background: rgba(22, 41, 64, 0.92); border: 1px solid rgba(142, 197, 255, 0.3); }
.chip-gold { border-color: rgba(244, 184, 96, 0.35); }
.chip span { display: flex; flex-direction: column; line-height: 1; }
.chip b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chip small { margin-top: 2px; font-size: 10px; font-weight: 700; color: var(--muted); }
.chip-moves { flex-direction: column; gap: 0; padding: 5px 12px; min-width: 58px; }
.chip-moves small { margin: 0 0 2px; }
.chip-moves b { font-size: 19px; line-height: 1; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.pill { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--panel); border: 1px solid rgba(142, 197, 255, 0.25); font-weight: 800; font-size: 15px; white-space: nowrap; }
.pill-gold { border-color: rgba(244, 184, 96, 0.35); }
.pill-muted { color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.eyebrow-gold { color: var(--gold); font-size: 14px; letter-spacing: 0.12em; }

/* Tête de Yuki dans un rond */
.yuki-head { position: relative; display: block; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; background: #1F3A5C; box-shadow: 0 0 0 2px var(--ink); }
.yuki-head img { position: absolute; width: 190%; max-width: none; left: -45%; top: -14%; }

/* Bulle de Yuki */
.yuki-tip { display: flex; align-items: flex-end; gap: 10px; }
.bubble { margin: 0; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #FFFFFF; color: #16233B; font-size: 14px; font-weight: 700; line-height: 1.3; }

/* Carte postale */
.postcard { position: relative; margin: 0; padding: 6px 6px 0; border-radius: 4px; background: var(--paper); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); transform: rotate(var(--rot, 0deg)); }
.postcard img { display: block; width: 100%; aspect-ratio: 520 / 932; object-fit: cover; border-radius: 2px; }
.postcard figcaption { padding: 6px 2px 8px; color: var(--paper-ink); min-width: 0; }
.postcard figcaption b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 15px; line-height: 1.15; }
.postcard figcaption span { display: block; margin-top: 1px; font-size: 11px; font-weight: 700; color: var(--paper-sub); }
.pc-badge { position: absolute; left: 10px; top: 10px; padding: 2px 8px; border-radius: 999px; background: var(--orange); color: #0E1C2E; font-weight: 800; font-size: 11px; }

/* Puzzle mystère */
.mystery-svg { display: block; width: 100%; height: 100%; }
.mz-num { font-family: var(--f-display); font-weight: 600; font-size: 20px; fill: var(--faint); }
.mz-hl { animation: hl 1.4s ease-in-out infinite; }

/* Écran d'en-tête commun (retour + titre) */
.head { flex: none; display: flex; align-items: center; gap: 12px; padding-top: 16px; }
.head-title { flex: 1; min-width: 0; }
.head-title h1 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(19px, 5.8vw, 24px); line-height: 1.1; text-wrap: balance; }
.head-title p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Chargement (piste A, 4/11) ---------- */
.screen-splash { padding: 0; align-items: center; text-align: center;
  background: radial-gradient(120% 70% at 50% 0%, #1F4C86 0%, #173E70 36%, #12305A 62%, #0E2340 100%); }
.screen-splash::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.8;
  background-image: radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent), radial-gradient(1.6px 1.6px at 46% 22%, #fff, transparent),
    radial-gradient(1px 1px at 63% 12%, #fff, transparent), radial-gradient(1.4px 1.4px at 81% 26%, #fff, transparent), radial-gradient(1px 1px at 90% 9%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 7% 44%, #fff, transparent), radial-gradient(1px 1px at 94% 47%, #fff, transparent), radial-gradient(1.2px 1.2px at 20% 63%, #fff, transparent), radial-gradient(1px 1px at 86% 70%, #fff, transparent); }
.splash-top { position: relative; flex: none; margin-top: max(30px, calc(env(safe-area-inset-top, 0px) + 18px)); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.logo-img { margin: 0; line-height: 0; }
.logo-img img { display: block; width: min(56vw, 230px); height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 22px rgba(142, 197, 255, 0.25)); }
.splash-quote { position: relative; flex: none; margin: clamp(14px, 3.4vh, 32px) 0 0; padding: 0 max(28px, var(--gut)); }
.splash-quote p { margin: 0; font-family: var(--f-display); font-size: clamp(23px, 7.4vw, 30px); font-weight: 600; line-height: 1.22; text-wrap: balance; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.splash-quote .by { margin-top: 12px; font-family: var(--f-body); font-weight: 800; font-size: 16px; letter-spacing: 0.05em; color: var(--gold); text-shadow: none; }
.splash-stage { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; align-items: flex-end; }
/* Yuki plus petit, dans un ovale aux bords fondus dans le ciel */
.splash-video { display: block; height: 100%; max-height: 520px; max-width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: 50% 58%; background: transparent;
  -webkit-mask-image: radial-gradient(closest-side, #000 64%, transparent 100%); mask-image: radial-gradient(closest-side, #000 64%, transparent 100%); }
.splash-foot { position: relative; flex: none; width: 100%; padding: 6px max(48px, env(safe-area-inset-right, 0px)) max(34px, calc(env(safe-area-inset-bottom, 0px) + 20px)) max(48px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.splash-wait { margin: 0; font-size: 15px; font-weight: 700; color: var(--soft); }
.splash-tap { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.splash-tap:focus-visible { outline: 3px solid var(--ice); outline-offset: -6px; }
.loader { position: relative; width: 100%; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); overflow: hidden; }
.loader-bar { width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FF9A3D, #F4B860); box-shadow: 0 0 14px rgba(255, 154, 61, 0.6); transition: width 0.35s ease-out; }
.loader span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #0E1C2E; }
.logo { margin: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--f-display); font-weight: 600; font-size: clamp(36px, 13vw, 52px); line-height: 1; letter-spacing: 0.02em; text-shadow: 0 4px 0 #4F86C6, 0 0 22px rgba(142, 197, 255, 0.6); }
.logo em { font-style: normal; color: var(--gold); text-shadow: 0 4px 0 var(--gold-deep), 0 0 22px rgba(244, 184, 96, 0.5); }
.tagline { margin: 0; font-size: 14px; font-weight: 700; color: var(--soft); letter-spacing: 0.02em; }

/* ---------- Carte du monde ---------- */
.screen-map { padding: 0; }
.map-stage { position: absolute; --node: 52px; }
.map-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; user-select: none; -webkit-user-drag: none; }
.map-aurora { position: absolute; left: 2%; top: 4%; width: 96%; height: 10%; border-radius: 50%; background: linear-gradient(90deg, rgba(125, 240, 176, 0), rgba(125, 240, 176, 0.8) 35%, rgba(95, 214, 224, 0.7) 60%, rgba(245, 154, 208, 0.6) 85%, rgba(245, 154, 208, 0)); filter: blur(18px); mix-blend-mode: screen; opacity: 0.35; pointer-events: none; animation: aurora 9s ease-in-out infinite; }
.node {
  position: absolute; width: var(--node); height: var(--node); padding: 0; cursor: pointer;
  translate: -50% -50%; border-radius: 50%; border: 3px solid #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 600; font-size: calc(var(--node) * 0.38); color: #FFFFFF;
}
.node:active { scale: 0.94; }
.node::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.node-done { background: radial-gradient(circle at 50% 35%, #6FA6E6, #2F64A8); box-shadow: 0 5px 0 rgba(47, 100, 168, 0.45); }
.node-current { width: calc(var(--node) * 1.2); height: calc(var(--node) * 1.2); background: radial-gradient(circle at 50% 35%, #FFC58A, #FF9A3D); color: var(--navy); font-size: calc(var(--node) * 0.5); z-index: 2; animation: glow 2.4s ease-in-out infinite; }
.node-locked { background: #A9B9D2; box-shadow: 0 5px 0 rgba(70, 90, 130, 0.35); }
.node-stars { position: absolute; top: calc(100% - 3px); left: 50%; transform: translateX(-50%); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45)); }
.ready {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  border-radius: 22px; background: #FFFFFF; color: #16233B; font-size: 13px; font-weight: 800;
  box-shadow: 0 4px 10px rgba(15, 29, 46, 0.25); pointer-events: none; animation: float 3s ease-in-out infinite;
}
.ready::after { content: ""; position: absolute; border: 7px solid transparent; }
.ready.tail-b::after { top: 100%; left: var(--tail, 50%); margin-left: -7px; border-top-color: #FFFFFF; }
.ready.tail-r::after { left: 100%; top: 50%; margin-top: -7px; border-left-color: #FFFFFF; }
.ready.tail-l::after { right: 100%; top: 50%; margin-top: -7px; border-right-color: #FFFFFF; }
.ready.tail-t::after { bottom: 100%; left: var(--tail, 50%); margin-left: -7px; border-bottom-color: #FFFFFF; }
.sheet:focus, .screen:focus { outline: none; }
.ready .yuki-head { box-shadow: none; }
.ready span { max-width: 104px; white-space: normal; line-height: 1.15; text-wrap: balance; }
.snowfall { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.snow { position: absolute; top: -12px; width: var(--s); height: var(--s); border-radius: 50%; background: #FFFFFF; opacity: 0.75; animation: fall linear infinite; }
.map-head { position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; padding: 16px var(--gut-r) 0 var(--gut); }
.avatar-btn { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.avatar-plus { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 2px solid var(--navy); display: flex; align-items: center; justify-content: center; }
.world-tag { position: relative; z-index: 4; align-self: center; margin-top: 12px; transform: rotate(-2deg); padding: 6px 16px 7px; border-radius: 12px; border: 2px dashed var(--orange); background: rgba(15, 29, 46, 0.82); text-align: center; }
.world-tag p { margin: 0; font-size: 12px; font-weight: 700; color: var(--soft); }
.world-tag p:first-child { font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); }
.side-btn { position: absolute; z-index: 4; top: 136px; width: 68px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--paper-ink); }
.side-left { left: var(--gut); }
.side-right { right: var(--gut-r); }
.side-ico { position: relative; width: 54px; height: 54px; border-radius: 16px; background: rgba(15, 29, 46, 0.9); border: 2px solid #FFFFFF; box-shadow: 0 4px 0 rgba(15, 29, 46, 0.35); display: flex; align-items: center; justify-content: center; }
.side-lbl { padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.9); white-space: nowrap; }
.badge { position: absolute; right: -9px; top: -9px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--coral); color: var(--navy); font-style: normal; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--navy); }
.badge-gold { background: var(--gold); }
.map-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 56px max(40px, env(safe-area-inset-right, 0px)) 26px max(40px, env(safe-area-inset-left, 0px)); background: linear-gradient(to bottom, rgba(15, 29, 46, 0), rgba(15, 29, 46, 0.85)); pointer-events: none; }
.map-foot .btn { pointer-events: auto; }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
.pulse:active { animation: none; }
@media (max-height: 700px) {
  .map-foot { padding-bottom: 16px; padding-top: 40px; }
  .map-foot .btn-cta { min-height: 52px; font-size: 22px; }
}
@media (max-height: 640px) {
  .map-head { padding-top: 10px; }
  .world-tag { margin-top: 6px; padding: 3px 14px 4px; }
  .world-tag p { font-size: 11px; }
  .side-btn { top: 112px; }
}

/* ---------- Maison de Yuki ---------- */
.screen-home { padding: 0; }
.round-glass { background: rgba(22, 41, 64, 0.92); border-color: rgba(142, 197, 255, 0.3); }
.head-right { display: flex; align-items: center; gap: 6px; }
.sound-btn { width: 40px; height: 40px; }
.acc-note { margin: 8px 2px 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.home-bg { position: absolute; inset: 0; background: #23170F; }
.home-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.home-arrival { transition: opacity 0.7s ease; }
.home-arrival.gone { opacity: 0; pointer-events: none; }
.home-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(15, 29, 46, 0.7) 0%, rgba(15, 29, 46, 0) 24%); }
.home-tag { position: relative; z-index: 4; align-self: center; margin-top: 12px; padding: 5px 16px 6px; border-radius: 12px; border: 2px dashed var(--orange); background: rgba(15, 29, 46, 0.82); transform: rotate(-2deg); }
.home-tag p { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); }
.home-bubble { position: absolute; z-index: 3; left: 0; right: 0; top: 30%; width: max-content; max-width: min(300px, calc(100% - 48px)); margin: 0 auto; padding: 10px 14px; border-radius: 18px; background: #FFFFFF; color: #16233B; font-size: 14px; font-weight: 800; line-height: 1.3; text-align: center; text-wrap: balance; box-shadow: 0 6px 16px rgba(15, 29, 46, 0.3); }
.home-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -8px; border: 8px solid transparent; border-top-color: #FFFFFF; }
.home-yuki { position: absolute; z-index: 2; left: 14%; right: 8%; top: 46%; height: 28%; padding: 0; border: 0; border-radius: 45%; background: transparent; cursor: pointer; }
.hearts { position: absolute; z-index: 3; left: 15%; right: 15%; top: 40%; height: 30%; pointer-events: none; }
.hearts span { position: absolute; bottom: 0; display: block; scale: var(--s, 1); animation: heart-up 1.7s ease-out both; filter: drop-shadow(0 2px 4px rgba(15, 29, 46, 0.35)); }
.hearts svg path { fill: #F59AD0; }
.home-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-direction: column; gap: 12px; padding: 44px var(--gut-r) 22px var(--gut); background: linear-gradient(to bottom, rgba(15, 29, 46, 0), rgba(15, 29, 46, 0.9) 32%); }
.home-today { margin: 0 0 8px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.home-today span { color: var(--gold); letter-spacing: 0.04em; }
.tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.task { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 9px; border-radius: 16px; border: 1px solid rgba(142, 197, 255, 0.28); background: rgba(15, 29, 46, 0.84); color: var(--ink); cursor: pointer; }
.task:active { background: #1F3A5C; }
.task-ico { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--c); background: rgba(255, 255, 255, 0.06); display: flex; align-items: center; justify-content: center; }
.task.done { border-color: rgba(125, 219, 163, 0.45); }
.task.done .task-ico { background: var(--mint); border-color: var(--mint); }
.task-lbl { font-size: 13px; font-weight: 800; line-height: 1.15; text-align: center; text-wrap: balance; }
.task-sub { font-size: 12px; font-weight: 800; color: var(--gold); }
.task.done .task-sub { color: var(--mint); }
.home-foot .btn-cta { gap: 10px; }
@media (max-height: 700px) {
  .home-bubble { top: 24%; }
  .home-foot { padding-bottom: 14px; gap: 10px; }
  .home-foot .btn-cta { min-height: 52px; font-size: 22px; }
  .task { padding: 8px 4px 7px; }
  .task-ico { width: 36px; height: 36px; }
}

/* ---------- Carte du jour (puzzle) ---------- */
.screen-daily { padding-bottom: 8px; }
.jig-board { position: relative; width: 240px; height: 430px; border-radius: 10px; background: var(--night); box-shadow: 0 0 0 2px var(--line-2), 0 10px 30px rgba(0, 0, 0, 0.35); }
.jig-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; opacity: 0.16; transition: opacity 0.6s; }
.jig-grid { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.6s; }
.jig-grid path { fill: none; stroke: rgba(255, 255, 255, 0.24); stroke-width: 1; vector-effect: non-scaling-stroke; }
.jig-placed { position: absolute; inset: 0; z-index: 1; }
.jig-in { position: absolute; pointer-events: none; animation: snap 0.25s ease-out; }
.jig-in svg, .jig-float svg, .jig-piece svg { display: block; width: 100%; height: 100%; overflow: visible; }
.jig-board.solved .jig-in svg > path, .jig-board.solved .jig-grid { opacity: 0; transition: opacity 0.6s; }
.jig-board.solved .jig-ghost { opacity: 0; }
.jig-cell { position: absolute; z-index: 2; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.jig-board.choosing .jig-cell:hover, .jig-board.choosing .jig-cell:focus-visible { background: rgba(142, 197, 255, 0.18); }
.jig-cell.nope { animation: shake 0.32s ease; background: rgba(242, 139, 130, 0.25); }
.g-controls.g-controls-tray { display: block; margin: 8px calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); }
.jig-tray { display: flex; gap: 10px; overflow-x: auto; padding: 12px var(--gut-r) 14px var(--gut); scrollbar-width: thin; }
.jig-tray:empty { display: none; }
.jig-piece { flex: none; width: 76px; height: 94px; padding: 0; border: 0; border-radius: 12px; background: rgba(22, 41, 64, 0.6); cursor: grab; touch-action: pan-x; user-select: none; -webkit-user-select: none; }
.jig-piece svg { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4)); }
.jig-piece.sel { outline: 3px solid var(--orange); outline-offset: 2px; background: rgba(255, 154, 61, 0.14); }
.jig-piece.lifting { opacity: 0.25; }
.jig-float { position: absolute; left: 0; top: 0; z-index: 40; pointer-events: none; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5)); }
.daily-done { margin: 14px 0 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pc-daily { width: min(52vw, 210px); --rot: -2deg; }

/* ---------- Feuille du bas ---------- */
.modal { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }
.modal-scrim { position: absolute; inset: 0; background: rgba(5, 10, 20, 0.62); animation: fade 0.2s ease-out; }
.sheet {
  position: relative; max-height: 92%; overflow-y: auto;
  padding: 22px var(--gut-r) calc(22px + env(safe-area-inset-bottom, 0px)) var(--gut);
  border-radius: 26px 26px 0 0; background: var(--panel-2); border-top: 1px solid var(--line-2);
  animation: sheet-in 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.modal.closing .sheet { animation: sheet-out 0.18s ease-in forwards; }
.modal.closing .modal-scrim { opacity: 0; transition: opacity 0.18s; }
.sheet-x { position: absolute; right: var(--gut-r); top: 16px; }
.sheet-title { margin: 6px 0 0; padding-right: 52px; font-family: var(--f-display); font-weight: 600; font-size: 28px; line-height: 1.1; text-wrap: balance; }
.sheet-rule { margin: 8px 0 0; max-width: 40ch; font-size: 15px; line-height: 1.45; color: var(--soft); }
.goal-box { margin-top: 14px; padding: 10px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 6px; }
.goal-box div { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--soft); }
.goal-box .stars { flex: none; width: 50px; }
.best-line { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 14px; font-weight: 800; color: var(--muted); }
.rewards { margin: 16px 0 20px; display: grid; gap: 10px; }
.rewards-title { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.reward-row { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; }
.reward-card { flex: none; width: 40px; height: 54px; padding: 3px; border-radius: 5px; background: var(--paper); color: var(--paper-ink); display: flex; align-items: center; justify-content: center; font-family: var(--f-display); font-weight: 600; font-size: 22px; transform: rotate(-4deg); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); overflow: hidden; }
.reward-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.reward-piece { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #2A2350; display: flex; align-items: center; justify-content: center; }
.modal .btn-ghost { width: 100%; margin-top: 12px; }
.modal-viewer { justify-content: center; }
.modal-viewer .sheet { background: transparent; border: 0; padding-top: 76px; overflow: visible; }
.viewer { display: flex; justify-content: center; }
.pc-big { width: min(78vw, 340px, calc((100vh - 220px) * 0.53)); width: min(78vw, 340px, calc((100dvh - 220px) * 0.53)); --rot: -1.5deg; }
.pc-big figcaption b { font-size: 20px; }
.pc-big figcaption span { font-size: 13px; }

/* ---------- Jeu ---------- */
.screen-game { padding-bottom: 16px; }
.g-top { flex: none; margin-top: 12px; min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; color: var(--soft); }
/* la ligne du haut du jeu : ce que le jeu y écrit à gauche, l'objectif des 3 étoiles et « ? » à droite (4/11) */
.g-top-row { flex: none; margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 34px; }
.g-top-row .g-top { flex: 1 0 auto; max-width: 100%; margin-top: 0; }
.g-aids { flex: none; margin-left: auto; display: flex; align-items: center; gap: 8px; max-width: 100%; }
.g-goal { min-width: 0; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--soft); white-space: nowrap; overflow: hidden; }
.g-goal > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.g-goal .stars { flex: none; }
.g-help { flex: none; width: 34px; height: 34px; min-height: 34px; font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.g-top:empty { display: none; }
.g-top .ok { color: var(--mint); }
/* fenêtre d'échec fermée sans choisir : « Réessayer » reste sur le plateau */
.g-stuck { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; border-radius: 16px; background: rgba(11, 22, 38, 0.66); text-align: center; }
.g-stuck p { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 22px; }
.g-area { position: relative; flex: 1; min-height: 0; margin-top: 12px; display: flex; align-items: center; justify-content: center; }
.g-tip { flex: none; margin-top: 12px; }
.g-controls { flex: none; display: flex; gap: 8px; margin-top: 12px; }
.g-controls:empty { display: none; }
.ctl { flex: 1; min-height: 58px; padding: 0; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); color: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 800; font-size: 12px; cursor: pointer; }
.ctl:disabled { opacity: 0.4; cursor: default; }
.ctl:active:not(:disabled) { background: #1F3A5C; }
@media (max-height: 700px) {
  .g-tip { display: none; }
  .head { padding-top: 10px; }
  .ctl { min-height: 50px; }
}

/* Paires */
.pairs-grid { display: grid; grid-template-columns: repeat(var(--cols), var(--cw, 72px)); gap: 10px; }
.pcard { width: var(--cw, 72px); height: calc(var(--cw, 72px) / 0.75); padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; }
.pcard-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.35s ease; }
.pcard.up .pcard-in, .pcard.matched .pcard-in { transform: rotateY(180deg); }
.pcard-back, .pcard-face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; align-items: center; justify-content: center; }
.pcard-back { background: linear-gradient(160deg, #24426B, #1D3352); border: 1px solid var(--line-2); }
.pcard-face { transform: rotateY(180deg); background: radial-gradient(circle at 50% 40%, #EAF4FF, #BFD7F2); border: 2px solid var(--ice); box-shadow: 0 0 0 3px rgba(142, 197, 255, 0.25); }
.pcard-face img { max-width: 84%; max-height: 84%; object-fit: contain; }
.pcard.matched { cursor: default; }
.pcard.matched .pcard-face { border-color: var(--mint); box-shadow: none; opacity: 0.6; }
.pcard.matched .pcard-face::after { content: ""; position: absolute; right: 5px; top: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F1D2E' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Taquin */
.taquin .tile.can { animation: tile-can 1.6s ease-in-out infinite; }
@keyframes tile-can { 50% { box-shadow: 0 0 0 3px rgba(255, 210, 127, 0.9), 0 0 14px rgba(255, 210, 127, 0.6); } }
@media (prefers-reduced-motion: reduce) { .taquin .tile.can { animation: none; box-shadow: 0 0 0 3px rgba(255, 210, 127, 0.9); } }
.taquin { touch-action: none; position: relative; width: 240px; height: 430px; border-radius: 14px; overflow: hidden; background: var(--night); box-shadow: 0 0 0 2px var(--line-2), 0 10px 30px rgba(0, 0, 0, 0.35); }
.tile { position: absolute; left: 0; top: 0; width: calc(100% / var(--n)); height: calc(100% / var(--n)); padding: 1.5px; border: 0; background: none; cursor: pointer; transform: translate(calc(var(--c) * 100%), calc(var(--r) * 100%)); transition: transform 0.14s ease-out, padding 0.3s; }
.tile span { display: block; width: 100%; height: 100%; border-radius: 6px; background-size: calc(var(--n) * 100%) calc(var(--n) * 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); transition: border-radius 0.3s; }
.taquin.solved .tile { padding: 0; cursor: default; }
.taquin.solved .tile span { border-radius: 0; box-shadow: none; }
.tile.last { animation: fade 0.6s ease-out both; }
.taquin-peek { position: absolute; inset: 0; z-index: 5; background: var(--night); cursor: pointer; }
.taquin-peek img { width: 100%; height: 100%; object-fit: cover; }
.peek-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(142, 197, 255, 0.35); background: var(--panel); color: var(--ink); font-weight: 800; font-size: 13px; cursor: pointer; }
.peek-btn[aria-pressed="true"] { background: #1F3A5C; border-color: var(--ice); }
.nope { animation: shake 0.32s ease; }
.tile.nope { animation: none; }
.tile.nope span { animation: shake 0.32s ease; }

/* Fioles */
.sky {
  position: relative; width: 100%; height: 84px; overflow: hidden; border-radius: 20px;
  background: radial-gradient(1.5px 1.5px at 12% 30%, #FFFFFF, transparent), radial-gradient(1.5px 1.5px at 34% 18%, #FFFFFF, transparent),
    radial-gradient(1px 1px at 58% 40%, #FFFFFF, transparent), radial-gradient(1.5px 1.5px at 76% 22%, #FFFFFF, transparent),
    radial-gradient(1px 1px at 90% 48%, #FFFFFF, transparent), linear-gradient(#071022, #13234A 70%, #22406A);
}
.aurora { position: absolute; left: var(--x); top: 4px; width: 36%; height: 72px; border-radius: 50%; transform: translateX(-50%) skewX(-14deg); background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--col), rgba(0, 0, 0, 0)); filter: blur(10px); opacity: 0.07; transition: opacity 0.7s; }
.aurora.on { opacity: 0.85; animation: aurora-soft 6s ease-in-out infinite; }
.sky-label { position: absolute; left: 10px; bottom: 8px; padding: 3px 10px; border-radius: 999px; background: rgba(7, 16, 34, 0.72); font-size: 12px; font-weight: 800; color: var(--mint); }
.vials { --vw: 56px; --vh: 150px; --per: 4; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 14px; width: calc(var(--per) * var(--vw) + (var(--per) - 1) * 14px); padding-top: 20px; }
.vial { position: relative; width: var(--vw); height: var(--vh); padding: 0; border: 0; background: none; cursor: pointer; transition: transform 0.15s ease, filter 0.2s; }
.vial svg { display: block; width: 100%; height: 100%; }
.vial-art { display: block; width: 100%; height: 100%; }
.vial.lifted { transform: translateY(-16px); filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.75)); }
.vial.full { cursor: default; filter: drop-shadow(0 0 10px rgba(89, 227, 160, 0.9)); }
.vial-check { position: absolute; left: 50%; top: -14px; z-index: 1; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--mint); display: flex; align-items: center; justify-content: center; }
.vial-check.pop { animation: pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }

/* Fusion */
.ladder { width: 100%; padding: 10px 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.ladder-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ladder-head b { font-size: 13px; color: var(--ink); }
.ladder-head span { font-size: 12px; font-weight: 800; color: var(--gold); }
.ladder-row { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.ladder-row i { font-style: normal; font-weight: 800; color: var(--faint); }
.rung { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.rung img { max-width: 30px; max-height: 30px; }
.rung .m-flake { width: 22px; height: 22px; }
.rung .m-ball { width: 22px; height: 22px; }
.rung.goal { box-shadow: 0 0 0 2px var(--orange), 0 0 12px rgba(255, 154, 61, 0.55); }
.merge { position: relative; width: 300px; height: 300px; border-radius: 22px; background: var(--panel-2); border: 1px solid var(--line); touch-action: none; user-select: none; -webkit-user-select: none; }
.merge-cells { position: absolute; inset: 2.5%; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 2.4%; }
.merge-cells span { border-radius: 14px; background: rgba(29, 51, 82, 0.6); }
.merge-tiles { position: absolute; inset: 2.5%; }
.mtile { position: absolute; left: 0; top: 0; z-index: 1; width: 23.2%; height: 23.2%; border-radius: 14px; background: var(--bg); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18); display: flex; align-items: center; justify-content: center; translate: calc(var(--c) * 110.345%) calc(var(--r) * 110.345%); transition: translate 0.12s ease-out; }
.mtile img { max-width: 84%; max-height: 84%; object-fit: contain; pointer-events: none; }
.mtile b { position: absolute; right: 7px; bottom: 4px; font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, 0.65); }
.mtile.goal { box-shadow: 0 0 0 3px var(--orange), 0 0 18px rgba(255, 154, 61, 0.6); }
.mtile.gone { z-index: 0; }
.mtile.new { animation: appear 0.18s ease-out both; }
.mtile.pop { animation: pop-tile 0.2s ease-out; }
.m-flake { display: flex; width: 62%; height: 62%; }
.m-flake svg { width: 100%; height: 100%; }
.m-ball { display: block; width: 58%; height: 58%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFFFFF, #CFE2F7 60%, #9DBBDD); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); }
.m-aurora { display: block; width: 72%; height: 46%; border-radius: 50%; background: linear-gradient(90deg, #7DDBA3, #8EC5FF, #C3B5F7); filter: blur(2px); }
.ctl-dir { font-size: 0; gap: 0; }

/* Attrape-flocons */
.catch { position: relative; overflow: hidden; border-radius: 18px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer;
  background: radial-gradient(1.5px 1.5px at 14% 18%, #FFFFFF, transparent), radial-gradient(1px 1px at 38% 9%, #FFFFFF, transparent), radial-gradient(1.5px 1.5px at 71% 22%, #FFFFFF, transparent), radial-gradient(1px 1px at 88% 12%, #FFFFFF, transparent), linear-gradient(#0B1830, #16305A 65%, #2C4E74); }
.catch-sky { position: absolute; left: 0; right: 0; bottom: 0; height: 12%; background: linear-gradient(rgba(232, 243, 255, 0), rgba(232, 243, 255, 0.28)); }
.catch-layer { position: absolute; inset: 0; pointer-events: none; }
.catch-flake { position: absolute; left: 0; top: 0; display: block; filter: drop-shadow(0 0 6px rgba(142, 197, 255, 0.85)); }
.catch-flake.gold { filter: drop-shadow(0 0 9px rgba(255, 210, 127, 0.95)); }
.catch-yuki { position: absolute; left: 0; bottom: 2px; width: 80px; max-width: none; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.catch-yuki > img { display: block; width: 100%; height: auto; transform-origin: 50% 90%; }
.catch-yuki .spr { display: block; width: 100%; background-repeat: no-repeat; transform-origin: 50% 100%; }
.catch-pop { position: absolute; left: 0; top: 0; font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--gold); text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); animation: rise 0.7s ease-out forwards; }
.catch-time { flex: 0 0 44%; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.catch-time span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mint), var(--ice)); }
.catch-start, .stack-start, .sled-start { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(11, 22, 38, 0.45); pointer-events: none; }
.catch-start p, .stack-start p, .sled-start p { margin: 0; padding: 10px 16px; border-radius: 999px; background: #FFFFFF; color: #16233B; font-weight: 800; font-size: 15px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); }

/* Mots mêlés */
.ws-words { width: 100%; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ws-words li { padding: 3px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 800; letter-spacing: 0.06em; }
.ws-words li.done { background: var(--fc); border-color: transparent; color: #0E1C2E; text-decoration: line-through; }
.ws { display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); gap: 3px; touch-action: none; user-select: none; -webkit-user-select: none; }
.ws-cell { padding: 0; border: 0; border-radius: 8px; background: var(--panel); color: var(--ink); font-family: var(--f-display); font-weight: 600; font-size: clamp(14px, 4.6vw, 22px); cursor: pointer; }
.ws-cell.found { background: var(--fc); color: #0E1C2E; }
.ws-cell.sel, .ws-cell.anchor { background: var(--orange); color: #0E1C2E; }
.ws-cell.nope { animation: shake 0.32s ease; }
.ws-cell.hint { box-shadow: inset 0 0 0 3px #FFE19A; animation: ws-hint 1.3s ease-in-out infinite; }
@keyframes ws-hint { 50% { background: #3A5A86; scale: 1.08; } }

/* La pile de cadeaux */
.stack { position: relative; overflow: hidden; border-radius: 18px; background: linear-gradient(#0B1830, #1D3352); touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer; }
.stack-world { position: absolute; inset: 0; transition: transform 0.35s ease; }
.stack-base { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#E8F3FF, #BFD7F2); }
.gift { position: absolute; border-radius: 5px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.28);
  background: linear-gradient(90deg, transparent calc(50% - 4px), var(--g2) calc(50% - 4px), var(--g2) calc(50% + 4px), transparent calc(50% + 4px)), var(--g1); }
.gift.falling { animation: gift-fall 0.8s ease-in forwards; }
.stack-perfect { font-weight: 800; color: var(--gold); opacity: 0; }
.stack-perfect.show { animation: perfect 1.1s ease-out; }
.ctl-wide { flex-direction: row; gap: 8px; font-size: 15px; }

/* Sudoku des flocons */
.sdk { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); gap: 3px; padding: 4px; border-radius: 14px; background: var(--line-2); }
.sdk::after { content: ""; position: absolute; inset: 4px; pointer-events: none;
  background: linear-gradient(to right, transparent calc(50% - 1.5px), rgba(142, 197, 255, 0.75) calc(50% - 1.5px), rgba(142, 197, 255, 0.75) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(to bottom, transparent calc(33.333% - 1.5px), rgba(142, 197, 255, 0.75) calc(33.333% - 1.5px), rgba(142, 197, 255, 0.75) calc(33.333% + 1.5px), transparent calc(33.333% + 1.5px), transparent calc(66.666% - 1.5px), rgba(142, 197, 255, 0.75) calc(66.666% - 1.5px), rgba(142, 197, 255, 0.75) calc(66.666% + 1.5px), transparent calc(66.666% + 1.5px)); }
.sdk-cell { min-width: 0; min-height: 0; padding: 3px; border: 0; border-radius: 6px; background: var(--panel); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sdk-cell img { max-width: 86%; max-height: 86%; pointer-events: none; }
.sdk-cell.given { background: #22406A; cursor: default; }
.sdk-cell.peer { background: #1B3352; }
.sdk-cell.given.peer { background: #27486F; }
.sdk-cell.same { box-shadow: inset 0 0 0 2px var(--mint); }
.sdk-cell.sel { box-shadow: inset 0 0 0 3px var(--orange); }
.sdk-cell.placed img { animation: pop 0.35s ease-out; }
.sdk-cell.nope { animation: shake 0.32s ease; background: rgba(242, 139, 130, 0.3); }
.g-controls.g-controls-pal { display: block; }
.sdk-pal { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.sdk-sym { position: relative; height: 58px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sdk-sym img { max-width: 80%; max-height: 80%; pointer-events: none; }
.sdk-sym b { position: absolute; right: 5px; bottom: 2px; font-size: 11px; font-weight: 800; color: var(--muted); }
.sdk-sym.armed { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.sdk-sym:disabled { opacity: 0.3; cursor: default; }

/* Traîneau, vu du ciel : la neige, la corde, les luges et Yuki qui court (placés en JS, une case = un élément) */
.sled { position: relative; overflow: hidden; border-radius: 16px; touch-action: none; user-select: none; -webkit-user-select: none;
  background: linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px) 0 0 / calc(100% / var(--cols)) calc(100% / var(--rows)), linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px) 0 0 / calc(100% / var(--cols)) calc(100% / var(--rows)), radial-gradient(circle at 30% 20%, #F4F9FF, #CFE2F6 70%); }
.sled.has-snow { background-size: cover; background-position: center; }
/* la piste : une marge de 3/4 de case tout autour (Yuki dépasse de sa case), bordée de neige tassée pour montrer les bords */
.sled-layer, .sled-field, .sled-ropes { position: absolute; top: var(--pv, 0%); bottom: var(--pv, 0%); left: var(--ph, 0%); right: var(--ph, 0%); }
.sled-field { border-radius: 8px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 0 7px rgba(70, 110, 170, 0.22), inset 0 0 18px rgba(70, 110, 170, 0.12); pointer-events: none; }
.sled-ropes { width: calc(100% - 2 * var(--ph, 0%)); height: calc(100% - 2 * var(--pv, 0%)); pointer-events: none; }
.sled.bump .sled-yuki { animation: sled-bump 0.18s ease; }
@keyframes sled-bump { 50% { filter: drop-shadow(0 0 6px rgba(255, 120, 120, 0.9)); } }
.sled-ropes polyline { fill: none; stroke: #C0392B; stroke-width: 0.06; stroke-linecap: round; stroke-linejoin: round; }
.sled-food, .sled-yuki, .sled-luge { position: absolute; left: 0; top: 0; width: calc(100% / var(--cols)); height: calc(100% / var(--rows)); display: flex; align-items: center; justify-content: center; will-change: transform; }
.sled-food { transform: translate(calc(var(--c) * 100%), calc(var(--r) * 100%)); }
.sled-food svg { width: 78%; height: 78%; animation: pulse 1.6s ease-in-out infinite; }
.sled-luge svg, .sled-luge img { flex: none; width: 82%; height: 96%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(20, 40, 70, 0.3)); }
.sled-yuki { z-index: 2; }
.sled-yuki .spr { flex: none; width: 250%; height: 250%; background-repeat: no-repeat; filter: drop-shadow(0 3px 3px rgba(20, 40, 70, 0.3)); }
.sled-yuki .yuki-head { --s: 92% !important; width: 92%; height: 92%; box-shadow: 0 0 0 2px #FFFFFF, 0 2px 4px rgba(0, 0, 0, 0.3); }
.sled.crash { animation: shake 0.4s ease; }
.catch:focus, .stack:focus, .sled:focus, .merge:focus { outline: none; }

/* La banquise à remplir */
.blk { display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); gap: 3px; padding: 4px; border-radius: 14px; background: #0B1626; border: 1px solid var(--line); }
.blk-cell { min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 5px; background: rgba(29, 51, 82, 0.75); cursor: pointer; }
.blk-cell.on, .blk-shape i { background: linear-gradient(145deg, #E8F6FF, #8EC5FF 70%, #5FA5E8); box-shadow: inset 0 -3px 0 rgba(20, 60, 110, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.7); }
.blk-cell.melt { animation: melt 0.38s ease-out forwards; }
.blk.choosing .blk-cell:not(.on):hover { background: rgba(142, 197, 255, 0.25); }
.blk-tray { display: flex; justify-content: space-around; align-items: center; gap: 10px; padding: 10px var(--gut-r) 12px var(--gut); }
.blk-piece { flex: 1; max-width: 120px; height: 96px; padding: 0; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.blk-piece.sel { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.blk-piece.stuck { opacity: 0.45; }
.blk-piece.lifting { opacity: 0.25; }
.blk-piece.nope { animation: shake 0.32s ease; }
.blk-shape { --cs: var(--pcs, 18px); position: relative; display: block; width: calc(var(--w) * var(--cs)); height: calc(var(--h) * var(--cs)); pointer-events: none; }
.blk-shape i { position: absolute; left: calc(var(--c) * var(--cs)); top: calc(var(--r) * var(--cs)); width: calc(var(--cs) - 3px); height: calc(var(--cs) - 3px); border-radius: 4px; }
.blk-float { position: absolute; left: 0; top: 0; z-index: 40; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45)); }

/* ---------- Victoire ---------- */
.screen-win { padding-top: 22px; padding-bottom: 18px; }
.sparkles { position: absolute; inset: 0; pointer-events: none; opacity: 0.8;
  background: radial-gradient(3px 3px at 14% 12%, #F4B860, transparent), radial-gradient(3px 3px at 82% 9%, #8EC5FF, transparent),
    radial-gradient(2px 2px at 64% 22%, #FFFFFF, transparent), radial-gradient(3px 3px at 9% 46%, #8EC5FF, transparent),
    radial-gradient(2px 2px at 92% 40%, #F4B860, transparent), radial-gradient(2px 2px at 30% 30%, #FFFFFF, transparent),
    radial-gradient(3px 3px at 72% 56%, #F4B860, transparent), radial-gradient(2px 2px at 20% 70%, #FFFFFF, transparent); }
.win-top { position: relative; text-align: center; }
.win-stars { margin-top: 6px; display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.win-stars span:nth-child(2) { margin-bottom: 10px; }
.win-moves { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.win-mid { position: relative; flex: 1; min-height: 0; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.win-card { flex: none; }
.pc-reveal { --rot: -3deg; animation: card-in 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.5s both; }
.win-piece { flex: none; animation: fade 0.5s ease-out 0.9s both; }
.win-again { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.win-text { position: relative; margin: 12px 0 0; text-align: center; font-size: 15px; line-height: 1.4; color: var(--soft); text-wrap: balance; }
.win-text strong { color: var(--orange); }
.win-chips { position: relative; margin-top: 12px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.win-actions { position: relative; margin-top: 16px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
/* fin de niveau (retours d'Adeline, 4/11) : Rejouer et Carte en icônes rondes, le niveau suivant au milieu */
.win-actions.win-actions-3 { display: flex; align-items: flex-start; gap: 12px; margin-bottom: max(6px, env(safe-area-inset-bottom, 0px)); }
.win-actions-3 .btn-cta { flex: 1; min-width: 0; height: 58px; font-size: 20px; }
.win-chev { display: inline-flex; margin-left: 2px; }
.win-ico { flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--soft); font: inherit; cursor: pointer; }
.win-ico > span { width: 58px; height: 58px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--panel); display: grid; place-items: center; }
.win-ico small { font-size: 12px; font-weight: 800; }
.win-actions.one { width: 100%; grid-template-columns: 1fr; }
.star-pop { display: inline-block; animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }

/* ---------- Nouvel ami ---------- */
.screen-friend { align-items: center; text-align: center; padding-top: 28px; padding-bottom: 18px; }
.friend-title { position: relative; margin: 8px 0 0; font-family: var(--f-display); font-weight: 600; font-size: 32px; line-height: 1.1; text-wrap: balance; }
.friend-art { position: relative; flex: 1; min-height: 0; width: 100%; margin-top: 8px; display: flex; align-items: center; justify-content: center; }
.friend-art img { position: relative; height: 100%; max-height: 360px; width: auto; object-fit: contain; animation: float 3s ease-in-out infinite; }
.halo { position: absolute; width: min(80%, 320px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 225, 154, 0.38), rgba(255, 225, 154, 0) 68%); }
.friend-text { position: relative; margin: 10px 0 0; max-width: 34ch; font-size: 15px; line-height: 1.45; color: var(--soft); }
.friend-note { position: relative; margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Puzzle mystère ---------- */
.screen-mystery { padding-bottom: 20px; }
.mz-who { margin: 14px 0 0; text-align: center; font-family: var(--f-display); font-weight: 600; font-size: 21px; text-wrap: balance; }
.mz-area { flex: 1; min-height: 0; margin-top: 12px; display: flex; align-items: center; justify-content: center; }
.mz-hint { margin: 12px auto 0; max-width: 36ch; text-align: center; font-size: 14px; line-height: 1.45; color: var(--soft); }
.mz-friend { align-self: center; margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; font-weight: 800; }
.mz-friend img { width: 36px; height: 36px; object-fit: contain; border-radius: 50%; background: #1F3A5C; }

/* ---------- Album ---------- */
.album-meta { margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.album-meta p { margin: 0; font-size: 15px; font-weight: 800; }
.album-meta .orange { font-size: 13px; color: var(--orange); }
.progress { margin-top: 8px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress div { height: 100%; border-radius: 999px; background: var(--orange); }
.album-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 12px calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 10px var(--gut-r) 28px var(--gut); }
.album-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
.album-item { display: block; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; min-width: 0; }
.album-item figcaption b { font-size: 14px; text-wrap: balance; }
.album-item.locked { cursor: default; }
.slot { aspect-ratio: 1 / 1.95; border-radius: 6px; border: 2px dashed var(--line-2); background: rgba(22, 41, 64, 0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.slot span { font-family: var(--f-display); font-weight: 600; font-size: 40px; color: var(--faint); }
.slot small { font-size: 12px; font-weight: 800; color: var(--faint); }

/* ---------- Compte ---------- */
.acc-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 16px var(--gut-r) 28px var(--gut); }
.acc-profile { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.acc-profile > div { min-width: 0; }
.acc-name { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 22px; }
.acc-sub { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.acc-h { margin: 22px 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.stat b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { margin-left: 2px; font-size: 15px; color: var(--muted); }
.stat span { font-size: 13px; font-weight: 700; color: var(--soft); }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.seg button { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--soft); font-size: 15px; font-weight: 800; cursor: pointer; }
.seg [aria-checked="true"] { background: var(--orange); color: #0E1C2E; }
.reset-confirm { padding: 14px; border-radius: 16px; background: rgba(242, 139, 130, 0.1); border: 1px solid rgba(242, 139, 130, 0.4); }
.reset-confirm p { margin: 0 0 12px; font-weight: 700; line-height: 1.4; }
.reset-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reset-btns .btn { min-height: 48px; padding: 0 10px; font-size: 14px; }

/* ---------- Message éphémère ---------- */
.toast { position: absolute; left: 0; right: 0; bottom: 120px; z-index: 30; width: max-content; max-width: calc(100% - 32px); margin-inline: auto; padding: 10px 16px; border-radius: 999px; background: #FFFFFF; color: #16233B; font-size: 14px; font-weight: 800; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); animation: toast-in 0.2s ease-out; transition: opacity 0.3s; }
.toast.out { opacity: 0; }
.screen-home ~ .toast { bottom: 250px; }

/* ---------- Animations ---------- */
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 6px rgba(255, 154, 61, 0.25), 0 0 22px rgba(255, 154, 61, 0.55); } 50% { box-shadow: 0 0 0 10px rgba(255, 154, 61, 0.12), 0 0 34px rgba(255, 154, 61, 0.8); } }
@keyframes aurora { 0%, 100% { transform: translateX(-14px) skewX(-5deg); opacity: 0.25; } 50% { transform: translateX(14px) skewX(5deg); opacity: 0.45; } }
@keyframes aurora-soft { 0%, 100% { opacity: 0.85; } 50% { opacity: 0.55; } }
@keyframes fall { from { transform: translateY(-20px); } to { transform: translateY(110vh); } }
@keyframes pop { 0% { scale: 0.3; opacity: 0; } 70% { scale: 1.18; opacity: 1; } 100% { scale: 1; opacity: 1; } }
@keyframes appear { from { scale: 0.2; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes pop-tile { 0% { scale: 1; } 50% { scale: 1.16; } 100% { scale: 1; } }
@keyframes shake { 0%, 100% { translate: 0 0; } 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 3px 0; } }
@keyframes card-in { from { opacity: 0; transform: translateY(30px) rotate(-12deg) scale(0.7); } to { opacity: 1; transform: rotate(-3deg); } }
@keyframes hl { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: 0.35; } }
@keyframes heart-up { 0% { opacity: 0; translate: 0 0; } 15% { opacity: 1; } 100% { opacity: 0; translate: 0 -170px; } }
@keyframes snap { 0% { scale: 1.08; } 100% { scale: 1; } }
@keyframes rise { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -40px; } }
@keyframes gift-fall { to { transform: translateY(320px) rotate(14deg); opacity: 0; } }
@keyframes perfect { 0% { opacity: 0; scale: 0.7; } 20% { opacity: 1; scale: 1.1; } 100% { opacity: 0; scale: 1; } }
@keyframes melt { to { scale: 0.2; opacity: 0; } }
@keyframes toast-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
  .snowfall, .map-aurora { display: none; }
}

/* ---------- Garde-robe (façon Bitmoji) ---------- */
.home-side { top: 41%; }
.screen-wardrobe { padding: 0; background: #0E1E34; }
/* 31/10 (planche validée par Simon) : Yuki à gauche (41 % de la largeur), la liste à droite, presque jusqu'en haut */
.wr-stage { position: absolute; left: 0; top: 0; bottom: 0; width: 41%; overflow: hidden; background: radial-gradient(120% 55% at 50% 52%, #2E5680 0%, #1B3658 45%, #0E1F35 100%); }
.wr-bg { position: absolute; inset: 0; background-position: 50% 62%; background-size: cover; }
.wr-bg.scene-laponie { background-image: url("../img/garderobe/scene-laponie.webp"); }
.wr-bg.scene-chalet { background-image: url("../img/garderobe/scene-chalet.webp"); }
/* les décors exceptionnels (6/11, vendus en flocons) */
.wr-bg.scene-japon { background-image: url("../img/garderobe/scene-japon.webp"); }
.wr-bg.scene-venise { background-image: url("../img/garderobe/scene-venise.webp"); }
.wr-bg.scene-egypte { background-image: url("../img/garderobe/scene-egypte.webp"); }
.wr-bg.scene-temple { background-image: url("../img/garderobe/scene-temple.webp"); }
.wr-bg.scene-sanctuaire { background-image: url("../img/garderobe/scene-sanctuaire.webp"); }
.wr-scene-sec { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; font-weight: 800; color: #FFE19A; }
.wr-scene.wr-scene-buy.locked img { filter: none; opacity: 1; }
.scene-buy-img { display: block; width: 120px; aspect-ratio: 0.56; object-fit: cover; margin: 6px auto 10px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.wr-fit { position: absolute; inset: 0; transition: transform 0.35s ease; }
.wr-fit.zoom { transform: scale(1.7); }
.dr { position: absolute; display: block; aspect-ratio: 768 / 1376; }
.dr-l { position: absolute; display: block; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.dr-base { inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent); }
.dr-l.pop { animation: wr-pop 0.28s ease-out; }
@keyframes wr-pop { from { opacity: 0; transform: translateY(-6%) scale(1.06); } to { opacity: 1; transform: none; } }
.wr-head { position: absolute; z-index: 5; top: 12px; left: var(--gut); right: var(--gut-r); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wr-hist { display: flex; gap: 8px; }
.wr-hist .round:disabled { opacity: 0.45; }
.wr-save { min-height: 44px; padding: 0 18px; border-radius: 999px; background: #FFFFFF; color: #16233B; font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.wr-flakes { position: absolute; z-index: 5; top: 66px; left: var(--gut); cursor: pointer; gap: 6px; padding: 5px 5px 5px 10px; color: var(--ink); font-size: 15px; }
.wr-flakes b { font-size: 15px; }
.wr-plus { width: 22px; height: 22px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; }
.wr-colors { position: absolute; z-index: 5; top: 118px; left: calc(41% - 50px); display: flex; flex-direction: column; gap: 9px; padding: 8px 6px; border-radius: 999px; background: rgba(15, 29, 46, 0.78); border: 1px solid rgba(142, 197, 255, 0.25); }
.wr-swatch { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.85); background: var(--sw, #F2F6FB); cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.wr-swatch-img { background-color: #F2F6FB; background-size: 130%; background-position: center; background-repeat: no-repeat; }
.wr-swatch.on { outline: 3px solid #FFFFFF; outline-offset: 2px; box-shadow: 0 0 0 5px rgba(15, 29, 46, 0.9); }
.wr-caption { position: absolute; z-index: 5; left: var(--gut); bottom: max(18px, env(safe-area-inset-bottom, 0px)); margin: 0; width: auto; max-width: calc(41% - 24px); padding: 6px 10px; border-radius: 12px; background: rgba(15, 29, 46, 0.84); font-size: 12px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.wr-sheet { position: absolute; z-index: 4; left: 41%; right: 0; bottom: 0; top: 64px; display: flex; flex-direction: column; background: var(--navy); border-radius: 22px 0 0 0; box-shadow: -10px 0 26px rgba(0, 0, 0, 0.4); }
.wr-sheet::before { content: ""; align-self: center; width: 40px; height: 4px; margin: 8px 0 2px; border-radius: 4px; background: var(--line-2); }
.wr-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); padding: 0 6px; }
.wr-tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 8px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-size: 11px; line-height: 1.2; text-align: center; font-weight: 800; cursor: pointer; }
.wr-tabs button.on { color: var(--orange); border-bottom-color: var(--orange); }
.wr-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px max(10px, var(--gut-r)) 0 10px; }
.wr-cats { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px; }
.wr-cat { flex: 0 0 calc(25% - 3px); max-width: none; height: 38px; padding: 0; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--soft); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.wr-cat.on { background: var(--panel); border-color: var(--orange); color: var(--orange); }
.wr-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0; }
.wr-cat-name { flex: 1 0 100%; margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.wr-chip { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.wr-chip.on { background: #FFFFFF; color: #16233B; border-color: #FFFFFF; }
.wr-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: max-content; gap: 8px; padding: 2px 2px 86px; margin: 0 -2px; }
.wr-item, .wr-scene { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 0; border-radius: 16px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; overflow: hidden; text-align: left; }
.wr-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; padding: 8px 8px 0; }
.wr-item.on, .wr-scene.on { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.wr-name { padding: 2px 8px 0; font-size: 12px; font-weight: 800; line-height: 1.2; min-height: 2.4em; }
.wr-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 3px; max-width: calc(100% - 12px); margin: 4px 6px 7px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-price { background: rgba(142, 197, 255, 0.14); color: var(--ink); }
.tag-own { background: var(--mint); color: #0E1C2E; }
.tag-lock { background: rgba(255, 255, 255, 0.12); color: var(--soft); }
.tag-plus { background: var(--gold); color: #0E1C2E; }
.wr-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; }
.wr-empty, .wr-hint { grid-column: 1 / -1; margin: 6px 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.wr-hint { margin: -4px 0 10px; }
.wr-cart b.locked { padding: 7px 10px; }
.screen-wardrobe ~ .toast { bottom: auto; top: 118px; }
.sh-head .chip { color: var(--ink); }
.wr-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2px 0 10px; }
.wr-sec-head p { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.wr-sec-head span { font-size: 13px; font-weight: 800; color: var(--ice); }
.wr-grid-looks { padding-bottom: 70px; }
.wr-look-wrap { position: relative; }
.wr-look { position: relative; width: 100%; aspect-ratio: 0.82; padding: 0; border-radius: 16px; border: 2px solid var(--line); background: linear-gradient(#142a47, #23466C); overflow: hidden; cursor: pointer; display: block; }
.wr-look.on { border-color: var(--orange); }
.wr-look-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-style: dashed; border-color: var(--line-2); background: transparent; color: var(--soft); font-size: 13px; font-weight: 800; }
.wr-look .wr-worn { position: absolute; left: 0; bottom: 0; }
.wr-look-x { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--navy); background: var(--line-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dr-mini { position: absolute; inset: 0; overflow: hidden; }
.dr-mini .dr { width: 128%; left: -14%; top: -20%; }
.wr-scene img { display: block; width: 100%; aspect-ratio: 0.82; object-fit: cover; }
.wr-scene .wr-name { position: absolute; left: 0; right: 0; bottom: 0; min-height: 0; padding: 14px 8px 6px; background: linear-gradient(transparent, rgba(11, 22, 38, 0.92)); }
.wr-scene .wr-tag { position: absolute; top: 4px; left: 0; }
.wr-scene.locked img { filter: grayscale(0.6) brightness(0.55); }
.wr-cart { position: absolute; z-index: 6; left: auto; right: max(8px, var(--gut-r) - 8px); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 18px; border: 0; border-radius: 999px; background: #FFFFFF; color: #16233B; font-size: 14px; font-weight: 800; white-space: nowrap; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); cursor: pointer; }
.wr-cart b { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; background: var(--orange); font-size: 15px; }
.cart-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--panel); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cart-txt b { font-size: 16px; }
.cart-txt small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.cart-locked .cart-txt b { color: var(--soft); }
.cart-price { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 16px; }
.cart-del { flex: none; width: 40px; height: 40px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 17px; font-weight: 800; }
.cart-total b { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-size: 26px; }
.cart-note { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.cart-note.warn { color: var(--coral); font-weight: 800; }
.cart-pay { margin-top: 14px; gap: 8px; }
.cart-pay:disabled { opacity: 0.5; box-shadow: none; }

/* ---------- Boutique ---------- */
.screen-shop { padding: 0; background: #F4EEE3; color: var(--paper-ink); }
.sh-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 28px; }
.sh-top { position: relative; height: 270px; background: linear-gradient(#1D3352, #22406A); overflow: hidden; }
.sh-awning { position: absolute; left: 0; right: 0; top: 0; height: 64px; background: repeating-linear-gradient(90deg, #9DCBFF 0 34px, #FFFFFF 34px 68px); border-radius: 0 0 20px 20px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12); }
.sh-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 12px var(--gut-r) 0 var(--gut); }
.sh-title { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 30px; color: #FFFFFF; text-shadow: 0 2px 0 #2F5D96, 1px 0 0 #2F5D96, -1px 0 0 #2F5D96, 0 -1px 0 #2F5D96, 0 0 14px rgba(29, 51, 82, 0.7); }
.sh-x { background: var(--coral); border-color: #FFFFFF; border-width: 2px; }
.sh-yuki { position: absolute; left: 50%; bottom: 18px; height: 190px; transform: translateX(-50%); }
.sh-snow { position: absolute; left: 6%; right: 6%; bottom: 6px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.sh-snow span { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #CFE6FF, #6FA6E8); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 0 rgba(15, 29, 46, 0.25); }
.sh-plus { display: flex; align-items: center; gap: 12px; margin: 16px var(--gut-r) 0 var(--gut); padding: 14px; border-radius: 18px; background: #16233B; color: #F2F6FB; }
.sh-plus div { flex: 1; min-width: 0; }
.sh-plus p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--soft); }
.sh-plus .sh-plus-t { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; font-family: var(--f-display); font-weight: 600; font-size: 20px; color: var(--gold); }
.sh-sec { width: max-content; max-width: calc(100% - 40px); margin: 22px auto 12px; padding: 6px 26px; border-radius: 12px; font-family: var(--f-display); font-weight: 600; font-size: 20px; color: #FFFFFF; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); }
.sec-violet { background: #8B6CE8; } .sec-coral { background: #F0837A; } .sec-blue { background: #4F86D8; }
.sh-card { position: relative; margin: 0 var(--gut-r) 12px var(--gut); border-radius: 18px; background: #FFFFFF; box-shadow: 0 4px 0 rgba(22, 35, 59, 0.12); overflow: hidden; }
.sh-off { opacity: 0.8; }
.sh-flag { position: absolute; top: 0; right: 0; padding: 4px 12px; border-radius: 0 0 0 12px; background: #FFE19A; font-size: 12px; font-weight: 800; }
.sh-row { display: flex; justify-content: space-around; align-items: flex-end; gap: 6px; padding: 26px 10px 10px; background: #FBF7EF; }
.sh-it { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.sh-it img { width: 58px; height: 58px; object-fit: contain; }
.sh-it .sh-card { width: 42px; height: 58px; object-fit: cover; margin: 0; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.sh-it small { font-size: 12px; font-weight: 800; color: var(--paper-sub); text-align: center; }
.sh-ico { width: 58px; height: 58px; border-radius: 50%; background: #E8F2FF; display: flex; align-items: center; justify-content: center; }
.sh-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 12px 16px; background: #16233B; color: #F2F6FB; }
.sh-foot b { font-size: 16px; }
.sh-buy { flex: none; min-width: 96px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--orange); color: #16233B; font-size: 17px; font-weight: 800; box-shadow: 0 4px 0 var(--orange-deep); cursor: pointer; }
.sh-buy-gold { background: var(--gold); box-shadow: 0 4px 0 var(--gold-deep); }
.sh-noads { display: flex; align-items: center; gap: 12px; padding: 14px; }
.sh-noads p { flex: 1; margin: 0; font-size: 13px; line-height: 1.4; color: var(--paper-sub); }
.sh-noads p b { display: block; color: #E2564C; font-size: 15px; }
.sh-nopub { flex: none; width: 56px; height: 56px; border-radius: 50%; border: 4px solid #E2564C; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #16233B; background: linear-gradient(135deg, transparent 46%, #E2564C 46% 54%, transparent 54%); }
.sh-line { display: flex; align-items: center; gap: 12px; margin: 0 var(--gut-r) 10px var(--gut); padding: 10px 12px; border-radius: 16px; background: #FFFFFF; box-shadow: 0 3px 0 rgba(22, 35, 59, 0.1); }
.sh-pile { width: 52px; height: 44px; border-radius: 22px; background: radial-gradient(circle at 35% 30%, #CFE6FF, #6FA6E8); display: flex; align-items: center; justify-content: center; }
.sh-qty { flex: 1; display: flex; flex-direction: column; }
.sh-qty b { font-family: var(--f-display); font-weight: 600; font-size: 21px; }
.sh-qty small { align-self: flex-start; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: #7DDBA3; font-size: 11px; font-weight: 800; }
.sh-rules { margin: 18px var(--gut-r) 0 var(--gut); font-size: 12px; line-height: 1.5; color: var(--paper-sub); }
@media (max-height: 640px) { .home-side { top: 37%; } }

/* ---------- Croissance : paliers, maisons, retour ---------- */
.home-palier { cursor: pointer; display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 6px 14px 7px; color: var(--orange); font: inherit; }
.home-palier p { text-align: center; }
.pal-bar { display: block; height: 5px; border-radius: 3px; background: rgba(255, 154, 61, 0.22); overflow: hidden; }
.pal-bar i { display: block; height: 100%; border-radius: 3px; background: var(--orange); }
.home-still { object-fit: cover; }
.home-breathe { animation: breathe 14s ease-in-out infinite alternate; transform-origin: 55% 60%; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.05); } }
.home-evening { background: #13274A; }
.home-evening .home-still { transform: translateY(-21%); -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.screen-palier, .screen-retour { padding-top: 22px; padding-bottom: 18px; background: radial-gradient(120% 70% at 50% 45%, #22406A 0%, #13274A 55%, #0F1D2E 100%); }
.pal-top, .ret-top { text-align: center; }
.pal-title { margin: 4px 0 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(34px, 11vw, 46px); line-height: 1.05; }
.pal-sub { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: var(--soft); }
.pal-media { flex: 1; min-height: 120px; position: relative; margin: 8px calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); overflow: hidden; }
.pal-media video, .pal-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 82%, transparent); }
.pal-card { position: relative; z-index: 1; margin-top: -8px; padding: 12px 14px; border-radius: 18px; background: rgba(22, 41, 64, 0.92); border: 1px solid var(--line-2); }
.pal-h { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pal-row { display: flex; align-items: center; gap: 12px; }
.pal-row img { flex: none; width: 54px; height: 72px; border-radius: 10px; object-fit: cover; }
.pal-row div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pal-row b { font-size: 16px; line-height: 1.25; }
.pal-row span:not(.pill):not(.ret-gift) { font-size: 13px; line-height: 1.35; color: var(--muted); }
.pal-row .pal-bonus { color: var(--gold) !important; font-weight: 800; }
.pal-cta { margin-top: 14px; }
.ret-media img { object-position: 50% 40%; }
.ret-gift { flex: none; width: 54px; height: 54px; border-radius: 14px; background: #E8F2FF; display: flex; align-items: center; justify-content: center; }
.ret-note { margin: 10px 4px 0; font-size: 13px; line-height: 1.45; text-align: center; color: var(--muted); }
.houses-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 6px var(--gut-r) 28px var(--gut); }
.houses-hint { margin: 4px 0 14px; font-size: 14px; line-height: 1.45; color: var(--soft); }
.houses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.house { position: relative; display: flex; flex-direction: column; padding: 0; border-radius: 18px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); text-align: left; overflow: hidden; cursor: pointer; }
.house img { display: block; width: 100%; aspect-ratio: 0.8; object-fit: cover; }
.house.on { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.house.locked img { filter: grayscale(0.7) brightness(0.45); }
.house-lock { position: absolute; top: 4px; left: 0; }
.house-txt { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; }
.house-txt b { font-size: 14px; }
.house-txt small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.stats-3 { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.stat-btn { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.acc-plus { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: var(--panel); border: 1px solid rgba(244, 184, 96, 0.35); }
.acc-plus div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-plus b { font-size: 15px; }
.acc-plus span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.acc-plus .sh-buy { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; }

/* ---------- Yuki+ ---------- */
.screen-plus { padding: 0; }
.plus-scroll { flex: 1; min-height: 0; overflow-y: auto; position: relative; }
.plus-hero { position: relative; height: 42vh; min-height: 220px; max-height: 380px; overflow: hidden; }
.plus-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.plus-x { position: absolute; top: 12px; left: var(--gut); z-index: 2; }
.plus-body { position: relative; margin-top: -54px; padding: 0 var(--gut-r) 26px var(--gut); }
.plus-title { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 40px; line-height: 1; }
.plus-tag { margin: 8px 0 0; font-size: 15px; line-height: 1.4; color: var(--soft); }
.plus-perks { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.plus-perks li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.plus-perks svg { flex: none; margin-top: 1px; }
.plus-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 14px; }
.plan { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; }
.plan.on { border-color: var(--ice); background: #1B3557; }
.plan b { font-size: 14px; color: var(--soft); }
.plan strong { font-family: var(--f-display); font-weight: 600; font-size: 26px; }
.plan small { font-size: 12px; color: var(--muted); }
.plan em { margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 800; color: var(--gold); }
.plus-fine { margin: 10px 2px 0; font-size: 12px; line-height: 1.45; text-align: center; color: var(--muted); }
.cart-plus { gap: 8px; color: var(--gold); border-color: rgba(244, 184, 96, 0.45); }

/* ---------- Aventures : voyages de Yuki et tour du monde ---------- */
.side-col { position: absolute; z-index: 4; top: 41%; display: flex; flex-direction: column; gap: 10px; }
.side-col .side-btn, .side-col .home-side { position: relative; top: auto; left: auto; right: auto; }
.side-dot { position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); border: 2px solid #FFFFFF; }
.side-gold { border-color: #F4D58A; }
@media (max-height: 640px) {
  .side-col { top: 35%; gap: 6px; }
  .side-col .side-ico { width: 46px; height: 46px; border-radius: 14px; }
  .side-col .side-ico svg { width: 23px; height: 23px; }
}
/* Cartes brillantes (7/11, Simon : « brillantes vraiment ») : cadre d'or qui coule, bande arc-en-ciel et paillettes sur l'image,
   éclat de lumière qui traverse la carte, petites étoiles qui scintillent. La grande carte suit le doigt et l'inclinaison du
   téléphone (world.js, shine) : variables --fx/--fy (reflet), --gx/--gy (point de lumière), rotation 3D par la propriété « rotate ». */
.pc-shiny { background: linear-gradient(115deg, #F6DE9A 0%, #E2B04E 16%, #FFF7DC 30%, #D39A36 44%, #FBE6A8 58%, #C48A2C 74%, #FFF1C4 88%, #E2B04E 100%); background-size: 320% 320%;
  animation: pc-gold 6s ease-in-out infinite alternate; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 22px rgba(255, 210, 110, 0.38); }
.pc-shiny figcaption { color: #4A3410; }
.pc-shiny figcaption span { color: #6E5524; }
.pc-badge-gold { background: #FFF3CC; color: #6E4A0E; box-shadow: 0 0 0 1px #D8A23E, 0 0 10px rgba(255, 220, 140, 0.8); }
.pc-badge-r { left: auto; right: 10px; }
.pc-fx { position: absolute; left: 6px; right: 6px; top: 6px; aspect-ratio: 520 / 932; border-radius: 2px; pointer-events: none; }
/* bande arc-en-ciel qui glisse (et un voile irisé léger partout) */
.pc-foil { background:
    linear-gradient(115deg, transparent 22%, rgba(255, 110, 175, 0.95) 32%, rgba(255, 214, 110, 0.95) 38%, rgba(140, 255, 170, 0.95) 44%, rgba(100, 210, 255, 0.95) 50%, rgba(180, 140, 255, 0.95) 56%, rgba(255, 110, 175, 0.9) 62%, transparent 72%),
    repeating-linear-gradient(115deg, rgba(255, 120, 180, 0.35) 0%, rgba(255, 220, 120, 0.35) 7%, rgba(130, 255, 180, 0.35) 14%, rgba(110, 200, 255, 0.35) 21%, rgba(190, 150, 255, 0.35) 28%, rgba(255, 120, 180, 0.35) 35%);
  background-size: 300% 300%, 200% 200%; background-position: var(--fx, 0%) var(--fy, 0%), var(--fy, 0%) var(--fx, 0%);
  mix-blend-mode: color-dodge; opacity: 0.42; animation: pc-foil 5.5s ease-in-out infinite alternate; animation-delay: var(--sd, 0s); }
/* paillettes : deux couches de la même texture, à deux tailles, qui se croisent */
.pc-glit { background-size: 150px 150px, 205px 205px; background-position: var(--fx, 0%) var(--fy, 0%), calc(100% - var(--fy, 0%)) var(--fx, 0%);
  mix-blend-mode: color-dodge; opacity: 0.75; animation: pc-glit 3.2s ease-in-out infinite alternate; animation-delay: var(--sd, 0s);
  /* les paillettes s'allument surtout là où tombe la lumière */
  -webkit-mask-image: radial-gradient(circle at var(--gx, 50%) var(--gy, 45%), #000 0%, rgba(0, 0, 0, 0.6) 28%, rgba(0, 0, 0, 0.1) 62%);
  mask-image: radial-gradient(circle at var(--gx, 50%) var(--gy, 45%), #000 0%, rgba(0, 0, 0, 0.6) 28%, rgba(0, 0, 0, 0.1) 62%);
  -webkit-mask-size: 200% 200%; mask-size: 200% 200%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
/* point de lumière */
.pc-glare { background: radial-gradient(circle at var(--gx, 30%) var(--gy, 22%), rgba(255, 255, 255, 0.8) 0%, rgba(255, 250, 230, 0.35) 22%, rgba(255, 255, 255, 0) 52%);
  mix-blend-mode: overlay; animation: pc-glare 6s ease-in-out infinite alternate; animation-delay: var(--sd, 0s); }
/* éclat qui traverse toute la carte, cadre compris */
.pc-sweep { position: absolute; inset: 0; border-radius: 4px; overflow: hidden; pointer-events: none; }
.pc-sweep::before { content: ""; position: absolute; top: -25%; bottom: -25%; left: -70%; width: 45%; transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 35%, #FFFFFF 50%, rgba(255, 255, 255, 0.5) 65%, rgba(255, 255, 255, 0) 100%);
  mix-blend-mode: overlay; animation: pc-sweep 4.6s ease-in-out infinite; animation-delay: var(--sd, 0s); }
/* étoiles qui scintillent */
.pc-tw { position: absolute; inset: 0; pointer-events: none; }
.pc-tw i { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; opacity: 0; transform: scale(0.2);
  background: radial-gradient(circle, #FFFFFF 0 18%, #FFF4C2 32%, rgba(255, 236, 170, 0) 70%);
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  filter: drop-shadow(0 0 3px #FFFFFF); animation: pc-tw 2.8s ease-in-out infinite; }
.pc-tw i:nth-child(1) { left: 7%; top: 4%; animation-delay: calc(var(--sd, 0s) + 0.2s); }
.pc-tw i:nth-child(2) { left: 90%; top: 14%; width: 24px; height: 24px; margin: -12px 0 0 -12px; animation-delay: calc(var(--sd, 0s) + 1.1s); }
.pc-tw i:nth-child(3) { left: 22%; top: 58%; width: 14px; height: 14px; margin: -7px 0 0 -7px; animation-delay: calc(var(--sd, 0s) + 1.9s); }
.pc-tw i:nth-child(4) { left: 78%; top: 66%; animation-delay: calc(var(--sd, 0s) + 0.7s); }
.pc-tw i:nth-child(5) { left: 94%; top: 96%; width: 22px; height: 22px; margin: -11px 0 0 -11px; animation-delay: calc(var(--sd, 0s) + 2.4s); }
.pc-big .pc-tw i { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.pc-big .pc-tw i:nth-child(2), .pc-big .pc-tw i:nth-child(5) { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
@keyframes pc-gold { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes pc-foil { from { background-position: 0% 0%, 0% 0%; } to { background-position: 100% 100%, 100% 60%; } }
@keyframes pc-glit { from { opacity: 0.5; background-position: 0 0, 40px 70px; -webkit-mask-position: 100% 100%; mask-position: 100% 100%; }
  to { opacity: 0.95; background-position: 18px 26px, 12px 40px; -webkit-mask-position: 0% 0%; mask-position: 0% 0%; } }
@keyframes pc-glare { from { background-position: -30% -20%; } to { background-position: 30% 25%; } }
@keyframes pc-sweep { 0%, 55% { left: -70%; } 100% { left: 130%; } }
@keyframes pc-tw { 0%, 60%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); } 75% { opacity: 1; transform: scale(1) rotate(45deg); } 90% { opacity: 0; transform: scale(0.4) rotate(90deg); } }
/* la grande carte, menée par le doigt ou l'inclinaison : plus d'animation, les variables suivent le geste */
.viewer, .voy-card { perspective: 900px; }
.pc-live { transition: rotate 0.12s ease-out; }
.pc-live .pc-foil, .pc-live .pc-glit, .pc-live .pc-glare { animation: none; }
.pc-live .pc-foil { opacity: calc(0.2 + var(--fa, 0.3)); }
.pc-live .pc-glit { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-position: 0 0; mask-position: 0 0; opacity: 0.9; }
.pc-live .pc-glare { background-size: 100% 100%; }
@media (prefers-reduced-motion: reduce) {
  .pc-shiny, .pc-foil, .pc-glit, .pc-glare, .pc-sweep::before, .pc-tw i { animation: none; }
  .pc-foil { background-position: 50% 50%, 50% 50%; }
  .pc-tw i { opacity: 0.85; transform: scale(0.8); }
}
.voy-scroll, .wd-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 8px calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 8px var(--gut-r) 28px var(--gut); }
.voy-card { display: flex; justify-content: center; }
.pc-voy { width: min(60vw, 250px, calc((100vh - 360px) * 0.53)); width: min(60vw, 250px, calc((100dvh - 360px) * 0.53)); min-width: 150px; --rot: -2deg; }
.pc-voy figcaption b { font-size: 16px; text-wrap: balance; }
.voy-story { max-width: 34ch; margin: 16px auto 0; font-size: 15px; line-height: 1.45; text-align: center; color: var(--soft); text-wrap: pretty; }
.voy-btns { display: flex; gap: 10px; margin-top: 16px; }
.voy-btns .btn { flex: 1; min-width: 0; min-height: 50px; padding: 0 10px; gap: 8px; font-size: 16px; }
.voy-album-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; }
.voy-album-head p { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.voy-link { min-height: 40px; padding: 0; border: 0; background: none; color: var(--orange); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.voy-strip { display: flex; gap: 10px; overflow-x: auto; margin: 2px calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 4px var(--gut-r) 8px var(--gut); scrollbar-width: none; }
.voy-strip::-webkit-scrollbar { display: none; }
.voy-thumb { flex: 0 0 74px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 11px; font-weight: 800; line-height: 1.15; text-align: center; cursor: pointer; }
.voy-thumb img { display: block; width: 74px; height: 94px; object-fit: cover; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.85); }
.voy-thumb span { max-width: 74px; text-wrap: balance; }
.voy-next { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); text-align: center; }
.voy-next svg { flex: none; }
.voy-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.voy-empty img { width: min(64vw, 250px); aspect-ratio: 0.8; object-fit: cover; border-radius: 22px; border: 2px solid rgba(255, 255, 255, 0.2); }
.voy-empty p { max-width: 34ch; margin: 0; font-size: 15px; line-height: 1.45; text-align: center; color: var(--soft); }
.wd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wd-tile { position: relative; aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border-radius: 18px; border: 2px solid rgba(255, 255, 255, 0.18); background: var(--panel); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wd-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wd-tile.done { border-color: #F4D58A; box-shadow: 0 0 0 1px #F4D58A; }
.wd-tile .pc-badge { left: 8px; top: 8px; }
.wd-txt { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 1px; padding: 28px 10px 9px; background: linear-gradient(to bottom, rgba(15, 29, 46, 0), rgba(15, 29, 46, 0.92) 55%); }
.wd-txt b { font-family: var(--f-display); font-weight: 600; font-size: 17px; line-height: 1.1; }
.wd-txt small { font-size: 12px; font-weight: 700; color: var(--muted); }
.wd-next, .wd-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px; text-align: center; cursor: default; }
.wd-next { border: 2px dashed var(--orange); background: rgba(22, 41, 64, 0.7); }
.wd-q { font-family: var(--f-display); font-weight: 600; font-size: 46px; line-height: 1; color: var(--orange); }
.wd-next b { font-size: 15px; }
.wd-next small { font-size: 12px; font-weight: 700; color: var(--muted); }
.wd-empty { border: 2px dashed var(--line-2); background: rgba(22, 41, 64, 0.35); }
.wd-empty small { font-size: 12px; font-weight: 800; color: var(--faint); }
.wd-hint { margin: 16px 0 0; }
.slot-world { aspect-ratio: 1 / 1.95; }
.sheet-share { position: absolute; left: var(--gut); top: 16px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--orange); color: #0E1C2E; font: inherit; font-size: 15px; font-weight: 800; box-shadow: 0 4px 0 var(--orange-deep); cursor: pointer; }
.modal-daily .eyebrow { padding-right: 52px; }
@media (max-height: 640px) { .pc-daily { width: min(38vw, 150px); } }
.share-img { display: block; width: min(54vw, 220px); margin: 14px auto 16px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.daily-trip { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -4px auto 14px; font-size: 14px; }
.daily-trip svg { flex: none; }
.acc-pass { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: var(--panel); border: 1px solid rgba(125, 219, 163, 0.35); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.acc-pass-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-pass-txt b { font-size: 15px; }
.acc-pass-txt span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.acc-stamps { display: flex; flex: none; padding-left: 10px; }
.acc-stamps img { width: 30px; height: 40px; margin-left: -10px; object-fit: cover; border-radius: 5px; border: 2px solid #FFFFFF; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transform: rotate(var(--r)); }

/* ---------- Bienvenue et objectif perso ---------- */
.eyebrow-blue { color: #8EC5FF; }
.screen-welcome { padding: 0; background: radial-gradient(110% 60% at 50% 46%, #1D3A62 0%, #12243C 55%, #0F1D2E 100%); }
.wel-top { position: relative; z-index: 2; flex: none; margin-top: max(44px, 7vh); padding: 0 calc(var(--gut-r) + 8px) 0 calc(var(--gut) + 8px); }
.wel-title { margin: 10px 0 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 9.6vw, 40px); line-height: 1.08; text-wrap: balance; }
.wel-text { max-width: 30ch; margin: 12px 0 0; font-size: 17px; line-height: 1.45; color: var(--soft); }
.wel-yuki { position: relative; flex: 1; min-height: 0; display: flex; justify-content: center; align-items: center; padding: 14px 0 6px; }
.wel-yuki::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(78vw, 330px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(90, 150, 230, 0.5), rgba(90, 150, 230, 0)); }
.wel-yuki img { position: relative; height: 100%; max-height: 300px; width: auto; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.4)); }
.wel-foot { position: relative; z-index: 2; flex: none; padding: 4px var(--gut-r) max(24px, calc(env(safe-area-inset-bottom, 0px) + 14px)) var(--gut); display: flex; flex-direction: column; gap: 14px; }
.wel-facts { display: flex; justify-content: center; gap: 10px; }
.wel-facts span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--panel); border: 1.5px solid var(--line-2); font-size: 15px; font-weight: 800; color: var(--ink); }
.screen-goal { padding: 0; }
.goal-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px var(--gut-r) 12px var(--gut); display: flex; flex-direction: column; }
.goal-back { flex: none; position: relative; z-index: 2; }
.goal-title { position: relative; margin: 18px 0 14px; font-family: var(--f-display); font-weight: 600; font-size: clamp(24px, 7.2vw, 30px); line-height: 1.12; text-wrap: balance; }
.goal-yuki { position: relative; flex: 1; min-height: 110px; display: flex; justify-content: center; align-items: center; padding: 14px 0 8px; }
.goal-yuki::before { content: ""; position: absolute; left: 50%; top: 50%; width: 240px; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(90, 150, 230, 0.42), rgba(90, 150, 230, 0)); }
.goal-yuki img { position: relative; height: 100%; max-height: 200px; width: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4)); }
.goal-sec { flex: none; margin: 6px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ice); }
.goal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.goal-opt { min-width: 0; min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 12px; border: 1px solid #24395A; border-radius: 16px; background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; text-align: left; cursor: pointer; }
.goal-opt svg { flex: none; }
.goal-opt.on { border: 2px solid #8EC5FF; padding: 5px 9px 5px 11px; background: #1D3352; font-weight: 800; }
.goal-remind { flex: none; display: flex; align-items: center; gap: 12px; margin-top: 0; padding: 8px 10px 8px 14px; border-radius: 16px; background: var(--panel); border: 1px solid #24395A; }
.goal-remind svg { flex: none; }
.goal-remind div { flex: 1; min-width: 0; }
.goal-remind p { margin: 2px 0 0; font-size: 13px; line-height: 1.3; color: var(--muted); }
.goal-remind b { display: block; font-size: 17px; font-weight: 800; }
.goal-change { flex: none; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #1D3352; color: #8EC5FF; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.goal-foot { flex: none; padding: 10px var(--gut-r) 18px var(--gut); }
.goal-foot p { margin: 8px 0 0; font-size: 13px; text-align: center; color: var(--muted); }
.goal-grid-sheet { margin: 16px 0 18px; }
.time-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 12px; }
.time-chip { min-height: 48px; border: 1px solid #24395A; border-radius: 14px; background: var(--panel); color: var(--ink); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.time-chip:last-child { grid-column: 1 / -1; font-size: 15px; }
.time-chip.on { border: 2px solid #8EC5FF; background: #1D3352; }
.remind-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 18px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.remind-note svg { flex: none; margin-top: 1px; }
/* la ligne de l'objectif dans la maison */
.goal-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 5px 6px 5px 6px; border-radius: 16px; border: 1px solid rgba(142, 197, 255, 0.28); background: rgba(15, 29, 46, 0.84); }
.goal-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.goal-row-pick { padding-left: 6px; }
.goal-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #1D3352; display: flex; align-items: center; justify-content: center; }
.goal-row.done .goal-ico { background: var(--mint); }
.goal-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.goal-txt b { font-size: 15px; font-weight: 800; line-height: 1.2; }
.goal-txt small { font-size: 12px; font-weight: 700; color: var(--muted); }
.goal-row.done .goal-txt small { color: var(--mint); }
.goal-btn { flex: none; min-height: 42px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--orange); color: #0E1C2E; font: inherit; font-size: 14px; font-weight: 800; box-shadow: 0 3px 0 var(--orange-deep); cursor: pointer; }
.goal-btn-ghost { background: #1D3352; color: #8EC5FF; border: 1px solid var(--line-2); box-shadow: none; }
.goal-check { flex: none; width: 34px; height: 34px; margin-right: 4px; border-radius: 50%; background: var(--mint); display: flex; align-items: center; justify-content: center; }
.side-col.tight .side-lbl { display: none; }
.home-side.corner { position: absolute; z-index: 4; width: 42px; }
.home-side.corner .side-lbl { display: none; }
.home-side.corner .side-ico { width: 42px; height: 42px; border-radius: 13px; }
.home-side.corner .side-ico svg { width: 22px; height: 22px; }
.side-col.tight { gap: 8px; }
@media (max-height: 700px) {
  .goal-row { min-height: 46px; padding-top: 3px; padding-bottom: 3px; }
  .goal-ico { width: 36px; height: 36px; }
  .goal-btn { min-height: 40px; }
}
/* Mon compte : objectif et rappel */
.acc-list { margin-top: 12px; border-radius: 18px; background: var(--panel); border: 1px solid #24395A; overflow: hidden; }
.acc-row { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 14px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.acc-row + .acc-row { border-top: 1px solid #24395A; }
.acc-row svg { flex: none; }
.acc-row-l { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; font-weight: 700; }
.acc-row-l small { font-size: 12px; font-weight: 700; color: var(--muted); }
.acc-row b { min-width: 0; font-size: 14px; font-weight: 800; color: var(--soft); text-align: right; }
@media (max-height: 640px) {
  .goal-txt small { display: none; }
  .side-col.tight .side-ico { width: 42px; height: 42px; border-radius: 13px; }
}
/* ---------- Moment Yuki : « Comment tu te sens ? » ---------- */
.home-ask { border: 0; font-family: var(--f-body); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ask-pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: var(--orange); color: #0E1C2E; font-size: 12px; font-weight: 800; }
.mood-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 6px; }
.mood-opt { min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid #24395A; border-radius: 18px; background: var(--panel); color: var(--ink); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.mood-opt:active { background: #1F3A5C; }
.mood-reply { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; padding-right: 44px; }
.mood-reply img { flex: none; width: min(34vw, 140px); aspect-ratio: 480 / 860; object-fit: cover; border-radius: 18px; background: #1D3352; }
.mood-reply div { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.mood-text { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 21px; line-height: 1.25; text-wrap: balance; }
.mood-care { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border-radius: 14px; background: rgba(245, 154, 208, 0.08); border: 1px solid rgba(245, 154, 208, 0.3); font-size: 14px; line-height: 1.4; color: var(--soft); }
.mood-care svg { flex: none; margin-top: 2px; }
@media (max-height: 640px) { .mood-reply img { width: min(28vw, 110px); } .mood-opt { min-height: 80px; } }

/* ---------- Bouton principal de la maison : Hiberner et Soirée à côté ---------- */
.cta-row { display: flex; gap: 8px; align-items: stretch; }
/* maison (retours d'Adeline, 4/11) : « Bonne nuit » à côté de l'avatar, Voyages en deuxième bouton, « Aujourd'hui » en feuille */
.night-btn { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 auto 0 10px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.night-btn > span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 29, 46, 0.82); border: 1.5px solid var(--gold); }
.night-btn small { position: absolute; top: 100%; left: 50%; transform: translate(-50%, 2px); font-size: 11px; font-weight: 800; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.6); }
.home-voyage { position: relative; width: 100%; min-height: 52px; background: rgba(15, 29, 46, 0.86); border: 1.5px solid var(--line-2); color: var(--ink); font-size: 17px; }
.home-voyage .side-dot { top: 8px; right: 12px; }
.badge-today { background: var(--orange); color: #16233B; }
.badge-today.all { background: var(--mint); }
.today-body { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.today-body .home-today { display: none; }
.today-focus { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px 10px 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.today-focus span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.today-focus b { font-size: 16px; font-weight: 800; }
.today-focus small { font-size: 13px; color: var(--muted); }
.today-focus em { font-style: normal; font-size: 15px; font-weight: 800; color: var(--ice); padding: 9px 14px; border: 1.5px solid var(--line-2); border-radius: 14px; }
.cta-row .btn-cta { flex: 1; min-width: 0; padding: 0 12px; }
.mini-btn { flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border-radius: 18px; border: 1px solid rgba(142, 197, 255, 0.35); background: rgba(15, 29, 46, 0.9); color: var(--ink); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.mini-btn:active { background: #1F3A5C; }
@media (max-width: 360px) { .mini-btn { width: 54px; font-size: 10px; } .cta-row .btn-cta { font-size: 20px; gap: 6px; } }

/* ---------- Mode hibernation et soirée avec Yuki ---------- */
.screen-hibernation, .screen-soiree { padding: 0; }
.calm-media { position: absolute; left: 0; right: 0; top: 0; height: 44vh; height: 44dvh; max-height: 400px; overflow: hidden; }
.calm-media video, .calm-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.calm-media::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 130px; background: linear-gradient(to bottom, rgba(15, 29, 46, 0.9), rgba(15, 29, 46, 0)); }
.calm-media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 150px; background: linear-gradient(to bottom, rgba(15, 29, 46, 0), #0F1D2E); }
.calm-head { position: relative; z-index: 2; padding: 14px var(--gut-r) 0 var(--gut); }
.calm-clock { flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--panel); border: 1px solid rgba(244, 184, 96, 0.35); font-weight: 800; font-size: 14px; }
.calm-body { position: relative; z-index: 2; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; margin-top: max(120px, calc(44vh - 150px)); margin-top: max(120px, calc(44dvh - 150px)); padding: 0 var(--gut-r) 18px var(--gut); }
/* mode hibernation : « Comment ça marche » en 3 étapes */
.hib-how { margin: 0 0 14px; padding: 12px 14px; border-radius: 18px; background: rgba(15, 29, 46, 0.86); border: 1px solid rgba(142, 197, 255, 0.25); }
.hib-how-t { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ice); }
.hib-how ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hib-how li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: var(--ink); }
@media (max-height: 640px) { .hib-how { order: 2; margin: 14px 0 0; } .calm-foot { order: 3; } }   /* petit téléphone : la durée d'abord */
.hib-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: #0E1C2E; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.calm-q { margin: 0 0 10px; text-align: center; font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.calm-intro { margin: 12px auto 0; max-width: 34ch; text-align: center; font-size: 15px; line-height: 1.45; color: var(--soft); }
/* le bouton du bas reste toujours visible ; le contenu défile dessous */
.calm-foot { position: sticky; bottom: -18px; z-index: 2; margin: auto calc(-1 * var(--gut-r)) -18px calc(-1 * var(--gut)); padding: 22px var(--gut-r) 18px var(--gut); display: flex; flex-direction: column; gap: 10px; background: linear-gradient(to bottom, rgba(15, 29, 46, 0), var(--navy) 26px); }
.calm-foot > p { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.calm-foot .btn-ghost { width: 100%; }
.btn-stop { color: var(--coral); border-color: var(--line-2); }
.hib-durs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hib-dur { min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #24395A; border-radius: 18px; background: rgba(22, 41, 64, 0.95); color: var(--ink); font-family: var(--f-display); font-size: 28px; font-weight: 600; line-height: 1; cursor: pointer; }
.hib-dur small { font-family: var(--f-body); font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 3px; }
.hib-dur.on { border: 2px solid #8EC5FF; background: #1D3352; }
.hib-ring { position: relative; flex: none; width: 190px; height: 190px; margin: 0 auto; }
.hib-ring svg { display: block; }
.hib-time { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hib-time b { font-family: var(--f-display); font-weight: 600; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.hib-time span { margin-top: 4px; font-size: 13px; color: var(--muted); }
.hib-build { margin-top: 16px; padding: 12px 14px; border-radius: 18px; background: var(--panel); border: 1px solid #24395A; }
.hib-build-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hib-build-top p { margin: 0; font-weight: 800; font-size: 15px; }
.hib-build-top span { flex: none; font-size: 12px; font-weight: 800; color: var(--gold); }
.hib-build small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.progress-gold div { background: var(--gold); }
.hib-result { padding: 14px; border-radius: 20px; background: rgba(22, 41, 64, 0.95); border: 1px solid rgba(244, 184, 96, 0.35); text-align: center; }
.hib-result .calm-intro { margin-top: 6px; }
.eve-body { margin-top: max(110px, calc(44vh - 120px)); margin-top: max(110px, calc(44dvh - 120px)); }
.eve-story { padding: 14px; border-radius: 20px; background: rgba(22, 41, 64, 0.96); border: 1px solid rgba(244, 184, 96, 0.35); }
.eve-story-top { display: flex; align-items: center; gap: 12px; }
.eve-story-top > div { flex: 1; min-width: 0; }
.eve-st-title { margin: 2px 0 0; font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 1.2; }
.eve-st-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.eve-play { width: 56px; height: 56px; flex: none; border: 0; border-radius: 50%; background: #8EC5FF; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.eve-st-bar { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.eve-st-track { flex: 1; height: 6px; border-radius: 999px; background: #24395A; overflow: hidden; }
.eve-st-track span { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.4s; }
.eve-st-text { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--soft); }
.calm-h { margin: 18px 0 10px; font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.amb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.amb { min-width: 0; border-radius: 16px; background: var(--panel); border: 1px solid #24395A; overflow: hidden; }
.amb.on { background: #1D3352; border-color: var(--line-2); }
.amb-btn, .amb-locked { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.amb-locked { border-radius: 16px; background: var(--panel); border: 1px solid #24395A; }
.amb-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.amb-top em { display: flex; align-items: center; gap: 4px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--gold); }
.amb b { font-size: 14px; font-weight: 800; }
.amb small { font-size: 12px; color: var(--muted); }
.amb input[type="range"] { width: calc(100% - 24px); margin: 0 12px 12px; accent-color: #8EC5FF; }
.eve-stops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.eve-stops .time-chip { min-height: 44px; font-size: 13px; }
.eve-stops .time-chip:last-child { grid-column: auto; font-size: 12px; line-height: 1.1; }
.eve-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.hib-result .win-chips { margin-top: 10px; }
.hib-result .pill { white-space: normal; text-align: left; line-height: 1.3; }
.sh-card.sh-launch { box-shadow: 0 0 0 3px #F4B860, 0 8px 20px rgba(0, 0, 0, 0.25); }
.sh-launch .sh-flag { background: #F4B860; color: #3A2A08; }
/* connexion : Google, e-mail, invité */
.btn-auth { width: 100%; min-height: 52px; gap: 10px; }
.btn-auth-google { background: #FFFFFF; color: #16233B; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.wel-guest { min-height: 44px; border: 0; background: none; color: var(--soft); font: inherit; font-size: 16px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.wel-foot { gap: 10px; }
.auth-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.auth-guest { margin-top: 18px; }
.acc-signin { color: #8EC5FF !important; }
.hib-result .pill { max-width: 100%; }
.hib-result .pill span { min-width: 0; }
@media (max-width: 360px) { .calm-clock { display: none; } }

/* ---------- Les 6 mondes : étiquette du monde, arrivée, carte des mondes ---------- */
button.world-tag { font: inherit; color: inherit; cursor: pointer; }
.world-tag p:first-child { display: flex; align-items: center; justify-content: center; gap: 5px; }
.world-tag p:first-child svg { flex: none; margin-top: -1px; }
.screen-arrival { padding-bottom: 18px; }
.arr-bg { position: absolute; inset: 0; z-index: 0; }
.arr-bg img { width: 100%; height: 100%; max-width: none; object-fit: cover; filter: blur(6px) saturate(1.1); transform: scale(1.08); }
.arr-shade { position: absolute; inset: 0; z-index: 0; background: linear-gradient(to bottom, rgba(15, 29, 46, 0.55), rgba(15, 29, 46, 0.86) 45%, rgba(15, 29, 46, 0.96)); }
.screen-arrival .head { position: relative; z-index: 1; }
.arr-body { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 4px; }
.arr-title { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 30px; line-height: 1.1; text-wrap: balance; }
.arr-card { flex: 1; min-height: 120px; display: flex; align-items: center; justify-content: center; width: 100%; }
.arr-card img { height: 100%; max-height: 380px; width: auto; aspect-ratio: 720 / 1290; object-fit: cover; border-radius: 18px; border: 5px solid var(--paper); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45); transform: rotate(-2deg); }
.arr-text { margin: 0; max-width: 34ch; font-size: 15px; line-height: 1.45; color: var(--soft); text-wrap: balance; }
.arr-body .btn { width: 100%; }
.arr-body .btn-ghost { min-height: 44px; }
.wm-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 10px calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 8px var(--gut-r) 28px var(--gut); }
.wm-list { display: grid; gap: 12px; }
.wm-tile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px 10px 10px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wm-tile.here { border: 2px solid var(--orange); }
.wm-tile.done { border-color: rgba(125, 219, 163, 0.45); }
.wm-tile.locked { opacity: 0.72; }
.wm-img { position: relative; flex: none; width: 64px; height: 86px; border-radius: 12px; overflow: hidden; background: var(--night); }
.wm-img img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.wm-tile.locked .wm-img img { filter: grayscale(0.7) brightness(0.55); }
.wm-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.wm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wm-txt small { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }
.wm-txt b { font-family: var(--f-display); font-weight: 600; font-size: 20px; line-height: 1.1; }
.wm-txt > span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.wm-stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--gold) !important; }
.wm-status { flex: none; max-width: 38%; padding: 6px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12px; font-weight: 800; text-align: center; line-height: 1.2; }
.wm-tile.here .wm-status { background: var(--orange); border-color: var(--orange); color: var(--paper-ink); }
.wm-tile.done .wm-status { color: var(--mint); border-color: rgba(125, 219, 163, 0.45); }
.win-pass { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 800; color: var(--mint); }
.souvenir-art .souvenir-img { max-height: 340px; aspect-ratio: 640 / 1147; border-radius: 18px; border: 5px solid var(--paper); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45); object-fit: cover; animation: none; transform: rotate(-2deg); }
.souvenir-art.perle-meet .souvenir-img { max-height: 540px; }

/* ---------- Les amis de Yuki ---------- */
.home-friends { position: absolute; left: max(27%, calc(var(--gut) + 84px)); bottom: calc(100% - 40px); display: flex; align-items: flex-end; gap: 2px; pointer-events: none; }
.home-friends.home-friends-r { left: auto; right: max(24%, calc(var(--gut-r) + 76px)); }
.home-friend { pointer-events: auto; height: 92px; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); }
.home-friend img { height: 100%; width: auto; max-width: none; animation: float 3.4s ease-in-out infinite; }
.home-friend + .home-friend img { animation-delay: -1.2s; }
.fr-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 12px calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 8px var(--gut-r) 28px var(--gut); }
.fr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.fr-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.fr-card.on { border: 2px solid rgba(125, 219, 163, 0.55); background: linear-gradient(to bottom, #1C3550, var(--panel)); }
.fr-art { position: relative; height: 112px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.fr-art img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.fr-card:not(.on) .fr-art img { filter: brightness(0) invert(0.16) sepia(0.4) hue-rotate(180deg); opacity: 0.9; }
.fr-q { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font-family: var(--f-display); font-weight: 600; font-size: 34px; color: var(--soft); }
.fr-card b { font-family: var(--f-display); font-weight: 600; font-size: 18px; line-height: 1.15; }
.fr-card b.fr-riddle { font-family: var(--f-body); font-weight: 800; font-size: 13px; line-height: 1.35; color: var(--soft); }
.fr-card small { font-size: 12px; color: var(--muted); }
.fr-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(125, 219, 163, 0.14); color: var(--mint); font-size: 11px; font-weight: 800; }
.fr-show { min-height: 36px; padding: 6px 12px; border: 1px solid rgba(125, 219, 163, 0.4); font-family: inherit; font-size: 12px; cursor: pointer; }
.pass-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: center; min-height: 44px; margin: 4px auto 0; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: #FFD66B; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.pass-line, .pass-left { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; color: #FFD66B; font-size: 13px; font-weight: 800; }
.pass-pack { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 214, 107, 0.1); border: 1px solid rgba(255, 214, 107, 0.35); }
.pass-pack b { font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.sh-ico.sh-pass { background: rgba(255, 214, 107, 0.14); }
.fr-show.off { background: rgba(255, 255, 255, 0.05); border-color: var(--line-2); color: var(--muted); }
.fr-tag.fr-when { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); }
button.mz-friend { color: var(--ink); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.acc-friends { border-color: rgba(244, 184, 96, 0.35); }
.acc-mates { display: flex; flex: none; align-items: flex-end; }
.acc-mates img { width: 26px; height: 34px; object-fit: contain; margin-left: -6px; }
.acc-mates img.off { filter: brightness(0) invert(0.25); opacity: 0.7; }
@media (max-width: 360px) {
  .home-friend { height: 76px; }
  .acc-mates img { width: 20px; height: 28px; }
  .wm-img { width: 54px; height: 72px; }
}
@media (max-height: 700px) {
  .home-friend { height: 74px; }
  .arr-title { font-size: 26px; }
}

/* Yuki habillé en médaillon (menu de la maison, Mon compte) : recadrage de 470 px de l'image de la garde-robe (768 × 1376) */
.dr-avatar { position: relative; display: block; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; background: #1F3A5C; box-shadow: 0 0 0 2px var(--ink); }
.dr-avatar .dr { width: calc(var(--s) * 768 / 470); left: calc(var(--s) * -149 / 470); top: calc(var(--s) * var(--y0) / -470); }

/* Câlin : la case « Câlin » montre où toucher Yuki (un rond qui bat) */
.home-yuki { touch-action: pan-y; }
.home-yuki.hint::after { content: ""; position: absolute; left: 50%; top: 42%; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 6px rgba(245, 154, 208, 0.45); animation: hug-ring 0.85s ease-in-out 3; pointer-events: none; }
@keyframes hug-ring { 0%, 100% { transform: scale(0.8); opacity: 0.6; } 50% { transform: scale(1.12); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .home-yuki.hint::after { animation: none; } }

/* ---------- Pelages : micro-animations autour de Yuki ---------- */
.dr-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.dr-fx span { position: absolute; left: var(--x); top: var(--y); width: 4.4%; aspect-ratio: 1; margin: -2.2% 0 0 -2.2%; animation-delay: var(--d); }
.dr-fx svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-sparkle span, .fx-shine span { animation: fx-twinkle 2.6s ease-in-out infinite; animation-delay: var(--d); filter: drop-shadow(0 0 4px rgba(255, 214, 107, 0.9)); }
.fx-shine span { filter: drop-shadow(0 0 4px rgba(242, 246, 251, 0.95)); }
.fx-hearts span { width: 3.8%; animation: fx-rise 3.8s ease-out infinite; animation-delay: var(--d); }
.fx-embers span { width: 1.8%; animation: fx-rise 4.4s ease-out infinite; animation-delay: var(--d); filter: drop-shadow(0 0 5px rgba(255, 180, 88, 0.95)); }
.fx-frost span { width: 3.4%; animation: fx-fall 6s linear infinite; animation-delay: var(--d); filter: drop-shadow(0 0 3px rgba(142, 197, 255, 0.9)); }
.fx-leaves span { width: 4.2%; animation: fx-fall 7s ease-in-out infinite; animation-delay: var(--d); }
.fx-sheen { position: absolute; display: block; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.55) 50%, transparent 62%) no-repeat; background-size: 300% 100%;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; animation: fx-sheen 3.6s ease-in-out infinite; }
@keyframes fx-twinkle { 0% { opacity: 0; transform: scale(0.2) rotate(0deg); } 30% { opacity: 1; transform: scale(1) rotate(40deg); } 60%, 100% { opacity: 0; transform: scale(0.2) rotate(90deg); } }
@keyframes fx-rise { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 15% { opacity: 0.95; } 100% { opacity: 0; transform: translate(var(--dx), -900%) scale(1.05); } }
@keyframes fx-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(0deg); } 10% { opacity: 0.95; } 90% { opacity: 0.85; } 100% { opacity: 0; transform: translate(var(--dx), 2400%) rotate(var(--r)); } }
@keyframes fx-sheen { 0% { background-position: 120% 0; } 55%, 100% { background-position: -20% 0; } }
.dr-avatar .dr-fx, .dr-mini .dr-fx { display: none; }
@media (prefers-reduced-motion: reduce) { .dr-fx span { animation: none; opacity: 0.8; } .fx-frost span, .fx-leaves span, .fx-hearts span, .fx-embers span { display: none; } .fx-sheen { animation: none; opacity: 0; } }

/* Skins : la transformation (vidéo) par-dessus Yuki, l'anneau du halo qui luit */
.wr-skinvid { position: absolute; z-index: 2; max-width: none; object-fit: cover; cursor: pointer; transition: opacity 0.35s ease; /* la colonne de Yuki coupe les côtés ; le haut et le bas de la vidéo se fondent dans le studio */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 88%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 88%, transparent); }
.wr-skinvid.gone { opacity: 0; }
.wr-skinplay { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; vertical-align: -5px; padding: 0; border: 0; border-radius: 50%; background: var(--orange); cursor: pointer; }
.fx-ring { position: absolute; display: block; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  box-shadow: 0 0 18px 6px rgba(255, 226, 150, 0.55), inset 0 0 18px 6px rgba(255, 226, 150, 0.45);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 58%); mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 58%);
  animation: fx-ring 2.8s ease-in-out infinite; }
.fx-halo span { animation: fx-twinkle 2.4s ease-in-out infinite; animation-delay: var(--d); filter: drop-shadow(0 0 5px rgba(255, 226, 150, 0.95)); }
/* les skins légendaires (Flow) : étincelles bleues, étoiles blanches, lucioles, pétales */
.fx-spark span, .fx-stars span { animation: fx-twinkle 2.5s ease-in-out infinite; animation-delay: var(--d); filter: drop-shadow(0 0 5px rgba(120, 200, 255, 0.95)); }
.fx-stars span { filter: drop-shadow(0 0 4px rgba(246, 249, 255, 0.95)); }
.fx-fireflies span { width: 1.6%; animation: fx-rise 5.2s ease-out infinite; animation-delay: var(--d); filter: drop-shadow(0 0 6px rgba(233, 245, 154, 0.95)); }
.fx-petals span { width: 3%; animation: fx-fall 7.5s ease-in-out infinite; animation-delay: var(--d); }
.fx-bubbles span { width: 3.2%; animation: fx-rise 5.6s ease-out infinite; animation-delay: var(--d); }
@media (prefers-reduced-motion: reduce) { .fx-fireflies span, .fx-petals span, .fx-bubbles span { display: none; } }
@keyframes fx-ring { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fx-ring { animation: none; opacity: 0.6; } }

/* ---------- Auras (6/11) : lumière autour de Yuki (js/wardrobe.js, auraParts). Tout est en % de la silhouette de Yuki (.au) ;
   les marges en % se comptent sur la largeur, d'où des carrés (aspect-ratio) centrés par leurs marges. ---------- */
.au { position: absolute; display: block; pointer-events: none; }
.au i, .au span { position: absolute; display: block; }
.au svg { display: block; width: 100%; height: 100%; overflow: visible; }
.au [style*="mask-image"] { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.au-glow { left: 50%; top: 56%; width: 200%; aspect-ratio: 1; margin: -100% 0 0 -100%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--g1) 0%, var(--g1) 18%, var(--g2) 52%, transparent 100%); animation: au-breathe 4.6s ease-in-out infinite; }
/* cercle au sol : vu de biais (écrasé), il tourne ; moitié du fond derrière Yuki, moitié de devant par-dessus */
.au-ring { left: 50%; top: 97%; width: 136%; aspect-ratio: 1; margin: -68% 0 0 -68%; }
.au-b { clip-path: inset(0 0 50% 0); }
.au-f { clip-path: inset(50% 0 0 0); }
.au .au-ell { inset: 0; transform: scaleY(0.3); }
.au-ringimg { inset: 0; background: var(--ring); animation: au-spin 26s linear infinite; opacity: 0.95; }
/* orbite inclinée : chaque objet tourne autour de Yuki, grossit devant et pâlit derrière */
.au-orb { left: 50%; top: 54%; width: 176%; aspect-ratio: 1; margin: -88% 0 0 -88%; transform: rotate(-11deg); }
.au-orb .au-ell { transform: scaleY(0.24); }
.au-o { inset: 0; animation: au-spin var(--t) linear infinite; animation-delay: var(--d); }
.au-oi { left: 100%; top: 50%; width: 5.5%; aspect-ratio: 1; margin: -2.75% 0 0 -2.75%; animation: au-unspin var(--t) linear infinite; animation-delay: var(--d); }
.au-oi .au-sh { inset: 0; animation: au-depth var(--t) linear infinite; animation-delay: var(--d); }
/* les formes : couleur de l'aura, petite lueur */
.au-sh { inset: 0; color: var(--p); filter: drop-shadow(0 0 3px var(--pg)); }
.au-dot { border-radius: 50%; background: radial-gradient(circle, #FFFFFF 0%, var(--p) 30%, transparent 72%); filter: none; }
.au-r { left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); opacity: 0; animation: au-rise var(--t) ease-out infinite; animation-delay: var(--d); }
.au-tw { left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); opacity: 0; animation: fx-twinkle 2.7s ease-in-out infinite; animation-delay: var(--d); }
.au-fa { left: var(--x); top: -6%; width: var(--s); aspect-ratio: 1; opacity: 0; animation: au-fall var(--t) ease-in-out infinite; animation-delay: var(--d); }
.au-w { left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); animation: au-wander var(--t) ease-in-out infinite alternate; animation-delay: var(--d); }
.au-w .au-sh { animation: au-blink 2.3s ease-in-out infinite; animation-delay: var(--d); }
/* textures de fond, colorées par un dégradé à travers leur masque */
.au-aur { left: -75%; top: -34%; width: 250%; height: 96%; overflow: hidden;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); }
.au .au-aur i { left: 0; top: 0; width: 200%; height: 100%; -webkit-mask-size: 50% 100%; mask-size: 50% 100%; -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
  background: linear-gradient(to top, #5CFFB6 0%, #3DF2C6 24%, #5FB0FF 56%, #B884FF 82%, rgba(184, 132, 255, 0) 100%); opacity: 1; animation: au-slide 26s linear infinite; }
.au .au-aur i + i { top: 9%; height: 92%; opacity: 0.6; animation-duration: 41s; animation-direction: reverse; }
.au-rays { left: 50%; top: 34%; width: 250%; aspect-ratio: 1; margin: -125% 0 0 -125%; background: radial-gradient(closest-side, #FFF8DC 0%, #FFD66B 35%, #FF9A3D 75%, transparent 100%); opacity: 0.8; animation: au-spin 60s linear infinite; }
.au-rays2 { width: 190%; margin: -95% 0 0 -95%; opacity: 0.5; animation-duration: 38s; animation-direction: reverse; }
.au-neb { left: 50%; top: 46%; width: 240%; aspect-ratio: 1; margin: -120% 0 0 -120%; background: conic-gradient(from 20deg, #A07CFF, #FF9ADB, #5E9BFF, #7FEAFF, #A07CFF); opacity: 1; animation: au-spin 80s linear infinite; }
.au-neb2 { width: 170%; margin: -85% 0 0 -85%; background: conic-gradient(from 200deg, #6CE0FF, #B07CFF, #F59AD0, #6CE0FF); opacity: 0.75; animation-duration: 52s; animation-direction: reverse; }
.au-halo { left: 50%; top: 40%; width: 158%; aspect-ratio: 1; margin: -79% 0 0 -79%;
  background: conic-gradient(#FF8A8A, #FFC46B, #FFF27A, #86F0A0, #7FD8FF, #8E9BFF, #D49BFF, #FF8A8A); animation: au-spin 9s linear infinite; }
/* reflet sur Yuki : sa fourrure blanche prend la couleur de l'aura en bas, et ça respire avec la lueur */
.au-tint { mix-blend-mode: multiply; background: linear-gradient(to top, var(--tint) 0%, rgba(255, 255, 255, 0) 46%); opacity: 0.6;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; animation: au-pulse 4.6s ease-in-out infinite; }
/* couleurs de chaque aura */
.au-aurore { --g1: rgba(70, 255, 185, 0.5); --g2: rgba(110, 120, 255, 0.16); --ring: linear-gradient(90deg, #63FFC4, #76D9FF 50%, #B394FF); --p: #D7FFF0; --pg: rgba(90, 255, 190, 0.95); --tint: #C4F7E2; }
.au-givre { --g1: rgba(150, 215, 255, 0.58); --g2: rgba(120, 170, 255, 0.16); --ring: linear-gradient(90deg, #F2FAFF, #9FDCFF 50%, #F2FAFF); --p: #F2FAFF; --pg: rgba(140, 210, 255, 1); --tint: #D3E9FF; }
.au-soleil { --g1: rgba(255, 214, 107, 0.58); --g2: rgba(255, 150, 60, 0.16); --ring: linear-gradient(90deg, #FFEDB0, #FFC24A 50%, #FFEDB0); --p: #FFE7A0; --pg: rgba(255, 196, 80, 1); --tint: #FFE2A8; }
.au-etoiles { --g1: rgba(160, 120, 255, 0.55); --g2: rgba(80, 140, 255, 0.16); --p: #FFFFFF; --pg: rgba(196, 176, 255, 1); --tint: #DCD2FF; }
.au-coeurs { --g1: rgba(255, 130, 190, 0.58); --g2: rgba(255, 100, 150, 0.15); --ring: linear-gradient(90deg, #FFD0E6, #FF7EB8 50%, #FFD0E6); --p: #FF8CC6; --pg: rgba(255, 140, 200, 0.9); --tint: #FFD3E8; }
.au-arcenciel { --g1: rgba(255, 255, 255, 0.36); --g2: rgba(160, 200, 255, 0.14); --ring: linear-gradient(90deg, #FF9A9A, #FFE07A, #8EF0A8, #86CFFF, #C9A0FF); --p: #FFFFFF; --pg: rgba(255, 255, 255, 1); --tint: #EDEBFF; }
.au-lucioles { --g1: rgba(205, 255, 130, 0.34); --g2: rgba(90, 170, 100, 0.12); --p: #EFFF9A; --pg: rgba(220, 255, 120, 1); --tint: #EFFACB; }
.au-sakura { --g1: rgba(255, 186, 214, 0.5); --g2: rgba(255, 220, 235, 0.15); --p: #FFBCD6; --pg: rgba(255, 160, 200, 0.55); --tint: #FFE0EC; }
.au-coeurs .au-glow { animation: au-beat 1.9s ease-in-out infinite; }
.au-lucioles .au-glow { top: 82%; }
.au-arcenciel .au-tw:nth-child(3n + 1) .au-sh { color: #FFE07A; } .au-arcenciel .au-tw:nth-child(3n + 2) .au-sh { color: #9FE8FF; } .au-arcenciel .au-tw:nth-child(3n) .au-sh { color: #FFB3E0; }
@keyframes au-spin { to { transform: rotate(360deg); } }
@keyframes au-unspin { from { transform: rotate(0deg) scaleY(4.1667); } to { transform: rotate(-360deg) scaleY(4.1667); } }
@keyframes au-depth { 0% { transform: scale(var(--k, 1)); opacity: 0.9; } 25% { transform: scale(calc(var(--k, 1) * 1.35)); opacity: 1; } 50% { transform: scale(var(--k, 1)); opacity: 0.9; } 75% { transform: scale(calc(var(--k, 1) * 0.6)); opacity: 0.5; } 100% { transform: scale(var(--k, 1)); opacity: 0.9; } }
@keyframes au-breathe { 0%, 100% { opacity: 0.78; transform: scale(0.97); } 50% { opacity: 1; transform: scale(1.03); } }
@keyframes au-beat { 0%, 40%, 100% { transform: scale(0.96); opacity: 0.8; } 12% { transform: scale(1.06); opacity: 1; } 26% { transform: scale(1.02); opacity: 0.92; } }
@keyframes au-rise { 0% { opacity: 0; transform: translate(0, 0) scale(0.5); } 14% { opacity: 1; } 50% { transform: translate(calc(var(--dx) * -0.5), -480%) scale(0.9); } 75% { opacity: 0.85; } 100% { opacity: 0; transform: translate(var(--dx), -980%) scale(1); } }
@keyframes au-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(0deg); } 10% { opacity: 0.95; } 85% { opacity: 0.85; } 100% { opacity: 0; transform: translate(var(--dx), 1900%) rotate(var(--r)); } }
@keyframes au-wander { 0% { transform: translate(0, 0); } 33% { transform: translate(var(--x1), var(--y1)); } 66% { transform: translate(var(--x2), var(--y2)); } 100% { transform: translate(var(--x3), var(--y3)); } }
@keyframes au-blink { 0%, 100% { opacity: 0.25; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes au-slide { to { transform: translateX(-50%); } }
.dr-avatar .au, .dr-avatar .au-tint { display: none; }
@keyframes au-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.65; } }
/* le contour de Yuki s'illumine de la couleur de l'aura */
.au-lit { filter: drop-shadow(0 0 3px var(--pg)) drop-shadow(0 0 14px var(--g1)); }
@media (prefers-reduced-motion: reduce) {
  .au *, .au-tint { animation: none !important; }
  .au-r, .au-fa, .au-w, .au-orb { display: none; }
  .au-tw { opacity: 0.8; }
}

/* Maison : la maison vide (Flow) et Yuki habillé posé dedans, qui respire doucement */
.home-dress { position: absolute; inset: 0; pointer-events: none; }
.home-dress .dr { position: absolute; transform-origin: 50% 94%; animation: yuki-breathe 4.2s ease-in-out infinite; }
.home-dress.tone-warm .dr { filter: sepia(0.12) saturate(1.06) brightness(0.96); }
.home-shadow { position: absolute; display: block; border-radius: 50%; background: radial-gradient(closest-side, rgba(10, 8, 6, 0.5), rgba(10, 8, 6, 0)); }
/* Perle (6/11) : assise à côté de Yuki, elle respire aussi, un peu décalée */
.home-perle { position: absolute; display: block; max-width: none; pointer-events: none; transform-origin: 50% 94%; animation: yuki-breathe 4.6s ease-in-out -1.7s infinite; }
.home-dress.tone-warm .home-perle { filter: sepia(0.12) saturate(1.06) brightness(0.96); }
@media (prefers-reduced-motion: reduce) { .home-perle { animation: none; } }
/* le coucou de Perle (6/11) : sa vidéo dans une fenêtre, et sa carte des amis qui l'ouvre */
.home-perle-tap { z-index: 2; }
.perle-wave { margin: 14px auto 16px; width: min(100%, 300px, calc((100svh - 260px) * 0.5625)); aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #1A2F4C; box-shadow: 0 14px 34px rgba(4, 12, 24, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.perle-wave video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.perle-hide { display: block; margin: 4px auto -6px; color: var(--muted, #9FB2C8); font-size: 13px; }
.fr-wave { padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; }
.fr-play { position: absolute; right: 12%; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #F6E7C8; box-shadow: 0 4px 12px rgba(4, 12, 24, 0.4), 0 0 0 3px rgba(246, 231, 200, 0.25); }
@keyframes yuki-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.006, 1.014); } }
@media (prefers-reduced-motion: reduce) { .home-dress .dr { animation: none; } }
/* le haut transparent du bas de la maison (dégradé) laisse passer le toucher vers Yuki */
.home-foot { pointer-events: none; }
.home-foot > * { pointer-events: auto; }
.home-foot > .home-friends { pointer-events: none; }

/* ---------- Salle de jeux (31/10) : liste avec aperçus animés, puis le jeu en plein écran ---------- */
.screen-arcade { padding: 0; background: radial-gradient(120% 60% at 50% 0%, #1E3A66 0%, var(--navy) 60%); }
.screen-arcade .head { padding: 16px var(--gut-r) 6px var(--gut); }
.arc-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 6px var(--gut-r) 24px var(--gut); -webkit-overflow-scrolling: touch; }
.arc-today { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; padding: 10px 14px; border-radius: 16px; background: rgba(142, 197, 255, 0.1); border: 1px solid rgba(142, 197, 255, 0.22); font-weight: 800; font-size: 14px; }
.arc-list { display: grid; gap: 16px; }
.arc-card { border-radius: 24px; overflow: hidden; background: var(--panel); border: 1px solid rgba(142, 197, 255, 0.22); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.arc-prev { position: relative; display: block; width: 100%; height: 178px; padding: 0; border: 0; background: #0A1534; cursor: pointer; overflow: hidden; }
.arc-stage-mini { position: absolute; inset: 0; display: block; pointer-events: none; }
.arc-canvas { display: block; }
.arc-stage::after, .arc-stage-mini::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 85% 70% at 50% 55%, rgba(8, 14, 40, 0) 55%, rgba(8, 14, 40, 0.4) 100%); }
.arc-body { padding: 12px 14px 14px; }
.arc-body h2 { margin: 0 0 4px; font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.15; }
.arc-body p { margin: 0 0 12px; color: var(--soft); font-size: 14px; line-height: 1.4; }
.arc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.arc-best { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: #FFE19A; }
.arc-best.none { color: var(--muted); font-weight: 700; }
.arc-go { min-height: 46px; padding: 0 20px; border-radius: 14px; flex: none; }
.arc-note { margin: 16px 2px 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.screen-arcplay { padding: 0; background: #0A1534; }
.arc-stage { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.arc-hud { position: absolute; z-index: 3; top: max(12px, env(safe-area-inset-top, 0px)); left: var(--gut); right: var(--gut-r); display: flex; align-items: center; gap: 8px; pointer-events: none; }
.arc-hud > * { pointer-events: auto; }
.arc-chip { display: flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 14px; background: rgba(10, 21, 52, 0.62); border: 1px solid rgba(142, 197, 255, 0.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.arc-chip small { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.arc-chip b { font-family: var(--f-display); font-weight: 600; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.arc-chip-ice { align-items: center; margin-left: auto; }
.arc-start { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 0 24px; pointer-events: none; transition: opacity 0.25s ease; }
.arc-start.gone { opacity: 0; }
.arc-start-card { max-width: 320px; padding: 18px 22px; border-radius: 22px; text-align: center; background: rgba(10, 21, 52, 0.62); border: 1px solid rgba(142, 197, 255, 0.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: arc-breathe 2.2s ease-in-out infinite; }
.arc-start-text { margin: 8px 0 0; font-family: var(--f-display); font-weight: 600; font-size: 21px; line-height: 1.25; text-wrap: balance; }
.arc-start-best { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-weight: 800; font-size: 14px; color: #FFE19A; }
@keyframes arc-breathe { 50% { transform: scale(1.03); } }
.arc-end { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: 16px var(--gut-r) 16px var(--gut); background: rgba(6, 12, 30, 0.5); }
.arc-end-card { width: 100%; max-width: 380px; padding: 22px 18px 18px; border-radius: 26px; text-align: center; background: linear-gradient(to bottom, #1C3550, var(--panel)); border: 1px solid rgba(142, 197, 255, 0.3); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); animation: arc-pop 0.32s cubic-bezier(.2, 1.4, .4, 1) both; }
.arc-end-score { margin: 6px 0 2px; font-family: var(--f-display); font-weight: 600; font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; }
.arc-end-text { margin: 6px 0 0; color: var(--soft); font-size: 15px; }
@keyframes arc-pop { from { transform: scale(0.86); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .arc-start-card, .arc-end-card { animation: none; } }

/* Grand Prix des neiges : les deux commandes (31/10, demande de Simon) — à gauche le pad de direction, à droite Frein et Turbo */
.kart-ctl { --pad-w: min(40vw, 190px); position: absolute; z-index: 2; left: var(--gut); right: var(--gut-r); bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 8px)); display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; pointer-events: none; }
.kart-ctl > * { pointer-events: auto; }
.kart-pad { position: relative; flex: none; width: var(--pad-w); height: 74px; border-radius: 37px; background: rgba(10, 21, 52, 0.46); border: 1.5px solid rgba(142, 197, 255, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; }
.kart-pad small, .kart-btn small { position: absolute; left: 0; right: 0; top: -19px; text-align: center; font-weight: 800; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(242, 246, 251, 0.85); text-shadow: 0 1px 3px rgba(6, 12, 30, 0.8); pointer-events: none; }
.kart-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #FFFFFF, #DCE7F8 58%, #A9BFE4); box-shadow: 0 4px 12px rgba(4, 10, 30, 0.45), inset 0 -3px 6px rgba(80, 110, 170, 0.35); transform: translateX(calc(var(--k, 0) * (var(--pad-w) / 2 - 34px))); transition: transform 0.14s ease-out; }
.kart-pad.on { border-color: rgba(142, 197, 255, 0.85); }
.kart-pad.on .kart-knob { transition: none; }
.kart-arrow { position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border: solid rgba(242, 246, 251, 0.7); border-width: 0 0 3px 3px; border-radius: 2px; }
.kart-arrow-l { left: 16px; transform: rotate(45deg); }
.kart-arrow-r { right: 16px; transform: rotate(-135deg); }
.kart-btns { display: grid; grid-template-columns: auto auto; align-items: end; justify-items: center; gap: 26px 12px; }
.kart-fire { grid-column: 2; grid-row: 1; }
.kart-brake { grid-column: 1; grid-row: 2; }
.kart-turbo { grid-column: 2; grid-row: 2; }
.kart-btn { position: relative; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #FFFFFF; touch-action: none; -webkit-tap-highlight-color: transparent; }
.kart-brake { width: 66px; height: 66px; background: radial-gradient(circle at 40% 32%, #FF7FA2, #E8487A 62%, #B8305C); box-shadow: 0 4px 12px rgba(4, 10, 30, 0.45), inset 0 -3px 6px rgba(80, 10, 40, 0.35); }
.kart-brake .kart-btn-ic { width: 22px; height: 22px; border-radius: 5px; background: #FFFFFF; }
.kart-brake.on { transform: scale(0.92); filter: brightness(1.12); }
.kart-turbo { width: 78px; height: 78px; background: conic-gradient(#8EF0FF calc(var(--cd, 1) * 360deg), rgba(10, 21, 52, 0.55) 0); box-shadow: 0 4px 12px rgba(4, 10, 30, 0.45); }
.kart-turbo::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: radial-gradient(circle at 40% 32%, #6FE0F0, #2FA4C8 62%, #1D7AA0); }
.kart-turbo:not(.kt-ready)::before { filter: saturate(0.35) brightness(0.75); }
.kart-turbo .kart-btn-ic { position: relative; width: 22px; height: 30px; background: #FFFFFF; clip-path: polygon(58% 0, 8% 58%, 44% 58%, 34% 100%, 92% 38%, 54% 38%); }
.kart-turbo.kt-ready { animation: kart-ready 1.6s ease-in-out infinite; }
.kart-turbo.kt-boost { transform: scale(0.92); }
@keyframes kart-ready { 0%, 100% { box-shadow: 0 4px 12px rgba(4, 10, 30, 0.45), 0 0 0 0 rgba(142, 240, 255, 0); } 50% { box-shadow: 0 4px 12px rgba(4, 10, 30, 0.45), 0 0 0 7px rgba(142, 240, 255, 0.28); } }
@media (prefers-reduced-motion: reduce) { .kart-turbo.kt-ready { animation: none; } .kart-knob { transition: none; } }

/* le canon à boules de neige (1/11, Simon) : une boule de neige sur le bouton, le nombre de boules en pastille */
.kart-fire { width: 64px; height: 64px; background: radial-gradient(circle at 40% 32%, #FFB46B, #FF9A3D 60%, #D9711C); box-shadow: 0 4px 12px rgba(4, 10, 30, 0.45), inset 0 -3px 6px rgba(120, 50, 0, 0.3); }
.kart-fire .kart-btn-ic { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 36% 32%, #FFFFFF, #E6EEFA 62%, #A9BFE2); box-shadow: 0 2px 4px rgba(80, 40, 0, 0.35); }
.kart-ammo { position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: #0E1C2E; border: 2px solid #FFFFFF; color: #FFFFFF; font-style: normal; font-weight: 800; font-size: 13px; line-height: 20px; text-align: center; pointer-events: none; }
.kart-fire:active { transform: scale(0.92); }
.kart-fire.kt-empty { filter: saturate(0.2) brightness(0.7); }

/* Grand Prix : classement entre les courses et podium final (1/11, Simon : « 3 courses avec un podium à la fin ») */
.gp-over { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: max(64px, calc(env(safe-area-inset-top, 0px) + 60px)) var(--gut-r) 18px var(--gut); background: rgba(6, 12, 30, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: gp-in 0.3s ease-out; }
@keyframes gp-in { from { opacity: 0; } }
.gp-board { width: min(100%, 380px); max-height: 100%; overflow: auto; padding: 18px 16px; border-radius: 24px; background: rgba(12, 24, 56, 0.94); border: 1px solid rgba(142, 197, 255, 0.3); color: #F2F6FB; text-align: center; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.gp-board h2, .gp-podium h2 { margin: 4px 0 12px; font-family: var(--f-display); font-weight: 600; font-size: 26px; }
.gp-rows { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.gp-row { display: grid; grid-template-columns: 18px 36px 1fr auto auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); text-align: left; animation: gp-row 0.35s ease-out both; }
.gp-row:nth-child(2) { animation-delay: 0.05s; } .gp-row:nth-child(3) { animation-delay: 0.1s; } .gp-row:nth-child(4) { animation-delay: 0.15s; } .gp-row:nth-child(5) { animation-delay: 0.2s; } .gp-row:nth-child(6) { animation-delay: 0.25s; } .gp-row:nth-child(7) { animation-delay: 0.3s; }
@keyframes gp-row { from { opacity: 0; transform: translateX(-12px); } }
.gp-row b { font-weight: 800; color: #FFD27F; }
.gp-row img { width: 36px; height: 36px; object-fit: contain; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.gp-row span { font-weight: 800; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-row em { font-style: normal; font-weight: 800; font-size: 13px; color: #7DDBA3; }
.gp-row strong { min-width: 50px; text-align: right; font-weight: 800; font-size: 14px; }
.gp-row.me { background: rgba(255, 154, 61, 0.24); box-shadow: inset 0 0 0 1.5px rgba(255, 154, 61, 0.7); }
.gp-board .btn, .gp-podium .btn { width: 100%; }
.gp-podium-over { background: radial-gradient(ellipse 90% 70% at 50% 35%, rgba(70, 92, 190, 0.92), rgba(6, 12, 30, 0.97)); }
.gp-podium { position: relative; width: min(100%, 420px); text-align: center; color: #F2F6FB; }
.gp-stage { --fh: min(150px, 22vh); display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin: 4px 0 14px; }
.gp-step { position: relative; flex: 0 0 31%; display: flex; flex-direction: column; align-items: center; }
.gp-step-2, .gp-step-3 { --fh: min(118px, 17vh); }
.gp-fig { position: relative; width: 100%; height: var(--fh); display: flex; align-items: flex-end; justify-content: center; margin-bottom: -6px; animation: gp-rise 0.6s ease-out both; }
.gp-step-1 .gp-fig { animation-delay: 0.45s; } .gp-step-2 .gp-fig { animation-delay: 0.2s; }
@keyframes gp-rise { from { opacity: 0; transform: translateY(24px) scale(0.9); } }
.gp-friend { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4)); }
.gp-yuki { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4)); }
.gp-yuki .dr { position: absolute; height: calc(var(--fh) * 1.3); width: calc(var(--fh) * 1.3 * 0.5581); bottom: calc(var(--fh) * -0.0633); left: calc(50% - var(--fh) * 0.409); }
.gp-block { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 8px 4px; border-radius: 14px 14px 4px 4px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 10px 20px rgba(0, 0, 0, 0.4); }
.gp-step-1 .gp-block { height: 130px; background: linear-gradient(#FFE8A6, #E9A93A); color: #4A2C00; }
.gp-step-2 .gp-block { height: 106px; background: linear-gradient(#F2F6FC, #A8B5CB); color: #1F2A44; }
.gp-step-3 .gp-block { height: 88px; background: linear-gradient(#F6CDA4, #B9743E); color: #3A1E06; }
.gp-block > * { flex-shrink: 0; }   /* le nom ne doit jamais être écrasé (2/11 : le nom du 3e manquait) */
.gp-block b { font-family: var(--f-display); font-weight: 600; font-size: 30px; line-height: 1; }
.gp-block span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 13px; }
.gp-block small { font-weight: 800; font-size: 11px; opacity: 0.8; }
.gp-me { margin: 0 0 14px; font-weight: 800; font-size: 17px; text-wrap: balance; }
.gp-confetti { position: absolute; left: 0; right: 0; top: -60px; height: 640px; overflow: hidden; pointer-events: none; }
.gp-confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 12px; border-radius: 2px; background: var(--c); animation: gp-fall 3.4s linear var(--d) infinite; }
@keyframes gp-fall { to { transform: translateY(640px) rotate(560deg); opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) { .gp-confetti { display: none; } .gp-fig, .gp-row, .gp-over { animation: none; } }

/* ---------- le bouton son : musique et bruitages séparés (2/11, Simon) ---------- */
.snd-wrap { position: relative; display: inline-flex; }
.sound-btn.snd-part::after { content: ""; position: absolute; right: 5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #FF9A3D; box-shadow: 0 0 0 2px rgba(22, 41, 64, 0.95); }
.sound-btn { position: relative; }
.snd-pop { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; width: max-content; min-width: 214px; padding: 6px; border-radius: 18px; background: rgba(15, 29, 46, 0.97); border: 1px solid rgba(142, 197, 255, 0.3); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45); animation: snd-pop 0.16s ease-out; }
@keyframes snd-pop { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
.snd-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 6px 10px; border: 0; border-radius: 13px; background: transparent; color: #F2F6FB; font: inherit; font-weight: 800; font-size: 15px; text-align: left; cursor: pointer; }
.snd-row + .snd-row { margin-top: 2px; }
.snd-row:hover, .snd-row:focus-visible { background: rgba(142, 197, 255, 0.1); }
.snd-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, 0.07); }
.snd-lbl { flex: 1; }
.snd-sw { position: relative; flex: 0 0 auto; width: 44px; height: 26px; border-radius: 13px; background: rgba(255, 255, 255, 0.18); transition: background 0.18s; }
.snd-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #F2F6FB; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform 0.18s; }
.snd-row[aria-checked="true"] .snd-sw { background: #FF9A3D; }
.snd-row[aria-checked="true"] .snd-sw::after { transform: translateX(18px); }
.snd-row[aria-checked="false"] .snd-lbl { color: rgba(242, 246, 251, 0.6); }
@media (prefers-reduced-motion: reduce) { .snd-pop { animation: none; } .snd-sw, .snd-sw::after { transition: none; } }
.map-head.snd-open, .head.snd-open { position: relative; z-index: 30; }

/* ---------- Version Google Play (3/11/2026) : âge, question pour adulte, comptes, Yuki+, habitudes, administration ---------- */
.screen-age { justify-content: center; background: radial-gradient(120% 70% at 50% 18%, #1D3A5E 0%, var(--navy) 62%); }
/* Âge, version 2 (retours d'Adeline, 4/11) */
.screen-age { justify-content: flex-start; background: radial-gradient(120% 70% at 50% 0%, #1F4C86 0%, #143058 40%, #0E1E37 75%, #0A1628 100%); text-align: center; }
.age2-sky { position: absolute; left: -60px; right: -60px; top: -40px; height: 420px; pointer-events: none; filter: blur(6px);
  background: radial-gradient(55% 40% at 25% 38%, rgba(84, 230, 170, 0.42), transparent 70%), radial-gradient(45% 38% at 78% 28%, rgba(170, 140, 255, 0.42), transparent 70%), radial-gradient(40% 30% at 55% 12%, rgba(120, 190, 255, 0.35), transparent 70%); }
.age2-title { position: relative; flex: none; margin: max(84px, 15vh) 0 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(32px, 10vw, 40px); line-height: 1.1; text-shadow: 0 0 24px rgba(142, 197, 255, 0.35); }
.age2-opts { position: relative; z-index: 2; flex: none; display: grid; gap: 14px; margin: 30px 8px 0; }
.age2-opt { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 0 18px; border-radius: 22px; border: 2px solid var(--c); background: rgba(22, 41, 64, 0.8); color: var(--ink);
  font: inherit; font-size: 19px; font-weight: 800; text-align: left; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 0 22px color-mix(in srgb, var(--c) 18%, transparent); }
.age2-opt:active { transform: translateY(2px); }
.age2-ic { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.age2-yuki { position: relative; flex: 1; min-height: 90px; overflow: hidden; margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); }
.age2-yuki::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 420px; height: 300px; transform: translateX(-50%); background: radial-gradient(50% 60% at 50% 100%, rgba(120, 170, 255, 0.45), transparent 75%); }
.age2-yuki img { position: absolute; left: 50%; bottom: 0; width: min(52vw, 215px); height: auto; transform: translate(calc(-1 * var(--sx, 48%)), 40%); filter: drop-shadow(0 -6px 24px rgba(142, 197, 255, 0.25)); }
.age-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 0 4px 24px; }
.age-yuki { width: min(56vw, 230px); height: auto; margin-bottom: 6px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35)); }
.age-title { margin: 2px 0 0; font-family: var(--f-display); font-weight: 600; font-size: 32px; line-height: 1.1; }
.age-sub { margin: 0 0 14px; max-width: 32ch; color: var(--soft); font-size: 15px; line-height: 1.45; }
.age-opts { width: 100%; display: grid; gap: 10px; }
.age-opt { width: 100%; min-height: 56px; font-size: 17px; }

.gate-words { margin: 14px 0 4px; font-family: var(--f-display); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--ice); text-align: center; }
.gate-typed { min-height: 40px; margin: 6px 0 10px; font-family: var(--f-display); font-size: 30px; letter-spacing: 0.3em; text-align: center; }
.gate-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gate-pad button { min-height: 52px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--ink); font: inherit; font-size: 22px; font-weight: 800; cursor: pointer; }
.gate-pad .gate-ok { background: var(--orange); border-color: var(--orange); }
.gate-msg { min-height: 22px; margin: 10px 0 0; color: var(--coral); font-weight: 700; text-align: center; }

.sign-kid { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; background: rgba(142, 197, 255, 0.1); color: var(--soft); font-size: 14px; line-height: 1.4; }
.sign-step { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.sign-or { height: 1px; margin: 4px 0; background: var(--line); }
.sign-label { font-size: 13px; font-weight: 800; color: var(--muted); }
.sign-input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--night); color: var(--ink); font: inherit; font-size: 17px; }
.sign-input:focus { outline: 2px solid var(--ice); outline-offset: 1px; }
.sign-code { letter-spacing: 0.4em; font-size: 22px; text-align: center; }
.sign-links { display: flex; justify-content: space-between; gap: 10px; }
.sign-msg { min-height: 22px; margin: 10px 0 0; color: var(--coral); font-weight: 700; }
.link-btn { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--ice); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn.busy { opacity: 0.6; pointer-events: none; }

.merge-opts { display: grid; gap: 10px; margin-top: 16px; }
.merge-opt { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.merge-opt b { font-size: 16px; } .merge-opt span { color: var(--soft); font-size: 14px; }

.acc-row-static { cursor: default; }
.acc-row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; }
.acc-row-btns .btn { min-height: 46px; font-size: 14px; padding: 0 10px; }
.acc-del-confirm { margin: 0 12px 12px; }
.acc-plus-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(244, 184, 96, 0.16); color: var(--gold); font-size: 12px; font-weight: 800; }
.acc-legal { flex-wrap: wrap; gap: 6px 16px; padding: 12px 14px; }
.acc-link { color: var(--ice); font-size: 14px; font-weight: 700; }
.sh-owned { display: inline-flex; align-items: center; background: rgba(125, 219, 163, 0.16); color: var(--mint); box-shadow: none; cursor: default; }
.plus-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.plus-on { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: rgba(244, 184, 96, 0.12); color: var(--gold); font-weight: 800; }

.goal-more { font-style: normal; font-size: 12px; padding: 1px 6px; border-radius: 999px; background: rgba(142, 197, 255, 0.16); color: var(--ice); }
.goals-list { display: grid; gap: 8px; margin: 14px 0; }
.goals-line { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 5px 6px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.goals-line b { flex: 1; min-width: 0; font-size: 15px; }
.goals-line.done { background: #1D3352; }
.goal-opt { position: relative; }
.goal-n { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--ice); }

.screen-habits { gap: 0; }
.hab-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 0 24px; }
.hab-total { margin: 0 0 12px; font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.hab-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.hab-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--faint); font-size: 12px; font-weight: 800; }
.hab-day.on { background: #1D3352; color: var(--ink); border-color: var(--line-2); }
.hab-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 30px; }
.hab-dots i, .hab-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.hab-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 14px 0; color: var(--soft); font-size: 13px; }
.hab-legend span { display: inline-flex; align-items: center; gap: 6px; } .hab-legend b { color: var(--ink); }
.hab-goals p { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--soft); font-size: 14px; }
.hab-locked { filter: blur(3px) saturate(0.6); pointer-events: none; user-select: none; }
.hab-lock { position: absolute; left: var(--gut); right: var(--gut-r); bottom: 24px; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: rgba(15, 29, 46, 0.94); border: 1px solid rgba(244, 184, 96, 0.4); }
.hab-lock p { display: flex; gap: 10px; margin: 0; font-weight: 700; line-height: 1.4; }

.adm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0 28px; }
.adm-stats .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-sku { margin: 10px 0 0; color: var(--soft); font-size: 13px; }
.adm-users { display: grid; gap: 10px; margin-top: 10px; }
.adm-user { padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.adm-user p { margin: 0; overflow-wrap: anywhere; }
.adm-sub { color: var(--muted); font-size: 13px; margin-top: 2px !important; }
.adm-give { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; align-items: end; }
.adm-give label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.adm-give input { min-height: 40px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--night); color: var(--ink); font: inherit; }
.adm-give .sh-buy { grid-column: 1 / -1; }

/* Moins de 16 ans : boutique sans incitation (4/11) — prix sur un bouton discret à cadenas, note « réservé aux adultes » */
.sh-buy.sh-adult { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #E6EDF6; color: #2A3B55; box-shadow: none; font-size: 15px; font-weight: 700; }
.sh-kid { display: flex; align-items: flex-start; gap: 10px; margin: 16px var(--gut-r) 0 var(--gut); padding: 12px 14px; border-radius: 14px; background: #E3EEFB; color: #2A3B55; font-size: 14px; font-weight: 600; line-height: 1.4; }
.sh-kid svg { flex: none; margin-top: 2px; }
.btn.plus-adult { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.plus-body .btn.plus-adult { width: 100%; }

/* ---------- Calendrier des cadeaux (6/11, js/calendar.js) ---------- */
.screen[data-screen="calendar"] { padding: 0; background: linear-gradient(180deg, #0B1626 0%, #132A47 46%, #1B3A5E 100%); }
.cal-sky { position: absolute; inset: 0 0 auto 0; height: 300px; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, rgba(92, 255, 192, 0.16), transparent 70%), radial-gradient(80% 60% at 85% 10%, rgba(176, 124, 255, 0.18), transparent 70%); }
.cal-snow span { position: absolute; top: -20px; left: calc(var(--i) * 6.4% + 1%); opacity: 0.4; animation: cal-snow calc(7s + var(--i) * 0.37s) linear infinite; animation-delay: calc(var(--i) * -0.83s); }
.cal-snow span:nth-child(3n) { opacity: 0.3; transform: scale(0.7); }
@keyframes cal-snow { 0% { opacity: 0; } 15% { opacity: 0.45; } 80% { opacity: 0.3; } 100% { opacity: 0; transform: translate(18px, 260px) rotate(180deg); } }
.cal-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--gut-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gut); }
.cal-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 14px var(--gut-r) 12px var(--gut); background: linear-gradient(to bottom, #0B1626 62%, rgba(11, 22, 38, 0)); }
.cal-hero { text-align: center; padding: 4px 8px 14px; }
.cal-month { margin: 4px 0 8px; font-family: var(--f-display); font-weight: 600; font-size: 36px; line-height: 1; color: #FFFFFF; text-shadow: 0 2px 18px rgba(142, 197, 255, 0.45); }
.cal-sub { margin: 0 auto; max-width: 300px; font-size: 13.5px; line-height: 1.4; color: var(--soft); }
.cal-bar { width: 180px; height: 8px; margin: 2px auto 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.cal-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFD66B, #FF9A3D); transition: width 0.5s ease; }
.cal-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: rgba(125, 219, 163, 0.12); border: 1px solid rgba(125, 219, 163, 0.35); color: #DFF7E9; font-size: 13.5px; font-weight: 700; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cal-cell { position: relative; aspect-ratio: 0.86; padding: 0; border-radius: 15px; border: 1.5px solid rgba(255, 255, 255, 0.12); background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)); color: #FFFFFF; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: visible; }
.cal-n { position: absolute; top: 5px; left: 7px; font-family: var(--f-display); font-weight: 600; font-size: 14px; line-height: 1; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.cal-box { width: 74%; margin-top: 10%; display: block; }
.gbox { display: block; width: 100%; height: auto; overflow: visible; }
.gbox-lid { transform-box: fill-box; transform-origin: 50% 100%; }
.cal-cell.st-locked .cal-box { opacity: 0.42; filter: saturate(0.35); }
.cal-cell.st-locked .cal-n { color: rgba(255, 255, 255, 0.55); }
.cal-cell.st-ready { border-color: #FFD66B; background: radial-gradient(circle at 50% 60%, rgba(255, 214, 107, 0.35), rgba(255, 214, 107, 0.06) 70%); box-shadow: 0 0 0 2px rgba(255, 214, 107, 0.35), 0 0 22px rgba(255, 214, 107, 0.45); z-index: 1; }
.cal-cell.st-ready .cal-box { animation: cal-hop 1.6s ease-in-out infinite; }
.cal-cell.st-open { background: rgba(125, 219, 163, 0.1); border-color: rgba(125, 219, 163, 0.35); }
.cal-today { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); padding: 2px 7px; border-radius: 999px; background: #FFD66B; color: #0E1C2E; font-style: normal; font-size: 10px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.cal-done { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; border-radius: 50%; background: #7DDBA3; display: grid; place-items: center; border: 2px solid #132A47; }
.cal-gi { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: 10%; }
.cal-gi b { font-size: 12px; font-weight: 800; color: #DDEBFF; }
.cal-gi-wear img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; }
.cal-cell.nope { animation: cal-nope 0.35s ease-in-out; }
@keyframes cal-hop { 0%, 100% { transform: translateY(0) rotate(0deg); } 30% { transform: translateY(-9%) rotate(-4deg); } 55% { transform: translateY(0) rotate(3deg); } 70% { transform: translateY(-3%) rotate(0deg); } }
@keyframes cal-nope { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
/* la grande case du dernier jour : le skin du mois */
.cal-big { position: relative; width: 100%; margin-top: 14px; min-height: 108px; padding: 12px 64px 12px 112px; border-radius: 20px; border: 2px solid rgba(255, 214, 107, 0.65); overflow: hidden; cursor: pointer; text-align: left; color: #FFFFFF;
  background: linear-gradient(115deg, #3B2A6B 0%, #5A3A8C 45%, #8A4F7E 100%); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); display: flex; align-items: center; }
.cal-big-glow { position: absolute; left: -30px; top: 50%; width: 170px; height: 170px; margin-top: -85px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 230, 150, 0.55), transparent); animation: au-breathe 3.2s ease-in-out infinite; }
.cal-big-txt { position: relative; display: flex; flex-direction: column; gap: 3px; }
.cal-big-txt b { font-family: var(--f-display); font-weight: 600; font-size: 21px; line-height: 1.1; }
.cal-big-txt small { font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, 0.85); }
.cal-big > svg { position: absolute; right: 14px; top: 12px; }
.cal-big .cal-today { left: auto; right: 12px; bottom: auto; top: 10px; transform: none; }
.cal-big .cal-done { top: 8px; right: 8px; }
.cal-mystery, .cal-skinpic { position: absolute; left: 14px; top: 50%; width: 84px; height: 96px; margin-top: -48px; }
.cal-skinpic { left: 6px; width: 100px; height: 112px; margin-top: -56px; filter: drop-shadow(0 0 10px rgba(255, 230, 150, 0.55)); }
.cal-mystery img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) drop-shadow(0 0 1.5px rgba(255, 236, 170, 1)) drop-shadow(0 0 9px rgba(255, 214, 107, 0.75)); }
.cal-mystery b { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-family: var(--f-display); font-size: 38px; color: #FFE19A; text-shadow: 0 0 12px rgba(255, 214, 107, 0.9); animation: au-pulse 2.4s ease-in-out infinite; }
.cal-skinpic { object-fit: contain; }
.cal-big.st-ready { border-color: #FFD66B; box-shadow: 0 0 0 3px rgba(255, 214, 107, 0.35), 0 0 30px rgba(255, 214, 107, 0.5); animation: cal-glow 2s ease-in-out infinite; }
@keyframes cal-glow { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 214, 107, 0.3), 0 0 22px rgba(255, 214, 107, 0.35); } 50% { box-shadow: 0 0 0 3px rgba(255, 214, 107, 0.55), 0 0 36px rgba(255, 214, 107, 0.65); } }
/* l'ouverture */
.cal-reveal { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 20px var(--gut-r) 20px var(--gut); background: rgba(6, 12, 22, 0.84); animation: cal-fade 0.25s ease-out both; }
.cal-reveal.gone { animation: cal-fade-out 0.25s ease-in both; }
.cal-rv-card { width: 100%; max-width: 340px; text-align: center; }
.cal-rv-stage { position: relative; width: 240px; height: 240px; margin: 0 auto 8px; }
.cal-rv-rays { position: absolute; inset: -40px; background: radial-gradient(closest-side, #FFF8DC, #FFD66B 45%, #FF9A3D 80%, transparent); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; opacity: 0; animation: cal-rays-in 0.6s ease-out 0.75s forwards, au-spin 18s linear 0.75s infinite; }
.cal-rare .cal-rv-rays { background: radial-gradient(closest-side, #FFFFFF, #E7D4FF 35%, #B07CFF 65%, #6CE0FF 85%, transparent); }
.cal-rv-box { position: absolute; left: 50%; top: 50%; width: 150px; margin: -80px 0 0 -75px; animation: cal-shake 0.75s ease-in-out both, cal-box-out 0.35s ease-in 0.85s forwards; }
.cal-rv-box .gbox-lid { animation: cal-lid 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) 0.72s forwards; }
.cal-rv-item { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); animation: cal-pop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) 0.85s forwards; }
.cal-rv-item img { display: block; width: 150px; height: 150px; object-fit: contain; border-radius: 26px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45)); }
.cal-rv-ico { display: flex; flex-direction: column; align-items: center; gap: 4px; filter: drop-shadow(0 0 16px rgba(142, 197, 255, 0.7)); }
.cal-rv-ico b { font-family: var(--f-display); font-weight: 600; font-size: 34px; color: #FFFFFF; }
.cal-rv-sparks i { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; opacity: 0; transform: rotate(var(--a)) translateY(0); animation: cal-spark 0.9s ease-out var(--d) forwards; }
.cal-rv-eyebrow, .cal-rv-title, .cal-rv-line, .cal-rv-btns { opacity: 0; animation: cal-up 0.4s ease-out 1.05s forwards; }
.cal-rv-title { margin: 6px 0 4px; font-family: var(--f-display); font-weight: 600; font-size: 30px; line-height: 1.1; color: #FFFFFF; }
.cal-rv-line { margin: 0 0 4px; color: var(--soft); font-size: 14px; }
.cal-rv-btns { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.cal-rv-btns .btn { min-width: 128px; min-height: 50px; }
@keyframes cal-shake { 0% { transform: scale(0.6); opacity: 0; } 18% { transform: scale(1.04); opacity: 1; } 30% { transform: rotate(-7deg); } 42% { transform: rotate(7deg); } 54% { transform: rotate(-6deg); } 66% { transform: rotate(5deg); } 78% { transform: rotate(-3deg); } 100% { transform: rotate(0deg) scale(1.05); } }
@keyframes cal-lid { to { transform: translate(18px, -70px) rotate(24deg); opacity: 0; } }
@keyframes cal-box-out { to { transform: translateY(24px) scale(0.85); opacity: 0; } }
@keyframes cal-pop { to { transform: translate(-50%, -50%) scale(1); } }
@keyframes cal-rays-in { to { opacity: 0.85; } }
@keyframes cal-spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(0.6); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-130px) scale(1.1); } }
@keyframes cal-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cal-fade { from { opacity: 0; } }
@keyframes cal-fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cal-snow, .cal-rv-box, .cal-rv-sparks { display: none; }
  .cal-cell .cal-box, .cal-big, .cal-big-glow, .cal-mystery b { animation: none !important; }
  .cal-rv-item { animation: none; transform: translate(-50%, -50%); }
  .cal-rv-rays { animation: none; opacity: 0.7; }
  .cal-rv-eyebrow, .cal-rv-title, .cal-rv-line, .cal-rv-btns { animation: none; opacity: 1; }
}
/* paiement web (Stripe, 7/11) : la case de renoncement au droit de rétractation, un bouton (pas de case native : Samsung) */
.webpay-consent { display: flex; gap: 12px; align-items: flex-start; width: 100%; margin: 14px 0 16px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; background: rgba(255, 255, 255, 0.05); color: var(--soft); font: inherit; font-size: 14px; line-height: 1.45; text-align: left; cursor: pointer; }
.webpay-box { flex: none; width: 22px; height: 22px; margin-top: 1px; border: 2px solid #8EC5FF; border-radius: 7px; display: grid; place-items: center; }
.webpay-consent[aria-checked="true"] { border-color: rgba(142, 197, 255, 0.55); background: rgba(142, 197, 255, 0.1); }
.webpay-consent[aria-checked="true"] .webpay-box { background: #8EC5FF; }
.webpay-consent[aria-checked="true"] .webpay-box::after { content: ""; width: 10px; height: 6px; border: 3px solid #0E1C2E; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.modal-webpay .btn-cta:disabled { opacity: 0.45; }

/* ---------- Classement (7/11) : étoiles puis temps cumulé ; nom « Yuki », pseudo ou nom proposé ---------- */
.side-btn.side-2 { top: calc(136px + 92px); }
@media (max-height: 700px) { .side-btn.side-2 { top: calc(112px + 86px); } }
.bd-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 10px calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 4px var(--gut-r) 28px var(--gut); }
.bd-me { margin-bottom: 12px; text-align: center; }
.bd-me > p { margin: 4px 0 10px; color: var(--soft); font-size: 14px; }
.bd-me-card { padding: 14px 16px; border-radius: 18px; text-align: left; background: linear-gradient(135deg, rgba(255, 214, 107, 0.16), rgba(142, 197, 255, 0.1)); border: 1px solid rgba(255, 214, 107, 0.45); }
.bd-me-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bd-me-name { font-family: var(--f-display); font-weight: 600; font-size: 22px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-me-top .link-btn { min-height: 36px; flex: none; }
.bd-me-place { margin: 2px 0 0; font-weight: 800; color: #FFD66B; }
.bd-me-line { display: flex; gap: 16px; margin: 6px 0 0; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.bd-me-line span, .bd-stars, .bd-time { display: inline-flex; align-items: center; gap: 5px; }
.bd-me-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.bd-list { display: grid; gap: 6px; }
.bd-note { margin: 24px 0; text-align: center; color: var(--muted); }
.bd-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bd-row.me { border-color: #FFD66B; background: linear-gradient(90deg, rgba(255, 214, 107, 0.18), var(--panel) 70%); }
.bd-m1 { background: linear-gradient(90deg, rgba(255, 214, 107, 0.22), var(--panel) 75%); }
.bd-m2 { background: linear-gradient(90deg, rgba(220, 230, 242, 0.16), var(--panel) 75%); }
.bd-m3 { background: linear-gradient(90deg, rgba(233, 166, 107, 0.18), var(--panel) 75%); }
.bd-rank { display: flex; justify-content: center; font-family: var(--f-display); font-weight: 600; font-size: 17px; color: var(--soft); }
.bd-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; color: var(--ink); }
.bd-name em { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #FFD66B; color: #0E1C2E; vertical-align: 1px; }
.bd-yk { display: inline-flex; margin-right: 4px; vertical-align: -1px; }
.bd-stars { font-weight: 800; color: #FFE19A; }
.bd-time { font-size: 13px; font-weight: 700; color: var(--muted); }
@media (max-width: 360px) { .bd-row { grid-template-columns: 28px minmax(0, 1fr) auto; } .bd-time { grid-column: 2 / 4; justify-self: start; margin-top: -4px; } }
/* le nom */
.nm-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.nm-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 86px; padding: 12px 8px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.nm-opt b { font-size: 14px; }
.nm-opt[aria-checked="true"] { border-color: #FFD66B; background: linear-gradient(180deg, rgba(255, 214, 107, 0.16), var(--panel)); }
.nm-yuki { display: flex; height: 30px; }
.nm-more { margin-top: 10px; }
.nm-input { width: 100%; }
.nm-hint { margin: 6px 2px 0; font-size: 12.5px; color: var(--muted); }
.nm-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; max-height: 160px; overflow-y: auto; }
.nm-pick { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--panel-2); color: var(--ink); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.nm-pick[aria-pressed="true"] { border-color: #FFD66B; background: #FFD66B; color: #0E1C2E; }
.nm-msg { min-height: 20px; color: var(--coral); }
.nm-later { display: block; margin: 4px auto 0; color: var(--muted); }
.win-rec { display: inline-block; padding: 0 7px; border-radius: 999px; background: #FFD66B; color: #0E1C2E; font-size: 11px; }
.adm-board { display: flex; flex-wrap: wrap; gap: 4px 14px; }
