/* ==========================================================================
   THE CENTURY OF CRIME: COLD CASE ARCHIVES — MASTER BASE STYLES
   ========================================================================== */

:root {
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-federal: 'Oswald', 'Cinzel', sans-serif;
  --font-badge: 'Cinzel', serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-typewriter: 'Courier Prime', 'Courier New', monospace;
  --font-stamp: 'Special Elite', cursive;
  --font-hand: 'Caveat', cursive;
  --font-pixel: 'VT323', monospace;
  --font-tech: 'Share Tech Mono', monospace;

  /* Default Dynamic Tokens (Mutated per Era) */
  --bg-desktop: #0b0d13;
  --bg-surface: #141822;
  --bg-surface-elevated: #1e2433;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.25);
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  font-family: var(--font-ui);
  background-color: var(--bg-desktop);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* App Container */
#app-container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: #0b0d13;
  color: var(--text-primary);
}

/* Workspace Screen View (Active Case Desk) */
.workspace-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  position: relative;
  background-color: #0b0d13;
  background-image: 
    radial-gradient(circle at 50% 8%, rgba(217, 119, 6, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, #090a0f 0%, #11141d 50%, #08090d 100%);
}

/* Main Top Navigation Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-surface);
  backdrop-filter: blur(8px);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge {
  font-size: 1.5rem;
  line-height: 1;
}

.brand-titles h1,
.brand-titles .brand-main-title {
  font-family: var(--font-federal);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f8fafc;
}

.brand-titles .tagline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* Fixed color, not --text-muted: the app header stays dark across all 3 eras
     while --text-muted flips light/dark per era for the light 1980s/1990s card
     surfaces, so sharing it here left this unreadable in those two themes. */
  color: #94a3b8;
}

.era-selector-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 0.25rem;
}

.era-tab-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.75) !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.era-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.era-tab-btn.active {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 12px var(--accent-glow);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
  transition: var(--transition);
  min-height: 44px;
}

.ctrl-btn:hover {
  border-color: var(--accent);
}

/* Case Selector Bar */
.case-nav-bar,
.case-files-bar,
#case-selector-bar {
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0.6rem 1.5rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-color);
  box-sizing: border-box !important;
  overflow: visible !important;
  overflow-x: visible !important;
  scrollbar-width: none !important;
}

.case-nav-bar::-webkit-scrollbar,
.case-files-bar::-webkit-scrollbar,
#case-selector-bar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.case-nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  margin-right: 4px;
}

.case-nav-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  overflow: visible !important;
  flex: 1 1 auto;
}

.case-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  white-space: nowrap;
  transition: var(--transition);
}

.case-chip:hover {
  border-color: var(--accent);
}

.case-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.case-chip .solved-check {
  display: inline-block;
  color: var(--success);
  font-weight: bold;
}

/* Main Investigation Layout */
.investigation-workspace {
  flex: 1;
  max-width: 1320px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 2rem 1.5rem 4rem 1.5rem;
  display: flex !important;
  flex-direction: column !important;
  gap: 2rem;
}

/* Case Hero & Briefing */
.case-briefing-card {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.case-briefing-card .era-stamp {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  margin: 0;
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--accent);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(-2deg);
  white-space: nowrap;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.case-meta span.dot {
  opacity: 0.5;
}

.case-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.case-synopsis {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 900px;
}

.victim-dossier {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
}

.victim-stat-item .label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.victim-stat-item .val {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Sections Heading */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  font-size: 1.25rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

/* Suspects Grid */
.suspects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.suspect-card {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: var(--transition);
  position: relative;
  height: auto;
  min-height: fit-content;
  overflow: visible;
}

.suspect-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.suspect-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.suspect-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.suspect-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.suspect-info .relation {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.suspect-detail-block {
  font-size: 0.85rem;
  line-height: 1.45;
}

.suspect-detail-block strong {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

/* Clues Grid */
.clues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.clue-card,
.evidence-card {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
  box-sizing: border-box;
}

.clue-card:hover,
.evidence-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.evidence-header, 
.evidence-card-header,
.evidence-card > div:first-child,
.clue-top {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 12px !important;
}

.clue-type-badge {
  align-self: flex-start;
  width: fit-content;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--accent);
  font-weight: 700;
  box-sizing: border-box;
}

.clue-tag-picker {
  display: flex !important;
  width: 100% !important;
  gap: 6px !important;
  box-sizing: border-box !important;
}

.tag-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 26px; /* was ~23px, just under the WCAG 2.5.8 AA 24px target-size minimum */
  padding: 0.3rem 0.4rem;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  transition: var(--transition);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-sizing: border-box;
}

.tag-btn.tag-relevant.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--success);
  color: var(--success);
  font-weight: 600;
}

.tag-btn.tag-suspicious.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--warning);
  color: var(--warning);
  font-weight: 600;
}

.tag-btn.tag-discarded.active {
  background: rgba(100, 116, 139, 0.2);
  border-color: var(--text-muted);
  color: var(--text-muted);
  font-weight: 600;
}

.clue-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.clue-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.clue-inspect-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--accent);
  transition: var(--transition);
  min-height: 44px;
}

.clue-inspect-btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Timeline Module */
.timeline-module {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* Investigative Assistance (hints) */
.hint-panel-module {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.hint-panel-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 1.1rem 0;
  line-height: 1.5;
}

.hint-tiers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hint-tier {
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.hint-tier.revealed {
  border-style: solid;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.06);
}

.hint-tier-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.hint-tier-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0;
}

.hint-request-btn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px;
}

.hint-request-btn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.22);
}

.hint-request-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.timeline-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
  padding-left: 0.5rem;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-surface);
  z-index: 2;
  margin-top: 0.35rem;
  box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-content {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
}

.timeline-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.timeline-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.timeline-source {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Resolution Gatekeeper Section */
.gatekeeper-card {
  border: 2px solid var(--accent);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 0 25px var(--accent-glow);
  position: relative;
}

.gatekeeper-header {
  margin-bottom: 1.5rem;
}

.gk-seal-badge {
  display: inline-block;
  font-family: var(--font-federal);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.gatekeeper-header h2 {
  font-family: var(--font-federal);
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.gatekeeper-header p {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.35rem;
}

.gatekeeper-phases {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gatekeeper-phase-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
}

.gatekeeper-phase-box.locked {
  opacity: 0.45;
  pointer-events: none;
}

.gatekeeper-phase-box.completed {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.phase-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.phase-tag {
  display: inline-block;
  font-family: var(--font-federal);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.phase-certified-stamp {
  font-family: var(--font-stamp);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--success);
  border: 2px solid var(--success);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(-1.5deg);
  display: inline-flex;
  align-items: center;
}

.gatekeeper-phase-box h4 {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
}

.gatekeeper-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.gk-select-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.gk-select-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.gk-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: var(--radius-sm);
  background: #121518;
  color: #f1f5f9;
  border: 1px solid var(--border-color);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.gk-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.gk-select option {
  background: #121518;
  color: #f1f5f9;
  font-family: var(--font-ui);
  padding: 8px 12px;
}

.gk-select-arrow {
  position: absolute;
  right: 1rem;
  pointer-events: none;
  font-size: 0.75rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.gatekeeper-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-federal);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  transition: var(--transition);
  box-shadow: 0 2px 10px var(--accent-glow);
  min-height: 44px;
}

.gatekeeper-submit-btn:hover {
  filter: brightness(1.15);
}

.gatekeeper-feedback {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.45;
  display: none;
}

.gatekeeper-feedback.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--danger);
  color: #fca5a5;
}

.gatekeeper-feedback.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success);
  color: #86efac;
}

