/* =====================
   BASE & RESET
   ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0d0d;
  --surface:   #1a1a1a;
  --surface2:  #242424;
  --border:    #2e2e2e;
  --accent:    #e63946;
  --accent2:   #f4a261;
  --gold:      #ffd700;
  --green:     #2a9d8f;
  --text:      #f0f0f0;
  --text-dim:  #888;
  --text-mute: #555;
  --radius:    10px;
  --nav-h:     64px;
  --header-h:  60px;
  --advance-h: 58px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
}

/* =====================
   SCREENS
   ===================== */
.screen { display: none; height: 100vh; height: 100dvh; }
.screen.active { display: flex; flex-direction: column; }

/* =====================
   SETUP SCREEN
   ===================== */
.setup-container {
  flex: 1;
  overflow-y: auto;
  padding: 40px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -1px;
}

.subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: -12px;
}

/* =====================
   FORMS
   ===================== */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); }

input[type="text"], select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
input[type="text"]:focus, select:focus { border-color: var(--accent); }
select option { background: var(--surface2); }

.genre-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.genre-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 10px 6px;
  text-align: center;
  transition: all 0.15s;
}
.genre-btn:hover { border-color: var(--accent); color: var(--text); }
.genre-btn.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* =====================
   BUTTONS
   ===================== */
