/* =========================================================================
   CASE LAW — Stylesheet
   Three distinct views: Desk (mahogany office), Briefcase (leather desktop
   with case materials), Courtroom (wood-paneled, red carpet).
   ========================================================================= */

:root {
  /* =========================================
     TIER 1 (3RD RATE) PALETTE - Default
     ========================================= */
  --bg-deep: #1a1210;
  --bg-panel: #241a16;
  --bg-elevated: #2e221d;
  
  --brass: #c19a49;     /* Dull brass */
  --brass-dim: #8a6f34;
  --parchment: #e8dcc0;
  --parchment-dim: #c4b89d;
  
  --ink: #1a1210;
  --ink-dim: #3a2a22;
  --danger: #c7432b;
  --danger-bg: #3a1a14;
  --success: #6b9b5a;
  --success-bg: #1f2b18;
  --warning: #d4a24c;
  --muted: #6b5a4e;
  --divider: #3a2a22;

  /* THE DESK: Drab grey/olive laminate, cold lighting */
  --desk-bg: #2b2d2c;
  --desk-gradient: rgba(255, 255, 255, 0.03);
  --desk-panel: #363938;
  --desk-border: #4d5250;
  --desk-hover: #434846;

  /* THE BRIEFCASE: Worn brown leather */
  --case-bg: #3b281d;
  --case-bg-dark: #24160f;
  --case-seam: #1c110b;
  --case-folder: #c2af84;
  --case-folder-shadow: #99875e;
  --case-pad: #e0d092;
  --case-pad-border: #baab71;
  --legal-margin: #c25454;
  --legal-line: #9caeb8;

  /* Courtroom & Typography (Stays constant) */
  --wood-dark: #3d2619;
  --wood-mid: #5c3a23;
  --wood-light: #7a5035;
  --carpet: #6b1f1f;
  --carpet-dark: #3d0f0f;
  --postit-yellow: #f4d965; --postit-green: #a4d189; --postit-red: #e28876; --postit-gray: #c9c0b0;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'IBM Plex Mono', Menlo, monospace;
  --font-ui: 'Inter', -apple-system, sans-serif;
  --font-hand: 'Caveat', 'Shadows Into Light', cursive;
  --font-typewriter: 'Special Elite', 'Courier New', monospace;
}

/* =========================================
   TIER 2 (2ND RATE) - THE "MODERN SLATE"
   Aesthetic: Legal Tech, Clinical Efficiency
   Base: Slate Gray (60%) | Text: Off-White (30%) | Accent: Electric Blue (10%)
   ========================================= */
body.theme-grey {
  /* UI: Sleek Slate & Electric Blue */
  --bg-deep: #1e222b;     /* Darkened Slate */
  --bg-panel: #2F3542;    /* Slate Gray base */
  --bg-elevated: #3a4150;
  
  --brass: #1E90FF;       /* Electric Blue CTA / Accent */
  --brass-dim: #4a6fa5;
  
  --parchment: #F1F2F6;   /* Off-White Text */
  --parchment-dim: #aeb3c0;
  --divider: #444c5e;

  /* THE DESK: Clean Slate & Frosted Glass */
  --desk-bg: #222731;
  --desk-gradient: rgba(241, 242, 246, 0.03);
  --desk-panel: #2F3542;
  --desk-border: #444c5e;
  --desk-hover: #3a4150;

  /* THE BRIEFCASE: Modern Polymer/Carbon Fiber */
  --case-bg: #272c38;
  --case-bg-dark: #1a1e26;
  --case-seam: #11141a;
  --case-folder: #F1F2F6;
  --case-folder-shadow: #c1c5d1;
  --case-pad: #ffffff;
  --case-pad-border: #d1d5e0;
  
  /* THE COURTROOM: Modern Appellate Court */
  --wood-dark: #1e222b;
  --wood-mid: #2F3542;
  --wood-light: #444c5e;
  --carpet: #1E90FF;
  --carpet-dark: #135b9e;
}

/* =========================================
   TIER 3 (1ST RATE) - "THE CLASSIC"
   Aesthetic: High-Net-Worth Corporate Law
   Base: Navy Blue (60%) | Text: Soft Cream (30%) | Accent: Gold (10%)
   ========================================= */
body.theme-gold {
  /* UI: Deep Navy & Antique Gold */
  --bg-deep: #1B2633;     /* Deep Navy */
  --bg-panel: #2A3B4E;    /* Navy Blue base */
  --bg-elevated: #364b63;
  
  --brass: #C9B398;       /* Gold CTA / Accent */
  --brass-dim: #8f7e69;
  
  --parchment: #F7F3F1;   /* Soft Cream Text */
  --parchment-dim: #cfc8c2;
  --divider: #3d526b;

  /* THE DESK: Executive Navy & Cream */
  --desk-bg: #151e29;
  --desk-gradient: rgba(201, 179, 152, 0.06);
  --desk-panel: #2A3B4E;
  --desk-border: #3d526b;
  --desk-hover: #364b63;

  /* THE BRIEFCASE: Bespoke Navy Leather */
  --case-bg: #1f2c3b;
  --case-bg-dark: #131c26;
  --case-seam: #0a0e14;
  --case-folder: #F7F3F1;
  --case-folder-shadow: #b5b0ab;
  --case-pad: #fffdfa;
  --case-pad-border: #e3ddd8;
  
  /* THE COURTROOM: Supreme Court Impartiality */
  --wood-dark: #151e29;
  --wood-mid: #2A3B4E;
  --wood-light: #3d526b;
  --carpet: #C9B398;
  --carpet-dark: #8f7e69;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--parchment);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.8s ease, color 0.8s ease; /* Moved here! */
}

/* ==================== HEADER ==================== */
#app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px; /* Reduced padding */
  border-bottom: 2px solid var(--brass-dim);
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-deep));
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  position: sticky;
  top: 0;
  z-index: 10;
}

.title-block .title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--brass);
  line-height: 1;
}

.title-block .subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--parchment-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 3px;
}

.stat-bar { display: flex; gap: 24px; }
.stat { display: flex; flex-direction: column; align-items: flex-end; min-width: 72px; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--parchment-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--brass);
}

/* ==================== SCENES ==================== */
#app-main {
  padding: 20px 28px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.scene { animation: fadeIn 0.4s ease; }
.scene.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.scene-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--brass);
  margin: 0 0 4px 0;
  letter-spacing: 1px;
}

.scene-subtitle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--parchment-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
/* --- TRIAL NOTES SLAM INTUITION --- */
@keyframes panelPulse {
  0% { box-shadow: inset 0 0 10px rgba(232, 220, 192, 0.1), 0 0 5px var(--warning); border-color: var(--brass-dim); }
  50% { box-shadow: inset 0 0 30px rgba(232, 220, 192, 0.2), 0 0 20px var(--warning); border-color: var(--warning); }
  100% { box-shadow: inset 0 0 10px rgba(232, 220, 192, 0.1), 0 0 5px var(--warning); border-color: var(--brass-dim); }
}

.panel-glow-slam {
  animation: panelPulse 1.5s infinite ease-in-out;
  border: 1px solid var(--warning) !important;
  transition: all 0.3s ease;
}
/* ==================== BUTTONS ==================== */
/* --- TRIAL RESPONSE BUTTONS --- */
#courtroom-actions .btn {
  background: linear-gradient(180deg, #dbd7d1, #ebe9e5); /* White-to-parchment gradient */
  color: #1a1210 !important; /* Dark ink text */
  border: 1px solid #baab71;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: all 0.15s ease;
  white-space: normal; /* Allows long text to wrap nicely */
  line-height: 1.4;
}

#courtroom-actions .btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff, #f4e8cb);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Gray out the disabled ones so they look like discarded notes */
#courtroom-actions .btn:disabled {
  background: #3a2a22; 
  color: #8a7b6e !important;
  border-color: #241a16;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}
.btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  background: var(--bg-elevated);
  color: var(--parchment);
  border: 1px solid var(--brass-dim);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}

.btn:hover:not(:disabled) {
  background: var(--brass-dim);
  color: var(--ink);
  border-color: var(--brass);
}

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

.btn-primary {
  background: var(--brass);
  color: var(--ink);
  border-color: var(--brass);
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background: var(--parchment);
  border-color: var(--parchment);
}

.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger); color: var(--parchment); }

/* =========================================================================
   VIEW 1: THE DESK (case intake)
   ========================================================================= */

#scene-desk {
  background-color: var(--desk-bg);
  background-image:
    radial-gradient(ellipse at top, var(--desk-gradient), transparent 60%),
    radial-gradient(circle at 80% 90%, var(--desk-gradient), transparent 50%);
  padding: 8px;
  transition: background 0.8s ease;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 16px; /* Reduced from 20px */
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.panel-heading {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--brass);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider);
}

.case-list { display: flex; flex-direction: column; gap: 12px; }

.case-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--desk-panel);
  border: 1px solid var(--desk-border);
  border-left: 4px solid var(--brass-dim);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.case-card:hover {
  border-left-color: var(--brass);
  background: var(--desk-hover);
}

.case-card-title { font-family: var(--font-display); font-size: 18px; color: var(--parchment); margin-bottom: 4px; }
.case-card-charge { font-family: var(--font-mono); font-size: 11px; color: var(--parchment-dim); letter-spacing: 1px; }
.case-card-meta { text-align: right; }
.case-card-retainer { font-family: var(--font-display); font-size: 20px; color: var(--brass); }
.case-card-tier { font-family: var(--font-mono); font-size: 10px; color: var(--parchment-dim); letter-spacing: 2px; text-transform: uppercase; }

.case-card.locked {
  opacity: 0.55;
  border-left-color: var(--desk-border);
  filter: grayscale(70%);
}

.case-card.locked:hover {
  background: var(--desk-panel); /* Prevents the bright hover effect */
  border-left-color: var(--warning);
}

.case-card-locked-msg {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--warning);
  margin-top: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: bold;
}

/* =========================================================================
   VIEW 2: THE BRIEFCASE (skeuomorphic desktop)
   ========================================================================= */

#scene-briefcase {
  background-color: var(--case-bg);
  background-image:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,0.02) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(255,255,255,0.015) 0%, transparent 40%),
    linear-gradient(135deg, var(--case-bg-dark) 0%, var(--case-bg) 50%, var(--case-bg-dark) 100%);
  border-radius: 6px;
  padding: 24px;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.5), inset 0 0 1px rgba(255,255,255,0.05);
  min-height: 720px;
  position: relative;
  transition: background 0.8s ease;
}

.briefcase-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--case-seam);
  transition: border-color 0.8s ease;
}

.briefcase-header .scene-title { color: var(--parchment); }
.briefcase-header .scene-subtitle { margin-bottom: 0; }
.briefcase-actions { display: flex; gap: 10px; }

/* Layout & Scrollable Areas */
.briefcase-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.scrollable-area {
  max-height: 480px; /* Reduced from 550px to prevent page scroll */
  overflow-y: auto;
  padding-right: 8px; /* Room for the scrollbar */
}

/* --- CASE FOLDER --- */
.case-folder {
  background: var(--case-folder);
  padding: 20px 22px 24px;
  border-radius: 2px 14px 4px 2px;
  box-shadow:
    0 2px 0 var(--case-folder-shadow),
    0 8px 24px rgba(0,0,0,0.5),
    inset 0 0 60px rgba(0, 0, 0, 0.05);
  color: var(--ink);
  position: relative;
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.015) 0, rgba(0,0,0,0.015) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse at top right, rgba(0,0,0,0.1), transparent 60%);
  transform: rotate(-0.4deg);
  transition: background 0.8s ease, box-shadow 0.8s ease;
}

