/* ============================================================
   Epoch Lives — Dashboard Dark Theme
   Inspired by maplewood.zone atmospheric simulation aesthetic
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400;1,600&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

/* ============================================================
   1. CSS Custom Properties — Color System
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-primary: #0a0a0c;
  --bg-secondary: #111114;
  --bg-tertiary: #1a1a1f;

  /* Text */
  --text-primary: #c4c4c8;
  --text-secondary: #7a7a82;
  --text-accent: #a78bfa;

  /* Borders */
  --border: #2a2a30;

  /* Stat colors */
  --stat-wealth: #e3c78a;
  --stat-health: #79dac8;
  --stat-mood: #80a0ff;

  /* Semantic */
  --danger: #ff5d5d;
  --success: #5ddb6f;

  /* Typography */
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font-serif: 'Crimson Text', 'Georgia', serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
}

/* ============================================================
   2. Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
}

a {
  color: var(--text-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================================
   3. Scrollbar — Dark
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #3a3a42;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4a4a54;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #3a3a42 var(--bg-primary);
}

/* ============================================================
   4. Layout — Full Viewport Dashboard
   ============================================================ */
.status-bar-top {
  height: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  gap: var(--space-4);
}

.status-bar-top .character-name {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.status-bar-top .character-age {
  color: var(--text-secondary);
  font-size: 11px;
}

.status-bar-top .sim-clock {
  color: var(--text-accent);
  font-size: 11px;
  font-weight: 500;
}

.main-panels {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.panel-stats {
  width: 260px;
  min-width: 260px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background-color: var(--bg-secondary);
  padding: var(--space-4);
}

.panel-journal {
  flex: 1;
  overflow-y: auto;
  background-color: var(--bg-primary);
  padding: var(--space-6);
}

.panel-relationships {
  width: 260px;
  min-width: 260px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background-color: var(--bg-secondary);
  padding: var(--space-4);
}

.status-bar-bottom {
  height: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-secondary);
  gap: var(--space-4);
}

/* ============================================================
   5. Atmospheric Overlays — Simulation Frame
   ============================================================ */
.simulation-frame {
  position: relative;
}

.simulation-frame::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
  z-index: 50;
}

.simulation-frame::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  opacity: 0.015;
  pointer-events: none;
  z-index: 100;
  animation: noise 1s steps(5) infinite;
}

/* ============================================================
   6. Animations
   ============================================================ */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(128, 160, 255, 0.2);
  }
  50% {
    border-color: rgba(207, 135, 232, 0.3);
  }
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1.0);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.05);
    opacity: 1.0;
  }
}

@keyframes statPulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  25% {
    transform: scale(1.08);
    filter: brightness(1.3);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes noise {
  0% { background-position: 0 0; }
  20% { background-position: -20px 10px; }
  40% { background-position: 15px -15px; }
  60% { background-position: -10px 20px; }
  80% { background-position: 20px -5px; }
  100% { background-position: 0 0; }
}

/* ============================================================
   7. Panel Headers
   ============================================================ */
.panel-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   8. Stat Cards
   ============================================================ */
.stat-card {
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  transition: background-color var(--transition-fast);
}

.stat-card:hover {
  background-color: #1f1f26;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  transition: color var(--transition-base), transform var(--transition-base);
}

.stat-value.wealth { color: var(--stat-wealth); }
.stat-value.health { color: var(--stat-health); }
.stat-value.mood   { color: var(--stat-mood); }
.stat-value.danger { color: var(--danger); }

.stat-pulse {
  animation: statPulse 400ms ease-out;
}

.stat-bar {
  height: 3px;
  border-radius: 2px;
  background-color: var(--border);
  overflow: hidden;
  margin-top: var(--space-2);
}

.stat-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-base);
}

.stat-bar-fill.wealth { background-color: var(--stat-wealth); }
.stat-bar-fill.health { background-color: var(--stat-health); }
.stat-bar-fill.mood   { background-color: var(--stat-mood); }
.stat-bar-fill.danger { background-color: var(--danger); }

.stat-delta {
  font-size: 10px;
  font-weight: 500;
  margin-left: var(--space-1);
}

.stat-delta.positive { color: var(--success); }
.stat-delta.negative { color: var(--danger); }

/* ============================================================
   9. Stat Badges (inline indicators)
   ============================================================ */
.stat-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.4;
  vertical-align: middle;
}

.stat-badge.positive {
  color: var(--success);
  background-color: rgba(93, 219, 111, 0.1);
}

.stat-badge.negative {
  color: var(--danger);
  background-color: rgba(255, 93, 93, 0.1);
}

