/* ============================================================
   視線魔術師 / LOOK OVER HERE! — v2.0 Collector's Edition
   1920s Belle Époque & Art Deco Vintage Magic Theater Poster
   ============================================================ */

:root {
  --burgundy-dark: #1d0408;
  --burgundy: #4a0e17;
  --burgundy-mid: #6b1523;
  --burgundy-bright: #961e32;
  --ivory: #f4ebd5;
  --ivory-warm: #e8d8b5;
  --ivory-deep: #d5be8f;
  --gold: #d4a843;
  --gold-bright: #f4d27c;
  --gold-dark: #8e6b1e;
  --ink: #161010;
  --ink-soft: #2e2020;
  --danger: #d92b3a;
  --success: #2b7a4b;

  --font-display: 'Baskerville', 'Didot', 'Playfair Display', 'Noto Serif TC', 'Songti TC', Georgia, serif;
  --font-serif: 'Noto Serif TC', 'Songti TC', 'Baskerville', Georgia, serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--burgundy-dark);
  color: var(--ivory);
  font-family: var(--font-serif);
}

/* ---------- Theater Backdrop & Halftone Atmosphere ---------- */
.theater-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 20%, #641422 0%, #2b070e 52%, #120205 100%);
}

.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8.5vw;
  min-width: 42px;
  max-width: 130px;
  background: repeating-linear-gradient(
    90deg,
    #3b0912 0px,
    #631220 14px,
    #28050b 26px,
    #4e0e19 38px
  );
  box-shadow: inset -14px 0 32px rgba(0, 0, 0, 0.8);
  opacity: 0.94;
}
.curtain-left { left: 0; border-right: 3px solid var(--gold-dark); }
.curtain-right { right: 0; border-left: 3px solid var(--gold-dark); box-shadow: inset 14px 0 32px rgba(0, 0, 0, 0.8); }

.halftone-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 10, 12, 0.24) 1px, transparent 1px);
  background-size: 5px 5px;
  opacity: 0.55;
  mix-blend-mode: multiply;
}

.vignette-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 52%, rgba(10, 2, 4, 0.78) 100%);
}

/* ---------- Achievement Unlock Floating Ribbon ---------- */
.achievement-toast {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #2b080f, #4a0e17);
  color: var(--ivory);
  border: 2.5px solid var(--gold-bright);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 18px rgba(244, 210, 124, 0.35);
  animation: achSlideIn 0.35s cubic-bezier(0.2, 1.35, 0.4, 1);
}
@keyframes achSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.ach-toast-icon {
  font-size: 28px;
  line-height: 1;
}
.ach-toast-kicker {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--gold-bright);
  font-weight: 800;
}
.ach-toast-name {
  font-size: 15px;
  font-weight: 900;
  color: #fff9ea;
}

/* ---------- App Shell ---------- */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 12px;
  gap: 8px;
}

.hidden { display: none !important; }

/* ---------- Top Game HUD ---------- */
.game-hud {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 14px;
  background: linear-gradient(180deg, rgba(38, 9, 14, 0.96), rgba(20, 4, 8, 0.94));
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(244, 210, 124, 0.2);
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hud-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(244, 235, 213, 0.08);
  color: var(--ivory);
  border: 1px solid rgba(212, 168, 67, 0.45);
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hud-icon-btn:hover {
  background: rgba(212, 168, 67, 0.24);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}
.hud-icon-btn.muted {
  opacity: 0.5;
}
.btn-glyph { font-size: 14px; color: var(--gold-bright); }

.act-badge {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-left: 4px;
}
.act-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  text-transform: uppercase;
}
.act-title {
  font-weight: 900;
  font-size: 15.5px;
  color: var(--ivory);
}

.combo-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e07a1d, #d92b3a);
  color: #fff8e6;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  box-shadow: 0 0 12px rgba(217, 43, 58, 0.55);
  animation: toastPop 0.25s ease;
}