.case-folder::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 30px;
  width: 110px;
  height: 22px;
  background: var(--case-folder);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.2);
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.015) 0, rgba(0,0,0,0.015) 1px, transparent 1px, transparent 3px);
  transition: background 0.8s ease;
}

.folder-label {
  font-family: var(--font-typewriter);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ink);
  text-transform: uppercase;
  border-bottom: 1px dashed var(--ink-dim);
  padding-bottom: 4px;
  margin-bottom: 10px;
}

.folder-stamp {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--font-typewriter);
  font-size: 11px;
  color: var(--danger);
  letter-spacing: 1.5px;
  border: 2px solid var(--danger);
  padding: 3px 10px;
  transform: rotate(7deg);
  opacity: 0.75;
}

.folder-client {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  margin: 8px 0 4px;
  font-weight: 900;
}

.folder-charge {
  font-family: var(--font-typewriter);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.folder-section-title {
  font-family: var(--font-typewriter);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin: 14px 0 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}

.dialogue-log {
  max-height: 320px; /* Reduced from 420px */
  overflow-y: auto;
  padding-right: 6px;
  font-family: var(--font-typewriter);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
.dialogue-entry { margin-bottom: 12px; }

.dialogue-speaker {
  font-family: var(--font-typewriter);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 2px;
}

.dialogue-entry.question .dialogue-speaker { color: #8a1a1a; }
.dialogue-entry.question .dialogue-text { font-style: italic; }
.dialogue-entry.answer .dialogue-text {
  padding-left: 10px;
  border-left: 2px solid rgba(0,0,0,0.2);
}

/* --- LEGAL NOTEPAD & HANDWRITING TYPOGRAPHY --- */
.pad-title, 
.question-btn, 
.post-it-text {
  font-family: var(--font-ui);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.legal-pad {
  background: var(--case-pad);
  border: 1px solid var(--case-pad-border);
  padding: 20px 22px 24px 44px;
  box-shadow:
    0 4px 0 var(--case-pad-border),
    0 10px 28px rgba(0,0,0,0.5);
  color: var(--ink);
  position: relative;
  transform: rotate(0.3deg);
  background-image:
    linear-gradient(to right, transparent 32px, var(--legal-margin) 32px, var(--legal-margin) 33px, transparent 33px),
    repeating-linear-gradient(to bottom, transparent 0, transparent 25px, var(--legal-line) 25px, var(--legal-line) 26px);
  min-height: 420px;
  transition: background 0.8s ease, border-color 0.8s ease;
}

.legal-pad::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 14px;
  width: 10px;
  background:
    radial-gradient(circle at 5px 18px, rgba(0,0,0,0.2) 6px, transparent 6.5px),
    radial-gradient(circle at 5px 80px, rgba(0,0,0,0.2) 6px, transparent 6.5px),
    radial-gradient(circle at 5px 150px, rgba(0,0,0,0.2) 6px, transparent 6.5px),
    radial-gradient(circle at 5px 230px, rgba(0,0,0,0.2) 6px, transparent 6.5px),
    radial-gradient(circle at 5px 310px, rgba(0,0,0,0.2) 6px, transparent 6.5px),
    radial-gradient(circle at 5px 390px, rgba(0,0,0,0.2) 6px, transparent 6.5px);
  background-repeat: no-repeat;
}

.pad-title {
  font-size: 24px;
  font-weight: 600;
  color: #5a2a1a;
  margin: 0 0 4px;
  transform: rotate(-0.5deg);
}

.pad-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.2);
  margin: 6px 0 14px;
}

.question-options { display: flex; flex-direction: column; gap: 2px; }

.question-btn {
  text-align: left;
  padding: 2px 4px;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px; 
  line-height: 1.4;
  transition: color 0.12s;
  position: relative;
}

.question-btn::before {
  content: '→ ';
  color: var(--legal-margin);
  font-weight: 600;
}

.question-btn:hover:not(:disabled) { color: var(--legal-margin); }
.question-btn:disabled {
  opacity: 0.5;
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,0.4);
  cursor: default;
}
.question-btn:disabled::before { content: '✓ '; color: #4a7538; }

/* --- POST-ITS --- */
.postit-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 0;
}

.postit-section-label {
  font-family: var(--font-typewriter);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--parchment-dim);
  margin-bottom: 2px;
  padding-left: 2px;
}

.post-it {
  padding: 12px 12px 10px;
  width: 100%;
  min-height: 90px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.3),
    0 6px 16px rgba(0,0,0,0.4);
  color: var(--ink);
  position: relative;
  line-height: 1.2;
  background-image: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(0,0,0,0.03));
  animation: slapDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slapDown {
  0% { opacity: 0; margin-top: -20px; box-shadow: 0 20px 30px rgba(0,0,0,0.5); }
  100% { opacity: 1; margin-top: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 6px 16px rgba(0,0,0,0.4); }
}

.post-it.unverified { background-color: var(--postit-yellow); transform: rotate(-1.5deg); }
.post-it.true       { background-color: var(--postit-green);  transform: rotate(1deg); }
.post-it.false      { background-color: var(--postit-red);    transform: rotate(-0.8deg); color: #3a0f0a; }
.post-it.dead_end   { background-color: var(--postit-gray);   transform: rotate(1.5deg); }

.post-it-status {
  font-family: var(--font-typewriter);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.post-it-text {
  font-size: 14px;
}

.post-it-empty {
  width: 100%;
  font-size: 15px;
  color: var(--parchment-dim);
  text-align: center;
  padding: 10px;
  opacity: 0.55;
  font-style: italic;
  font-family: var(--font-ui);
}

/* --- DOCKED PHONE & CHAT --- */
/* --- PHONE TABS --- */
.phone-tabs {
  display: flex;
  background: #111;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #333;
}

.phone-tab {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: bold;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.phone-tab.active {
  background: #2a7de1;
  color: white;
}

/* --- SUBPOENA / ACTION MENU --- */
.action-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
}

.action-card {
  background: #222;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-card-title {
  font-family: var(--font-ui);
  font-size: 13px;
  color: #e8e8e8;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.action-card-desc {
  font-family: var(--font-ui);
  font-size: 11px;
  color: #aaa;
  line-height: 1.3;
}
.phone-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.phone-wrapper {
  display: none;
  transform-origin: bottom right;
}

.phone-wrapper.open {
  display: block;
  animation: phonePopUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes phonePopUp {
  0% { opacity: 0; transform: scale(0.8) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.phone {
  background: #0a0a0a;
  border-radius: 28px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.8), inset 0 0 0 1.5px #222, 0 0 0 1px rgba(255,255,255,0.04);
  width: 340px; 
  height: 580px; 
  flex-shrink: 0;
  position: relative;
}

.phone::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 4px;
  background: #222;
  border-radius: 2px;
  z-index: 2;
}

.phone-screen {
  background: #1a1a1d;
  border-radius: 20px;
  padding: 24px 12px 12px;
  height: 100%; 
  display: flex;
  flex-direction: column;
}

.phone-statusbar {
  display: flex;
  justify-content: space-between;
  padding: 0 6px 10px;
  font-family: var(--font-ui);
  font-size: 10px;
  color: #888;
  border-bottom: 1px solid #2a2a2d;
  margin-bottom: 10px;
}

.phone-contact {
  text-align: center;
  padding: 4px 0 10px;
}

.phone-contact-name {
  font-family: var(--font-ui);
  font-size: 13px;
  color: #e8e8e8;
  font-weight: 600;
}

.phone-contact-status {
  font-family: var(--font-ui);
  font-size: 10px;
  color: #6b9b5a;
  margin-top: 1px;
}

.phone-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phone-msg {
  padding: 8px 11px;
  border-radius: 16px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  line-height: 1.35;
  max-width: 82%;
  word-wrap: break-word;
}

.phone-msg.out {
  background: #2a7de1;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.phone-msg.in {
  background: #2d2d30;
  color: #e8e8e8;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.phone-empty {
  color: #555;
  font-size: 12px;
  text-align: center;
  padding: 30px 8px;
  font-style: italic;
}

.phone-toggle-btn {
  border-radius: 20px;
  padding: 10px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
  font-size: 15px;
}

.badge {
  background: var(--danger);
  color: white;
  border-radius: 50%;
  padding: 0 6px;
  font-size: 11px;
  font-weight: bold;
  position: absolute;
  top: -6px;
  right: -6px;
  border: 2px solid var(--bg-deep);
}

.phone-controls {
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.quick-replies {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 4px; 
}

.quick-reply-btn {
  background: #2a7de1;
  color: white;
  border: none;
  border-radius: 16px;
  border-bottom-right-radius: 4px; 
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
  transition: background 0.15s;
}

.quick-reply-btn:hover { background: #3a8ef2; }
.quick-reply-btn span { flex: 1; }

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px !important;
  width: fit-content;
}

.typing-indicator span {
  display: block;
  width: 6px;
  height: 6px;
  background-color: #888;
  border-radius: 50%;
  animation: typingBlink 1.4s infinite both;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBlink {
  0% { opacity: 0.3; transform: scale(1); }
  20% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.3; transform: scale(1); }
}

/* =========================================================================
   VIEW 3: THE COURTROOM
   ========================================================================= */
   /* --- CLOSING ARGUMENT BUILDER --- */
.closing-builder-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
  text-align: left;
}

.closing-pool, .closing-slots {
  background: var(--bg-deep);
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 12px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.closing-slot {
  border: 2px dashed var(--muted);
  border-radius: 4px;
  padding: 10px;
  min-height: 60px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.closing-item {
  background: var(--postit-yellow);
  color: #222;
  padding: 8px 12px;
  border-radius: 2px;
  font-family: var(--font-hand);
  font-size: 16px;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  transition: transform 0.1s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.closing-item:hover {
  transform: scale(1.02);
}

.closing-item-number {
  background: #222;
  color: white;
  font-family: var(--font-ui);
  font-weight: bold;
  font-size: 12px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
   /* The Gallery Reaction */
.courtroom-gasp {
  text-align: center;
  color: var(--warning);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  margin: 14px 0;
  letter-spacing: 1px;
  animation: fadeIn 0.3s ease;
  opacity: 0.8;
}

/* Witness Breakdown Bubble */
.speech-bubble.panic {
  background: var(--danger-bg) !important;
  color: #ffb4a8 !important;
  border: 2px dashed var(--danger) !important;
  font-weight: bold;
  animation: panicShake 0.15s infinite alternate;
}

@keyframes panicShake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  50% { transform: translate(-1px, -2px) rotate(-0.5deg); }
  100% { transform: translate(-2px, 1px) rotate(0.5deg); }
}

   .press-btn {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 4px;
  padding: 14px 40px;
  border-radius: 4px;
  background: var(--bg-panel);
  border: 2px solid var(--warning);
  color: var(--warning);
  text-transform: uppercase;
  transition: all 0.15s;
}

.press-btn:hover:not(:disabled) {
  background: var(--warning);
  color: var(--ink);
  transform: scale(1.05);
}

/* Make Trial Notes look interactive */
.evidence-clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.evidence-clickable:hover {
  transform: scale(1.03) rotate(0deg) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  z-index: 10;
}

/* The Dramatic Evidence Slam Shake */
.screen-shake {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 2px, 0); }
  20%, 80% { transform: translate3d(4px, -2px, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 4px, 0); }
  40%, 60% { transform: translate3d(6px, -4px, 0); }
}
   .objection-btn {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 4px;
  padding: 14px 40px;
  border-radius: 4px;
  background: var(--danger-bg);
  border: 2px solid var(--danger);
  color: var(--danger);
  animation: pulse-danger 2s infinite;
  text-transform: uppercase;
}
.objection-hint {
  color: var(--danger);
  font-weight: bold;
  text-shadow: 0 0 8px rgba(199, 67, 43, 0.4);
  animation: slightPulse 1.5s infinite alternate;
}

@keyframes slightPulse {
  from { color: var(--danger); }
  to { color: #e28876; }
}

.objection-btn:hover:not(:disabled) {
  background: var(--danger);
  color: var(--parchment);
  transform: scale(1.05);
}

@keyframes pulse-danger {
  0% { box-shadow: 0 0 0 0 rgba(199, 67, 43, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(199, 67, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(199, 67, 43, 0); }
}

.prosecution-line {
  display: inline;
  transition: opacity 0.3s ease;
}

.prosecution-line strong {
  color: var(--danger); /* Makes the studied keyword explicitly stand out */
}

#scene-courtroom {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.5) 100%),
    repeating-linear-gradient(90deg,
      var(--wood-dark) 0px,
      var(--wood-mid) 180px,
      var(--wood-dark) 360px);
  background-color: var(--wood-dark);
  padding: 20px;
  border-radius: 6px;
  box-shadow: inset 0 0 120px rgba(0,0,0,0.7);
  min-height: 760px;
}

.courtroom-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}

.courtroom-header .scene-title { color: var(--parchment); }
.courtroom-header .scene-subtitle { margin-bottom: 0; }

/* Judge's Bench */
.judge-bench {
  background: linear-gradient(180deg, var(--wood-light) 0%, var(--wood-mid) 60%, var(--wood-dark) 100%);
  border: 2px solid #2a1a10;
  border-radius: 6px 6px 2px 2px;
  padding: 14px 22px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
}

.judge-bench::before {
  content: 'THE HONORABLE JUDGE';
  position: absolute;
  top: -1px;
  left: 22px;
  background: #2a1a10;
  color: var(--brass);
  font-family: var(--font-typewriter);
  font-size: 9px;
  letter-spacing: 2px;
  padding: 2px 10px;
  border-radius: 0 0 3px 3px;
}

.gavel-icon {
  font-size: 30px;
  color: var(--brass);
  opacity: 0.85;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.judge-info { flex: 1; margin-top: 4px; }

.judge-mood {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--parchment);
  font-weight: 700;
  margin-bottom: 4px;
  font-style: italic;
}

.suspicion-meter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.suspicion-label {
  font-family: var(--font-typewriter);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--parchment-dim);
  text-transform: uppercase;
  min-width: 90px;
}

.meter-bar {
  flex: 1;
  height: 8px;
  background: rgba(0,0,0,0.5);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.6);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
  max-width: 260px;
}

.meter-fill {
  height: 100%;
  transition: width 0.5s ease, background 0.3s;
}

.meter-fill.suspicion { background: linear-gradient(90deg, var(--success), var(--warning), var(--danger)); }
.meter-fill.jury      { background: linear-gradient(90deg, var(--danger), var(--warning), var(--success)); }

/* Main Floor */
.court-floor {
  display: grid;
  grid-template-columns: 240px 1fr 290px;
  gap: 14px;
  margin-bottom: 14px;
}
.court-transcript {
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-typewriter);
  font-size: 11px; /* Slightly smaller text */
  padding: 12px;
  height: 180px; /* Force a strict max height */
  overflow-y: auto;
  border-radius: 2px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
  margin-bottom: 12px; /* Reduced margin */
}

/* 5. Shrink the Trial Notes area */
.court-evidence {
  background: var(--bg-deep);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 12px;
}

.court-evidence-list {
  max-height: 140px; /* Reduced so it scrolls internally earlier */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jury-box {
  background: linear-gradient(180deg, var(--wood-mid), var(--wood-dark));
  border: 2px solid #2a1a10;
  border-radius: 4px;
  padding: 18px 12px 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
}

.jury-box::before {
  content: 'JURY';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: #2a1a10;
  color: var(--brass);
  font-family: var(--font-typewriter);
  font-size: 9px;
  letter-spacing: 3px;
  padding: 2px 12px;
}

.jury-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 4px 0 12px;
}

.juror {
  aspect-ratio: 1;
  background: #3a3530;
  border-radius: 50% 50% 45% 45%;
  position: relative;
  transition: background 0.5s ease;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.3);
}

.juror::before {
  content: '';
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 38%;
  background: inherit;
  border-radius: 50%;
  filter: brightness(1.2);
}

.juror.lean-defense { background: #3e6438; }
.juror.lean-prosecution { background: #6b2a1e; }

.jury-meter-wrap {
  font-family: var(--font-typewriter);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--parchment-dim);
  text-transform: uppercase;
  margin-top: 6px;
}

.jury-meter-wrap .meter-bar { width: 100%; margin-top: 4px; max-width: none; }

.jury-mood {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--parchment);
  font-style: italic;
  margin-top: 10px;
  text-align: center;
  min-height: 32px;
  line-height: 1.2;
}

/* Center Floor */
.court-center {
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, var(--carpet-dark) 40%, var(--carpet) 100%);
  border-radius: 4px;
  padding: 18px 22px 22px;
  min-height: 420px;
  box-shadow: inset 0 4px 20px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.speech-area {
  background: linear-gradient(180deg, #222222, #2e1814);
  border: 1px solid var(--wood-light);
  border-radius: 4px;
  height: 280px; /* Reduced from what was likely 350px+ */
  padding: 16px;
  overflow-y: auto;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.speech-bubble {
  background: var(--parchment);
  color: var(--ink);
  padding: 16px 20px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  position: relative;
  max-width: 92%;
  animation: bubbleIn 0.35s ease;
}

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

.speech-bubble.prosecution {
  align-self: flex-start;
  margin-left: 10px;
  border-left: 4px solid var(--danger);
}

.speech-bubble.prosecution::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 20px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--parchment);
}

.speech-bubble.defense {
  align-self: flex-end;
  margin-right: 10px;
  border-right: 4px solid var(--brass);
  text-align: right;
}

.speech-bubble.defense::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--parchment);
}