/* AI Image Bordering Engine Overlays */
/* 1980s: Polaroid Date Stamp (Yellow/Orange Ink on Matte Chin) */
.polaroid-date-stamp {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-family: var(--font-typewriter);
  font-size: 0.72rem;
  font-weight: 800;
  color: #954608; /* darkened from #b45309 (was 4.32:1 against the yellow chip) */
  background: rgba(254, 240, 138, 0.95); /* Yellow stamp highlight */
  border: 1px solid #ca8a04;
  padding: 2px 7px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(-1.5deg);
  box-shadow: 0 1px 4px rgba(180, 83, 9, 0.35);
  pointer-events: none;
  z-index: 10;
  text-shadow: 0 0 1px rgba(217, 119, 6, 0.3);
}

/* 1990s: VHS Tracking Jitter Line & Bottom-Corner REC Date */
.vhs-bottom-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  padding: 6px 8px;
}

.vhs-tracking-jitter-line {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 20%, rgba(51,255,51,0.5) 45%, rgba(255,255,255,0.2) 70%, transparent 100%);
  opacity: 0.75;
  margin-bottom: 4px;
  animation: vhsJitter 2.2s infinite ease-in-out;
}

@keyframes vhsJitter {
  0%, 100% { transform: translateY(0) scaleX(1); opacity: 0.6; }
  50% { transform: translateY(-2px) scaleX(0.98); opacity: 0.9; }
  75% { transform: translateY(1px) scaleX(1.02); opacity: 0.4; }
}

.vhs-rec-corner {
  align-self: flex-start;
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  color: #33ff33;
  letter-spacing: 0.08em;
  text-shadow: 0 0 6px rgba(51, 255, 51, 0.8);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.vhs-rec-dot {
  color: #ef4444;
  font-size: 1rem;
  text-shadow: 0 0 8px #ef4444;
  animation: vhsBlink 1.2s infinite;
}

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

/* 2020s: Floating Tactical Metadata Boxes (Lat, Lon, Millisecond Timestamp, Camera Sensor) */
.hud-metadata-box {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 4px;
  padding: 5px 8px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(56, 189, 248, 0.15);
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-meta-header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-federal);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #38bdf8;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 2px;
  margin-bottom: 2px;
}

.hud-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 6px #00f0ff;
}

.hud-meta-row {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: #cbd5e1;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
}

.hud-label {
  color: #38bdf8;
  font-weight: 700;
}

/* Decoupled Victim Telemetry & EXIF Panel (Below photo card in 2020s) */
.victim-telemetry-panel {
  position: relative;
  width: 100%;
  margin-top: 10px;
  background: rgba(10, 15, 26, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 4px;
  padding: 8px 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-sizing: border-box;
}

.victim-telemetry-panel .hud-meta-header {
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  padding-bottom: 3px;
  margin-bottom: 3px;
}

.victim-telemetry-panel .hud-meta-row {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
}

/* Modals Architecture */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-window {
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  max-height: 90dvh; /* dvh accounts for the mobile browser's collapsible toolbar so the close button never sits off-screen */
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-window {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  font-size: 1.25rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: var(--danger);
}

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

/* Detective Notes Modal Drawer */
.notes-drawer {
  position: fixed;
  bottom: 1.5rem;
  bottom: max(1.5rem, calc(1.5rem + env(safe-area-inset-bottom)));
  right: 1.5rem;
  right: max(1.5rem, calc(1.5rem + env(safe-area-inset-right)));
  z-index: 60;
}

.notes-toggle-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, transform 0.15s ease;
  cursor: pointer;
}

.notes-toggle-fab:hover {
  transform: scale(1.08);
}

/* Dynamic Floating Logbook FAB Theming */
.era-1980s .notes-toggle-fab,
[data-theme="vol1"] .notes-toggle-fab,
body.era-1980s .notes-toggle-fab,
body[data-theme="vol1"] .notes-toggle-fab {
  background: #78350f !important;
  color: #fef3c7 !important;
  border: 2px solid #d4a373 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.era-1980s .notes-toggle-fab:hover,
[data-theme="vol1"] .notes-toggle-fab:hover,
body.era-1980s .notes-toggle-fab:hover,
body[data-theme="vol1"] .notes-toggle-fab:hover {
  background: #8e3e11 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7) !important;
}

.era-1990s .notes-toggle-fab,
[data-theme="vol2"] .notes-toggle-fab,
body.era-1990s .notes-toggle-fab,
body[data-theme="vol2"] .notes-toggle-fab {
  background: #475569 !important;
  color: #a7f3d0 !important;
  border: 2px solid #94a3b8 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.era-1990s .notes-toggle-fab:hover,
[data-theme="vol2"] .notes-toggle-fab:hover,
body.era-1990s .notes-toggle-fab:hover,
body[data-theme="vol2"] .notes-toggle-fab:hover {
  background: #52637a !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6) !important;
}

.era-2020s .notes-toggle-fab,
[data-theme="vol3"] .notes-toggle-fab,
body.era-2020s .notes-toggle-fab,
body[data-theme="vol3"] .notes-toggle-fab {
  background: #0284c7 !important;
  color: #e0f2fe !important;
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5) !important;
}

.era-2020s .notes-toggle-fab:hover,
[data-theme="vol3"] .notes-toggle-fab:hover,
body.era-2020s .notes-toggle-fab:hover,
body[data-theme="vol3"] .notes-toggle-fab:hover {
  background: #0396e3 !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.8) !important;
}

/* Slide-out Field Investigator's Logbook Drawer */
.notes-panel {
  position: fixed;
  top: 0;
  right: -430px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-surface);
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 35px rgba(0, 0, 0, 0.5);
  z-index: 100;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  overflow: hidden;
}

.notes-panel.active {
  right: 0;
}

.notes-panel-header {
  padding: 1rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notes-panel-title {
  font-family: var(--font-federal);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logbook-case-tag {
  padding: 0.45rem 1.25rem;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Suspect Elimination Tracker */
.logbook-checklist-section {
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid var(--border-color);
}

.checklist-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.checklist-items-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.suspect-strike-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease;
}

.suspect-strike-item.struck .strike-suspect-name {
  text-decoration: line-through;
  opacity: 0.45;
  color: var(--text-muted);
}

.suspect-strike-item.struck .strike-suspect-role {
  text-decoration: line-through;
  opacity: 0.35;
}

.strike-suspect-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Ruled Notepad */
.logbook-notepad-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  overflow: hidden;
  background-color: #faf7ee;
}

.notepad-vertical-rule {
  position: absolute;
  left: 36px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(220, 38, 38, 0.35);
  pointer-events: none;
  z-index: 2;
}

.ruled-notepad {
  width: 100%;
  height: 100%;
  background-color: transparent;
  color: #1c1917;
  font-family: var(--font-typewriter);
  font-size: 0.9rem;
  line-height: 28px;
  background-image: repeating-linear-gradient(transparent, transparent 27px, #e7decb 27px, #e7decb 28px);
  padding: 8px 16px 16px 48px;
  border: none;
  outline: none;
  resize: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Case Solved Banner Modal */
.case-closed-hero {
  text-align: center;
  padding: 2rem 1rem;
}

.case-closed-badge {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.5rem 1.25rem;
  border: 3px solid var(--success);
  color: var(--success);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  transform: rotate(-2deg);
}

.case-closed-hero h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.case-closed-hero p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
}

.arrest-dossier-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
}

.pdf-export-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  transition: var(--transition);
  min-height: 44px;
}

.pdf-btn:hover {
  filter: brightness(1.15);
}

/* Responsive Rules */
@media (max-width: 768px) {
  .app-header {
    padding: 0.5rem 0.75rem;
  }
  
  .era-tab-btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
  }

  .investigation-workspace {
    padding: 1rem;
    gap: 1.5rem;
  }

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

  .gatekeeper-controls-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   THE DETECTIVE'S SANCTUM & COLD CASE VAULT GATEWAY
   ========================================================================== */

.sanctum-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #0b0d13;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(217, 119, 6, 0.18) 0%, transparent 65%),
    linear-gradient(180deg, #090a0f 0%, #11141d 50%, #08090d 100%);
  color: #e2e8f0;
  overflow: hidden;
  transition: filter 0.3s ease;
}

.sanctum-screen.lamp-dimmed {
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(217, 119, 6, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #050608 0%, #090a0e 100%);
}

.sanctum-ambient-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.sanctum-venetian-shadows {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    175deg,
    rgba(0, 0, 0, 0.45) 0px,
    rgba(0, 0, 0, 0.45) 24px,
    transparent 24px,
    transparent 48px
  );
  opacity: 0.75;
}

.sanctum-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.9);
}