.hud-objectives {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.obj-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(244, 235, 213, 0.09);
  border: 1px solid rgba(244, 235, 213, 0.28);
  color: var(--ivory-warm);
  transition: all 0.25s ease;
}
.obj-pill.active {
  background: rgba(212, 168, 67, 0.22);
  border-color: var(--gold-bright);
  color: #fff8e6;
  box-shadow: 0 0 12px rgba(212, 168, 67, 0.26);
}
.obj-pill.done {
  background: rgba(43, 122, 75, 0.38);
  border-color: #6bd492;
  color: #c8f7d9;
  text-decoration: line-through;
  opacity: 0.85;
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 168, 67, 0.4);
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-bright);
}

/* ---------- Main Canvas Proscenium Stage ---------- */
.stage-wrapper {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proscenium-frame {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 750px;
  background: #140508;
  border: 3px solid var(--gold);
  border-radius: 8px;
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.85),
    inset 0 0 0 2px var(--burgundy-dark),
    inset 0 0 0 4px rgba(212, 168, 67, 0.48);
  overflow: hidden;
}

/* Animated Stage Curtains */
.stage-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  z-index: 11;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    #3d0913 0px,
    #661222 18px,
    #28050c 34px,
    #520e1b 48px
  );
  transition: transform 0.65s cubic-bezier(0.65, 0, 0.35, 1);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.85);
}
.stage-curtain.left {
  left: 0;
  border-right: 4px solid var(--gold);
  transform: translateX(0);
}
.stage-curtain.right {
  right: 0;
  border-left: 4px solid var(--gold);
  transform: translateX(0);
}
.stage-curtain.left.open { transform: translateX(-104%); }
.stage-curtain.right.open { transform: translateX(104%); }

.corner-ornament {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--gold-bright);
  z-index: 12;
  pointer-events: none;
}
.corner-ornament.tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.corner-ornament.tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.corner-ornament.bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.corner-ornament.br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
  touch-action: none;
}
#game-canvas.show-cursor { cursor: default; }

/* ---------- Dynamic Stage Toast ---------- */
.stage-toast {
  position: absolute;
  top: 17%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 13;
  padding: 7px 22px;
  background: var(--ivory);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--burgundy-bright), 0 10px 24px rgba(0,0,0,0.55);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.08em;
  pointer-events: none;
  animation: toastPop 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes toastPop {
  from { opacity: 0; transform: translate(-50%, 10px) scale(0.86); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* ---------- Bottom Misdirection Props Tray ---------- */
.props-tray {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 14px;
  background: linear-gradient(180deg, rgba(38, 9, 14, 0.96), rgba(18, 4, 7, 0.96));
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.58);
}

.tray-hint {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ivory-deep);
  font-weight: 700;
  white-space: nowrap;
}

.props-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prop-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  background: linear-gradient(180deg, #f6eed9, #e1cc9e);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 5px;
  box-shadow: 3px 3px 0 var(--gold-dark);
  font-family: var(--font-serif);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s;
}
.prop-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 4px 5px 0 var(--gold-bright);
}
.prop-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--gold-dark);
}
.prop-btn:disabled {
  opacity: 0.42;
  filter: grayscale(0.75);
  cursor: not-allowed;
  box-shadow: none;
}

.prop-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 3px;
  background: var(--burgundy);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11px;
}
.prop-icon { font-size: 17px; line-height: 1; }
.prop-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.12; }
.prop-name { font-weight: 900; font-size: 12.5px; }
.prop-dur { font-size: 10px; color: #5b3a2e; font-weight: 700; }
.prop-count {
  margin-left: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  font-weight: 900;
  font-size: 11.5px;
}

.suspicion-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 168px;
}
.suspicion-label { font-size: 12px; color: var(--ivory-warm); font-weight: 700; white-space: nowrap; }
.suspicion-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 168, 67, 0.55);
  border-radius: 999px;
  overflow: hidden;
}
.suspicion-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #e87a24, var(--danger));
  transition: width 0.05s linear;
}
.suspicion-pct {
  width: 34px;
  text-align: right;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--gold-bright);
}

