/* ==========================================================================
   ART BIGDATA STYLES - MUSEUM & GALLERY QUALITY
   Project: Канал Памяти (Canal of Memory)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. RESET & BASE
   -------------------------------------------------------------------------- */

:root {
  /* Using existing CSS custom properties from map.html */
}

/* Custom Scrollbar - Sleek Archival Styling across all stages, popups, and drawers */
.art-stage,
.martyr-register-drawer,
.register-list,
.martyr-help-dialog,
.martyr-card-dialog,
#martyrCardConnsList,
.doc-reader-dialog,
.doc-reader-body,
.doc-reader-content,
.memory-directory,
.directory-body,
.memory-cards,
dialog.anthro-detail {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.art-stage::-webkit-scrollbar,
.martyr-register-drawer::-webkit-scrollbar,
.register-list::-webkit-scrollbar,
.martyr-help-dialog::-webkit-scrollbar,
.martyr-card-dialog::-webkit-scrollbar,
#martyrCardConnsList::-webkit-scrollbar,
.doc-reader-dialog::-webkit-scrollbar,
.doc-reader-body::-webkit-scrollbar,
.doc-reader-content::-webkit-scrollbar,
.memory-directory::-webkit-scrollbar,
.directory-body::-webkit-scrollbar,
.memory-cards::-webkit-scrollbar,
dialog.anthro-detail::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.art-stage::-webkit-scrollbar-track,
.martyr-register-drawer::-webkit-scrollbar-track,
.register-list::-webkit-scrollbar-track,
.martyr-help-dialog::-webkit-scrollbar-track,
.martyr-card-dialog::-webkit-scrollbar-track,
#martyrCardConnsList::-webkit-scrollbar-track,
.doc-reader-dialog::-webkit-scrollbar-track,
.doc-reader-body::-webkit-scrollbar-track,
.doc-reader-content::-webkit-scrollbar-track,
.memory-directory::-webkit-scrollbar-track,
.directory-body::-webkit-scrollbar-track,
.memory-cards::-webkit-scrollbar-track,
dialog.anthro-detail::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}
.art-stage::-webkit-scrollbar-thumb,
.martyr-register-drawer::-webkit-scrollbar-thumb,
.register-list::-webkit-scrollbar-thumb,
.martyr-help-dialog::-webkit-scrollbar-thumb,
.martyr-card-dialog::-webkit-scrollbar-thumb,
#martyrCardConnsList::-webkit-scrollbar-thumb,
.doc-reader-dialog::-webkit-scrollbar-thumb,
.doc-reader-body::-webkit-scrollbar-thumb,
.doc-reader-content::-webkit-scrollbar-thumb,
.memory-directory::-webkit-scrollbar-thumb,
.directory-body::-webkit-scrollbar-thumb,
.memory-cards::-webkit-scrollbar-thumb,
dialog.anthro-detail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.art-stage::-webkit-scrollbar-thumb:hover,
.martyr-register-drawer::-webkit-scrollbar-thumb:hover,
.register-list::-webkit-scrollbar-thumb:hover,
.martyr-help-dialog::-webkit-scrollbar-thumb:hover,
.martyr-card-dialog::-webkit-scrollbar-thumb:hover,
#martyrCardConnsList::-webkit-scrollbar-thumb:hover,
.doc-reader-dialog::-webkit-scrollbar-thumb:hover,
.doc-reader-body::-webkit-scrollbar-thumb:hover,
.doc-reader-content::-webkit-scrollbar-thumb:hover,
.memory-directory::-webkit-scrollbar-thumb:hover,
.directory-body::-webkit-scrollbar-thumb:hover,
.memory-cards::-webkit-scrollbar-thumb:hover,
dialog.anthro-detail::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.38);
}

/* Film Grain Overlay */
.film-grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   1. PERSPECTIVE NAVIGATION
   -------------------------------------------------------------------------- */

nav#perspectiveNav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 100px;
  background: rgba(14, 18, 26, 0.7);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px) saturate(1.2);
  -webkit-backdrop-filter: blur(2px) saturate(1.2);
}

nav#perspectiveNav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

.perspective-btn {
  position: relative;
  height: 48px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--c-archive-dim, #9da3af);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1));
  overflow: hidden;
}

.perspective-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.perspective-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.perspective-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 15%;
  width: 70%;
  height: 2px;
  background: #fff;
  border-radius: 2px 2px 0 0;
  box-shadow: 0 -2px 10px rgba(255, 255, 255, 0.5);
}

.p-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--c-archive-bone, #ede8df);
}

.p-badge.danger {
  background: rgba(161, 56, 42, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(161, 56, 42, 0.3);
  animation: pulseGlow 3s infinite alternate ease-in-out;
}

/* --------------------------------------------------------------------------
   2. ART STAGES
   -------------------------------------------------------------------------- */

.art-stage {
  position: fixed;
  top: 72px;
  bottom: 0;
  left: 0;
  right: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(8, 12, 18, 0.70);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 100;
}

.art-stage.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: stageFadeIn 0.5s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1)) forwards;
}

/* Subtle Vignette Effect (keep map visible) */
.art-stage::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 65%, rgba(0, 0, 0, 0.35) 100%);
  z-index: 10;
}

/* --------------------------------------------------------------------------
   3. STAGE 1: MARTYROLOGY
   -------------------------------------------------------------------------- */

#stageMartyrology {
  overflow: hidden; /* Canvas fills completely */
  background: rgba(6, 9, 14, 0.35); /* Translucent glass: map shines right through! */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.martyr-canvas-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.martyr-telemetry-strip {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 32px;
  padding: 16px 32px;
  background: rgba(14, 17, 23, 0.4);
  border: 1px solid var(--c-concrete-border, rgba(255, 255, 255, 0.08));
  border-top: 1px solid var(--c-concrete-highlight, rgba(255, 255, 255, 0.16));
  border-radius: 16px;
  backdrop-filter: blur(20px);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.5),
    inset 0 -2px 20px rgba(110, 164, 190, 0.05);
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.telemetry-val {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--c-archive-bone, #ede8df);
  letter-spacing: -0.02em;
}