.sanctum-desk-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Interactive Banker's Lamp */
.bankers-lamp {
  position: relative;
  width: 180px;
  height: 90px;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lamp-hood {
  width: 160px;
  height: 48px;
  background: linear-gradient(180deg, #0e5a37 0%, #063821 100%);
  border-radius: 24px 24px 8px 8px;
  border: 3px solid #d4af37;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  position: relative;
}

.bankers-lamp.illuminated .lamp-glow-cone {
  position: absolute;
  top: 40px;
  left: -220px;
  right: -220px;
  height: 400px;
  background: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.35) 0%, rgba(251, 191, 36, 0.08) 55%, transparent 75%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bankers-lamp:not(.illuminated) .lamp-glow-cone {
  opacity: 0;
}

.bankers-lamp:not(.illuminated) .lamp-hood {
  background: linear-gradient(180deg, #0a3320 0%, #031c10 100%);
  border-color: #796321;
}

.lamp-stem {
  width: 10px;
  height: 32px;
  background: linear-gradient(90deg, #b38f2a 0%, #f6e27a 50%, #8c6d1d 100%);
}

.lamp-base {
  width: 100px;
  height: 12px;
  background: linear-gradient(180deg, #d4af37 0%, #8c6d1d 100%);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.lamp-pull-cord {
  position: absolute;
  right: 18px;
  top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.15s ease;
}

.lamp-pull-cord:active {
  transform: translateY(10px);
}

.cord-string {
  width: 2px;
  height: 38px;
  background: #f6e27a;
}

.cord-handle {
  width: 8px;
  height: 12px;
  background: #d4af37;
  border-radius: 4px;
}

/* Credentials Bar */
.sanctum-credential-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

/* Sanctum Hero */
.sanctum-hero {
  text-align: center;
  max-width: 860px;
  margin-bottom: 2.5rem;
}

.sanctum-stamp-top {
  display: inline-block;
  font-family: var(--font-stamp);
  font-size: 0.85rem;
  color: #ef4444;
  border: 2px solid #ef4444;
  padding: 0.2rem 0.75rem;
  border-radius: 3px;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  transform: rotate(-1.5deg);
  background: rgba(239, 68, 68, 0.08);
}

.sanctum-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.sanctum-subtitle {
  font-family: var(--font-tech);
  font-size: 1.25rem;
  color: #fbbf24;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.sanctum-pitch {
  font-size: 1rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 720px;
  margin: 0 auto;
}

/* Vault Portals Grid */
.sanctum-vault-portals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  margin-bottom: 2.5rem;
}

.sanctum-secret-tile-wrap {
  width: 100%;
  margin-top: -1rem;
  margin-bottom: 2.5rem;
}

.secret-case-tile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
}

.secret-case-tile.unlocked {
  cursor: pointer;
  border: 1px solid rgba(168, 85, 247, 0.5);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(56, 189, 248, 0.06));
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.25);
}

.secret-case-tile.unlocked:hover {
  box-shadow: 0 0 36px rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

.secret-tile-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}

.secret-case-tile.unlocked .secret-tile-icon {
  color: #c084fc;
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.7);
}

.secret-tile-body {
  flex: 1;
  min-width: 0;
}

.secret-tile-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.secret-case-tile.unlocked .secret-tile-eyebrow {
  color: #c084fc;
}

.secret-tile-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  letter-spacing: 0.03em;
}

.secret-tile-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
}

