/* ==========================================================================
   HUNTING S.I.N. - Design System & Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Fira+Code:wght@400;600&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #090d16;
  --bg-darker: #05070c;
  --panel-bg: rgba(15, 22, 36, 0.88);
  --panel-border: rgba(230, 184, 78, 0.25);
  --panel-glow: rgba(244, 196, 83, 0.08);

  --accent-gold: #f4c453;
  --accent-gold-dark: #c89726;
  --accent-crimson: #e63946;
  --accent-emerald: #2ec4b6;
  --accent-cyan: #48cae4;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;

  --font-serif: 'Cinzel', Georgia, serif;
  --font-mono: 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(244, 196, 83, 0.2);
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-darker);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(244, 196, 83, 0.06), transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(230, 57, 70, 0.05), transparent 50%),
    linear-gradient(to bottom, #090d16, #05070c);
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   CRT Scanline Overlay
   -------------------------------------------------------------------------- */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.15) 50%
  );
  background-size: 100% 4px;
}

/* --------------------------------------------------------------------------
   Multi-Stage Fade Cinematic Intro System (Precision 0.6s Fades)
   -------------------------------------------------------------------------- */
.cinematic-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 2000;
  background: #05070c;
  pointer-events: auto;
  transition: opacity 0.6s ease;
}

.cinematic-slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4rem;
}

/* Slide 0: Catholic Comedy Games Studio Logo */
.cinematic-slide.slide-0 {
  background-color: #05070c;
  background-image: url('assets/catholic_comedy_games_logo.jpg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center 40%;
  z-index: 1;
}

/* Slide 1: S.I.N. Heist Teaser */
.cinematic-slide.slide-1 {
  background-image: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.85)), url('assets/hunting_sin_intro1.jpg');
  background-size: cover;
  background-position: center;
  z-index: 2;
}

/* Slide 2: Clean Title Art Presentation */
.cinematic-slide.slide-2 {
  background-image: linear-gradient(135deg, rgba(9, 13, 22, 0.3), rgba(5, 7, 12, 0.7)), url('assets/hunting_sin_title_v3.jpg');
  background-size: cover;
  background-position: center;
  z-index: 3;
}

.cinematic-caption {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 2px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.95);
  text-align: center;
  padding: 0.6rem 1.5rem;
  background: rgba(5, 7, 12, 0.65);
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 5;
}

.cinematic-skip-hint {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.6);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 20;
}

/* --------------------------------------------------------------------------
   Title Screen View with Pop-up Menu Animation
   -------------------------------------------------------------------------- */
.title-screen-container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(9, 13, 22, 0.3), rgba(5, 7, 12, 0.7)), url('assets/hunting_sin_title_v3.jpg') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.title-screen-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(9, 13, 22, 0.2), rgba(5, 7, 12, 0.65));
  z-index: 1;
}

/* Interactive Title Menu Box (Pops up smoothly after intro sequence) */
.title-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(11, 16, 27, 0.88);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  padding: 2.5rem 3rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(244, 196, 83, 0.2);
  
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.title-content.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.title-logo-badge {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 0 35px rgba(244, 196, 83, 0.5);
  border: 3px solid #ffffff;
  margin-bottom: 1.25rem;
}

.main-game-title {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
  margin-bottom: 0.4rem;
}

.main-game-subtitle {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--accent-cyan);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.title-tagline {
  color: var(--text-main);
  font-size: 1rem;
  max-width: 620px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.title-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 380px;
}