.speech-bubble.judge, .speech-bubble.witness {
  align-self: center;
  background: var(--wood-light);
  color: var(--parchment);
  font-family: var(--font-display);
  font-style: italic;
  border: 1px solid var(--brass);
  font-size: 15px;
  padding: 12px 18px;
  max-width: 80%;
}

.speech-bubble.judge::before, .speech-bubble.witness::before { display: none; }

.speech-speaker {
  font-family: var(--font-typewriter);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 6px;
}

.speech-bubble + .speech-bubble { margin-top: 18px; }

.podium-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.podium {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.85;
}

.podium-icon {
  width: 26px;
  height: 34px;
  background: linear-gradient(180deg, var(--wood-light), var(--wood-dark));
  border: 1px solid #2a1a10;
  border-radius: 2px 2px 0 0;
}

.podium-label {
  font-family: var(--font-typewriter);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--parchment-dim);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Transcript Panel */
.transcript-panel {
  background: var(--parchment);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 3px;
  font-family: var(--font-typewriter);
  font-size: 12px;
  line-height: 1.5;
  max-height: 560px;
  overflow-y: auto;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  position: relative;
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 18px, rgba(0,0,0,0.04) 18px, rgba(0,0,0,0.04) 19px);
}

.transcript-title {
  font-family: var(--font-typewriter);
  font-size: 11px;
  letter-spacing: 3px;
  text-align: center;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--ink-dim);
  padding-bottom: 6px;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: bold;
}

.transcript-entry {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dotted rgba(0,0,0,0.15);
  font-size: 11.5px;
}

.transcript-entry:last-child { border-bottom: none; }

.transcript-meta {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
}

.transcript-quote { font-style: italic; color: var(--ink); }

.transcript-entry.key-moment {
  background: rgba(212, 162, 76, 0.15);
  padding: 8px 10px;
  border-left: 3px solid var(--warning);
  border-bottom: none;
}

.transcript-entry.key-moment .transcript-meta { color: #8a5a1a; }

.transcript-tag {
  display: inline-block;
  font-family: var(--font-typewriter);
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 1px 6px;
  margin-top: 4px;
  text-transform: uppercase;
  border: 1px solid currentColor;
}

.transcript-tag.favorable { color: #2a7538; }
.transcript-tag.damaging  { color: #8a1a1a; }

.transcript-empty {
  font-style: italic;
  color: var(--ink-dim);
  text-align: center;
  padding: 20px 10px;
  font-size: 11px;
}

/* Response Options */
.response-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.response-btn {
  text-align: left;
  padding: 14px 18px; /* Slightly thicker padding now that the tag is gone */
  background: rgba(232, 220, 192, 0.95);
  color: var(--ink);
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 3px;
  font-family: var(--font-ui);
  font-size: 13px;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  line-height: 1.4;
}

.response-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  border-color: var(--brass); /* Unified hover color */
}

/* Glowing Evidence Animation */
.post-it.glow-active {
  transform: scale(1.04) rotate(0deg) !important;
  box-shadow: 0 0 16px var(--brass), 0 8px 24px rgba(0,0,0,0.6);
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.response-btn.strong:hover:not(:disabled)   { border-color: var(--success); }
.response-btn.decent:hover:not(:disabled)   { border-color: var(--parchment-dim); }
.response-btn.flippant:hover:not(:disabled) { border-color: var(--danger); }

.response-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(150, 140, 120, 0.3);
  color: var(--parchment-dim);
}

.response-quality-badge {
  font-family: var(--font-typewriter);
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 2px 8px;
  border-radius: 2px;
  align-self: flex-start;
  text-transform: uppercase;
  font-weight: bold;
}

.response-quality-badge.strong   { background: #2a5a2a; color: #c4e0a8; }
.response-quality-badge.decent   { background: #3a3a3a; color: var(--parchment-dim); }
.response-quality-badge.flippant { background: #6b2020; color: #e8b4a8; }
.response-quality-badge.locked   { background: #1a1a1a; color: var(--muted); }

.response-text {
  font-style: italic;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
}

.courtroom-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* ==================== VERDICT ==================== */
.verdict-card {
  text-align: center;
  padding: 48px 32px;
  background: var(--bg-panel);
  border: 2px solid var(--brass);
  max-width: 560px;
  margin: 40px auto;
}

.verdict-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 6px;
  margin: 0;
}

.verdict-title.guilty    { color: var(--danger); }
.verdict-title.notguilty { color: var(--success); }
.verdict-title.disbarred { color: var(--danger); }

.verdict-body {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--parchment-dim);
  letter-spacing: 1px;
  line-height: 1.8;
  margin: 20px 0 32px;
}

.verdict-outcome {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--parchment);
  margin: 16px 0;
  font-style: italic;
}

/* ==================== MODAL ==================== */
#modal-container {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}

#modal-container.hidden { display: none; }

.modal-box {
  background: var(--bg-panel);
  border: 1px solid var(--brass);
  padding: 32px;
  max-width: 480px;
  text-align: center;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.5); }

/* =========================================================================
   START SCREEN (THE DIPLOMA)
   ========================================================================= */
.diploma-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 75vh;
  margin-top: 20px;
}

.diploma {
  background: #f4e8cb; /* Bright parchment */
  color: #1a1210; /* Dark ink */
  width: 700px;
  padding: 40px;
  border: 2px solid #3a2a22;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6), inset 0 0 60px rgba(186, 171, 113, 0.4);
  position: relative;
  text-align: center;
  transform: rotate(-1deg); /* Slight tilt so it looks placed on a desk */
}

.diploma-inner {
  border: 4px double #3a2a22;
  padding: 30px;
}

.diploma-header {
  font-family: var(--font-display);
  font-size: 42px;
  text-transform: uppercase;
  letter-spacing: 6px;
  margin-bottom: 10px;
  color: #1a1210;
}

.diploma-subtitle {
  font-family: var(--font-display);
  font-size: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid #3a2a22;
  padding-bottom: 16px;
  color: #3a2a22;
}

.diploma-body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  margin-bottom: 30px;
}

