/* =====================================================
   A&R STARS — Gritty Street Aesthetic
   ===================================================== */

:root {
  --bg-dark: #0a0a0a;
  --bg-panel: #1a1a2e;
  --bg-card: #12121e;
  --accent: #39FF14;
  --accent-glow: rgba(57, 255, 20, 0.4);
  --gold: #FFD700;
  --danger: #FF3333;
  --fame-purple: #9B59B6;
  --text-primary: #E8E8E8;
  --text-secondary: #888;
  --text-dim: #555;
  --border-color: #2a2a3e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Chakra Petch', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Noise Overlay */
#noise-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* =====================================================
   SCREENS
   ===================================================== */
.screen {
  display: none;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow-y: auto;
}
.screen.active { display: flex; }

/* =====================================================
   TITLE SCREEN
   ===================================================== */
#screen-title {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0a 70%);
}

.title-logo {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(3rem, 10vw, 7rem);
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow), 0 0 80px var(--accent-glow);
  letter-spacing: 0.1em;
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { text-shadow: 0 0 40px var(--accent-glow), 0 0 80px var(--accent-glow); }
  50% { text-shadow: 0 0 60px var(--accent-glow), 0 0 120px var(--accent-glow), 0 0 160px var(--accent-glow); }
}

.title-subtitle {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.8rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  letter-spacing: 0.5em;
  margin: 0.5rem 0 2rem;
}

.title-tagline {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 3rem;
  font-style: italic;
}

.title-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.title-footer {
  position: absolute;
  bottom: 2rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 2rem;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s;
  position: relative;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-primary { background: var(--accent); color: var(--bg-dark); }
.btn-primary:hover { background: transparent; color: var(--accent); }

.btn-secondary { border-color: var(--text-dim); color: var(--text-secondary); }
.btn-secondary:hover { border-color: var(--text-primary); color: var(--text-primary); background: rgba(255,255,255,0.05); box-shadow: none; }

.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; box-shadow: 0 0 20px rgba(255,51,51,0.4); }

.btn-glow { box-shadow: 0 0 15px var(--accent-glow); }

.btn-large { font-size: 1.1rem; padding: 1rem 3rem; margin-top: 2rem; }
.btn-small { font-size: 0.7rem; padding: 0.4rem 1rem; }
.btn-full { width: 100%; margin-bottom: 0.75rem; }

/* =====================================================
   CHARACTER CREATION
   ===================================================== */
#screen-create {
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  padding-bottom: 6rem;
  overflow-y: auto;
}

.create-container {
  max-width: 800px;
  width: 100%;
}

.section-title {
  font-family: 'Permanent Marker', cursive;
  font-size: 2rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 0 20px var(--accent-glow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group select {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1rem;
  padding: 0.75rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.form-group input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-panel);
  border-radius: 3px;
  outline: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
}

.range-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.5rem;
  color: var(--accent);
  text-align: center;
  margin-top: 0.25rem;
}

/* Backstory Cards */
.backstory-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.backstory-card {
  cursor: pointer;
}

.backstory-card input { display: none; }

.backstory-content {
  padding: 1rem;
  background: var(--bg-panel);
  border: 2px solid var(--border-color);
  transition: all 0.2s;
}

.backstory-card input:checked + .backstory-content {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.backstory-content:hover {
  border-color: var(--text-dim);
}

.backstory-content strong {
  font-family: 'Permanent Marker', cursive;
  color: var(--accent);
  font-size: 0.9rem;
}

.backstory-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0.5rem 0;
}

/* Game Mode Selector */
.mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mode-card {
  cursor: pointer;
}

.mode-card input { display: none; }

.mode-content {
  padding: 1.2rem;
  background: var(--bg-panel);
  border: 2px solid var(--border-color);
  transition: all 0.2s;
  height: 100%;
}

.mode-card input:checked + .mode-content {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.mode-content:hover {
  border-color: var(--text-dim);
}

.mode-content strong {
  font-family: 'Permanent Marker', cursive;
  color: var(--accent);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.5rem;
}

.mode-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0.5rem 0;
  line-height: 1.5;
}

.mode-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-family: 'Share Tech Mono', monospace;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
}

.mode-tag-classic {
  background: rgba(57, 255, 20, 0.15);
  color: #39FF14;
  border: 1px solid rgba(57, 255, 20, 0.3);
}

.mode-tag-uncensored {
  background: rgba(255, 45, 107, 0.15);
  color: #FF2D6B;
  border: 1px solid rgba(255, 45, 107, 0.3);
}

.mode-card:nth-child(2) input:checked + .mode-content {
  border-color: #FF2D6B;
  box-shadow: 0 0 15px rgba(255, 45, 107, 0.4);
}

.mode-card:nth-child(2) .mode-content strong {
  color: #FF2D6B;
}

.backstory-stats {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Color Swatches */
.color-options {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.color-swatch {
  cursor: pointer;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.color-swatch input { display: none; }

.swatch {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--swatch-color);
  margin: 0 auto 0.25rem;
  border: 3px solid transparent;
  transition: all 0.2s;
}

.color-swatch input:checked + .swatch {
  border-color: #fff;
  box-shadow: 0 0 20px var(--swatch-color);
  transform: scale(1.2);
}

/* =====================================================
   LOAD GAME SCREEN
   ===================================================== */
#screen-load {
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  overflow-y: auto;
}

.load-container {
  max-width: 600px;
  width: 100%;
}

.saves-list { margin-bottom: 2rem; }

.save-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.save-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.save-info h3 {
  font-family: 'Permanent Marker', cursive;
  color: var(--accent);
  font-size: 1.1rem;
}

.save-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.save-actions { display: flex; gap: 0.5rem; }

.save-delete {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  cursor: pointer;
  font-family: 'Chakra Petch', sans-serif;
}

.save-delete:hover { background: var(--danger); color: #fff; }

.no-saves {
  text-align: center;
  color: var(--text-dim);
  padding: 3rem 0;
  font-style: italic;
}

/* =====================================================
   GAME SCREEN
   ===================================================== */
#screen-game {
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  min-height: 48px;
  flex-shrink: 0;
}

.header-left { display: flex; align-items: center; gap: 1rem; }

.logo-small {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.2rem;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

.header-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.header-right { display: flex; gap: 0.5rem; }

/* Game Layout */
.game-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Stats Panel */
.stats-panel {
  width: 240px;
  min-width: 240px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stats-panel h3 {
  font-family: 'Permanent Marker', cursive;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* Stat Bars */
.stat-bar { margin-bottom: 0.6rem; }

.stat-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.stat-icon { font-size: 0.8rem; }

.stat-track {
  height: 8px;
  background: #1a1a1a;
  border: 1px solid #333;
  position: relative;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.8s ease, background 0.3s;
  box-shadow: inset 0 0 8px rgba(255,255,255,0.1);
  position: relative;
}

/* Segmented look like VU meters */
.stat-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 4px,
    rgba(0,0,0,0.3) 4px,
    rgba(0,0,0,0.3) 5px
  );
}

.stress-fill { background: var(--danger); }
.health-fill { background: #2ECC71; }

.stat-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
  text-align: right;
  margin-top: 0.1rem;
}

/* Status Ranking */
.status-section {
  text-align: center;
  padding: 0.5rem 0.75rem;
}
.status-label {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.2rem;
}
.status-title {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: opacity 0.3s, text-shadow 0.5s;
}
.status-title.glow {
  text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent), 0 0 40px var(--accent);
  animation: statusGlow 2s ease-out forwards;
}
@keyframes statusGlow {
  0% { text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent), 0 0 40px var(--accent); }
  100% { text-shadow: 0 0 4px rgba(168, 85, 247, 0.3); }
}
.status-title.fade-out {
  opacity: 0;
}
.status-title.status-glitch {
  animation: statusGlitch 0.5s steps(4) forwards;
}
@keyframes statusGlitch {
  0% { opacity: 1; transform: translate(0); }
  20% { opacity: 0.5; transform: translate(-2px, 1px); color: #ef4444; }
  40% { opacity: 0.8; transform: translate(3px, -1px); }
  60% { opacity: 0.3; transform: translate(-1px, 2px); color: #ef4444; }
  80% { opacity: 0.6; transform: translate(2px, -2px); }
  100% { opacity: 0; transform: translate(0); }
}
.screen-shake {
  animation: screenShake 0.5s ease-out;
}
@keyframes screenShake {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-4px, 2px); }
  20% { transform: translate(4px, -2px); }
  30% { transform: translate(-3px, 1px); }
  40% { transform: translate(3px, -1px); }
  50% { transform: translate(-2px, 2px); }
  60% { transform: translate(2px, -1px); }
  70% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, 0); }
}