.stat-badge-skill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.4;
  color: var(--text-accent);
  background-color: rgba(167, 139, 250, 0.1);
}

/* ============================================================
   10. Journal — Narrative Feed
   ============================================================ */
.journal-day {
  border-left: 3px solid var(--text-accent);
  padding-left: var(--space-4);
  margin-bottom: var(--space-6);
}

.journal-day-header {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.journal-day-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
}

.journal-event {
  background-color: var(--bg-secondary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  transition: background-color var(--transition-fast);
}

.journal-event:hover {
  background-color: #16161a;
}

.journal-event[data-type="thought"] {
  font-style: italic;
  color: var(--text-accent);
  opacity: 0.8;
}

.journal-event[data-type="dialogue"] {
  font-style: normal;
  border-left: 3px solid var(--text-accent);
  padding-left: var(--space-4);
}

.journal-event[data-type="action"] {
  /* Default style — no additional overrides */
}

.event-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.event-description {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
}

.event-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

/* ============================================================
   11. Emotion Tags
   ============================================================ */
.emotion-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background-color: rgba(122, 122, 130, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.4;
}

/* ============================================================
   12. Relationship Cards
   ============================================================ */
.relationship-card {
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  transition: background-color var(--transition-fast);
}

.relationship-card:hover {
  background-color: #1f1f26;
}

.relationship-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.relationship-role {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.relationship-bar {
  height: 3px;
  border-radius: 2px;
  background-color: var(--border);
  overflow: hidden;
  margin-top: var(--space-2);
}

.relationship-bar-fill {
  height: 100%;
  border-radius: 2px;
  background-color: var(--text-accent);
  transition: width var(--transition-base);
}

.relationship-sentiment {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.connection-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-secondary);
  vertical-align: middle;
  margin-right: var(--space-1);
}

.connection-dot.active {
  background-color: var(--success);
  animation: breathe 2s ease-in-out infinite;
}

.connection-dot.inactive {
  background-color: var(--text-secondary);
  opacity: 0.4;
}

/* ============================================================
   13. Animation Trigger Classes
   ============================================================ */
.fade-slide-in {
  animation: fadeSlideIn 300ms ease-out both;
}

.glow-border {
  border: 1px solid rgba(128, 160, 255, 0.2);
  animation: borderGlow 4s ease-in-out infinite;
}

/* ============================================================
   14. Utility Classes — Tailwind Replacements
   ============================================================ */

/* --- Display & Flex --- */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-row    { flex-direction: row; }
.flex-1      { flex: 1; }
.flex-wrap   { flex-wrap: wrap; }
.items-center    { align-items: center; }
.items-start     { align-items: flex-start; }
.items-end       { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }

/* --- Gap --- */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* --- Typography --- */
.text-xs  { font-size: 10px; }
.text-sm  { font-size: 12px; }
.text-base { font-size: 13px; }
.text-lg  { font-size: 16px; }
.text-xl  { font-size: 20px; }
.text-2xl { font-size: 24px; }

.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }

.capitalize { text-transform: capitalize; }
.uppercase  { text-transform: uppercase; }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-accent    { color: var(--text-accent); }
.text-danger    { color: var(--danger); }
.text-wealth    { color: var(--stat-wealth); }
.text-health    { color: var(--stat-health); }
.text-mood      { color: var(--stat-mood); }

.font-mono  { font-family: var(--font-mono); }
.font-serif { font-family: var(--font-serif); }

.leading-tight  { line-height: 1.2; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.65; }

.tracking-wide { letter-spacing: 0.5px; }
.tracking-wider { letter-spacing: 1px; }
.tracking-widest { letter-spacing: 1.5px; }

/* --- Padding --- */
.p-1  { padding: var(--space-1); }
.p-2  { padding: var(--space-2); }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }

.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }

/* --- Margin --- */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.ml-2 { margin-left: var(--space-2); }
.mr-2 { margin-right: var(--space-2); }

/* --- Space-Y (vertical spacing between children) --- */
.space-y-1 > * + * { margin-top: var(--space-1); }
.space-y-2 > * + * { margin-top: var(--space-2); }
.space-y-3 > * + * { margin-top: var(--space-3); }
.space-y-4 > * + * { margin-top: var(--space-4); }

/* --- Border Radius --- */
.rounded    { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-md); }
.rounded-full { border-radius: 9999px; }

/* --- Sizing --- */
.w-full { width: 100%; }
.h-full { height: 100%; }

/* --- Overflow --- */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* --- Position --- */
.hidden  { display: none; }
.sticky  { position: sticky; top: 0; z-index: 10; }
.relative { position: relative; }
.absolute { position: absolute; }