.secret-tile-btn {
  flex-shrink: 0;
  padding: 0.65rem 1.1rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(192, 132, 252, 0.5);
  background: rgba(168, 85, 247, 0.18);
  color: #e9d5ff;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

@media (max-width: 600px) {
  .secret-case-tile {
    flex-direction: column;
    text-align: center;
  }
}

.vault-portal-card {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.vault-portal-card:hover {
  transform: translateY(-6px);
}

/* 1980s Portal */
.portal-80s {
  background: #251d16;
  border: 2px solid #5d4633;
  color: #efe6d5;
}

.portal-80s:hover {
  border-color: #e5c158;
  box-shadow: 0 12px 35px rgba(229, 193, 88, 0.2);
}

.portal-80s .portal-tag {
  color: #e5c158;
  font-family: var(--font-stamp);
}

/* 1990s Portal */
.portal-90s {
  background: #142229;
  border: 2px solid #2d5564;
  color: #e2e8f0;
}

.portal-90s:hover {
  border-color: #38bdf8;
  box-shadow: 0 12px 35px rgba(56, 189, 248, 0.2);
}

.portal-90s .portal-tag {
  color: #38bdf8;
  font-family: var(--font-tech);
}

/* 2020s Portal */
.portal-2020s {
  background: #0f172a;
  border: 2px solid #0284c7;
  color: #f8fafc;
}

.portal-2020s:hover {
  border-color: #00f0ff;
  box-shadow: 0 12px 35px rgba(0, 240, 255, 0.25);
}

.portal-2020s .portal-tag {
  color: #00f0ff;
  font-family: var(--font-mono);
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  padding-bottom: 0.5rem;
}

.portal-progress.complete {
  color: var(--success);
}

.portal-icon-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.portal-icon {
  font-size: 2.2rem;
}

.portal-title-block h3 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.portal-dates {
  font-size: 0.8rem;
  opacity: 0.75;
}

.portal-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.85;
}

.portal-case-preview {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.preview-label {
  font-weight: 700;
  margin-bottom: 0.35rem;
  opacity: 0.7;
}

.preview-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.preview-list li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

.preview-list li.solved {
  color: var(--success);
  font-weight: 600;
}

.preview-list .num {
  opacity: 0.5;
  font-family: var(--font-mono);
}

.portal-enter-btn {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  transition: var(--transition);
}

.portal-enter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Master Sanctum CTA */
.sanctum-cta-bar {
  display: flex;
  justify-content: center;
  width: 100%;
}

.sanctum-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
  border: 2px solid #fbbf24;
  border-radius: var(--radius-md);
  color: #fff;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.35);
  transition: all 0.3s ease;
  cursor: pointer;
}

.sanctum-enter-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.5);
  filter: brightness(1.1);
}

.sanctum-enter-btn .btn-icon {
  font-size: 2rem;
}

.sanctum-enter-btn .btn-label-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.sanctum-enter-btn .btn-text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sanctum-enter-btn .btn-subtext {
  font-size: 0.75rem;
  color: #fef3c7;
  opacity: 0.85;
}

/* Header Vault Overview Button */
.btn-vault {
  background: rgba(251, 191, 36, 0.15) !important;
  border: 1px solid #fbbf24 !important;
  color: #fbbf24 !important;
  font-weight: 700;
}

.btn-vault:hover {
  background: rgba(251, 191, 36, 0.3) !important;
}

/* ==========================================================================
   ENHANCED CASE BRIEFING & VICTIM DOSSIER PHOTO
   ========================================================================== */

.briefing-top-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.era-pill {
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  display: inline-block;
  margin-right: 0.4rem;
}

