/* Constellation Star Seed — full styles */
:root {
  --bg-1: #06060e;
  --bg-2: #0a0a18;
  --ink: #f6f3ec;
  --ink-soft: #d4d4dc;
  --gold: #b8892a;
  --gold-bright: #d4a857;
  --marine: #1B3A6B;
  --violet: #6B4FBB;
  --thera: #f5d76e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #000; color: var(--ink); font-family: 'Inter', system-ui, sans-serif; overflow: hidden; height: 100vh; cursor: none; }
button, a, input { cursor: none; font-family: inherit; }

.ja-stage {
  position: fixed; inset: 0; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, #0e0a1f 0%, #06060e 50%, #000 100%);
  user-select: none;
  isolation: isolate;
}

.ja-sky {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 30% 20%, rgba(107,79,187,0.15), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(184,137,42,0.10), transparent 50%);
}

.ja-canvas-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.ja-nebula { position: absolute; inset: 0; pointer-events: none; transform: translateZ(0); -webkit-transform: translateZ(0); }
.ja-cloud { position: absolute; left: 0; top: 0; filter: blur(40px); opacity: 0.7; will-change: transform; mix-blend-mode: screen; -webkit-backface-visibility: hidden; backface-visibility: hidden; }

/* Celestial nodes */
.ja-celestial { position: absolute; inset: 0; pointer-events: none; }
.ja-cel { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; cursor: none; transition: filter 0.3s; }
.ja-cel-core { border-radius: 50%; transition: transform 0.3s; will-change: transform; }
.ja-cel:hover .ja-cel-core { transform: scale(1.5); opacity: 1; }
.ja-cel.found .ja-cel-core { animation: foundPulse 2s ease-in-out infinite; }
@keyframes foundPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.2); opacity: 1; }
}
.ja-cel.hint .ja-cel-core { animation: hintPulse 1s ease-in-out infinite; }
@keyframes hintPulse {
  0%, 100% { box-shadow: 0 0 30px currentColor, 0 0 80px currentColor; }
  50% { box-shadow: 0 0 60px currentColor, 0 0 160px currentColor; transform: scale(1.4); }
}
.ja-cel-ring {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotateX(75deg);
  border-radius: 50%; border: 1px solid;
}
.ja-cel-moon-ring {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px dashed rgba(255,255,255,0.2);
}
.ja-cel-name {
  position: absolute; left: 50%; top: 100%;
  transform: translate(-50%, 8px);
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 13px; white-space: nowrap;
  text-shadow: 0 0 10px currentColor;
}
.ja-cel-glyph { display: block; }

/* Main stars */
.ja-mains { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.ja-main-star {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: none;
}
.ja-main-halo {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  will-change: opacity;
  animation: mainHalo 4s ease-in-out infinite;
}
@keyframes mainHalo {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}
.ja-main-core {
  position: relative; display: block; border-radius: 50%;
  animation: mainCore 3s ease-in-out infinite;
}
@keyframes mainCore {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 1; }
}
.ja-main-star:hover .ja-main-core { transform: scale(1.3); opacity: 1; }
.ja-main-star {
  animation: mainStarPulse var(--pulse, 3.4s) ease-in-out infinite;
  animation-delay: var(--phase, 0s);
}
@keyframes mainStarPulse {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 1; }
}
.ja-main-halo { animation-duration: var(--halo, 4s); animation-delay: var(--phase, 0s); }
.ja-main-streak {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  height: 1px; pointer-events: none;
  filter: blur(0.6px);
  opacity: 0.6;
  animation: streakPulse var(--halo, 5s) ease-in-out infinite;
  animation-delay: var(--phase, 0s);
}
@keyframes streakPulse {
  0%, 100% { opacity: 0.25; transform: translate(-50%, -50%) scaleX(0.8); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scaleX(1); }
}

.ja-mlinks { position: absolute; inset: 0; pointer-events: none; width: 100%; height: 100%; z-index: 5; }

/* Hover label */
.ja-hover-label {
  position: absolute; transform: translate(-50%, 0);
  pointer-events: none; text-align: center; z-index: 10;
  animation: hoverIn 0.4s ease-out;
}
@keyframes hoverIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.ja-hover-prefix {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 13px; opacity: 0.7;
  letter-spacing: 0.05em;
  animation: prefixFloat 3s ease-in-out infinite;
}
@keyframes prefixFloat {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-2px); opacity: 1; }
}
.ja-hover-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 500;
  text-shadow: 0 0 20px currentColor;
  margin: 4px 0;
}
.ja-hover-tag {
  font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; opacity: 0.6;
}

/* Logo */
.ja-logo-wrap {
  position: absolute; left: 50%; bottom: 80px;
  transform: translate(-50%, 0);
  text-align: center; pointer-events: none;
  transition: transform 0.6s cubic-bezier(.4,.0,.2,1), opacity 0.4s;
  z-index: 7;
}
.ja-logo-img {
  position: relative;
  width: 120px; height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 0 32px rgba(255,255,255,0.45)) drop-shadow(0 0 72px rgba(184,137,42,0.38));
  will-change: opacity;
}
.ja-logo-halo {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none;
  will-change: opacity;
}
.ja-logo-halo.h1 { width: 220px; height: 220px; background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 60%); animation: halo 5s ease-in-out infinite; }
.ja-logo-halo.h2 { width: 360px; height: 360px; background: radial-gradient(circle, rgba(184,137,42,0.22), transparent 60%); animation: halo 7s ease-in-out infinite reverse; }
.ja-logo-halo.h3 { width: 520px; height: 520px; border: 1px solid rgba(184,137,42,0.13); will-change: transform; animation: haloRing 14s linear infinite; }
@keyframes halo { 0%,100%{opacity:0.5;} 50%{opacity:1;} }
@keyframes haloRing { from{transform:translate(-50%,-50%) rotate(0deg);} to{transform:translate(-50%,-50%) rotate(360deg);} }

.ja-tagline { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 22px; margin-top: 18px; letter-spacing: 0.08em; }
.ja-tagline-sub { font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase; opacity: 0.5; margin-top: 6px; }

/* Chrome */
.ja-chrome {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 36px; z-index: 510;
}
.ja-mark {
  font-family: 'Cormorant Garamond', serif; font-size: 22px; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 8px;
}
.ja-mark-dot { width: 6px; height: 6px; background: var(--gold-bright); border-radius: 50%; box-shadow: 0 0 10px var(--gold-bright); }
.ja-mark-domain { opacity: 0.5; font-size: 16px; }
.ja-nav { display: flex; align-items: center; gap: 28px; font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; }
.ja-nav a { color: var(--ink-soft); text-decoration: none; opacity: 0.7; transition: opacity 0.2s; }
.ja-nav a:hover { opacity: 1; color: var(--gold-bright); }
.ja-nav-game a { opacity: 0.2 !important; pointer-events: none; }

.ja-foot {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 36px; font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; opacity: 0.95; z-index: 510;
  pointer-events: none;
}
.ja-foot > * { pointer-events: auto; }
.ja-foot-l { display: flex; align-items: center; gap: 10px; opacity: 0.6; }
.ja-foot-coords { opacity: 0.6; }
/* Center the CTA absolutely so it shares the logo's vertical axis */
.ja-foot .ja-foot-cta {
  position: absolute; left: 50%; bottom: 18px;
  transform: translateX(-50%);
}
.ja-nav-legal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; opacity: 0.5; cursor: pointer;
  border: 1px solid rgba(246,243,236,0.18); border-radius: 50%;
  margin-left: 8px; transition: opacity 0.2s, border-color 0.2s;
}
.ja-nav-legal:hover { opacity: 1; border-color: var(--gold-bright); color: var(--gold-bright); }

/* Slim invite — bottom-right above coords */
.ja-game-invite.slim {
  position: fixed; left: auto; right: 28px; bottom: 60px;
  transform: none;
  width: 260px;
  background: rgba(6,6,14,0.92);
  border: 1px solid rgba(184,137,42,0.45);
  border-radius: 6px;
  padding: 12px 14px 14px;
  box-shadow: 0 0 30px rgba(184,137,42,0.18);
  animation: slimInviteIn 0.5s ease-out;
  z-index: 60;
}
@keyframes slimInviteIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ja-game-invite-x {
  position: absolute; top: 0; right: 0;
  background: none; border: 0; color: var(--ink-soft);
  width: 36px; height: 36px; padding: 0; cursor: pointer;
  font-size: 16px; line-height: 1; opacity: 0.5;
}
.ja-game-invite-x:hover { opacity: 1; }
.ja-game-invite-later {
  background: none; border: none; color: var(--ink-soft);
  font: 9px/1 'Inter', sans-serif; letter-spacing: 0.18em;
  text-transform: uppercase; cursor: pointer; opacity: 0.45;
  padding: 7px 6px; transition: opacity 0.2s;
}
.ja-game-invite-later:hover { opacity: 0.85; }
.ja-game-invite.slim .ja-game-invite-kicker { font-size: 8px; }
.ja-game-invite.slim .ja-game-invite-title { font-size: 17px; }
.ja-game-invite.slim .ja-game-invite-sub { font-size: 11px; }
.ja-game-invite.slim .ja-game-invite-row { margin-top: 10px; justify-content: flex-start; }
.ja-game-invite.slim .ja-game-invite-yes { padding: 7px 14px; font-size: 10px; }

/* Admin panel — centred dashboard */
.admin-panel {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, calc(100vw - 24px));
  max-height: min(88vh, 840px);
  overflow-y: auto;
  display: flex; flex-direction: column;
  background: rgba(6,6,14,0.97); backdrop-filter: blur(24px);
  border: 1px solid rgba(184,137,42,0.35); border-radius: 10px;
  padding: 20px 24px 24px; z-index: 400;
  color: var(--ink); font-family: 'Inter', sans-serif; font-size: 11px;
  box-shadow: 0 0 80px rgba(184,137,42,0.15), 0 32px 80px rgba(0,0,0,0.6);
}
.admin-head { position: relative; margin-bottom: 14px; }
.admin-kicker { font-size: 8px; letter-spacing: 0.4em; text-transform: uppercase; opacity: 0.55; color: var(--gold-bright); }
.admin-head h3 { font-family: 'Cormorant Garamond', serif; font-size: 18px; margin: 4px 0 0; font-weight: 400; }
.admin-x {
  position: absolute; top: 0; right: 0;
  background: none; border: 0; color: var(--ink-soft);
  width: 28px; height: 28px; cursor: pointer; font-size: 20px; line-height: 1;
}
.admin-x:hover { color: var(--ink); }
@media (max-width: 600px) {
  .admin-panel { top: 12px; left: 12px; right: 12px; bottom: 12px; transform: none; width: auto; max-height: none; border-radius: 8px; }
}
.admin-section { margin: 14px 0; padding-top: 12px; border-top: 1px solid rgba(246,243,236,0.08); }
.admin-section:first-child { border-top: 0; }
.admin-h { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.6; margin-bottom: 8px; }
.admin-help { font-size: 10px; opacity: 0.6; margin-bottom: 8px; line-height: 1.4; }
.admin-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.admin-row.toggle { flex-direction: row; align-items: center; justify-content: space-between; }
.admin-row span em { font-style: normal; opacity: 0.6; margin-left: 6px; }
.admin-row input[type="range"] { width: 100%; }
.admin-matrix table { width: 100%; border-collapse: collapse; font-size: 10px; }
.admin-matrix th, .admin-matrix td { padding: 4px; text-align: center; }
.admin-matrix th { font-size: 9px; opacity: 0.7; }
.admin-matrix td.dim { opacity: 0.2; }
.matrix-cell {
  background: none; border: 1px solid rgba(246,243,236,0.15);
  border-radius: 50%; width: 22px; height: 22px;
  color: var(--ink-soft); cursor: pointer; padding: 0;
  font-size: 10px;
}
.matrix-cell.on { background: rgba(184,137,42,0.3); border-color: var(--gold-bright); color: var(--gold-bright); }
.admin-star-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.admin-star-name { flex: 1; font-size: 10px; }
.admin-star-row input[type="color"] { width: 28px; height: 22px; padding: 0; border: 1px solid rgba(246,243,236,0.15); background: none; }
.admin-star-row input[type="number"] { background: rgba(246,243,236,0.06); border: 1px solid rgba(246,243,236,0.12); color: var(--ink); font-size: 10px; padding: 3px 6px; border-radius: 3px; }
.admin-btn {
  background: rgba(246,243,236,0.06); border: 1px solid rgba(246,243,236,0.18);
  color: var(--ink); padding: 7px 12px; border-radius: 4px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer;
  width: 100%;
}
.admin-btn:hover { background: rgba(184,137,42,0.15); border-color: var(--gold-bright); }
.admin-btn.primary { background: rgba(184,137,42,0.2); border-color: var(--gold-bright); color: var(--gold-bright); }

