:root {
  --void: #1a0508;
  --crimson: #8b0e1e;
  --ember: #c4162e;
  --gold: #e8c36a;
  --gold-soft: #f3d98a;
  --cream: #fff4e8;
  --mute: #d4a8a0;
  --glass: rgba(40, 8, 14, 0.72);
  --line: #6b2030;
  --safe: env(safe-area-inset-bottom, 0px);
  --top: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; height: 100svh; overflow: hidden; }
body {
  font-family: Manrope, "Trebuchet MS", sans-serif;
  background: var(--void);
  color: var(--cream);
}
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.off, [hidden] { display: none !important; }

#salon {
  height: 100%;
  height: 100svh;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(50% 32% at 80% 0%, rgba(232, 195, 106, 0.22), transparent 55%),
    radial-gradient(60% 40% at 10% 10%, rgba(196, 22, 46, 0.35), transparent 50%),
    linear-gradient(165deg, #2a0a10 0%, var(--void) 55%, #0c0204 100%);
  padding: var(--top) 0 0;
  position: relative;
}
#salon::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 70% 20%, var(--gold-soft), transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent),
    radial-gradient(1px 1px at 85% 65%, var(--gold), transparent);
}

.marquee {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 6px;
  position: relative;
  z-index: 1;
}
.crest-btn {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  width: 48px; height: 48px; flex-shrink: 0;
}
.crest-btn img { width: 48px; height: 48px; }
.title-block { min-width: 0; flex: 1; }
.title-block em {
  display: block; font-family: Cinzel, serif; font-style: normal;
  font-size: 11px; color: var(--gold); font-weight: 600;
}
.title-block strong {
  display: block; font-family: Cinzel, serif; font-size: 16px; font-weight: 700;
  color: var(--cream); line-height: 1.2;
}
.pulse-pill {
  min-width: 48px; height: 40px;
  border: 1px solid var(--gold);
  background: linear-gradient(160deg, var(--crimson), #1a0508);
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  color: var(--gold-soft); font-family: Cinzel, serif; font-size: 13px; font-weight: 700;
}
.gold-rail {
  flex-shrink: 0; height: 2px; margin: 4px 20px 8px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--ember), var(--gold), transparent);
  position: relative; z-index: 1;
}

#stage {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 4px 18px calc(24px + var(--safe));
  position: relative; z-index: 1;
  -webkit-overflow-scrolling: touch;
}

.eyebrow {
  font-family: Cinzel, serif; font-size: 11px; color: var(--gold);
  font-weight: 600; text-transform: uppercase; margin-bottom: 6px;
}
h1, h2 {
  font-family: Cinzel, serif; font-weight: 700; line-height: 1.15;
  margin-bottom: 8px; color: var(--cream);
}
h1 { font-size: 26px; }
h2 { font-size: 22px; }
.lede { color: var(--mute); font-size: 14px; line-height: 1.45; margin-bottom: 16px; }
.tallyline { color: var(--gold); font-size: 12px; margin-top: 14px; }

.door-ring {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px;
}
.door {
  border: 1px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(232, 195, 106, 0.18), transparent 40%),
    linear-gradient(160deg, #4a101c, #1a0508);
  cursor: pointer; padding: 16px 12px 14px; text-align: center;
  clip-path: polygon(8% 0, 92% 0, 100% 12%, 100% 100%, 0 100%, 0 12%);
  transition: transform 0.18s ease;
  animation: rise 0.45s ease both;
}
.door:nth-child(2) { animation-delay: 0.05s; }
.door:nth-child(3) { animation-delay: 0.1s; }
.door:nth-child(4) { animation-delay: 0.15s; }
.door:active { transform: translateY(2px); }
.door img {
  width: 56px; height: 56px; margin: 0 auto 8px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
}
.door span {
  display: block; font-family: Cinzel, serif; font-size: 13px;
  font-weight: 700; color: var(--gold-soft);
}