.era-tag-80s { background: #8b261e; color: #fff; }
.era-tag-90s { background: #008080; color: #fff; }
.era-tag-2020s { background: #0277b3; color: #fff; }

.stamp-classified {
  color: #ef4444;
  border: 2px solid #ef4444;
  padding: 0.2rem 0.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  border-radius: 3px;
  transform: rotate(-2deg);
}

.stamp-solved {
  color: var(--success);
  border: 2px solid var(--success);
  padding: 0.2rem 0.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  border-radius: 3px;
}

.case-subtitle-note {
  font-family: var(--font-tech);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: -0.5rem;
  margin-bottom: 1.25rem;
}

.case-synopsis-box {
  background: rgba(0, 0, 0, 0.15);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.synopsis-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.case-synopsis-text {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Victim Dossier Layout */
.victim-dossier-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  align-items: start;
}

.victim-photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #1e293b;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* NOTE: the class the JS emits here is literally "1980s" (a bare era id), which is
   not a valid CSS class selector unescaped (can't start with a digit) — the rule
   silently never matched. Use the same ancestor-scoped pattern every other era
   override in this codebase already relies on instead. */
.era-1980s .victim-photo-card,
[data-theme="vol1"] .victim-photo-card {
  background: #fdfbf7;
  color: #1a1918;
  border: 2px solid #d4c5ab;
  padding: 0.75rem 0.75rem 1.5rem 0.75rem;
  transform: rotate(-1deg);
}

.era-1990s .victim-photo-card,
[data-theme="vol2"] .victim-photo-card {
  background: #111827;
  color: #e5e7eb;
}

.photo-inner {
  width: 100%;
  height: 200px;
  position: relative;
  background: #0f172a;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.victim-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-fallback-seal {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: #94a3b8;
}

.fallback-silhouette {
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.fallback-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ef4444;
}

.fallback-name {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  margin-top: 0.25rem;
  color: #cbd5e1;
}

.photo-corner-tag {
  position: absolute;
  top: 8px;
  right: -24px;
  background: #b91c1c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.2rem 1.75rem;
  transform: rotate(45deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.photo-caption {
  margin-top: 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.photo-caption strong {
  font-weight: 700;
}

.photo-caption span {
  font-size: 0.75rem;
  opacity: 0.75;
}

.victim-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.danger-text { color: #f87171 !important; }
.warning-text { color: #fbbf24 !important; }

/* ==========================================================================
   ENHANCED SUSPECT DOSSIERS & MUGSHOTS (100% VERTICAL FLOW ARCHITECTURE)
   ========================================================================== */

.suspect-card, .poi-card {
  height: auto !important;
  min-height: fit-content !important;
  overflow: visible !important;
}

.suspect-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* 1. Suspect Header (Top Zone) */
.suspect-header-top {
  position: relative;
  width: 100%;
  padding-right: 90px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.suspect-header-top .suspect-name {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
  color: inherit;
  word-break: break-word;
}

.suspect-header-top .suspect-relation {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 3px;
  font-style: italic;
  color: inherit;
}

.suspect-header-top .suspect-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 3px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  white-space: nowrap;
}

/* 2. Photography / Mugshot (Middle Zone) */
.suspect-mugshot-container {
  width: 100%;
  height: 250px;
  margin: 0 auto 16px auto;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  box-sizing: border-box;
}

.mugshot-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  background-color: #121620;
  background-image: 
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0px, rgba(255, 255, 255, 0.08) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.16) 0px, rgba(255, 255, 255, 0.16) 2px, transparent 2px, transparent 72px);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.suspect-mugshot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  z-index: 1;
}

.mugshot-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  background: transparent;
}

.mugshot-silhouette {
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.fallback-mugshot-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Booking Placard Strip */
.mugshot-booking-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  color: #d4a373;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  text-align: center;
  padding: 5px 0;
  letter-spacing: 1px;
  z-index: 5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.6);
  border-top: 1px solid rgba(212, 163, 115, 0.3);
}

.mugshot-wrapper .polaroid-date-stamp {
  top: 8px;
  bottom: auto;
  right: 8px;
}

.mugshot-wrapper .vhs-bottom-overlay {
  bottom: 28px;
}

.mugshot-wrapper .hud-metadata-box {
  bottom: 28px;
}

/* 3. Narrative & Alibi Info Block (Bottom Zone) */
.suspect-body-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  line-height: 1.45;
  font-size: 0.86rem;
  box-sizing: border-box;
}

.suspect-detail-block {
  font-size: 0.86rem;
  line-height: 1.45;
}

.suspect-detail-block p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.block-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

/* Physical Notes & Footwear Callout Box */
.suspect-detail-block.physical-block {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-left: 2px solid #d4a373;
  border-radius: 0 4px 4px 0;
}

.era-1980s .suspect-detail-block.physical-block,
[data-theme="vol1"] .suspect-detail-block.physical-block {
  background: rgba(0, 0, 0, 0.06);
  border-left: 2px solid #8b261e;
}

.era-1990s .suspect-detail-block.physical-block,
[data-theme="vol2"] .suspect-detail-block.physical-block {
  background: rgba(0, 0, 128, 0.06);
  border-left: 2px solid #000080;
}

.era-2020s .suspect-detail-block.physical-block,
[data-theme="vol3"] .suspect-detail-block.physical-block {
  background: rgba(56, 189, 248, 0.08);
  border-left: 2px solid #38bdf8;
}

.physical-text {
  color: inherit;
  font-weight: 500;
  margin: 0;
}

/* Suspect Interrogation */
.suspect-interrogate-btn {
  margin-top: 0.85rem;
  width: 100%;
  padding: 0.65rem 1rem;
  min-height: 44px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.suspect-interrogate-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.2);
}

.suspect-interrogate-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.interrogation-window {
  max-width: 620px !important;
}

.interrogation-suspect-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
}

.interrogation-suspect-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.interrogation-suspect-relation {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

.interrogation-instructions {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.interrogation-clue-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.interrogation-clue-btn {
  padding: 0.5rem 0.85rem;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}

.interrogation-clue-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.interrogation-clue-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.interrogation-response-box {
  min-height: 90px;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--border-color);
  font-size: 0.95rem;
  line-height: 1.55;
  font-style: italic;
}

.interrogation-response-placeholder {
  color: var(--text-muted);
  font-style: normal;
}

.interrogation-response-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-style: normal;
  color: var(--warning);
  margin-bottom: 0.5rem;
}

.clue-evidence-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

/* Clue inspection real image & fallback */
.polaroid-evidence-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 2px;
}

.polaroid-fallback-vector {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.spool-cog {
  animation: none;
}

.tape-reel.spinning .spool-cog {
  animation: spinReel 1.2s linear infinite;
}

@keyframes spinReel {
  100% { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .sanctum-vault-portals {
    grid-template-columns: 1fr;
  }
  .victim-dossier-layout {
    grid-template-columns: 1fr;
  }
  .mugshot-wrapper {
    height: 240px;
  }
}

/* ==========================================================================
   FORMAL JUDICIAL ARREST WARRANT & RESOLUTION DOSSIER (MODAL & PRINT)
   ========================================================================== */

.judicial-warrant-dossier {
  max-width: 840px !important;
  width: 95% !important;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
}

.printable-warrant-body {
  background: #ffffff;
  color: #0f172a;
  padding: 2.25rem 2.5rem;
  border-radius: 4px;
}

.court-letterhead {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 3px double #1e293b;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.court-emblem {
  font-size: 2.5rem;
  line-height: 1;
}

.court-name {
  font-family: var(--font-badge), 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #0f172a;
  margin: 0;
  text-transform: uppercase;
}

.court-division {
  font-family: var(--font-federal), sans-serif;
  font-size: 0.78rem;
  letter-spacing: 2px;
  color: #475569;
  text-transform: uppercase;
  margin-top: 2px;
}

.court-docket-no {
  font-family: var(--font-mono), monospace;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 4px;
}

.court-warrant-banner {
  background: #0f172a;
  color: #ffffff;
  padding: 0.65rem 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

.court-warrant-banner .warrant-title {
  font-family: var(--font-federal), sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.detective-rank-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 4px;
  padding: 0.5rem 0.85rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.detective-rank-stars {
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: #f59e0b;
}

.detective-rank-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400e;
  letter-spacing: 0.3px;
}

/* Confession quote + epilogue clipping (case-closed modal) */
.confession-quote-block {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.04);
  border-left: 4px solid #8b261e;
  border-radius: 2px;
}

.confession-quote-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #8b261e;
  margin-bottom: 0.5rem;
}

.confession-quote-text {
  margin: 0;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1a1918;
}

.epilogue-clipping {
  margin: 1.25rem 0;
  padding: 1.1rem 1.3rem;
  background: #f4efe2;
  border: 1px solid #cfbe9f;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.15);
  transform: rotate(-0.4deg);
  position: relative;
}

.epilogue-clipping::before {
  content: '✂ NEWS CLIPPING — FILED';
  position: absolute;
  top: -10px;
  left: 16px;
  background: #1a1918;
  color: #f4efe2;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
}

.epilogue-clipping-inner {
  font-family: var(--font-typewriter, 'Courier New', monospace);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #2a2620;
  columns: 1;
}

.court-warrant-banner .warrant-subtitle {
  font-family: var(--font-mono), monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-top: 2px;
}

.warrant-culprit-section {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.warrant-mugshot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arrest-culprit-photo {
  width: 130px;
  height: 160px;
  object-fit: cover;
  border: 1px solid #1e293b;
  filter: grayscale(100%) contrast(1.15);
  border-radius: 2px;
}

.warrant-photo-fallback {
  width: 130px;
  height: 160px;
  background: #e2e8f0;
  border: 1px solid #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  text-align: center;
  padding: 0.5rem;
}

.fallback-culprit-name {
  font-family: var(--font-mono), monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: #334155;
  margin-top: 0.5rem;
}

.warrant-culprit-tag {
  margin-top: 0.5rem;
  font-family: var(--font-mono), monospace;
  font-size: 0.62rem;
  font-weight: 800;
  background: #0f172a;
  color: #ffffff;
  padding: 2px 6px;
  letter-spacing: 1px;
  border-radius: 2px;
}

.warrant-culprit-info {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  justify-content: center;
  font-size: 0.85rem;
}

.warrant-info-row {
  display: flex;
  gap: 0.75rem;
  line-height: 1.4;
}

.warrant-info-label {
  font-family: var(--font-federal), sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #475569;
  width: 140px;
  flex-shrink: 0;
}

.warrant-info-val {
  color: #1e293b;
}

.highlight-bold {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
}

.danger-bold {
  font-weight: 700;
  color: #991b1b;
}

.warrant-findings-box {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 4px;
}

.findings-heading {
  font-family: var(--font-federal), sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.finding-item {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 0.6rem;
}

.finding-item strong {
  color: #8b261e;
  font-family: var(--font-federal), sans-serif;
  letter-spacing: 0.5px;
}

.warrant-mandate-text {
  background: #f8fafc;
  border: 2px solid #0f172a;
  padding: 1rem 1.25rem;
  font-family: var(--font-mono), monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.warrant-signature-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 1rem;
  border-top: 1px solid #cbd5e1;
  margin-bottom: 1.5rem;
}

.signature-block {
  text-align: center;
  width: 220px;
}

.sig-line {
  border-bottom: 1px solid #0f172a;
  height: 40px;
  margin-bottom: 6px;
}

.sig-caption {
  font-family: var(--font-badge), 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f172a;
}

.sig-sub {
  font-family: var(--font-federal), sans-serif;
  font-size: 0.65rem;
  color: #64748b;
  letter-spacing: 1px;
}

.warrant-issued-seal {
  width: 96px;
  height: 96px;
  border: 3px double #8b261e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-5deg);
  color: #8b261e;
  text-align: center;
  flex-shrink: 0;
}

.seal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.seal-star {
  font-size: 0.6rem;
  letter-spacing: 2px;
}

.seal-text {
  font-family: var(--font-federal), sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  line-height: 1.1;
  letter-spacing: 1px;
}

.seal-date {
  font-family: var(--font-mono), monospace;
  font-size: 0.55rem;
  letter-spacing: 1px;
  margin-top: 2px;
}

.btn-secondary-dossier {
  background: #475569 !important;
  color: #ffffff !important;
  margin-left: 0.5rem;
}

/* ==========================================================================
   PRINT MEDIA RULES: FORMAL LEGAL ARREST WARRANT DOCKET
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 15mm 12mm 15mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* Hide everything outside the warrant modal */
  #app-container,
  .notes-drawer,
  .no-print,
  .modal-close-btn,
  .pdf-export-actions,
  #clue-modal-overlay {
    display: none !important;
  }

  #case-closed-modal {
    display: block !important;
    position: static !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  #case-closed-modal .modal-window {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .printable-warrant-body {
    padding: 0 !important;
    color: #000000 !important;
  }

  .court-warrant-banner {
    background: #000000 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .warrant-culprit-section {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    page-break-inside: avoid;
  }

  .arrest-culprit-photo {
    filter: grayscale(100%) contrast(1.2) !important;
    border: 1px solid #000000 !important;
  }

  .warrant-findings-box {
    border: 1px solid #000000 !important;
    page-break-inside: avoid;
  }

  .warrant-mandate-text {
    border: 2px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid;
  }

  .warrant-signature-row {
    border-top: 1px solid #000000 !important;
    page-break-inside: avoid;
  }

  .warrant-issued-seal {
    border: 3px double #000000 !important;
    color: #000000 !important;
  }
}

/* ==========================================================================
   CRIME SCENE ESTABLISHING SHOTS & EVIDENCE IMAGE RENDERING
   ========================================================================== */

.crime-scene-banner {
  width: 100%;
  margin: 1.25rem 0 1.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
}

.crime-scene-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  background: #0a0d14;
  overflow: hidden;
}