/* Admin tabs */
.admin-head { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.admin-kicker { flex: 0 0 100%; }
.admin-tabs {
  display: flex; gap: 3px; flex-wrap: wrap; flex: 1;
  border-bottom: 1px solid rgba(246,243,236,0.07);
  padding-bottom: 10px; margin-bottom: 2px;
}
.admin-tab {
  background: none; border: 1px solid transparent; border-radius: 4px;
  color: var(--ink-soft); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; opacity: 0.45; cursor: pointer;
  transition: opacity 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.admin-tab:hover { opacity: 0.75; background: rgba(255,255,255,0.04); }
.admin-tab.on { opacity: 1; border-color: rgba(184,137,42,0.45); color: var(--gold-bright); background: rgba(184,137,42,0.08); }
.admin-row.stacked { flex-direction: column; gap: 4px; }
.admin-row.stacked span { opacity: 0.55; }
.admin-text-input {
  width: 100%; background: rgba(246,243,236,0.05); border: 1px solid rgba(246,243,236,0.12);
  color: var(--ink); font-size: 10px; padding: 5px 8px; border-radius: 3px;
  font-family: inherit;
}
.admin-text-input:focus { outline: none; border-color: rgba(184,137,42,0.4); }
.admin-page-block { border-top: 1px solid rgba(246,243,236,0.08); }

.ja-main-star.admin { z-index: 100; }
.ja-main-title {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 10px;
  font-size: 8px; letter-spacing: 0.22em; text-transform: uppercase;
  color: currentColor; opacity: 0.15;
  white-space: nowrap; pointer-events: none;
}
.ja-admin-label {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 12px;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  background: rgba(0,0,0,0.6); padding: 3px 6px; border-radius: 3px;
  white-space: nowrap; pointer-events: none;
}
.ja-gear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%; color: var(--gold-bright);
  transition: transform 0.4s, background 0.2s;
}
.ja-gear:hover { transform: rotate(60deg); background: rgba(184,137,42,0.15); }
.scroll-hint { display: flex; align-items: center; gap: 12px; }
.scroll-line { width: 24px; height: 1px; background: rgba(246,243,236,0.3); }

/* Compass */
.ja-compass {
  position: absolute; top: 86px; right: 36px;
  width: 90px; height: 90px;
  z-index: 15; pointer-events: none;
}
.ja-compass-disc {
  position: absolute; inset: 0;
  border: 1px solid rgba(184,137,42,0.3);
  border-radius: 50%;
  transition: transform 0.2s ease-out;
}
.ja-compass-disc::before {
  content: ''; position: absolute; inset: 8px;
  border: 1px dashed rgba(184,137,42,0.18);
  border-radius: 50%;
}
.ja-compass-disc span {
  position: absolute; font-size: 9px; letter-spacing: 0.2em;
  color: var(--gold-bright); opacity: 0.7;
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  cursor: pointer; transition: opacity 0.15s;
}
.ja-compass-disc span:hover { opacity: 1; }
.ja-compass-disc .n { top: 4px; left: 50%; transform: translateX(-50%); }
.ja-compass-disc .s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.ja-compass-disc .e { right: 6px; top: 50%; transform: translateY(-50%); }
.ja-compass-disc .w { left: 6px; top: 50%; transform: translateY(-50%); }
.ja-compass-dot {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold-bright);
}
.ja-compass-coords {
  position: absolute; bottom: 100%; margin-bottom: 6px; left: 0; right: 0;
  text-align: center; font-size: 9px; letter-spacing: 0.15em;
  font-family: 'Cormorant Garamond', serif; font-style: italic; opacity: 0.55;
  white-space: nowrap;
}
.ja-compass-zoom {
  position: absolute; top: 100%; margin-top: 6px; left: 0; right: 0;
  text-align: center; font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; opacity: 0.5;
}

/* ── Stellar nav bar ─────────────────────────────────────── */
.ja-starbar {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; z-index: 20; pointer-events: auto;
}
.ja-starbar-item {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 7px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  background: rgba(6,6,14,0.92);
  color: rgba(246,243,236,0.45); font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  transition: all 0.2s; cursor: pointer;
}
.ja-starbar-item:hover {
  background: rgba(6,6,14,0.8);
  border-color: var(--star-color, rgba(255,255,255,0.2));
  color: var(--star-color, #f6f3ec);
}
.ja-starbar-item.active {
  background: rgba(6,6,14,0.9);
  border-color: var(--star-color);
  color: var(--star-color);
}
.ja-starbar-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--star-color, rgba(255,255,255,0.4));
  box-shadow: 0 0 5px var(--star-color, transparent);
  flex-shrink: 0;
}
.ja-starbar-name { line-height: 1; }

/* Game HUD */
.ja-hud {
  position: absolute; top: 86px; left: 36px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 15; max-width: 220px;
}
.ja-hud-stat {
  background: rgba(6,6,14,0.92);
  border: 1px solid rgba(184,137,42,0.18);
  padding: 5px 12px; border-radius: 4px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 38px;
}
.ja-hud-label { font-size: 8px; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.55; }
.ja-hud-val { font-family: 'Cormorant Garamond', serif; font-size: 20px; color: var(--gold-bright); line-height: 1; }
.ja-hud-btn {
  background: rgba(184,137,42,0.1); border: 1px solid rgba(184,137,42,0.3);
  color: var(--gold-bright); padding: 6px 12px; border-radius: 4px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 38px; transition: all 0.2s;
}
.ja-hud-btn:hover:not(:disabled) { background: rgba(184,137,42,0.2); }
.ja-hud-btn:disabled { opacity: 0.3; }
.ja-hud-btn.ghost { background: transparent; border-color: rgba(255,255,255,0.15); color: var(--ink-soft); }
.ja-hud-btn.hmi { border-color: rgba(100,180,100,0.25); color: rgba(180,220,180,0.6); justify-content: center; }
.ja-hud-btn.hmi-on {
  border-color: rgba(80,200,100,0.7);
  color: #7eff9a;
  background: rgba(80,200,100,0.1);
  box-shadow: 0 0 14px rgba(80,200,100,0.25);
  animation: hmiPulse 1.6s ease-in-out infinite;
}
@keyframes hmiPulse {
  0%,100% { box-shadow: 0 0 10px rgba(80,200,100,0.2); }
  50%      { box-shadow: 0 0 24px rgba(80,200,100,0.5); }
}