/* Fame Section */
.fame-section {
  text-align: center;
  padding: 0.75rem;
  background: rgba(155, 89, 182, 0.1);
  border: 1px solid rgba(155, 89, 182, 0.3);
}

.fame-label {
  font-family: 'Permanent Marker', cursive;
  font-size: 0.9rem;
  color: var(--fame-purple);
  margin-bottom: 0.5rem;
}

.fame-track {
  height: 12px;
  background: #1a1a1a;
  border: 1px solid rgba(155, 89, 182, 0.4);
  margin-bottom: 0.3rem;
  overflow: hidden;
}

.fame-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fame-purple), #E74C3C, var(--gold));
  width: 0%;
  transition: width 1s ease;
  box-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
}

.fame-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 0 10px rgba(155, 89, 182, 0.6), 0 0 4px rgba(0,0,0,0.8);
}

/* Meta Info */
.meta-section {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
}

.meta-label { color: var(--text-dim); letter-spacing: 0.1em; }
.meta-value { font-family: 'Share Tech Mono', monospace; color: var(--text-primary); }

/* Money panel (income system) — data from GET /api/game/money/:id */
.money-panel { font-size: 0.75rem; color: var(--text-secondary); }
.money-row { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.2rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.money-row .money-label { color: var(--text-dim); letter-spacing: 0.05em; }
.money-row .money-value { font-family: 'Share Tech Mono', monospace; color: var(--text-primary); text-align: right; }
.money-runway.red { color: var(--danger); }
.money-runway.amber { color: #FFB347; }
.money-runway.ok { color: var(--accent); }
.money-sub { font-size: 0.7rem; color: var(--text-dim); padding: 0.15rem 0 0.15rem 0.5rem; }
.money-ledger { margin-top: 0.3rem; max-height: 140px; overflow: auto; }
.money-ledger .money-row { font-size: 0.7rem; }
.money-ledger .pos { color: var(--accent); }
.money-ledger .neg { color: var(--danger); }
.money-head { margin-top: 0.45rem; font-size: 0.65rem; letter-spacing: 0.12em; color: var(--accent); opacity: 0.85; }
.choice-btn.deal { border-color: rgba(255, 200, 80, 0.45); }
.choice-btn.deal .choice-id { color: #FFC850; }
.money-toggle { background: none; border: none; color: var(--text-dim); font-size: 0.7rem; cursor: pointer; padding: 0.2rem 0; letter-spacing: 0.1em; }
.choice-btn.bailout { border-left: 3px solid #FFB347; }
.choice-btn.team { border-left: 3px solid #39FF14; }
.income-tag.team-tag { color: #39FF14; }
.team-hire { font: inherit; font-size: 0.68rem; letter-spacing: 0.05em; color: #39FF14; background: transparent; border: 1px solid rgba(57,255,20,0.45); border-radius: 4px; padding: 0.1rem 0.4rem; cursor: pointer; }
.team-hire:hover { background: rgba(57,255,20,0.12); }
.choice-btn.bailout .choice-id { color: #FFB347; }
/* Term-sheet card (deal offers): every line, locked rows for unread clauses, Sign / Decline / Ask counsel */
.term-sheet { border: 1px solid rgba(255, 200, 80, 0.55); background: var(--bg-card); padding: 0.75rem 1rem; margin-bottom: 0.25rem; box-shadow: 0 0 12px rgba(255, 200, 80, 0.12); }
.term-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.term-party { font-family: 'Permanent Marker', cursive; font-size: 1.15rem; color: #FFC850; }
.term-label { font-family: 'Share Tech Mono', monospace; font-size: 0.75rem; color: var(--text-secondary); letter-spacing: 0.04em; text-transform: uppercase; }
.term-sub { font-size: 0.72rem; color: var(--text-dim); margin: 0.15rem 0 0.5rem; font-family: 'Share Tech Mono', monospace; }
.term-rows { display: flex; flex-direction: column; gap: 0.2rem; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 0.45rem 0; }
.term-row { display: flex; gap: 0.5rem; font-size: 0.82rem; line-height: 1.35; }
.term-mark { min-width: 1.1rem; text-align: center; color: #FFC850; }
.term-row.locked { color: var(--text-dim); font-style: italic; border: 1px dashed rgba(255, 200, 80, 0.35); padding: 0.15rem 0.35rem; margin: 0.1rem 0; }
.term-row.locked .term-mark { color: var(--text-dim); }
.term-note { font-size: 0.72rem; color: #FFC850; margin-top: 0.45rem; font-family: 'Share Tech Mono', monospace; }
.term-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.term-action { flex: 1 1 140px; font-family: 'Chakra Petch', sans-serif; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em; padding: 0.55rem 0.7rem; cursor: pointer; border: 1px solid var(--border-color); background: transparent; color: var(--text-primary); transition: all 0.2s; }
.term-action.sign { border-color: #FFC850; color: #FFC850; }
.term-action.sign:hover { background: #FFC850; color: var(--bg-dark); box-shadow: 0 0 10px rgba(255, 200, 80, 0.4); }
.term-action.decline { border-color: var(--text-dim); color: var(--text-secondary); }
.term-action.decline:hover { border-color: var(--text-primary); color: var(--text-primary); }
.term-action.counsel { border-color: var(--accent); color: var(--accent); }
.term-action.counsel:hover { background: var(--accent); color: var(--bg-dark); box-shadow: 0 0 10px var(--accent-glow); }
.term-action:active { transform: scale(0.99); }
.term-action.counter { border-color: #7FD1FF; color: #7FD1FF; }
.term-action.counter:hover { background: #7FD1FF; color: var(--bg-dark); box-shadow: 0 0 10px rgba(127, 209, 255, 0.4); }
.term-action.locked, .term-action.locked:hover { border-color: var(--border-color); color: var(--text-dim); background: transparent; box-shadow: none; cursor: not-allowed; opacity: 0.8; }
.term-note.dim { color: var(--text-dim); }
.catalog-sheet { border-color: rgba(127, 209, 255, 0.5); box-shadow: 0 0 12px rgba(127, 209, 255, 0.1); }
.catalog-sheet .term-party { color: #7FD1FF; }
.catalog-sheet .term-row strong { color: var(--text-primary); font-weight: 600; margin-right: 0.25rem; }
/* Age gate overlay (Uncensored) */
.age-gate .age-gate-text { color: var(--text-secondary); font-size: 0.9rem; margin: 0.5rem 0; }
.age-gate .age-gate-list { text-align: left; margin: 0.5rem auto 0.75rem; padding-left: 1.25rem; color: var(--text-primary); font-size: 0.85rem; line-height: 1.5; max-width: 360px; }
.age-gate .age-gate-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 0.75rem; }
.income-tag { display: inline-block; font-size: 0.68rem; font-family: 'Share Tech Mono', monospace; color: var(--accent); border: 1px solid rgba(57,255,20,0.35); border-radius: 3px; padding: 0 0.3rem; margin-top: 0.2rem; }

/* Inventory */
.inventory-section ul,
.relationships-section ul {
  list-style: none;
  font-size: 0.75rem;
}

.inventory-section li,
.relationships-section li {
  padding: 0.2rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.inventory-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border-left: 2px solid #888;
  padding-left: 0.4rem;
  transition: border-color 0.3s;
  cursor: default;
}

.item-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-sentimental {
  color: #ff6b8a;
  font-size: 0.6rem;
  margin-left: 0.2rem;
  flex-shrink: 0;
}

/* Rarity tiers */
.rarity-common { color: var(--text-secondary); }
.rarity-uncommon { color: #b0ffb0; }
.rarity-rare { color: #a0dfff; }
.rarity-epic { color: #d4a0ff; }
.rarity-legendary { color: #FFD700; }

.rarity-legendary .item-name {
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.rarity-epic .item-name {
  text-shadow: 0 0 6px rgba(177, 78, 255, 0.3);
}

.inventory-empty {
  color: var(--text-dim);
  font-style: italic;
}

.relationships-section li .npc-name {
  color: var(--accent);
  font-weight: 600;
}

.relationships-section li .npc-role {
  color: var(--text-dim);
  font-size: 0.65rem;
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.game-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Narrative Panel */
.narrative-panel {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.narrative-text {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
}

.narrative-text p {
  margin-bottom: 1rem;
}

.narrative-text .dialogue {
  color: #4ade80;
  font-style: italic;
}

/* Choices Panel */
.choices-panel {
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-panel);
  flex-shrink: 0;
}

.choices-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 700px;
  margin: 0 auto 1rem;
}

.choice-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.9rem;
  text-align: left;
  transition: all 0.2s;
  width: 100%;
}

.choice-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  transform: translateX(4px);
}

.choice-btn:active { transform: translateX(2px) scale(0.99); }

.choice-id {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.1rem;
  color: var(--accent);
  min-width: 24px;
}

.choice-text { flex: 1; }

.choice-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.25rem;
}

/* Free Action */
.free-action {
  display: flex;
  gap: 0.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.free-action input {
  flex: 1;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  outline: none;
}

.free-action input:focus {
  border-color: var(--accent);
}

.free-action input::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

/* Loading — Vinyl + EQ */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.loading-vinyl {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    var(--accent) 0%, var(--accent) 8%,
    #111 9%, #111 12%,
    #1a1a1a 13%, #1a1a1a 20%,
    #111 21%, #111 24%,
    #1a1a1a 25%, #1a1a1a 35%,
    #111 36%, #111 39%,
    #1a1a1a 40%, #1a1a1a 48%,
    #222 49%, #222 100%
  );
  border: 3px solid #333;
  animation: vinylSpin 2s linear infinite;
  box-shadow: 0 0 20px rgba(0,0,0,0.5), 0 0 10px var(--accent-glow);
}

@keyframes vinylSpin { to { transform: rotate(360deg); } }

.loading-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 30px;
}

.loading-eq .eq-bar {
  width: 4px;
  background: var(--accent);
  animation: eqBounce 0.8s ease-in-out infinite alternate;
  box-shadow: 0 0 4px var(--accent-glow);
  border-radius: 1px;
}

.loading-eq .eq-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.loading-eq .eq-bar:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.loading-eq .eq-bar:nth-child(3) { height: 90%; animation-delay: 0.2s; }
.loading-eq .eq-bar:nth-child(4) { height: 50%; animation-delay: 0.3s; }
.loading-eq .eq-bar:nth-child(5) { height: 80%; animation-delay: 0.15s; }
.loading-eq .eq-bar:nth-child(6) { height: 40%; animation-delay: 0.25s; }
.loading-eq .eq-bar:nth-child(7) { height: 70%; animation-delay: 0.05s; }
.loading-eq .eq-bar:nth-child(8) { height: 55%; animation-delay: 0.35s; }

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

/* Loading feed: the engine's clock vignette and the ticking clout feed sit above the spinner */
.loading-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
}
.loading-vignette {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.loading-clout {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  font-size: 0.8rem;
  color: var(--text-dim);
  overflow: hidden;
  white-space: nowrap;
}
.loading-clout-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  animation: loadingPulse 1.2s ease-in-out infinite;
  flex: none;
}
.loading-clout-label {
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--accent);
  flex: none;
}
#loading-clout-post { overflow: hidden; text-overflow: ellipsis; }
#loading-clout-post.tick { animation: cloutTick 0.5s ease-out; }
@keyframes cloutTick {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.loading-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-dim);
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Streaming cursor */
.streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.6s step-end infinite;
}

.hidden { display: none !important; }

/* =====================================================
   OVERLAYS
   ===================================================== */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.overlay-content {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.overlay-wide { max-width: 600px; }

/* Song Log */
.songlog-list { margin-bottom: 1.5rem; }

.song-card {
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.song-title {
  font-family: 'Permanent Marker', cursive;
  color: var(--accent);
  font-size: 0.95rem;
}

.song-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  display: flex;
  gap: 1rem;
  margin-top: 0.25rem;
}

.song-lyrics {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.5rem;
  white-space: pre-line;
}

/* Achievements */
.achievements-list { margin-bottom: 1.5rem; }

.achievement-item {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.achievement-item .ach-name {
  color: var(--gold);
  font-weight: 700;
}

.achievement-item.locked {
  color: var(--text-dim);
  font-style: italic;
}

/* =====================================================
   ENDING SCREEN
   ===================================================== */
#screen-ending {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  text-align: center;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0a 70%);
}

.ending-container { max-width: 700px; width: 100%; }

.ending-title {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
  margin-bottom: 0.5rem;
}

.ending-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-style: italic;
}

.ending-narrative {
  text-align: left;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.ending-narrative p { margin-bottom: 1rem; }

.ending-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}

.ending-stat {
  padding: 1rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
}

.ending-stat .es-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.5rem;
  color: var(--accent);
}

.ending-stat .es-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.ending-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1.25rem;
  background: var(--bg-panel);
  border-left: 3px solid var(--accent);
  color: var(--text-primary);
  font-size: 0.85rem;
  animation: slideIn 0.3s ease, fadeOut 0.5s 3s ease forwards;
  max-width: 300px;
}

.toast.achievement { border-color: var(--gold); }
.toast.danger { border-color: var(--danger); }
.toast.phase { border-color: var(--fame-purple); }

.toast-title {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
  color: var(--accent);
}

.toast.achievement .toast-title { color: var(--gold); }
.toast.danger .toast-title { color: var(--danger); }
.toast.phase .toast-title { color: var(--fame-purple); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(50%); }
}

/* =====================================================
   STAT CHANGE ANIMATIONS
   ===================================================== */
.stat-change-indicator {
  position: absolute;
  right: 0;
  top: -8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  animation: floatUp 1.5s ease forwards;
  pointer-events: none;
}

.stat-change-indicator.positive { color: var(--accent); }
.stat-change-indicator.negative { color: var(--danger); }

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* Screen transition flash */
.screen-flash {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  z-index: 500;
  animation: flashBang 0.4s ease;
}

@keyframes flashBang {
  0% { opacity: 0.6; }
  100% { opacity: 0; }
}

/* =====================================================
   MOBILE RESPONSIVE
   ===================================================== */
.mobile-stats-toggle {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
  font-family: 'Permanent Marker', cursive;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg-dark);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 15px var(--accent-glow);
}

@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .backstory-options { grid-template-columns: 1fr; }
  .mode-options { grid-template-columns: 1fr; }

  .game-layout { flex-direction: column; }

  .stats-panel {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 100%;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .stats-panel.mobile-open {
    transform: translateX(0);
  }

  .mobile-stats-toggle { display: block; }

  .game-main { width: 100%; }

  .narrative-panel { padding: 1rem; }

  .narrative-text { max-width: 100%; }

  .choices-panel { padding: 0.75rem 1rem; }

  .choice-btn { font-size: 0.85rem; padding: 0.6rem 0.75rem; }

  .overlay-content { padding: 1.5rem; width: 95%; }

  #screen-create {
    padding: 1.5rem;
    padding-bottom: 6rem;
  }

  .title-subtitle {
    letter-spacing: 0.3em;
  }
}

@media (max-width: 480px) {
  .title-logo { font-size: 2.5rem; }

  .game-header {
    padding: 0.4rem 0.75rem;
  }

  .header-artist { display: none; }

  .narrative-text {
    font-size: 0.92rem;
    line-height: 1.7;
  }

  .choice-btn {
    font-size: 0.82rem;
    padding: 0.55rem 0.7rem;
  }

  .btn-large {
    font-size: 0.95rem;
    padding: 0.8rem 2rem;
    margin-top: 1.5rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .create-container {
    padding: 0 0.5rem;
  }

  #screen-create {
    padding: 1rem;
    padding-bottom: 6rem;
  }

  .title-tagline {
    font-size: 0.85rem;
    margin-bottom: 2rem;
  }

  .title-buttons {
    flex-direction: column;
    width: 80%;
  }

  .title-buttons .btn {
    width: 100%;
  }
}

/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-color); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* =====================================================
   TYPEWRITER EFFECT
   ===================================================== */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* =====================================================
   STORY ANIMATIONS — Mood & Event FX
   ===================================================== */

/* --- Mood Vignette Overlay --- */
#mood-vignette {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 400;
  opacity: 0;
  transition: opacity 1.2s ease, background 1.5s ease;
}

#mood-vignette.active { opacity: 1; }

#mood-vignette.mood-danger {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(255, 30, 30, 0.15) 100%);
}
#mood-vignette.mood-success {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(57, 255, 20, 0.1) 100%);
}
#mood-vignette.mood-hype {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(155, 89, 182, 0.12) 100%);
}
#mood-vignette.mood-money {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(255, 215, 0, 0.12) 100%);
}
#mood-vignette.mood-sad {
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 80, 180, 0.15) 100%);
}
#mood-vignette.mood-tension {
  background: radial-gradient(ellipse at center, transparent 30%, rgba(200, 50, 0, 0.12) 100%);
}