.crime-scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.crime-scene-banner:hover .crime-scene-img {
  transform: scale(1.02);
}

.scene-overlay-caption {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 3;
}

.scene-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 4px;
  font-family: var(--font-federal);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.scene-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.scene-location {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.crime-scene-frame .polaroid-date-stamp {
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-family: var(--font-typewriter);
  font-size: 0.85rem;
  font-weight: 800;
  color: #ff9f1c;
  background: rgba(18, 14, 11, 0.85);
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.08em;
  z-index: 3;
  border: 1px solid rgba(255, 159, 28, 0.3);
}

/* Evidence Card Photo Thumbnail */
.clue-thumb-container {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
}

.clue-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.clue-card:hover .clue-thumb-img {
  transform: scale(1.04);
}

/* Evidence Inspector Modal Photo */
.clue-modal-photo-box {
  margin-bottom: 1.25rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.evidence-modal-photo-frame {
  width: 100%;
  max-height: 380px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-color);
  background: #0a0d14;
  display: flex;
  justify-content: center;
  align-items: center;
}

.evidence-modal-img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  display: block;
}

/* Era 1980s Polaroid and Paper Accents */
.era-1980s .crime-scene-banner,
[data-theme="vol1"] .crime-scene-banner {
  border: 8px solid #fdfbf7;
  box-shadow: 0 10px 25px rgba(44, 30, 16, 0.35);
  background: #fdfbf7;
}

.era-1980s .crime-scene-img,
[data-theme="vol1"] .crime-scene-img {
  filter: contrast(1.06) saturate(0.95) sepia(0.08);
}

.era-1980s .clue-thumb-container,
[data-theme="vol1"] .clue-thumb-container {
  border: 4px solid #fdfbf7;
  border-bottom: 6px solid #fdfbf7;
  background: #2a2016;
}

.era-1980s .clue-thumb-img,
[data-theme="vol1"] .clue-thumb-img {
  filter: contrast(1.06) saturate(0.95) sepia(0.06);
}

/* Clue Pinboard Thumbnail on Corkboard */
.clue-pin-photo {
  height: 95px !important;
}

.clue-pin-photo img {
  filter: contrast(1.05) sepia(0.1);
}

/* ========================================================= */
/* UNIVERSAL FORENSIC IMAGE LIGHTBOX & EXPAND SYSTEM         */
/* ========================================================= */

.image-lightbox-overlay {
  z-index: 9999 !important;
  background: rgba(5, 8, 14, 0.92) !important;
  backdrop-filter: blur(14px) !important;
  padding: 1.25rem;
}

.lightbox-window {
  width: 95vw;
  max-width: 1280px;
  height: 92vh;
  height: 92dvh;
  max-height: 920px;
  background: #0d111a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-lightbox-overlay.active .lightbox-window {
  transform: scale(1);
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: #141a26;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 1rem;
}

.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.lightbox-era-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #a0aec0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.lightbox-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f7fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.lightbox-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.lightbox-close-btn {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.4);
  color: #fca5a5;
  font-size: 1.1rem;
  padding: 0.45rem 0.85rem;
  min-height: 44px;
  min-width: 44px;
}

.lightbox-close-btn:hover {
  background: rgba(220, 38, 38, 0.4);
  border-color: rgba(220, 38, 38, 0.6);
  color: #ffffff;
}

.lightbox-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #161c28 0%, #080a0f 100%);
  padding: 1.25rem;
  cursor: zoom-in;
  user-select: none;
}

.lightbox-stage.is-zoomed {
  cursor: grab;
  overflow: auto;
}

.lightbox-stage.is-grabbing {
  cursor: grabbing;
}

.lightbox-image-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
}

.lightbox-img {
  max-width: 88vw;
  max-height: 70vh;
  max-height: 70dvh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
  display: block;
  pointer-events: none;
}

.lightbox-stage.is-zoomed .lightbox-image-container {
  transform: scale(2.2);
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: #141a26;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  gap: 1.5rem;
  font-size: 0.85rem;
}

