/* PATH 714 — TV host view */
#stage { position: fixed; inset: 0; background: var(--navy); }
.sound-toggle {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-bright);
  background: linear-gradient(165deg, rgba(16,28,66,.88), rgba(8,16,38,.9));
  border: 1px solid rgba(212,175,55,.6);
  box-shadow: 0 10px 26px rgba(0,0,0,.55);
  transition: all .2s ease;
}
.sound-toggle:hover { border-color: var(--gold-bright); transform: translateY(-1px); }
.sound-toggle.off { color: rgba(207,196,165,.55); border-color: rgba(212,175,55,.3); }
.sound-toggle.gone { opacity: 0; pointer-events: none; }
.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hidden { display: none !important; }

/* ---------- Title ---------- */
.title-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(4,8,22,.18) 0%, rgba(4,8,22,.55) 78%, rgba(3,6,16,.85) 100%); }
.title-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
#title-logo { width: min(880px, 62vw); filter: drop-shadow(0 18px 44px rgba(0,0,0,.65)); animation: floaty 7s ease-in-out infinite; }
.tagline { font-size: clamp(22px, 2.4vw, 34px); font-style: italic; color: var(--ivory); letter-spacing: .06em; text-shadow: 0 3px 14px rgba(0,0,0,.8); margin-top: -26px; }
#btn-host { font-size: clamp(19px, 1.7vw, 26px); padding: 18px 54px; margin-top: 16px; }
.title-note { font-size: clamp(15px, 1.3vw, 20px); color: var(--ivory-dim); letter-spacing: .14em; text-transform: uppercase; font-family: Cinzel, serif; }
.tv-footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 90px 14px 20px; text-align: center; background: linear-gradient(180deg, transparent, rgba(4,7,18,.78) 55%); z-index: 5; }
.tv-footer nav { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: center; margin-bottom: 5px; }
.tv-footer nav a { color: var(--ivory-dim); text-decoration: none; font-family: Cinzel, serif; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 1px 6px #000; }
.tv-footer nav a:hover { color: var(--gold-bright); }
.tv-footer p { font-size: 14.5px; color: rgba(207,196,165,.85); letter-spacing: .05em; text-shadow: 0 1px 6px #000; }

/* ---------- Lobby ---------- */
.lobby-inner { position: absolute; inset: 0; display: flex; gap: 3vw; align-items: center; justify-content: center; padding: 4vh 5vw; }
.lobby-left { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 640px; }
.lobby-logo { width: 240px; filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }
.lobby-join-label { font-family: Cinzel, serif; letter-spacing: .34em; font-size: 17px; color: var(--ivory-dim); margin-top: 18px; }
#room-code { font-family: Cinzel, serif; font-weight: 900; font-size: clamp(64px, 7vw, 118px); letter-spacing: .1em; line-height: 1.02; white-space: nowrap; filter: drop-shadow(0 8px 26px rgba(0,0,0,.7)); }
.lobby-join-sub { font-size: 21px; color: var(--ivory); line-height: 1.45; text-shadow: 0 2px 10px #000; }
.lobby-settings { margin-top: 22px; padding: 20px 26px; display: flex; flex-direction: column; gap: 14px; width: 100%; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.setting-label { font-family: Cinzel, serif; font-size: 14px; letter-spacing: .12em; color: var(--ivory-dim); text-align: left; }
.seg { display: flex; gap: 8px; }
.seg button { padding: 9px 16px; font-size: 14px; }
#btn-start { padding: 14px 20px; font-size: 18px; margin-top: 4px; }
.lobby-wait { font-style: italic; color: var(--ivory-dim); font-size: 17px; }
.lobby-players { width: 380px; min-height: 420px; padding: 24px; }
.lobby-players h3 { letter-spacing: .3em; font-size: 16px; color: var(--gold-bright); text-align: center; margin-bottom: 16px; }
.empty-note { text-align: center; font-style: italic; color: var(--ivory-dim); font-size: 19px; line-height: 1.5; padding-top: 30px; }
.lobby-player { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-bottom: 1px solid rgba(212,175,55,.18); animation: riseIn .5s both; }
.lobby-player:last-child { border-bottom: none; }
.lobby-player .piece-mini { width: 54px; height: 54px; }
.lobby-player .lp-name { font-size: 24px; font-weight: 600; }
.lobby-player .lp-piece { font-size: 15px; color: var(--ivory-dim); font-style: italic; }

/* piece composite (token standing on pedestal) */
.piece-mini { position: relative; flex: none; }
.piece-mini img.ped { position: absolute; left: 8%; bottom: 0; width: 84%; }
.piece-mini img.tok { position: absolute; left: 14%; bottom: 26%; width: 72%; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }

/* ---------- Game / board ---------- */
#scene-game { display: flex; }
#board-wrap { position: relative; flex: 1; height: 100%; overflow: hidden; background: radial-gradient(ellipse at center, #0a1330 0%, #05080f 75%); }
#board-stage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 30px 80px rgba(0,0,0,.65); }
#board-img { position: absolute; inset: 0; width: 100%; height: 100%; }
#coin-layer, #piece-layer { position: absolute; inset: 0; }
.coin { position: absolute; transform: translate(-50%, -50%); pointer-events: none; aspect-ratio: 1; }
.coin img { width: 100%; display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,.55)); }
.coin .num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: Cinzel, serif; font-weight: 900; color: #4a3205;
  text-shadow: 0 1px 0 rgba(255, 240, 190, .65), 0 -1px 1px rgba(60, 40, 0, .35);
}
.coin.final .num { color: #fff3cf; text-shadow: 0 2px 6px rgba(0,0,0,.75); }
.board-piece { position: absolute; width: 3.9%; aspect-ratio: 1; transform: translate(-50%, -88%); transition: left .46s cubic-bezier(.3,.7,.3,1), top .46s cubic-bezier(.3,.7,.3,1); pointer-events: none; z-index: 5; }
.board-piece .piece-mini { width: 100%; height: 100%; filter: drop-shadow(0 10px 14px rgba(0,0,0,.55)); }
.board-piece.hop .piece-mini { animation: hop .46s ease; }
@keyframes hop { 40% { transform: translateY(-16%) scale(1.06); } }
.board-piece.active-turn .piece-mini { animation: glowPulse 2.2s ease-in-out infinite; }

#turn-banner {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(14,24,58,.92), rgba(8,15,36,.92));
  border: 1px solid rgba(212,175,55,.6); border-radius: 999px;
  padding: 10px 30px; font-family: Cinzel, serif; font-size: clamp(16px, 1.5vw, 22px); letter-spacing: .08em;
  box-shadow: 0 10px 30px rgba(0,0,0,.55); z-index: 8; white-space: nowrap;
}
#turn-banner b { color: var(--gold-bright); }
#dice-badge {
  position: absolute; right: 26px; top: 22px; z-index: 8;
  width: 74px; height: 74px; border-radius: 16px;
  background: linear-gradient(160deg, #fdf6da, #e9d48c);
  color: #33240a; font-family: Cinzel, serif; font-weight: 900; font-size: 40px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px rgba(0,0,0,.6), inset 0 2px 0 #fff;
  animation: riseIn .4s both;
}

/* rail */
#rail { width: 300px; flex: none; height: 100%; display: flex; flex-direction: column; align-items: center; padding: 18px 14px 12px; background: linear-gradient(180deg, #0c1738, #070f27); border-left: 1px solid rgba(212,175,55,.35); z-index: 6; }
.rail-logo { width: 128px; margin-bottom: 10px; }
#rail-players { flex: 1; width: 100%; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.rail-player { border: 1px solid rgba(212,175,55,.25); border-radius: 12px; padding: 9px 11px; background: rgba(18,32,77,.45); transition: all .4s ease; }
.rail-player.turn { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 8px 26px rgba(0,0,0,.5); background: rgba(24,40,92,.65); }
.rail-player .rp-head { display: flex; align-items: center; gap: 9px; }
.rail-player .piece-mini { width: 40px; height: 40px; }
.rail-player .rp-name { font-size: 20px; font-weight: 700; line-height: 1.05; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-player .rp-points { font-family: Cinzel, serif; color: var(--gold-bright); font-size: 17px; font-weight: 700; }
.medallion { display: flex; gap: 5px; margin-top: 7px; }
.gem { flex: 1; text-align: center; }
.gem .gem-dot { height: 22px; border-radius: 7px; border: 1px solid; display: flex; align-items: center; justify-content: center; font-family: Cinzel, serif; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; background: rgba(0,0,0,.35); transition: all .6s ease; }
.gem .pips { display: flex; gap: 3px; justify-content: center; margin-top: 3px; }
.gem .pip { width: 6px; height: 6px; border-radius: 50%; background: rgba(246,239,221,.18); transition: all .4s ease; }
.gem .pip.on { background: var(--gold-bright); box-shadow: 0 0 6px rgba(243,210,122,.9); }
.gem.sealed .gem-dot { background: linear-gradient(180deg, #f3d27a, #b8912a); color: #241a02 !important; box-shadow: 0 0 14px rgba(243,210,122,.75); border-color: #fbe9a8; }
.rail-foot { font-family: Cinzel, serif; letter-spacing: .24em; font-size: 13px; color: var(--ivory-dim); }
.rail-foot span { color: var(--gold-bright); }

/* ---------- Question ---------- */
#question-overlay { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(5,9,24,.42), rgba(5,9,24,.78)); backdrop-filter: blur(3px); animation: fadeIn .45s both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.q-card { width: min(1060px, 88%); max-height: 94%; overflow: hidden; padding: 0 46px 30px; text-align: center; animation: riseIn .55s cubic-bezier(.2,.8,.25,1) both; }
#q-header { width: min(680px, 80%); margin-top: -6px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.5)); }
.q-meta { display: flex; justify-content: center; gap: 26px; font-family: Cinzel, serif; font-size: 15px; letter-spacing: .18em; color: var(--gold-bright); text-transform: uppercase; margin-top: 2px; }
#q-prompt { font-size: clamp(26px, 2.5vw, 38px); font-weight: 600; line-height: 1.28; margin: 14px auto 20px; max-width: 900px; text-wrap: balance; }
#q-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 920px; margin: 0 auto; }
.q-opt { display: flex; align-items: center; gap: 14px; text-align: left; background: linear-gradient(170deg, rgba(246,239,221,.97), rgba(226,213,175,.97)); color: #221a08; border-radius: 12px; padding: 14px 18px; font-size: clamp(19px, 1.7vw, 25px); font-weight: 600; line-height: 1.22; box-shadow: 0 8px 22px rgba(0,0,0,.45); transition: all .35s ease; }
.q-opt .letter { flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(180deg, #f3d27a, #b8912a); border: 1px solid #8a6a14; display: flex; align-items: center; justify-content: center; font-family: Cinzel, serif; font-weight: 900; font-size: 19px; color: #2c1f04; }
.q-opt.dim { opacity: .45; filter: saturate(.4); }
.q-opt.correct { background: linear-gradient(170deg, #ffe9a3, #d4af37); box-shadow: 0 0 0 2px #fbe9a8, 0 0 34px rgba(243,210,122,.85); }
.q-opt.wrong { background: linear-gradient(170deg, #b0574f, #7e2f28); color: #ffe9e2; }
.q-opt.wrong .letter { background: #5f1f19; color: #ffd9d0; border-color: #a04a40; }
#q-timer { height: 6px; background: rgba(246,239,221,.14); border-radius: 3px; margin: 22px auto 0; max-width: 920px; overflow: hidden; }
#q-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #b8912a, #f3d27a); border-radius: 3px; }
#q-reveal { margin-top: 18px; animation: riseIn .6s both; }
#q-reference { font-family: Cinzel, serif; letter-spacing: .22em; font-size: 16px; color: var(--gold-bright); text-transform: uppercase; }
#q-explanation { font-size: clamp(20px, 1.9vw, 27px); font-style: italic; line-height: 1.4; max-width: 860px; margin: 6px auto 0; color: var(--ivory); }
#q-seal-banner { margin: 16px auto 0; display: inline-block; padding: 10px 28px; border-radius: 999px; background: linear-gradient(180deg, #f3d27a, #b8912a); color: #241a02; font-family: Cinzel, serif; font-weight: 900; letter-spacing: .14em; font-size: 18px; box-shadow: 0 0 34px rgba(243,210,122,.8); animation: glowPulse 1.6s ease-in-out infinite; }

/* ---------- Era ---------- */
.kenburns { animation: kb 6.5s ease-out both; }
@keyframes kb { from { transform: scale(1.0); } to { transform: scale(1.07); } }
.era-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,7,18,.28) 55%, rgba(4,7,18,.82)); }
.era-inner { position: absolute; inset: auto 0 9vh 0; text-align: center; }
#era-kicker { font-family: Cinzel, serif; letter-spacing: .4em; font-size: clamp(15px, 1.4vw, 20px); color: var(--ivory); text-shadow: 0 2px 12px #000; }
#era-name { font-size: clamp(52px, 6.4vw, 104px); font-weight: 900; letter-spacing: .06em; line-height: 1.05; filter: drop-shadow(0 10px 30px rgba(0,0,0,.8)); }
#era-caption { font-size: clamp(20px, 2vw, 29px); font-style: italic; color: var(--ivory); text-shadow: 0 2px 12px #000; margin-top: 8px; }
#era-caption b { color: var(--gold-bright); font-style: normal; }

/* ---------- Final ---------- */
.final-light { position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, rgba(255, 214, 110, .34), transparent 55%); animation: glowPulse 3s ease-in-out infinite; }
.final-inner { position: absolute; inset: auto 0 10vh 0; text-align: center; }
.final-kicker { font-family: Cinzel, serif; letter-spacing: .5em; color: var(--ivory); font-size: 18px; text-shadow: 0 2px 12px #000; }
.final-title { font-size: clamp(48px, 5.6vw, 92px); font-weight: 900; letter-spacing: .1em; filter: drop-shadow(0 10px 30px rgba(0,0,0,.85)); }
#final-name { font-size: clamp(22px, 2.2vw, 32px); font-style: italic; text-shadow: 0 2px 12px #000; }
#final-name b { color: var(--gold-bright); font-style: normal; }

/* ---------- Victory ---------- */
.victory-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 34%, rgba(4,8,22,.05) 0%, rgba(4,8,22,.5) 80%); }
.victory-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
#victory-piece .piece-mini { width: 190px; height: 190px; animation: floaty 5s ease-in-out infinite; filter: drop-shadow(0 24px 40px rgba(0,0,0,.6)); }
.victory-kicker { font-family: Cinzel, serif; letter-spacing: .42em; font-size: 17px; color: var(--ivory); text-shadow: 0 2px 12px #000; margin-top: 6px; }
#victory-name { font-size: clamp(56px, 6.4vw, 104px); font-weight: 900; line-height: 1; padding: 0 34px; filter: drop-shadow(0 10px 30px rgba(0,0,0,.85)); text-shadow: 0 3px 22px rgba(30,16,0,.55); background: radial-gradient(ellipse at center, rgba(24,14,2,.38) 0%, transparent 70%); border-radius: 50%; }
#victory-standings { margin-top: 14px; padding: 16px 34px; min-width: 430px; }
#victory-standings .vs-row { display: flex; justify-content: space-between; gap: 40px; font-size: 23px; padding: 5px 0; border-bottom: 1px solid rgba(212,175,55,.16); }
#victory-standings .vs-row:last-child { border-bottom: none; }
#victory-standings .vs-row b { color: var(--gold-bright); font-family: Cinzel, serif; font-size: 20px; }
#btn-again { margin-top: 20px; padding: 14px 42px; font-size: 18px; }