.diploma-mechanics {
  background: rgba(0,0,0,0.04);
  padding: 16px;
  border-radius: 4px;
  margin: 20px 0;
  border-left: 3px solid #baab71;
}

.diploma-mechanics ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.diploma-mechanics li {
  margin-bottom: 8px;
}

.wax-seal {
  position: absolute;
  bottom: 25px;
  right: 45px;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, #a31515, #5a0000);
  border-radius: 50%;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.6), 0 4px 8px rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffcccc;
  font-family: var(--font-display);
  font-size: 12px;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 1px;
  border: 2px solid #3a0000;
}

.diploma-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  padding: 0 40px;
}

.signature-block {
  text-align: center;
}

.signature-text {
  font-family: 'Brush Script MT', cursive, var(--font-display);
  font-size: 24px;
  margin-bottom: 5px;
  color: #1a1210;
}

.signature-line {
  border-top: 1px solid #3a2a22;
  width: 200px;
  padding-top: 5px;
  font-family: var(--font-ui);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
/* --- FIRM MEMO STYLING --- */
.memo-letter {
  background: #fdfbf7;
  color: #1a1210;
  padding: 40px;
  border: 1px solid #d1c7b4;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.05), 0 5px 15px rgba(0,0,0,0.3);
  font-family: var(--font-typewriter);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  position: relative;
  
  /* Sizing and Scrolling */
  max-height: 80vh;
  overflow-y: auto;
  width: 700px;        /* Makes the letter nice and wide! */
  max-width: 90vw;     /* Prevents it from breaking on small screens */
}

.memo-letter::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--danger);
}

.memo-header {
  border-bottom: 2px solid #1a1210;
  padding-bottom: 10px;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
}

.memo-header div {
  margin-bottom: 4px;
}

.memo-body p {
  margin-bottom: 16px;
}

.memo-highlight {
  background: rgba(255, 235, 59, 0.4);
  padding: 2px 4px;
}
@keyframes phaseEntry {
  0% { transform: scaleX(0); opacity: 0; }
  100% { transform: scaleX(1); opacity: 1; }
}


/* ==================== TRIAL PHASES & IMPACT ==================== */
.trial-phase-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  font-family: var(--font-display);
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.phase-content {
  text-align: center;
  border-top: 2px solid var(--brass);
  border-bottom: 2px solid var(--brass);
  padding: 40px 100px;
  background: linear-gradient(90deg, transparent, rgba(186, 171, 113, 0.1), transparent);
  animation: phaseStripe 2s infinite linear;
}

.phase-title {
  font-size: 80px;
  color: var(--parchment);
  letter-spacing: 15px;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(232, 220, 192, 0.5);
  margin: 0;
}

.phase-subtitle {
  font-size: 20px;
  color: var(--danger);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ==================== OBJECTION DUEL PANE ==================== */
.duel-mode .court-columns {
  filter: blur(4px) grayscale(0.5);
  pointer-events: none;
}

.objection-duel-pane {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 600px;
  background: #1a1210;
  border: 2px solid var(--danger);
  box-shadow: 0 0 50px rgba(199, 67, 43, 0.4);
  z-index: 5000;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.duel-header {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--danger);
  letter-spacing: 3px;
  text-align: center;
}

.statement-to-break {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--parchment);
  font-style: italic;
  text-align: center;
  line-height: 1.4;
  padding: 20px;
  background: rgba(0,0,0,0.4);
}

.legal-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.legal-card {
  background: #2a1f1b;
  border: 1px solid var(--brass-dim);
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.legal-card:hover {
  background: var(--danger);
  border-color: var(--parchment);
  transform: translateY(-5px);
}

.legal-card .card-title {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 5px;
}

.legal-card .card-desc {
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Animations */
.fade-out { opacity: 0; }
@keyframes phaseStripe {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ==================== RESPONSE CARDS ==================== */
.response-hand {
  display: flex;
  justify-content: center;
  gap: 15px;
  perspective: 1000px;
  width: 100%;
  padding-top: 10px;
}

.response-card {
  background: #2a1f1b;
  border: 2px solid var(--brass-dim);
  border-radius: 8px;
  padding: 16px;
  width: 240px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;
  display: flex;
  flex-direction: column;
  text-align: left;
  position: relative;
  top: 10px;
}

.response-card:hover:not(:disabled) {
  transform: translateY(-20px) scale(1.05);
  border-color: var(--parchment);
  z-index: 10;
  box-shadow: 0 15px 30px rgba(0,0,0,0.6), 0 0 15px rgba(186, 171, 113, 0.2);
}

.response-card:disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(1);
}

.card-quality {
  font-family: var(--font-display);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: var(--brass);
  border-bottom: 1px solid var(--divider);
  padding-bottom: 4px;
}

.card-text {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--parchment);
  line-height: 1.5;
  flex: 1;
}

.card-req {
  margin-top: 10px;
  font-size: 10px;
  color: var(--danger);
  font-style: italic;
  text-align: center;
}

/* ==================== BUBBLE COLORS ==================== */
.speech-bubble.judge {
  background: #1c1a1f; /* Dark, austere slate */
  border-color: #8a6a3a; /* Brass */
  color: #e0d8c0;
}
.speech-bubble.witness {
  background: #3e3226; /* Warm, dusty brown */
  border-color: #a37b4f;
  color: #fdfbf7;
}

/* ==================== ACTION SPLASH ANIMATIONS ==================== */
.action-splash-container {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}
.action-splash-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(199, 67, 43, 0.8) 0%, rgba(0,0,0,0.9) 100%);
  opacity: 0;
  animation: flashBg 1s ease-out forwards;
}
.action-splash-text {
  position: relative;
  font-family: var(--font-display);
  font-size: 130px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 15px;
  text-shadow: 0 0 40px #ff0000, 8px 8px 0 #000;
  transform: scale(3) rotate(-5deg);
  opacity: 0;
  animation: slamText 1s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes flashBg { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes slamText {
  0% { transform: scale(3) rotate(-5deg); opacity: 0; }
  15% { transform: scale(1) rotate(-5deg); opacity: 1; }
  80% { transform: scale(1.05) rotate(-5deg); opacity: 1; }
  100% { transform: scale(1.5) rotate(-5deg); opacity: 0; }
}

/* ==================== EVIDENCE CLASH PANE ==================== */
.clash-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin: 20px 0;
}
.clash-statement {
  background: rgba(0,0,0,0.5);
  padding: 20px;
  border: 1px solid var(--parchment-dim);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--parchment);
}
.clash-vs {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--danger);
  font-weight: 900;
}
.clash-evidence {
  background: #cce8b5; /* Post-it Green */
  color: #1a1210;
  padding: 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: bold;
  transform: rotate(2deg);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
  border: 1px solid #a8c98f;
}

/* ==================== DUEL RESOLUTION BOXES ==================== */
.duel-resolution-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
  margin: 10px 0;
}

.duel-box {
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--brass-dim);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border-radius: 4px;
}