/* ---------- Poster Buttons ---------- */
.poster-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 2px solid var(--ink);
}
.poster-btn.large { padding: 13px 32px; font-size: 16px; }
.poster-btn.primary {
  background: linear-gradient(180deg, #921c30, #5c0f1d);
  color: var(--ivory);
  box-shadow: 4px 4px 0 var(--ink);
}
.poster-btn.primary:hover {
  background: linear-gradient(180deg, #b0233b, #701323);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}
.poster-btn.secondary {
  background: linear-gradient(180deg, #f6eed9, #dec794);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.poster-btn.secondary:hover {
  background: #fff8e6;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.poster-btn.ghost {
  background: transparent;
  color: var(--burgundy);
  border-color: var(--burgundy);
}
.poster-btn.ghost:hover { background: rgba(74, 14, 23, 0.1); }

/* ---------- Modal Screens ---------- */
.modal-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(14, 2, 5, 0.8);
  backdrop-filter: blur(5px);
}

.poster-card {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 252, 240, 0.82), transparent 52%),
    radial-gradient(circle at 82% 85%, rgba(190, 150, 92, 0.3), transparent 52%),
    var(--ivory);
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 26px 76px rgba(0, 0, 0, 0.88), 8px 8px 0 var(--burgundy-mid);
}
.poster-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(74, 14, 23, 0.08) 1px, transparent 1px);
  background-size: 6px 6px;
}

.poster-inner-border {
  position: relative;
  border: 2px solid var(--burgundy);
  padding: 24px 28px;
  background: rgba(244, 235, 213, 0.45);
}

.poster-artdeco-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid var(--gold-dark);
  pointer-events: none;
}
.poster-artdeco-corner.tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.poster-artdeco-corner.tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.poster-artdeco-corner.bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.poster-artdeco-corner.br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

.title-poster { text-align: center; }

.poster-top-ribbon {
  display: inline-block;
  padding: 4px 18px;
  background: var(--burgundy);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  border: 1px solid var(--ink);
}

.poster-eye-emblem { width: 295px; margin: 0 auto 4px; }
.title-eyes-svg { width: 100%; height: auto; overflow: visible; }

.poster-main-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(36px, 6vw, 54px);
  line-height: 1.08;
  color: var(--burgundy);
  letter-spacing: 0.12em;
  text-shadow: 2px 2px 0 var(--gold-bright), 4px 4px 0 rgba(22, 16, 16, 0.22);
}

.poster-en-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14px, 2.2vw, 19px);
  letter-spacing: 0.28em;
  color: var(--ink);
  margin-top: 6px;
  margin-bottom: 12px;
}

.poster-tagline {
  max-width: 500px;
  margin: 0 auto 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.title-progress-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px;
  margin-bottom: 18px;
  background: rgba(74, 14, 23, 0.08);
  border: 1px solid rgba(74, 14, 23, 0.25);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--burgundy);
}

.poster-menu-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}
.poster-menu-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }

.poster-footer-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1.5px double var(--burgundy);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--burgundy);
}

/* ---------- Playbill & Chapter Tabs ---------- */
.playbill-card { max-width: 880px; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 2px double var(--burgundy);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.modal-kicker {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--burgundy-mid);
}
.modal-title { margin: 4px 0 0; font-size: 25px; font-weight: 900; color: var(--burgundy); }

.close-modal-btn {
  width: 34px;
  height: 34px;
  background: var(--burgundy);
  color: var(--ivory);
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}
.close-modal-btn:hover { background: var(--burgundy-bright); }

.chapter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.chapter-tab {
  flex: 1;
  min-width: 180px;
  padding: 9px 12px;
  background: rgba(255, 250, 238, 0.55);
  border: 2px solid rgba(74, 14, 23, 0.35);
  border-radius: 5px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chapter-tab:hover { background: rgba(255, 250, 238, 0.9); }
.chapter-tab.active {
  background: var(--burgundy);
  color: var(--ivory);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--gold-dark);
}
.chapter-tab-roman {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 800;
  opacity: 0.8;
}
.chapter-tab.active .chapter-tab-roman { color: var(--gold-bright); opacity: 1; }
.chapter-tab-name { font-size: 14px; font-weight: 900; margin-top: 2px; }

.playbill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 11px;
  margin-bottom: 16px;
}