.title-menu-btn {
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid var(--panel-border);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.title-menu-btn:hover {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #090d16;
  border-color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(244, 196, 83, 0.4);
}

.title-menu-btn.secondary-btn:hover {
  background: rgba(72, 202, 228, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   Header / Detective Badge HUD
   -------------------------------------------------------------------------- */
.app-header {
  background: rgba(11, 16, 27, 0.95);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.detective-badge-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 15px rgba(244, 196, 83, 0.4);
  border: 2px solid var(--accent-gold);
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.hud-metrics {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hud-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hud-card .icon {
  font-size: 1.2rem;
}

.hud-card .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

.hud-card .value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.timer-card .value {
  color: var(--accent-cyan);
}

.timer-card.urgent .value {
  color: var(--accent-crimson);
  animation: pulse-urgent 1s infinite alternate;
}

@keyframes pulse-urgent {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.05); }
}

.audio-btn {
  background: rgba(244, 196, 83, 0.1);
  border: 1px solid var(--accent-gold-dark);
  color: var(--accent-gold);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.audio-btn:hover {
  background: var(--accent-gold);
  color: #000;
  box-shadow: 0 0 12px rgba(244, 196, 83, 0.4);
}

/* --------------------------------------------------------------------------
   Main Game Container
   -------------------------------------------------------------------------- */
.main-container {
  max-width: 1400px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Banner Header Widget */
.case-banner {
  background: linear-gradient(135deg, rgba(15, 22, 36, 0.95), rgba(9, 13, 22, 0.95)), url('assets/hunting_sin_title_v3.jpg') center/cover no-repeat;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.case-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(9, 13, 22, 0.95) 40%, rgba(9, 13, 22, 0.6));
  z-index: 1;
}

.case-banner-content {
  position: relative;
  z-index: 2;
  max-width: 70%;
}

.case-tag {
  display: inline-block;
  background: var(--accent-crimson);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.case-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.case-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.case-banner-actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   Game Grid Layout (Left Controls / Right Stage)
   -------------------------------------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  flex: 1;
}

@media (max-width: 1024px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}

/* Panels */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Navigation & Action Buttons Sidebar */
.action-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #0d111a;
  border: none;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(244, 196, 83, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 196, 83, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-danger {
  background: linear-gradient(135deg, #e63946, #9b111e);
  color: #fff;
  border: none;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
}

/* Location Status Widget */
.location-status-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(244, 196, 83, 0.15);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-top: 1rem;
}

.loc-flag {
  font-size: 2rem;
  margin-right: 0.5rem;
}

.loc-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-gold);
  font-weight: 700;
}

.loc-landmark {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-top: 0.25rem;
}

.loc-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Stage Area (Right Side)
   -------------------------------------------------------------------------- */
.stage-area {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Terminal & Dialogue Readout */
.terminal-card {
  background: #050811;
  border: 1px solid rgba(72, 202, 228, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-family: var(--font-mono);
  box-shadow: 0 0 25px rgba(5, 8, 17, 0.8), inset 0 0 15px rgba(72, 202, 228, 0.05);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(72, 202, 228, 0.2);
  color: var(--accent-cyan);
  font-size: 0.8rem;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #e63946; }
.dot.yellow { background: #f4c453; }
.dot.green { background: #2ec4b6; }

.terminal-body {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

.terminal-prompt {
  color: var(--accent-cyan);
  margin-right: 0.5rem;
}

.type-cursor {
  display: inline-block;
  width: 8px;
  height: 1rem;
  background: var(--accent-cyan);
  margin-left: 4px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Witness Clue Selection List */
.witness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.witness-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.witness-card:hover {
  background: rgba(244, 196, 83, 0.08);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.witness-avatar {
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.4);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.witness-info .name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.witness-info .role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Clue Log History Box */
.clue-log-card {
  background: rgba(15, 22, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.clue-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
  max-height: 240px;
  overflow-y: auto;
}

.clue-item {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--accent-gold);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.clue-item.catechism {
  border-left-color: var(--accent-cyan);
}

.clue-item .tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.2rem;
  display: block;
}

.clue-item.catechism .tag {
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   MODALS (Travel Map, Warrant Dossier, Catechism Codex)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 5, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  background: rgba(11, 16, 27, 0.95);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* --------------------------------------------------------------------------
   Travel Map Component
   -------------------------------------------------------------------------- */
.map-destination-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.destination-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.destination-card:hover {
  border-color: var(--accent-gold);
  background: rgba(244, 196, 83, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.destination-card.current {
  border-color: var(--accent-cyan);
  background: rgba(72, 202, 228, 0.1);
}

.destination-card .city-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.destination-card .flight-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-gold);
  margin-top: 0.5rem;
}

.destination-card .landmark-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Warrant Computer / Dossier Component
   -------------------------------------------------------------------------- */
.warrant-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .warrant-form {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}

.form-group select {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
}

.form-group select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(244, 196, 83, 0.3);
}

.suspect-match-box {
  grid-column: 1 / -1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(72, 202, 228, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.suspect-match-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   Baltimore Catechism Codex & Quiz Vault
   -------------------------------------------------------------------------- */
.codex-search {
  width: 100%;
  background: #090d16;
  border: 1px solid var(--panel-border);
  color: #fff;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  outline: none;
}

.codex-search:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(244, 196, 83, 0.3);
}

.codex-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.codex-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.codex-card .lesson-tag {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-family: var(--font-mono);
  margin-bottom: 0.3rem;
  display: block;
}

.codex-card .question {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.codex-card .answer {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  border-left: 2px solid var(--accent-cyan);
  padding-left: 0.75rem;
}

/* Quiz Modal */
.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.quiz-option-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-option-btn:hover {
  background: rgba(244, 196, 83, 0.1);
  border-color: var(--accent-gold);
}

.quiz-option-btn.correct {
  background: rgba(46, 196, 182, 0.2) !important;
  border-color: var(--accent-emerald) !important;
  color: #fff !important;
}

.quiz-option-btn.incorrect {
  background: rgba(230, 57, 70, 0.2) !important;
  border-color: var(--accent-crimson) !important;
}

/* Victory / Defeat Modal */
.result-banner {
  text-align: center;
  padding: 2rem;
}

.result-banner .result-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.result-banner.victory {
  color: var(--accent-gold);
}

.result-banner.defeat {
  color: var(--accent-crimson);
}

/* Utility scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(244, 196, 83, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATION (<900px, <768px, <480px)
   ========================================================================== */

/* 1. Medium Tablets & Large Phones (<900px) */
@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .brand-section {
    justify-content: center;
  }

  .hud-metrics {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .game-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* 2. Standard Mobile Phones (<768px) */
@media (max-width: 768px) {
  .main-container {
    padding: 0 0.75rem;
    margin: 0.75rem auto;
    gap: 1rem;
  }

  /* Title Screen Mobile Optimization */
  .title-screen-container {
    padding: 1rem;
  }

  .title-content {
    padding: 1.75rem 1.25rem;
    width: 94vw;
    border-radius: var(--radius-md);
  }

  .title-logo-badge {
    width: 70px;
    height: 70px;
    font-size: 2.2rem;
  }

  .main-game-title {
    font-size: 2.2rem;
  }

  .main-game-subtitle {
    font-size: 0.85rem;
    letter-spacing: 1px;
  }

  .title-tagline {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .title-menu-nav {
    max-width: 100%;
  }

  .title-menu-btn {
    min-height: 50px;
    font-size: 1rem;
    padding: 0.85rem 1rem;
  }

  /* Case Banner Mobile Optimization */
  .case-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 1.25rem 1rem;
  }

  .case-banner-content {
    max-width: 100%;
  }

  .case-title {
    font-size: 1.4rem;
  }

  .case-desc {
    font-size: 0.85rem;
  }

  .case-banner-actions {
    margin-top: 1rem;
    justify-content: center;
  }

  .case-banner-actions button {
    width: 100%;
    min-height: 48px;
  }

  /* Modals Touch & Mobile Overflow Optimization */
  .modal-backdrop {
    padding: 0.4rem;
  }

  .modal-box {
    width: 98vw;
    max-height: 94vh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 0.9rem 1rem;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
  }
}

/* 3. Small Mobile Devices (<480px iPhone SE, Galaxy S, etc.) */
@media (max-width: 480px) {
  /* HUD Metrics 2-column grid */
  .hud-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    width: 100%;
  }

  .hud-card {
    padding: 0.35rem 0.5rem;
    gap: 0.4rem;
  }

  .hud-card .icon {
    font-size: 1rem;
  }

  .hud-card .label {
    font-size: 0.62rem;
  }

  .hud-card .value {
    font-size: 0.85rem;
  }

  /* Audio buttons full row */
  .audio-btn {
    grid-column: span 1;
    justify-content: center;
    padding: 0.45rem 0.3rem;
    font-size: 0.75rem;
    min-height: 42px;
  }

  #btnReturnTitle {
    grid-column: span 2;
    min-height: 42px;
  }

  /* Detective Controls Sidebar Buttons */
  .action-nav {
    gap: 0.6rem;
  }

  .btn-primary, .btn-secondary {
    min-height: 48px;
    font-size: 0.9rem;
    padding: 0.75rem 0.85rem;
  }

  /* Witness Interview Touch Cards */
  .witness-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .witness-card {
    padding: 0.85rem;
    min-height: 52px;
  }

  .witness-card:active {
    background: rgba(244, 196, 83, 0.2);
    border-color: var(--accent-gold);
  }

  /* Form dropdowns 16px to prevent iOS Safari auto-zoom */
  .form-group select {
    font-size: 16px !important;
    min-height: 46px;
    padding: 0.65rem 0.75rem;
  }

  .suspect-match-box {
    flex-direction: column;
    gap: 0.85rem;
    align-items: stretch;
    text-align: center;
  }

  .suspect-match-box button {
    width: 100%;
    min-height: 48px;
  }

  /* Map Destination Grid */
  .map-destination-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .destination-card {
    padding: 0.85rem 1rem;
    min-height: 54px;
  }

  /* Terminal Readout */
  .terminal-card {
    padding: 1rem;
    min-height: 150px;
  }

  .terminal-body {
    font-size: 0.85rem;
  }
}