.lightbox-caption {
  color: #cbd5e1;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-hint {
  color: #94a3b8;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* Era Themes for Lightbox */
.image-lightbox-overlay[data-theme="vol1"] .lightbox-window {
  border-color: #8B261E;
  background: #1c150f;
}
.image-lightbox-overlay[data-theme="vol1"] .lightbox-header,
.image-lightbox-overlay[data-theme="vol1"] .lightbox-footer {
  background: #251b13;
  border-color: #3d2b1f;
}
.image-lightbox-overlay[data-theme="vol1"] .lightbox-era-badge {
  background: #8B261E;
  color: #ffe8d6;
  border-color: #a73229;
}
.image-lightbox-overlay[data-theme="vol1"] .lightbox-stage {
  background: radial-gradient(circle at center, #2e2118 0%, #120d09 100%);
}

.image-lightbox-overlay[data-theme="vol2"] .lightbox-window {
  border-color: #008080;
  background: #0a1414;
}
.image-lightbox-overlay[data-theme="vol2"] .lightbox-header,
.image-lightbox-overlay[data-theme="vol2"] .lightbox-footer {
  background: #0f1f1f;
  border-color: #1a3333;
}
.image-lightbox-overlay[data-theme="vol2"] .lightbox-era-badge {
  background: #008080;
  color: #e0f2f1;
  border-color: #009688;
  font-family: monospace;
}
.image-lightbox-overlay[data-theme="vol2"] .lightbox-stage {
  background: radial-gradient(circle at center, #102626 0%, #050a0a 100%);
}

.image-lightbox-overlay[data-theme="vol3"] .lightbox-window {
  border-color: #00F0FF;
  background: #060c14;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15), 0 30px 90px rgba(0,0,0,0.9);
}
.image-lightbox-overlay[data-theme="vol3"] .lightbox-header,
.image-lightbox-overlay[data-theme="vol3"] .lightbox-footer {
  background: #0a1422;
  border-color: rgba(0, 240, 255, 0.2);
}
.image-lightbox-overlay[data-theme="vol3"] .lightbox-era-badge {
  background: rgba(0, 240, 255, 0.15);
  color: #00F0FF;
  border-color: #00F0FF;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}
.image-lightbox-overlay[data-theme="vol3"] .lightbox-stage {
  background: radial-gradient(circle at center, #0e1c2e 0%, #03060a 100%);
}

/* Expand Affordance on all game images */
.crime-scene-frame,
.victim-photo-card .photo-inner,
.mugshot-wrapper,
.clue-thumb-container,
.clue-img-wrapper,
.evidence-modal-img,
.polaroid-evidence-img,
.pin-card-photo {
  cursor: zoom-in !important;
  position: relative;
}

.crime-scene-frame::after,
.victim-photo-card .photo-inner::after,
.mugshot-wrapper::after,
.clue-thumb-container::after,
.clue-img-wrapper::after {
  content: '⤢ EXPAND';
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 15;
}

.crime-scene-frame:hover::after,
.victim-photo-card .photo-inner:hover::after,
.mugshot-wrapper:hover::after,
.clue-thumb-container:hover::after,
.clue-img-wrapper:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.crime-scene-frame:hover .crime-scene-img,
.victim-photo-card .photo-inner:hover .victim-img,
.mugshot-wrapper:hover .suspect-mugshot,
.clue-thumb-container:hover .clue-thumb-img,
.clue-img-wrapper:hover .clue-thumb-img {
  filter: brightness(1.06);
  transition: filter 0.2s ease;
}

/* ==========================================================================
   OFFICIAL BRAND LOGO & SANCTUM SEAL
   ========================================================================== */
.brand-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(212, 160, 23, 0.4));
  vertical-align: middle;
}

.sanctum-seal-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  flex-shrink: 0;
}

.sanctum-aux-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.75rem;
  width: 100%;
}

.sanctum-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-family: var(--font-federal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.sanctum-secondary-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 12px var(--accent-glow);
}

.ctrl-btn.btn-manual:hover {
  border-color: #f59e0b;
  color: #fef3c7;
}

.ctrl-btn.btn-pwa {
  position: relative;
}

.ctrl-btn.btn-pwa.pwa-ready::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pwaPulse 1.8s infinite;
}

@keyframes pwaPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.7; }
}

/* ==========================================================================
   FIELD INVESTIGATOR'S OPERATIONAL MANUAL (INTERACTIVE ONBOARDING)
   ========================================================================== */
.manual-modal-overlay {
  z-index: 250;
}

.manual-window {
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  background: #0d121c;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.1);
  overflow: hidden;
}

.manual-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #141b27;
}

.manual-header-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.manual-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #f59e0b;
}

.manual-header h2 {
  font-family: var(--font-federal);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f8fafc;
  margin: 0;
}

.manual-stepper-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid #1e293b;
  overflow-x: auto;
}

.stepper-step {
  flex: 1;
  min-width: 80px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: var(--transition);
}

.stepper-step:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.stepper-step.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.stepper-step .step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  border: 1px solid currentColor;
}

.manual-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  color: #cbd5e1;
  line-height: 1.6;
}

.manual-slide {
  display: none;
}

.manual-slide.active {
  display: block;
  animation: manualSlideIn 0.25s ease-out;
}

@keyframes manualSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.manual-slide-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #38bdf8;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.manual-slide h3 {
  font-family: var(--font-federal);
  font-size: 1.25rem;
  color: #f8fafc;
  margin-bottom: 0.75rem;
}

.manual-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.manual-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.manual-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 6px;
  padding: 1rem;
}

.manual-card h4 {
  font-family: var(--font-federal);
  font-size: 0.95rem;
  color: #f1f5f9;
  margin-bottom: 0.35rem;
}

.manual-card p {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
}

.manual-era-pill {
  /* Renamed from .era-pill: that name collided with the unrelated case-card
     era badge (base.css ~2107, .era-tag-80s etc.), and this rule, loading
     later in the same file, was silently overriding that badge's styling. */
  display: inline-block;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

.vol1-accent .manual-era-pill {
  background: rgba(217, 119, 6, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(217, 119, 6, 0.4);
}

.vol2-accent .manual-era-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.vol3-accent .manual-era-pill {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.manual-tip {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  margin-top: 1rem;
  color: #fde68a;
  border-radius: 0 4px 4px 0;
}

.manual-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.feature-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(51, 65, 85, 0.6);
}

.feature-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.feature-info {
  font-size: 0.84rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.tag-badge-rel {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.75rem;
}

.tag-badge-susp {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.75rem;
}

.tag-badge-disc {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.75rem;
}

.manual-bullets {
  padding-left: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin-top: 0.75rem;
}

.manual-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid #1e293b;
  background: rgba(0, 0, 0, 0.2);
}

.manual-nav-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-federal);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid #334155;
  border-radius: 4px;
  background: #1e293b;
  color: #f1f5f9;
  cursor: pointer;
  transition: var(--transition);
}