.back-gilt {
  border: 0; background: transparent; color: var(--gold);
  font-family: Cinzel, serif; font-size: 13px; cursor: pointer;
  margin-bottom: 10px; padding: 4px 0;
}
.seal, .fade {
  border: 0; cursor: pointer; font-family: Cinzel, serif;
  font-size: 14px; font-weight: 700; padding: 14px 18px; margin: 4px 0 12px;
}
.seal {
  width: 100%;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 50%, #b8892e);
  color: #2a0a10;
  clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
}
.fade {
  width: 100%; background: transparent; color: var(--mute);
  border: 1px solid var(--line);
  clip-path: polygon(3% 0, 97% 0, 100% 100%, 0 100%);
}
.fade.slim { width: auto; padding: 10px 16px; margin: 0; }

.list { display: flex; flex-direction: column; gap: 8px; }
.entry {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(232,195,106,0.1), transparent 45%), #2a0a12;
  padding: 12px 14px; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.entry.locked { opacity: 0.55; cursor: default; }
.entry .meta { flex: 1; min-width: 0; }
.entry .meta small { display: block; font-family: Cinzel, serif; font-size: 10px; color: var(--gold); }
.entry .meta b { display: block; font-size: 15px; margin: 2px 0; }
.entry .meta p { font-size: 12px; color: var(--mute); }
.entry .badge {
  font-family: Cinzel, serif; font-size: 11px; color: var(--gold-soft);
  border: 1px solid var(--gold); padding: 4px 8px; flex-shrink: 0;
}
.hollow {
  color: var(--mute); font-size: 14px; padding: 18px 8px; text-align: center;
  border: 1px dashed var(--line);
}

.stat-arcade {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px;
}
.stat-tile {
  background: var(--glass); border: 1px solid var(--line); padding: 12px 14px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.stat-tile small { display: block; font-family: Cinzel, serif; font-size: 10px; color: var(--gold); margin-bottom: 4px; }
.stat-tile b { font-family: Cinzel, serif; font-size: 22px; }

.brief p { margin-bottom: 12px; color: var(--mute); font-size: 14px; line-height: 1.45; }
.brief b { color: var(--gold-soft); }

.field.toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.field.toggle span { font-family: Cinzel, serif; font-size: 13px; color: var(--cream); }
.field.toggle input { width: 20px; height: 20px; accent-color: var(--gold); }

/* Play */
#play { display: flex; flex-direction: column; min-height: 0; }
#play:not(.off) { height: 100%; }
.play-top { display: flex; align-items: center; gap: 12px; }
.play-top .eyebrow { margin: 0; }
.hud.glass {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 8px 0 10px; padding: 10px 12px;
  background: var(--glass); border: 1px solid rgba(232,195,106,0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.hud small { display: block; font-family: Cinzel, serif; font-size: 9px; color: var(--gold); }
.hud b { font-family: Cinzel, serif; font-size: 18px; }

#arenaWrap {
  position: relative; flex: 1; min-height: 280px;
  border: 1px solid var(--gold);
  background: #0a0204;
  overflow: hidden;
  clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px));
}
#arena {
  display: block; width: 100%; height: 100%;
  touch-action: none; cursor: pointer;
}
.tap-hint {
  position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%);
  font-family: Cinzel, serif; font-size: 12px; color: var(--gold-soft);
  background: rgba(26,5,8,0.7); padding: 8px 14px; border: 1px solid var(--line);
  pointer-events: none; animation: pulse 1.6s ease infinite;
}
.tap-hint.hide { opacity: 0; transition: opacity 0.4s; }
.sheet {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 24px; background: rgba(10,2,4,0.88); backdrop-filter: blur(8px);
}
.sheet .seal, .sheet .fade { max-width: 240px; }
.play-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; gap: 12px;
}
.thrust-lamp {
  font-family: Cinzel, serif; font-size: 13px; color: var(--gold);
  margin: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .door, .tap-hint { animation: none; }
}
