/* The Music Industry — Mobile-First Stylesheet */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #1e2238;
  --bg-elevated: #252a44;
  --card: #282e4a;
  --card2: #32395a;
  --card3: #3d456c;
  --accent: #ff6b9d;
  --accent2: #7c6cf6;
  --accent3: #38d9e8;
  --gold: #ffca4b;
  --green: #4ade80;
  --red: #fb7185;
  --text: #f8f9fc;
  --text2: #b8c0dc;
  --border: #414970;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  background: #171a2d;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

input, select, textarea {
  user-select: text;
  -webkit-user-select: text;
}

.app-shell {
  background: linear-gradient(165deg, #232844 0%, #1e2238 52%, #242240 100%);
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 60px rgba(15, 18, 34, 0.55);
}

h1, h2, h3, h4, .brand-font {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(34, 39, 64, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.label-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.label-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.week-display {
  font-size: 11px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 215, 64, 0.14);
  color: var(--gold);
  border: 1px solid rgba(255, 215, 64, 0.3);
  white-space: nowrap;
}

.header-advance-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 107, 157, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.header-advance-btn:active { transform: scale(0.94); }
.header-advance-btn.attention {
  background: linear-gradient(135deg, #ff9100, #ff5252);
  box-shadow: 0 4px 14px rgba(255, 82, 82, 0.45);
  animation: pulse-attention 1.6s infinite;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:active { transform: scale(0.93); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.stat-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 6px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
}
.stat-pill.money { color: var(--green); }
.stat-pill.money.negative { color: var(--red); border-color: rgba(255,82,82,0.5); }
.stat-pill.fans { color: var(--accent); }
.stat-pill.hype { color: var(--gold); }
.stat-pill.roster { color: var(--accent3); }

/* ============ NAVIGATION & ACTION BAR ============ */
.bottom-dock {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  z-index: 100;
  background: rgba(34, 39, 64, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(var(--safe-bottom) + 6px);
}

.nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 4px 2px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  border: none;
  border-radius: 12px;
  background: none;
  color: var(--text2);
  font-size: 10px;
  font-family: inherit;
  gap: 2px;
  position: relative;
}
.nav-item:active { transform: scale(0.94); }
.nav-item.active {
  color: var(--text);
  background: rgba(224, 64, 251, 0.14);
}
.nav-item.active .nav-label { color: var(--accent); font-weight: 700; }
.nav-item .nav-icon { font-size: 20px; line-height: 1.1; }
.nav-item .nav-label { font-weight: 500; }
.nav-badge {
  position: absolute;
  top: 3px;
  right: 14px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Floating Next Week Pill */
.advance-fab {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 72px);
  right: max(16px, calc(50% - 200px));
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 2px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  z-index: 150;
  box-shadow: 0 8px 28px rgba(255, 107, 157, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  letter-spacing: 0.2px;
}
.advance-fab:active { transform: scale(0.94); }
.advance-fab.attention {
  background: linear-gradient(135deg, #ff9100, #ff5252);
  box-shadow: 0 8px 28px rgba(255, 82, 82, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
  animation: pulse-attention 1.6s infinite;
}

@keyframes pulse-attention {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ============ PAGES ============ */
.page {
  display: none;
  padding: 14px 14px calc(var(--safe-bottom) + 132px);
}
.page.active {
  display: block;
  animation: fadeIn 0.22s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 10px;
}
.section-header:first-child { margin-top: 2px; }

.section-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-sub {
  font-size: 12px;
  color: var(--text2);
}

/* ============ CARDS & LISTS ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}
.card.interactive { cursor: pointer; transition: transform 0.15s, border-color 0.15s; }
.card.interactive:active { transform: scale(0.985); border-color: var(--accent); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  text-align: left;
}
.dash-value {
  font-size: 22px;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.15;
}
.dash-label {
  font-size: 11px;
  color: var(--text2);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dash-delta {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

/* Artist Card */
.artist-card { position: relative; overflow: hidden; }
.artist-card .artist-bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 72px;
  opacity: 0.25;
  pointer-events: none;
}
.artist-info {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  align-items: center;
}
.studio-artist-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card2);
}
.artist-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 2px solid var(--accent);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: var(--card2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.artist-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.artist-details { flex: 1; min-width: 0; }
.artist-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.artist-genre {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 6px;
}
.artist-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.mini-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text2);
  margin-bottom: 2px;
}
.level-bar {
  height: 5px;
  background: var(--card2);
  border-radius: 3px;
  overflow: hidden;
}
.level-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.15s, border-color 0.15s;
  width: 100%;
  text-align: center;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.btn-secondary { background: var(--card2); color: var(--text); border-color: var(--border); }
.btn-success { background: linear-gradient(135deg, #00c853, #69f0ae); color: #06150d; font-weight: 700; }
.btn-danger { background: rgba(255, 82, 82, 0.16); color: var(--red); border-color: rgba(255, 82, 82, 0.4); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 12px; border-radius: 10px; width: auto; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-row .btn { flex: 1; }

/* Choice Option Button */
.choice-btn {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.choice-btn:active:not(:disabled) { transform: scale(0.98); border-color: var(--accent); }
.choice-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.choice-main { font-size: 14px; font-weight: 600; }
.choice-hint { font-size: 11px; color: var(--text2); }

/* Charts */
.chart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-radius: 8px;
}
.chart-item:last-child { border-bottom: none; }
.chart-item:active { background: var(--card2); }
.chart-item.is-player {
  background: rgba(224, 64, 251, 0.08);
  border-left: 3px solid var(--accent);
  padding-left: 8px;
}
.chart-pos {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
}
.chart-pos.gold { background: linear-gradient(135deg, #ffd740, #ffab00); color: #0a0a0f; }
.chart-pos.silver { background: linear-gradient(135deg, #cfd8dc, #90a4ae); color: #0a0a0f; }
.chart-pos.bronze { background: linear-gradient(135deg, #ffab91, #d84315); color: #fff; }
.chart-pos.normal { background: var(--card2); color: var(--text2); }
.chart-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card2);
}
.chart-info { flex: 1; min-width: 0; }
.chart-song {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-artist {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-streams {
  font-size: 12px;
  color: var(--accent3);
  font-weight: 700;
  text-align: right;
}
.chart-change { font-size: 11px; font-weight: 700; }
.chart-change.up { color: var(--green); }
.chart-change.down { color: var(--red); }
.chart-change.new { color: var(--gold); }
.chart-change.same { color: var(--text2); }

/* Modals / Bottom Sheets */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  max-height: 88dvh;
  padding: 12px 16px calc(var(--safe-bottom) + 20px);
  overflow-y: auto;
  animation: slideUp 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
  transition: transform 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle-area {
  padding: 6px 0 10px;
  cursor: grab;
  touch-action: none;
}
.modal-handle {
  width: 42px;
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  margin: 0 auto;
}
.modal-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 14px;
  text-align: center;
}

/* Forms (16px font prevents iOS Safari zoom-on-focus) */
.form-group { margin-bottom: 14px; }
.form-label {
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input, .form-select {
  width: 100%;
  padding: 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239090b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.input-row {
  display: flex;
  gap: 8px;
}
.input-row .form-input { flex: 1; }

/* Tags & Badges */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.tag-genre { background: rgba(224, 64, 251, 0.15); color: var(--accent); }
.tag-status { background: rgba(105, 240, 174, 0.15); color: var(--green); }
.tag-hot { background: rgba(255, 82, 82, 0.15); color: var(--red); }
.tag-viral { background: rgba(255, 215, 64, 0.15); color: var(--gold); }
.tag-info { background: rgba(0, 229, 255, 0.15); color: var(--accent3); }

/* Toast Queue */
.toast-stack {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 350;
  width: 92%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.toast {
  background: rgba(44, 50, 82, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 8px 28px rgba(15, 18, 34, 0.45);
  animation: toastIn 0.22s ease;
}
.toast.warn { border-color: var(--red); }
.toast.achievement, .toast.cert, .toast.big { border-color: var(--gold); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.toast-text { font-size: 12px; color: var(--text2); }

/* News Feed */
.news-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.news-item:last-child { border-bottom: none; }
.news-icon { font-size: 22px; flex-shrink: 0; line-height: 1.2; }
.news-content { flex: 1; min-width: 0; }
.news-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.news-desc { font-size: 12px; color: var(--text2); line-height: 1.4; }
.news-time { font-size: 10px; color: var(--text2); margin-top: 3px; }

/* Progress Bars */
.progress-container { margin: 6px 0; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
}
.progress-bar {
  height: 6px;
  background: var(--card2);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}

/* Songs & Releases */
.song-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.song-card:active { transform: scale(0.985); }
.song-icon { font-size: 24px; }
.song-info { flex: 1; min-width: 0; }
.song-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-meta { font-size: 11px; color: var(--text2); }
.song-streams { font-size: 13px; font-weight: 700; color: var(--accent3); text-align: right; }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto;
  white-space: nowrap;
  min-height: 36px;
  padding: 6px 10px;
  text-align: center;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text2);
  font-family: inherit;
}
.tab.active { background: var(--accent); color: #fff; }

.enhance-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.enhance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.enhance-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.enhance-cost {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}
.enhance-desc {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.4;
}
.enhance-stats {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}

/* Splash & Setup */
.splash {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 107, 157, 0.22), transparent 55%),
    radial-gradient(circle at 80% 78%, rgba(56, 217, 232, 0.16), transparent 50%),
    linear-gradient(165deg, #262c4a 0%, #1e2238 55%, #262244 100%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
}
.splash.hidden { display: none; }
.splash-logo { font-size: 72px; margin-bottom: 14px; }
.splash-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}
.splash-sub { font-size: 15px; color: var(--text2); margin-bottom: 14px; }

.free-forever-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(105, 240, 174, 0.14);
  border: 1px solid rgba(105, 240, 174, 0.4);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 24px;
}

.creator-card {
  margin-top: 28px;
  padding: 14px 16px;
  max-width: 320px;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.creator-line {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

.creator-links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
}

.creator-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(224, 64, 251, 0.2), rgba(0, 229, 255, 0.18));
  border: 1px solid rgba(0, 229, 255, 0.45);
  color: var(--accent3) !important;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.donate-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 215, 64, 0.22), rgba(224, 64, 251, 0.18));
  border: 1px solid rgba(255, 215, 64, 0.55);
  color: var(--gold) !important;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.donate-inline {
  color: var(--gold) !important;
  font-weight: 700;
  text-decoration: none;
}

.legal-micro {
  font-size: 10px;
  color: var(--text2);
  line-height: 1.35;
}

.creator-footer {
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--text2);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.creator-footer strong { color: var(--text); }

.creator-footer a {
  color: var(--accent3);
  font-weight: 700;
  text-decoration: none;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.avatar-opt {
  font-size: 26px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 12px;
  background: var(--card2);
  border: 2px solid transparent;
}
.avatar-opt.selected {
  border-color: var(--accent);
  background: rgba(224, 64, 251, 0.15);
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text2);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 8px; }
.empty-state .empty-text { font-size: 13px; line-height: 1.4; }

/* Ledger table */
.ledger-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.ledger-row:last-child { border-bottom: none; }

/* Market share stacked bar */
.share-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--card2);
  margin: 8px 0;
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 12px;
}
.grade-S { background: var(--gold); color: #0a0a0f; }
.grade-A { background: var(--green); color: #0a0a0f; }
.grade-B { background: var(--accent3); color: #0a0a0f; }
.grade-C { background: var(--card3); color: var(--text); }
.grade-D { background: rgba(255,82,82,0.25); color: var(--red); }

/* Choose Your Adventure Stepper & Cards */
.chapter-stepper {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.chapter-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chapter-dot.done {
  background: rgba(105, 240, 174, 0.18);
  border-color: var(--green);
  color: var(--green);
}
.chapter-dot.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(224, 64, 251, 0.5);
}

.story-log-item {
  background: var(--card2);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  text-align: left;
}

/* Yearly Summary Cards */
.summary-box {
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  text-align: left;
}
.summary-box.good {
  background: rgba(105, 240, 174, 0.08);
  border-color: rgba(105, 240, 174, 0.35);
}
.summary-box.bad {
  background: rgba(255, 82, 82, 0.08);
  border-color: rgba(255, 82, 82, 0.35);
}
.summary-box.work {
  background: rgba(255, 215, 64, 0.08);
  border-color: rgba(255, 215, 64, 0.35);
}
.summary-box-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.summary-list li {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  padding: 4px 0 4px 14px;
  position: relative;
}
.summary-list li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--text2);
}

/* ============ CONTRACT DEAL SELECTOR & RECOUPMENT ============ */
.deal-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.deal-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 12px;
  background: var(--card2);
  border: 1.5px solid var(--border);
  color: var(--text2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.deal-pill:active { transform: scale(0.96); }
.deal-pill.active {
  background: rgba(224, 64, 251, 0.16);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 14px rgba(224, 64, 251, 0.25);
}
.deal-pill-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent3);
}

.deal-desc-box {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 12px;
  line-height: 1.4;
}

.recoup-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.recoup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* ============ P&L RECEIPT & FACTOR BREAKDOWN ============ */
.receipt-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.receipt-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent3);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.factor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.factor-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.factor-badge.pos {
  background: rgba(105, 240, 174, 0.12);
  border-color: rgba(105, 240, 174, 0.35);
  color: var(--green);
}
.factor-badge.neg {
  background: rgba(255, 215, 64, 0.12);
  border-color: rgba(255, 215, 64, 0.35);
  color: var(--gold);
}

/* ============ SMART A&R ADVISOR ============ */
.advisor-card {
  background: linear-gradient(135deg, rgba(224, 64, 251, 0.1), rgba(0, 229, 255, 0.07));
  border: 1px solid rgba(224, 64, 251, 0.35);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.advisor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.advisor-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.advisor-item:first-child {
  padding-top: 2px;
}

/* ============ SUB-TABS & STORY LOGS ============ */
.sub-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.sub-tab {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text2);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.sub-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.story-log-ch {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent3);
  margin-bottom: 2px;
}
.story-log-choice {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.story-log-out {
  font-size: 12px;
  color: var(--text2);
}

/* ============ INDUSTRY GUIDE MODAL ============ */
.guide-item {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}
.guide-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.guide-item-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.45;
}

/* ============ THIS OR THAT ADVENTURE ============ */
.this-or-that-header {
  text-align: center;
  margin: 8px 0 10px;
}
.this-or-that-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
}
.this-or-that-sub {
  font-size: 11px;
  color: var(--text2);
}
.this-or-that-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.this-that-card {
  position: relative;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.this-that-card.this-side {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(255,107,157,0.06), var(--card2));
}
.this-that-card.that-side {
  border-left: 4px solid var(--accent3);
  background: linear-gradient(135deg, rgba(56,217,232,0.06), var(--card2));
}
.this-that-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.this-badge {
  background: rgba(255, 107, 157, 0.2);
  color: var(--accent);
}
.that-badge {
  background: rgba(56, 217, 232, 0.2);
  color: var(--accent3);
}
.this-that-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.this-that-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.4;
}
.this-that-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}
.this-that-btn {
  width: 100%;
  margin-top: 4px;
  font-weight: 700;
}
.this-that-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 2px 0;
}
.this-that-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.this-that-divider span {
  position: relative;
  background: var(--card);
  padding: 3px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  border: 1px solid var(--border);
}

::-webkit-scrollbar { width: 0; height: 0; }