/* --- Narrative Paragraph Entrance --- */
.narrative-text p {
  opacity: 0;
  transform: translateY(12px);
  animation: narrativeFadeIn 0.6s ease forwards;
}

.narrative-text p:nth-child(1) { animation-delay: 0.1s; }
.narrative-text p:nth-child(2) { animation-delay: 0.3s; }
.narrative-text p:nth-child(3) { animation-delay: 0.5s; }
.narrative-text p:nth-child(4) { animation-delay: 0.7s; }
.narrative-text p:nth-child(5) { animation-delay: 0.9s; }
.narrative-text p:nth-child(6) { animation-delay: 1.1s; }

/* During streaming, don't delay — show immediately */
.narrative-text.streaming p {
  animation: none;
  opacity: 1;
  transform: none;
}

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

/* --- Screen Shake --- */
.fx-shake .narrative-panel {
  animation: screenShake 0.5s ease;
}

@keyframes screenShake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-6px) rotate(-0.5deg); }
  20% { transform: translateX(5px) rotate(0.5deg); }
  30% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  50% { transform: translateX(-2px); }
  60% { transform: translateX(2px); }
  70% { transform: translateX(-1px); }
}

/* --- Impact Flash (white-hot moment) --- */
.fx-impact::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 450;
  animation: impactFlash 0.3s ease;
}