.act-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 12px 11px;
  background: rgba(255, 251, 240, 0.84);
  border: 2px solid var(--ink);
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s ease;
  box-shadow: 3px 3px 0 rgba(74, 14, 23, 0.35);
}
.act-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--burgundy);
  background: #fffcf3;
}
.act-card-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--burgundy-mid);
}
.act-card-title { font-size: 15px; font-weight: 900; color: var(--ink); }
.act-card-sub { font-size: 11px; color: #5b433a; line-height: 1.3; }
.act-card-meta {
  margin-top: auto;
  padding-top: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--burgundy);
  border-top: 1px dashed rgba(74, 14, 23, 0.25);
}
.act-card-rank {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  border: 2px solid var(--burgundy);
  color: var(--burgundy);
  background: rgba(242, 207, 120, 0.48);
  transform: rotate(10deg);
}
.act-card-rank.rank-S {
  background: var(--gold-bright);
  color: var(--burgundy-dark);
  border-color: var(--ink);
}

.playbill-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1.5px solid rgba(74, 14, 23, 0.25);
}
.playbill-footer-btns { display: flex; gap: 8px; }
.playbill-summary { font-weight: 900; color: var(--burgundy); font-size: 14px; }

/* ---------- Achievements Grid ---------- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.ach-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 5px;
  border: 2px solid rgba(74, 14, 23, 0.28);
  background: rgba(255, 250, 238, 0.45);
  opacity: 0.56;
  filter: grayscale(0.8);
}
.ach-card.unlocked {
  opacity: 1;
  filter: none;
  background: linear-gradient(135deg, #fffaf0, #f1dfa8);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--burgundy);
}
.ach-medal {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--burgundy);
  border: 2px solid var(--gold);
}
.ach-name { font-weight: 900; font-size: 13.5px; color: var(--burgundy); }
.ach-desc { font-size: 11px; color: var(--ink-soft); line-height: 1.35; margin-top: 2px; }

/* ---------- Guide Modal ---------- */
.guide-card { max-width: 740px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; margin-bottom: 18px; }
.guide-item {
  padding: 14px;
  background: rgba(255, 250, 238, 0.78);
  border: 1.5px solid rgba(74, 14, 23, 0.35);
  border-radius: 4px;
}
.guide-icon { font-size: 23px; margin-bottom: 4px; }
.guide-item h3 { margin: 0 0 6px; font-size: 15px; color: var(--burgundy); }
.guide-item p { margin: 0; font-size: 12.8px; line-height: 1.55; color: var(--ink-soft); }
.guide-item code {
  display: inline-block;
  padding: 0 5px;
  margin: 0 1px;
  background: var(--burgundy);
  color: var(--gold-bright);
  border-radius: 3px;
  font-weight: 700;
}
.guide-footer { text-align: center; }