/* ── Correct-answer screen flash ─────────────────────────── */
.ja-correct-flash {
  position: fixed; inset: 0; z-index: 108; pointer-events: none;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--fc) 55%, transparent) 0%, transparent 70%);
  animation: correctFlash 0.55s ease-out forwards;
}
@keyframes correctFlash {
  0%   { opacity: 0; transform: scale(0.6); }
  20%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* ── GameHUD exit button ──────────────────────────────────── */
.ja-hud-exit {
  background: transparent; border-color: rgba(255,80,80,0.25); color: rgba(255,120,120,0.55);
  justify-content: center; min-width: 38px; padding: 6px 8px; font-size: 14px;
}
.ja-hud-exit:hover:not(:disabled) { background: rgba(255,80,80,0.12); border-color: rgba(255,80,80,0.5); color: rgba(255,120,120,0.9); }

/* ── Visite libre info bubble ─────────────────────────────── */
.ja-visite-bubble {
  position: fixed; bottom: 68px; left: 50%; transform: translateX(-50%);
  background: rgba(10,10,30,0.95); border: 1px solid rgba(111,214,236,0.35);
  color: rgba(111,214,236,0.9); font-family: 'Orbitron', monospace;
  font-size: 9px; letter-spacing: 0.16em; white-space: nowrap;
  padding: 8px 16px; cursor: pointer; z-index: 200;
  animation: bubblePop 0.4s ease-out both;
}
.ja-visite-bubble-arrow {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 6px solid rgba(111,214,236,0.35);
}
@keyframes bubblePop {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── HMI sequence modal ──────────────────────────────────── */
.ja-hmi-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4,4,12,0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.ja-hmi-card {
  background: linear-gradient(160deg, rgba(14,10,28,0.98), rgba(6,6,14,0.98));
  border: 1px solid rgba(80,200,100,0.3);
  border-radius: 12px; padding: 36px 40px;
  max-width: 480px; width: 90%;
  box-shadow: 0 0 60px rgba(80,200,100,0.1), 0 8px 40px rgba(0,0,0,0.6);
  display: flex; flex-direction: column; gap: 18px;
  animation: fadeIn 0.35s ease-out;
}
.ja-hmi-type {
  display: flex; align-items: center; gap: 10px;
}
.ja-hmi-icon { font-size: 18px; color: #7eff9a; opacity: 0.8; }
.ja-hmi-type-label {
  font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase;
  color: #7eff9a; opacity: 0.75;
}
.ja-hmi-instruction {
  font-size: 14px; font-weight: 500; letter-spacing: 0.06em;
  color: #f6f3ec; line-height: 1.5;
}
.ja-hmi-phrase {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 17px; line-height: 1.6; color: var(--gold-bright);
  border-left: 2px solid rgba(184,137,42,0.4); padding-left: 14px;
}
.ja-hmi-image, .ja-hmi-question {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px; line-height: 1.65; color: #f6f3ec; opacity: 0.85;
}
.ja-hmi-closing {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  opacity: 0.35;
}
.ja-hmi-close {
  margin-top: 6px;
  padding: 11px 20px;
  background: rgba(80,200,100,0.12);
  border: 1px solid rgba(80,200,100,0.4);
  color: #7eff9a; border-radius: 4px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  transition: background 0.2s; align-self: flex-end;
}
.ja-hmi-close:hover { background: rgba(80,200,100,0.22); }
.ja-hud-pip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--gold-bright); color: #000; font-weight: 600; }
.ja-hud-hint {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 13px; padding: 6px 14px;
  color: var(--gold-bright);
  animation: hintFade 0.4s ease-out;
}
@keyframes hintFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Naming overlay */
.ja-naming {
  position: fixed; inset: 0; z-index: 520;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding-bottom: 100px;
  animation: fadeIn 0.3s ease-out;
}
.ja-naming-inner {
  position: relative;
  background: linear-gradient(180deg, rgba(20,18,42,0.95), rgba(8,8,16,0.95));
  border: 1px solid rgba(184,137,42,0.3);
  border-radius: 8px; padding: 56px 48px 36px;
  width: 460px; max-width: 92vw;
  text-align: center;
}
.ja-naming-eye {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  animation: foundPulse 2s ease-in-out infinite;
}
.ja-naming-kicker { font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase; opacity: 0.5; margin-bottom: 12px; }
.ja-naming-inner h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 30px; margin: 0 0 24px; line-height: 1.2; }
.ja-naming-inner form { display: flex; gap: 8px; }
.ja-naming-inner form.shake { animation: shake 0.5s; }
@keyframes shake { 0%,100% {transform: translateX(0);} 20%,60% {transform: translateX(-8px);} 40%,80% {transform: translateX(8px);} }
.ja-naming-inner input {
  flex: 1; padding: 12px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.15);
  color: var(--ink); border-radius: 4px; outline: none;
  font-size: 14px;
}
.ja-naming-inner input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.ja-naming-inner button[type="submit"] {
  padding: 12px 20px;
  background: var(--accent); color: #0a0a18; border: 0; border-radius: 4px;
  font-weight: 600;
}
.ja-naming-hint {
  margin-top: 14px;
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 14px; color: var(--gold-bright);
}
.ja-naming-hint.subtle { font-size: 11px; opacity: 0.6; color: var(--ink-soft); margin-top: 8px; }
.ja-naming-engramme-btn {
  margin-top: 10px;
  padding: 7px 14px;
  background: rgba(184,137,42,0.06);
  border: 1px solid rgba(184,137,42,0.25);
  color: var(--gold-bright); border-radius: 4px;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  transition: background 0.2s; opacity: 0.75;
}
.ja-naming-engramme-btn:hover:not(:disabled) { background: rgba(184,137,42,0.15); opacity: 1; }
.ja-naming-engramme-btn:disabled { opacity: 0.25; }
.ja-naming-engramme-text {
  margin-top: 10px;
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 13px; line-height: 1.6;
  color: var(--gold-bright);
  border-left: 2px solid rgba(184,137,42,0.35); padding-left: 12px;
  animation: fadeIn 0.4s ease-out;
}
.ja-naming-skip {
  margin-top: 18px; background: none; border: 0; color: var(--ink-soft);
  font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.5;
}
.ja-naming-skip:hover { opacity: 1; }

/* Cinematic reveal */
.ja-cine {
  position: fixed; inset: 0; z-index: 110; pointer-events: none;
  animation: fadeIn 0.2s;
}
.ja-cine-zoom {
  position: absolute; left: var(--ox); top: var(--oy);
  transform: translate(-50%, -50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  animation: cineZoom 1.4s cubic-bezier(.2,.6,.2,1) forwards;
}
@keyframes cineZoom {
  0% { width: 4px; height: 4px; opacity: 1; box-shadow: 0 0 0 0 var(--accent); }
  60% { width: 100vw; height: 100vw; opacity: 0.8; box-shadow: 0 0 200px var(--accent); }
  100% { width: 200vw; height: 200vw; opacity: 0; }
}
.ja-cine-nebula {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 50%);
  animation: cineNeb 1.8s ease-out forwards;
}
@keyframes cineNeb { 0%{opacity:0;transform:scale(0.5) rotate(0);} 50%{opacity:1;} 100%{opacity:0;transform:scale(1.5) rotate(120deg);} }
.ja-cine-flare {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  filter: blur(1px);
  animation: flareH 1.2s ease-out forwards;
}
.ja-cine-flare2 {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 60px;
  background: linear-gradient(to right, transparent, color-mix(in srgb, var(--accent) 20%, transparent), transparent);
  filter: blur(20px);
  animation: flareH 1.5s ease-out forwards;
}
@keyframes flareH { 0%{transform:scaleX(0);opacity:0;} 30%{opacity:1;} 100%{transform:scaleX(1);opacity:0;} }
.ja-cine-name {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif; font-size: 96px; font-weight: 300;
  color: var(--ink); text-shadow: 0 0 40px var(--accent);
  animation: cineName 2s cubic-bezier(.2,.6,.2,1) forwards;
}
@keyframes cineName { 0%{opacity:0;letter-spacing:0;transform:translate(-50%,-50%) scale(0.7);} 50%{opacity:1;letter-spacing:0.05em;transform:translate(-50%,-50%) scale(1);} 100%{opacity:0;letter-spacing:0.15em;transform:translate(-50%,-50%) scale(1.1);} }
.ja-cine-points {
  position: absolute; left: 50%; top: 60%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 52px; color: var(--gold-bright);
  text-shadow: 0 0 30px var(--gold-bright), 0 0 80px var(--gold-bright);
  animation: pointsPop 2s cubic-bezier(.2,.6,.2,1) forwards;
}
@keyframes pointsPop { 0%{opacity:0;transform:translateX(-50%) translateY(20px) scale(0.5);} 30%{opacity:1;transform:translateX(-50%) translateY(0) scale(1.3);} 60%{transform:translateX(-50%) translateY(-10px) scale(1);} 100%{opacity:0;transform:translateX(-50%) translateY(-40px) scale(1);} }

/* Celebration additions */
.ja-cine-ring {
  position: absolute; left: var(--ox); top: var(--oy);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: cineRing 1.4s cubic-bezier(.1,.5,.2,1) forwards;
}
.ja-cine-ring2 { opacity: 0; animation-delay: 0.28s; }
@keyframes cineRing {
  0%   { width: 6px; height: 6px; opacity: 1; }
  100% { width: 72vw; height: 72vw; opacity: 0; }
}
.ja-cine-flare-v {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  filter: blur(1px);
  animation: flareV 1.2s ease-out forwards;
}
@keyframes flareV { 0%{transform:scaleY(0);opacity:0;} 30%{opacity:1;} 100%{transform:scaleY(1);opacity:0;} }
.ja-cine-cross {
  position: absolute; left: var(--ox); top: var(--oy);
  width: 0; height: 0;
  animation: cineCross 1.8s ease-out forwards;
}
.ja-cine-cross::before, .ja-cine-cross::after {
  content: '';
  position: absolute;
  background: var(--accent);
  filter: blur(0.5px);
  box-shadow: 0 0 8px 2px var(--accent);
}
.ja-cine-cross::before { width: 120px; height: 1.5px; top: -0.75px; left: -60px; }
.ja-cine-cross::after  { width: 1.5px; height: 120px; top: -60px; left: -0.75px; }
@keyframes cineCross {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0); }
  20%  { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(3.5) rotate(45deg); }
}
.ja-cine-spark {
  position: absolute; left: var(--ox); top: var(--oy);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 3px var(--accent);
  animation: cineSpark 1.1s cubic-bezier(.15,.5,.2,1) forwards;
  animation-delay: var(--delay, 0s);
  opacity: 0;
}
@keyframes cineSpark {
  0%   { transform: translate(-50%,-50%) rotate(var(--angle,0deg)) translateX(0) scale(2); opacity: 1; }
  15%  { opacity: 1; }
  100% { transform: translate(-50%,-50%) rotate(var(--angle,0deg)) translateX(38vw) scale(0); opacity: 0; }
}

/* Edge messages */
.ja-edge-msg {
  position: fixed; left: 50%; top: 30%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 24px; color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(184,137,42,0.6);
  z-index: 50; padding: 16px 28px;
  background: rgba(6,6,14,0.92);
  border-radius: 4px; border: 1px solid rgba(184,137,42,0.3);
  animation: edgeIn 2.4s ease-out forwards;
  text-align: center;
}
@keyframes edgeIn { 0%{opacity:0;transform:translate(-50%,-30%) scale(0.95);} 20%{opacity:1;transform:translate(-50%,-50%) scale(1);} 80%{opacity:1;} 100%{opacity:0;} }

.ja-warp-flash {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: radial-gradient(circle at center, rgba(255,255,255,0.4), transparent 50%);
  animation: warpFlash 1.7s ease-out;
}
@keyframes warpFlash { 0%{opacity:0;} 30%{opacity:1;} 100%{opacity:0;} }

/* Universe panel */
.ja-universe {
  position: fixed; inset: 0; z-index: 80;
  background: linear-gradient(135deg, rgba(8,8,16,0.96), rgba(20,18,42,0.96));
  backdrop-filter: blur(20px);
  display: grid; place-items: center;
  animation: fadeIn 0.5s;
  overflow: auto;
  cursor: none;
}
.ja-back {
  position: absolute; top: 28px; left: 36px;
  background: none; border: 0; color: var(--ink-soft);
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
}
.ja-back:hover { color: var(--accent); }
.ja-universe-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; max-width: 1100px; padding: 80px 48px;
}
.ja-universe-left .kicker { font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.ja-universe-left h2 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 64px; margin: 0 0 20px; line-height: 1.1; color: var(--accent); text-shadow: 0 0 30px var(--accent); }
.ja-universe-left p { font-size: 16px; line-height: 1.6; opacity: 0.8; max-width: 440px; }
.ja-universe-left ul { list-style: none; padding: 0; margin: 32px 0 0; }
.ja-universe-left li {
  padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; transition: padding 0.2s;
}
.ja-universe-left li:hover { padding-left: 8px; color: var(--accent); }
.ja-universe-left li .arr { opacity: 0.4; }

