/* ==========================================================================
   ERA 1980s: THE ANALOG ARCHIVE (VOL 1)
   Manila Paper Dossiers, Inked Rubber Stamps, Typewriter Carbon, Polaroids
   ========================================================================== */

.era-1980s,
[data-theme="vol1"] {
  --bg-desktop: #0b0d13;
  --bg-surface: #efe6d5;
  --bg-surface-elevated: #e6dac3;
  --text-primary: #222120;
  --text-secondary: #3d3b38;
  --text-muted: #6b6762;
  --border-color: #cfbe9f;
  --accent: #8b261e;
  --accent-glow: rgba(139, 38, 30, 0.25);
  --danger: #991b1b;
  --warning: #b45309;
  --success: #15803d;
  --highlighter: #e5c158;

  font-family: var(--font-ui);
}

/* Header Override for 1980s */
.era-1980s .app-header,
[data-theme="vol1"] .app-header {
  background: #14110e;
  border-bottom: 2px solid #3d2f23;
  color: #efe6d5;
}

/* High-Contrast Control Buttons for Volume 1 (1980s Analog Archive) */
.era-1980s .ctrl-btn,
[data-theme="vol1"] .ctrl-btn,
.era-1980s #btn-agent-manual,
[data-theme="vol1"] #btn-agent-manual,
.era-1980s #btn-install-pwa,
[data-theme="vol1"] #btn-install-pwa,
.era-1980s #btn-toggle-audio,
[data-theme="vol1"] #btn-toggle-audio {
  color: #1a140e !important;
  border: 1px solid #5c432d !important;
  background: #d4a373 !important;
  font-weight: 700 !important;
  font-family: var(--font-federal), sans-serif !important;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.era-1980s .ctrl-btn span,
[data-theme="vol1"] .ctrl-btn span,
.era-1980s #btn-agent-manual span,
[data-theme="vol1"] #btn-agent-manual span,
.era-1980s #btn-install-pwa span,
[data-theme="vol1"] #btn-install-pwa span,
.era-1980s #btn-toggle-audio span,
[data-theme="vol1"] #btn-toggle-audio span {
  color: #1a140e !important;
  font-weight: 700 !important;
}

.era-1980s .ctrl-btn:hover,
[data-theme="vol1"] .ctrl-btn:hover,
.era-1980s #btn-agent-manual:hover,
[data-theme="vol1"] #btn-agent-manual:hover,
.era-1980s #btn-install-pwa:hover,
[data-theme="vol1"] #btn-install-pwa:hover,
.era-1980s #btn-toggle-audio:hover,
[data-theme="vol1"] #btn-toggle-audio:hover {
  background: #e5b98a !important;
  border-color: #1a140e !important;
  color: #000000 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.era-1980s .ctrl-btn:hover span,
[data-theme="vol1"] .ctrl-btn:hover span,
.era-1980s #btn-agent-manual:hover span,
[data-theme="vol1"] #btn-agent-manual:hover span,
.era-1980s #btn-install-pwa:hover span,
[data-theme="vol1"] #btn-install-pwa:hover span,
.era-1980s #btn-toggle-audio:hover span,
[data-theme="vol1"] #btn-toggle-audio:hover span {
  color: #000000 !important;
}

/* Vault Overview button in 1980s */
.era-1980s .ctrl-btn.btn-vault,
[data-theme="vol1"] .ctrl-btn.btn-vault,
.era-1980s #btn-vault-overview,
[data-theme="vol1"] #btn-vault-overview {
  background: rgba(43, 30, 20, 0.95) !important;
  border: 1px solid #926a45 !important;
  color: #e5c158 !important;
}

.era-1980s .ctrl-btn.btn-vault span,
[data-theme="vol1"] .ctrl-btn.btn-vault span,
.era-1980s #btn-vault-overview span,
[data-theme="vol1"] #btn-vault-overview span {
  color: #e5c158 !important;
  font-weight: 700 !important;
}

