/* game.css — couche « jeu » (HUD, flottants, Carte du ciel, roue, cadran, cérémonies).
   Règles de perf : animations transform / opacity uniquement, aucune backdrop-filter, aucun filter animé.
   Les règles de placement des conteneurs (#hud, #fx, #fly, #overlay) sont posées avec :where() (spécificité 0)
   pour que style.css (intégration) puisse les surcharger sans conflit. */

/* ------------------------------------------------------------- calques (§2.1) */
:where(#fx) { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; contain: layout style; }
:where(#hud) { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
:where(#overlay) { position: fixed; top: 0; right: 0; bottom: 0; left: var(--rail-right, 0px); z-index: 50; pointer-events: none; }
:where(#fly) { position: fixed; inset: 0; z-index: 55; pointer-events: none; overflow: hidden; contain: layout style; }
@media (max-width: 900px) { :where(#overlay) { left: 0; top: var(--rail-bottom, 0px); } }
:where(#hudPlate) { position: absolute; top: 10px; left: 56px; }
:where(#hudCorner) { position: absolute; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); }
:where(#hudBubble) { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
:where(.char-slot) { position: absolute; inset: 0; pointer-events: none; }

#hud.g-off > * { visibility: hidden; }
#overlay > * { pointer-events: auto; }

/* feuille basse ouverte (téléphone) : rien ne recouvre le compositeur (§2.3) */
#hudCorner, #hudBubble { transition: opacity 0.2s ease, visibility 0s linear 0s; }
body.sheet-open #hudCorner, body.sheet-open #hudBubble { opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s linear 0.2s; }

.g-ico { width: 22px; height: 22px; display: block; flex: none; }

/* ------------------------------------------------------------- hexagone de niveau */
.g-hex {
  --c: var(--ice, #7ff0ff);
  position: relative; display: inline-grid; place-items: center;
  width: 24px; height: 26px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: color-mix(in srgb, var(--c) 85%, #000);
  color: #02030a;
  font: 700 12px/1 var(--f-display, 'Unbounded', system-ui, sans-serif);
  transform-style: preserve-3d;
}
.g-hex::before {
  content: ''; position: absolute; inset: 2px;
  clip-path: inherit; background: #070b1c; z-index: -1;
}
.g-hex b { position: relative; color: var(--ink, #eaf3ff); font-weight: 700; }
.g-hex { isolation: isolate; }
.g-hex[data-frame="silver"] { background: linear-gradient(135deg, #f4f7ff, #8e9bb5 55%, #f4f7ff); }
.g-hex[data-frame="gold"] { background: linear-gradient(135deg, #fff1c2, #ffb938 55%, #fff1c2); }
.g-hex[data-frame="aurora"] { background: linear-gradient(135deg, #5cffc8, #3cf2ff 40%, #a98bff 80%); }
.g-hex[data-frame="prism"] { background: conic-gradient(#ff4fd8, #ffc94a, #8cff6b, #3cf2ff, #a98bff, #ff4fd8); }
.g-hex.g-guard::after { content: '✦'; position: absolute; right: -11px; top: -6px; font-size: 10px; color: var(--gold, #ffd27a); }
.g-hex.g-flip { animation: g-flip 0.6s var(--ease, ease) both; }
@keyframes g-flip { 0% { transform: rotateY(0) scale(1); } 50% { transform: rotateY(90deg) scale(1.25); } 100% { transform: rotateY(0) scale(1); } }

/* hexagone au-dessus de chaque personnage (taille fixe grâce à --inv) */
.char-slot > .g-hex {
  position: absolute; left: 50%; top: 2px;
  margin-left: -12px;
  transform: scale(var(--inv, 1)); transform-origin: 50% 100%;
}
.char-slot > .g-hex.g-flip { animation: g-flip-inv 0.6s var(--ease, ease) both; }
@keyframes g-flip-inv { 0% { transform: scale(var(--inv, 1)) rotateY(0); } 50% { transform: scale(var(--inv, 1)) rotateY(90deg) scale(1.3); } 100% { transform: scale(var(--inv, 1)) rotateY(0); } }
.char.is-behind-tree .char-slot > * { opacity: 0.35; }

/* ------------------------------------------------------------- plaque joueur (#hudPlate) */
.g-plate { --c: var(--ice, #7ff0ff); display: inline-flex; align-items: center; gap: 8px; pointer-events: auto; }
.g-plate-main {
  position: relative; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(3, 6, 16, 0.75); display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.g-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.g-ring circle { fill: none; stroke-width: 3.6; stroke-linecap: round; }
.g-ring-bg { stroke: rgba(150, 200, 255, 0.16); }
.g-ring-fill { stroke: var(--c); transition: stroke-dashoffset 0.6s var(--ease, ease); }
.g-ring-ghost { opacity: 0.9; transition: stroke-dashoffset 0.6s var(--ease, ease); }
.g-plate-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: block; background: rgba(255, 255, 255, 0.04); }
.g-plate-av svg { width: 100%; height: 100%; display: block; transform: translateY(3px) scale(1.25); }
.g-hex-plate { position: absolute; right: -8px; bottom: -6px; }
.g-plate.g-compass .g-ring-fill { animation: g-twinkle 0.9s ease-in-out infinite; }
@keyframes g-twinkle { 50% { opacity: 0.35; } }
.g-plate-main.g-fillup .g-ring-fill { transition-duration: 1.6s; }
.g-sealed, .g-moon {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px 0 6px; border-radius: 14px;
  background: rgba(3, 6, 16, 0.75); border: 1px solid color-mix(in srgb, var(--gold, #ffd27a) 55%, transparent);
  color: var(--gold, #ffd27a); font: 600 13px/1 var(--f-mono, monospace);
}
.g-sealed .g-ico, .g-moon .g-ico { width: 17px; height: 17px; }
.g-moon { border-color: rgba(169, 139, 255, 0.6); color: #c9b8ff; }
.g-blinkx { animation: g-blinkx 0.5s steps(2, jump-none) 4; }
@keyframes g-blinkx { 50% { opacity: 0.2; } }
.g-plate-card {
  position: absolute; left: 0; top: calc(100% + 8px); min-width: 210px; padding: 10px 12px;
  background: rgba(3, 6, 16, 0.94); border: 1px solid var(--line2, rgba(150, 200, 255, 0.26)); border-radius: 12px;
  font: 500 12px/1.3 var(--f-mono, monospace); color: var(--mute, #c8d6f0);
  animation: g-pop 0.18s var(--ease, ease) both;
}
.g-card-xp { font: 700 16px/1.2 var(--f-mono, monospace); color: var(--ink, #eaf3ff); margin-bottom: 8px; }
.g-card-xp .g-prest { color: var(--gold, #ffd27a); font-style: normal; }
.g-card-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.g-card-row, .g-card-sealed { display: inline-flex; align-items: center; gap: 5px; }
.g-card-row .g-ico, .g-card-sealed .g-ico { width: 15px; height: 15px; color: var(--ice, #7ff0ff); }
.g-card-row b { color: var(--ink, #eaf3ff); }
.g-card-sealed { margin-top: 8px; margin-right: 10px; color: var(--gold, #ffd27a); }
.g-card-sealed .g-ico { color: var(--gold, #ffd27a); }
.g-card-moon, .g-card-moon .g-ico { color: #c9b8ff; }

/* ------------------------------------------------------------- bouton son (#hudSound) */
.g-sound { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink, #eaf3ff); pointer-events: auto; }
.g-sound .g-w1, .g-sound .g-w2 { animation: g-wave 1.6s ease-in-out infinite; }
.g-sound .g-w2 { animation-delay: 0.3s; }
.g-sound.g-muted { color: var(--faint, #7c8aa8); }
@keyframes g-wave { 50% { opacity: 0.25; } }

/* ------------------------------------------------------------- coin bas droite (#hudCorner) */
.g-corner { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.g-corner-row { display: flex; gap: 10px; align-items: center; }
.g-fab {
  position: relative; width: 52px; height: 52px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; pointer-events: auto;
  background: rgba(3, 6, 16, 0.86); border: 1px solid var(--line2, rgba(150, 200, 255, 0.26)); color: var(--ink, #eaf3ff);
  transition: transform 0.2s var(--ease, ease), opacity 0.25s ease, visibility 0s;
  -webkit-tap-highlight-color: transparent;
}
.g-fab:hover { transform: translateY(-2px); }
.g-fab .g-ico { width: 24px; height: 24px; }
.g-mob { display: none; }
.g-is-mobile .g-mob { display: grid; }
.g-is-mobile .g-fab { width: 54px; height: 54px; }
.g-fab-over[aria-pressed="true"] { border-color: var(--ice, #7ff0ff); color: var(--ice, #7ff0ff); }
.g-sky-btn { width: auto; min-width: 52px; padding: 0 12px 0 10px; border-radius: 26px; grid-auto-flow: column; gap: 6px; color: var(--ice, #7ff0ff); }
.g-sky-n { font: 600 13px/1 var(--f-mono, monospace); color: var(--ink, #eaf3ff); }
.g-hidden { opacity: 0; visibility: hidden; transform: scale(0.6); pointer-events: none; }
.g-sky-btn:not(.g-hidden) { animation: g-pop 0.35s var(--ease, ease); }
.g-pulse { animation: g-pulse 1.6s ease-in-out infinite; }
@keyframes g-pulse { 50% { transform: scale(1.1); } }
.g-new::after { content: ''; position: absolute; right: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold, #ffd27a); box-shadow: 0 0 0 2px #02030a; }
.g-join {
  --c: var(--ice, #7ff0ff); position: relative; display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 14px 0 6px;
  border-radius: 24px; border: 2px solid var(--c); background: rgba(3, 6, 16, 0.9); color: var(--c); pointer-events: auto; overflow: hidden;
  animation: g-pop 0.3s var(--ease, ease);
}
.g-join-av { position: relative; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
.g-join-av svg { width: 100%; height: 100%; }
.g-join-g { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; color: var(--gold, #ffd27a); }
.g-join-g .g-ico { width: 18px; height: 18px; }
.g-join-ring { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); transform-origin: 0 50%; animation: g-drain var(--ms, 8000ms) linear forwards; }
@keyframes g-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ------------------------------------------------------------- bulle contextuelle (#hudBubble) */
.g-bubble-host { opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(10px); transition: opacity 0.2s ease, transform 0.25s var(--ease, ease), visibility 0s linear 0.25s; }
.g-bubble-host.g-on { opacity: 1; visibility: visible; transform: translateX(-50%); transition: opacity 0.2s ease, transform 0.25s var(--ease, ease), visibility 0s; }
.g-bubble {
  width: 64px; height: 64px; border-radius: 50%; padding: 0; display: grid; place-items: center; pointer-events: auto;
  background: rgba(3, 6, 16, 0.9); border: 2px solid var(--ice, #7ff0ff); color: var(--ice, #7ff0ff);
  box-shadow: 0 0 22px rgba(127, 240, 255, 0.25);
  animation: g-bob 2s ease-in-out infinite;
}
.g-bubble .g-ico { width: 32px; height: 32px; }
@keyframes g-bob { 50% { transform: translateY(-4px); } }

/* ------------------------------------------------------------- flottants (#fly) */
.g-float { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform, opacity; opacity: 0; }
.g-float b { display: block; transform: translate(-50%, -50%); white-space: nowrap; font: 600 16px/1 var(--f-mono, 'JetBrains Mono', monospace); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7); }
.g-f-gd b { color: var(--gold, #ffd27a); font-size: 18px; }
.g-f-cy b { color: var(--ice, #7ff0ff); }
.g-f-wh b { color: #f4f7ff; font-size: 11px; }
.g-f-gy b { color: #9aa6bd; }
.g-f-lock b { color: var(--gold, #ffd27a); display: inline-flex; align-items: center; gap: 3px; font-size: 17px; }
.g-f-lock .g-ico { width: 14px; height: 14px; }
.g-f-dot b { width: 8px; height: 8px; border-radius: 50%; background: #9aa6bd; }
.g-tiny b { font-size: 11px; }
.g-flyer { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform, opacity; }
.g-flyer > * { display: grid; place-items: center; transform: translate(-50%, -50%); }
.g-reward, .g-starcard {
  --c: var(--gold, #ffd27a);
  width: 40px; height: 40px; border-radius: 50%; background: rgba(3, 6, 16, 0.9); border: 2px solid var(--c); color: var(--c);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 60%, transparent);
}
.g-starcard .g-picto { width: 30px; height: 30px; }
.g-pkg { width: 34px; height: 34px; color: var(--gold, #ffd27a); position: relative; }
.g-pkg .g-ico { width: 34px; height: 34px; }
.g-ribbon { position: absolute; inset: 0; width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: g-ribbon 0.4s 0.1s ease forwards; }
@keyframes g-ribbon { to { stroke-dashoffset: 0; } }
.g-undo .g-pkg { opacity: 0.8; }
.g-ball { display: block; width: 14px; height: 14px; border-radius: 50%; background: #f4f7ff; box-shadow: 0 0 8px #bfe9ff; }
.g-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.95) 100%); opacity: 0; }
.g-edge { --c: var(--gold, #ffd27a); position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--c), inset 0 0 60px color-mix(in srgb, var(--c) 45%, transparent); opacity: 0; }
.g-obline { position: absolute; left: 0; top: 0; height: 0; border-top: 2px dashed var(--gold, #ffd27a); transform-origin: 0 50%; animation: g-blinkx 0.5s steps(2, jump-none) 4; }

/* ------------------------------------------------------------- marqueurs projetés (#fx) */
.g-mark { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
button.g-mark { padding: 0; border: 0; background: none; color: inherit; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.g-mark > * { pointer-events: none; }
.g-flake { width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; display: grid; place-items: center; }
.g-flake-in { width: 40px; height: 40px; color: var(--gold, #ffd27a); filter: drop-shadow(0 0 8px rgba(255, 210, 122, 0.85)); animation: g-rot 4s linear infinite; }
.g-flake-in .g-ico { width: 40px; height: 40px; }
@keyframes g-rot { to { transform: rotate(360deg); } }
.g-ghost-hand { position: absolute; left: 50px; top: 46px; width: 26px; height: 26px; color: #f4f7ff; opacity: 0.75; animation: g-tap 1.1s ease-in-out infinite; }
.g-ghost-hand .g-ico { width: 26px; height: 26px; }
@keyframes g-tap { 50% { transform: translate(-6px, -6px) scale(0.9); } }
.g-shoot { width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; }
.g-shoot-head { position: absolute; left: 34px; top: 34px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px 4px rgba(191, 233, 255, 0.9); }
.g-shoot-tail { position: absolute; right: 40px; top: 38px; width: 90px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(191, 233, 255, 0.9)); }
.g-shoot.g-demo { pointer-events: none; }
.g-avent { width: 52px; height: 52px; margin: -46px 0 0 -26px; display: grid; place-items: center; color: var(--gold, #ffd27a); filter: drop-shadow(0 0 10px rgba(255, 210, 122, 0.8)); animation: g-bob 1.8s ease-in-out infinite; }
.g-avent .g-ico { width: 38px; height: 38px; }
.g-entry { width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; display: grid; place-items: center; color: var(--ice, #7ff0ff); }
.g-entry::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid currentColor; animation: g-ringpulse 1.8s ease-out infinite; }
.g-entry .g-ico { width: 20px; height: 20px; }
.g-entry.g-chime::before { animation-duration: 0.9s; }
.g-orb { color: var(--gold, #ffd27a); }
.g-orb-ball { position: absolute; inset: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6d6, #ffc94a 55%, #a86b00); box-shadow: 0 0 14px rgba(255, 201, 74, 0.8); }
.g-orb .g-ico { position: relative; width: 14px; height: 14px; color: #3a2500; }
.g-entry-star { color: var(--gold, #ffd27a); }
@keyframes g-ringpulse { 0% { transform: scale(0.7); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.g-door { width: 48px; height: 48px; margin: -44px 0 0 -24px; display: grid; place-items: center; color: #a98bff; filter: drop-shadow(0 0 10px rgba(169, 139, 255, 0.9)); }
.g-door .g-ico { width: 40px; height: 40px; }
.g-antenna { display: flex; flex-direction: column; align-items: center; gap: 4px; transform-origin: 50% 100%; }
.g-ant-head { --c: #fff; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; overflow: hidden; border: 2px solid var(--c); background: rgba(3, 6, 16, 0.8); }
.g-ant-head:empty { opacity: 0; }
.g-ant-head svg { width: 100%; height: 100%; transform: translateY(2px) scale(1.25); }
.g-ant-dots { display: flex; gap: 4px; margin-left: -30px; }
.g-ant-dots i { --c: #fff; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c); opacity: 0.6; }
.g-ant-dots i.on { background: var(--c); opacity: 1; }
.g-freq b { display: block; transform: translate(-50%, -50%); font: 700 22px/1 var(--f-mono, monospace); color: var(--ice, #7ff0ff); text-shadow: 0 0 10px rgba(127, 240, 255, 0.9); letter-spacing: 0.1em; }
.g-ornbub { display: inline-flex; align-items: center; gap: 8px; max-width: 240px; padding: 6px 12px 6px 6px; margin: -64px 0 0 -20px; border-radius: 22px; background: rgba(3, 6, 16, 0.94); border: 1px solid var(--line2, rgba(150, 200, 255, 0.26)); color: var(--ink, #eaf3ff); animation: g-pop 0.2s var(--ease, ease); }
.g-ornbub-av { --c: #fff; flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; border: 2px solid var(--c); }
.g-ornbub-av svg { width: 100%; height: 100%; transform: translateY(2px) scale(1.25); }
.g-ornbub-t { font: 500 13px/1.25 var(--f-body, system-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.g-obwalk { width: 0; height: 0; }
.g-obring { position: absolute; left: -60px; top: -24px; width: 120px; height: 48px; border-radius: 50%; border: 3px solid var(--ice, #7ff0ff); animation: g-ringpulse 1.5s ease-out infinite; }
.g-ob-keys { position: absolute; left: -45px; top: -100px; width: 90px; height: 64px; display: grid; grid-template-columns: repeat(3, 28px); grid-template-rows: 28px 28px; gap: 3px; justify-content: center; }
.g-ob-keys i { display: grid; place-items: center; border: 2px solid var(--ice, #7ff0ff); border-radius: 6px; color: var(--ice, #7ff0ff); font: 700 13px/1 var(--f-mono, monospace); font-style: normal; animation: g-press 1.6s ease-in-out infinite; }
.g-ob-keys i:nth-child(1) { grid-column: 2; grid-row: 1; }
.g-ob-keys i:nth-child(2) { grid-column: 1; grid-row: 2; animation-delay: 0.4s; }
.g-ob-keys i:nth-child(3) { grid-column: 2; grid-row: 2; animation-delay: 0.8s; }
.g-ob-keys i:nth-child(4) { grid-column: 3; grid-row: 2; animation-delay: 1.2s; }
@keyframes g-press { 0%, 30%, 100% { transform: translateY(0); } 15% { transform: translateY(3px) scale(0.92); } }
.g-ob-finger { position: absolute; left: -14px; top: -70px; width: 30px; height: 30px; color: #f4f7ff; animation: g-tap 1.1s ease-in-out infinite; }
.g-ob-finger .g-ico, .g-starhand .g-ico { width: 30px; height: 30px; }
.g-starhand { width: 30px; height: 30px; color: #f4f7ff; animation: g-tap 1s ease-in-out infinite; }
.g-pet { position: absolute; left: -30px; top: -60px; width: 60px; height: 60px; transform-origin: 50% 100%; pointer-events: none; will-change: transform; }
.g-pet svg { width: 100%; height: 100%; display: block; }
.g-petdot { --c: #fff; display: block; width: 26px; height: 26px; margin: 30px auto 0; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.g-offarrow { --c: #fff; position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
/* Rencontre (§7) : arc de lumière aux deux couleurs entre deux persos proches (local). Placé par transform seulement
   (translate → rotate → scale) depuis son coin bas gauche ; trait non déformé (non-scaling-stroke). */
.g-meet { position: absolute; left: 0; top: -40px; width: 100px; height: 40px; transform-origin: 0 40px; pointer-events: none; opacity: 0; transition: opacity 0.4s ease; will-change: transform, opacity; }
.g-meet.g-on { opacity: 1; }
.g-meet svg { display: block; width: 100%; height: 100%; overflow: visible; }
.g-meet path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.g-meet-glow { stroke-width: 9; opacity: 0.28; animation: g-meetglow 1.6s ease-in-out infinite; }
.g-meet-core { stroke-width: 2.5; }
@keyframes g-meetglow { 50% { opacity: 0.55; } }
/* onboarding §9.4 : boule fantôme du champ vers le sapin (#fly) ; pleine au 1er souhait */
.g-ghostball i { display: grid; place-items: center; width: 26px; height: 26px; color: var(--c, #7ff0ff); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c, #7ff0ff) 45%, transparent), transparent); }
.g-ghostball .g-ico { width: 22px; height: 22px; }
.g-ghostball:not(.g-real) .g-ico { stroke-dasharray: 3 3; }
.g-ghostball.g-real i { background: radial-gradient(closest-side, var(--c, #7ff0ff), color-mix(in srgb, var(--c, #7ff0ff) 30%, transparent) 70%, transparent); color: #fff; }
.g-ballpop { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.g-ballpop::after { content: ''; position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--c, #7ff0ff); animation: g-ballpop 0.55s ease-out forwards; }
@keyframes g-ballpop { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.g-offarrow-av { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: 2px solid var(--c); background: rgba(3, 6, 16, 0.85); }
.g-offarrow-av svg { width: 100%; height: 100%; transform: translateY(2px) scale(1.25); }
.g-offarrow-tip { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; }
.g-offarrow-tip::after { content: ''; position: absolute; right: -4px; top: 18px; border: 6px solid transparent; border-left: 9px solid var(--c); }
.g-ghost { position: absolute; left: -50px; top: -120px; width: 100px; height: 120px; transform-origin: 50% 100%; opacity: 0; pointer-events: none; }
.g-ghost > svg { width: 100%; height: 100%; }
.g-ghost-tap { position: absolute; right: -20px; top: 10px; width: 40px; height: 40px; color: #f4f7ff; animation: g-tap 0.9s ease-in-out infinite; }
.g-ghost-tap .g-ico { width: 40px; height: 40px; }

/* ------------------------------------------------------------- effets dans charSlot (héritent du transform du perso) */
.g-emo-bub, .g-spark, .g-col, .g-wavewait, .g-mgring, .g-sleep, .g-prog, .g-sack, .g-splash { position: absolute; pointer-events: none; }
.g-emo-bub {
  --c: #fff; left: 50%; top: -30px; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(3, 6, 16, 0.92); border: 2px solid var(--c); color: var(--c);
  transform-origin: 50% 100%; animation: g-emo 2.5s var(--ease, ease) both;
}
.g-emo-bub .g-ico { width: 26px; height: 26px; }
@keyframes g-emo { 0% { transform: scale(calc(var(--inv, 1) * 0.3)); opacity: 0; } 12% { transform: scale(calc(var(--inv, 1) * 1.15)); opacity: 1; } 20%, 85% { transform: scale(var(--inv, 1)); opacity: 1; } 100% { transform: translateY(-10px) scale(var(--inv, 1)); opacity: 0; } }
.g-spark { --c: #fff; left: 50%; bottom: 30px; width: 4px; height: 90px; margin-left: -2px; border-radius: 2px; background: linear-gradient(to top, transparent, var(--c)); transform-origin: 50% 100%; animation: g-spark 1.3s ease-out both; }
@keyframes g-spark { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1) translateY(-20px); opacity: 1; } 100% { transform: scaleY(1) translateY(-60px); opacity: 0; } }
.g-col { --c: #fff; left: 15%; right: 15%; bottom: 0; height: 320px; border-radius: 40px 40px 0 0; background: linear-gradient(to top, color-mix(in srgb, var(--c) 70%, transparent), transparent); transform-origin: 50% 100%; animation: g-col 1.4s ease-out both; }
@keyframes g-col { 0% { transform: scaleY(0); opacity: 0.9; } 40% { transform: scaleY(1); opacity: 0.9; } 100% { transform: scaleY(1); opacity: 0; } }
.g-wavewait { left: 50%; top: -34px; display: flex; gap: 2px; transform: translateX(-50%) scale(var(--inv, 1)); transform-origin: 50% 100%; }
.g-wavewait i { --c: #fff; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: rgba(3, 6, 16, 0.85); border: 1.5px solid var(--c); animation: g-sway 2.4s ease-in-out infinite; }
.g-wavewait .g-ico { width: 18px; height: 18px; }
@keyframes g-sway { 50% { transform: rotate(12deg); } }
.g-mgring { --c: #fff; left: -10%; right: -10%; bottom: -14px; height: 30px; border-radius: 50%; border: 3px solid var(--c); display: grid; place-items: center; color: var(--c); animation: g-ringpulse 1.2s ease-out infinite; }
.g-mgring .g-ico { width: 16px; height: 16px; transform: translateY(-34px) scale(var(--inv, 1)); }
.g-sleep { left: 50%; top: 4px; width: 60px; margin-left: -30px; height: 20px; transform: scale(var(--inv, 1)); transform-origin: 50% 100%; }
.g-snowcap { position: absolute; left: 8px; right: 8px; top: 8px; height: 14px; border-radius: 50% 50% 30% 30%; background: #f4f7ff; box-shadow: 0 0 6px #bfe9ff; transform-origin: 50% 100%; animation: g-pile 6s ease-out both; }
@keyframes g-pile { from { transform: scaleY(0.1); } to { transform: scaleY(1); } }
.g-zz { position: absolute; right: -6px; top: -16px; font: 700 14px/1 var(--f-mono, monospace); font-style: normal; color: #bfe9ff; animation: zz 2.2s ease-in-out infinite; }
.g-prog { left: 50%; top: -48px; display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 8px 0 4px; border-radius: 17px; background: rgba(3, 6, 16, 0.92); border: 1px solid var(--line2, rgba(150, 200, 255, 0.26)); color: var(--ice, #7ff0ff); transform: translateX(-50%) scale(var(--inv, 1)); transform-origin: 50% 100%; animation: g-fade 0.2s ease both; }
.g-prog-pic { width: 26px; height: 26px; }
.g-prog-pic .g-picto { width: 26px; height: 26px; }
.g-prog-ring { --p: 0; width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--ice, #7ff0ff) calc(var(--p) * 360deg), rgba(150, 200, 255, 0.2) 0); }
.g-prog b { font: 600 12px/1 var(--f-mono, monospace); color: var(--ink, #eaf3ff); }
.g-sack { right: -8px; top: 34px; width: 34px; height: 34px; color: #c98b4a; transform: scale(var(--inv, 1)); }
.g-sack .g-ico { width: 34px; height: 34px; }
.g-splash { left: 30%; top: 20px; width: 40%; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, #f4f7ff, transparent); animation: g-fade-out 0.7s ease-out both; }
@keyframes g-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes g-fade-out { from { opacity: 1; transform: scale(0.6); } to { opacity: 0; transform: scale(1.4); } }
@keyframes g-pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------- calques plein écran (#overlay) */
.g-codex, .g-info, .g-games, .g-crypt, .g-dial, .g-result {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px;
  background: rgba(2, 3, 10, 0.8); animation: g-fade 0.2s ease both; overflow: auto;
}
.g-codex { background: rgba(2, 3, 10, 0.94); place-items: stretch; padding: 0; }
.g-x { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line2, rgba(150, 200, 255, 0.26)); background: rgba(3, 6, 16, 0.9); color: var(--ink, #eaf3ff); display: grid; place-items: center; padding: 0; z-index: 2; }
.g-codex-in { position: relative; display: flex; flex-direction: column; min-height: 100%; }
.g-codex-bar { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 64px 10px 16px; }
.g-codex-n { display: inline-flex; align-items: center; gap: 8px; color: var(--ice, #7ff0ff); font: 700 18px/1 var(--f-mono, monospace); }
.g-codex-n b { color: var(--ink, #eaf3ff); }
.g-codex-tabs { display: flex; gap: 6px; margin-left: auto; }
.g-tab { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line, rgba(150, 200, 255, 0.13)); background: rgba(3, 6, 16, 0.7); color: var(--mute, #c8d6f0); display: grid; place-items: center; padding: 0; }
.g-tab.on { border-color: var(--ice, #7ff0ff); color: var(--ice, #7ff0ff); }
.g-codex-sky { flex: 1; display: grid; place-items: center; padding: 0 8px 12px; min-height: 0; }
.g-sky { width: min(100%, calc(100dvh - 90px)); height: auto; aspect-ratio: 1; display: block; }
.g-axis { stroke: rgba(150, 200, 255, 0.14); stroke-width: 2; }
.g-axis.g-done { stroke: rgba(127, 240, 255, 0.55); stroke-width: 3; }
.g-dendrite { stroke: rgba(150, 200, 255, 0.1); stroke-width: 2; }
.g-link { stroke: rgba(150, 200, 255, 0.12); stroke-width: 2; }
.g-link.g-half { stroke: rgba(150, 200, 255, 0.4); stroke-dasharray: 6 6; }
.g-link.g-lit { stroke: var(--gold, #ffd27a); stroke-width: 3; }
.g-node { --c: #fff; color: var(--c); cursor: pointer; outline: none; }
.g-node .g-hit { fill: transparent; stroke: none; }
.g-node.g-dark { cursor: default; }
.g-node .g-dot { fill: rgba(214, 228, 255, 0.28); stroke: none; }
.g-node.g-found > path, .g-node.g-found > circle:not(.g-hit):not(.g-finder) { fill: var(--c); stroke: var(--c); stroke-width: 2; }
.g-node.g-found > circle[stroke-width="4"] { fill: none; }
.g-node.g-hint > path, .g-node.g-hint > circle:not(.g-hit) { fill: rgba(3, 6, 16, 0.9); stroke: var(--c); stroke-width: 2.5; }
.g-node.g-locked > path, .g-node.g-locked > circle:not(.g-hit) { fill: rgba(3, 6, 16, 0.9); stroke: rgba(214, 228, 255, 0.35); stroke-width: 2; }
.g-node.g-secret > path, .g-node.g-secret > circle:not(.g-hit) { fill: none; stroke: #ff5fae; stroke-width: 2; stroke-dasharray: 4 4; }
.g-node:focus-visible > :not(.g-hit) { stroke: #fff; }
.g-hintpic { color: var(--c); }
.g-hintpic.g-locked { color: rgba(214, 228, 255, 0.55); }
.g-hintpic.g-found { opacity: 0.8; }
.g-finder { stroke: #02030a; stroke-width: 1.5; }
.g-tapf { animation: g-tap 1.1s ease-in-out infinite; transform-box: fill-box; }
.g-blink { animation: g-wave 1.2s ease-in-out infinite; }
.g-d1 { animation-delay: 0.3s; } .g-d2 { animation-delay: 0.6s; } .g-d3 { animation-delay: 0.9s; }
.g-slide { animation: g-slide 2s ease-in-out infinite; }
@keyframes g-slide { 50% { transform: translateX(4px); } }
.g-spin { animation: g-rot 1.4s linear infinite; transform-box: view-box; transform-origin: 20px 22px; }
.g-orbit { animation: g-rot 3s linear infinite; transform-box: view-box; transform-origin: 20px 22px; }
.g-wavea { animation: g-sway 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.g-codex-sky.g-first .g-node:not(.g-centre) * { animation-play-state: paused; }
.g-codex-page { flex: 1; padding: 8px 16px 24px; }
.g-help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.g-help-pic { --c: #fff; aspect-ratio: 1; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); background: rgba(3, 6, 16, 0.7); color: var(--c); padding: 10px; }
.g-help-pic .g-picto { width: 100%; height: 100%; }
.g-help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.g-help-card { border-radius: 16px; border: 1px solid var(--line2, rgba(150, 200, 255, 0.26)); background: rgba(3, 6, 16, 0.75); color: var(--ink, #eaf3ff); padding: 8px; }
.g-card-svg { width: 100%; height: auto; display: block; }

/* cartes d'info / indices */
.g-info-card {
  --c: var(--ice, #7ff0ff); position: relative; width: min(92vw, 420px); padding: 54px 18px 18px; border-radius: 20px;
  background: rgba(5, 9, 22, 0.98); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); color: var(--ink, #eaf3ff);
  animation: g-cardflip 0.4s var(--ease, ease) both; transform-origin: 50% 50%;
}
@keyframes g-cardflip { from { transform: perspective(800px) rotateY(90deg); opacity: 0; } to { transform: perspective(800px) rotateY(0); opacity: 1; } }
.g-hint-big { display: grid; place-items: center; color: var(--c); }
.g-hint-big .g-picto, .g-hint-big > svg { width: 180px; height: 180px; }
.g-play { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold, #ffd27a); background: rgba(3, 6, 16, 0.9); color: var(--gold, #ffd27a); padding: 0; }
.g-play-big { display: inline-flex; gap: 8px; width: auto; padding: 0 18px; border-radius: 24px; margin: 14px auto 0; }
.g-info-card .g-play-big { display: flex; }

/* records */
.g-recs { display: grid; gap: 12px; }
.g-rec { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line, rgba(150, 200, 255, 0.13)); background: rgba(3, 6, 16, 0.7); }
.g-rec-ico { color: var(--gold, #ffd27a); }
.g-rec-ico .g-ico { width: 36px; height: 36px; }
.g-rec-fam, .g-result-fam, .g-podium { display: flex; flex-wrap: wrap; gap: 8px; }
.g-rec-row { --c: #fff; position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 3px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); font: 600 13px/1 var(--f-mono, monospace); }
.g-rec-row.g-top { border-color: var(--gold, #ffd27a); }
.g-rec-av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, 0.05); }
.g-rec-av svg { width: 100%; height: 100%; transform: translateY(2px) scale(1.25); }
.g-crown { position: absolute; left: 4px; top: -11px; width: 18px; height: 14px; color: var(--gold, #ffd27a); }
.g-crown .g-ico { width: 18px; height: 14px; }
.g-locked { display: inline-flex; align-items: center; gap: 4px; color: var(--faint, #7c8aa8); font: 600 13px/1 var(--f-mono, monospace); }
.g-medal { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.3); }
.g-medal-bronze { background: radial-gradient(circle at 35% 35%, #ffd2a8, #b8733a); }
.g-medal-argent { background: radial-gradient(circle at 35% 35%, #ffffff, #9aa6bd); }
.g-medal-or { background: radial-gradient(circle at 35% 35%, #fff4c4, #e6a521); }

/* choix des mini-jeux */
.g-games-in, .g-crypt-in, .g-dial-in, .g-result-in { position: relative; padding: 56px 18px 18px; border-radius: 20px; background: rgba(5, 9, 22, 0.98); border: 1px solid var(--line2, rgba(150, 200, 255, 0.26)); animation: g-pop 0.25s var(--ease, ease) both; }
.g-games-in { display: grid; grid-template-columns: repeat(3, minmax(100px, 160px)); gap: 12px; }
@media (max-width: 520px) { .g-games-in { grid-template-columns: 1fr; width: min(92vw, 320px); } }
.g-game { display: grid; justify-items: center; gap: 10px; padding: 16px 10px; border-radius: 18px; border: 1px solid var(--line2, rgba(150, 200, 255, 0.26)); background: rgba(3, 6, 16, 0.7); color: var(--gold, #ffd27a); }
.g-game-ico .g-ico { width: 56px; height: 56px; }
.g-game-best { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--f-mono, monospace); color: var(--ink, #eaf3ff); }
.g-game.g-locked { color: var(--faint, #7c8aa8); cursor: not-allowed; }
.g-game-lock { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--f-mono, monospace); }
.g-or { width: 26px; height: 26px; display: inline-block; }
.g-or .g-picto { width: 26px; height: 26px; }

/* Salle des records */
.g-crypt-in { width: min(94vw, 760px); border-color: rgba(169, 139, 255, 0.5); }
.g-crypt-eggs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; margin-top: 16px; }
.g-ped { --c: #fff; display: grid; justify-items: center; gap: 4px; padding: 8px 4px 6px; border-radius: 12px 12px 4px 4px; background: linear-gradient(to top, rgba(169, 139, 255, 0.18), rgba(3, 6, 16, 0.6)); color: var(--c); }
.g-ped-pic { width: 40px; height: 40px; display: grid; place-items: center; }
.g-ped-pic .g-picto, .g-ped-pic svg { width: 40px; height: 40px; }
.g-ped-pic .g-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(214, 228, 255, 0.25); }
.g-ped-av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; }
.g-ped-av svg { width: 100%; height: 100%; transform: translateY(2px) scale(1.25); }
.g-ped-8 { color: #ffd27a; border: 1px dashed rgba(255, 210, 122, 0.4); }
.g-key8 { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; border: 2px solid currentColor; font: 700 14px/1 var(--f-mono, monospace); }

/* cadran de fréquence */
.g-dial-in { display: grid; justify-items: center; gap: 16px; border-color: rgba(127, 240, 255, 0.5); }
.g-wheels { display: flex; gap: 10px; }
.g-wheel { display: grid; justify-items: center; gap: 4px; padding: 6px; border-radius: 14px; border: 1px solid var(--line, rgba(150, 200, 255, 0.13)); }
.g-wheel.on { border-color: var(--ice, #7ff0ff); }
.g-wheel button { width: 52px; height: 40px; border-radius: 10px; border: 1px solid var(--line2, rgba(150, 200, 255, 0.26)); background: rgba(3, 6, 16, 0.8); color: var(--ice, #7ff0ff); padding: 0; }
.g-digit { display: grid; place-items: center; width: 52px; height: 64px; font: 700 40px/1 var(--f-mono, monospace); color: var(--ink, #eaf3ff); touch-action: none; cursor: ns-resize; user-select: none; }
.g-emit { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--ice, #7ff0ff); background: rgba(3, 6, 16, 0.9); color: var(--ice, #7ff0ff); display: grid; place-items: center; padding: 0; }
.g-emit .g-ico { width: 32px; height: 32px; }

/* roue d'émotes */
.g-wheelwrap { position: fixed; inset: 0; z-index: 3; pointer-events: auto; }
.g-wheel-ring { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.g-emo {
  position: absolute; left: -28px; top: -28px; width: 56px; height: 56px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; background: rgba(3, 6, 16, 0.95); border: 2px solid var(--ice, #7ff0ff); color: var(--ice, #7ff0ff);
  transform: translate(var(--x, 0), var(--y, 0)); animation: g-emopop 0.22s var(--ease, ease) both;
}
.g-emo .g-ico { width: 28px; height: 28px; }
.g-emo-c { border-color: var(--gold, #ffd27a); color: var(--gold, #ffd27a); }
.g-emo.g-locked { border-color: rgba(214, 228, 255, 0.2); color: rgba(214, 228, 255, 0.3); }
.g-emo-lock { position: absolute; right: -6px; bottom: -6px; display: inline-flex; align-items: center; gap: 1px; padding: 2px 5px 2px 3px; border-radius: 10px; background: #070b1c; color: var(--mute, #c8d6f0); font: 700 11px/1 var(--f-mono, monospace); }
.g-emo-lock .g-ico { width: 12px; height: 12px; }
.g-emo-egg .g-picto { width: 16px; height: 16px; }
@keyframes g-emopop { from { transform: translate(0, 0) scale(0.4); opacity: 0; } to { transform: translate(var(--x, 0), var(--y, 0)); opacity: 1; } }
body.g-aiming #stage .char:not(.is-me) { cursor: crosshair; }

/* résultat de mini-jeu */
.g-result-in { display: grid; justify-items: center; gap: 10px; min-width: 260px; text-align: center; }
.g-result-ico { color: var(--gold, #ffd27a); }
.g-result-ico .g-ico { width: 48px; height: 48px; }
.g-result-score { font: 700 44px/1 var(--f-mono, monospace); color: var(--ink, #eaf3ff); }
.g-result-in > .g-medal { width: 32px; height: 32px; }
.g-result-rec { color: var(--gold, #ffd27a); }
.g-result-rec .g-ico { width: 34px; height: 34px; }
.g-result-xp { font: 700 20px/1 var(--f-mono, monospace); color: var(--gold, #ffd27a); }

/* Grand déballage */
.g-reveal { position: absolute; inset: 0; display: grid; place-items: center; }
.g-reveal-pkg { position: relative; width: 160px; height: 160px; color: var(--gold, #ffd27a); animation: g-pop 0.5s var(--ease, ease) both; }
.g-reveal-pkg > .g-ico { width: 160px; height: 160px; }
.g-rib { position: absolute; top: 46%; width: 50%; height: 10px; background: #ff4d6d; }
.g-rib-l { left: 0; transform-origin: 0 50%; }
.g-rib-r { right: 0; transform-origin: 100% 50%; }
.g-scissors { position: absolute; left: -60px; top: calc(46% - 20px); width: 44px; height: 44px; color: #f4f7ff; animation: g-cutmove 0.9s ease-in-out both; }
@keyframes g-cutmove { from { transform: translateX(0); } to { transform: translateX(140px); } }
.g-reveal.g-cut .g-rib-l { animation: g-ribfall-l 1s ease-in both; }
.g-reveal.g-cut .g-rib-r { animation: g-ribfall-r 1s ease-in both; }
.g-reveal.g-cut .g-reveal-pkg { animation: g-open 2.6s 0.6s ease both; }
@keyframes g-ribfall-l { to { transform: translateY(120px) rotate(-40deg); opacity: 0; } }
@keyframes g-ribfall-r { to { transform: translateY(120px) rotate(40deg); opacity: 0; } }
@keyframes g-open { 0% { transform: scale(1); opacity: 1; } 30% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }

/* logo / compte à rebours */
.g-blink7 { animation: g-blink7 60s linear infinite; }
@keyframes g-blink7 { 0%, 1.2%, 2.4%, 3.6%, 4.8%, 6%, 7.2%, 8.4% { opacity: 1; } 0.6%, 1.8%, 3%, 4.2%, 5.4%, 6.6%, 7.8% { opacity: 0.1; } }
.g-cd-gold { color: var(--gold, #ffd27a) !important; animation: g-cdflip 0.8s var(--ease, ease); }
@keyframes g-cdflip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }

@media (max-width: 900px) {
  :where(#hudPlate) { top: 13px; left: 44px; }
  :where(#hudBubble) { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .g-plate-main { width: 40px; height: 40px; }
  .g-plate-av { width: 32px; height: 32px; }
  .g-hex-plate { transform: scale(0.85); }
}
/* téléphone paysage (§2.3, hauteur < 500 px) : barre 52 px, boutons flottants en colonne à droite */
@media (max-height: 499.98px) and (orientation: landscape) {
  :where(#overlay) { left: var(--rail-right, 0px); top: 0; }
  :where(#hudPlate) { top: 6px; left: calc(54px + env(safe-area-inset-left)); }
  :where(#hudBubble) { bottom: calc(14px + env(safe-area-inset-bottom)); }
  :where(#hudCorner) { right: calc(12px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); }
  .g-corner { gap: 8px; }
  .g-corner-row { flex-direction: column; align-items: flex-end; gap: 8px; }
  .g-fab, .g-is-mobile .g-fab { width: 48px; height: 48px; }
  .g-corner .g-sky-btn { width: auto; min-width: 48px; height: 48px; border-radius: 24px; }
  .g-bubble { width: 52px; height: 52px; }
  .g-bubble .g-ico { width: 26px; height: 26px; }
  .g-plate-main { width: 40px; height: 40px; }
  .g-plate-av { width: 32px; height: 32px; }
  .g-hex-plate { transform: scale(0.85); }
}

/* ------------------------------------------------------------- mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  .g-sound .g-w1, .g-sound .g-w2, .g-bubble, .g-flake-in, .g-avent, .g-entry::before, .g-pulse, .g-tapf, .g-blink, .g-slide, .g-spin,
  .g-orbit, .g-wavea, .g-wavewait i, .g-mgring, .g-ghost-hand, .g-ob-keys i, .g-ob-finger, .g-starhand, .g-obring, .g-blink7, .g-meet-glow { animation: none; }
  .g-hex.g-flip, .char-slot > .g-hex.g-flip { animation: none; }
  .g-info-card, .g-emo, .g-reveal-pkg { animation: g-fade 0.2s ease both; }
}
