/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   SYNAXIS — le seuil (02/11/2026)
   À l'arrivée, on ne voit que l'en-tête et l'astrolabe (sa consigne, le Cristal Source, les réglages).
   Ce qui était dessous passe en haut, dans « Mon espace » (plateau.page.js, paintMeMenu) :
   - les rubriques du Codex : le Codex s'ouvre par-dessus l'astrolabe (openCodex / closeCodex), plus en bas de page ;
   - les Légals et l'appli téléphone : le pied de page n'est plus affiché.
   Chargée en dernière. Préfixe html body.pl. Aucune animation ni ressource externe.
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

/* Le pied de page vit dans « Mon espace » */
html body.pl .pl-foot { display: none; }

/* Tablette et ordinateur : l'astrolabe, sa consigne et sa barre d'actions tiennent dans la hauteur de la fenêtre.
   Plus de pied de page : la marge du bas (96 px, réservée sous le pied) se réduit ; les orbes restent dans les coins.
   Une ligne d'en-tête dès 1360 px (≈ 82 px), deux en dessous (≈ 150 px) ; consigne et barre ≈ 125 px. */
@media (min-width: 560px) {
  html body.pl { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 980px) {
  html body.pl .pl-stage > .pl-board-box .pl-astro,
  html body.pl.pl-calm .pl-stage > .pl-board-box .pl-astro { max-width: min(100%, calc(100svh - 300px), 1100px); min-width: 420px; }
}
@media (min-width: 1360px) {
  html body.pl .pl-stage > .pl-board-box .pl-astro,
  html body.pl.pl-calm .pl-stage > .pl-board-box .pl-astro { max-width: min(100%, calc(100svh - 256px), 1100px); }
}

/* ── Le Codex, par-dessus l'astrolabe ─────────────────────────────────────────────────────────── */
html body.pl .pl-codex[hidden] { display: none; }
html body.pl .pl-codex {
  position: fixed; inset: 0; z-index: 9000; margin: 0; opacity: 1;   /* sous le portail (9500) et l'invitation d'installation (9400) */
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  align-content: start;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, calc((100vw - 1440px) / 2)) calc(96px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(92, 62, 190, .30), transparent 70%),
    linear-gradient(180deg, #120d33 0%, #0b0924 45%, #07061a 100%);
}
html body.pl.pl-calm .pl-codex, html body.pl.pl-calm .pl-codex:is(:hover, :focus-within) { opacity: 1; }   /* le voile du repos (§76) ne vaut plus ici */
html body.pl.pl-cx-on { overflow: hidden; }
html body.pl .pl-codex:focus { outline: none; }

html body.pl .cx-close {
  position: sticky; top: 0; z-index: 3; justify-self: end; margin-bottom: -6px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font-family: var(--pl-display, Cinzel, serif); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #f3e6c4;
  border: 1px solid rgba(232, 195, 106, .55);
  background: linear-gradient(180deg, rgba(36, 28, 92, .96), rgba(14, 11, 44, .96));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
html body.pl .cx-close > span:first-child { font-size: 15px; color: var(--pl-gold, #e8c36a); }
@media (hover: hover) { html body.pl .cx-close:hover { border-color: #e8c36a; color: #fff4d6; } }
html body.pl .cx-close:focus-visible { outline: 2px solid #7FF3E6; outline-offset: 2px; }

/* ── « Mon espace » : le compte, le Codex, les Légals ────────────────────────────────────────── */
html body.pl .pl-me-menu { width: min(320px, calc(100vw - 24px)); max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; }
html body.pl .pl-me-menu [hidden] { display: none; }
html body.pl .pl-mm-k {
  margin: 10px 12px 4px; padding-top: 10px; border-top: 1px solid rgba(232, 195, 106, .28);
  font-family: var(--pl-display, Cinzel, serif); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(232, 195, 106, .85);
}
html body.pl .pl-mm-cx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
html body.pl .pl-me-menu .pl-mm-cx a { grid-template-columns: 20px 1fr; column-gap: 6px; min-height: 44px; padding: 8px 10px; margin: 0; font-size: 11px; letter-spacing: .1em; }
html body.pl .pl-me-menu .pl-mm-cx a span { grid-row: auto; font-size: 14px; }
html body.pl .pl-me-menu :is(.pl-mm-cx, .pl-mm-legal) a::before { content: none; }
html body.pl .pl-mm-legal {
  display: flex; flex-wrap: wrap; gap: 0 4px; margin: 8px 6px 2px; padding: 10px 6px 4px; border-top: 1px solid rgba(232, 195, 106, .2);
}
html body.pl .pl-me-menu .pl-mm-legal a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 6px; margin: 0; border-radius: 8px;
  font-family: var(--pl-body, Georgia, serif); font-size: 13px; letter-spacing: 0; text-transform: none; color: rgba(239, 233, 255, .72);
}

/* ── Téléphone (03/11) : tout ce qu'on voit en entrant tient dans un écran, sans défiler ───────────
   Ce qui est sous l'astrolabe tient sur une ligne : « Éveiller le cristal » et, à côté, les Réglages en pastille ronde
   (leur nom reste lu par les lecteurs d'écran ; le panneau s'ouvre toujours sur toute la largeur).
   L'astrolabe suit la hauteur de l'écran (100svh : barre du navigateur affichée) : en-tête + marge ≈ 128 px,
   consigne 41 à 62 (une ou deux lignes selon la largeur), ligne d’actions ≈ 64, bande des sceaux POLARIS / AETHER en bas ≈ 68 → 100svh − 332 px, jamais moins de 220 px.
   Seul un clic ouvre la suite (Codex, réglages, dimensions). */
@media (max-width: 559px) {
  html body.pl { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  html body.pl .pl-stage > .pl-board-box .pl-astro,
  html body.pl.pl-calm .pl-stage > .pl-board-box .pl-astro { max-width: max(220px, min(100%, calc(100svh - 332px))); margin-inline: auto; }

  html body.pl .pl-actbar { flex-direction: row; align-items: stretch; gap: 10px; }
  html body.pl .pl-stage .pl-actbar > .pl-cristal-btn.pl-dice-btn { flex: 1 1 auto; min-width: 0; width: auto; min-height: 54px; padding: 6px 34px 6px 10px; gap: 10px; border-radius: 18px; }
  html body.pl .pl-stage .pl-actbar > .pl-cristal-btn::after { right: 12px; font-size: 24px; }
  html body.pl .pl-actbar > .pl-cristal-btn .pl-cristal-ico { width: 38px; height: 38px; }
  html body.pl .pl-actbar > .pl-cristal-btn .pl-cristal-txt b,
  html body.pl.pl-at-coeur .pl-actbar > .pl-cristal-btn .pl-cristal-txt b { font-size: 13.5px; letter-spacing: .1em; white-space: nowrap; }
  html body.pl .pl-actbar > .pl-cristal-btn .pl-cristal-txt small { font-size: 12.5px; }

  html body.pl .pl-set { flex: none; }
  html body.pl .pl-set-btn { width: 54px; min-width: 54px; height: 54px; min-height: 54px; padding: 0; justify-content: center; gap: 0; border-radius: 50%; }
  html body.pl .pl-set-btn .pl-set-ico svg { width: 24px; height: 24px; }
  html body.pl .pl-set-btn .pl-set-chev { display: none; }
  html body.pl .pl-set-btn .pl-set-t { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