.era-1980s .ctrl-btn.btn-vault:hover,
[data-theme="vol1"] .ctrl-btn.btn-vault:hover,
.era-1980s #btn-vault-overview:hover,
[data-theme="vol1"] #btn-vault-overview:hover {
  background: rgba(65, 45, 30, 0.98) !important;
  border-color: #e5c158 !important;
  color: #ffffff !important;
}

.era-1980s .ctrl-btn.btn-vault:hover span,
[data-theme="vol1"] .ctrl-btn.btn-vault:hover span,
.era-1980s #btn-vault-overview:hover span,
[data-theme="vol1"] #btn-vault-overview:hover span {
  color: #ffffff !important;
}

/* Sanctum Secondary Buttons for Volume 1 */
.era-1980s .sanctum-secondary-btn,
[data-theme="vol1"] .sanctum-secondary-btn,
.era-1980s #btn-sanctum-manual,
[data-theme="vol1"] #btn-sanctum-manual,
.era-1980s #btn-sanctum-pwa,
[data-theme="vol1"] #btn-sanctum-pwa {
  background: rgba(36, 24, 16, 0.9) !important;
  border: 1px solid #7c583a !important;
  color: #f5eedf !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.era-1980s .sanctum-secondary-btn span,
[data-theme="vol1"] .sanctum-secondary-btn span,
.era-1980s #btn-sanctum-manual span,
[data-theme="vol1"] #btn-sanctum-manual span,
.era-1980s #btn-sanctum-pwa span,
[data-theme="vol1"] #btn-sanctum-pwa span {
  color: #f5eedf !important;
}

.era-1980s .sanctum-secondary-btn:hover,
[data-theme="vol1"] .sanctum-secondary-btn:hover,
.era-1980s #btn-sanctum-manual:hover,
[data-theme="vol1"] #btn-sanctum-manual:hover,
.era-1980s #btn-sanctum-pwa:hover,
[data-theme="vol1"] #btn-sanctum-pwa:hover {
  background: rgba(56, 38, 25, 0.98) !important;
  border-color: #d4a373 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(212, 163, 115, 0.45);
}

.era-1980s .sanctum-secondary-btn:hover span,
[data-theme="vol1"] .sanctum-secondary-btn:hover span,
.era-1980s #btn-sanctum-manual:hover span,
[data-theme="vol1"] #btn-sanctum-manual:hover span,
.era-1980s #btn-sanctum-pwa:hover span,
[data-theme="vol1"] #btn-sanctum-pwa:hover span {
  color: #ffffff !important;
}

/* Primary PWA button contrast in 1980s */
.era-1980s .pwa-primary-install-btn,
[data-theme="vol1"] .pwa-primary-install-btn {
  background: #8b261e !important;
  color: #ffffff !important;
  border: 1px solid #b91c1c !important;
}

.era-1980s .pwa-primary-install-btn:hover,
[data-theme="vol1"] .pwa-primary-install-btn:hover {
  background: #a82e24 !important;
  color: #ffffff !important;
}

.era-1980s .brand-titles h1,
[data-theme="vol1"] .brand-titles h1 {
  font-family: var(--font-federal);
  letter-spacing: 0.08em;
  color: #f5eedf;
}

.era-1980s .case-nav-bar,
[data-theme="vol1"] .case-nav-bar,
.era-1980s #case-selector-bar,
[data-theme="vol1"] #case-selector-bar {
  /* #case-selector-bar in base.css's shared rule has id-level specificity that
     otherwise beats this class-based override outright, silently forcing every
     era's case-files bar back to the generic --bg-surface-elevated color. */
  background: #1a1512;
  border-bottom: 2px solid #3d2f23;
}

.era-1980s .case-nav-label,
[data-theme="vol1"] .case-nav-label {
  font-family: var(--font-federal);
  letter-spacing: 0.08em;
  color: #d4c5ab;
}