.btn {
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 20px;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary  { background: var(--accent);  color: #fff; }
.btn-secondary{ background: var(--surface2); color: var(--text); }
.btn-accent   { background: var(--accent2); color: #000; }
.btn-green    { background: var(--green);   color: #fff; }
.btn-large    { padding: 16px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm       { padding: 7px 14px; font-size: 0.82rem; }

/* =====================
   GAME HEADER
   ===================== */
.game-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  flex-shrink: 0;
}

.header-band-name {
  font-size: 1rem;
  font-weight: 700;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-stats { display: flex; gap: 8px; }
.stat-chip {
  background: var(--surface2);
  border-radius: 20px;
  font-size: 0.78rem;
  padding: 4px 10px;
  white-space: nowrap;
}

/* =====================
   GAME MAIN (scrollable content)
   ===================== */
.game-main {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  /* reserve space for advance bar + nav, extra 24px safety margin for mobile browsers */
  padding-bottom: calc(var(--advance-h) + var(--nav-h) + 32px);
}

/* =====================
   TABS
   ===================== */
.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* =====================
   CARDS
   ===================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.card-list { margin-bottom: 4px; }

.musician-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.musician-avatar {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border-radius: 50%;
  flex-shrink: 0;
}

.musician-info { flex: 1; min-width: 0; }
.musician-name { font-weight: 700; font-size: 0.95rem; }
.musician-role { color: var(--text-dim); font-size: 0.8rem; }

.musician-stats {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.stat-badge {
  background: var(--surface2);
  border-radius: 4px;
  font-size: 0.72rem;
  padding: 2px 6px;
  color: var(--text-dim);
}
.stat-badge span { color: var(--text); font-weight: 600; }

.musician-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.wage-tag { font-size: 0.78rem; color: var(--accent2); font-weight: 600; }

.info-card { background: var(--surface2); color: var(--text-dim); font-size: 0.88rem; }

/* =====================
   STUDIO
   ===================== */
.budget-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.budget-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 10px 6px;
  text-align: center;
  transition: all 0.15s;
}
.budget-btn:hover { border-color: var(--accent2); color: var(--text); }
.budget-btn.selected { background: var(--accent2); border-color: var(--accent2); color: #000; font-weight: 700; }

.song-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.song-header { display: flex; justify-content: space-between; align-items: center; }
.song-title { font-weight: 700; }
.song-quality { font-size: 0.82rem; color: var(--text-dim); }

.quality-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  margin: 8px 0;
  overflow: hidden;
}
.quality-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.3s;
}

.song-meta { font-size: 0.8rem; color: var(--text-dim); display: flex; gap: 10px; flex-wrap: wrap; }
.song-actions { margin-top: 10px; display: flex; gap: 8px; }

/* recording in progress */
.recording-card {
  background: var(--surface);
  border: 1px solid var(--accent2);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.recording-spinner { font-size: 1.5rem; animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================
   CHARTS
   ===================== */
.chart-list { margin-bottom: 12px; }

.chart-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}

.chart-pos {
  font-size: 1.1rem;
  font-weight: 800;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.chart-pos.top3 { color: var(--gold); }
.chart-pos.top10 { color: var(--accent2); }

.chart-info { flex: 1; min-width: 0; }
.chart-track { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-artist { font-size: 0.78rem; color: var(--text-dim); }

.chart-movement { font-size: 0.8rem; text-align: right; flex-shrink: 0; }
.move-up   { color: var(--green); }
.move-down { color: var(--accent); }
.move-new  { color: var(--accent2); font-size: 0.72rem; font-weight: 700; }

/* player chart entries */
.chart-entry.is-player { border-color: var(--accent); background: #1a0d0f; }
.btn-xs { font-size: 0.72rem; padding: 3px 8px; }
.chart-promote-btn { flex-shrink: 0; }
.chart-promoted-label { font-size: 0.72rem; color: var(--accent2); flex-shrink: 0; }

/* =====================
   GIGS
   ===================== */
.gig-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.gig-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.gig-venue { font-weight: 700; }
.gig-pay { color: var(--green); font-weight: 700; font-size: 0.9rem; }
.gig-meta { font-size: 0.8rem; color: var(--text-dim); display: flex; gap: 10px; flex-wrap: wrap; }
.gig-req { font-size: 0.78rem; color: var(--accent2); margin-top: 4px; }
.gig-actions { margin-top: 10px; }

.gig-card.booked { border-color: var(--green); background: #0d1a18; }

/* =====================
   NEWS
   ===================== */
.news-list { display: flex; flex-direction: column; gap: 8px; }

.news-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.news-item.good  { border-left-color: var(--green); }
.news-item.bad   { border-left-color: var(--accent); }
.news-item.neutral { border-left-color: var(--text-mute); }

.news-week { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 2px; }
.news-text { font-size: 0.9rem; }

/* =====================
   GEAR
   ===================== */
.gear-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}
.gear-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.gear-option:hover { background: var(--surface2); }
.gear-price { font-weight: 700; color: var(--green); }

/* =====================
   MERCH
   ===================== */
.merch-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 0.88rem;
}
.merch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.merch-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.merch-emoji { font-size: 1.8rem; }
.merch-info { flex: 1; }
.merch-name { font-weight: 700; }
.merch-meta { font-size: 0.75rem; color: var(--text-dim); }
.merch-stock {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  text-align: right;
}
.merch-stock.out { color: var(--accent); }
.merch-order {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.merch-order .btn { flex-shrink: 0; }

/* Overview date */
.overview-date {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* =====================
   INSTRUMENT SECTIONS
   ===================== */
:root {
  --instr-vocals: #c084fc;
  --instr-guitar: #60a5fa;
  --instr-bass:   #4ade80;
  --instr-drums:  #fb923c;
  --instr-keys:   #fbbf24;
}
.instr-section {
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.instr-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface2);
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.instr-header:hover { background: color-mix(in srgb, var(--border) 50%, var(--surface2)); }
.instr-emoji { font-size: 1.1rem; }
.instr-label-text { flex: 0 0 auto; min-width: 72px; }
.instr-status-text { flex: 1; font-size: 0.8rem; color: var(--text-dim); font-weight: 400; }
.instr-member-name { color: var(--text); font-weight: 600; }
.instr-talent-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--surface);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.instr-available-count { color: var(--green); }
.instr-none { color: var(--text-mute); }
.instr-chevron { margin-left: auto; font-size: 0.7rem; color: var(--text-mute); }

/* Per-instrument accent on left border */
.instr-vocals .instr-header { border-left: 3px solid var(--instr-vocals); }
.instr-guitar .instr-header { border-left: 3px solid var(--instr-guitar); }
.instr-bass   .instr-header { border-left: 3px solid var(--instr-bass);   }
.instr-drums  .instr-header { border-left: 3px solid var(--instr-drums);  }
.instr-keys   .instr-header { border-left: 3px solid var(--instr-keys);   }

.instr-body { padding: 10px 12px 12px; background: var(--surface); }

/* Musician tiles */
.instr-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.musician-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  flex: 1 1 300px;
  min-width: 260px;
  max-width: 100%;
}
.musician-tile--hired {
  border-left-width: 3px;
}
.instr-vocals .musician-tile--hired { border-left-color: var(--instr-vocals); }
.instr-guitar .musician-tile--hired { border-left-color: var(--instr-guitar); }
.instr-bass   .musician-tile--hired { border-left-color: var(--instr-bass);   }
.instr-drums  .musician-tile--hired { border-left-color: var(--instr-drums);  }
.instr-keys   .musician-tile--hired { border-left-color: var(--instr-keys);   }

.musician-tile--available { opacity: 0.8; }
.tile-info { flex: 1; min-width: 0; }
.tile-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tile-gear { font-size: 0.75rem; color: var(--text-mute); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.instr-divider {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  padding: 8px 0 4px;
}
.instr-empty-msg { color: var(--text-mute); font-size: 0.85rem; padding: 4px 0; }

/* =====================
   MEMBER DETAIL LIGHTBOX
   ===================== */
.photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  cursor: pointer;
}
.photo-lightbox.hidden { display: none; }

.lightbox-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px 20px;
  width: min(88vw, 320px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: default;
  position: relative;
}
.lightbox-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}
.lightbox-emoji {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--surface2);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.lightbox-name {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}
.lightbox-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.lightbox-stats {
  display: flex;
  gap: 8px;
  width: 100%;
}
.lb-stat {
  flex: 1;
  background: var(--surface2);
  border-radius: 8px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.lb-val { font-size: 1rem; font-weight: 700; }
.lb-lbl { font-size: 0.62rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.4px; }
.lightbox-gear {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
}
.hidden { display: none !important; }

/* =====================
   MUSICIAN PHOTO
   ===================== */
.musician-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
  cursor: pointer;
}

/* =====================
   GENRE BADGE
   ===================== */
.genre-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
  white-space: nowrap;
}

/* =====================
   NOW PLAYING BAR
   ===================== */
.now-playing {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--advance-h));
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
  z-index: 90;
  gap: 12px;
}
.now-playing.hidden { display: none; }
#now-playing-label { flex: 1; }

/* =====================
   ADVANCE BAR
   ===================== */
.advance-bar {
  position: fixed;
  bottom: var(--nav-h);
  left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  height: var(--advance-h);
  z-index: 10;
}

.week-info { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-dim); }

.recording-badge {
  background: var(--accent2);
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.hidden { display: none !important; }

/* =====================
   BOTTOM NAV
   ===================== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  height: var(--nav-h);
  z-index: 20;
}

.nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  gap: 2px;
  transition: color 0.15s;
}
.nav-btn span { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.nav-btn.active { color: var(--accent); }

/* =====================
   OVERVIEW / DASHBOARD
   ===================== */
.overview-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.overview-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.overview-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.overview-label-row .overview-label { margin-bottom: 0; }
.overview-empty {
  font-size: 0.85rem;
  color: var(--text-mute);
}
.overview-empty a { color: var(--accent); text-decoration: none; }

/* Band strip */
.band-strip {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.strip-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.strip-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  cursor: pointer;
}
.strip-emoji {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.strip-slot.empty .strip-emoji { opacity: 0.3; }
.strip-name {
  font-size: 0.68rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  max-width: 56px;
  text-overflow: ellipsis;
  font-weight: 600;
}
.strip-role { display: none; }
.strip-name.muted { color: var(--text-mute); }

/* Stats row */
.dash-stats {
  display: flex;
  gap: 6px;
}
.dash-stat {
  flex: 1;
  background: var(--surface2);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.dash-val {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.dash-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Money chart */
.money-chart {
  display: block;
  width: 100%;
  height: 80px;
  margin-bottom: 2px;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-mute);
  margin-bottom: 8px;
}

/* Discography */
.overview-best {
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--gold);
}
.overview-song-list { display: flex; flex-direction: column; gap: 4px; }
.overview-song-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}
.overview-song-title { flex: 1; color: var(--text-dim); }
.overview-song-peak  { font-weight: 700; min-width: 32px; text-align: right; }
.overview-song-peak.gold { color: var(--gold); }
.overview-song-earn  { color: var(--green); min-width: 60px; text-align: right; }
.overview-recording  {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--accent2);
  background: color-mix(in srgb, var(--accent2) 10%, var(--surface2));
  padding: 6px 10px;
  border-radius: 6px;
}

/* Next gig */
.overview-next-gig {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: var(--surface2);
  padding: 8px 10px;
  border-radius: 6px;
}

/* Nav scrollable for 6 tabs */
.bottom-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.nav-btn { flex-shrink: 0; min-width: 52px; }

/* =====================
   SECTION DIVIDER
   ===================== */
.section-divider {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin: 16px 0 10px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =====================
   MODAL
   ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0;
}

.modal {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--border);
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 480px;
}

.modal h3 { font-size: 1.1rem; margin-bottom: 12px; }
#modal-body { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* =====================
   SCROLLBAR
   ===================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* =====================
   WEEKLY SUMMARY
   ===================== */
.week-summary-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 150;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.week-summary-overlay.hidden { display: none; }

.week-summary-panel {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#btn-summary-continue {
  margin-top: 16px;
  flex-shrink: 0;
  transition: background 0.2s, opacity 0.2s;
}
#btn-summary-continue:disabled {
  background: var(--surface2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  cursor: not-allowed;
  opacity: 1;
}
.ws-chart-drumroll {
  font-size: 0.85rem;
  color: var(--text-mute);
  font-style: italic;
  padding: 6px 0 8px;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.ws-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.ws-week {
  font-size: 1.1rem;
  font-weight: 700;
}
.ws-balance {
  font-size: 1.2rem;
  font-weight: 700;
}
.ws-balance.good { color: var(--green); }
.ws-balance.bad  { color: var(--accent); }

.ws-section {
  margin-bottom: 14px;
  transition: opacity 0.5s, transform 0.5s;
}
.ws-section.ws-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.ws-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.ws-rows {
  background: var(--surface2);
  border-radius: 10px;
  overflow: hidden;
}
.ws-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.ws-row:last-child { border-bottom: none; }
.ws-row.ws-indent  { padding-left: 24px; color: var(--text-dim); font-size: 0.82rem; }
.ws-row.ws-total   { font-weight: 700; }
.ws-row.good       { color: var(--green); }
.ws-row.bad        { color: var(--accent); }
.ws-row span:last-child { text-align: right; white-space: nowrap; }
.ws-row span:only-child { text-align: left; white-space: normal; }
.ws-row span.good  { color: var(--green); }
.ws-row span.bad   { color: var(--accent); }

.ws-reminder {
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}
.ws-reminder .ws-section-title { color: var(--gold); }

.ws-manager-tip {
  background: rgba(100, 149, 237, 0.08);
  border: 1px solid rgba(100, 149, 237, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}
.ws-manager-tip .ws-section-title { color: cornflowerblue; }
.ws-tip-body {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 6px;
}

.ws-decisions {
  background: rgba(230, 57, 70, 0.08);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}
.ws-decisions .ws-section-title { color: var(--accent); }
.ws-decision-card {
  background: var(--surface2);
  border-radius: 10px;
  padding: 12px;
  margin-top: 8px;
}
.ws-decision-text {
  font-size: 0.9rem;
  margin-bottom: 10px;
  line-height: 1.4;
}
.ws-member-link {
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
  color: var(--accent2);
}
.ws-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-good    { background: var(--green); color: #fff; }
.btn-neutral { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-bad     { background: var(--accent); color: #fff; }

/* =====================
   PRESS & SOCIAL
   ===================== */
.press-header {
  margin-bottom: 16px;
}
.press-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.press-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.press-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.press-card.journalist {
  border-left: 3px solid var(--accent2);
}
.press-card.fan {
  border-left: 3px solid var(--green);
}
.press-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.press-emoji { font-size: 1.2rem; }
.press-name  { font-weight: 600; font-size: 0.9rem; flex: 1; }
.press-week  { font-size: 0.78rem; color: var(--text-dim); }
.press-text  { font-size: 0.88rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 10px; }
.press-responses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.press-response-btn {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.press-reply {
  font-size: 0.82rem;
  color: var(--text-mute);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}
.press-reply-label {
  font-style: normal;
  font-weight: 600;
  color: var(--text-dim);
  margin-right: 4px;
}

/* =====================
   EMPTY STATE
   ===================== */
.empty-state {
  color: var(--text-mute);
  font-size: 0.88rem;
  padding: 20px;
  text-align: center;
}

/* =====================
   FINANCE / LOANS
   ===================== */
.loan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.loan-card.loan-danger {
  border-left: 3px solid var(--accent);
}
.loan-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.loan-provider { font-weight: 700; font-size: 0.9rem; }
.loan-remaining { font-weight: 700; color: var(--accent2); }
.loan-bar-track {
  background: var(--surface2);
  border-radius: 4px;
  height: 6px;
  margin-bottom: 6px;
  overflow: hidden;
}
.loan-bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  transition: width 0.4s;
}
.loan-card.loan-danger .loan-bar-fill { background: var(--accent); }
.loan-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.loan-missed { color: var(--accent); font-weight: 600; }

.lender-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.lender-card.lender-unavailable { opacity: 0.55; }
.lender-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.lender-name   { font-weight: 700; font-size: 0.95rem; }
.lender-flavour { font-size: 0.82rem; color: var(--text-dim); font-style: italic; margin-bottom: 10px; }
.lender-terms {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.lender-example { font-size: 0.78rem; color: var(--text-mute); }
.loan-status-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.loan-status-tag.open   { background: rgba(42,157,143,0.2); color: var(--green); }
.loan-status-tag.active { background: rgba(244,162,97,0.2); color: var(--accent2); }
.loan-status-tag.locked { background: rgba(230,57,70,0.15); color: var(--accent); }

/* =====================
   AWARDS
   ===================== */
.ws-awards-won {
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 12px;
  padding: 12px;
}
.ws-awards-won .ws-section-title { color: var(--gold); }
.ws-awards-won .ws-row.good { color: var(--gold); font-weight: 700; }

.trophy-cabinet {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.trophy-item {
  font-size: 2rem;
  line-height: 1;
  cursor: default;
  filter: drop-shadow(0 0 6px rgba(255,215,0,0.5));
}

/* Full trophy cabinet */
.trophy-cabinet-full { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.trophy-show {
  background: var(--surface2);
  border-radius: 10px;
  padding: 10px 12px;
}
.trophy-show-name {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.trophy-show-cats { display: flex; flex-direction: column; gap: 5px; }
.trophy-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 4px 0;
}
.trophy-cat-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.trophy-cat--won  { color: var(--gold); font-weight: 600; }
.trophy-cat--nom  { color: var(--accent2); }
.trophy-cat--locked { color: var(--text-mute); }

/* Landmark milestones */
.trophy-landmarks { display: flex; flex-direction: column; gap: 5px; }
.trophy-landmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 4px 0;
}
.trophy-landmark-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.trophy-landmark-label { flex: 1; }
.trophy-landmark-tick { color: var(--green); font-weight: 700; }
.trophy-landmark--earned { color: var(--green); font-weight: 600; }
.trophy-landmark--locked { color: var(--text-mute); }

/* =====================
   NEWSFLASH / HEADLINE
   ===================== */
.newsflash-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.newsflash-overlay.hidden { display: none; }

.newsflash-paper {
  background: #0d0d0d;
  border: 2px solid #e63946;
  border-radius: 12px;
  padding: 24px 20px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
#newsflash-masthead {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
#newsflash-headline {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 10px;
}
#newsflash-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 14px;
  line-height: 1.5;
}
#newsflash-member {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dim);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Inline headline in weekly summary */
.ws-newsflash {
  border: 2px solid;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  text-align: center;
  background: rgba(0,0,0,0.3);
}
.ws-newsflash-pub {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.ws-newsflash-headline {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 6px;
}
.ws-newsflash-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.4;
}

/* =====================
   EP / ALBUM RELEASES
   ===================== */

.release-actions {
  display: flex;
  gap: 8px;
  padding: 12px 0 4px;
}
.release-actions .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.req-badge {
  font-size: 0.68rem;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 10px;
}
.release-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.release-cover {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.release-info {
  flex: 1;
  min-width: 0;
}
.release-title {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.release-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 2px 0;
}
.release-status {
  font-size: 0.75rem;
}
.release-status.good { color: var(--green); }
.release-status.neutral { color: var(--text-mute); }

/* Release builder */
.release-builder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}
.builder-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.builder-hint {
  font-size: 0.75rem;
  color: var(--text-mute);
}
.cover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cover-option {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: border-color 0.15s;
}
.cover-option.selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.cover-label {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.track-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.track-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface2);
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.track-option.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface2));
}
.track-num {
  width: 18px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}
.track-title {
  flex: 1;
  font-size: 0.85rem;
}
.track-quality {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Album chart */
.type-badge {
  font-size: 0.65rem;
  background: var(--accent);
  color: #000;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}

/* Album chart entry styles */
.chart-entry.chart-player {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.chart-entry.chart-up .chart-arrow { color: var(--green); }
.chart-entry.chart-down .chart-arrow { color: var(--accent); }
.chart-arrow {
  min-width: 20px;
  font-size: 0.8rem;
  color: var(--text-mute);
}
.chart-title {
  flex: 1;
  font-size: 0.85rem;
}
