/* styles.css
   All the look and layout for Band Rise. Desktop-first.
   Colors and sizes are kept as named variables at the top so the look is easy to change in one place. */

:root {
  --bg: #1b1a2e;          /* page background: deep indigo night */
  --panel: #262443;       /* panels and cards */
  --panel-2: #312e52;     /* slightly lighter panels (locked blocks, inputs) */
  --line: #423e6b;        /* borders */
  --text: #f7f3ea;        /* main text: warm off-white */
  --text-muted: #b3adcb;  /* secondary text */
  --accent: #ffb547;      /* main highlight: stage-light amber */
  --accent-text: #1b1a2e; /* text on top of the accent color */
  --teal: #4fd1c5;        /* friendly second color: info, tips */
  --pink: #ff7eb6;        /* third color: events and celebrations */
  --good: #5fd38d;        /* success / passing */
  --bad: #ff6b6b;         /* failure / warnings */
  --radius: 14px;         /* rounded, cartoon-ish corners */
  --shadow: 4px 4px 0 rgba(0, 0, 0, 0.35); /* chunky "cartoon" offset shadow */
  --space-1: 8px;         /* spacing scale: use these for gaps and padding */
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  /* Rounded system fonts where available (no downloads, so it works offline). */
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

/* ---------- Buttons ---------- */

.btn {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: bold; }
.btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn--ghost { background: transparent; }
.btn--big { padding: 14px 28px; font-size: 18px; }
.btn--small { padding: 4px 10px; font-size: 14px; }
.btn__note { display: block; font-size: 13px; font-weight: normal; opacity: 0.8; }

/* ---------- Inputs ---------- */

.input {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.input--money { width: 110px; }
.input--tiny { width: 64px; padding: 2px 6px; }
.input--select { width: auto; padding: 2px 6px; }

.field { display: block; margin-bottom: 20px; }
.field__label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- General layout ---------- */

.screen { padding: 40px 48px; max-width: 1200px; margin: 0 auto; }
.screen--narrow { max-width: 760px; }
.screen__title { margin: 0 0 24px; font-size: 36px; color: var(--accent); }
.screen__title--big { font-size: 64px; text-shadow: 3px 3px 0 #000; }
.section-title { margin: 0 0 16px; font-size: 22px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.panel__title { margin: 0 0 12px; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.panel__warn { margin: 12px 0 0; color: var(--bad); }
.panel--debt { border-color: var(--bad); }
.panel--gameover { max-width: 560px; text-align: left; }

.actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }
.actions--left { justify-content: flex-start; }
.hint { color: var(--text-muted); font-size: 14px; margin: 8px 0 0; }
.muted { color: var(--text-muted); }
.form-error { color: var(--bad); min-height: 1.4em; margin: 0; }

.notice { margin: 16px 0; padding: 12px 16px; border-radius: 8px; border: 1px solid; max-width: 560px; }
.notice--error { border-color: var(--bad); color: var(--bad); background: rgba(255, 107, 107, 0.08); }
.notice--info { border-color: var(--good); color: var(--good); background: rgba(95, 211, 141, 0.08); }

/* Label / value rows, like "Cash ...... $500" */
.rows { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.rows dt { color: var(--text-muted); }
.rows dd { margin: 0; text-align: right; font-weight: bold; }
.rows--big { font-size: 18px; }
.rows__total { border-top: 1px solid var(--line); padding-top: 8px; color: var(--text) !important; font-weight: bold; }
.highlight { color: var(--accent); }

/* ---------- Title screen ---------- */

.title-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.title-screen__name {
  margin: 0;
  font-size: 96px;
  letter-spacing: 2px;
  color: var(--accent);
  text-shadow: 4px 4px 0 #000;
}
.title-screen__tagline { margin: 12px 0 0; font-size: 22px; color: var(--text-muted); }
.title-screen__menu { display: flex; flex-direction: column; gap: 12px; margin-top: 40px; width: 280px; }

/* ---------- New career: instrument choices ---------- */

.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice input { position: absolute; opacity: 0; }
.choice__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 16px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.choice input:checked + .choice__body { border-color: var(--accent); }
.choice input:focus-visible + .choice__body { outline: 2px solid var(--accent); }
.choice__title { font-size: 20px; font-weight: bold; }
.choice__bonus { color: var(--accent); font-weight: bold; }
.choice__blurb { color: var(--text-muted); font-size: 14px; }

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.topbar__who { display: flex; flex-direction: column; margin-right: auto; }
.topbar__brand { color: var(--accent); font-weight: bold; font-size: 18px; }
.topbar__name { color: var(--text-muted); font-size: 14px; }
.topbar__nav { margin-left: 4px; }

.stat { display: flex; flex-direction: column; min-width: 70px; }
.stat__label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.stat__value { font-size: 18px; font-weight: bold; }
.stat__value--cash { color: var(--accent); }
.stat--debt .stat__value, .stat--warn .stat__value { color: var(--bad); }
.stat--debt .btn { margin-top: 4px; }

.meter { display: block; height: 6px; margin-top: 4px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.meter__fill { display: block; height: 100%; background: var(--accent); }

/* ---------- Today: dashboard ---------- */

.dashboard {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 360px; /* the previous day, today's plan, the side panels */
  grid-template-areas: "recap main side";
  gap: 24px;
  padding: 32px 24px;
  max-width: 1640px;
  margin: 0 auto;
  align-items: start;
}
.dashboard__recap { grid-area: recap; }
.dashboard__main { grid-area: main; }
.dashboard__side { grid-area: side; }
/* Narrower windows: the previous day sits above today's plan. */
@media (max-width: 1200px) {
  .dashboard { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; grid-template-areas: "recap side" "main side"; }
}

.blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 150px;
  padding: 20px;
  border-radius: var(--radius);
  border: 2px dashed var(--line);
  background: var(--panel);
}
.block--locked { border-style: solid; background: var(--panel-2); }

/* Free and planned blocks are buttons you can click to open the action picker. */
button.block { font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.block:hover { border-color: var(--accent); }
.block--action { border-style: solid; border-color: var(--accent); }
.block__energy { font-size: 13px; color: var(--text-muted); }
.block__problem { color: var(--bad); }
.block__time { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.block__title { font-size: 22px; font-weight: bold; }
.block__detail { color: var(--text-muted); font-size: 14px; margin-top: auto; }
.block--locked .block__title::before { content: "🔒 "; font-size: 18px; }

.end-day { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.end-day .hint { margin: 0; }

.log { margin: 0; padding-left: 18px; color: var(--text-muted); }
.log li { margin-bottom: 4px; }

.payback { display: flex; gap: 8px; align-items: center; margin-top: 12px; }

/* ---------- Weekly summary ---------- */

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

/* ---------- Game over ---------- */

.gameover__message { font-size: 20px; margin: 0 0 20px; }

/* ---------- Debug panel ---------- */

.debug {
  position: fixed;
  left: 16px;
  bottom: 16px;
  padding: 12px;
  background: #000;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  font-size: 13px;
  opacity: 0.92;
}
.debug__title { color: var(--accent); font-weight: bold; margin-bottom: 8px; }
.debug__row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }

/* ---------- Badges ---------- */

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: bold; background: var(--panel-2); color: var(--text-muted); vertical-align: middle; }
.badge--warn { background: rgba(255, 181, 71, 0.18); color: var(--accent); }
.badge--bad { background: rgba(255, 107, 107, 0.18); color: var(--bad); }

/* ---------- Action picker (pop-up) ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 16, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.modal {
  width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal__title { margin: 0; font-size: 22px; }

.picks { display: flex; flex-direction: column; gap: 8px; }
.pick {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.pick:hover:not(:disabled) { border-color: var(--accent); }
.pick:disabled { opacity: 0.45; cursor: not-allowed; }
.pick--current { border-color: var(--accent); }
.pick__head { display: flex; justify-content: space-between; gap: 12px; }
.pick__name { font-weight: bold; font-size: 18px; }
.pick__costs { color: var(--text-muted); white-space: nowrap; }
.pick__desc { color: var(--text-muted); font-size: 14px; }
.pick__effect { color: var(--accent); font-weight: bold; }
.pick__reason { color: var(--bad); font-size: 14px; }

/* ---------- Stats panel ---------- */

.skills { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.skill { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; }
.skill__name { color: var(--text-muted); }
.skill__value { font-weight: bold; text-align: right; }
.skill .meter { grid-column: 1 / -1; margin-top: 0; }
.meter--thin { height: 3px; }
.rust { font-size: 12px; font-weight: bold; cursor: help; }
.rust--warning { color: var(--accent); }
.rust--rusting { color: var(--bad); }
.rows--stats { border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Day results ---------- */

.result-row {
  display: grid;
  grid-template-columns: 100px 140px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.result-row:last-child { border-bottom: none; }
.result-row__time { color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; padding-top: 2px; }
.result-row__title { font-weight: bold; }
.result-row__lines { display: flex; flex-direction: column; gap: 2px; }

/* ---------- Skills page (New career) ---------- */

.alloc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.alloc-head__left { font-size: 22px; }
.alloc-head__left strong { color: var(--accent); }
.alloc-head__left--done strong { color: var(--good); }
.alloc-head__helpers { display: flex; gap: 8px; flex-shrink: 0; }

.alloc {
  display: grid;
  grid-template-columns: 1fr auto 150px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.alloc__info { display: flex; flex-direction: column; gap: 2px; }
.alloc__name { font-weight: bold; font-size: 18px; }
.alloc__desc { color: var(--text-muted); font-size: 14px; }
.alloc__controls { display: flex; align-items: center; gap: 6px; }
.alloc__value { width: 40px; text-align: center; font-size: 22px; font-weight: bold; }
.alloc__total { display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; color: var(--text-muted); }
.alloc__total strong { color: var(--text); font-size: 18px; }
.alloc__bonus { color: var(--accent); font-weight: bold; }
.step { min-width: 40px; }

/* ---------- Weekly summary: skill changes ---------- */

.skill-changes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.skill-change { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; background: var(--panel-2); border-radius: 8px; }
.skill-change__name { font-size: 13px; color: var(--text-muted); }
.skill-change__value { font-size: 22px; font-weight: bold; }
.skill-change__delta { font-weight: bold; }
.skill-change__delta--up { color: var(--good); }
.skill-change__delta--down { color: var(--bad); }
.skill-change__delta--same { color: var(--text-muted); }

/* ---------- Songs: stars, tags, bars ---------- */

.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.stars__empty { color: var(--line); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: bold; }
.tag--cover { background: var(--panel-2); color: var(--text-muted); }
.tag--original { background: rgba(255, 181, 71, 0.18); color: var(--accent); }
.meter--tight { width: 90px; height: 6px; margin-top: 0; display: inline-block; vertical-align: middle; }
.meter--big { height: 12px; border-radius: 6px; }
.block__song { display: block; color: var(--text); margin-bottom: 2px; }
.pick__more { font-size: 13px; font-weight: normal; color: var(--text-muted); }
.pick__song-stats { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.pick__song-stats strong { color: var(--accent); }

/* ---------- Songs screen ---------- */

.screen__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.screen__head .screen__title { margin-bottom: 16px; }
.writing { display: flex; flex-direction: column; gap: 8px; }
.writing__title { font-size: 20px; font-weight: bold; }
.writing__numbers { color: var(--text-muted); font-size: 14px; }

.song-table { width: 100%; border-collapse: collapse; }
.song-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: normal; padding: 8px; border-bottom: 1px solid var(--line); }
.song-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.song-table .num { text-align: right; }
.song__title { font-weight: bold; }
.song__tight { display: flex; align-items: center; gap: 8px; }
.song__fading { color: var(--bad); }

/* ---------- Song reveal ---------- */

.reveal__kicker { margin: 0; font-size: 18px; text-transform: uppercase; letter-spacing: 3px; color: var(--text-muted); }
.reveal__stars { font-size: 72px; margin: 8px 0; animation: reveal-pop 0.6s ease-out; }
.reveal__quality { margin: 0; font-size: 22px; }
.reveal__quality strong { color: var(--accent); }
.reveal__why { color: var(--text-muted); max-width: 560px; }
.reveal__name { width: 560px; text-align: left; margin-top: 16px; }
.reveal__name-row { display: flex; gap: 8px; }
.reveal__name-row .btn { white-space: nowrap; }
@keyframes reveal-pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

/* ---------- Open mic set picker ---------- */

.picker-note { margin: -8px 0 12px; }
.check { display: inline-block; width: 20px; height: 20px; margin-right: 10px; border: 2px solid var(--line); border-radius: 5px; text-align: center; line-height: 16px; font-size: 14px; color: var(--accent-text); vertical-align: middle; }
.pick--current .check { background: var(--accent); border-color: var(--accent); }
.tight-num { color: var(--text) !important; }
.actions--split { justify-content: space-between; align-items: center; }

/* ---------- Gig: crowd meter ---------- */

.gig-meter__count { font-size: 96px; font-weight: bold; color: var(--accent); line-height: 1; margin: 16px 0; }
.gig-meter__unit { font-size: 28px; color: var(--text-muted); }
.meter--crowd { width: 520px; max-width: 100%; height: 18px; border-radius: 9px; margin: 8px 0 16px; }
.gig-meter .meter--crowd .meter__fill { transition: none; }

/* ---------- Gig: result ---------- */

.gig-result .reveal__kicker { margin-bottom: 4px; }
.gig-result__headline { font-size: 40px; }
.gig-result__headline--rough { color: var(--bad); }
.gig-result__headline--solid { color: var(--text); }
.gig-result__headline--great { color: var(--good); }
.gig-result__headline--legendary { color: var(--accent); }
.gig-crowd { font-size: 18px; margin-bottom: 4px; }
.gig-crowd strong { font-size: 28px; color: var(--accent); }
.gig-result .meter--crowd { width: 100%; }

.breakdown { display: flex; height: 54px; border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.seg { display: flex; flex-direction: column; justify-content: center; padding: 0 8px; min-width: 0; overflow: hidden; white-space: nowrap; color: var(--accent-text); border-right: 2px solid var(--panel); }
.seg__label { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.seg__value { font-weight: bold; }
.seg--bandSkill { background: #ffb547; }
.seg--stagePresence { background: #ffc773; }
.seg--songs { background: #ffd89e; }
.seg--tightness { background: #ffe7c4; }
.seg--instrument, .seg--morale { background: #5fd38d; }
.seg--luck { background: #9ec9ff; }
.seg--debug { background: #c9a2ff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: bold; background: var(--panel-2); color: var(--text-muted); }
.chip--bad { background: rgba(255, 107, 107, 0.18); color: var(--bad); }

.scale { position: relative; margin: 18px 0 30px; }
.scale__track { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.scale__score { display: block; height: 100%; background: var(--text); }
.scale__mark { position: absolute; top: -4px; height: 16px; border-left: 2px dashed var(--text-muted); }
.scale__mark span { position: absolute; top: 18px; left: -30px; width: 60px; text-align: center; font-size: 11px; color: var(--text-muted); }
.gig-score { margin: 0; font-size: 18px; }
.panel--tip { border-color: var(--accent); background: rgba(255, 181, 71, 0.08); }
.gig-notes { margin-top: 12px; }

.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.chip { color: var(--text); }

/* ---------- Practice: all songs + sorting ---------- */

.pick--all { border-style: dashed; }
.sort-bar { display: flex; align-items: center; gap: 6px; margin: 14px 0 8px; font-size: 14px; }
.list-controls { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 16px; }

/* ---------- People ---------- */

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.person { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.person--member { border-color: var(--accent); }
.person__head { display: flex; justify-content: space-between; align-items: center; }
.person__name { font-size: 18px; font-weight: bold; }
.person__stats { display: flex; gap: 14px; font-size: 14px; color: var(--text-muted); }
.person__stats strong { color: var(--text); }
.person__trait { font-size: 13px; }
.person__bar { display: grid; grid-template-columns: 90px 1fr 30px; align-items: center; gap: 8px; font-size: 13px; }
.person__bar .meter { margin-top: 0; }
.person__bar strong { text-align: right; }
.meter--rel .meter__fill { background: #9ec9ff; }
.meter--good .meter__fill { background: var(--good); }
.meter--bad .meter__fill { background: var(--bad); }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.reasons { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.person .actions { margin-top: 4px; }
.debug__toggle { background: none; border: none; padding: 0; font: inherit; cursor: pointer; display: block; }

/* ---------- Tabs under the top bar ---------- */

.tabs { display: flex; gap: 4px; padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tab { font: inherit; color: var(--text-muted); background: none; border: none; border-bottom: 3px solid transparent; padding: 10px 14px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab--active { color: var(--accent); border-bottom-color: var(--accent); font-weight: bold; }

/* ---------- Today: banners and show cards ---------- */

.toast { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; margin-bottom: 16px;
  border: 1px solid var(--accent); border-radius: var(--radius); background: rgba(255, 181, 71, 0.10); }
.toast--inbox { border-color: var(--good); background: rgba(95, 211, 141, 0.08); }
.block--show { border-style: solid; border-color: var(--good); background: rgba(95, 211, 141, 0.06); }

/* ---------- Booking ---------- */

.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.venue { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.venue--open { border-color: var(--accent); }
.venue__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.venue__name { font-size: 18px; font-weight: bold; }
.venue__stats { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--text-muted); }
.venue__stats strong { color: var(--text); }
.deal { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--panel); }
.deal--chosen { border-color: var(--accent); }
.deal--locked { opacity: 0.75; }
.deal__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.deal__chance { color: var(--accent); font-weight: bold; }
.deal__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; }
.reqs { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; }
.booking-form { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row__btns { display: flex; gap: 6px; flex-wrap: wrap; }
.dates { display: flex; flex-wrap: wrap; gap: 6px; }
.date-btn { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.date-btn:hover:not(:disabled) { border-color: var(--accent); }
.date-btn:disabled { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }
.date-btn--job { border-color: #c98a2c; }
.date-btn--on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: bold; }

/* ---------- Inbox ---------- */

.message { padding: 12px 0; border-bottom: 1px solid var(--line); }
.message:last-child { border-bottom: none; }
.message--new { background: rgba(255, 181, 71, 0.05); }
.message__head { display: flex; align-items: center; gap: 8px; }
.message__date { margin-left: auto; font-size: 13px; }
.message p { margin: 6px 0; }
.message__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ---------- Calendar ---------- */

.cal-layout { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding-bottom: 4px; }
.cal__day { font: inherit; text-align: left; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px; min-height: 92px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; }
.cal__day:hover { border-color: var(--accent); }
.cal__day--today { border-color: var(--accent); }
.cal__day--selected { outline: 2px solid var(--accent); }
.cal__day--past { opacity: 0.45; }
.cal__date { font-size: 11px; color: var(--text-muted); }
.cal__block { font-size: 11px; padding: 1px 4px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal__block--job { background: var(--panel-2); color: var(--text-muted); }
.cal__block--off { background: rgba(95, 211, 141, 0.15); color: var(--good); }
.cal__block--show { background: var(--good); color: var(--accent-text); font-weight: bold; }
.cal__block--pending { background: rgba(255, 181, 71, 0.15); color: var(--accent); }
.cal__block--plan { background: rgba(158, 201, 255, 0.15); color: #9ec9ff; }
.dayoff { display: flex; flex-wrap: wrap; gap: 6px; }
.show { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.show__head { font-size: 17px; }
.show__sub { margin: 12px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.setlist { margin: 0 0 8px; padding-left: 20px; font-size: 14px; }
.setlist-edit { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.setlist-song { font: inherit; font-size: 14px; text-align: left; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; cursor: pointer; }
.setlist-song--on { border-color: var(--accent); }
.setlist-song--on .check { background: var(--accent); border-color: var(--accent); }
.session { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Calendar: planning a day ---------- */

.plan { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.plan__row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--panel-2); border-radius: 6px; }
.plan__block { width: 80px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.plan__task { flex: 1; font-weight: bold; }
.plan__row .muted { flex: 1; }


/* =====================================================================
   Visual pass (Phase 7): friendlier cards, consistent spacing, readable numbers.
   ===================================================================== */

.panel { border-width: 2px; box-shadow: var(--shadow); padding: var(--space-4); margin-bottom: var(--space-3); }
.panel__title { font-weight: bold; letter-spacing: 1.5px; }
.btn { border-width: 2px; border-radius: 10px; font-weight: 600; transition: transform 0.05s; }
.btn:active:not(:disabled) { transform: translate(1px, 1px); }
.btn--primary { box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35); }
.block { border-width: 2px; box-shadow: var(--shadow); border-radius: var(--radius); }
.block__title { font-size: 20px; }
.topbar { border-bottom-width: 2px; padding: var(--space-2) var(--space-4); }
.stat__value { font-size: 20px; font-variant-numeric: tabular-nums; }
.rows dd, .num, .skill__value { font-variant-numeric: tabular-nums; }
.tabs { padding: 0 var(--space-4); border-bottom-width: 2px; }
.tab { font-weight: 600; }
.tab--active { border-bottom-width: 4px; }
.screen__title { letter-spacing: 0.5px; }
.modal { border-width: 2px; box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45); border-radius: 18px; }
.pick, .venue, .deal, .person, .cal__day, .message, .setlist-song { border-radius: 12px; }
.venue, .person { border-width: 2px; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3); }
.notice { border-radius: 12px; border-width: 2px; }
.badge { padding: 2px 9px; }
.hint { line-height: 1.5; }
.end-day { flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Today: event card ---------- */

.event-card { border: 2px solid var(--pink); background: rgba(255, 126, 182, 0.08); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-3); }
.event-card__title { font-size: 20px; font-weight: bold; color: var(--pink); }
.event-card p { margin: var(--space-1) 0 var(--space-2); }
.event-card__choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-2); }
.choice-btn { font: inherit; text-align: left; color: var(--text); background: var(--panel); border: 2px solid var(--line);
  border-radius: 12px; padding: var(--space-2) var(--space-3); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.choice-btn:hover:not(:disabled) { border-color: var(--pink); }
.choice-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.choice-btn span { color: var(--accent); font-weight: bold; font-size: 14px; }
.choice-btn em { color: var(--text-muted); font-size: 12px; }

/* ---------- Today: tutorial tips ---------- */

.tip-card { border: 2px solid var(--teal); background: rgba(79, 209, 197, 0.08); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-3); }
.tip-card__title { font-weight: bold; color: var(--teal); font-size: 18px; }
.tip-card p { margin: 6px 0 var(--space-2); }
.tip-card__actions { display: flex; gap: var(--space-1); }
.tour-highlight { outline: 3px dashed var(--teal) !important; outline-offset: 4px; border-radius: 12px; animation: tour-pulse 1.6s ease-in-out infinite; }
@keyframes tour-pulse { 50% { outline-color: rgba(79, 209, 197, 0.35); } }

/* ---------- Banners ---------- */

.toast { border-width: 2px; box-shadow: var(--shadow); }
.toast--milestone { border-color: var(--pink); background: rgba(255, 126, 182, 0.10); font-weight: 600; }

/* ---------- Career ---------- */

.fame__name { font-size: 32px; font-weight: bold; color: var(--accent); }
.fame__fans { color: var(--text-muted); margin-bottom: var(--space-1); }
.milestone { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-2); border-radius: 10px; margin-bottom: 6px; background: var(--panel-2); opacity: 0.7; }
.milestone--done { opacity: 1; border: 2px solid var(--pink); }
.milestone__num { text-align: center; font-weight: bold; }
.milestone__name { font-weight: bold; }
.milestone__when { font-size: 13px; }

/* ---------- Three weeks in ---------- */

.slice__headline { font-size: 48px; max-width: 900px; }
.slice__sub { color: var(--text-muted); max-width: 640px; font-size: 18px; }
.slice__panel { width: 620px; max-width: 100%; text-align: left; }

/* ---------- Skip summary ---------- */

.skip-days .result-row { grid-template-columns: 170px 1fr; }

/* ---------- Settings ---------- */

.switch { display: flex; align-items: center; gap: var(--space-1); cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Shop, studio, releases (Phase 8) ---------- */

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.shop-item { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); }
.shop-item--locked { opacity: 0.7; }
.shop-item__icon { font-size: 40px; }
.shop-item__name { font-size: 18px; font-weight: bold; }
.shop-item__buy { margin-top: auto; }
.cal__block--studio { background: rgba(255, 126, 182, 0.18); color: var(--pink); font-weight: bold; }
.release-list { margin-top: var(--space-2); }

/* ---------- Residency contract (Phase 9) ---------- */

.contract__terms { font-size: 18px; }
.contract-edit { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.contract-edit .field { margin-bottom: var(--space-1); }

/* ---------- Phase 10: day job, session work, Plan week ---------- */

/* A button that looks like a link (the Job row in the Stats panel). */
.link-btn { font: inherit; color: var(--teal); background: none; border: none; padding: 0; cursor: pointer; text-align: right; }
.link-btn:hover { text-decoration: underline; }

/* Session work on the Calendar grid. */
.cal__block--sessionWork { background: rgba(79, 209, 197, 0.18); color: var(--teal); font-weight: bold; }

/* The quit confirm table: week, music income, bills, left over. */
.quit-table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-2); font-variant-numeric: tabular-nums; }
.quit-table th, .quit-table td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); }
.quit-table th:first-child, .quit-table td:first-child { text-align: left; }
.quit-table th { color: var(--text-muted); font-weight: normal; }

/* Plan week rows: the day, what's planned, the task list, and "Change picks". */
.plan__row + .plan__row { margin-top: 6px; }
.plan__row--past { opacity: 0.5; }
.plan-week__select { max-width: 220px; }

/* ---------- Phase 11: the Map, trips, and travel ---------- */

.map-layout { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: var(--space-3); align-items: start; }
.map { width: 100%; height: auto; display: block; }
.map__ring { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 5; }
.map__city circle { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.map__city text { fill: var(--text); font-size: 11px; font-family: inherit; }
.map__city--locked circle { fill: var(--panel-2); stroke: var(--line); }
.map__city--locked text { fill: var(--text-muted); }

.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-2); }
.city { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: var(--space-2); }
.city--locked { opacity: 0.7; }
.city__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }

.trip { background: var(--panel-2); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.trip .log { margin: 6px 0; }

/* Travel and "on the road" on the Calendar grid. */
.cal__block--travel { background: rgba(255, 181, 71, 0.18); color: var(--accent); font-weight: bold; }
.cal__block--away { background: rgba(255, 181, 71, 0.08); color: var(--text-muted); font-style: italic; }
.block--travel { border-style: solid; border-color: var(--accent); background: rgba(255, 181, 71, 0.06); }

/* ---------- Phase 13: fame ladder, career card, top bar fame ---------- */

.topbar__fame { color: var(--accent); font-size: 13px; font-weight: bold; }

.fame-ladder { display: flex; flex-direction: column; gap: 4px; margin-top: var(--space-2); }
.fame-step { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; padding: 6px 10px; border-radius: 8px;
  background: var(--panel-2); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fame-step--reached { color: var(--text); }
.fame-step--current { background: var(--accent); color: var(--accent-text); font-weight: bold; }
.fame-step__mark { text-align: center; }

.career-card { width: 100%; height: auto; display: block; border-radius: var(--radius); margin: var(--space-2) 0; box-shadow: var(--shadow); }

/* ---------- The "Previous day" box on Today, and its full readout ---------- */

.recap { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
button.recap:hover { border-color: var(--accent); }
.recap--empty { cursor: default; }
.recap__numbers { margin-bottom: var(--space-2); font-variant-numeric: tabular-nums; }
.recap__list { list-style: none; margin: 0 0 var(--space-2); padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.recap__list li { display: flex; gap: 8px; align-items: baseline; }
.recap__icon { flex: 0 0 auto; }
.recap__more { color: var(--teal); font-size: 14px; font-weight: bold; }
.recap__strip { color: var(--text-muted); margin-top: 0; font-variant-numeric: tabular-nums; }
.modal--wide { width: 760px; max-width: calc(100vw - 32px); }

/* ---------- Finances screen ---------- */

.finance-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-2); margin-bottom: var(--space-3); }
.finance-card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: var(--space-2) var(--space-3); box-shadow: var(--shadow); }
.finance-card__label { display: block; color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.finance-card__value { display: block; font-size: 26px; font-weight: bold; font-variant-numeric: tabular-nums; }
.finance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-3); }
@media (max-width: 900px) { .finance-grid { grid-template-columns: minmax(0, 1fr); } }
.finance-bar { display: grid; grid-template-columns: 1fr 120px 44px; align-items: center; gap: 8px; margin: 4px 0; font-size: 14px; }
.finance-bar__track { height: 10px; background: var(--panel-2); border-radius: 5px; overflow: hidden; }
.finance-bar__fill { display: block; height: 100%; }
.finance-bar__fill--in { background: var(--good); }
.finance-bar__fill--out { background: var(--bad); }
.finance-bar__pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.chart { width: 100%; height: auto; display: block; }
.chart__in { fill: var(--good); }
.chart__out { fill: var(--bad); }
.chart__axis { stroke: var(--line); stroke-width: 1; }
.chart__label { fill: var(--text-muted); font-size: 12px; font-family: inherit; }
.finance-trip td { background: var(--panel-2); }
.finance-trip__show td:first-child { padding-left: 24px; }
.finance-shows td, .finance-shows th { font-size: 14px; }
.finance-shows td:nth-child(2), .finance-shows th:nth-child(2), .finance-trip td:first-child { text-align: left; }