.ja-universe-soon { padding: 40px; text-align: center; border: 1px dashed rgba(255,255,255,0.15); border-radius: 8px; }
.ja-universe-soon .kicker { font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.ja-universe-soon .soon { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 22px; opacity: 0.7; }

/* Calendar */
.ja-cal { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 24px; }
.ja-cal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.ja-cal-kicker { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.5; margin-bottom: 4px; }
.ja-cal-month { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: var(--accent); }
.ja-cal-tz { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.4; }
.ja-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ja-cal-dn { font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.4; text-align: center; padding: 4px 0; }
.ja-cal-cell {
  position: relative; aspect-ratio: 1; background: none; border: 1px solid transparent;
  color: var(--ink); font-size: 13px; border-radius: 4px;
  display: grid; place-items: center;
}
.ja-cal-cell.empty { visibility: hidden; }
.ja-cal-cell.off { opacity: 0.2; }
.ja-cal-cell.avail { border-color: rgba(255,255,255,0.1); }
.ja-cal-cell.avail:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ja-cal-cell.sel { background: var(--accent); color: #0a0a18; }
.ja-cal-cell.today { font-weight: 600; }
.ja-cal-dot { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
.ja-cal-cell.sel .ja-cal-dot { background: #0a0a18; }
.ja-cal-slots { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.08); }
.ja-cal-slots-label { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.6; margin-bottom: 10px; }
.ja-cal-slots-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ja-cal-slot {
  padding: 8px 0; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); color: var(--ink);
  border-radius: 4px; font-size: 12px;
}
.ja-cal-slot:hover { border-color: var(--accent); }
.ja-cal-slot.sel { background: var(--accent); color: #0a0a18; border-color: var(--accent); }
.ja-cal-confirm {
  margin-top: 14px; width: 100%; padding: 12px;
  background: var(--accent); color: #0a0a18; border: 0; border-radius: 4px;
  font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
}

/* Leaderboard */
.ja-board {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(10px);
  display: grid; place-items: center;
  animation: fadeIn 0.3s;
}
.ja-board-inner {
  background: linear-gradient(180deg, rgba(20,18,42,0.95), rgba(8,8,16,0.95));
  border: 1px solid rgba(184,137,42,0.3);
  border-radius: 8px; width: 760px; max-width: 92vw; max-height: 86vh;
  overflow: auto; padding: 32px;
  position: relative;
}
.ja-board-head { margin-bottom: 24px; }
.ja-board-head .kicker { font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase; opacity: 0.5; }
.ja-board-head h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 36px; margin: 4px 0 0; }
.ja-board-x { position: absolute; top: 20px; right: 24px; background: none; border: 0; color: var(--ink); font-size: 24px; }
.ja-board-body { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.ja-board-list { max-height: 380px; overflow-y: auto; padding-right: 8px; }
.ja-board-empty { font-family: 'Cormorant Garamond', serif; font-style: italic; opacity: 0.5; padding: 20px 0; }
.ja-board-row {
  display: grid; grid-template-columns: 32px 1fr auto auto; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  align-items: center;
}
.ja-board-row .rk { font-family: 'Cormorant Garamond', serif; color: var(--gold-bright); }
.ja-board-row .ps { font-size: 14px; }
.ja-board-row .tg { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.5; }
.ja-board-row .sc { font-family: 'Cormorant Garamond', serif; font-size: 18px; color: var(--gold-bright); }

.ja-board-yourscore { background: rgba(184,137,42,0.08); border: 1px solid rgba(184,137,42,0.2); padding: 16px; border-radius: 4px; margin-bottom: 16px; }
.ja-board-yourscore .kicker { font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase; opacity: 0.6; }
.ja-board-yourscore .big { font-family: 'Cormorant Garamond', serif; font-size: 48px; color: var(--gold-bright); line-height: 1; margin-top: 4px; }
.ja-board-yourscore .small { font-size: 11px; opacity: 0.6; margin-top: 4px; }
.ja-board-form form { display: flex; flex-direction: column; gap: 12px; }
.ja-board-form label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; display: flex; flex-direction: column; gap: 4px; }
.ja-board-form input[type="text"], .ja-board-form input[type="email"], .ja-board-form label input {
  padding: 10px 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
  color: var(--ink); border-radius: 4px; font-size: 13px;
}
.ja-board-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ja-board-tags label { padding: 8px 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.7; }
.ja-board-tags label.on { background: rgba(184,137,42,0.15); border-color: var(--gold-bright); color: var(--gold-bright); opacity: 1; }
.ja-board-tags label input { display: none; }
.ja-board-consent { flex-direction: row !important; align-items: flex-start; gap: 8px !important; font-size: 11px !important; letter-spacing: 0.05em !important; text-transform: none !important; opacity: 0.8 !important; }
.ja-board-consent input { margin-top: 2px; }
.ja-board-form button[type="submit"] {
  padding: 12px; background: var(--gold-bright); color: #0a0a18; border: 0;
  border-radius: 4px; font-weight: 600; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase;
}
.ja-board-form button:disabled { opacity: 0.4; }
.ja-board-thanks { padding: 20px; text-align: center; }
.ja-board-thanks .kicker { font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold-bright); }
.ja-board-thanks .small { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 18px; margin-top: 8px; }

/* Custom cursor — rendered at App root so it sits above all panels */
.ja-cursor {
  position: fixed; left: 0; top: 0; pointer-events: none; z-index: 2147483647;
  width: 0; height: 0;
  mix-blend-mode: screen;
}
.ja-cursor-arrow {
  position: absolute; left: 0; top: 0;
  filter: drop-shadow(0 0 4px rgba(184,137,42,0.7));
  transform: translate(-2px, -2px);
}
.ja-cursor-tip {
  position: absolute; left: 0; top: 0;
  width: 8px; height: 8px;
  background: var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold-bright);
  transform: translate(-50%, -50%);
}
.ja-cursor-halo {
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,137,42,0.5), transparent 70%);
  transform: translate(-50%, -50%);
  animation: cursorPulse var(--cp, 2.4s) ease-in-out infinite;
  animation-delay: var(--cpd, 0s);
}
@keyframes cursorPulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.7); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.4); }
}

/* Gear panel */
.ja-gear-panel {
  position: fixed; bottom: 60px; left: 36px;
  z-index: 50;
  background: rgba(6,6,14,0.92);
  border: 1px solid rgba(184,137,42,0.3);
  border-radius: 6px; padding: 18px;
  width: 240px;
  animation: gearOpen 0.3s ease-out;
}
@keyframes gearOpen { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ja-gear-panel h4 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 18px; margin: 0 0 12px; color: var(--gold-bright); }
.ja-gear-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ja-gear-row label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; display: flex; justify-content: space-between; }
.ja-gear-row input[type="range"] { width: 100%; accent-color: var(--gold-bright); }
.ja-gear-toggle { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.85; }
.ja-gear-toggle input { accent-color: var(--gold-bright); }

/* Onboarding tour */
.ja-tour {
  position: fixed; bottom: 80px; right: 36px; left: auto; transform: none;
  z-index: 80; pointer-events: auto;
  background: linear-gradient(180deg, rgba(18,14,38,0.97), rgba(6,6,14,0.97));
  border: 1px solid rgba(107,79,187,0.45);
  border-radius: 10px; padding: 20px 26px;
  min-width: 340px; max-width: 420px;
  animation: fadeIn 0.4s ease-out;
  box-shadow: 0 0 60px rgba(107,79,187,0.18), 0 2px 24px rgba(0,0,0,0.6);
}
.ja-tour-steps { display: flex; gap: 6px; margin-bottom: 14px; align-items: center; }
.ja-tour-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.18); transition: all 0.3s;
}
.ja-tour-dot.on { background: var(--gold-bright); width: 18px; border-radius: 3px; }
.ja-tour-dot.done { background: rgba(184,137,42,0.45); }
.ja-tour-kicker { font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase; opacity: 0.45; }
.ja-tour-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: var(--gold-bright); margin-top: 4px; text-shadow: 0 0 16px rgba(184,137,42,0.4); }
.ja-tour-body { font-size: 12px; line-height: 1.65; opacity: 0.72; margin-top: 8px; }
.ja-tour-hint { font-size: 10px; opacity: 0.38; margin-top: 10px; font-style: italic; letter-spacing: 0.04em; }
.ja-tour-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.ja-tour-skip { background: none; border: 0; color: var(--ink-soft); font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.38; }
.ja-tour-skip:hover { opacity: 0.7; }
.ja-tour-next { background: var(--gold-bright); color: #0a0a18; border: 0; padding: 9px 20px; border-radius: 4px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }
.ja-tour-next:hover { background: var(--gold); }

/* Tour target highlights */
.tour-hi {
  animation: tourHiPulse 1.4s ease-in-out infinite !important;
  border-color: var(--gold-bright) !important;
}
@keyframes tourHiPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,168,87,0.5), 0 0 10px rgba(212,168,87,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(212,168,87,0), 0 0 20px rgba(212,168,87,0.35); }
}
.tour-hi-text { color: var(--gold-bright) !important; opacity: 1 !important; font-weight: 600; }

/* Game invite */
.ja-game-invite {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 60; pointer-events: auto;
  background: linear-gradient(180deg, rgba(20,18,42,0.95), rgba(8,8,16,0.95));
  border: 1px solid rgba(184,137,42,0.4);
  border-radius: 8px; padding: 18px 24px;
  text-align: center; min-width: 320px;
  animation: fadeIn 0.35s ease-out;
  box-shadow: 0 0 60px rgba(184,137,42,0.25);
}
.ja-game-invite-kicker { font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase; opacity: 0.55; }
.ja-game-invite-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; color: var(--gold-bright); margin-top: 4px; text-shadow: 0 0 16px rgba(184,137,42,0.5); }
.ja-game-invite-sub { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 13px; opacity: 0.7; margin-top: 4px; }
.ja-game-invite-row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.ja-game-invite-yes { background: var(--gold-bright); color: #0a0a18; border: 0; padding: 9px 18px; border-radius: 4px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.ja-game-invite-no { background: none; border: 0; color: var(--ink-soft); font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.55; }
.ja-game-invite-no:hover { opacity: 1; }

/* Foot CTA */
.ja-foot-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(184,137,42,0.06); border: 1px solid rgba(184,137,42,0.25);
  padding: 6px 14px; border-radius: 999px; color: var(--gold-bright);
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: all 0.3s;
}
.ja-foot-cta:hover { background: rgba(184,137,42,0.18); border-color: var(--gold-bright); }
.ja-foot-cta.on { background: rgba(184,137,42,0.25); border-color: var(--gold-bright); }
.ja-foot-cta-dot { width: 5px; height: 5px; background: var(--gold-bright); border-radius: 50%; box-shadow: 0 0 8px var(--gold-bright); animation: ctaDot 2.4s ease-in-out infinite; }
@keyframes ctaDot { 0%,100%{opacity:0.6;} 50%{opacity:1;} }
.ja-foot-cta-l { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 11px; letter-spacing: 0.05em; text-transform: none; color: var(--ink); }
.ja-foot-cta-sep { opacity: 0.4; }
.ja-foot-cta-m { opacity: 0.7; }
.ja-foot-cta-r { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 10px; text-transform: none; opacity: 0.6; }
.ja-foot-cta-arrow { margin-left: 8px; padding-left: 10px; border-left: 1px solid rgba(184,137,42,0.3); font-weight: 600; color: var(--gold-bright); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Profile selector overlay */
.ja-profile-overlay {
  position: fixed; inset: 0; z-index: 70; pointer-events: auto;
  background: rgba(4,4,12,0.88); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.35s ease-out;
}
.ja-profile-inner { text-align: center; max-width: 560px; width: 90%; padding: 0 16px; }
.ja-profile-kicker { font-size: 9px; letter-spacing: 0.45em; text-transform: uppercase; opacity: 0.45; margin-bottom: 10px; }
.ja-profile-title { font-family: 'Cormorant Garamond', serif; font-size: 28px; color: var(--gold-bright); margin: 0 0 10px; text-shadow: 0 0 20px rgba(184,137,42,0.4); }
.ja-profile-tagline { font-size: 11px; color: #fff; opacity: 0.85; line-height: 1.6; margin-bottom: 22px; max-width: 420px; margin-left: auto; margin-right: auto; }
.ja-profile-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 24px; }
.ja-profile-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 16px 12px;
  display: flex; flex-direction: column; gap: 6px;
  transition: all 0.25s;
}
.ja-profile-card:hover { background: rgba(184,137,42,0.1); border-color: rgba(184,137,42,0.4); }
.ja-profile-card.active { border-color: var(--gold-bright); background: rgba(184,137,42,0.15); }
.ja-profile-card-label { font-family: 'Cormorant Garamond', serif; font-size: 18px; color: var(--gold-bright); }
.ja-profile-card-sub { font-size: 10px; opacity: 0.5; letter-spacing: 0.1em; }
.ja-profile-card-stat { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; font-size: 9px; opacity: 0.55; letter-spacing: 0.05em; }
.ja-profile-visit { background: none; border: 0; color: var(--ink-soft); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.4; }
.ja-profile-visit:hover { opacity: 0.75; }
@media (max-width: 520px) { .ja-profile-cards { grid-template-columns: 1fr; } .ja-profile-title { font-size: 22px; } }

