:root {
  --bg: #120d0a;
  --bg-soft: #1b1310;
  --panel: rgba(28, 20, 16, 0.86);
  --panel-solid: #1f1713;
  --line: rgba(246, 234, 215, 0.14);
  --cream: #f6ead7;
  --muted: #b9a893;
  --gold: #f5b942;
  --gold-deep: #c98a1b;
  --red: #dc2626;
  --green: #22c55e;
  --pink: #f7a8c4;
  --violet: #c084fc;
  --blue: #60a5fa;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font);
  user-select: none;
  touch-action: manipulation;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  color: inherit;
  background: none;
}

a {
  color: var(--gold);
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(255, 176, 82, 0.16), transparent 60%),
    radial-gradient(120% 80% at 50% 100%, rgba(0, 0, 0, 0.72), transparent 55%);
  z-index: 1;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.overlay > * {
  pointer-events: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 14px;
}

.brand .kanji {
  font-size: 20px;
  letter-spacing: 0;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(245, 185, 66, 0.5);
}

.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--muted);
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(18, 13, 10, 0.66);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.pill.gold {
  color: var(--gold);
  border-color: rgba(245, 185, 66, 0.35);
}

.ghost-btn {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(18, 13, 10, 0.6);
  color: var(--cream);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.ghost-btn:hover,
.ghost-btn:focus-visible {
  border-color: rgba(245, 185, 66, 0.5);
  outline: none;
}

.solid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd066, var(--gold-deep));
  color: #231607;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(201, 138, 27, 0.35);
}

.solid-btn:active {
  transform: translateY(1px) scale(0.99);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 14, 11, 0.94);
  border: 1px solid rgba(245, 185, 66, 0.35);
  color: var(--cream);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 40;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 520px) {
  .brand {
    font-size: 11px;
  }
  .brand small {
    font-size: 8px;
  }
  .topbar {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* L'attribut HTML hidden doit toujours gagner sur les display des composants. */
[hidden] {
  display: none !important;
}