.duel-box-title {
  font-family: var(--font-display);
  color: var(--danger);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.duel-box-text {
  font-family: var(--font-ui);
  color: var(--parchment);
  font-size: 16px;
  line-height: 1.4;
}

.duel-outcome {
  margin-top: 15px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 4px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.duel-outcome.visible {
  opacity: 1;
  transform: scale(1);
}

.duel-outcome.sustained { color: var(--success, #2a7538); }
.duel-outcome.overruled { color: var(--danger); }

/* ==================== BRIEFCASE / DECK BUILDER ==================== */

.deck-pool {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deck-slot-container {
  background: var(--bg-deep);
  border: 1px solid var(--brass-dim);
  border-radius: 6px;
  padding: 15px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deck-slot {
  background: rgba(0,0,0,0.3);
  border: 1px dashed var(--muted);
  border-radius: 4px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.deck-card {
  background: #cce8b5; /* Post-it Green */
  color: #1a1210;
  padding: 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: bold;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid #8ba870;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deck-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.deck-card.lie {
  background: #e8b5b5; /* Post-it Red */
  border-left-color: #a87070;
}

.deck-card.dead-end {
  background: #e0d8c0; /* Dull Tan */
  border-left-color: #a09880;
}
/* ==================== BRIEFCASE: LEGAL PAD & CORKBOARD ==================== */
.briefcase-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  align-items: start;
}

/* The Yellow Legal Pad */
.legal-pad {
  background: #fdf5c9;
  background-image: repeating-linear-gradient(transparent, transparent 31px, #6cb5e8 32px);
  border: 1px solid #d1c7b4;
  border-radius: 2px 8px 8px 2px;
  padding: 32px 32px 32px 60px;
  position: relative;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
  min-height: 500px;
}
.legal-pad::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 45px;
  width: 2px;
  background: #e88c8c;
}

.legal-pad-header {
  font-family: var(--font-display);
  font-size: 24px;
  color: #1a1210;
  margin-bottom: 20px;
  border-bottom: 2px solid #1a1210;
  padding-bottom: 5px;
}

.legal-pad-q {
  font-family: var(--font-ui);
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
  font-weight: bold;
}
.legal-pad-a {
  font-family: 'Brush Script MT', cursive, var(--font-display);
  font-size: 18px;
  color: #000080; /* Pen blue */
  margin-bottom: 15px;
  line-height: 1.2;
}

/* The Corkboard */
.corkboard {
  background: #3e2723;
  background-image: radial-gradient(#4e342e 10%, transparent 20%), radial-gradient(#4e342e 10%, transparent 20%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  padding: 20px;
  border: 10px solid #2d1c15;
  border-radius: 8px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.8), 5px 5px 15px rgba(0,0,0,0.3);
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

/* Modal Packing Layout */
.packing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
  text-align: left;
}

.packing-pool {
  background: rgba(0,0,0,0.2);
  padding: 15px;
  border-radius: 4px;
  border: 1px solid var(--brass-dim);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.packing-slot {
  background: rgba(0,0,0,0.4);
  border: 1px dashed var(--muted);
  border-radius: 4px;
  min-height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
}
/* ==================== OPENING ARGUMENTS DECK ==================== */
.opening-duel-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 15px;
}

.state-column {
  border-right: 2px solid var(--danger);
  padding-right: 30px;
}

.defense-column {
  padding-left: 10px;
  margin-right: 50px;
}

.stance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.stance-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--brass-dim);
  border-radius: 4px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.stance-card.selected {
  background: var(--bg-panel);
  border-color: var(--brass);
  box-shadow: 0 0 15px rgba(186, 171, 113, 0.2);
}

.stance-title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--parchment);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.stance-desc {
  font-size: 11px;
  color: var(--parchment-dim);
  font-style: italic;
  line-height: 1.3;
}

.stance-effect {
  margin-top: 6px;
  font-size: 10px;
  color: var(--brass-dim);
  font-weight: bold;
  text-transform: uppercase;
}

.tease-slot {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed var(--muted);
  border-radius: 4px;
  padding: 10px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

@keyframes statPopPos { 
  0% { transform: scale(1); color: inherit; } 
  50% { transform: scale(1.4); color: var(--success); text-shadow: 0 0 10px var(--success); } 
  100% { transform: scale(1); color: inherit; } 
}
@keyframes statPopNeg { 
  0% { transform: scale(1); color: inherit; } 
  50% { transform: scale(1.4); color: var(--danger); text-shadow: 0 0 10px var(--danger); } 
  100% { transform: scale(1); color: inherit; } 
}
.stat-pop-pos { animation: statPopPos 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: inline-block; }
.stat-pop-neg { animation: statPopNeg 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: inline-block; }

@keyframes meterDamage {
  0% { filter: brightness(1); }
  50% { filter: brightness(2.5) drop-shadow(0 0 8px #fff); }
  100% { filter: brightness(1); }
}
.meter-flash { animation: meterDamage 0.4s ease-out; }

.bubble-stats {
  opacity: 0;
  transform: translateY(5px);
  animation: statStamp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  animation-delay: 0.6s; /* Wait for the user to read the text */
}
@keyframes statStamp {
  to { opacity: 1; transform: translateY(0); }
}
/* =========================================================================
   ===  PASS 5 — DECK-BUILDER POLISH  ======================================
   =========================================================================
   Adds:
     1. Unified Evidence Card component (.ev-card)
     2. Active Hand at bottom of courtroom (.active-hand)
     3. Full-arena Packing scene (#scene-packing)
     4. Inline Opening Duel (.opening-inline)
     5. Closing Reveal polish (card-flip, score tween)
   
   These are ADDITIVE — old .post-it and .deck-card classes still work
   where not yet migrated. Remove only after audit.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. EVIDENCE CARD — canonical object across all four surfaces
   ------------------------------------------------------------------------- */

.ev-card {
  /* Landscape legal-brief proportions */
  width: 100%;
  max-width: 260px;
  min-height: 96px;
  box-sizing: border-box;
  padding: 10px 12px 10px 24px;
  background: linear-gradient(180deg, #f4ecd4 0%, #e8dcc0 100%);
  color: var(--ink);
  border: 1px solid rgba(26, 18, 16, 0.25);
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.45);
  position: relative;
  cursor: pointer;
  user-select: none;
  transition:
    transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.18s ease,
    opacity 0.2s ease,
    filter 0.2s ease;
  font-family: var(--font-ui);
  line-height: 1.3;
}

/* Left edge source band — colored stripe */
.ev-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: var(--brass);
  border-right: 1px solid rgba(0, 0, 0, 0.15);
}

/* Source band color variants (set by class on the card) */
.ev-card.src-pi::before        { background: #8a6f34; }   /* Brass — PI report */
.ev-card.src-subpoena::before  { background: #6b1f1f; }   /* Carpet red — Court order */
.ev-card.src-police::before    { background: #2c3e50; }   /* Navy — Police file */
.ev-card.src-client::before    { background: #5c3a23; }   /* Wood — Client statement */

/* Source band label (vertical text on the stripe) */
.ev-card-source {
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-typewriter);
  font-size: 7px;
  letter-spacing: 2px;
  color: rgba(244, 236, 212, 0.85);
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
}

/* Status stamp — top-right corner rubber stamp */
.ev-card-stamp {
  position: absolute;
  top: 6px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  transform: rotate(3deg);
  opacity: 0.85;
  white-space: nowrap;
}

.ev-card-stamp .stamp-icon {
  font-size: 11px;
  line-height: 1;
}

/* Status colors — applied to the stamp via card class */
.ev-card.status-true  .ev-card-stamp { color: #2a6b38; }
.ev-card.status-false .ev-card-stamp { color: #a02818; }
.ev-card.status-dead  .ev-card-stamp { color: #6b5a4e; }
.ev-card.status-unverified .ev-card-stamp { color: #8a6a3a; opacity: 0.5; }

/* Card body text */
.ev-card-text {
  font-size: 12.5px;
  color: var(--ink);
  margin-top: 14px; /* leave room for stamp */
  padding-right: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Card title / label (optional, above text) */
.ev-card-title {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brass-dim);
  margin-bottom: 2px;
  margin-top: 14px;
}

.ev-card-title + .ev-card-text { margin-top: 2px; }

/* Footer — cost badge or flavor */
.ev-card-foot {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(26, 18, 16, 0.5);
  letter-spacing: 1px;
}

/* --- State: hover --- */
.ev-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 10px 24px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(201, 154, 73, 0.3);
}

.ev-card:active {
  transform: translateY(-2px) scale(0.98);
  transition-duration: 0.08s;
}

/* --- State: card is in the briefcase deck (packed) --- */
.ev-card.in-deck {
  transform: none;
  opacity: 1;
}

/* --- State: card is "glowing" — currently contradicts the live witness line --- */
.ev-card.glowing {
  animation: evCardGlow 1.2s infinite ease-in-out;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 8px 20px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(212, 162, 76, 0.6),
    0 0 0 2px rgba(212, 162, 76, 0.8);
}

@keyframes evCardGlow {
  0%, 100% {
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.3),
      0 8px 20px rgba(0, 0, 0, 0.5),
      0 0 12px rgba(212, 162, 76, 0.6),
      0 0 0 2px rgba(212, 162, 76, 0.8);
  }
  50% {
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.3),
      0 8px 20px rgba(0, 0, 0, 0.5),
      0 0 24px rgba(212, 162, 76, 0.9),
      0 0 0 3px rgba(212, 162, 76, 1);
  }
}

/* --- State: card is "slamming" — mid-animation to center --- */
.ev-card.slamming {
  animation: evCardSlam 0.6s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
  z-index: 500;
}

@keyframes evCardSlam {
  0%   { transform: translateY(0) scale(1) rotate(0); }
  40%  { transform: translateY(-180px) scale(1.4) rotate(-4deg); }
  100% { transform: translateY(-220px) scale(1.6) rotate(0); opacity: 0; }
}

/* --- State: card has been spent (used in a slam) --- */
.ev-card.spent {
  filter: grayscale(0.7) brightness(0.7);
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ev-card.spent::after {
  content: 'USED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 6px;
  color: rgba(160, 40, 24, 0.7);
  border: 3px solid rgba(160, 40, 24, 0.7);
  padding: 2px 10px;
  pointer-events: none;
}

.ev-card.spent:hover { transform: none; }

/* --- State: FALSE claim — red undertone --- */
.ev-card.status-false {
  background: linear-gradient(180deg, #f0dad3 0%, #e8c8bf 100%);
}

/* --- State: DEAD_END claim — grey undertone --- */
.ev-card.status-dead {
  background: linear-gradient(180deg, #e5e0d1 0%, #d4ccb8 100%);
}

/* --- Size variants --- */
.ev-card.ev-card-sm { min-height: 70px; max-width: 200px; padding: 8px 10px 8px 20px; }
.ev-card.ev-card-sm .ev-card-text { font-size: 11px; margin-top: 10px; }
.ev-card.ev-card-sm .ev-card-stamp { font-size: 8px; padding: 1px 4px; }
.ev-card.ev-card-sm::before { width: 12px; }
.ev-card.ev-card-sm .ev-card-source { width: 12px; font-size: 6px; }


/* -------------------------------------------------------------------------
   2. ACTIVE HAND — card fan at bottom of courtroom
   ------------------------------------------------------------------------- */

.active-hand-wrap {
  position: relative;
  width: 100%;
  padding: 0 20px;
  flex-shrink: 0;
  margin-top: 8px;
}

.active-hand-label {
  text-align: center;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--brass-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.6;
}

.active-hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  min-height: 110px;
  perspective: 1200px;
  padding-bottom: 10px;
  position: relative;
}

/* Cards in the hand sit slightly lower, hover pops them up */
.active-hand .ev-card {
  width: 200px;
  max-width: 200px;
  min-height: 96px;
  transform: translateY(8px);
}

.active-hand .ev-card:hover:not(.spent) {
  transform: translateY(-18px) scale(1.06);
  z-index: 10;
}

/* Fan rotation — cards in hand tilt based on position */
.active-hand .ev-card:nth-child(1) { transform: translateY(8px) rotate(-1.5deg); }
.active-hand .ev-card:nth-child(2) { transform: translateY(8px) rotate(0deg); }
.active-hand .ev-card:nth-child(3) { transform: translateY(8px) rotate(1.5deg); }
.active-hand .ev-card:nth-child(4) { transform: translateY(8px) rotate(-0.75deg); }
.active-hand .ev-card:nth-child(5) { transform: translateY(8px) rotate(0.75deg); }

/* Override rotation on hover so the card feels like it lifts out of the fan */
.active-hand .ev-card:hover:not(.spent) {
  transform: translateY(-18px) scale(1.06) rotate(0deg) !important;
}

.active-hand-empty {
  color: var(--parchment-dim);
  font-style: italic;
  font-size: 13px;
  padding: 32px 0;
  text-align: center;
  width: 100%;
  opacity: 0.7;
}


/* -------------------------------------------------------------------------
   3. PACKING SCENE — full-arena briefcase deckbuilder
   ------------------------------------------------------------------------- */

#scene-packing {
  background: var(--case-bg);
  background-image:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,0.03) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(0,0,0,0.2) 0%, transparent 50%);
  padding: 20px 28px 40px;
  min-height: calc(100vh - 80px);
}

.packing-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
}

.packing-header-left { text-align: left; }
.packing-header-right { text-align: right; }

.packing-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--brass);
  letter-spacing: 2px;
  margin: 0;
}

.packing-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--parchment-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Capacity meter — prominent center element */
.packing-capacity {
  background: var(--bg-deep);
  border: 1px solid var(--brass-dim);
  border-radius: 4px;
  padding: 8px 20px;
  text-align: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.packing-capacity-label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--parchment-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.packing-capacity-count {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--brass);
  letter-spacing: 1px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.packing-capacity-count.full { color: var(--success); }
.packing-capacity-count.flash-full {
  animation: capacityFlash 0.35s ease-out;
}

@keyframes capacityFlash {
  0%   { color: var(--brass); transform: scale(1); }
  40%  { color: var(--danger); transform: scale(1.25); }
  100% { color: var(--brass); transform: scale(1); }
}

/* Stance / narrative preview */
.packing-preview {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--brass);
  padding: 12px 18px;
  margin-bottom: 18px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--parchment-dim);
  font-style: italic;
  line-height: 1.5;
}

.packing-preview-label {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brass);
  font-style: normal;
  margin-bottom: 4px;
}

/* Two-panel layout */
.packing-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  min-height: 500px;
}

.packing-panel {
  background: var(--bg-panel);
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

/* Corkboard panel (left) */
.packing-panel.corkboard {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.15), transparent),
    linear-gradient(180deg, #5a4130 0%, #4a3425 100%);
  border-color: #3a2820;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Briefcase interior panel (right) */
.packing-panel.briefcase-interior {
  background:
    linear-gradient(180deg, #2a1f1a 0%, #1d1510 100%);
  border: 2px solid #1a1210;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
}

.packing-panel-title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 14px;
  text-align: center;
  border-bottom: 1px dashed var(--brass-dim);
}

.corkboard .packing-panel-title { color: var(--parchment); border-bottom-color: rgba(255, 255, 255, 0.2); }
.briefcase-interior .packing-panel-title { color: var(--brass); border-bottom-style: solid; border-bottom-color: rgba(201, 154, 73, 0.2); }

.packing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  align-content: start;
  flex: 1;
}

.corkboard .packing-cards .ev-card:nth-child(odd) { transform: rotate(-0.8deg); }
.corkboard .packing-cards .ev-card:nth-child(even) { transform: rotate(0.6deg); }
.corkboard .packing-cards .ev-card:hover {
  transform: translateY(-4px) rotate(0deg) !important;
}

.packing-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--parchment-dim);
  font-style: italic;
  padding: 60px 20px;
  opacity: 0.6;
}

/* Briefcase slot (empty placeholder) */
.briefcase-slot {
  min-height: 96px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px dashed rgba(201, 154, 73, 0.25);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.briefcase-slot-num {
  font-size: 26px;
  color: rgba(201, 154, 73, 0.3);
  margin-bottom: 2px;
}

.briefcase-slot.available {
  border-color: rgba(201, 154, 73, 0.4);
  background: rgba(201, 154, 73, 0.04);
}

/* Footer actions */
.packing-footer {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.packing-footer .btn { flex: 1; }
.packing-footer .btn-primary { flex: 2; font-size: 17px; letter-spacing: 3px; padding: 14px; }

/* Card-snap animation — plays when card moves from pool to slot or back */
@keyframes cardSnapIn {
  0%   { transform: scale(0.7) translateY(-20px); opacity: 0; }
  60%  { transform: scale(1.08) translateY(4px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.ev-card.snap-in { animation: cardSnapIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275); }


/* -------------------------------------------------------------------------
   4. OPENING DUEL — inline (no longer a modal)
   ------------------------------------------------------------------------- */

.opening-inline {
  padding: 20px 30px;
  max-width: 1200px;
  margin: 0 auto;
  animation: openingEnter 0.5s ease-out;
}

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

.opening-indictment {
  background: linear-gradient(180deg, #3a1a14 0%, #2a1410 100%);
  border: 1px solid var(--danger);
  border-left: 6px solid var(--danger);
  padding: 22px 30px;
  margin-bottom: 28px;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.opening-indictment-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--danger);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 700;
}

.opening-indictment-text {
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.5;
  color: var(--parchment);
  font-style: italic;
}

.opening-indictment-text::before { content: '\201C'; color: var(--danger); font-size: 28px; margin-right: 4px; }
.opening-indictment-text::after  { content: '\201D'; color: var(--danger); font-size: 28px; margin-left: 4px; }

.opening-defense-label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--brass);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 14px;
  font-weight: 700;
}

.opening-defense-sub {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--parchment-dim);
  text-align: center;
  margin-bottom: 20px;
  font-style: italic;
}

/* Stance fan — four cards horizontally */
.opening-stance-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.opening-stance-card {
  background: linear-gradient(180deg, #2a1f1b 0%, #1d1510 100%);
  border: 1.5px solid var(--brass-dim);
  border-radius: 6px;
  padding: 16px 14px;
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  position: relative;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.opening-stance-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--brass-dim);
  border-radius: 6px 6px 0 0;
  transition: background 0.2s ease;
}

.opening-stance-card:hover {
  transform: translateY(-4px);
  border-color: var(--brass);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.opening-stance-card:hover::before { background: var(--brass); }

.opening-stance-card.selected {
  border-color: var(--brass);
  background: linear-gradient(180deg, #3a2a22 0%, #2a1f1b 100%);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.6),
    0 0 0 2px rgba(201, 154, 73, 0.4),
    inset 0 0 20px rgba(201, 154, 73, 0.08);
}

.opening-stance-card.selected::before { background: var(--brass); height: 4px; }

.opening-stance-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--parchment);
  margin-bottom: 8px;
  font-weight: 700;
}

.opening-stance-card.selected .opening-stance-title { color: var(--brass); }

.opening-stance-desc {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--parchment-dim);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}

.opening-stance-effect {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--brass-dim);
  text-transform: uppercase;
  padding-top: 8px;
  border-top: 1px dashed var(--divider);
  line-height: 1.4;
}