.telemetry-label {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-archive-faint, #525866);
}

.telemetry-item.danger .telemetry-val {
  color: #ff6b6b;
  text-shadow: 0 0 16px rgba(161, 56, 42, 0.6);
}

.martyr-card-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1100;
  width: 420px;
  padding: 40px;
  background: linear-gradient(135deg, #f2efe9 0%, #e8e3d8 100%);
  border-radius: 4px;
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  color: #2a2c30;
}

/* Archival corner notch effect */
.martyr-card-dialog::before,
.martyr-card-dialog::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.martyr-card-dialog::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.martyr-card-dialog::after { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.mc-header {
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 16px;
}

.mc-name {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 8px;
  color: #1a1b1e;
}

.mc-dates {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  color: #555;
}

.mc-status {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  border-radius: 2px;
  background: #333;
  color: #fff;
}

.mc-status.executed {
  background: var(--c-surguch, #a1382a);
  color: #fff;
  box-shadow: 0 2px 8px rgba(161, 56, 42, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.mc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mc-field-label {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #777;
  margin-bottom: 4px;
}

.mc-field-value {
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 0.95rem;
  color: #111;
}

.martyr-register-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: rgba(10, 13, 19, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  visibility: hidden;
}

.martyr-register-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   4. STAGE 2: POETRY
   -------------------------------------------------------------------------- */

.poetry-container {
  padding: 48px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 15;
}

.poetry-header-banner {
  background: linear-gradient(135deg, rgba(14, 18, 25, 0.8) 0%, rgba(20, 24, 32, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 48px;
  margin-bottom: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.ph-title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  color: var(--c-archive-bone, #ede8df);
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
}

.ph-stats {
  display: flex;
  gap: 32px;
}

.ph-stat-num {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 2rem;
  color: var(--c-water-crest, #6ea4be);
  text-shadow: 0 0 20px rgba(110, 164, 190, 0.3);
}

.poetry-spectrum-card {
  background: rgba(10, 12, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 48px;
}

.spectrum-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.spectrum-triumph {
  color: var(--c-water-crest, #6ea4be);
  text-shadow: 0 0 12px rgba(110, 164, 190, 0.4);
}

.spectrum-sorrow {
  color: var(--c-surguch, #a1382a);
  text-shadow: 0 0 12px rgba(161, 56, 42, 0.4);
}

.spectrum-range-wrapper {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
}

.spectrum-range {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #6ea4be 0%, #ffffff 50%, #a1382a 100%);
  border-radius: 2px;
  outline: none;
}

.spectrum-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.spectrum-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.poetry-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.poetry-word-cloud {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 16px;
  padding: 32px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.p-word {
  font-family: var(--font-serif, 'Literata', serif);
  cursor: pointer;
  transition: all 0.3s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1));
  padding: 4px 12px;
  border-radius: 4px;
}

.p-word:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}

.p-word.word-triumph { color: #8bc1da; text-shadow: 0 0 10px rgba(139, 193, 218, 0.3); }
.p-word.word-sorrow { color: #d46b5d; text-shadow: 0 0 10px rgba(212, 107, 93, 0.3); }

.p-word.size-1 { font-size: 0.9rem; opacity: 0.6; }
.p-word.size-2 { font-size: 1.2rem; opacity: 0.7; }
.p-word.size-3 { font-size: 1.6rem; opacity: 0.85; }
.p-word.size-4 { font-size: 2.2rem; opacity: 0.95; }
.p-word.size-5 { font-size: 3rem; font-weight: 600; }

.stanza-card {
  position: relative;
  padding: 40px;
  background: linear-gradient(135deg, rgba(237, 232, 223, 0.05) 0%, rgba(237, 232, 223, 0.01) 100%);
  border-left: 2px solid;
  border-image: linear-gradient(to bottom, transparent, var(--c-water-crest, #6ea4be), transparent) 1 100%;
  border-radius: 0 8px 8px 0;
}

.stanza-card::before {
  content: '"';
  position: absolute;
  top: 10px;
  right: 20px;
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 6rem;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
}

.stanza-text {
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--c-archive-bone, #ede8df);
  white-space: pre-line;
}

/* --------------------------------------------------------------------------
   5. STAGE 3: ANTHROPOMETRY
   -------------------------------------------------------------------------- */

.anthro-container {
  padding: 48px;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 15;
  position: relative;
}

.anthro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-bottom: 48px;
}

.anthro-card {
  background: rgba(14, 17, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 40px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.anthro-card:hover {
  transform: translateY(-4px);
}

.card-monument {
  border-left: 3px solid rgba(161, 56, 42, 0.8);
  background: linear-gradient(90deg, rgba(161, 56, 42, 0.05) 0%, transparent 100%);
}

.card-monument .card-hero-num {
  color: #ff6b6b;
  text-shadow: 0 0 24px rgba(161, 56, 42, 0.5);
}

.card-hero-num {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--c-archive-bone, #ede8df);
}

.ac-title {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-archive-dim, #9da3af);
  margin-bottom: 8px;
}

.ac-desc {
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 0.95rem;
  color: var(--c-archive-faint, #525866);
  line-height: 1.5;
}

.bread-visual-box {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  height: 240px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin-top: 24px;
}

.bread-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.bread-bar {
  width: 48px;
  border-radius: 4px 4px 0 0;
  animation: breadBarGrow 1s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1)) forwards;
  transform-origin: bottom;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
}

.bread-bar.punitive {
  background: linear-gradient(180deg, #d46b5d 0%, #8a2a20 100%);
}

.bread-bar.base {
  background: linear-gradient(180deg, #d8ad5e 0%, #996e23 100%);
}

.bread-bar.stakhanov {
  background: linear-gradient(180deg, #8bc1da 0%, #3a6a82 100%);
}

.bread-label {
  margin-top: 12px;
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--c-archive-dim, #9da3af);
}

.anthro-scrubber-card {
  background: rgba(14, 17, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
}

.scrubber-track {
  -webkit-appearance: none;
  width: 100%;
  max-width: 600px;
  height: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, var(--c-water-crest, #6ea4be) 100%);
  border-radius: 3px;
  margin: 32px 0;
  outline: none;
}

.scrubber-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.result-pill {
  display: inline-block;
  padding: 12px 24px;
  background: rgba(161, 56, 42, 0.15);
  border: 1px solid rgba(161, 56, 42, 0.3);
  border-radius: 32px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 1.2rem;
  color: #ff6b6b;
  transition: transform 0.2s;
}

.result-pill.pulse {
  animation: pulseGlow 0.5s;
}

/* --------------------------------------------------------------------------
   6. STAGE 4: CHRONOTOPE (INTERACTIVE BEFORE/AFTER SLIDER & DOSSIERS)
   -------------------------------------------------------------------------- */

.chronotope-stage-layout {
  padding: 32px 40px 80px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 15;
}

.chrono-header-banner {
  margin-bottom: 28px;
}

.chrono-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.c-emblem {
  font-size: 2.2rem;
  background: rgba(110, 164, 190, 0.12);
  border: 1px solid rgba(110, 164, 190, 0.3);
  padding: 10px 14px;
  border-radius: 12px;
}

.chrono-title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.6rem;
  color: #fff;
  letter-spacing: 0.08em;
  margin: 0 0 4px 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.chrono-subtitle {
  font-size: 0.92rem;
  color: var(--c-archive-dim, #9da3af);
  margin: 0;
  max-width: 900px;
  line-height: 1.5;
}

.chrono-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: rgba(14, 20, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}

.chrono-filter-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
}

.chrono-pill {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chrono-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.chrono-pill.active {
  background: rgba(110, 164, 190, 0.2);
  border-color: var(--c-water-crest, #6ea4be);
  color: #fff;
  box-shadow: 0 0 14px rgba(110, 164, 190, 0.3);
}

.chrono-mode-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chrono-mode-btn {
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chrono-mode-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Hero Showcase */
.chrono-hero-showcase {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 24px;
  background: rgba(10, 15, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  margin-bottom: 20px;
}

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

.hero-comparison-wrapper {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  min-height: 440px;
  background: #020406;
  overflow: hidden;
  cursor: ew-resize;
}

.hero-split-wrapper {
  display: flex;
  min-height: 440px;
  background: #020406;
  position: relative;
  overflow: hidden;
}

.hero-split-col {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 440px;
}

.hero-split-archive {
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-split-col .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.hero-split-col:hover .hero-img {
  transform: scale(1.03);
}

@media (max-width: 640px) {
  .hero-split-wrapper {
    flex-direction: column;
    min-height: 480px;
  }
  .hero-split-col {
    min-height: 240px;
  }
  .hero-split-archive {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
}

.hero-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.filter-archive {
  filter: grayscale(0.85) sepia(0.25) contrast(1.15) brightness(0.95);
}

.hero-badge {
  position: absolute;
  top: 16px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-family: var(--font-mono, monospace);
  color: #fff;
  backdrop-filter: blur(8px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-left {
  left: 16px;
  background: rgba(161, 56, 42, 0.8);
  border: 1px solid rgba(255, 120, 100, 0.4);
}

.badge-right {
  right: 16px;
  background: rgba(10, 40, 60, 0.8);
  border: 1px solid rgba(110, 164, 190, 0.5);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.dot-cyan { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }

.hero-caption-overlay {
  position: absolute;
  bottom: 0;
  padding: 16px 20px;
  max-width: 80%;
  z-index: 5;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.caption-left { left: 0; }
.caption-right { right: 0; text-align: right; }

.caption-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-water-crest, #6ea4be);
  display: block;
  margin-bottom: 4px;
}

.caption-text {
  font-size: 0.95rem;
  color: #f1f5f9;
  margin: 0 0 4px 0;
  font-family: var(--font-serif, serif);
  line-height: 1.4;
}

.caption-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
}

.hero-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #38bdf8;
  box-shadow: 0 0 18px #00f2fe;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.handle-pill {
  background: rgba(10, 16, 26, 0.9);
  border: 1px solid #38bdf8;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.handle-text {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
}

.handle-arrow {
  color: #38bdf8;
  font-size: 0.8rem;
}

.handle-line {
  flex: 1;
  width: 2px;
  background: rgba(56, 189, 248, 0.7);
}

/* Hero Story Column */
.hero-dossier-story {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(14, 20, 28, 0.85);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-story-loc {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: var(--c-brass, #c99438);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: block;
}

.hero-story-title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.35rem;
  color: #fff;
  margin: 0 0 16px 0;
  line-height: 1.35;
}

.hero-story-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #cbd5e1;
  font-family: var(--font-serif, serif);
  margin-bottom: 24px;
}

.hero-story-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-action-btn {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-action-btn:hover {
  background: rgba(110, 164, 190, 0.2);
  border-color: rgba(110, 164, 190, 0.4);
  color: #fff;
}

/* Carousel Chips */
.chrono-hero-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 6px 4px 18px 4px;
  margin-bottom: 28px;
  scroll-behavior: smooth;
  box-sizing: border-box;
  width: 100%;
}

.chrono-hero-carousel::-webkit-scrollbar {
  height: 6px;
}

.chrono-hero-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.carousel-chip {
  flex: 0 0 210px;
  min-width: 200px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: rgba(14, 20, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.carousel-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.carousel-chip.active {
  background: rgba(110, 164, 190, 0.2);
  border-color: var(--c-water-crest, #6ea4be);
  box-shadow: 0 0 12px rgba(110, 164, 190, 0.3);
}

.chip-thumbs {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.chip-arch {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  clip-path: polygon(0 0, 60% 0, 40% 100%, 0 100%);
  filter: grayscale(1);
}

.chip-cruise {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  clip-path: polygon(60% 0, 100% 0, 100% 100%, 40% 100%);
}

.chip-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.chip-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.3;
}

.chip-km {
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  color: var(--c-water-crest, #6ea4be);
  margin-top: 2px;
  display: block;
}

/* Dossiers Grid Section */
.chrono-dossiers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.chrono-section-h3 {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.05rem;
  color: var(--c-brass, #c99438);
  letter-spacing: 0.1em;
  margin: 0;
}

.chrono-counter-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  color: #94a3b8;
}

.chrono-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
}

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

.chrono-card {
  background: rgba(12, 16, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.chrono-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.chrono-card-header {
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.chrono-card-km {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: var(--c-brass, #c99438);
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.chrono-card-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.chrono-inspect-btn {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chrono-inspect-btn:hover {
  background: rgba(110, 164, 190, 0.2);
  color: #fff;
  border-color: var(--c-water-crest, #6ea4be);
}

/* Mini Slider inside Cards */
.mini-slider-box {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  height: 250px;
  background: #000;
  overflow: hidden;
  cursor: ew-resize;
}

.mini-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mini-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-tag {
  position: absolute;
  top: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: #fff;
  z-index: 5;
}

.tag-left {
  left: 10px;
  background: rgba(161, 56, 42, 0.85);
}

.tag-right {
  right: 10px;
  background: rgba(10, 40, 60, 0.85);
}

.mini-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #38bdf8;
  box-shadow: 0 0 10px #00f2fe;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-handle-pill {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(10, 16, 26, 0.95);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

/* Side-by-side mode */
.chrono-split-view {
  display: flex;
  height: 240px;
  position: relative;
}

.split-col {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

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

.split-col:hover img {
  transform: scale(1.04);
}

.split-col-archive {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.split-caption-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.8);
  font-size: 0.72rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chrono-card-story,
.chrono-card-footer {
  padding: 12px 16px;
  background: rgba(10, 14, 20, 0.5);
  flex: 0 0 auto;
}

.story-text {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 8px 0;
  font-family: var(--font-serif, serif);
}

.story-links {
  display: flex;
  justify-content: flex-end;
}

.story-link {
  font-size: 0.75rem;
  color: var(--c-water-crest, #6ea4be);
  text-decoration: none;
}

.story-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   7. ANIMATIONS
   -------------------------------------------------------------------------- */

@keyframes stageFadeIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 8px rgba(161, 56, 42, 0.2); }
  100% { box-shadow: 0 0 20px rgba(161, 56, 42, 0.6); }
}

@keyframes breadBarGrow {
  0% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  nav#perspectiveNav {
    width: 90%;
    max-width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px;
  }
  
  .poetry-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .anthro-grid {
    grid-template-columns: 1fr;
  }
  
  .chrono-card {
    flex-direction: column;
    height: 80vh;
  }
  
  .chrono-divider {
    top: 50%;
    left: 0;
    right: 0;
    width: 100%;
    height: 2px;
    bottom: auto;
    transform: translateY(-50%);
  }
  
  .chrono-archive .split-era-badge { bottom: auto; top: 24px; }
}

/* Source explanations and reliable controls. */
.anthro-number { appearance: none; background: transparent; border: 0; border-bottom: 1px dashed currentColor; padding: 1px 2px; color: inherit; font: inherit; cursor: pointer; text-align: inherit; }
.anthro-number.card-hero-num { display: block; font-size: clamp(1.7rem, 3.2vw, 3rem); font-weight: 600; margin: 16px 0; }
.anthro-number:hover { background: #ffffff12; }
.anthro-number:focus-visible, .cloud-word:focus-visible, [role="slider"]:focus-visible { outline: 2px solid #9edbff; outline-offset: 4px; }
.anthro-detail { margin: auto; box-sizing: border-box; width: min(720px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; border: 1px solid #64798c; border-radius: 16px; padding: 28px; background: rgba(17, 29, 41, 0.8); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); color: #edf1f6; line-height: 1.7; }
.anthro-detail::backdrop { background: #02060bdd; backdrop-filter: blur(4px); }
.anthro-detail h2 { font-size: 1.5rem; margin: 18px 0; }
.anthro-detail-value { font-size: 1.6rem; font-weight: 600; color: #a9dffc; }
.anthro-detail h3 { font-size: 1rem; margin-top: 20px; }
.anthro-detail p { margin: 12px 0; }
.anthro-detail a, .stanza-card a { color: #a9dffc; text-decoration: underline; }
.anthro-detail-close, .poetry-reset, #anthroAuditLink { padding: 8px 12px; border: 1px solid #7890a7; border-radius: 8px; background: #213446; color: #fff; cursor: pointer; }
.anthro-source-note { font-size: .86rem; color: #aebdcd; }
.anthro-actions-bar { margin: 28px 0 16px; display: flex; justify-content: center; }
.anthro-sources-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 28px; background: rgba(33, 52, 70, 0.85); border: 1px solid #7890a7; border-radius: 10px; color: #edf1f6; font-family: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.anthro-sources-btn:hover { background: rgba(45, 75, 102, 0.95); border-color: #9edbff; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); }
.anthro-audit { margin: 22px 0; padding: 20px; border: 1px solid #42576c; border-radius: 12px; line-height: 1.8; }
.anthro-audit summary { cursor: pointer; }
.anthro-scrubber-card p { margin: 10px 0 16px; font-size: .9rem; line-height: 1.6; color: #c6d4e3; }
button.cloud-word, .cloud-word {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  box-shadow: none;
  padding: 3px 8px;
  border-radius: 8px;
  outline: none;
}
button.cloud-word:hover, .cloud-word:hover {
  background: rgba(255, 255, 255, 0.08);
}
button.cloud-word.active,
button.cloud-word[aria-pressed="true"],
.cloud-word.active,
.cloud-word[aria-pressed="true"] {
  background: rgba(110, 164, 190, 0.3) !important;
  border: 1px solid var(--c-water-crest, #6ea4be) !important;
  box-shadow: 0 0 16px rgba(110, 164, 190, 0.4);
  outline: none;
}
.poetry-result-status { line-height: 1.6; font-size: .82rem; color: #b8cadb; padding: 8px 0 18px; }
.stanza-text mark { background: #31536a; color: #fff; }
.poetry-folio-panel { scroll-margin-top: 16px; }
.hero-comparison-wrapper img, .mini-slider-box img { pointer-events: none; -webkit-user-drag: none; }
.hero-slider-handle, .mini-handle { pointer-events: none; }
#stageMartyrology .stage-control-deck { position: relative; top: auto; left: auto; right: auto; flex-wrap: wrap; padding: 12px 18px; gap: 8px; }
#stageMartyrology .deck-cluster-left, #stageMartyrology .deck-cluster-right { flex-wrap: wrap; }
#stageMartyrology .martyr-method { position: relative; z-index: 20; padding: 0 20px 10px; color: #c0cddd; font-size: .78rem; line-height: 1.5; background: #0b1421d9; }
.martyr-method p { margin: 4px 0; }
.martyr-method summary { cursor: pointer; }
.martyr-method details p { max-width: 1100px; }
.martyr-group-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.martyr-group-label {
  position: absolute;
  transform: translateX(-50%);
  text-align: center;
  color: #ecdfc8;
  background: rgba(11, 20, 33, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.76rem;
  line-height: 1.4;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.martyr-group-label span {
  display: block;
  font-size: 0.7rem;
  color: #b6c5d7;
  margin-top: 3px;
}
#stageMartyrology .martyr-telemetry-strip { bottom: 12px; gap: 20px; padding: 10px 20px; }
@media (max-width: 700px) {
  #stageMartyrology .martyr-telemetry-strip { display: none; }
  #stageMartyrology .deck-title-badge { display: none; }
  #stageMartyrology .stage-control-deck { padding: 8px 12px; }
  #stageMartyrology .martyr-method { font-size: .7rem; padding: 0 12px 8px; }
  #stageMartyrology .deck-pill-btn { font-size: .65rem; padding: 6px 8px; }
  #stageMartyrology .deck-cluster-right { gap: 6px; }
  .martyr-group-label {
    font-size: 0.68rem;
    padding: 6px 12px;
    border-radius: 10px;
  }
}
.cinema-header[hidden] { display: none !important; }

/* Responsive adjustments for perspective switcher */
@media (max-width: 2500px) {
  .brand-artery {
    display: none !important;
  }
  nav#perspectiveNav .p-badge {
    display: none !important;
  }
}

@media (max-width: 1920px) {
  .brand-artery {
    display: none !important;
  }
  nav#perspectiveNav .p-badge {
    display: none !important;
  }
  nav#perspectiveNav .p-full {
    display: none !important;
  }
  nav#perspectiveNav .p-short {
    display: inline !important;
  }
  nav#perspectiveNav .perspective-btn {
    padding: 6px 12px;
    font-size: 0.76rem;
    gap: 5px;
  }
}

@media (max-width: 1599px) {
  body.view-atlas nav#perspectiveNav,
  nav#perspectiveNav {
    top: 58px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
  }
  body.view-stage nav#perspectiveNav {
    top: 12px;
  }
}

@media (min-width: 1024px) and (max-width: 1440px) {
  nav#perspectiveNav .p-badge {
    display: none !important;
  }
  nav#perspectiveNav .perspective-btn {
    padding: 5px 10px;
    font-size: 0.74rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body.view-atlas nav#perspectiveNav,
  nav#perspectiveNav {
    top: 54px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 28px);
    box-sizing: border-box;
  }
  body.view-stage nav#perspectiveNav {
    top: 10px;
  }
  nav#perspectiveNav .p-badge {
    display: none !important;
  }
  nav#perspectiveNav .p-full {
    display: none;
  }
  nav#perspectiveNav .p-short {
    display: inline;
  }
  nav#perspectiveNav .perspective-btn {
    height: 36px;
    padding: 0 12px;
    font-size: 0.74rem;
    flex-shrink: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 767px) {
  nav#perspectiveNav {
    position: fixed;
    top: 48px;
    left: 6px;
    right: 6px;
    transform: none;
    width: auto;
    max-width: calc(100% - 12px);
    height: 36px;
    padding: 2px 4px;
    border-radius: 14px 14px 4px 4px;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    justify-content: flex-start;
  }
  nav#perspectiveNav::-webkit-scrollbar {
    display: none;
  }
  body.view-stage nav#perspectiveNav {
    top: 8px;
    border-radius: 18px;
  }
  nav#perspectiveNav .perspective-btn {
    height: 30px;
    padding: 0 9px;
    font-size: 0.72rem;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 12px;
    box-sizing: border-box;
  }
  nav#perspectiveNav .p-full {
    display: none;
  }
  nav#perspectiveNav .p-short {
    display: inline;
  }
  nav#perspectiveNav .p-badge {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .chronotope-stage-layout { padding: 16px 12px 60px; }
  .chrono-header-banner, .poetry-header-banner { flex-direction: column; align-items: stretch; gap: 18px; }
  .chrono-title-group, .poetry-title-group { min-width: 0; }
  .chrono-title { font-size: 1.15rem; line-height: 1.4; }
  .chrono-toolbar { width: 100%; min-width: 0; }
  .chrono-filter-strip { flex-wrap: wrap; max-width: 100%; }
  .chrono-pill { white-space: normal; }
  .hero-caption-overlay { padding: 12px; }
  .caption-text { font-size: .82rem; }
}

/* Completely hide map dossier and backdrop when in perspective stages */
body.view-stage #dossierSlate,
body.view-stage #dossierBackdrop {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* --------------------------------------------------------------------------
   7. ART BIGDATA STAGE 6: ПИСЬМА И ВОСПОМИНАНИЯ КАНАЛОАРМЕЙЦЕВ
   -------------------------------------------------------------------------- */

#stageLetters {
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(8, 12, 18, 0.78);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.letters-stage-layout {
  max-width: 1560px;
  margin: 0 auto;
  padding: 32px 36px 90px;
}

/* Header Banner */
.letters-header-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, rgba(16, 20, 28, 0.95) 0%, rgba(22, 28, 40, 0.9) 100%);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: 20px;
  padding: 24px 30px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.letters-header-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-brass, #c99438), var(--c-water-crest, #6ea4be), transparent);
}

.letters-header-left {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex: 1;
}

.letters-crest-symbol {
  font-size: 2.2rem;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(201, 148, 56, 0.12);
  border: 1px solid rgba(201, 148, 56, 0.3);
  box-shadow: 0 0 20px rgba(201, 148, 56, 0.15);
  flex-shrink: 0;
}

.letters-main-title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-archive-bone, #ede8df);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.letters-main-subtitle {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--c-archive-dim, #9da3af);
  max-width: 820px;
}

/* Stats strip */
.letters-stats-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.letters-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  min-width: 84px;
}

.letters-stat-num {
  font-family: var(--font-mono, monospace);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-archive-bone, #ede8df);
}

.letters-stat-lbl {
  font-size: 0.68rem;
  color: var(--c-archive-dim, #9da3af);
  letter-spacing: 0.04em;
  margin-top: 2px;
  white-space: nowrap;
}

/* Spotlight Card */
.letters-spotlight-wrap {
  margin-bottom: 24px;
}

.letters-spotlight-card {
  background: linear-gradient(135deg, rgba(18, 22, 32, 0.95) 0%, rgba(14, 18, 26, 0.92) 100%);
  border: 1px solid rgba(201, 148, 56, 0.3);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.letters-spotlight-card::after {
  content: "АРХИВ ДМИТЛАГА";
  position: absolute;
  top: 18px;
  right: 24px;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(201, 148, 56, 0.4);
  pointer-events: none;
}

.spotlight-inner-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 32px;
  align-items: start;
}

.spotlight-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.spotlight-badge, .letter-card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
}

.badge-gorky {
  background: rgba(201, 148, 56, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(201, 148, 56, 0.4);
}

.badge-family {
  background: rgba(161, 56, 42, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(161, 56, 42, 0.4);
}

.badge-memoir {
  background: rgba(58, 88, 109, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(58, 88, 109, 0.45);
}

.badge-eyewitness {
  background: rgba(110, 164, 190, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(110, 164, 190, 0.35);
}

.badge-audio {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-cruise {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.spotlight-year-stamp, .spotlight-loc-stamp, .spotlight-audio-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: var(--c-archive-dim, #9da3af);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.spotlight-audio-badge {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

.spotlight-headline {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 16px;
}

.spotlight-quote-panel {
  position: relative;
  background: rgba(10, 14, 22, 0.6);
  border-left: 3px solid var(--c-brass, #c99438);
  padding: 16px 20px 16px 36px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 18px;
}

.spotlight-quote-glyph {
  position: absolute;
  top: 0;
  left: 10px;
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 2.8rem;
  color: rgba(201, 148, 56, 0.35);
  line-height: 1;
  pointer-events: none;
}

.spotlight-quote-text {
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--c-archive-bone, #ede8df);
  margin: 0;
}

.spotlight-author-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spotlight-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(201, 148, 56, 0.15);
  border: 1px solid rgba(201, 148, 56, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.spotlight-author-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.spotlight-author-role {
  font-size: 0.78rem;
  color: var(--c-archive-dim, #9da3af);
  line-height: 1.3;
}

/* Right column in spotlight */
.spotlight-right-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.spotlight-context-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-brass, #c99438);
  margin-bottom: 8px;
}

.spotlight-summary-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.spotlight-source-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 14px;
}

.source-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-archive-faint, #64748b);
}

.source-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  color: var(--c-archive-bone, #ede8df);
  word-break: break-word;
}

.spotlight-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.spotlight-tag-pill, .card-tag {
  font-size: 0.68rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.spotlight-actions-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.spotlight-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c99438 0%, #a37222 100%);
  color: #090d14;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 9px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(201, 148, 56, 0.35);
  transition: all 0.2s ease;
}

.spotlight-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 148, 56, 0.5);
}

.spotlight-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(110, 164, 190, 0.15);
  border: 1px solid rgba(110, 164, 190, 0.35);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.spotlight-btn-secondary:hover {
  background: rgba(110, 164, 190, 0.25);
  color: #fff;
  border-color: var(--c-water-crest, #6ea4be);
}

.spotlight-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--c-archive-dim, #9da3af);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.spotlight-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Toolbar row */
.letters-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  background: rgba(14, 18, 26, 0.7);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 10px 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.letters-filter-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.letters-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 500;
  background: transparent;
  color: var(--c-archive-dim, #9da3af);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.letters-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.letters-pill.active {
  color: #fff;
  background: rgba(201, 148, 56, 0.16);
  border-color: rgba(201, 148, 56, 0.4);
  box-shadow: 0 0 14px rgba(201, 148, 56, 0.2);
}

.letters-search-geo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.letters-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 280px;
}

.letters-search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.6;
}

.letters-search-input {
  width: 100%;
  height: 34px;
  background: rgba(10, 14, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0 32px 0 32px;
  color: #fff;
  font-size: 0.78rem;
  outline: none;
  transition: border-color 0.2s;
}

.letters-search-input:focus {
  border-color: var(--c-brass, #c99438);
  box-shadow: 0 0 10px rgba(201, 148, 56, 0.2);
}

.letters-search-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  display: none;
}

.letters-geo-select {
  height: 34px;
  background: rgba(10, 14, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0 12px;
  color: var(--c-archive-bone, #ede8df);
  font-size: 0.76rem;
  outline: none;
  cursor: pointer;
}

.letters-geo-select:focus {
  border-color: var(--c-water-crest, #6ea4be);
}

/* Grid of Cards */
.letters-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}

.letter-card {
  background: linear-gradient(135deg, rgba(16, 20, 28, 0.94) 0%, rgba(12, 16, 24, 0.9) 100%);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.letter-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 148, 56, 0.35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.letter-card.is-selected {
  border-color: var(--c-brass, #c99438);
  box-shadow: 0 0 25px rgba(201, 148, 56, 0.25);
}

.letter-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.letter-card-meta-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-audio-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 6px;
  border-radius: 10px;
}

.letter-card-date {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  color: var(--c-archive-faint, #64748b);
}

.letter-card-headline {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 10px;
  cursor: pointer;
  transition: color 0.2s;
}

.letter-card-headline:hover {
  color: var(--c-brass, #c99438);
}

.letter-card-author-cluster {
  margin-bottom: 12px;
}

.card-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-archive-bone, #ede8df);
}

.card-author-role {
  font-size: 0.74rem;
  color: var(--c-archive-dim, #9da3af);
  line-height: 1.35;
  margin-top: 2px;
}

.card-location-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  color: var(--c-water-crest, #6ea4be);
  margin-top: 6px;
  cursor: pointer;
  background: rgba(110, 164, 190, 0.08);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(110, 164, 190, 0.2);
}

.card-location-tag:hover {
  background: rgba(110, 164, 190, 0.18);
  color: #fff;
}

.letter-card-quote-box {
  background: rgba(10, 14, 22, 0.55);
  border-left: 2px solid var(--c-brass, #c99438);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 12px;
}

.letter-card-quote-text {
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.letter-card-summary {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #94a3b8;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.letter-card-source {
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  color: var(--c-archive-faint, #64748b);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.letter-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}

.letter-card-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-btn-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  background: rgba(201, 148, 56, 0.15);
  border: 1px solid rgba(201, 148, 56, 0.35);
  color: #fcd34d;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-btn-read:hover {
  background: rgba(201, 148, 56, 0.3);
  color: #fff;
}

.card-btn-map, .card-btn-copy, .card-btn-focus {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.76rem;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-btn-map:hover {
  background: rgba(110, 164, 190, 0.2);
  color: var(--c-water-crest, #6ea4be);
  border-color: rgba(110, 164, 190, 0.4);
}

.card-btn-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.card-btn-focus:hover {
  background: rgba(201, 148, 56, 0.2);
  color: #fcd34d;
}

/* Empty state */
.letters-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: rgba(14, 18, 26, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 18px;
}

/* Letter Reader Modal (Archival Folio Drawer) */
.letter-reader-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.letter-reader-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.letter-reader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 12, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.letter-reader-dialog {
  position: relative;
  width: 92%;
  max-width: 900px;
  height: 90vh;
  max-height: 900px;
  background: rgba(15, 20, 30, 0.8);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(201, 148, 56, 0.35);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(201, 148, 56, 0.15);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1));
}

.letter-reader-modal.open .letter-reader-dialog {
  transform: translateY(0) scale(1);
}

.letter-reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(14, 18, 26, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.letter-reader-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
}

.letter-reader-category {
  color: var(--c-brass, #c99438);
  font-weight: 700;
}

.letter-reader-dot {
  color: rgba(255, 255, 255, 0.2);
}

.letter-reader-year {
  color: #94a3b8;
}

.letter-reader-loc {
  color: var(--c-water-crest, #6ea4be);
}

.letter-reader-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.letter-reader-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 0.74rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.letter-reader-btn-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.letter-reader-close-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  margin: 0;
}

.letter-reader-close-btn:hover {
  background: rgba(161, 56, 42, 0.6);
  border-color: #a1382a;
  color: #fff;
}

.letter-reader-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px;
  background: #0d121b;
}

.letter-parchment-sheet {
  background: #141a26;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 36px 42px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.letter-sheet-seal {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: #a1382a;
  border: 2px solid #a1382a;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  transform: rotate(-3deg);
  opacity: 0.85;
}

.letter-sheet-author-block {
  margin-bottom: 24px;
}

.letter-sheet-title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 12px;
  max-width: 80%;
}

.letter-sheet-author-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-archive-bone, #ede8df);
  margin-bottom: 4px;
}

.letter-sheet-author-role {
  font-size: 0.85rem;
  color: var(--c-archive-dim, #9da3af);
  margin-bottom: 8px;
}

.letter-sheet-source-cite {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #64748b;
}

.letter-sheet-quote-callout {
  position: relative;
  background: rgba(201, 148, 56, 0.08);
  border-left: 3px solid var(--c-brass, #c99438);
  padding: 16px 20px 16px 36px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 28px;
}

.letter-sheet-quote-callout .quote-watermark {
  position: absolute;
  top: 0;
  left: 10px;
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 2.8rem;
  color: rgba(201, 148, 56, 0.35);
  line-height: 1;
}

.quote-callout-text {
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
  color: #fef3c7;
  margin: 0;
}

.letter-sheet-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  margin-bottom: 28px;
}

.letter-sheet-body {
  font-family: var(--font-serif, 'Literata', serif);
  font-size: 0.98rem;
  line-height: 1.85;
  color: #e2e8f0;
  word-break: break-word;
}

.letter-sheet-body p {
  margin-bottom: 18px;
  text-indent: 1.5em;
}

.letter-sheet-body blockquote {
  border-left: 2px solid var(--c-water-crest, #6ea4be);
  padding-left: 16px;
  margin: 18px 0;
  font-style: italic;
  color: #94a3b8;
}

.letter-sheet-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.letter-sheet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.letter-sheet-postscript {
  font-size: 0.76rem;
  font-family: var(--font-mono, monospace);
  color: #64748b;
  line-height: 1.5;
}

/* Toast */
.letters-toast-notification {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(14, 20, 30, 0.95);
  border: 1px solid var(--c-brass, #c99438);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.82rem;
  padding: 10px 22px;
  border-radius: 30px;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

.letters-toast-notification.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .letters-header-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .letters-stats-strip {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .spotlight-inner-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  #stageLetters {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
  }

  .letters-stage-layout {
    width: 100%;
    max-width: 100vw;
    padding: 12px 10px 80px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Header Banner — Full mobile stack */
  .letters-header-banner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    padding: 14px 12px;
    border-radius: 16px;
    margin-bottom: 14px;
    gap: 12px;
    box-sizing: border-box;
  }
  .letters-header-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .letters-crest-symbol {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .letters-main-title {
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    word-break: break-word;
  }
  .letters-main-subtitle {
    font-size: 0.74rem;
    line-height: 1.4;
    word-break: break-word;
  }

  /* Stats Strip — 5-column balanced touch grid */
  .letters-stats-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
  }
  .letters-stat-item {
    padding: 6px 2px;
    min-width: 0;
    width: 100%;
    text-align: center;
    border-radius: 10px;
    box-sizing: border-box;
  }
  .letters-stat-num {
    font-size: 1rem;
    line-height: 1.1;
  }
  .letters-stat-lbl {
    font-size: 0.58rem;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
    word-break: break-word;
    margin-top: 2px;
  }

  /* Spotlight Card */
  .letters-spotlight-wrap {
    width: 100%;
    max-width: 100%;
    margin-bottom: 14px;
    box-sizing: border-box;
  }
  .letters-spotlight-card {
    width: 100%;
    max-width: 100%;
    padding: 16px 12px;
    border-radius: 16px;
    box-sizing: border-box;
    overflow: hidden;
  }
  .letters-spotlight-card::after {
    display: none;
  }
  .spotlight-inner-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 14px;
    box-sizing: border-box;
  }
  .spotlight-left-column,
  .spotlight-right-column {
    width: 100%;
    box-sizing: border-box;
  }
  .spotlight-badge-row {
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }
  .spotlight-headline {
    font-size: 1.05rem;
    line-height: 1.35;
    margin-bottom: 10px;
    word-break: break-word;
  }
  .spotlight-quote-panel {
    padding: 10px 12px 10px 26px;
    margin-bottom: 12px;
    border-radius: 0 10px 10px 0;
    box-sizing: border-box;
  }
  .spotlight-quote-glyph {
    font-size: 2rem;
    left: 6px;
    top: -2px;
  }
  .spotlight-quote-text {
    font-size: 0.86rem;
    line-height: 1.5;
    word-break: break-word;
  }
  .spotlight-author-box {
    gap: 10px;
  }
  .spotlight-author-name {
    font-size: 0.92rem;
  }
  .spotlight-author-role {
    font-size: 0.72rem;
  }
  .spotlight-context-title {
    font-size: 0.74rem;
    margin-bottom: 6px;
  }
  .spotlight-summary-text {
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 12px;
    word-break: break-word;
  }
  .spotlight-source-info {
    padding: 8px 10px;
    margin-bottom: 12px;
    box-sizing: border-box;
  }
  .spotlight-tags-list {
    gap: 4px;
    margin-bottom: 14px;
  }
  .spotlight-actions-cluster {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    margin-top: 10px;
    box-sizing: border-box;
  }
  .spotlight-btn-primary,
  .spotlight-btn-secondary,
  .spotlight-btn-ghost {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 0.8rem;
    text-align: center;
  }

  /* Toolbar */
  .letters-toolbar-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border-radius: 14px;
    margin-bottom: 14px;
    gap: 10px;
    box-sizing: border-box;
  }
  .letters-filter-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    gap: 6px;
    padding: 2px 0 6px;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
  .letters-filter-strip::-webkit-scrollbar {
    display: none !important;
  }
  .letters-pill {
    padding: 5px 11px;
    font-size: 0.72rem;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .letters-search-geo-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 8px;
    box-sizing: border-box;
  }
  .letters-search-wrap {
    width: 100%;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  .letters-search-input {
    width: 100%;
    height: 36px;
    font-size: 0.76rem;
    box-sizing: border-box;
  }
  .letters-geo-select {
    width: 100%;
    height: 36px;
    font-size: 0.76rem;
    box-sizing: border-box;
  }

  /* Cards Grid */
  .letters-cards-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 12px;
    box-sizing: border-box;
  }
  .letter-card {
    width: 100%;
    max-width: 100%;
    padding: 14px 12px;
    border-radius: 14px;
    box-sizing: border-box;
    overflow: hidden;
  }
  .letter-card-headline {
    font-size: 0.95rem;
    line-height: 1.35;
    word-break: break-word;
  }
  .card-author-name {
    font-size: 0.88rem;
  }
  .card-author-role {
    font-size: 0.72rem;
  }
  .letter-card-quote-box {
    padding: 8px 10px;
    box-sizing: border-box;
  }
  .letter-card-quote-text {
    font-size: 0.82rem;
    line-height: 1.5;
    word-break: break-word;
  }
  .letter-card-summary {
    font-size: 0.8rem;
    line-height: 1.5;
    word-break: break-word;
  }
  .letter-card-source {
    font-size: 0.72rem;
    word-break: break-word;
  }
  .letter-card-footer-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    padding-top: 10px;
  }
  .card-btn-read {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.78rem;
    box-sizing: border-box;
  }
  .card-btn-map {
    flex: 1 1 auto;
    justify-content: center;
    padding: 7px 10px;
    font-size: 0.74rem;
    box-sizing: border-box;
  }
  .card-btn-copy,
  .card-btn-focus {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 0.74rem;
    box-sizing: border-box;
  }

  /* Letter Reader Folio Modal */
  .letter-reader-modal .letter-reader-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
    box-sizing: border-box;
  }
  .letter-reader-topbar {
    padding: 8px 10px;
    gap: 6px;
    flex-wrap: wrap;
    box-sizing: border-box;
    width: 100%;
  }
  .letter-reader-breadcrumbs {
    font-size: 0.68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 40px);
  }
  .letter-reader-top-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .letter-reader-btn-action span:last-child {
    display: none;
  }
  .letter-reader-btn-action {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
  .letter-reader-scroll {
    padding: 12px 10px 40px;
    box-sizing: border-box;
  }
  .letter-parchment-sheet {
    padding: 16px 12px;
    border-radius: 12px;
    box-sizing: border-box;
    word-break: break-word;
  }
  .letter-sheet-seal {
    top: 8px;
    right: 8px;
    font-size: 0.55rem;
    padding: 2px 5px;
  }
  .letter-sheet-title {
    font-size: 1.1rem;
    max-width: 100%;
    margin-bottom: 8px;
    word-break: break-word;
  }
  .letter-sheet-author-name {
    font-size: 0.95rem;
  }
  .letter-sheet-author-role {
    font-size: 0.74rem;
  }
  .letter-sheet-quote-callout {
    padding: 10px 12px;
    margin-bottom: 14px;
    box-sizing: border-box;
  }
  .letter-sheet-quote-callout blockquote {
    font-size: 0.84rem;
    line-height: 1.55;
    word-break: break-word;
  }
  .letter-sheet-body-text {
    font-size: 0.84rem;
    line-height: 1.65;
    word-break: break-word;
  }
}