/* ---------- Act Intro & Busted ---------- */
.act-intro-banner {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 3, 6, 0.78);
  backdrop-filter: blur(3px);
  padding: 20px;
}
.intro-card {
  width: 100%;
  max-width: 495px;
  text-align: center;
  background: var(--ivory);
  color: var(--ink);
  border: 3px solid var(--ink);
  outline: 2px solid var(--gold);
  outline-offset: -8px;
  padding: 26px 28px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.8);
}
.intro-ornament { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.2em; color: var(--burgundy-mid); font-weight: 800; }
.intro-act-num { margin-top: 8px; font-family: var(--font-display); font-size: 14px; font-weight: 900; letter-spacing: 0.18em; color: var(--gold-dark); }
.intro-act-title { margin: 4px 0 2px; font-size: 29px; font-weight: 900; color: var(--burgundy); }
.intro-act-subtitle { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 14px; color: #5a4038; }
.intro-divider { margin: 12px 0; color: var(--gold-dark); font-size: 14px; }
.intro-act-brief { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.intro-spectators { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.spec-tag {
  padding: 4px 10px;
  background: rgba(74, 14, 23, 0.1);
  border: 1px solid rgba(74, 14, 23, 0.35);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--burgundy);
}

.busted-overlay {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 4, 10, 0.72);
  backdrop-filter: blur(2px);
}
.busted-card {
  max-width: 440px;
  width: 90%;
  text-align: center;
  background: var(--ivory);
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 26px 24px;
  box-shadow: 6px 6px 0 var(--danger), 0 18px 45px rgba(0, 0, 0, 0.8);
  animation: stampIn 0.25s cubic-bezier(0.2, 1.35, 0.4, 1);
}
@keyframes stampIn {
  from { transform: scale(1.18) rotate(-3deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.busted-stamp {
  display: inline-block;
  padding: 6px 18px;
  border: 3px solid var(--danger);
  color: var(--danger);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 0.1em;
  transform: rotate(-3deg);
  margin-bottom: 12px;
}
.busted-reason { margin: 0 0 6px; font-weight: 900; font-size: 16px; color: var(--ink); }
.busted-quip { margin: 0 0 18px; font-style: italic; font-size: 13.5px; color: #5b3a2e; }
.busted-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Slow-Motion Replay Cinema Overlay ---------- */
.replay-overlay {
  position: absolute;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.replay-film-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(16, 4, 7, 0.9);
  border-bottom: 1.5px solid var(--gold-dark);
}
.replay-film-bar.bottom { border-bottom: none; border-top: 1.5px solid var(--gold-dark); flex-wrap: wrap; }

.replay-rec-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}
.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  animation: recBlink 1s infinite;
}
@keyframes recBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.replay-pov-switch {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  padding: 2px;
}
.pov-btn {
  padding: 5px 13px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ivory-deep);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}
.pov-btn.active { background: var(--gold); color: var(--ink); }

.replay-critique-drawer {
  pointer-events: auto;
  align-self: center;
  margin-top: auto;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 650px;
  width: calc(100% - 32px);
  padding: 10px 16px;
  background: rgba(244, 235, 213, 0.95);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 5px;
  box-shadow: 4px 4px 0 var(--burgundy), 0 10px 28px rgba(0, 0, 0, 0.65);
}
.rank-stamp {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  background: var(--gold-bright);
  color: var(--burgundy-dark);
  border: 3px solid var(--ink);
  transform: rotate(-8deg);
}
.rank-stamp.rank-F { background: var(--danger); color: var(--ivory); font-size: 20px; }
.critique-body { flex: 1; min-width: 0; }
.critique-header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.verdict-title { font-weight: 900; font-size: 15px; color: var(--burgundy); }
.stats-inline { font-size: 12px; font-weight: 700; color: #5b3a2e; }
.critic-quote { margin: 3px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }

.replay-transport { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 260px; }
.transport-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-size: 14px;
  cursor: pointer;
}
.speed-group { display: inline-flex; border: 1px solid var(--gold-dark); border-radius: 4px; overflow: hidden; }
.speed-btn { padding: 4px 8px; background: transparent; color: var(--ivory-warm); border: none; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.speed-btn.active { background: var(--gold); color: var(--ink); }

.scrubber-wrap { position: relative; flex: 1; display: flex; align-items: center; }
#replay-scrubber { width: 100%; accent-color: var(--gold-bright); cursor: pointer; }
.scrubber-markers { position: absolute; inset: 0; pointer-events: none; }
.scrubber-dot { position: absolute; top: -4px; width: 7px; height: 7px; border-radius: 50%; transform: translateX(-50%); }
.scrubber-dot.misdirect { background: #f2cf78; }
.scrubber-dot.sleight { background: #6bd492; }
.scrubber-dot.near { background: #ff7b54; }
.scrubber-dot.busted { background: #ff2e44; }

.timecode { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ivory-warm); white-space: nowrap; }
.replay-actions { display: flex; align-items: center; gap: 8px; }
.replay-actions .poster-btn { padding: 7px 14px; font-size: 13px; }

@media (max-width: 820px) {
  .curtain { display: none; }
  .app-shell { padding: 6px; }
  .tray-hint { display: none; }
  .guide-grid { grid-template-columns: 1fr; }
  .hud-objectives { display: none; }
  .suspicion-widget { min-width: 115px; }
}