@keyframes impactFlash {
  0% { opacity: 0.4; }
  100% { opacity: 0; }
}

/* --- Danger Pulse (red edges) --- */
.fx-danger-pulse::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 410;
  box-shadow: inset 0 0 80px rgba(255, 30, 30, 0.4);
  animation: dangerPulse 1.5s ease;
  opacity: 0;
}

@keyframes dangerPulse {
  0% { opacity: 0; }
  20% { opacity: 1; }
  60% { opacity: 0.6; }
  100% { opacity: 0; }
}

/* --- Success Glow (accent color edges) --- */
.fx-success-glow::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 410;
  box-shadow: inset 0 0 60px var(--accent-glow);
  animation: successGlow 2s ease;
  opacity: 0;
}

@keyframes successGlow {
  0% { opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 0.5; }
  100% { opacity: 0; }
}

/* --- Money Rain Particle --- */
.money-particle {
  position: fixed;
  font-size: 1.2rem;
  pointer-events: none;
  z-index: 420;
  animation: moneyFall 2.5s ease-in forwards;
  opacity: 0.8;
  color: var(--gold);
  font-family: 'Share Tech Mono', monospace;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

@keyframes moneyFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0.9; }
  70% { opacity: 0.6; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* --- Money Loss (red falling) --- */
.money-loss-particle {
  position: fixed;
  font-size: 1rem;
  pointer-events: none;
  z-index: 420;
  animation: moneyDrain 2s ease-in forwards;
  opacity: 0.7;
  color: var(--danger);
  font-family: 'Share Tech Mono', monospace;
}

@keyframes moneyDrain {
  0% { transform: translateY(0) scale(1); opacity: 0.8; }
  100% { transform: translateY(80vh) scale(0.5); opacity: 0; }
}

/* --- Hype Burst (sparkle outward) --- */
.fx-hype-burst::after {
  content: '';
  position: fixed;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 415;
  background: radial-gradient(circle, var(--accent-glow), transparent);
  animation: hypeBurst 1s ease-out forwards;
  transform: translate(-50%, -50%);
}

@keyframes hypeBurst {
  0% { width: 0; height: 0; opacity: 0.8; }
  100% { width: 120vw; height: 120vw; opacity: 0; }
}

/* --- Slow Zoom (tension) --- */
.fx-tension .narrative-panel {
  animation: tensionZoom 3s ease-in-out;
}

@keyframes tensionZoom {
  0% { transform: scale(1); }
  50% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

/* --- Fade to Black (dramatic pause) --- */
.fx-fade-black::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: black;
  pointer-events: none;
  z-index: 430;
  animation: fadeToBlack 2.5s ease;
}

@keyframes fadeToBlack {
  0% { opacity: 0; }
  40% { opacity: 0.7; }
  60% { opacity: 0.7; }
  100% { opacity: 0; }
}

/* --- Cinematic Bars (phase transitions) --- */
.cinematic-bars .cinematic-bar-top,
.cinematic-bars .cinematic-bar-bottom {
  position: fixed;
  left: 0; right: 0;
  height: 0;
  background: black;
  z-index: 440;
  pointer-events: none;
  animation: cinematicBarIn 3s ease forwards;
}

.cinematic-bars .cinematic-bar-top { top: 0; }
.cinematic-bars .cinematic-bar-bottom { bottom: 0; }

@keyframes cinematicBarIn {
  0% { height: 0; }
  20% { height: 60px; }
  80% { height: 60px; }
  100% { height: 0; }
}

/* --- Choice Entrance --- */
.choice-btn {
  opacity: 0;
  transform: translateX(-20px);
  animation: choiceSlideIn 0.4s ease forwards;
}

.choice-btn:nth-child(1) { animation-delay: 0.1s; }
.choice-btn:nth-child(2) { animation-delay: 0.25s; }
.choice-btn:nth-child(3) { animation-delay: 0.4s; }

@keyframes choiceSlideIn {
  0% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* =====================================================
   SCENE HEADER
   ===================================================== */
.scene-header {
  padding: 0.5rem 2rem 0;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

#scene-location {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  opacity: 0.7;
  letter-spacing: 0.05em;
}

/* =====================================================
   SOCIAL TICKER
   ===================================================== */
.social-ticker {
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.social-ticker-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
  padding-left: 100%;
}

.social-ticker-track span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.social-ticker-track .ticker-username {
  color: var(--accent);
  font-weight: 600;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* =====================================================
   PHASE PROGRESS BAR
   ===================================================== */
.phase-progress-section {
  margin-top: -0.5rem;
}

.phase-progress-bar {
  height: 4px;
  background: #1a1a1a;
  border: 1px solid #333;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.phase-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 1s ease;
  box-shadow: 0 0 6px var(--accent-glow);
}

.phase-progress-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: center;
}

/* =====================================================
   TITLE SCREEN PARTICLES
   ===================================================== */
#title-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.title-container {
  position: relative;
  z-index: 1;
}

/* Breathing glow behind title */
.title-logo {
  position: relative;
}

.title-logo::before {
  content: 'A&R STARS';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: transparent;
  filter: blur(40px);
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.3;
  animation: breatheGlow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes breatheGlow {
  0%, 100% { opacity: 0.2; filter: blur(40px); }
  50% { opacity: 0.5; filter: blur(60px); }
}

/* =====================================================
   TYPEWRITER EFFECT
   ===================================================== */
.title-tagline {
  min-height: 1.5em;
}

.typewriter-pause {
  opacity: 0;
}

/* =====================================================
   STAT PREVIEW ON CHOICES
   ===================================================== */
.choice-stat-preview {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.choice-stat-preview .stat-pip {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  opacity: 0.6;
  white-space: nowrap;
}

.choice-stat-preview .stat-pip.positive { color: var(--accent); }
.choice-stat-preview .stat-pip.negative { color: var(--danger); }

/* Desktop: show on hover */
@media (min-width: 769px) {
  .choice-stat-preview {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
    margin-top: 0;
  }
  .choice-btn:hover .choice-stat-preview {
    max-height: 40px;
    opacity: 1;
    margin-top: 0.4rem;
  }
}

/* =====================================================
   HOMETOWN FLAVOR TEXT
   ===================================================== */
.hometown-flavor {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.4rem;
  min-height: 1.2em;
  transition: opacity 0.3s;
}

/* =====================================================
   STORY LOG / JOURNAL
   ===================================================== */
.storylog-journal-list {
  margin-bottom: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.journal-entry {
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.journal-entry-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.journal-week {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
}

.journal-location {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
}

.journal-narrative {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.4rem;
  /* Truncate long narratives */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.journal-choice {
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.7;
  font-style: italic;
}

/* =====================================================
   MONTHLY SUMMARY
   ===================================================== */
.monthly-summary-content {
  margin-bottom: 1.5rem;
}

.monthly-month-label {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.3rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1rem;
}

.monthly-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.monthly-stat {
  padding: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-align: center;
}

.monthly-stat-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  color: var(--accent);
}

.monthly-stat-value.negative { color: var(--danger); }
.monthly-stat-value.positive { color: var(--accent); }

.monthly-stat-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}

/* =====================================================
   ACHIEVEMENT BANNER
   ===================================================== */
.achievement-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-banner.show {
  transform: translateY(0);
}

.achievement-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 4px 30px rgba(255, 215, 0, 0.2);
}

.achievement-banner-icon {
  font-size: 2rem;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  animation: achieveSpin 1s ease;
}

@keyframes achieveSpin {
  0% { transform: rotateY(0deg) scale(0.5); opacity: 0; }
  50% { transform: rotateY(180deg) scale(1.2); }
  100% { transform: rotateY(360deg) scale(1); opacity: 1; }
}

.achievement-banner-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.15em;
}

.achievement-banner-name {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.2rem;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* =====================================================
   NPC RELATIONSHIP UPGRADE
   ===================================================== */
.npc-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  position: relative;
}

.npc-ring {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.npc-ring.ring-great { border-color: #2ECC71; }
.npc-ring.ring-good { border-color: var(--accent); }
.npc-ring.ring-neutral { border-color: #F39C12; }
.npc-ring.ring-strained { border-color: #E67E22; }
.npc-ring.ring-hostile { border-color: var(--danger); }
.npc-ring.ring-turned { border-color: var(--danger); background: var(--danger); }

.npc-info {
  flex: 1;
  min-width: 0;
}

.npc-info .npc-name {
  font-size: 0.75rem;
  font-weight: 600;
}

.npc-info .npc-role {
  font-size: 0.6rem;
  color: var(--text-dim);
  display: block;
}

.npc-turned-icon {
  font-size: 0.7rem;
  color: var(--danger);
}

.npc-tooltip {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  z-index: 10;
  white-space: nowrap;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.npc-entry:hover .npc-tooltip,
.npc-entry.tooltip-active .npc-tooltip {
  display: block;
}

/* =====================================================
   BACKSTORY STAT ANIMATION
   ===================================================== */
.backstory-stats .stat-fly {
  display: inline-block;
  animation: statFlyIn 0.4s ease forwards;
  opacity: 0;
}

.backstory-stats .stat-fly.positive {
  color: var(--accent);
}

.backstory-stats .stat-fly.negative {
  color: var(--danger);
}

@keyframes statFlyIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   RANDOM ARTIST BUTTON
   ===================================================== */
.create-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =====================================================
   MOBILE RESPONSIVE — NEW ELEMENTS
   ===================================================== */
@media (max-width: 768px) {
  .scene-header {
    padding: 0.5rem 1rem 0;
  }

  .social-ticker {
    height: 28px;
  }

  .social-ticker-track span {
    font-size: 0.7rem;
  }

  .achievement-banner-inner {
    padding: 0.75rem 1rem;
  }

  .achievement-banner-name {
    font-size: 1rem;
  }

  .monthly-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
}

/* =====================================================
   CINEMATIC ENDING EXPERIENCE
   ===================================================== */

/* --- Phase 1: Blackout --- */
.ending-blackout {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  z-index: 5000;
  opacity: 0;
  transition: opacity 1s ease;
}
.ending-blackout.active {
  opacity: 1;
}

/* --- Phase 2: Title Card --- */
.ending-titlecard {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5001;
  text-align: center;
  padding: 2rem;
}

.titlecard-artist {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(3rem, 12vw, 6rem);
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow), 0 0 80px var(--accent-glow);
  animation: titlecardPulse 2s ease-in-out infinite;
  opacity: 0;
  transition: opacity 1s ease;
}
.titlecard-artist.visible { opacity: 1; }

@keyframes titlecardPulse {
  0%, 100% { text-shadow: 0 0 40px var(--accent-glow), 0 0 80px var(--accent-glow); }
  50% { text-shadow: 0 0 60px var(--accent-glow), 0 0 120px var(--accent-glow), 0 0 180px var(--accent-glow); }
}

.titlecard-ending {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(1.5rem, 5vw, 3rem);
  letter-spacing: 0.1em;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 1.5s ease;
}
.titlecard-ending.visible { opacity: 1; }

/* Ending type colors */
.titlecard-ending.ending-win {
  color: #FFD700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
  animation: shimmer 2s ease-in-out infinite;
}
.titlecard-ending.ending-loss {
  color: #CC4444;
  text-shadow: 0 0 10px rgba(204, 68, 68, 0.3);
}
.titlecard-ending.ending-retire {
  color: #88CCFF;
  text-shadow: 0 0 15px rgba(136, 204, 255, 0.4);
  animation: gentleGlow 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3); }
  50% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.7), 0 0 60px rgba(255, 215, 0, 0.5), 0 0 90px rgba(255, 215, 0, 0.2); }
}

@keyframes gentleGlow {
  0%, 100% { text-shadow: 0 0 15px rgba(136, 204, 255, 0.4); }
  50% { text-shadow: 0 0 25px rgba(136, 204, 255, 0.6), 0 0 50px rgba(136, 204, 255, 0.3); }
}

/* --- Phase 3: Highlights Reel --- */
.ending-highlights {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5001;
  padding: 2rem;
}

.highlights-container {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.highlight-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  margin-bottom: 2rem;
}
.highlight-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.highlight-card.exit {
  opacity: 0;
  transform: translateY(-20px);
}

.highlight-week {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.highlight-text {
  font-size: 1.3rem;
  color: #FFFFFF;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.highlight-detail {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.highlight-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* --- Phase 4: Album Credits --- */
.ending-credits {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-dark);
  z-index: 5001;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

.credits-scroll {
  max-width: 600px;
  width: 90%;
  padding: 4rem 0;
  text-align: center;
}

.credits-artist-name {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
  margin-bottom: 0.5rem;
}

.credits-artist-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.credits-divider {
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 2rem auto;
}

.credits-heading {
  font-family: 'Permanent Marker', cursive;
  font-size: 1rem;
  color: #FFD700;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.credits-stats {
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.credits-stat-row {
  display: flex;
  justify-content: space-between;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  border-bottom: 1px dotted rgba(255,255,255,0.1);
}

.credits-stat-label {
  color: var(--text-secondary);
}

.credits-stat-value {
  color: #FFFFFF;
  font-weight: 700;
}

.credits-songs {
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.credits-song-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px dotted rgba(255,255,255,0.1);
}

.credits-song-title {
  font-family: 'Permanent Marker', cursive;
  font-size: 0.9rem;
  color: var(--accent);
}

.credits-song-streams {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.credits-people {
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.credits-person-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px dotted rgba(255,255,255,0.05);
}

.credits-person-heart { font-size: 0.9rem; }
.credits-person-heart.loyal { color: #2ECC71; }
.credits-person-heart.complicated { color: #F39C12; }
.credits-person-heart.broken { color: #E74C3C; }

.credits-person-name {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
}

.credits-person-role {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.credits-person-dayone {
  font-size: 0.6rem;
  color: var(--accent);
  opacity: 0.7;
}

.credits-ending-badge {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
}

.credits-ending-type {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.credits-ending-tagline {
  font-size: 1.1rem;
  color: var(--accent);
  font-style: italic;
  line-height: 1.6;
}

.credits-continue-btn {
  margin-top: 2rem;
}

/* --- Phase 5: Epilogue --- */
.ending-epilogue {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 5001;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

.ending-epilogue.theme-win {
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1208 50%, #0a0a0a 100%);
}
.ending-epilogue.theme-loss {
  background: linear-gradient(180deg, #0a0a0a 0%, #0a0f1a 50%, #0a0a0a 100%);
}
.ending-epilogue.theme-retire {
  background: linear-gradient(180deg, #0a0a0a 0%, #0a1410 50%, #0a0a0a 100%);
}

.epilogue-container {
  max-width: 650px;
  width: 90%;
  padding: 4rem 0;
  text-align: center;
}

.epilogue-text {
  text-align: left;
  font-size: 1.1rem;
  line-height: 2;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 3rem;
}

.epilogue-text p {
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(12px);
  animation: narrativeFadeIn 0.8s ease forwards;
}
.epilogue-text p:nth-child(1) { animation-delay: 0.2s; }
.epilogue-text p:nth-child(2) { animation-delay: 0.6s; }
.epilogue-text p:nth-child(3) { animation-delay: 1.0s; }
.epilogue-text p:nth-child(4) { animation-delay: 1.4s; }
.epilogue-text p:nth-child(5) { animation-delay: 1.8s; }
.epilogue-text p:nth-child(6) { animation-delay: 2.2s; }

/* --- Phase 6: Curtain Call --- */
.ending-curtain {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0a 70%);
  z-index: 5001;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow-y: auto;
}

.curtain-container {
  max-width: 500px;
  width: 90%;
  padding: 2rem 0;
}

.curtain-logo {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
  margin-bottom: 0.25rem;
}

.curtain-subtitle {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
}

.curtain-tagline {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.curtain-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.curtain-share-btn {
  margin-bottom: 2rem;
  border-color: var(--text-dim);
  color: var(--text-secondary);
}
.curtain-share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.curtain-whatif {
  margin-bottom: 2rem;
}

.whatif-question {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: narrativeFadeIn 0.6s ease forwards;
}
.whatif-question:nth-child(1) { animation-delay: 0.5s; }
.whatif-question:nth-child(2) { animation-delay: 1.0s; }
.whatif-question:nth-child(3) { animation-delay: 1.5s; }

.curtain-footer {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 1rem;
  opacity: 0;
  animation: narrativeFadeIn 0.6s ease forwards;
  animation-delay: 2s;
}

/* --- Ending-specific confetti (win endings) --- */
.confetti-particle {
  position: fixed;
  pointer-events: none;
  z-index: 5010;
  font-size: 1.2rem;
  animation: confettiFall 4s ease-in forwards;
  opacity: 0.8;
}

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0.9; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* --- Mobile responsive --- */
@media (max-width: 768px) {
  .titlecard-artist { font-size: clamp(2rem, 10vw, 4rem); }
  .titlecard-ending { font-size: clamp(1.2rem, 4vw, 2rem); }
  .highlight-text { font-size: 1.1rem; }
  .credits-scroll { width: 95%; padding: 2rem 0; }
  .credits-artist-name { font-size: clamp(2rem, 7vw, 3rem); }
  .epilogue-container { width: 95%; padding: 2rem 0; }
  .curtain-container { width: 95%; }
}

/* =====================================================
   MENU USER INFO
   ===================================================== */
.menu-user-info {
  text-align: center;
  padding: 0.5rem 0 1rem 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.5rem;
}

.menu-user-info .username {
  color: #a855f7;
  font-weight: 600;
}

/* =====================================================
   LOGIN / AUTH SCREEN
   ===================================================== */

#screen-login.active {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
}

.login-logo {
  font-family: 'Permanent Marker', cursive;
  font-size: 4rem;
  color: #fff;
  text-shadow: 0 0 30px rgba(168, 85, 247, 0.6), 0 0 60px rgba(168, 85, 247, 0.3);
  margin: 0;
  letter-spacing: 0.1em;
}

.login-tagline {
  font-family: 'Share Tech Mono', monospace;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.login-panels {
  display: flex;
  gap: 2rem;
  max-width: 800px;
  width: 100%;
}

.login-panel {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-panel h2 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-panel > p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin: 0 0 1.5rem 0;
  text-align: center;
}

.login-note {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: auto;
  padding-top: 1rem;
  text-align: center;
}

.guest-panel .login-note {
  margin-top: 1.5rem;
}

.btn-guest {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.9rem 2.5rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.btn-guest:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.auth-tab.active {
  color: #a855f7;
  border-bottom-color: #a855f7;
}

.auth-tab:hover:not(.active) {
  color: rgba(255, 255, 255, 0.6);
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.auth-form.hidden {
  display: none;
}

.auth-form input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.8rem 1rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.9rem;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-form input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.btn-login, .btn-register {
  background: #a855f7;
  color: #fff;
  border: none;
  padding: 0.8rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
  margin-top: 0.3rem;
}

.btn-login:hover, .btn-register:hover {
  background: #9333ea;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-login:disabled, .btn-register:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-error {
  color: #ef4444;
  font-size: 0.8rem;
  text-align: center;
  margin-top: 0.5rem;
  font-family: 'Share Tech Mono', monospace;
}

.auth-error.hidden {
  display: none;
}

/* User display in header */
.user-badge {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0.3rem 0.8rem 0.3rem 1rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.user-badge.hidden {
  display: none;
}

.user-badge .username {
  color: #a855f7;
}

.btn-convert-account {
  background: none;
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #a855f7;
  padding: 0.2rem 0.6rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-convert-account:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: #a855f7;
}

/* Responsive login */
@media (max-width: 768px) {
  .login-panels {
    flex-direction: column;
  }
  .login-logo {
    font-size: 3rem;
  }
  .login-panel {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-logo {
    font-size: 2.5rem;
  }
  .login-tagline {
    font-size: 0.75rem;
    margin-bottom: 2rem;
  }
  .login-panels {
    gap: 1rem;
  }
  .login-panel {
    padding: 1.2rem;
  }
}

/* =====================================================
   TUTORIAL OVERLAY
   ===================================================== */
.tutorial-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  pointer-events: auto;
}
.tutorial-overlay.hidden { display: none; }

.tutorial-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
}

.tutorial-highlight {
  position: absolute;
  border: 2px solid var(--accent, #a855f7);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75), 0 0 20px var(--accent, #a855f7);
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 10000;
}

.tutorial-arrow {
  position: absolute;
  width: 0; height: 0;
  z-index: 10002;
  transition: all 0.4s ease;
}
.tutorial-arrow.arrow-down {
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid var(--accent, #a855f7);
}
.tutorial-arrow.arrow-up {
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 12px solid var(--accent, #a855f7);
}
.tutorial-arrow.arrow-left {
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 12px solid var(--accent, #a855f7);
}
.tutorial-arrow.arrow-right {
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 12px solid var(--accent, #a855f7);
}

.tutorial-card {
  position: absolute;
  z-index: 10001;
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid var(--accent, #a855f7);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  max-width: 340px;
  min-width: 260px;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
  transition: all 0.4s ease;
}

.tutorial-step-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 0.8rem;
}
.tutorial-step-indicator .step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s;
}
.tutorial-step-indicator .step-dot.active {
  background: var(--accent, #a855f7);
}
.tutorial-step-indicator .step-dot.done {
  background: rgba(168, 85, 247, 0.4);
}

.tutorial-content h3 {
  font-family: 'Permanent Marker', cursive;
  font-size: 1rem;
  color: var(--accent, #a855f7);
  margin-bottom: 0.5rem;
}
.tutorial-content p {
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.8);
  margin: 0;
}

.tutorial-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}
.tutorial-skip {
  opacity: 0.5;
  font-size: 0.7rem !important;
}
.tutorial-skip:hover { opacity: 1; }
.tutorial-next {
  font-size: 0.8rem !important;
  padding: 0.4rem 1.2rem !important;
}

@media (max-width: 768px) {
  .tutorial-card {
    max-width: 280px;
    min-width: 220px;
    padding: 1rem;
  }
  .tutorial-content h3 { font-size: 0.9rem; }
  .tutorial-content p { font-size: 0.75rem; }
}

/* =====================================================
   STORY MODE
   ===================================================== */

/* Story Mode Button */
.btn-story {
  border-color: #B14EFF;
  color: #B14EFF;
  background: transparent;
}
.btn-story:hover {
  background: #B14EFF;
  color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(177, 78, 255, 0.4);
}

/* Story Create Screen */
#screen-story-create {
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  padding-bottom: 6rem;
  overflow-y: auto;
}

.story-create-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* Story Path Selector */
.story-path-selector {
  margin-bottom: 2rem;
}

.story-path-card {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.story-path-card:hover {
  border-color: #B14EFF;
}
.story-path-card.selected {
  border-color: #B14EFF;
  box-shadow: 0 0 15px rgba(177, 78, 255, 0.3);
}
.story-path-card input[type="radio"] {
  display: none;
}
.story-path-content strong {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.1rem;
  color: #B14EFF;
}
.story-path-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.25rem 0;
}
.story-path-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
}

.story-path-locked {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.story-path-locked strong {
  color: var(--text-dim);
}

/* Story Game Screen */
#screen-story-game {
  flex-direction: column;
  overflow: hidden;
}

.story-header .header-artist {
  color: #B14EFF;
}

/* Progress Bar */
.story-progress-bar {
  height: 4px;
  background: var(--bg-panel);
  flex-shrink: 0;
}
.story-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #B14EFF, var(--accent));
  width: 0%;
  transition: width 0.8s ease;
}

/* Story Game Layout — sidebar + main */
.story-game-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.story-stats-panel {
  border-right-color: rgba(177, 78, 255, 0.2);
}
.story-stats-panel h3 {
  color: #B14EFF;
}

.story-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

/* Scene Header */
.story-scene-header {
  padding: 0.75rem 2rem;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: #B14EFF;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: all 0.3s;
}

.story-scene-header.location-flash {
  background: #B14EFF;
  color: var(--bg-dark);
  font-size: 1rem;
  text-align: center;
  padding: 1.5rem 2rem;
}

/* Story Narrative Panel */
.story-narrative-panel {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.story-narrative-panel .narrative-text {
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.9;
}

/* Story Choices Panel */
.story-choices-panel {
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-panel);
  flex-shrink: 0;
}

.story-choices-panel .choices-list {
  max-width: 750px;
  margin: 0 auto;
}

/* NPC Intro Badge */
.story-npc-intro {
  display: inline-block;
  background: rgba(177, 78, 255, 0.15);
  border: 1px solid rgba(177, 78, 255, 0.3);
  color: #B14EFF;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Scene Transitions */
.scene-fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.scene-fade-in {
  animation: sceneFadeIn 0.3s ease forwards;
}
@keyframes sceneFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Story Complete Screen */
#screen-story-complete {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  text-align: center;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0a 70%);
}

.story-complete-container {
  max-width: 700px;
  width: 100%;
}

.story-complete-banner {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: #B14EFF;
  text-shadow: 0 0 30px rgba(177, 78, 255, 0.5), 0 0 60px rgba(177, 78, 255, 0.3);
  margin-bottom: 2rem;
  animation: bannerPulse 3s ease-in-out infinite;
}

@keyframes bannerPulse {
  0%, 100% { text-shadow: 0 0 30px rgba(177, 78, 255, 0.5), 0 0 60px rgba(177, 78, 255, 0.3); }
  50% { text-shadow: 0 0 50px rgba(177, 78, 255, 0.7), 0 0 100px rgba(177, 78, 255, 0.4); }
}

.story-complete-narrative {
  text-align: left;
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1rem;
  line-height: 1.8;
}
.story-complete-narrative p {
  margin-bottom: 1rem;
}

/* Summary Stats */
.story-summary-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}
.story-summary-stat {
  text-align: center;
}
.story-summary-value {
  font-family: 'Permanent Marker', cursive;
  font-size: 2rem;
  color: #B14EFF;
}
.story-summary-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.story-complete-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.story-summary-status {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.3rem;
  color: #B14EFF;
  text-shadow: 0 0 15px rgba(177, 78, 255, 0.4);
  margin-top: 0.5rem;
}

/* Stat change indicators */
.stat-change {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
  animation: statChangeFloat 2s ease-out forwards;
  position: absolute;
  right: 0;
  top: -0.5rem;
}
.stat-up { color: var(--accent); }
.stat-down { color: var(--danger); }
.stat-bar { position: relative; }
@keyframes statChangeFloat {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-12px); }
}

/* Load Screen: Section Labels */
.saves-section-label {
  font-family: 'Permanent Marker', cursive;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  padding: 0.75rem 0 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}
.saves-section-label:first-child {
  margin-top: 0;
}

/* Story save cards use purple accent */
.save-card-story .save-info h3 {
  color: #B14EFF;
}
.save-card-story:hover {
  border-color: #B14EFF;
  box-shadow: 0 0 10px rgba(177, 78, 255, 0.3);
}

/* Mobile adjustments for story mode */
@media (max-width: 768px) {
  .story-narrative-panel {
    padding: 1rem;
  }
  .story-narrative-panel .narrative-text {
    font-size: 0.95rem;
  }
  .story-choices-panel {
    padding: 0.75rem 1rem 1rem;
  }
  .story-summary-stats {
    gap: 1rem;
  }
  .story-summary-value {
    font-size: 1.5rem;
  }
  .story-complete-buttons {
    flex-direction: column;
  }
}

/* =====================================================
   GROUP / CREW PANEL
   ===================================================== */
.group-section {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
}

.group-section h3 {
  font-family: 'Permanent Marker', cursive;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.group-name {
  font-family: 'Permanent Marker', cursive;
  font-size: 1rem;
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
  margin-bottom: 0.25rem;
}

.group-type-badge {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  padding: 0.15rem 0.5rem;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.25);
  color: var(--accent);
  border-radius: 2px;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.group-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.group-stat {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.group-stat-label {
  color: var(--text-dim);
  margin-right: 0.3rem;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}

.group-members-list {
  list-style: none;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.group-members-list li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.group-member-icon {
  font-size: 0.7rem;
  width: 1.2rem;
  text-align: center;
}

.group-member-name {
  color: var(--text-primary);
  font-weight: 600;
  flex: 1;
}

.group-member-role {
  color: var(--text-dim);
  font-size: 0.6rem;
  text-transform: capitalize;
}

.group-kick-btn {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.group-kick-btn:hover {
  opacity: 1;
  background: var(--danger);
  color: #fff;
}

.group-actions {
  margin-top: 0.25rem;
}

.household-options .backstory-card.household-hardest { border-color: rgba(255, 45, 107, 0.45); }
.household-options .backstory-card strong .mode-tag { margin-left: 0.4rem; font-size: 0.6rem; vertical-align: middle; }
.meta-item.meta-origin .meta-value { font-size: 0.72rem; }

/* Create screen: save-slot banner above the form (run #4) */
.slot-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 0.75rem 1rem; border: 1px solid var(--danger); border-radius: 6px; background: rgba(255, 51, 51, 0.1); color: var(--danger); font-size: 0.85rem; letter-spacing: 0.04em; }
#create-submit:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* run #5: what's holding fame (sidebar, under the FAME value; same style as the Money panel's RUNWAY sub-line) */
.fame-hint { font-size: 0.68rem; color: var(--text-dim); padding: 0.2rem 0 0 0; line-height: 1.3; text-transform: none; letter-spacing: 0; }
.fame-hint.hidden { display: none; }

/* run #5: the lap's standing RETIRE button, outside the lettered choices */
.lap-retire { margin: 0.75rem 0 0; padding: 0.6rem; border: 1px dashed rgba(255, 200, 80, 0.45); border-radius: 6px; text-align: center; }
.lap-retire.hidden { display: none; }
.lap-retire-btn { width: 100%; }
.lap-retire-note { font-size: 0.68rem; color: var(--text-dim); margin-top: 0.35rem; }

/* run #5: monthly recap released count beside SONGS WRITTEN */
.monthly-stat-sub { font-size: 0.6em; color: var(--text-dim); font-weight: normal; }

/* run #5: the term card after a counter: a label where the dead COUNTERED button was */
.term-countered { display: inline-block; font-size: 0.68rem; color: var(--text-dim); border: 1px dashed rgba(255, 200, 80, 0.35); border-radius: 4px; padding: 0.25rem 0.5rem; letter-spacing: 0.04em; }

/* Story Mode v2 step 0: slot line + banner on the create screen, the one-moment state, the ending career card */
.story-slot-line { font-family: 'Share Tech Mono', monospace; font-size: 0.75rem; color: var(--text-dim); margin: -0.5rem 0 1rem; letter-spacing: 0.04em; }
#story-submit:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.choice-wait { font-family: 'Share Tech Mono', monospace; font-size: 0.8rem; color: #FFC850; border: 1px dashed rgba(255, 200, 80, 0.5); padding: 0.5rem 0.75rem; margin-bottom: 0.5rem; }
.story-complete-card { max-width: 460px; margin: 0 auto 1.5rem; text-align: center; }
.story-complete-card .credits-heading { margin-bottom: 0.5rem; }
.story-complete-card .credits-stat-value { max-width: 60%; text-align: right; }

/* Story Mode v2 step 1: effects pips on choices, locked (stat-gated) choices, the term-sheet card, the Money panel, prologues */
.story-choices-panel .choice-btn .choice-stat-preview { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem; }
.story-choices-panel .choice-btn.locked { opacity: 0.55; cursor: not-allowed; border-style: dashed; }
.story-choices-panel .choice-btn.locked:hover { transform: none; box-shadow: none; }
.choice-lock { font-family: 'Share Tech Mono', monospace; font-size: 0.68rem; color: #FFC850; margin-top: 0.25rem; }
.story-choices-panel .term-sheet { margin-bottom: 0.75rem; }
.story-money-panel, #story-money-panel { font-size: 0.75rem; }
#story-money-panel .money-row.pos .money-value, #story-money-panel .money-value.pos { color: var(--accent); }
#story-money-panel .money-value.neg { color: var(--danger); }
#story-money-panel .money-ledger { max-height: 220px; overflow: auto; }
#story-money-panel .money-toggle { background: none; border: 1px solid var(--border-color); color: var(--text-dim); font-family: 'Share Tech Mono', monospace; font-size: 0.68rem; padding: 0.15rem 0.4rem; margin-top: 0.3rem; cursor: pointer; }
.story-prologue-options { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.story-prologue-group.hidden { display: none; }
.story-week-jump { font-family: 'Share Tech Mono', monospace; font-size: 0.68rem; color: var(--text-dim); margin-left: 0.5rem; }

/* Story Mode v2 step 4: path cards carry genre / origin / reading time tags and a one-line promise */
.story-path-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.3rem 0 0.4rem; }
.story-path-tag { font-family: 'Share Tech Mono', monospace; font-size: 0.65rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: 3px; padding: 0.05rem 0.4rem; }
.story-path-tag.story-path-time { color: var(--accent); border-color: rgba(57,255,20,0.35); }
.story-path-promise { font-style: italic; }

/* A&R v1: the A&R tab, the card's A&R line, DMs on the ticker */
.term-anr { font-size: 0.72rem; color: var(--accent); opacity: 0.9; margin-top: 0.15rem; letter-spacing: 0.04em; }
.anr-tab { margin-top: 0.25rem; }
.anr-thread { border-left: 2px solid var(--accent); padding: 0.3rem 0 0.3rem 0.5rem; margin: 0.35rem 0; }
.anr-head { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-size: 0.75rem; }
.anr-name { font-weight: 600; }
.anr-stage { font-size: 0.65rem; letter-spacing: 0.1em; color: var(--accent); }
.anr-known { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: 0.68rem; margin-top: 0.2rem; }
.anr-known span { background: rgba(255,255,255,0.06); padding: 0.05rem 0.35rem; border-radius: 3px; }
.anr-history, .anr-closed { font-size: 0.66rem; opacity: 0.75; margin-top: 0.2rem; line-height: 1.35; overflow-wrap: anywhere; }
.anr-queued { font-style: italic; }
.anr-alert { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; color: #ff6b6b; border: 1px solid rgba(255,107,107,0.5); padding: 0.3rem 0.45rem; margin: 0.3rem 0; }
.ticker-anr { color: var(--accent); font-weight: 600; }