/* Visit/Quest star choice popup */
.ja-visit-choice {
  position: fixed; inset: 0; z-index: 65; pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,4,12,0.6); backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease-out;
}
.ja-visit-choice-inner {
  background: linear-gradient(180deg, rgba(18,14,38,0.97), rgba(6,6,14,0.97));
  border: 1px solid rgba(var(--accent, 184,137,42), 0.35);
  border-radius: 10px; padding: 24px 28px; text-align: center; min-width: 280px;
  box-shadow: 0 0 60px rgba(184,137,42,0.15);
}
.ja-visit-choice-eye { width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 10px; }
.ja-visit-choice-name { font-family: 'Cormorant Garamond', serif; font-size: 20px; color: var(--gold-bright); margin-bottom: 6px; }
.ja-visit-choice-msg { font-size: 11px; opacity: 0.6; margin-bottom: 16px; }
.ja-visit-choice-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ja-visit-choice-quest { background: var(--gold-bright); color: #0a0a18; border: 0; padding: 9px 18px; border-radius: 4px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }
.ja-visit-choice-visit { background: none; border: 0; color: var(--ink-soft); font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.45; }
.ja-visit-choice-visit:hover { opacity: 0.75; }

/* Leaderboard reset button */
.ja-board-reset {
  display: block; width: 100%; margin-top: 16px;
  background: none; border: 1px solid rgba(255,100,100,0.25); border-radius: 4px;
  color: rgba(255,120,120,0.6); font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase;
  padding: 7px 12px; text-align: center;
}
.ja-board-reset:hover { border-color: rgba(255,100,100,0.6); color: rgba(255,130,130,0.9); }
.ja-board-reset-confirm { margin-top: 12px; padding: 12px; border: 1px solid rgba(255,100,100,0.25); border-radius: 6px; background: rgba(255,60,60,0.05); }
.ja-board-reset-msg { font-size: 10px; opacity: 0.75; line-height: 1.5; margin-bottom: 10px; }
.ja-board-reset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ja-board-reset-ok { background: rgba(255,80,80,0.2); border: 1px solid rgba(255,80,80,0.5); color: #ff9999; border-radius: 4px; font-size: 9px; letter-spacing: 0.2em; padding: 6px 12px; }
.ja-board-reset-ok:hover { background: rgba(255,80,80,0.35); }
.ja-board-reset-save { background: rgba(184,137,42,0.15); border: 1px solid rgba(184,137,42,0.4); color: var(--gold-bright); border-radius: 4px; font-size: 9px; letter-spacing: 0.2em; padding: 6px 12px; }
.ja-board-reset-skip { background: none; border: 0; color: rgba(255,255,255,0.35); font-size: 9px; letter-spacing: 0.15em; padding: 6px 4px; }
.ja-board-reset-cancel { background: none; border: 0; color: rgba(255,255,255,0.35); font-size: 9px; letter-spacing: 0.15em; padding: 6px 4px; }

/* Phase G — share + diploma actions */
.ja-board-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.ja-board-share-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.85); border-radius: 4px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; padding: 8px 16px; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.ja-board-share-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4); }
.ja-board-diploma-btn { background: rgba(184,137,42,0.12); border: 1px solid rgba(184,137,42,0.35); color: var(--gold-bright); border-radius: 4px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; padding: 8px 16px; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.ja-board-diploma-btn:hover { background: rgba(184,137,42,0.22); border-color: var(--gold-bright); }
.ja-board-share-menu { margin-top: 12px; padding: 14px; background: rgba(10,8,20,0.95); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.ja-board-share-label { font-size: 9px; letter-spacing: 0.35em; text-transform: uppercase; opacity: 0.5; text-align: center; margin-bottom: 4px; }
.ja-board-share-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ja-board-share-link { display: inline-block; padding: 7px 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 4px; font-size: 10px; letter-spacing: 0.1em; color: rgba(255,255,255,0.8); text-decoration: none; transition: background 0.2s; }
.ja-board-share-link:hover { background: rgba(255,255,255,0.12); color: #fff; }
.ja-board-share-copy { background: rgba(184,137,42,0.1); border: 1px solid rgba(184,137,42,0.3); color: var(--gold-bright); border-radius: 4px; font-size: 10px; letter-spacing: 0.1em; padding: 7px 14px; cursor: pointer; }
.ja-board-share-copy:hover { background: rgba(184,137,42,0.2); }
.ja-board-share-close { background: none; border: 0; color: rgba(255,255,255,0.3); font-size: 10px; letter-spacing: 0.1em; padding: 4px; cursor: pointer; align-self: center; }
.ja-board-share-close:hover { color: rgba(255,255,255,0.6); }

@media (max-width: 920px) {
  .ja-foot-cta { font-size: 7px; padding: 4px 8px; gap: 5px; }
  .ja-foot-cta-m, .ja-foot-cta-r { display: none; }
}

/* ── Help panel nav button ── */
.ja-nav-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(246,243,236,0.25);
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  opacity: 0.6; transition: opacity 0.2s, border-color 0.2s;
  line-height: 1;
}
.ja-nav-help:hover { opacity: 1; border-color: rgba(246,243,236,0.6); }

/* ── Help panel overlay ── */
.ja-help-overlay {
  position: fixed; inset: 0; z-index: 9200;
  background: rgba(6,6,14,0.72); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 24px 24px;
  animation: fadeIn 0.18s ease-out;
}
.ja-help-panel {
  background: linear-gradient(160deg, rgba(14,10,31,0.98), rgba(6,6,14,0.99));
  border: 1px solid rgba(184,137,42,0.22);
  border-radius: 12px; width: 100%; max-width: 640px;
  max-height: calc(100vh - 84px); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 0 80px rgba(107,79,187,0.15);
}
.ja-help-head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px 14px; border-bottom: 1px solid rgba(246,243,236,0.08);
  flex-shrink: 0;
}
.ja-help-kicker {
  font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.4; flex: 1;
}
.ja-help-tabs {
  display: flex; gap: 4px;
}
.ja-help-tab {
  background: none; border: 1px solid transparent; border-radius: 4px;
  color: var(--ink-soft); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 4px 10px; opacity: 0.45; transition: opacity 0.15s, border-color 0.15s;
}
.ja-help-tab:hover { opacity: 0.75; }
.ja-help-tab.on { opacity: 1; border-color: rgba(184,137,42,0.45); color: var(--gold-bright); }
.ja-help-x {
  background: none; border: 0; color: var(--ink-soft); font-size: 20px;
  opacity: 0.4; padding: 0 4px; line-height: 1; transition: opacity 0.15s;
}
.ja-help-x:hover { opacity: 0.9; }

.ja-help-body {
  overflow-y: auto; padding: 20px; flex: 1;
  scrollbar-width: thin; scrollbar-color: rgba(184,137,42,0.3) transparent;
}
.ja-help-section { margin-bottom: 22px; }
.ja-help-sh {
  font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-bright); opacity: 0.7; margin-bottom: 10px;
}
.ja-help-table { width: 100%; border-collapse: collapse; }
.ja-help-table tr { border-bottom: 1px solid rgba(246,243,236,0.05); }
.ja-help-table tr:last-child { border-bottom: 0; }
.ja-help-key {
  font-size: 10px; font-family: 'Courier New', monospace;
  color: var(--ink-soft); opacity: 0.7; padding: 5px 12px 5px 0;
  white-space: nowrap; vertical-align: top; width: 38%;
}
.ja-help-val {
  font-size: 10px; color: var(--ink-soft); opacity: 0.5;
  padding: 5px 0; line-height: 1.5;
}

/* FAQ tab */
.ja-help-faq-item { margin-bottom: 16px; }
.ja-help-faq-q {
  font-size: 11px; color: var(--ink); opacity: 0.85; margin-bottom: 4px; font-weight: 500;
}
.ja-help-faq-a {
  font-size: 10px; color: var(--ink-soft); opacity: 0.55; line-height: 1.6;
}

/* ── Carnet de mémoire ── */
.ja-carnet-panel { max-width: 560px; }
.ja-carnet-count {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-bright); opacity: 0.7; margin-right: auto;
}
.ja-carnet-empty {
  font-size: 11px; opacity: 0.4; text-align: center; padding: 32px 0; line-height: 1.6;
}
.ja-carnet-entry {
  border-bottom: 1px solid rgba(246,243,236,0.06);
  padding: 12px 0;
}
.ja-carnet-entry:last-of-type { border-bottom: 0; }
.ja-carnet-entry-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 7px; flex-wrap: wrap;
}
.ja-carnet-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.ja-carnet-name {
  font-family: 'Cormorant Garamond', serif; font-size: 14px; font-weight: 600; flex: 1;
}
.ja-carnet-kind {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.35;
}
.ja-carnet-eng {
  font-size: 11px; color: var(--gold-bright); opacity: 0.6;
  title: 'Engramme utilisé';
}
.ja-carnet-date {
  font-size: 9px; opacity: 0.3; margin-left: auto; white-space: nowrap;
}
.ja-carnet-note {
  width: 100%; background: rgba(246,243,236,0.03); border: 1px solid rgba(246,243,236,0.08);
  border-radius: 4px; color: var(--ink-soft); font-size: 10px; font-family: inherit;
  padding: 6px 8px; resize: vertical; line-height: 1.5;
  transition: border-color 0.15s;
}
.ja-carnet-note:focus { outline: none; border-color: rgba(184,137,42,0.3); }
.ja-carnet-note::placeholder { opacity: 0.3; }
.ja-carnet-hidden-section { margin-top: 20px; }
.ja-carnet-hidden-list {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.ja-carnet-hidden-item {
  font-size: 9px; letter-spacing: 0.3em; opacity: 0.2; padding: 3px 6px;
  border: 1px solid rgba(246,243,236,0.08); border-radius: 3px;
}

/* ── Level-up celebration ── */
.ja-levelup {
  position: fixed; inset: 0; z-index: 850;
  background: rgba(6,6,14,0.90); backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.6s ease-out; cursor: pointer;
}
.ja-levelup-inner { text-align: center; max-width: 440px; padding: 0 32px; }
.ja-levelup-kicker {
  font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold-bright); opacity: 0.65; margin-bottom: 16px;
  animation: fadeIn 0.5s ease-out both;
}
.ja-levelup-title {
  font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 300;
  color: var(--ink); margin-bottom: 20px;
  animation: fadeIn 0.6s 0.3s ease-out both;
}
.ja-levelup-text {
  font-size: 13px; color: var(--ink-soft); opacity: 0.65; line-height: 1.7;
  margin-bottom: 28px;
  animation: fadeIn 0.6s 0.7s ease-out both;
}
.ja-levelup-text strong { color: var(--gold-bright); opacity: 1; font-weight: 500; }
.ja-levelup-skip {
  font-size: 8px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.25;
  animation: fadeIn 0.5s 2s ease-out both;
}

