/* ============================================================
   INTERROGATION ROOM — responsive redesign layer (2026-09-27)
   Loaded after the page's own neon styles; keeps the game logic
   and the red neon identity, rebuilds layout + controls.
   ============================================================ */
#interrogation-room-wrapper { padding: 0; min-height: 100svh; }
#interrogation-room-wrapper .main-wrapper { min-height: 100svh; }
#interrogation-room-wrapper .container { max-width: 1240px; width: 100%; box-sizing: border-box; padding: calc(var(--sh-top-h) + 28px) var(--gutter) 48px; align-items: stretch; }

/* ---------- setup screen: intro left, setup card right ---------- */
#interrogation-room-wrapper .menu-screen.active { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); gap: clamp(24px, 4vw, 64px); align-items: center; text-align: left; min-height: calc(100svh - var(--sh-top-h) - 80px); }
.ir-kicker { display: inline-flex; align-items: center; gap: .6rem; font: 700 .78rem/1 var(--font-accent); letter-spacing: .24em; text-transform: uppercase; color: var(--neon-red); }
.ir-kicker::before { content: ''; width: 24px; height: 2px; background: currentColor; box-shadow: 0 0 10px currentColor; }
#interrogation-room-wrapper .game-title { font-size: clamp(2.2rem, 1rem + 5vw, 5rem); letter-spacing: .02em; margin: 14px 0 6px; line-height: 1; overflow-wrap: anywhere; }
#interrogation-room-wrapper .subtitle { text-align: left; margin: 0 0 22px; letter-spacing: .3em; }
#interrogation-room-wrapper .instructions { text-align: left; padding: 0; background: none; border: 0; margin: 0; font-size: 1rem; line-height: 1.65; color: #c9c9d3; }
.ir-lede { margin: 0 0 16px; max-width: 58ch; }
.ir-lede strong { color: #fff; }
.ir-how { border: 1px solid var(--neon-red-dim); border-radius: 16px; background: rgba(255,23,68,.04); }
.ir-how summary { cursor: pointer; list-style: none; padding: 14px 18px; min-height: 48px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; font: 700 .8rem/1 var(--font-accent); letter-spacing: .2em; text-transform: uppercase; color: #fff; }
.ir-how summary::-webkit-details-marker { display: none; }
.ir-how summary::after { content: '+'; font-size: 1.3rem; color: var(--neon-red); transition: transform .3s; }
.ir-how[open] summary::after { transform: rotate(45deg); }
.ir-how ol { margin: 0; padding: 0 18px 16px 38px; display: grid; gap: 8px; }
.ir-how b { color: #fff; }

.ir-setup {
    padding: clamp(20px, 3vw, 34px); border-radius: 26px;
    background: linear-gradient(160deg, rgba(255,23,68,.12), rgba(10,10,10,.9) 45%), #0d0d0f;
    border: 1px solid rgba(255,23,68,.35);
    box-shadow: 0 40px 90px -50px rgba(255,23,68,.8), inset 0 1px 0 rgba(255,255,255,.05);
}
#interrogation-room-wrapper .menu-section { margin: 0 0 20px; }
#interrogation-room-wrapper .section-label { text-align: left; margin: 0 0 10px; font-size: .75rem; letter-spacing: .22em; color: #c9c9d3; }
#interrogation-room-wrapper .player-buttons,
#interrogation-room-wrapper .option-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; justify-content: stretch; margin: 0; }
#interrogation-room-wrapper .player-option-btn,
#interrogation-room-wrapper .option-btn {
    width: auto !important; height: 60px !important; min-width: 0 !important; padding: 0 !important;
    border-radius: 16px !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 1.25rem !important;
}
#interrogation-room-wrapper .option-btn small { font-size: .62rem; letter-spacing: .12em; opacity: .75; }
#interrogation-room-wrapper #startBtn { width: 100%; min-height: 62px; border-radius: 18px; font-size: 1rem; margin-top: 4px; }
#interrogation-room-wrapper .reset-wrap { text-align: left; margin-top: 14px; }
#interrogation-room-wrapper .reset-btn { min-height: 44px; border-radius: 12px; }
#interrogation-room-wrapper .history-section { margin-top: 18px; }

/* ---------- game screen ---------- */
#interrogation-room-wrapper .game-screen.active,
#interrogation-room-wrapper .end-screen.active,
#interrogation-room-wrapper .transition-screen.active { max-width: 860px; margin: 0 auto; min-height: calc(100svh - var(--sh-top-h) - 80px); display: flex; flex-direction: column; justify-content: center; }
#interrogation-room-wrapper .transition-screen.active { align-items: center; text-align: center; }
#interrogation-room-wrapper .game-header { font-size: .85rem; }
#interrogation-room-wrapper .progress-bar { height: 8px; border-radius: 99px; overflow: hidden; }
#interrogation-room-wrapper .progress-fill { border-radius: inherit; }
#interrogation-room-wrapper .timer-display { text-align: center; font-size: clamp(3.6rem, 2rem + 8vw, 7.5rem); margin: clamp(14px, 3vh, 30px) 0 clamp(10px, 2vh, 20px); font-variant-numeric: tabular-nums; }
#interrogation-room-wrapper .segment-indicator { text-align: center; }
#interrogation-room-wrapper .question-box { border-radius: 22px; padding: clamp(22px, 4vw, 44px); margin: 12px 0 22px; min-height: 180px; text-align: center; }
#interrogation-room-wrapper .question-text { font-weight: 500; font-size: clamp(1.25rem, 1rem + 1.5vw, 2rem); line-height: 1.45; text-wrap: balance; }
#interrogation-room-wrapper .game-controls { display: grid; grid-template-columns: 64px repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 0; }
#interrogation-room-wrapper .btn.control-btn { max-width: none; min-width: 0; height: 64px; border-radius: 18px; font-size: .9rem; }
#interrogation-room-wrapper .btn.icon-btn { width: 64px; height: 64px; min-width: 64px; border-radius: 18px; }

/* ---------- reflection panel: pill bottom-right (the right edge belongs to Underground) ---------- */
#interrogation-room-wrapper .panel-toggle {
    top: auto; bottom: calc(22px + var(--sh-safe-b)); right: 18px; transform: none;
    writing-mode: horizontal-tb; padding: 0 18px; min-height: 52px; border-radius: 16px; border: 2px solid var(--neon-red);
    display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; z-index: 996;
}
#interrogation-room-wrapper .panel-toggle .toggle-indicator { width: 8px; height: 8px; border-radius: 50%; margin: 0; }
#interrogation-room-wrapper .panel-toggle:hover { padding-right: 18px; }
#interrogation-room-wrapper .panel-toggle.open { right: min(398px, calc(100vw - 180px)); }
#interrogation-room-wrapper .reflection-panel { z-index: 2100; top: 0; height: 100dvh; border-radius: 24px 0 0 24px; width: min(380px, 100vw); }
#interrogation-room-wrapper .panel-tab { min-height: 48px; }

/* ---------- iPad ---------- */
@media (min-width: 768px) and (max-width: 1199px) {
    #interrogation-room-wrapper .container { padding: 36px calc(var(--gutter) + 56px) 90px var(--gutter); }
    #interrogation-room-wrapper .menu-screen.active,
    #interrogation-room-wrapper .game-screen.active,
    #interrogation-room-wrapper .end-screen.active { min-height: calc(100svh - 130px); }
}
@media (min-width: 768px) and (max-width: 1023px) {
    #interrogation-room-wrapper .menu-screen.active { grid-template-columns: 1fr; align-content: center; }
}
/* ---------- phone ---------- */
@media (max-width: 767px) {
    #interrogation-room-wrapper .container { padding: calc(var(--sh-top-h) + 16px) 14px calc(var(--sh-bot-h) + 90px); }
    #interrogation-room-wrapper .menu-screen.active { grid-template-columns: 1fr; gap: 20px; min-height: 0; }
    .ir-how:not([open]) ~ * { display: none; }
    #interrogation-room-wrapper .instructions { font-size: .95rem; }
    .ir-setup { padding: 18px 14px; border-radius: 22px; }
    #interrogation-room-wrapper .player-option-btn, #interrogation-room-wrapper .option-btn { height: 54px !important; font-size: 1.1rem !important; border-radius: 14px !important; }
    #interrogation-room-wrapper .game-screen.active, #interrogation-room-wrapper .end-screen.active, #interrogation-room-wrapper .transition-screen.active { min-height: calc(100svh - var(--sh-top-h) - var(--sh-bot-h) - 110px); }
    #interrogation-room-wrapper .game-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #interrogation-room-wrapper .btn.icon-btn { grid-column: 1 / -1; width: 100%; height: 48px; order: 9; }
    #interrogation-room-wrapper .btn.control-btn { height: 58px; }
    #interrogation-room-wrapper .question-box { min-height: 140px; }
    #interrogation-room-wrapper .panel-toggle { bottom: calc(var(--sh-bot-h) + 10px); right: 12px; min-height: 46px; }
    #interrogation-room-wrapper .panel-toggle.open { right: 12px; bottom: auto; top: 12px; }
    #interrogation-room-wrapper .reflection-panel { width: 100vw; border-radius: 0; }
}

/* fixes pass */
#interrogation-room-wrapper .game-title { font-size: min(3.4rem, 3.9vw); letter-spacing: 0; white-space: nowrap; }
#interrogation-room-wrapper .ir-setup { padding: clamp(20px, 3vw, 34px) !important; }
#interrogation-room-wrapper .ir-how { margin-top: 6px; }
#interrogation-room-wrapper .ir-how ol { padding-left: 40px; }
#interrogation-room-wrapper .timer-display { font-size: clamp(3rem, 1.4rem + 5vw, 5.6rem); margin: 8px 0 6px; }
#interrogation-room-wrapper .question-box { margin: 8px 0 16px; }
#interrogation-room-wrapper .game-screen.active { justify-content: flex-start; }
@media (min-width: 768px) and (max-width: 1023px) { #interrogation-room-wrapper .game-title { font-size: 7vw; } }
@media (max-width: 767px) {
    #interrogation-room-wrapper .game-title { font-size: 8.4vw; }
    #interrogation-room-wrapper .panel-toggle { top: calc(var(--sh-top-h) + 8px); bottom: auto; min-height: 40px; padding: 0 12px; font-size: .66rem; }
    body.menu-open #interrogation-room-wrapper .panel-toggle { display: none; }
    #interrogation-room-wrapper .game-header { padding-right: 130px; }
    #interrogation-room-wrapper .menu-screen .ir-intro { padding-top: 40px; }
}
#interrogation-room-wrapper .game-title { font-size: min(3.2rem, 3.1vw); }
#interrogation-room-wrapper .ir-how ol { list-style-position: inside; padding: 0 18px 16px 18px !important; }
@media (max-width: 767px) {
    #interrogation-room-wrapper .game-title { font-size: 8.2vw; }
    #interrogation-room-wrapper .game-header { flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 0; padding-top: 44px; }
}

/* Above Ground: the intro text was light grey on a light page (2026-10-23) */
[data-theme="light"] #interrogation-room-wrapper .instructions { color: #3a3440; }
[data-theme="light"] .ir-lede strong, [data-theme="light"] .ir-how b, [data-theme="light"] .ir-how summary { color: #141016; }