/* Tease slots */
.opening-tease {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.opening-tease-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--brass);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 6px;
}

.opening-tease-sub {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--parchment-dim);
  margin-bottom: 12px;
  font-style: italic;
}

.opening-tease-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.opening-tease-slot {
  min-height: 80px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px dashed rgba(201, 154, 73, 0.35);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.opening-tease-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding-top: 10px;
  border-top: 1px dashed var(--divider);
}

.opening-tease-pool .ev-card {
  max-width: 210px;
  min-height: 80px;
}

/* Submit button */
.opening-submit-wrap {
  text-align: center;
  margin-top: 24px;
}

.opening-submit-wrap .btn-primary {
  font-size: 18px;
  letter-spacing: 3px;
  padding: 14px 40px;
}

.opening-submit-wrap .btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* -------------------------------------------------------------------------
   5. CLOSING REVEAL POLISH — card flip + score tween
   ------------------------------------------------------------------------- */

.closing-card {
  perspective: 1000px;
}

.closing-card.flip-in {
  animation: closingCardFlip 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes closingCardFlip {
  0%   { transform: perspective(1000px) rotateY(-90deg) translateX(-40px); opacity: 0; }
  60%  { transform: perspective(1000px) rotateY(10deg) translateX(4px);   opacity: 1; }
  100% { transform: perspective(1000px) rotateY(0) translateX(0);         opacity: 1; }
}

.closing-card-score.tween {
  animation: scoreTween 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scoreTween {
  0%   { transform: scale(0.3); opacity: 0; }
  60%  { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

/* Max-vs-achieved bar */
.closing-score-bar {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--brass-dim);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

.closing-score-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brass-dim), var(--brass));
  width: 0%;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 0 8px rgba(201, 154, 73, 0.5);
}

.closing-score-fill.perfect {
  background: linear-gradient(90deg, #4a8a3a, #7ac967);
  box-shadow: 0 0 12px rgba(122, 201, 103, 0.7);
}

/* Perfect-run banner */
.closing-perfect-banner {
  text-align: center;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 4px;
  color: #7ac967;
  margin-top: 14px;
  padding: 10px;
  border: 2px solid #7ac967;
  background: rgba(122, 201, 103, 0.08);
  border-radius: 4px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.closing-perfect-banner.visible {
  opacity: 1;
  transform: scale(1);
}

/* =========================================================================
   ===  PASS 5B — LAYOUT REVISION  =========================================
   =========================================================================
   - Active Hand moves from bottom fan to right-column vertical stack
   - Transcript compacts under jury (left column)
   - Whole-hand glow during slam opportunities (no per-card hint)
   - Tease popover picker replaces inline pool
   ========================================================================= */

/* -------------------------------------------------------------------------
   Right-column vertical Active Hand (replaces bottom fan)
   ------------------------------------------------------------------------- */

.active-hand-column {
  background: var(--bg-panel);
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 12px 12px 14px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.active-hand-header {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--brass);
  text-transform: uppercase;
  text-align: center;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--brass-dim);
}

/* Vertical stack variant — overrides the bottom-fan .active-hand rules */
.active-hand-vertical {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 2px 4px;
  perspective: none;
}

/* Neutralize the bottom-fan rotations/offsets when in vertical mode */
.active-hand-vertical .ev-card,
.active-hand-vertical .ev-card:nth-child(1),
.active-hand-vertical .ev-card:nth-child(2),
.active-hand-vertical .ev-card:nth-child(3),
.active-hand-vertical .ev-card:nth-child(4),
.active-hand-vertical .ev-card:nth-child(5) {
  transform: none;
  width: 100%;
  max-width: 100%;
  min-height: 86px;
}

.active-hand-vertical .ev-card:hover:not(.spent) {
  transform: translateX(-3px) scale(1.02) !important;
  z-index: 5;
}

/* -------------------------------------------------------------------------
   Compact transcript under the jury box
   ------------------------------------------------------------------------- */

.transcript-compact .transcript-title {
  font-size: 11px;
  padding: 6px 10px;
}

.transcript-compact #transcript-entries {
  font-size: 11px;
}

.transcript-compact .transcript-entry {
  padding: 6px 10px;
}

.transcript-compact .transcript-meta {
  font-size: 9px;
}

.transcript-compact .transcript-quote {
  font-size: 11px;
  line-height: 1.3;
}

/* -------------------------------------------------------------------------
   Whole-hand slam-ready glow
   Subtle amber so the player sees "a slam is available" without
   knowing which card contradicts. They have to reason it out.
   ------------------------------------------------------------------------- */

.ev-card.hand-slam-ready {
  animation: handSlamReady 1.8s infinite ease-in-out;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 6px 16px rgba(0, 0, 0, 0.45),
    0 0 0 1.5px rgba(212, 162, 76, 0.55);
}

@keyframes handSlamReady {
  0%, 100% {
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.3),
      0 6px 16px rgba(0, 0, 0, 0.45),
      0 0 0 1.5px rgba(212, 162, 76, 0.4),
      0 0 8px rgba(212, 162, 76, 0.3);
  }
  50% {
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.3),
      0 6px 16px rgba(0, 0, 0, 0.45),
      0 0 0 1.5px rgba(212, 162, 76, 0.7),
      0 0 14px rgba(212, 162, 76, 0.55);
  }
}

/* -------------------------------------------------------------------------
   Opening tease: clickable empty slots (no inline pool)
   ------------------------------------------------------------------------- */

.opening-tease-slot.is-clickable {
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
}

.opening-tease-slot.is-clickable:hover {
  border-color: var(--brass);
  background: rgba(201, 154, 73, 0.08);
  transform: translateY(-2px);
}

.opening-tease-slot.is-clickable:active {
  transform: translateY(0);
}

.opening-tease-slot .slot-label {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--brass);
}

.opening-tease-slot .slot-hint {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--parchment-dim);
  font-style: italic;
  letter-spacing: 1px;
  text-transform: none;
}

.opening-tease-slot.is-empty-pool {
  cursor: not-allowed;
  opacity: 0.5;
}

.opening-tease-slot.is-empty-pool .slot-label {
  color: var(--muted);
}

/* -------------------------------------------------------------------------
   Tease picker popover
   ------------------------------------------------------------------------- */

.tease-picker {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20000;
  background: linear-gradient(180deg, #2a1f1b 0%, #1d1510 100%);
  border: 2px solid var(--brass);
  border-radius: 6px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 0 100vmax rgba(0, 0, 0, 0.5);
  padding: 20px;
  width: min(720px, 92vw);
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: teasePickerIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes teasePickerIn {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}

.tease-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--brass-dim);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--brass);
  text-transform: uppercase;
}

.tease-picker-close {
  background: transparent;
  border: 1px solid var(--brass-dim);
  color: var(--parchment);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 3px;
  transition: background 0.15s ease, color 0.15s ease;
}

.tease-picker-close:hover {
  background: var(--danger);
  color: var(--parchment);
  border-color: var(--danger);
}

.tease-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 4px;
  flex: 1;
}

/* =========================================================================
   ===  PASS 6 — BRANCHING & FLAG SYSTEM  ==================================
   =========================================================================
   - Foreclosed question/action styling (struck-through, vague label)
   - Angle picker modal (the investigative-theory commitment)
   - Case-flag indicator badge (visible commitment throughout case)
   ========================================================================= */

/* -------------------------------------------------------------------------
   Foreclosed questions (interview)
   ------------------------------------------------------------------------- */

.question-btn.foreclosed {
  background: rgba(0, 0, 0, 0.15);
  border-left-color: var(--muted);
  color: var(--muted);
  font-style: italic;
  text-decoration: line-through;
  text-decoration-color: rgba(var(--muted-rgb, 107, 90, 78), 0.6);
  cursor: not-allowed;
  opacity: 0.55;
  position: relative;
}

.question-btn.foreclosed::before {
  content: 'FORECLOSED';
  position: absolute;
  top: 2px;
  right: 8px;
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--danger);
  opacity: 0.6;
  text-decoration: none;
  font-style: normal;
  pointer-events: none;
}

.question-btn.foreclosed:hover {
  background: rgba(0, 0, 0, 0.15);
  border-left-color: var(--muted);
  transform: none;
}