/* ── Narrative event ── */
.ja-narrative {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(6,6,14,0.88); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.5s ease-out;
  cursor: pointer;
}
.ja-narrative-inner {
  text-align: center; max-width: 480px; padding: 0 32px;
}
.ja-narrative-eye {
  width: 16px; height: 16px; border-radius: 50%;
  margin: 0 auto 16px; animation: foundPulse 2s ease-in-out infinite;
}
.ja-narrative-star {
  font-size: 10px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--accent, var(--gold-bright)); opacity: 0.65; margin-bottom: 10px;
}
.ja-narrative-title {
  font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 300;
  color: var(--ink); margin-bottom: 18px; line-height: 1.2;
  animation: fadeIn 0.6s 0.3s ease-out both;
}
.ja-narrative-text {
  font-size: 13px; color: var(--ink-soft); opacity: 0.65;
  line-height: 1.7; margin-bottom: 24px;
  animation: fadeIn 0.6s 0.7s ease-out both;
}
.ja-narrative-skip {
  font-size: 8px; letter-spacing: 0.3em; text-transform: uppercase;
  opacity: 0.25; animation: fadeIn 0.5s 2s ease-out both;
}

/* ── Sci-fi intro ── */
.ja-intro {
  position: fixed; inset: 0; z-index: 9800;
  background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.7s ease-out;
  cursor: pointer;
}
.ja-intro.out { opacity: 0; pointer-events: none; }
.ja-intro-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(107,79,187,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.ja-intro-content {
  position: relative; z-index: 1;
  text-align: center; padding: 0 40px; max-width: 540px;
  animation: fadeIn 0.6s ease-out;
}
.ja-intro-line {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 300; color: var(--ink);
  line-height: 1.5; opacity: 0;
  animation: introLine 1s ease-out forwards;
}
.ja-intro-line.kicker {
  font-family: 'Inter', sans-serif;
  font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold-bright); opacity: 0; margin-bottom: 12px;
  animation: introLine 1s ease-out forwards;
}
@keyframes introLine {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 0.85; transform: translateY(0); }
}
.ja-intro-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: rgba(246,243,236,0.07);
}
.ja-intro-bar-fill {
  height: 100%; background: var(--gold-bright); opacity: 0.4;
  transition: width 0.8s linear;
}
.ja-intro-skip {
  position: absolute; bottom: 24px; right: 28px;
  background: none; border: 0; color: var(--ink-soft);
  font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.35;
  transition: opacity 0.15s;
}
.ja-intro-skip:hover { opacity: 0.7; }

/* ── Mobile zoom controls ── */
.ja-mob-zoom {
  display: none;
  position: absolute; bottom: 80px; right: 14px; z-index: 120;
  flex-direction: column; gap: 6px;
}
.ja-mob-zoom-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(246,243,236,0.08); border: 1px solid rgba(246,243,236,0.15);
  color: var(--ink); font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  touch-action: manipulation;
}
.ja-mob-zoom-btn:active { background: rgba(246,243,236,0.2); }

/* ── Portrait landscape signal ── */
.ja-landscape-signal {
  display: none;
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(6,6,14,0.92);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; color: var(--ink-soft);
  pointer-events: none;
}
.ja-landscape-text { font-size: 12px; letter-spacing: 0.15em; opacity: 0.6; text-align: center; padding: 0 24px; }

/* Mobile / tablet */
@media (max-width: 920px) {
  .ja-nav { display: none; }
  .ja-foot { font-size: 8px; padding: 14px 18px; }
  .ja-chrome { padding: 18px; }
  .ja-hud { left: 14px; max-width: 180px; }
  .ja-compass { right: 14px; width: 60px; height: 60px; }
  .ja-universe-grid { grid-template-columns: 1fr; gap: 32px; padding: 60px 24px; }
  .ja-board-body { grid-template-columns: 1fr; }
  /* Starbar — hide text on mobile to save space */
  .ja-starbar { gap: 3px; }
  .ja-starbar-item { padding: 4px 6px; letter-spacing: 0; }
  .ja-starbar-name { display: none; }
  /* Show mobile zoom buttons */
  .ja-mob-zoom { display: flex; }
  /* Naming overlay fullscreen on mobile */
  .ja-naming-inner {
    width: 100vw; max-width: 100%; border-radius: 0;
    padding: 32px 20px; min-height: 100dvh;
    display: flex; flex-direction: column; justify-content: center;
  }
}
@media (orientation: portrait) and (max-width: 768px) {
  .ja-landscape-signal { display: flex; }
}

/* ── Phase H — Diploma modal ──────────────────────────────────────────────── */
.ja-diploma-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(4,2,12,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.ja-diploma-panel {
  position: relative; width: 100%; max-width: 520px; max-height: 90vh;
  overflow-y: auto;
  background: rgba(8,6,18,0.98);
  border: 1px solid rgba(184,137,42,0.25);
  border-radius: 8px;
  padding: 32px 28px 28px;
  color: rgba(255,255,255,0.88);
  font-family: 'Inter', sans-serif;
}
.ja-diploma-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: 0; color: rgba(255,255,255,0.3);
  font-size: 14px; cursor: pointer; padding: 4px 6px; line-height: 1;
}
.ja-diploma-close:hover { color: rgba(255,255,255,0.7); }
.ja-diploma-header { text-align: center; margin-bottom: 24px; }
.ja-diploma-kicker { font-size: 9px; letter-spacing: 0.45em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 6px; }
.ja-diploma-title { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 300; margin: 0; color: rgba(255,255,255,0.95); }
.ja-diploma-preview { display: flex; justify-content: center; margin-bottom: 20px; }
.ja-diploma-preview-badge {
  border: 1px solid; border-radius: 6px; padding: 14px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 180px;
}
.ja-diploma-preview-level { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; }
.ja-diploma-preview-count { font-family: 'Cormorant Garamond', serif; font-size: 22px; }
.ja-diploma-preview-seasons { font-size: 10px; opacity: 0.7; }
.ja-diploma-form { display: flex; flex-direction: column; gap: 14px; }
.ja-diploma-label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; display: flex; flex-direction: column; gap: 5px; }
.ja-diploma-input {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px; color: rgba(255,255,255,0.88); font-size: 13px;
  padding: 8px 10px; font-family: inherit; letter-spacing: normal; text-transform: none;
  outline: none;
}
.ja-diploma-input:focus { border-color: rgba(184,137,42,0.5); background: rgba(255,255,255,0.08); }
.ja-diploma-consent {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 11px; letter-spacing: 0.03em; text-transform: none; opacity: 0.8; line-height: 1.5;
}
.ja-diploma-consent input { margin-top: 2px; flex-shrink: 0; accent-color: var(--gold-bright); }
.ja-diploma-meta { font-size: 10px; opacity: 0.45; text-align: center; letter-spacing: 0.08em; }
.ja-diploma-submit {
  background: rgba(184,137,42,0.15); border: 1px solid rgba(184,137,42,0.4);
  color: var(--gold-bright); border-radius: 4px; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; padding: 11px 20px;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}
.ja-diploma-submit:hover:not(:disabled) { background: rgba(184,137,42,0.28); border-color: var(--gold-bright); }
.ja-diploma-submit:disabled { opacity: 0.35; cursor: default; }
.ja-diploma-status { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 0; text-align: center; }
.ja-diploma-spinner { font-size: 32px; color: var(--gold-bright); animation: spin 1.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ja-diploma-success { font-size: 36px; color: var(--gold-bright); }
.ja-diploma-success-msg { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-style: italic; }
.ja-diploma-success-sub { font-size: 10px; opacity: 0.5; word-break: break-all; }
.ja-diploma-error { color: rgba(255,100,100,0.9); font-size: 12px; }
.ja-diploma-email-section { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ja-diploma-email-prompt { font-size: 11px; opacity: 0.6; margin: 0; }
.ja-diploma-email-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8); border-radius: 4px; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 16px; cursor: pointer;
}
.ja-diploma-email-btn:hover { background: rgba(255,255,255,0.12); }
.ja-diploma-email-services { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ja-diploma-email-link {
  display: inline-block; padding: 7px 14px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px; font-size: 10px; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.8); text-decoration: none; transition: background 0.2s;
}
.ja-diploma-email-link:hover { background: rgba(255,255,255,0.12); color: #fff; }
.ja-diploma-close-btn {
  background: none; border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.5);
  border-radius: 4px; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 8px 20px; cursor: pointer;
}
.ja-diploma-close-btn:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); }
@media (max-width: 560px) {
  .ja-diploma-panel { padding: 24px 16px 20px; }
}