.era-1980s .section-title,
[data-theme="vol1"] .section-title {
  color: #efe6d5;
  font-family: var(--font-federal);
  letter-spacing: 0.05em;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

/* .timeline-module and .hint-panel-module opt into the theme's own card
   surface (var(--bg-surface), the same light manila cream as this light
   section-title color above) instead of staying on the page's dark
   background like every other section — making the heading render at a
   2.06:1 ratio, effectively invisible but for its drop shadow. */
.era-1980s .timeline-module .section-title,
[data-theme="vol1"] .timeline-module .section-title,
.era-1980s .hint-panel-module .section-title,
[data-theme="vol1"] .hint-panel-module .section-title {
  color: var(--text-primary);
  text-shadow: none;
}

.era-1980s .section-badge,
[data-theme="vol1"] .section-badge {
  background: #2c2017;
  color: #e5c158;
  border: 1px solid #554332;
  font-family: var(--font-typewriter);
  font-weight: 700;
}

.era-1980s .case-chip,
[data-theme="vol1"] .case-chip {
  background: #2b211a;
  color: #d4c5ab;
  border: 1px solid #4a3a2d;
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.era-1980s .case-chip.active,
[data-theme="vol1"] .case-chip.active {
  background: #8b261e;
  border-color: #b91c1c;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 38, 30, 0.4);
}

/* Manila Folder Styling for Cards */
.era-1980s .case-briefing-card,
.era-1980s .suspect-card,
.era-1980s .clue-card,
.era-1980s .timeline-module,
.era-1980s .gatekeeper-card,
.era-1980s .modal-window:not(.manual-window):not(.pwa-modal-window),
[data-theme="vol1"] .case-briefing-card,
[data-theme="vol1"] .suspect-card,
[data-theme="vol1"] .clue-card,
[data-theme="vol1"] .timeline-module,
[data-theme="vol1"] .gatekeeper-card,
[data-theme="vol1"] .modal-window:not(.manual-window):not(.pwa-modal-window) {
  background: #efe6d5;
  color: #1a1918;
  border: 2px solid #cfbe9f;
  box-shadow: 4px 6px 20px rgba(0, 0, 0, 0.55);
  position: relative;
  border-radius: 4px;
}

.era-1980s .case-briefing-card,
[data-theme="vol1"] .case-briefing-card {
  border-top: 30px solid #e0d0b4;
}

.era-1980s .case-briefing-card::after,
[data-theme="vol1"] .case-briefing-card::after {
  content: "📁 CONFIDENTIAL INVESTIGATION DOSSIER — OFFICIAL RECORD";
  position: absolute;
  top: -24px;
  left: 24px;
  font-family: var(--font-federal);
  font-size: 0.75rem;
  font-weight: 700;
  color: #8b261e;
  letter-spacing: 0.12em;
}

/* Brass Paperclip Accent — sits over the card's top-left corner. Was at
   left:32px, which overlaps the start of the header title text (name/case
   title begins right after the card's own padding, around the same x
   position) at every width, not just narrow ones. Moved into the corner
   margin and given pointer-events:none so it never blocks the title
   underneath even if a future tweak brings it back into that range. */
.era-1980s .case-briefing-card::before,
.era-1980s .suspect-card::before,
[data-theme="vol1"] .case-briefing-card::before,
[data-theme="vol1"] .suspect-card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 10px;
  width: 14px;
  height: 38px;
  border: 3px solid #8c8275;
  border-radius: 8px;
  background: transparent;
  z-index: 10;
  pointer-events: none;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.era-1980s .case-title,
[data-theme="vol1"] .case-title {
  font-family: var(--font-stamp);
  color: #1a1918;
  letter-spacing: 0.02em;
}

.era-1980s .case-synopsis-text,
[data-theme="vol1"] .case-synopsis-text {
  font-family: var(--font-typewriter);
  font-size: 0.88rem;
  color: #242220;
  line-height: 1.6;
}

.era-1980s .victim-dossier,
[data-theme="vol1"] .victim-dossier {
  background: #e4d7be;
  border-left: 5px solid #8b261e;
}

.era-1980s .suspect-avatar,
[data-theme="vol1"] .suspect-avatar {
  background: #dfd0b5;
  border: 2px solid #b8a686;
  color: #8b261e;
  font-family: var(--font-stamp);
}

.era-1980s .clue-type-badge,
[data-theme="vol1"] .clue-type-badge {
  background: #dfd0b5;
  color: #8b261e;
  border: 1px solid #c4b292;
  font-family: var(--font-typewriter);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.era-1980s .clue-inspect-btn,
[data-theme="vol1"] .clue-inspect-btn {
  background: #e4d7be;
  border: 2px solid #8b261e;
  color: #8b261e;
  font-family: var(--font-federal);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.era-1980s .clue-inspect-btn:hover,
[data-theme="vol1"] .clue-inspect-btn:hover {
  background: #8b261e;
  color: #efe6d5;
}

/* ==========================================================================
   VOL 1: AUTHENTIC INKED RUBBER STAMP EVIDENCE TAGS
   ========================================================================== */
.era-1980s .clue-tag-picker,
[data-theme="vol1"] .clue-tag-picker {
  display: flex !important;
  gap: 0.4rem;
  width: 100% !important;
  box-sizing: border-box !important;
}

.era-1980s .tag-btn,
[data-theme="vol1"] .tag-btn {
  font-family: var(--font-stamp);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.4rem;
  border: 2px solid #a39580;
  background: #dfd2bd;
  color: #55504a;
  border-radius: 2px;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.15);
  transition: all 0.15s ease;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.era-1980s .tag-btn:hover,
[data-theme="vol1"] .tag-btn:hover {
  transform: scale(1.05);
  border-color: #6b6357;
  color: #1a1918;
}

.era-1980s .tag-btn.tag-relevant.active,
[data-theme="vol1"] .tag-btn.tag-relevant.active {
  background: #fdf2f2;
  border: 2px solid #8b261e;
  color: #8b261e;
  box-shadow: inset 0 0 6px rgba(139, 38, 30, 0.25), 1px 2px 4px rgba(0,0,0,0.2);
  transform: rotate(-2.5deg);
}

.era-1980s .tag-btn.tag-suspicious.active,
[data-theme="vol1"] .tag-btn.tag-suspicious.active {
  background: #fefce8;
  border: 2px solid #b45309;
  color: #b45309;
  box-shadow: inset 0 0 6px rgba(180, 83, 9, 0.25), 1px 2px 4px rgba(0,0,0,0.2);
  transform: rotate(2deg);
}

.era-1980s .tag-btn.tag-discarded.active,
[data-theme="vol1"] .tag-btn.tag-discarded.active {
  background: #f1f5f9;
  border: 2px dashed #64748b;
  color: #64748b;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
  transform: rotate(-1.5deg);
}

/* ==========================================================================
   VOL 1: POLAROID PHOTO ENGINE
   Instant film with wide white bottom chin & yellow date stamp
   ========================================================================== */
.era-1980s .victim-photo-card,
[data-theme="vol1"] .victim-photo-card {
  background: #fdfdfd;
  padding: 8px 8px 24px 8px;
  border: 1px solid #d4c5ab;
  border-radius: 2px;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.35);
  transform: rotate(-0.75deg);
  transition: transform 0.2s ease;
}

.era-1980s .victim-photo-card:hover,
[data-theme="vol1"] .victim-photo-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.era-1980s .mugshot-wrapper,
[data-theme="vol1"] .mugshot-wrapper {
  background-color: #1a1d24;
  background-image: 
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0px, rgba(255, 255, 255, 0.07) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.15) 0px, rgba(255, 255, 255, 0.15) 2px, transparent 2px, transparent 72px);
  border: 1px solid #4a3d31;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.era-1980s .mugshot-booking-strip,
[data-theme="vol1"] .mugshot-booking-strip {
  background: #111317;
  border-top: 2px solid #3d3023;
  color: #f5eedf;
  font-family: var(--font-mono);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.7);
}

/* 1980s Polaroid Evidence Card Styling */
.era-1980s .clue-polaroid-frame,
[data-theme="vol1"] .clue-polaroid-frame {
  background: #faf7f2 !important;
  border: 1px solid #d4c5ab !important;
  box-shadow: 3px 6px 16px rgba(0, 0, 0, 0.35) !important;
  padding-bottom: 1.5rem !important;
  position: relative !important;
  transform: rotate(-0.5deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.era-1980s .clue-polaroid-frame:hover,
[data-theme="vol1"] .clue-polaroid-frame:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45) !important;
}

.polaroid-stamp-date {
  font-family: var(--font-typewriter);
  font-size: 0.72rem;
  font-weight: 800;
  color: #b45309;
  background: rgba(254, 240, 138, 0.95);
  border: 1px solid #ca8a04;
  display: inline-block;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.08em;
  margin-top: 0.6rem;
  transform: rotate(-1.5deg);
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.3);
}