/* --- Borders --- */
.border        { border: 1px solid var(--border); }
.border-t      { border-top: 1px solid var(--border); }
.border-b      { border-bottom: 1px solid var(--border); }
.border-l      { border-left: 1px solid var(--border); }
.border-r      { border-right: 1px solid var(--border); }

/* --- Backgrounds --- */
.bg-primary   { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary  { background-color: var(--bg-tertiary); }

/* ============================================================
   15. Miscellaneous & Polish
   ============================================================ */

/* Divider line */
.divider {
  height: 1px;
  background-color: var(--border);
  margin: var(--space-4) 0;
}

/* Subtle hover highlight for interactive rows */
.hover-row:hover {
  background-color: rgba(167, 139, 250, 0.04);
}

/* Pulse dot for live connection indicator */
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--success);
  animation: breathe 2s ease-in-out infinite;
  margin-right: var(--space-1);
  vertical-align: middle;
}

/* Muted section for secondary info blocks */
.muted-block {
  background-color: rgba(26, 26, 31, 0.5);
  border-left: 2px solid var(--border);
  padding: var(--space-2) var(--space-3);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Tooltip-style label */
.tooltip-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  background-color: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

/* Selection color */
::selection {
  background-color: rgba(167, 139, 250, 0.25);
  color: var(--text-primary);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}

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

/* ============================================================
   16. LLM Narrative Streaming
   ============================================================ */

.narrative-stream {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-primary);
  padding: var(--space-3);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.streaming-cursor {
  animation: cursorBlink 1s step-end infinite;
  color: var(--text-accent);
  font-weight: bold;
  font-size: 14px;
}

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

.narrative-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-3) 0;
  opacity: 0.3;
}

.event-toggle-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: var(--space-1) var(--space-3);
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.event-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.structured-events.hidden {
  display: none;
}

/* ============================================================
   18. Simulate Button
   ============================================================ */
.btn-simulate {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bg-primary);
  background: var(--text-accent);
  border: none;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.btn-simulate:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-simulate.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================================
   19. Stat Context Labels
   ============================================================ */
.stat-context {
  font-size: 9px;
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--text-secondary);
  opacity: 0.7;
  margin-left: 2px;
}

/* ============================================================
   20. Decision Cards
   ============================================================ */
.decision-card {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(128, 160, 255, 0.04));
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  animation: fadeSlideIn 400ms ease-out both, borderGlow 4s ease-in-out infinite;
}

.decision-card.resolved {
  animation: none;
  border-color: var(--border);
  background: var(--bg-secondary);
}

.decision-prompt {
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.decision-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-accent);
  margin-bottom: var(--space-3);
}

.decision-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.decision-option {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.decision-option:hover {
  border-color: var(--text-accent);
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

.decision-option:active {
  transform: translateX(2px);
}

.decision-option.chosen {
  border-color: var(--text-accent);
  background: rgba(167, 139, 250, 0.12);
  color: var(--text-accent);
  cursor: default;
  font-weight: 600;
}

.decision-option.not-chosen {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.decision-option.resolving {
  opacity: 0.6;
  pointer-events: none;
}

.decision-resolved-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: var(--space-3);
  text-align: center;
}

/* ============================================================
   17. Responsive — Collapse Side Panels
   ============================================================ */
@media (max-width: 900px) {
  .panel-stats,
  .panel-relationships {
    width: 200px;
    min-width: 200px;
  }
}

@media (max-width: 700px) {
  .main-panels {
    flex-direction: column;
  }

  .panel-stats,
  .panel-relationships {
    width: 100%;
    min-width: 100%;
    max-height: 30vh;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid var(--border);
  }

  .panel-relationships {
    border-bottom: none;
    border-top: 1px solid var(--border);
  }

  .panel-journal {
    padding: var(--space-3);
  }

  .status-bar-top {
    font-size: 10px;
    padding: 0 var(--space-2);
    gap: var(--space-2);
  }

  .decision-card {
    padding: var(--space-4);
  }

  .decision-prompt {
    font-size: 15px;
  }

  .decision-option {
    font-size: 14px;
    padding: var(--space-2) var(--space-3);
  }

  .btn-simulate {
    font-size: 10px;
    padding: var(--space-1) var(--space-3);
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  body {
    height: auto;
    overflow: auto;
  }

  .main-panels {
    min-height: 0;
  }

  .panel-stats,
  .panel-relationships {
    max-height: none;
  }

  .panel-journal {
    min-height: 60vh;
  }

  .status-bar-top {
    flex-wrap: wrap;
    height: auto;
    min-height: 36px;
    padding: var(--space-1) var(--space-2);
  }
}