.manual-nav-btn:hover:not(:disabled) {
  background: #334155;
  border-color: var(--accent);
  color: #ffffff;
}

.manual-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.manual-next-btn {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
  font-weight: 800;
}

.manual-next-btn:hover:not(:disabled) {
  filter: brightness(1.15);
  color: #000;
}

.manual-progress-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ==========================================================================
   PWA INSTALLATION MODAL
   ========================================================================== */
.pwa-modal-overlay {
  z-index: 250;
}

.pwa-modal-window {
  max-width: 560px;
  background: #0c1017;
  border: 1px solid #334155;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 25px rgba(56, 189, 248, 0.15);
}

.pwa-modal-body {
  padding: 1.5rem;
}

.pwa-brand-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #1e293b;
}

.pwa-hero-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  flex-shrink: 0;
}

.pwa-hero-info h3 {
  font-family: var(--font-federal);
  font-size: 1.15rem;
  color: #f8fafc;
  margin-bottom: 0.25rem;
}

.pwa-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: var(--font-mono);
  line-height: 1.4;
}

.pwa-install-action-box {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  background: rgba(56, 189, 248, 0.06);
  border: 1px dashed rgba(56, 189, 248, 0.35);
  border-radius: 6px;
}

.pwa-primary-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #0b0f19;
  font-family: var(--font-federal);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.pwa-primary-install-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.pwa-direct-subtext {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
}

.pwa-instructions-guide h4 {
  font-family: var(--font-federal);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}

.pwa-step-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
}

.plat-badge {
  display: block;
  font-family: var(--font-federal);
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 0.25rem;
}

.pwa-step-card p {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.45;
}

/* ==========================================================================
   ACCESSIBILITY: prefers-reduced-motion. The app has ~15 looping/animated
   effects (scanlines, radar sweep, ambient grids, stamp drops, etc.) spread
   across base.css and all 3 era stylesheets. Rather than hunt down every
   keyframe individually, this global override (kept last for cascade
   priority) neutralizes all animation/transition duration for anyone who has
   asked their OS to reduce motion, without deleting the effects for everyone
   else.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ACCESSIBILITY: no element in the app ever showed a focus ring (two rules
   explicitly set outline:none and nothing replaced it), so keyboard/switch
   navigation had no visible indicator of where focus was. :focus-visible only
   fires for keyboard/programmatic focus, so mouse/touch users see no change. */
:focus-visible {
  outline: 3px solid #38bdf8 !important;
  outline-offset: 2px !important;
  border-radius: 2px;
}

/* ==========================================================================
   CONTRAST AUDIT FIXES: .danger-text / .warning-text (cause/time of death) are
   fixed light red/amber with !important, sized for the dark 2020s glass cards.
   On the light 1980s manila and 1990s silver card backgrounds that's ~1.2-1.7:1
   contrast — near-invisible. Same cascade-safety reasoning as the block below:
   later source order + a matching !important to beat the base rule's own.
   ========================================================================== */
.era-1980s .danger-text, [data-theme="vol1"] .danger-text { color: #540f0f !important; }
.era-1980s .warning-text, [data-theme="vol1"] .warning-text { color: #5c2809 !important; }
.era-1990s .danger-text, [data-theme="vol2"] .danger-text { color: #631212 !important; }
.era-1990s .warning-text, [data-theme="vol2"] .warning-text { color: #54250a !important; }

/* Same problem for the interrogation button (cyan) and hint button (amber):
   both are hardcoded to the 2020s dark-glass palette, so on the light 1980s
   manila / 1990s Win95-gray surfaces their contrast collapses to ~1.1-1.2:1. */
.era-1980s .suspect-interrogate-btn, [data-theme="vol1"] .suspect-interrogate-btn { color: #195570 !important; }
.era-1990s .suspect-interrogate-btn, [data-theme="vol2"] .suspect-interrogate-btn { color: #0e2f3e !important; }
.era-1980s .hint-request-btn, [data-theme="vol1"] .hint-request-btn { color: #6e4705 !important; }
.era-1990s .hint-request-btn, [data-theme="vol2"] .hint-request-btn { color: #3d2703 !important; }

/* .suspect-badge is the same "translucent overlay on an unknown parent"
   problem: its bright red reads fine on a dark 2020s card but collapses to
   ~1.8-2.6:1 on the light 1980s/1990s suspect-photo backgrounds. */
.era-1980s .suspect-badge, [data-theme="vol1"] .suspect-badge,
.era-1990s .suspect-badge, [data-theme="vol2"] .suspect-badge { color: #772222 !important; }

/* .checklist-title / .victim-stat-item .label / .block-tag / .strike-suspect-role:
   narrow contrast misses (3.6-4.2:1 vs the 4.5:1 minimum) on 1980s manila card
   tones a shade darker than --text-muted's other, passing use sites. */
.era-1980s .checklist-title, [data-theme="vol1"] .checklist-title,
.era-1980s .victim-stat-item .label, [data-theme="vol1"] .victim-stat-item .label,
.era-1980s .block-tag, [data-theme="vol1"] .block-tag,
.era-1980s .strike-suspect-role, [data-theme="vol1"] .strike-suspect-role { color: #454340 !important; }
.era-1980s .logbook-case-tag, [data-theme="vol1"] .logbook-case-tag { color: #7d221b !important; }

/* "Request Lab Report" toggle (clue-viewer.js) sets color: var(--accent) as
   an inline style, translucent-overlay background again — 1980s's dark red
   --accent came out at 3.58:1 on the modal's actual light backing. */
.era-1980s .btn-toggle-forensic-report, [data-theme="vol1"] .btn-toggle-forensic-report { color: #531712 !important; }

/* ==========================================================================
   MOBILE AUDIT FIXES (placed last on purpose: base.css has no build step, and
   several rules this section overrides use !important with no lower-specificity
   escape hatch, so the only reliable way to win the cascade is later source
   order + a matching !important — see [[css-media-query-source-order-gotcha]]).
   ========================================================================== */
@media (max-width: 600px) {
  /* Arrest warrant modal: 140px fixed label column + 140px/1fr grid leaves ~20px
     for content on a 360-390px phone, splitting every value one word per line. */
  .warrant-culprit-section {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .warrant-info-row {
    flex-direction: column;
    gap: 0.15rem;
  }

  .warrant-info-label {
    width: auto;
  }

  /* Header controls: 4 labelled buttons need ~370-395px against ~344px available,
     so the last one (Audio) gets clipped. Icon-only on phones. */
  .header-controls {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .ctrl-btn span {
    display: none;
  }

  /* Case chip bar: forced wrapping (with !important, see comment above) turns
     into up to 5 stacked rows on a phone. A single scrollable row instead. */
  .case-nav-chips {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .case-chip {
    flex-shrink: 0;
  }
}