/* Red Confidential Stamp Accent */
.era-1980s .confidential-stamp,
[data-theme="vol1"] .confidential-stamp {
  display: inline-block;
  font-family: var(--font-stamp);
  font-size: 0.95rem;
  font-weight: 900;
  color: #8b261e;
  border: 3px solid #8b261e;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transform: rotate(-4deg);
  box-shadow: inset 0 0 4px rgba(139, 38, 30, 0.3);
}

/* Yellow Highlighter effect */
.era-1980s .highlight-text,
[data-theme="vol1"] .highlight-text {
  background: linear-gradient(104deg, rgba(229, 193, 88, 0) 0.9%, rgba(229, 193, 88, 0.85) 2.4%, rgba(229, 193, 88, 0.6) 98%);
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

/* Handwritten Notes Accent */
.era-1980s .handwritten-marginalia,
[data-theme="vol1"] .handwritten-marginalia {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: #1d3557;
  transform: rotate(-1.5deg);
  line-height: 1.2;
}

/* ==========================================================================
   VOL 1: GATEKEEPER JUDICIAL WARRANT STYLING (MANILA LEGAL DOCKET)
   ========================================================================== */
.era-1980s .gatekeeper-card,
[data-theme="vol1"] .gatekeeper-card {
  border: 3px solid #8b261e;
  border-top: 28px solid #a83228;
  background: #f7efe1;
}

.era-1980s .gatekeeper-card::after,
[data-theme="vol1"] .gatekeeper-card::after {
  content: "⚖️ FORMAL JUDICIAL PROBABLE CAUSE DOCKET — MAGISTRATE WARRANT";
  position: absolute;
  top: -22px;
  left: 20px;
  font-family: var(--font-federal);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.12em;
}

.era-1980s .gatekeeper-header h2,
[data-theme="vol1"] .gatekeeper-header h2 {
  font-family: var(--font-federal);
  color: #1c1917;
  letter-spacing: 0.05em;
}

.era-1980s .gk-seal-badge,
[data-theme="vol1"] .gk-seal-badge {
  background: #e8d9bf;
  border: 1px solid #8b261e;
  color: #8b261e;
  font-family: var(--font-stamp);
}

.era-1980s .gatekeeper-phase-box,
[data-theme="vol1"] .gatekeeper-phase-box {
  background: #efe5d1;
  border: 1px solid #d4c5ab;
}

.era-1980s .gk-select,
[data-theme="vol1"] .gk-select {
  background: #fcf9f2;
  border: 1px solid #a89982;
  color: #1f1e1c;
  font-family: var(--font-ui);
}

.era-1980s .gk-select:focus,
[data-theme="vol1"] .gk-select:focus {
  border-color: #8b261e;
  box-shadow: 0 0 0 2px rgba(139, 38, 30, 0.25);
}

.era-1980s .gatekeeper-submit-btn,
[data-theme="vol1"] .gatekeeper-submit-btn {
  background: #8b261e;
  color: #fdfbf7;
  border: 1px solid #661812;
  box-shadow: 0 3px 10px rgba(139, 38, 30, 0.35);
}

.era-1980s .gatekeeper-submit-btn:hover,
[data-theme="vol1"] .gatekeeper-submit-btn:hover {
  background: #a83228;
}

/* Polaroid Evidence Viewer (clue-viewer.js createPolaroidMagnifier): these classes
   had zero CSS anywhere, so the lens (position:absolute, styled below) positioned
   itself against the nearest OTHER positioned ancestor it could find (the modal
   window), floating over the header instead of the photo. */
.polaroid-container {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.polaroid-photo-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #f8f5ee;
  border: 1px solid #d4c5ab;
  border-radius: 2px;
  padding: 14px 14px 40px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.polaroid-photo-content {
  position: relative;
  width: 100%;
  height: 300px;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
}

.polaroid-evidence-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-fallback-vector {
  display: none;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

/* Draggable Magnifying Glass Lens */
.magnifier-lens {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 4px solid #c49a45; /* Brass rim */
  box-shadow: 0 0 15px rgba(0,0,0,0.6), inset 0 0 20px rgba(255,255,255,0.4);
  cursor: grab;
  z-index: 30;
  pointer-events: auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: brightness(1.25) contrast(1.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.magnifier-lens:active {
  cursor: grabbing;
}

.magnifier-handle {
  position: absolute;
  bottom: -35px;
  right: -35px;
  width: 16px;
  height: 60px;
  background: linear-gradient(to right, #4a2e18, #2e1a0b);
  border: 2px solid #c49a45;
  border-radius: 4px;
  transform: rotate(-45deg);
}

.magnified-secret-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: #8b261e;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.35rem;
  border-radius: 3px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Analog Cassette Reel Player */
.cassette-player-box {
  background: #3b3024;
  border: 4px solid #5a4b3c;
  border-radius: 8px;
  padding: 1.25rem;
  color: #efe6d5;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.6);
}

.cassette-tape-body {
  background: #1e1913;
  border: 2px solid #4a3e30;
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 1rem;
  position: relative;
}

.tape-reel {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px dashed #d4c5ab;
  background: #110e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: none;
}

.tape-reel.spinning {
  animation: spinReel 2s linear infinite;
}

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

.tape-window {
  width: 90px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid #5a4b3c;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: #e5c158;
}

.cassette-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.cassette-btn {
  padding: 0.6rem 1.1rem;
  background: #2b231a;
  border: 2px solid #5a4b3c;
  color: #efe6d5;
  font-family: var(--font-typewriter);
  font-weight: 700;
  border-radius: 4px;
  transition: var(--transition);
  min-height: 44px;
}

.cassette-btn:hover, .cassette-btn.active {
  background: #8b261e;
  border-color: #a83228;
  color: #fff;
}

/* ==========================================================================
   VOL 1: THE ANALOG PINBOARD & RUBBER STAMP DEDUCTION SYSTEM
   ========================================================================== */

.pinboard-container {
  position: relative;
  width: 100%;
  border: 12px solid #5a3825;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7), inset 0 0 40px rgba(0,0,0,0.6);
  overflow: hidden;
  padding: 24px;
  box-sizing: border-box;
  background: #8a5732;
  min-height: 580px;
}

.cork-texture-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.92;
  background-color: #8c5b36;
  background-image: 
    radial-gradient(#6d4122 15%, transparent 16%), 
    radial-gradient(#9e683f 15%, transparent 16%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  z-index: 1;
  pointer-events: none;
}

.pinboard-brass-tacks {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 4;
}

.pinboard-brass-tacks .tack {
  position: absolute;
  font-size: 1.5rem;
  filter: drop-shadow(2px 3px 2px rgba(0,0,0,0.7));
}

.pinboard-brass-tacks .tack-tl { top: 6px; left: 6px; }
.pinboard-brass-tacks .tack-tr { top: 6px; right: 6px; }
.pinboard-brass-tacks .tack-bl { bottom: 6px; left: 6px; }
.pinboard-brass-tacks .tack-br { bottom: 6px; right: 6px; }

.pinboard-svg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
}

.pinboard-red-thread {
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.7));
}

.pinboard-header {
  position: relative;
  z-index: 5;
  text-align: center;
  margin-bottom: 22px;
  background: rgba(239, 230, 213, 0.96);
  padding: 14px 20px;
  border: 2px solid #cfbe9f;
  border-radius: 4px;
  box-shadow: 2px 4px 14px rgba(0,0,0,0.4);
}

.pinboard-header-tag {
  font-family: var(--font-federal);
  font-size: 0.72rem;
  font-weight: 800;
  color: #8b261e;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pinboard-title {
  font-family: var(--font-federal);
  font-size: 1.6rem;
  color: #1a1918;
  margin: 4px 0 6px 0;
  letter-spacing: 0.04em;
}

.pinboard-subtitle {
  font-size: 0.85rem;
  color: #443e37;
  margin: 0;
  line-height: 1.45;
}

.pinboard-columns {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 24px;
}

@media (max-width: 860px) {
  .pinboard-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .pinboard-bottom-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .wooden-stamp-btn {
    width: 100%;
    justify-content: center;
  }
}

.pinboard-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pinboard-col-title {
  font-family: var(--font-federal);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #efe6d5;
  text-shadow: 1px 1px 3px #000;
  padding: 5px 10px;
  background: rgba(20, 14, 10, 0.75);
  border-left: 3px solid #b91c1c;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pinboard-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pinboard-card {
  position: relative;
  background: #efe6d5;
  border: 1px solid #cfbe9f;
  border-radius: 3px;
  padding: 12px 14px;
  box-shadow: 3px 5px 12px rgba(0,0,0,0.45);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  color: #1a1918;
  user-select: none;
  box-sizing: border-box;
}

.pinboard-card:hover {
  transform: translateY(-2px) rotate(-0.5deg);
  box-shadow: 4px 8px 16px rgba(0,0,0,0.6);
}

.pinboard-card.active-pinned {
  border: 2px solid #b91c1c;
  box-shadow: 0 0 16px rgba(185, 28, 28, 0.65), 3px 6px 14px rgba(0,0,0,0.5);
  background: #fdfaf4;
  transform: translateY(-2px);
}

.pin-anchor {
  position: absolute;
  top: -12px;
  right: 14px;
  z-index: 6;
  font-size: 1.35rem;
  filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.6));
  transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.active-pinned .pin-anchor {
  transform: scale(1.3) translateY(-2px);
  filter: drop-shadow(0 0 8px #ef4444);
}

.pin-card-photo-wrap {
  width: 100%;
  height: 85px;
  overflow: hidden;
  border-radius: 2px;
  background: #110e0b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #8c8275;
}

.pin-card-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pin-photo-fallback {
  color: #a39580;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pin-card-name {
  font-family: var(--font-federal);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #1a1918;
  margin-bottom: 2px;
}

.pin-card-role {
  font-size: 0.78rem;
  font-style: italic;
  color: #665e55;
}

.pin-card-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b261e;
  background: rgba(139, 38, 30, 0.12);
  border: 1px solid rgba(139, 38, 30, 0.25);
  padding: 2px 6px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 6px;
}

.pin-card-desc {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #2d2a26;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

/* Pinboard Bottom Bar & Wooden Stamp */
.pinboard-bottom-bar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(18, 12, 8, 0.75);
  padding: 14px 20px;
  border-radius: 4px;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
  border: 1px solid #5a3825;
}

.pinboard-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pinboard-btn-reset {
  background: #dfd2bd;
  border: 2px solid #8c8275;
  color: #2b231a;
  font-family: var(--font-federal);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.3);
}

.pinboard-btn-reset:hover {
  background: #efe6d5;
  border-color: #5a4b3c;
  transform: translateY(-1px);
}

.pinboard-status-hint {
  color: #d4c5ab;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.pinboard-status-hint strong {
  color: #facc15;
}

.wooden-stamp-btn {
  background: linear-gradient(135deg, #7c3f20, #4a2411);
  border: 3px solid #2d1408;
  border-radius: 6px;
  color: #efe6d5;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.2s ease, filter 0.2s ease;
  user-select: none;
}

.wooden-stamp-btn:disabled,
.wooden-stamp-btn.stamp-locked {
  opacity: 0.42;
  filter: grayscale(0.85);
  cursor: not-allowed !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transform: none !important;
  pointer-events: auto;
}

.wooden-stamp-btn:disabled:hover,
.wooden-stamp-btn.stamp-locked:hover {
  background: linear-gradient(135deg, #7c3f20, #4a2411);
  transform: none !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.wooden-stamp-btn.stamp-ready {
  opacity: 1;
  filter: none;
  cursor: pointer;
  animation: stampReadyPulse 2s ease-in-out infinite;
}

@keyframes stampReadyPulse {
  0%, 100% {
    box-shadow: 0 6px 18px rgba(0,0,0,0.7), 0 0 12px rgba(220, 38, 38, 0.45);
  }
  50% {
    box-shadow: 0 8px 24px rgba(0,0,0,0.85), 0 0 22px rgba(239, 68, 68, 0.75);
  }
}

.wooden-stamp-btn:hover:not(:disabled):not(.stamp-locked) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.85);
  background: linear-gradient(135deg, #8f4a27, #5c2d16);
}

.wooden-stamp-btn:active,
.wooden-stamp-btn.stamp-pressed {
  transform: translateY(3px) scale(0.97);
  box-shadow: 0 2px 6px rgba(0,0,0,0.9);
}

.stamp-knob {
  font-size: 1.8rem;
  filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.6));
}

.stamp-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.stamp-primary {
  font-family: var(--font-stamp);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fef08a;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.stamp-subtext {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #d4c5ab;
  letter-spacing: 0.04em;
}

/* Rubber Stamp Mark Animation & Physical Texture */
@keyframes stampDrop {
  0% {
    opacity: 0;
    transform: scale(2.6) rotate(-14deg);
    filter: blur(4px);
  }
  65% {
    opacity: 0.95;
    transform: scale(0.96) rotate(-3.8deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-3.5deg);
  }
}

.animate-stamp-drop {
  animation: stampDrop 0.38s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.physical-rubber-stamp-mark {
  position: absolute;
  top: 42%;
  left: 50%;
  margin-left: -180px;
  margin-top: -65px;
  z-index: 20;
  border: 5px solid #8b261e;
  padding: 14px 24px;
  border-radius: 6px;
  color: #8b261e;
  background: rgba(254, 242, 242, 0.94);
  box-shadow: 0 10px 35px rgba(0,0,0,0.75);
  text-align: center;
  pointer-events: none;
  width: 360px;
  box-sizing: border-box;
  transform: rotate(-3.5deg);
}

.physical-rubber-stamp-mark.stamped-certified {
  position: static;
  margin: 0 auto 1.5rem auto;
  pointer-events: auto;
}

.stamp-border {
  border: 2px dashed #8b261e;
  padding: 8px 12px;
}

.stamp-stars {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: #8b261e;
  margin-bottom: 2px;
}

.stamp-title {
  font-family: var(--font-stamp);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stamp-sub {
  font-family: var(--font-typewriter);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-top: 3px;
}

.stamp-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #555;
  margin-top: 4px;
}

.pinboard-feedback {
  position: relative;
  z-index: 6;
  margin-top: 14px;
  display: none;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.pinboard-feedback.error {
  background: rgba(254, 226, 226, 0.95);
  color: #991b1b;
  border: 2px solid #ef4444;
}

.pinboard-solved-content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 30px 20px;
}

.pinboard-solved-memo {
  background: rgba(239, 230, 213, 0.96);
  padding: 24px;
  border: 2px solid #cfbe9f;
  border-radius: 4px;
  max-width: 650px;
  margin: 0 auto;
  box-shadow: 2px 4px 15px rgba(0,0,0,0.4);
}

.pinboard-solved-memo h3 {
  font-family: var(--font-federal);
  font-size: 1.25rem;
  color: #8b261e;
  margin-bottom: 12px;
}

.pinboard-solved-memo p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #2b231a;
  margin: 6px 0;
}