/* -------------------------------------------------------------------------
   Foreclosed actions (phone, actions tab)
   ------------------------------------------------------------------------- */

.action-card.foreclosed {
  opacity: 0.55;
  filter: grayscale(0.7);
  text-decoration: line-through;
  cursor: not-allowed;
  position: relative;
}

.action-card.foreclosed::after {
  content: 'FORECLOSED';
  position: absolute;
  top: 4px;
  right: 8px;
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--danger);
  opacity: 0.6;
  text-decoration: none;
  pointer-events: none;
}

/* -------------------------------------------------------------------------
   Angle Picker — presented at case start when investigativeAngles defined
   ------------------------------------------------------------------------- */

#modal-container .modal-box:has(.angle-picker) {
  max-width: 1040px !important;
  width: 95%;
  padding: 36px !important;
}

.angle-picker {
  text-align: center;
}

.angle-picker-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--brass);
  letter-spacing: 3px;
  margin: 0 0 6px 0;
}

.angle-picker-sub {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--parchment-dim);
  font-style: italic;
  margin-bottom: 28px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.angle-picker-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.angle-card {
  background: linear-gradient(180deg, #2a1f1b 0%, #1d1510 100%);
  border: 1.5px solid var(--brass-dim);
  border-radius: 6px;
  padding: 22px 20px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition:
    transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.angle-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--brass-dim);
  border-radius: 6px 6px 0 0;
  transition: background 0.2s ease;
}

.angle-card:hover {
  transform: translateY(-4px);
  border-color: var(--brass);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
}

.angle-card:hover::before { background: var(--brass); }

.angle-card.selected {
  border-color: var(--brass);
  background: linear-gradient(180deg, #3a2a22 0%, #2a1f1b 100%);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.6),
    0 0 0 2px rgba(201, 154, 73, 0.45),
    inset 0 0 20px rgba(201, 154, 73, 0.08);
}

.angle-card.selected::before { background: var(--brass); height: 4px; }

.angle-card-label {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--parchment);
  font-weight: 700;
}

.angle-card.selected .angle-card-label { color: var(--brass); }

.angle-card-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--brass-dim);
  text-transform: uppercase;
}

.angle-card-body {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--parchment-dim);
  line-height: 1.5;
  flex: 1;
}

.angle-card-flavor {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--parchment-dim);
  font-style: italic;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px dashed var(--divider);
  line-height: 1.4;
}

.angle-picker-footer {
  text-align: center;
}

.angle-picker-footer .btn-primary {
  font-size: 17px;
  letter-spacing: 3px;
  padding: 14px 40px;
}

.angle-picker-footer .btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* -------------------------------------------------------------------------
   Case-flag indicator — shown in briefcase after angle pick
   (Author can drop a tag to show current committed path.)
   ------------------------------------------------------------------------- */

.case-flag-indicator {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--brass);
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid var(--brass-dim);
  border-radius: 2px;
  background: rgba(201, 154, 73, 0.08);
  margin-top: 4px;
}

.case-flag-indicator::before {
  content: '◆ ';
  color: var(--brass);
}

/* -------------------------------------------------------------------------
   Settle button — alternative exit to a trial
   Sits between Withdraw and Pack. Visually distinct: muted gold-on-dark,
   reads as deliberate rather than primary (that's the trial button's role).
   ------------------------------------------------------------------------- */