/* ── Phase K — Audio player bar (masqué — contrôles uniquement dans le doc rétractable) ── */
.ja-audio-bar {
  display: none !important;
}
.ja-audio-bar:hover { opacity: 1 !important; }
.ja-audio-btn {
  background: none; border: 0;
  color: rgba(255,255,255,0.38);
  font-size: 12px; line-height: 1;
  padding: 4px 6px; cursor: pointer;
  transition: color 0.18s;
  font-family: inherit;
}
.ja-audio-btn:hover { color: rgba(255,255,255,0.82); }
.ja-audio-btn.on    { color: var(--gold-bright, #d4a857); }
.ja-audio-vol-wrap  { position: relative; }
.ja-audio-vol-popup {
  position: absolute;
  bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: rgba(4,3,12,0.94);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  padding: 10px 14px;
  white-space: nowrap;
}
.ja-audio-range {
  width: 80px; height: 2px;
  accent-color: var(--gold-bright, #d4a857);
  cursor: pointer;
  display: block;
}
@media (max-width: 920px) {
  .ja-audio-bar { bottom: 72px; left: 12px; }
}

/* ── HUD toggle & collapsed mode ──────────────────────────── */
.ja-hud-toggle {
  background: rgba(6,6,14,0.92);
  border: 1px solid rgba(184,137,42,0.18); border-radius: 4px;
  color: rgba(184,137,42,0.55); font-size: 8px; padding: 3px 8px;
  letter-spacing: 0.2em; cursor: pointer; transition: color 0.2s;
  align-self: flex-start;
}
.ja-hud-toggle:hover { color: var(--gold-bright); }
.ja-hud-val-denom { font-size: 13px; opacity: 0.55; }

/* Mini squares (collapsed HUD) */
.ja-hud-mini {
  display: flex; flex-direction: row; gap: 6px;
}
.ja-hud-mini-sq {
  width: 44px; height: 44px; border-radius: 6px;
  background: rgba(6,6,14,0.92);
  border: 1px solid rgba(184,137,42,0.18);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-size: 14px;
  color: var(--gold-bright); cursor: default;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s;
}
.ja-hud-mini-sq.engramme { color: rgba(212,168,87,0.7); font-size: 11px; }
.ja-hud-mini-sq.hmi { border-color: rgba(100,180,100,0.25); color: rgba(180,220,180,0.6); }
.ja-hud-mini-sq.hmi.on { border-color: rgba(80,200,100,0.7); color: #7eff9a; cursor: pointer; }
.ja-hud-mini-sq span { line-height: 1; }
.ja-hud-mini-denom { font-size: 9px; opacity: 0.5; }

/* Zoom +/- buttons: 12px lower */
.ja-mob-zoom { bottom: 92px; }

/* ── StarNavBar: dots only on desktop ───────────────────────── */
@media (min-width: 921px) {
  .ja-starbar-name { display: none; }
  .ja-starbar-item { padding: 6px 8px; }
}

/* ── Crosshair ───────────────────────────────────────────────── */
.ja-crosshair {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none; z-index: 14;
}

/* ── Small game logo in Chrome mark ─────────────────────────── */
.ja-mark-game-logo {
  height: 18px; width: auto; opacity: 0;
  animation: gameLogo 0.6s ease-out forwards;
  margin-right: 4px; vertical-align: middle;
}
@keyframes gameLogo { to { opacity: 0.8; } }

/* ── Footer carnet button ────────────────────────────────────── */
.ja-foot-carnet-btn {
  background: none; border: 1px solid rgba(184,137,42,0.3);
  color: var(--gold-bright); border-radius: 14px;
  font-size: 10px; letter-spacing: 0.15em;
  padding: 3px 12px; cursor: pointer; opacity: 0.75;
  transition: opacity 0.2s;
}
.ja-foot-carnet-btn:hover { opacity: 1; }
.ja-foot-game-actions { display: flex; align-items: center; gap: 6px; }

/* ── Carnet: engramme text + teleport button ─────────────────── */
.ja-carnet-engramme-text {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 12px; line-height: 1.55;
  color: rgba(212,168,87,0.75); opacity: 0.85;
  border-left: 2px solid rgba(184,137,42,0.3);
  padding-left: 10px; margin: 6px 0 4px;
}
.ja-carnet-teleport {
  background: none; border: 1px solid rgba(184,137,42,0.25);
  color: rgba(184,137,42,0.6); border-radius: 50%;
  width: 22px; height: 22px; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-left: auto; flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
}
.ja-carnet-teleport:hover { color: var(--gold-bright); border-color: var(--gold-bright); }

/* ── Carnet 3 tabs ────────────────────────────────────────── */
.ja-carnet-tabs {
  display: flex; gap: 4px; padding: 0 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.ja-carnet-tab {
  background: none; border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5); font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 3px;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 5px;
  font-family: 'Inter', sans-serif;
}
.ja-carnet-tab:hover { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.3); }
.ja-carnet-tab.on { background: rgba(184,137,42,0.15); border-color: rgba(184,137,42,0.5); color: var(--gold-bright); }
.ja-carnet-tab-badge {
  background: rgba(184,137,42,0.3); color: var(--gold-bright);
  font-size: 9px; padding: 1px 5px; border-radius: 8px; font-weight: 600;
}
.ja-carnet-tab-badge.pulse { animation: tabBadgePulse 1.5s ease-in-out infinite; }
@keyframes tabBadgePulse {
  0%, 100% { background: rgba(184,137,42,0.3); }
  50% { background: rgba(184,137,42,0.6); }
}
.ja-carnet-body { overflow-y: auto; flex: 1; }

/* Réminiscences */
.ja-carnet-remin { background: rgba(126,255,154,0.04); border: 1px solid rgba(126,255,154,0.15) !important; border-radius: 4px; padding: 12px 14px !important; }
.ja-carnet-remin-tag { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(126,255,154,0.6); margin-bottom: 8px; }
.ja-carnet-remin-pos { font-size: 10px; opacity: 0.4; margin-top: 8px; letter-spacing: 0.1em; }

/* Discovered card extras */
.ja-carnet-meta {
  display: flex; gap: 12px; font-size: 10px; opacity: 0.45;
  margin: 4px 0 8px; letter-spacing: 0.05em;
}
.ja-carnet-use-eng {
  background: rgba(184,137,42,0.1); border: 1px solid rgba(184,137,42,0.3);
  color: var(--gold-bright); font-size: 10px; letter-spacing: 0.1em;
  padding: 5px 10px; border-radius: 3px; cursor: pointer; margin-bottom: 8px;
  transition: all 0.2s; width: 100%; text-align: left;
}
.ja-carnet-use-eng:hover:not(.disabled) { background: rgba(184,137,42,0.2); }
.ja-carnet-use-eng.disabled { opacity: 0.35; cursor: not-allowed; }

/* Spotted */
.ja-carnet-attempts { font-size: 10px; opacity: 0.45; margin-bottom: 6px; font-style: italic; }

/* ── Mobile: HUD higher, compressed ────────────────────────── */
@media (max-width: 920px) {
  .ja-hud { top: 54px; left: 10px; max-width: 180px; gap: 6px; }
  .ja-hud-stat { padding: 5px 10px; }
  .ja-hud-val { font-size: 18px; }
  .ja-hud-btn { padding: 6px 10px; }
  .ja-hud-mini-sq { width: 40px; height: 40px; font-size: 13px; }
}

/* ── Audio HUD — 4 carrés uniformes dans GameHUD ─────────────── */
.ja-hud-audio-bar {
  display: flex; flex-direction: row; align-items: center; gap: 4px;
}
.ja-hud-audio-collapsed {
  display: flex; flex-direction: row; align-items: center; gap: 4px;
}
/* Carré uniforme 44×44 */
.ja-hud-audio-sq {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(6,6,14,0.92);
  border: 1px solid rgba(184,137,42,0.28); border-radius: 6px;
  color: var(--gold-bright); font-size: 11px; font-family: 'Inter', monospace;
  font-weight: 500; letter-spacing: 0.03em; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, box-shadow 0.3s;
  white-space: nowrap;
}
.ja-hud-audio-sq:hover { background: rgba(184,137,42,0.13); }
/* Play/pause avec lueur du mode */
.ja-hud-audio-sq.play {
  border-color: var(--mode-color, rgba(184,137,42,0.35));
  box-shadow: 0 0 10px var(--mode-glow, rgba(184,137,42,0.15));
}
/* Bouton mode — pulsation colorée */
.ja-hud-audio-sq.mode-btn { font-size: 14px; }
.ja-hud-audio-sq.mode-yellow { color: #ffd700; border-color: rgba(255,215,0,0.4);  animation: modePulse 2s ease-in-out infinite; }
.ja-hud-audio-sq.mode-green  { color: #7eff9a; border-color: rgba(126,255,154,0.4); animation: modePulse 2s ease-in-out infinite; }
.ja-hud-audio-sq.mode-purple { color: #c084fc; border-color: rgba(192,132,252,0.4); animation: modePulse 1.5s ease-in-out infinite; }
.ja-hud-audio-sq.mode-blue   { color: #60a5fa; border-color: rgba(96,165,250,0.4);  animation: modePulse 1.5s ease-in-out infinite; }
.ja-hud-audio-sq.mode-red    { color: #ff6b6b; border-color: rgba(255,107,107,0.4); animation: modePulse 1s ease-in-out infinite; }
.ja-hud-audio-sq.mode-off    { color: rgba(160,160,160,0.5); animation: none; }
@keyframes modePulse {
  0%,100% { box-shadow: 0 0 6px var(--mode-glow, rgba(184,137,42,0.1)); }
  50%      { box-shadow: 0 0 14px var(--mode-glow, rgba(184,137,42,0.35)); }
}
/* Boutons expand/collapse */
.ja-hud-collapse-btn, .ja-hud-expand-btn {
  width: 20px; height: 20px; flex-shrink: 0;
  background: none; border: 1px solid rgba(184,137,42,0.15); border-radius: 4px;
  color: rgba(184,137,42,0.4); font-size: 7px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s;
}
.ja-hud-collapse-btn:hover, .ja-hud-expand-btn:hover { color: var(--gold-bright); }

/* Floating AudioControls (desktop): mode indicator */
.ja-audio-btn.mode-ind { font-size: 11px; }

/* Floating AudioControls: hidden on mobile (audio in game HUD) */
@media (max-width: 920px) { .ja-audio-bar { display: none; } }

/* ── Mobile & tablette joysticks ─────────────────────────────── */
.ja-joy {
  position: fixed; bottom: 90px; /* levé pour éviter le footer */
  width: 57px; height: 57px; border-radius: 50%;
  background: rgba(6,6,14,0.92);
  border: 1.5px solid rgba(255,255,255,0.16);
  display: none; /* masqué par défaut, montré par media queries */
  align-items: center; justify-content: center;
  touch-action: none; z-index: 20;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.12);
}
.ja-joy-left  { left: 20px; }
.ja-joy-right { right: 20px; }
.ja-joy-stick {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  border: 1px solid rgba(255,255,255,0.4);
  pointer-events: none; will-change: transform;
}
/* Mobile (≤920px) — joysticks visibles via React (quand HUD collapsed + game) */
@media (max-width: 920px) {
  .ja-joy { display: flex; }
  .ja-joy-left  { left: 20px; }
  .ja-joy-right { right: 20px; }
}
/* Tablette (921–1366px) — joysticks légèrement plus grands */
@media (min-width: 921px) and (max-width: 1366px) {
  .ja-joy { display: flex; width: 80px; height: 80px; bottom: 100px; }
  .ja-joy-stick { width: 32px; height: 32px; }
}
@media (min-width: 921px) and (max-width: 1366px) and (pointer: coarse) {
  .ja-gear { width: 31px; height: 31px; }
}
/* Desktop large : cacher */
@media (min-width: 1367px) { .ja-joy { display: none !important; } }

/* Portrait mobile : lever le CTA Star Seeds pour éviter le chevauchement */
@media (orientation: portrait) and (max-width: 920px) {
  .ja-foot .ja-foot-cta { bottom: 40px; }
}

/* ── HMI countdown timer ─────────────────────────────────────── */
.ja-hmi-countdown-block {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 14px 0; padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ja-hmi-breath-rhythm {
  font-size: 11px; color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em; text-align: center; text-transform: uppercase;
}
.ja-hmi-timer {
  font-size: 40px; font-weight: 200; color: rgba(126,255,154,0.9);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  min-width: 2.5ch; text-align: center; line-height: 1;
}
.ja-hmi-close { transition: opacity 0.5s ease, background 0.2s; }

/* ── Profil change modal ─────────────────────────────────────── */
.ja-profile-change-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.82); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease-out;
}
.ja-profile-change-card {
  background: linear-gradient(160deg, rgba(14,10,31,0.98), rgba(6,6,14,0.98));
  border: 1px solid rgba(184,137,42,0.3); border-radius: 14px;
  padding: 32px 28px; max-width: 380px; width: 90%;
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
  display: flex; flex-direction: column; gap: 14px;
}
.ja-profile-change-title {
  font-family: 'Cormorant Garamond', serif; font-size: 20px;
  color: var(--gold-bright); font-weight: 400;
}
.ja-profile-change-body {
  font-size: 13px; color: rgba(255,255,255,0.72); line-height: 1.65;
}
.ja-profile-change-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ja-profile-change-cancel {
  background: none; border: 1px solid rgba(255,255,255,0.12); border-radius: 6px;
  color: rgba(255,255,255,0.45); padding: 10px; cursor: pointer;
  font-size: 11px; letter-spacing: 0.1em; transition: color 0.2s;
}
.ja-profile-change-cancel:hover { color: rgba(255,255,255,0.75); }
.ja-foot-profile-btn {
  background: none; border: 1px solid rgba(184,137,42,0.25); border-radius: 6px;
  color: rgba(184,137,42,0.65); font-size: 10px; letter-spacing: 0.12em;
  padding: 4px 10px; cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.ja-foot-profile-btn:hover { color: var(--gold-bright); border-color: rgba(184,137,42,0.55); }

/* ── Cabinet dropdown ─────────────────────────────────────── */
.ja-cabinet-dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: rgba(6,6,14,0.97); border: 1px solid rgba(184,137,42,0.3);
  border-radius: 6px; min-width: 220px; z-index: 500;
  overflow: hidden; animation: gearOpen 0.15s ease-out;
}
.ja-cabinet-opt {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 18px; text-decoration: none; transition: background 0.15s;
  cursor: pointer;
}
.ja-cabinet-opt:hover { background: rgba(184,137,42,0.1); }
.ja-cabinet-opt-title { font-size: 13px; color: var(--gold-bright); letter-spacing: 0.05em; }
.ja-cabinet-opt-sub { font-size: 10px; opacity: 0.5; letter-spacing: 0.08em; }
.ja-cabinet-sep { height: 1px; background: rgba(255,255,255,0.07); margin: 0; }

/* ── Shop ─────────────────────────────────────────────────── */
.shop-page {
  position: relative; max-width: 960px; width: 92%; max-height: 92vh;
  overflow-y: auto; margin: 4vh auto;
  background: rgba(6,6,14,0.97); border: 1px solid rgba(184,137,42,0.2);
  border-radius: 8px; color: var(--ink);
}
.shop-close { position: sticky; top: 16px; left: calc(100% - 48px); z-index: 10; }
.shop-hero { padding: 52px 52px 32px; text-align: center; }
.shop-kicker { font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase; color: rgba(184,137,42,0.6); margin-bottom: 20px; }
.shop-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(32px,5vw,52px); font-weight: 300; margin: 0 0 12px; }
.shop-subtitle { font-size: 14px; opacity: 0.5; margin: 0; font-style: italic; font-family: 'Cormorant Garamond', serif; }
.shop-cats { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 52px 28px; }
.shop-cat-btn { background: none; border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.5); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; padding: 6px 14px; border-radius: 3px; cursor: pointer; transition: all 0.2s; }
.shop-cat-btn.on { background: rgba(184,137,42,0.15); border-color: rgba(184,137,42,0.5); color: var(--gold-bright); }
.shop-cat-btn:hover:not(.on) { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.3); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; padding: 0 52px 52px; }
.shop-empty { grid-column: 1/-1; text-align: center; opacity: 0.4; font-style: italic; padding: 40px 0; }
.shop-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; overflow: hidden; transition: border-color 0.2s; }
.shop-card:hover { border-color: rgba(184,137,42,0.3); }
.shop-card-cover { position: relative; aspect-ratio: 2/3; overflow: hidden; cursor: pointer; background: rgba(184,137,42,0.06); }
.shop-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.shop-card:hover .shop-card-img { transform: scale(1.03); }
.shop-card-cover-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 32px; opacity: 0.3; }
.shop-card-overlay { position: absolute; inset: 0; background: rgba(6,6,14,0.7); opacity: 0; transition: opacity 0.2s; display: flex; align-items: center; justify-content: center; }
.shop-card:hover .shop-card-overlay { opacity: 1; }
.shop-card-detail-hint { font-size: 11px; letter-spacing: 0.15em; color: var(--gold-bright); text-transform: uppercase; }
.shop-card-info { padding: 16px; }
.shop-card-cat { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.4; margin-bottom: 6px; }
.shop-card-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; margin-bottom: 4px; }
.shop-card-sub { font-size: 11px; opacity: 0.5; margin-bottom: 8px; }
.shop-card-price { font-size: 14px; color: var(--gold-bright); margin-bottom: 12px; }
.shop-card-actions { display: flex; gap: 8px; }
.shop-detail-btn { background: none; border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.55); font-size: 10px; letter-spacing: 0.1em; padding: 6px 10px; border-radius: 3px; cursor: pointer; flex: 1; transition: all 0.2s; }
.shop-detail-btn:hover { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.9); }
.shop-buy-btn-sm { background: rgba(184,137,42,0.15); border: 1px solid rgba(184,137,42,0.4); color: var(--gold-bright); font-size: 10px; letter-spacing: 0.1em; padding: 6px 10px; border-radius: 3px; text-decoration: none; display: inline-flex; align-items: center; flex: 1; justify-content: center; transition: all 0.2s; }
.shop-buy-btn-sm:hover { background: rgba(184,137,42,0.25); }
.shop-modal-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; padding: 24px; }
.shop-modal { position: relative; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; background: rgba(6,6,14,0.99); border: 1px solid rgba(184,137,42,0.3); border-radius: 8px; display: flex; flex-direction: row; gap: 0; }
.shop-modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--ink); font-size: 20px; cursor: pointer; z-index: 2; opacity: 0.6; }
.shop-modal-img { width: 200px; flex-shrink: 0; object-fit: cover; }
.shop-modal-body { padding: 32px; flex: 1; }
.shop-modal-cat { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.4; margin-bottom: 10px; }
.shop-modal-title { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 300; margin: 0 0 8px; }
.shop-modal-sub { font-size: 12px; opacity: 0.55; margin-bottom: 12px; }
.shop-modal-price { font-size: 20px; color: var(--gold-bright); margin-bottom: 16px; }
.shop-modal-details { font-size: 13px; line-height: 1.7; opacity: 0.7; margin: 0 0 20px; }
.shop-buy-btn { display: inline-block; padding: 12px 28px; background: rgba(184,137,42,0.18); border: 1px solid rgba(184,137,42,0.5); color: var(--gold-bright); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none; border-radius: 4px; transition: all 0.2s; }
.shop-buy-btn:hover { background: rgba(184,137,42,0.3); }
@media (max-width: 920px) {
  .shop-hero, .shop-cats, .shop-grid { padding-left: 24px; padding-right: 24px; }
  .shop-modal { flex-direction: column; }
  .shop-modal-img { width: 100%; height: 200px; }
}
/* Admin shop */
.admin-shop-module { margin-top: 12px; }
.admin-shop-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.admin-shop-title { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.6; }
.admin-shop-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; max-height: 280px; overflow-y: auto; }
.admin-shop-item { border: 1px solid rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.admin-shop-item.active { border-color: rgba(184,137,42,0.3); }
.admin-shop-item-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.admin-shop-item-name { flex: 1; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-shop-item-cat { font-size: 9px; opacity: 0.45; }
.admin-shop-item-status { font-size: 9px; opacity: 0.5; }
.admin-shop-item-status.pub { color: #7eff9a; opacity: 0.8; }
.admin-shop-item-edit, .admin-shop-item-del { background: none; border: none; color: var(--ink); opacity: 0.5; cursor: pointer; font-size: 12px; padding: 2px 4px; }
.admin-shop-item-edit:hover { opacity: 1; color: var(--gold-bright); }
.admin-shop-item-del:hover { opacity: 1; color: #ff6b6b; }
.admin-shop-edit-form { padding: 10px; border-top: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; gap: 8px; background: rgba(184,137,42,0.04); }
.admin-shop-field { display: flex; flex-direction: column; gap: 3px; font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.7; }
.admin-shop-field input, .admin-shop-field textarea, .admin-shop-field select { opacity: 1; }
.admin-shop-cats { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 10px; margin-top: 6px; }
.admin-shop-cat-tag { font-size: 10px; background: rgba(255,255,255,0.07); padding: 2px 8px; border-radius: 3px; display: inline-flex; align-items: center; gap: 4px; }
.admin-shop-cat-tag button { background: none; border: none; color: var(--ink); opacity: 0.5; cursor: pointer; font-size: 11px; padding: 0; }

/* ── Contact Panel ─────────────────────────────────────────── */
.contact-panel {
  position: relative;
  background: var(--bg-2);
  border: 1px solid rgba(184,137,42,0.2);
  border-radius: 6px;
  width: min(520px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 48px 48px;
  font-family: 'Inter', sans-serif;
}
@media (max-width: 600px) { .contact-panel { padding: 32px 24px 40px; } }
.contact-close { position: absolute; top: 16px; right: 20px; }
.contact-hero { text-align: center; margin-bottom: 32px; }
.contact-kicker { font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase; color: rgba(184,137,42,0.6); margin-bottom: 16px; }
.contact-title { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 300; color: var(--ink); margin: 0 0 12px; }
.contact-sub { font-size: 13px; opacity: 0.55; line-height: 1.65; margin: 0; }
.contact-socials { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.contact-social-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--ink); opacity: 0.5; text-decoration: none;
  transition: opacity 0.2s;
}
.contact-social-btn:hover { opacity: 1; color: var(--gold-bright); }
.contact-social-label { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
.contact-divider { border: none; border-top: 1px solid rgba(255,255,255,0.07); margin-bottom: 28px; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-field { display: flex; flex-direction: column; gap: 6px; }
.contact-label { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.5; }
.contact-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.contact-input:focus { border-color: rgba(184,137,42,0.5); }
.contact-textarea { resize: vertical; min-height: 100px; }
.contact-submit {
  align-self: flex-end;
  background: transparent;
  border: 1px solid rgba(184,137,42,0.4);
  border-radius: 3px;
  color: var(--gold-bright);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 28px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.contact-submit:hover { background: rgba(184,137,42,0.15); border-color: var(--gold-bright); }
.contact-sent { text-align: center; padding: 20px 0 8px; }
.contact-sent-icon { font-size: 32px; margin-bottom: 16px; color: var(--gold-bright); }
.contact-sent-msg { font-size: 14px; opacity: 0.6; line-height: 1.6; margin-bottom: 24px; }
.contact-sent-close {
  background: transparent; border: 1px solid rgba(184,137,42,0.4); border-radius: 3px;
  color: var(--gold-bright); font-family: 'Inter', sans-serif; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; padding: 8px 24px; cursor: pointer;
}
/* Admin Contact */
.admin-contact-module { padding: 0; }


/* ── Perf mobile/tablette : suppression backdrop-filter GPU ── */
@media (max-width: 1366px) and (pointer: coarse), (max-width: 920px) {
  * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}