.btn.btn-settle {
  background: linear-gradient(180deg, #3a2a22 0%, #2a1f1b 100%);
  border: 1px solid var(--brass);
  color: var(--brass);
  font-family: var(--font-display);
  letter-spacing: 2px;
  position: relative;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.btn.btn-settle::before {
  content: '⚖ ';
  opacity: 0.7;
  margin-right: 3px;
}

.btn.btn-settle:hover {
  background: linear-gradient(180deg, #4a362c 0%, #3a2a22 100%);
  color: var(--parchment);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 154, 73, 0.3);
}

.btn.btn-settle:active {
  transform: translateY(0);
}

/* =========================================================================
   ===  PASS 7 — TOPIC-BASED INTERVIEW UI  =================================
   =========================================================================
   Replaces the flat question list with a topic ledger + active-topic card
   model. Topics group conversational choices; each card represents a beat
   in the interview.
   ========================================================================= */

.topic-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px;
}

/* -------------------------------------------------------------------------
   Topic card (ledger view)
   ------------------------------------------------------------------------- */
.topic-card {
  position: relative;
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-left: 3px solid var(--brass);
  padding: 10px 12px 10px 16px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.topic-card:hover:not(:disabled) {
  background: rgba(201, 154, 73, 0.08);
  transform: translateX(2px);
}

.topic-card:active:not(:disabled) {
  transform: translateX(0);
}

.topic-card-label {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  font-style: italic;
  line-height: 1.3;
}

.topic-card-preview {
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(26, 18, 16, 0.55);
  font-style: italic;
  margin-top: 3px;
  line-height: 1.35;
}

.topic-card-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--brass);
  opacity: 0.5;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.topic-card:hover .topic-card-chevron {
  opacity: 1;
  transform: translateY(-50%) translateX(2px);
}

.topic-card.resolved {
  border-left-color: var(--success, #2a7538);
  opacity: 0.75;
  cursor: pointer;
}

.topic-card.resolved .topic-card-label {
  color: rgba(26, 18, 16, 0.6);
}

.topic-card-resolved-tag {
  font-family: var(--font-typewriter, var(--font-mono));
  font-size: 10px;
  color: var(--success, #2a7538);
  margin-top: 3px;
  padding-left: 4px;
  border-left: 2px solid var(--success, #2a7538);
  font-style: italic;
  line-height: 1.3;
  opacity: 0.9;
}

.topic-card.foreclosed {
  border-left-color: var(--muted, #6b5a4e);
  opacity: 0.5;
  cursor: not-allowed;
}

.topic-card.foreclosed .topic-card-label {
  text-decoration: line-through;
  text-decoration-color: rgba(107, 90, 78, 0.6);
  color: rgba(26, 18, 16, 0.5);
  font-style: italic;
}

/* -------------------------------------------------------------------------
   Active topic card (expanded view — showing choices or resolution)
   ------------------------------------------------------------------------- */
.topic-card-active {
  padding: 4px 4px 8px;
  animation: topicFadeIn 0.25s ease-out;
}

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

.topic-active-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px dashed rgba(26, 18, 16, 0.15);
}

.topic-back-btn {
  background: transparent;
  border: 1px solid rgba(26, 18, 16, 0.2);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-style: italic;
}

.topic-back-btn:hover {
  background: rgba(26, 18, 16, 0.08);
  border-color: rgba(26, 18, 16, 0.4);
}

.topic-active-label {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink);
  flex: 1;
  letter-spacing: 1px;
}

.topic-active-framing {
  font-family: var(--font-ui);
  font-size: 13px;
  color: rgba(26, 18, 16, 0.65);
  font-style: italic;
  padding: 8px 12px;
  margin-bottom: 12px;
  border-left: 2px solid rgba(26, 18, 16, 0.2);
  background: rgba(26, 18, 16, 0.04);
  line-height: 1.5;
}

/* -------------------------------------------------------------------------
   Choice buttons inside an active topic
   ------------------------------------------------------------------------- */
.topic-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topic-choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  background: rgba(201, 154, 73, 0.03);
  border: 1px solid rgba(201, 154, 73, 0.25);
  border-left: 3px solid var(--brass);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  border-radius: 2px;
}

.topic-choice:hover:not(:disabled) {
  background: rgba(201, 154, 73, 0.12);
  border-color: var(--brass);
  transform: translateX(3px);
}

.topic-choice:active:not(:disabled) {
  transform: translateX(1px);
}

.topic-choice-arrow {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--brass);
  flex-shrink: 0;
  line-height: 1.4;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.topic-choice:hover .topic-choice-arrow {
  opacity: 1;
}

.topic-choice-text {
  flex: 1;
  font-style: italic;
}

.topic-choice.foreclosed {
  opacity: 0.45;
  cursor: not-allowed;
  border-left-color: var(--muted, #6b5a4e);
  background: rgba(0, 0, 0, 0.03);
}

.topic-choice.foreclosed .topic-choice-text {
  text-decoration: line-through;
  color: rgba(26, 18, 16, 0.5);
}

.topic-choice.foreclosed .topic-choice-arrow {
  color: var(--muted, #6b5a4e);
  opacity: 0.5;
}

/* -------------------------------------------------------------------------
   Resolved exchange — you + client, shown after a choice is picked
   ------------------------------------------------------------------------- */
.topic-resolved-exchange {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: topicFadeIn 0.3s ease-out;
}

.topic-resolved-line {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 12px;
  border-radius: 2px;
}

.topic-resolved-line.you {
  background: rgba(201, 154, 73, 0.08);
  border-left: 3px solid var(--brass);
}

.topic-resolved-line.client {
  background: rgba(26, 18, 16, 0.04);
  border-left: 3px solid rgba(26, 18, 16, 0.3);
}

.topic-resolved-line .speaker-label {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(26, 18, 16, 0.55);
}

.topic-resolved-line.you .speaker-label {
  color: var(--brass);
}

.topic-resolved-line .speaker-text {
  font-family: var(--font-typewriter, var(--font-ui));
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  font-style: italic;
  min-height: 1em;
}

/* -------------------------------------------------------------------------
   Settle button — appears next to "Pack Briefcase" when a case qualifies.
   Visual weight between a neutral btn and a btn-primary — meaningful but
   not the default action.
   ------------------------------------------------------------------------- */
.btn.btn-settle {
  background: linear-gradient(180deg, #3a2a22 0%, #2a1f1b 100%);
  border: 1px solid var(--brass);
  color: var(--brass);
  font-family: var(--font-display);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 12px;
  padding: 6px 14px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn.btn-settle:hover {
  background: linear-gradient(180deg, #4a3a32 0%, #3a2a22 100%);
  color: var(--parchment);
  box-shadow: 0 0 10px rgba(201, 154, 73, 0.25);
}

/* -------------------------------------------------------------------------
   Actionable post-its — unverified claims are a CTA to use the phone.
   Click the note to auto-open the phone tab and investigate.
   ------------------------------------------------------------------------- */
.post-it.actionable {
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: postItPulse 2.4s ease-in-out infinite;
}

.post-it.actionable:hover {
  transform: translate(-2px, -3px) rotate(-0.3deg);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(201, 154, 73, 0.45);
  animation: none;
}

.post-it.actionable .post-it-cta {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--brass);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(201, 154, 73, 0.4);
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.post-it.actionable:hover .post-it-cta {
  opacity: 1;
}

@keyframes postItPulse {
  0%, 100% {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  }
  50% {
    box-shadow:
      0 4px 10px rgba(0, 0, 0, 0.25),
      0 0 0 1.5px rgba(201, 154, 73, 0.35);
  }
}

/* -------------------------------------------------------------------------
   Highlighted quick-reply — when user clicked an unverified post-it to
   land on this claim, flash the corresponding PI-chat button so they
   know which one to press.
   ------------------------------------------------------------------------- */
.quick-reply-btn.highlighted {
  animation: quickReplyFlash 1.4s ease-in-out 2;
  box-shadow: 0 0 0 2px rgba(168, 203, 244, 0.6), 0 4px 10px rgba(0, 0, 0, 0.3);
}

@keyframes quickReplyFlash {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(168, 203, 244, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(168, 203, 244, 0.9), 0 4px 14px rgba(168, 203, 244, 0.5);
  }
}

/* =========================================================================
   ===  PASS 1b — PER-JUROR MOOD VISUALIZATION  ============================
   =========================================================================
   Five mood tiers for individual jurors. Replaces the old binary
   lean-defense / lean-prosecution scheme.

   Applied on top of the legacy classes (which remain as fallbacks), so
   these rules come AFTER the legacy rules for correct override priority.

   Color intent:
   - convinced:          strong green, bright sheen
   - leaning-defense:    muted green, suggests warmth
   - undecided:          desaturated neutral, slightly cool
   - leaning-prosecution: muted red, suggests doubt
   - hostile:            deep red, sunken
   ========================================================================= */

.juror.mood-convinced {
  background: #4a7c3f;
  box-shadow:
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 0 6px rgba(74, 124, 63, 0.45);
}

.juror.mood-leaning-defense {
  background: #3e6438;
}

.juror.mood-undecided {
  background: #4a4540;
}

.juror.mood-leaning-prosecution {
  background: #6b2a1e;
}

.juror.mood-hostile {
  background: #4a1610;
  box-shadow:
    inset 0 -2px 4px rgba(0, 0, 0, 0.55),
    0 0 6px rgba(74, 22, 16, 0.35);
}

/* Subtle entrance effect when a juror flips mood — tied to the
   transition on .juror's `background`. A faint outline pulse reinforces
   the moment without being distracting. */
.juror {
  transition: background 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.6s ease;
}

/* =========================================================================
   ===  TABBED FOLDER LAYOUT — Overview & Transcript  ======================
   =========================================================================
   Splits the left folder into two tabs. Overview is the always-useful
   reference (intake, angle, settle hint). Transcript houses the running
   dialogue log and is shown on demand.
   ========================================================================= */

.folder-tabs {
  display: flex;
  gap: 2px;
  margin-top: 14px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.folder-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 10px;
  font-family: var(--font-typewriter);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ink-dim);
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.folder-tab:hover {
  color: var(--ink);
}

.folder-tab.active {
  color: var(--ink);
  border-bottom-color: var(--brass);
  background: rgba(201, 154, 73, 0.06);
}

.folder-tab-count {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--brass);
  letter-spacing: 0;
  margin-left: 4px;
}

.folder-panel {
  padding-top: 14px;
  padding-right: 6px;
}

/* -------------------------------------------------------------------------
   Overview panel content
   ------------------------------------------------------------------------- */
.overview-section {
  margin-bottom: 18px;
}

.overview-section:last-child {
  margin-bottom: 4px;
}

.overview-section-title {
  font-family: var(--font-typewriter);
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-bottom: 3px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
}

.overview-intake {
  font-family: var(--font-typewriter);
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.55;
  font-style: italic;
  padding: 2px 0;
}

/* The Angle card — a reinforcing reminder of the commitment */
.overview-angle {
  padding: 10px 12px;
  background: rgba(201, 154, 73, 0.06);
  border-left: 3px solid var(--brass);
  border-radius: 2px;
}

.overview-angle-label {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.3;
}

.overview-angle-subtitle {
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(26, 18, 16, 0.6);
  font-style: italic;
  margin-top: 2px;
}

.overview-angle-flavor {
  font-family: var(--font-typewriter);
  font-size: 12px;
  color: var(--ink);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(201, 154, 73, 0.3);
  line-height: 1.45;
}

.overview-angle-pending {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink-dim);
  font-style: italic;
  padding: 6px 0;
}

/* Settle availability hint — only appears when canSettle() is true */
.overview-settle-hint {
  padding: 10px 12px;
  background: rgba(138, 106, 58, 0.08);
  border: 1px solid rgba(138, 106, 58, 0.3);
  border-radius: 2px;
  animation: settleHintFade 0.4s ease-out;
}

.overview-settle-hint .overview-section-title {
  color: var(--brass);
  border-bottom-color: rgba(201, 154, 73, 0.3);
}

.overview-settle-text {
  font-family: var(--font-typewriter);
  font-size: 12px;
  color: var(--ink);
  font-style: italic;
  line-height: 1.45;
}

@keyframes settleHintFade {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Transcript panel tweaks — the dialogue log already exists but we give
   it more room now that it's on its own tab. */
#folder-panel-transcript .dialogue-log {
  max-height: none;
}

/* =========================================================================
   ===  PASS 2 — VERDICT BANDS + JURY REVEAL  ==============================
   =========================================================================
   Verdict band support: hung-jury uses a muted amber palette to signal
   "neither victory nor defeat." The post-verdict reveal shows the final
   juror grid alongside the hidden aggregate.
   ========================================================================= */

.verdict-title.hung {
  color: var(--brass);
}

/* -------------------------------------------------------------------------
   Post-verdict jury reveal — a meta panel that fades in below the verdict
   text to show the player the hidden state they were navigating by.
   ------------------------------------------------------------------------- */
.verdict-jury-reveal {
  margin-top: 24px;
  padding: 16px 18px;
  background: rgba(26, 18, 16, 0.04);
  border-top: 1px solid rgba(201, 154, 73, 0.2);
  border-bottom: 1px solid rgba(201, 154, 73, 0.2);
  animation: verdictRevealFade 0.8s ease-out 0.6s both;
}

.verdict-jury-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
  margin-bottom: 10px;
}

.verdict-juror-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  max-width: 360px;
  margin: 0 auto 12px;
}

.verdict-juror {
  aspect-ratio: 1;
  background: #3a3530;
  border-radius: 50% 50% 45% 45%;
  box-shadow: inset 0 -1px 3px rgba(0, 0, 0, 0.3);
}

.verdict-juror.mood-convinced          { background: #4a7c3f; box-shadow: inset 0 -1px 3px rgba(0,0,0,0.3), 0 0 4px rgba(74, 124, 63, 0.5); }
.verdict-juror.mood-leaning-defense    { background: #3e6438; }
.verdict-juror.mood-undecided          { background: #4a4540; }
.verdict-juror.mood-leaning-prosecution{ background: #6b2a1e; }
.verdict-juror.mood-hostile            { background: #4a1610; box-shadow: inset 0 -1px 3px rgba(0,0,0,0.55), 0 0 4px rgba(74, 22, 16, 0.4); }

.verdict-jury-aggregate {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-typewriter);
}

.verdict-aggregate-number {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--brass);
  letter-spacing: 2px;
}

.verdict-aggregate-band {
  font-family: var(--font-ui);
  font-size: 12px;
  font-style: italic;
  color: var(--ink-dim);
  letter-spacing: 1px;
}

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

/* -------------------------------------------------------------------------
   Pending retrial — case card variant shown when a prior trial hung.
   Uses an amber palette (same tone family as the HUNG verdict) to signal
   "paused, not finished."
   ------------------------------------------------------------------------- */
.case-card.pending-retrial {
  border-left: 3px solid var(--brass);
  background: linear-gradient(180deg, rgba(201, 154, 73, 0.05), rgba(201, 154, 73, 0.02));
  position: relative;
}

.case-card.pending-retrial:hover {
  background: linear-gradient(180deg, rgba(201, 154, 73, 0.1), rgba(201, 154, 73, 0.05));
  border-left-color: var(--brass);
}

.retrial-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--brass);
  text-transform: uppercase;
  padding: 2px 0;
}

.retrial-note {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--parchment-dim);
  font-style: italic;
  line-height: 1.4;
}

/* =========================================================================
   ===  PI LEAD CAP — investigation budget UI  =============================
   =========================================================================
   Case-opt-in mechanic. When the case declares an investigationBudget,
   the player sees a counter in three places:
     - The phone toggle button (small amber badge)
     - The phone Chat tab header (prominent, above the quick replies)
     - The Case Overview panel (always-visible reference card)

   When leads are exhausted, quick-reply buttons lock out with the
   foreclosed visual vocabulary already established for topics/choices.
   ========================================================================= */

/* Phone-toggle badge — small amber pill attached to the Messages button */
.phone-leads-indicator {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(201, 154, 73, 0.2);
  border: 1px solid var(--brass);
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.phone-leads-indicator.exhausted {
  background: rgba(107, 42, 30, 0.25);
  border-color: var(--danger);
  color: var(--danger);
}

/* Chat-tab header — sits above the quick-reply buttons, always visible */
.pi-budget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin-bottom: 6px;
  background: rgba(201, 154, 73, 0.08);
  border: 1px solid rgba(201, 154, 73, 0.25);
  border-radius: 3px;
  font-family: var(--font-typewriter);
}

.pi-budget-header.exhausted {
  background: rgba(107, 42, 30, 0.15);
  border-color: rgba(107, 42, 30, 0.4);
}

.pi-budget-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--parchment-dim);
}

.pi-budget-header.exhausted .pi-budget-label {
  color: var(--danger);
}

.pi-budget-count {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--brass);
}

.pi-budget-header.exhausted .pi-budget-count {
  color: var(--danger);
}

/* Foreclosed quick-reply (exhausted cap variant) */
.quick-reply-btn.exhausted {
  opacity: 0.4;
  cursor: not-allowed;
  border-style: dashed;
}

.quick-reply-btn.exhausted span,
.quick-reply-btn.exhausted strong {
  text-decoration: line-through;
}

/* Overview panel readout — the reference card */
.overview-budget-section {
  padding: 10px 12px;
  background: rgba(201, 154, 73, 0.04);
  border-left: 3px solid var(--brass);
  border-radius: 2px;
}

.overview-budget-section.exhausted {
  border-left-color: var(--danger);
  background: rgba(107, 42, 30, 0.06);
}

.overview-budget-readout {
  font-family: var(--font-display);
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.3;
}

.overview-budget-count {
  font-size: 22px;
  color: var(--brass);
  letter-spacing: 1px;
}

.overview-budget-section.exhausted .overview-budget-count {
  color: var(--danger);
}

.overview-budget-of {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-dim);
  margin: 0 4px;
  font-style: italic;
}

.overview-budget-total {
  font-size: 18px;
  color: var(--ink);
}

.overview-budget-leads {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-dim);
  font-style: italic;
  margin-left: 6px;
}

.overview-budget-note {
  font-family: var(--font-typewriter);
  font-size: 11px;
  color: var(--ink-dim);
  font-style: italic;
  line-height: 1.4;
}

/* -------------------------------------------------------------------------
   Case-flag indicator badge — small persistent reminder of the committed
   investigative angle, sitting below the client subtitle in the briefcase
   header. Silent when no case has angles; italic-pending when angles
   exist but none picked; labeled brass accent when committed.
   ------------------------------------------------------------------------- */
.case-flag-indicator {
  margin-top: 6px;
  font-family: var(--font-typewriter);
  font-size: 11px;
  letter-spacing: 1.5px;
  min-height: 14px; /* Reserve space even when empty to prevent layout jitter */
  color: var(--parchment-dim);
}

.case-flag-indicator:empty {
  display: none;
}

.case-flag-indicator-prefix {
  color: var(--parchment-dim);
  margin-right: 6px;
}

.case-flag-indicator-label {
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
}

/* -------------------------------------------------------------------------
   Pressable-line hint — after a prosecution line finishes typing, if it
   has a pressedResponse available, we append a subtle trailing indicator
   via a ::after pseudo-element. Reads as "the witness trails off..."
   narratively. Discoverability without telegraphing the exact moment.
   ------------------------------------------------------------------------- */
.prosecution-line.pressable::after {
  content: ' …';
  color: var(--brass);
  font-style: italic;
  opacity: 0.7;
  letter-spacing: 2px;
  margin-left: 2px;
  animation: pressableTellFade 0.6s ease-out;
}

@keyframes pressableTellFade {
  from { opacity: 0; transform: translateX(-3px); }
  to   { opacity: 0.7; transform: translateX(0); }
}