/* ==========================================================================
   Festival Tycoon — "Office" UI
   Stripe-inspired principles (clarity, whitespace, hairlines, layered shadows,
   explained numbers, calm motion) with our own tokens and a sunset accent.
   ========================================================================== */

:root {
  --ink: #0E1B3D;
  --ink-2: #24314F;
  --slate: #56658A;          /* darkened from #5B6B8C for AA on canvas */
  --muted: #8592AD;
  --canvas: #F7F8FB;
  --surface: #FFFFFF;
  --surface-2: #FBFCFE;
  --hairline: #E3E8F0;
  --hairline-2: #EEF1F6;
  --sunset-1: #FF7A59;
  --sunset-2: #FF3D7F;
  --sunset-3: #7B61FF;
  --sunset: linear-gradient(120deg, var(--sunset-1) 0%, var(--sunset-2) 50%, var(--sunset-3) 100%);
  --green: #1FA463;
  --green-bg: #E6F7EE;
  --mud: #8A5A3B;
  --mud-bg: #F5ECE5;
  --sky: #2B95DB;
  --sky-bg: #E7F3FC;
  --alert: #E5484D;
  --alert-bg: #FDECEC;
  --amber: #E8890C;
  --amber-bg: #FFF3E0;
  --violet: #7B61FF;
  --violet-bg: #F0EDFF;
  --pink: #C81E63;
  --pink-bg: #FFEBF2;

  --r-sm: 8px; --r-md: 12px; --r-lg: 20px;
  --shadow-1: 0 1px 1px rgba(14,27,61,.04), 0 2px 4px rgba(14,27,61,.04);
  --shadow-2: 0 1px 1px rgba(14,27,61,.03), 0 4px 8px rgba(14,27,61,.05), 0 12px 24px -8px rgba(14,27,61,.08);
  --shadow-3: 0 2px 4px rgba(14,27,61,.04), 0 12px 24px rgba(14,27,61,.08), 0 32px 64px -16px rgba(14,27,61,.18);
  --ring: 0 0 0 3px rgba(123,97,255,.28);

  --t-fast: 150ms; --t-panel: 250ms; --t-celebrate: 650ms;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --sidebar: 232px;
  --topbar: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--canvas);
  font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.display { font-family: var(--display); letter-spacing: -.02em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--slate); }
.tiny { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); font-weight: 550;
  box-shadow: var(--shadow-1); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast);
  white-space: nowrap; user-select: none; position: relative;
}
.btn:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: inset 0 1px 2px rgba(14,27,61,.12); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.sm { --h: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { --h: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn.primary {
  border: 0; color: #fff; background: var(--sunset); background-size: 160% 100%; background-position: 0 0;
  box-shadow: 0 1px 1px rgba(255,61,127,.2), 0 6px 16px -4px rgba(255,61,127,.45), inset 0 1px 0 rgba(255,255,255,.25);
  transition: background-position .5s var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.btn.primary:hover { background-position: 100% 0; box-shadow: 0 1px 1px rgba(255,61,127,.2), 0 10px 22px -6px rgba(123,97,255,.55), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(14,27,61,.05); transform: none; }
.btn.danger { color: var(--alert); }
.btn.good { background: var(--green); border-color: var(--green); color: #fff; }
.btn .kbd { font-size: 11px; opacity: .7; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 20px; height: 20px; }
.icon.xl { width: 28px; height: 28px; }

/* ---------- Inputs ---------- */
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 12px; font-weight: 600; color: var(--slate); }
.input, select.input {
  height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--hairline); background: var(--surface);
  box-shadow: inset 0 1px 1px rgba(14,27,61,.04); transition: border-color var(--t-fast), box-shadow var(--t-fast); width: 100%;
}
.input:focus { outline: none; border-color: var(--violet); box-shadow: var(--ring); }
.input.lg { height: 48px; font-size: 18px; font-weight: 600; }
.money-input { position: relative; }
.money-input::before { content: "£"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--slate); }
.money-input .input { padding-left: 24px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: var(--hairline); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--violet); box-shadow: var(--shadow-2); cursor: grab; transition: transform var(--t-fast) var(--spring); }
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.25); cursor: grabbing; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--violet); }
.daily-board { width: min(520px, 100%); box-sizing: border-box; padding: 20px 22px; border-radius: var(--r-lg); background: rgba(14,11,31,.78); border: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; }
.daily-board h1 { font-size: 20px; margin: 0 0 4px; color: #fff; }
.daily-board > p { margin: 0 0 12px; font-size: 14px; color: rgba(255,255,255,.72); }
.daily-board ol { list-style: none; counter-reset: db; margin: 0; padding: 0; }
.daily-board li { counter-increment: db; display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.1); }
.daily-board li::before { content: counter(db); width: 20px; flex: none; font-weight: 700; color: rgba(255,255,255,.55); }
.daily-board li span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.daily-board li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-board li small { font-size: 12px; color: rgba(255,255,255,.6); }
.daily-board li em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.mode-meta { display: block; margin-top: 8px; font-size: 12px; font-weight: 650; color: var(--violet); }
.daily-brief { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--hairline-2); font-size: 13px; color: var(--slate); line-height: 1.5; }
.daily-brief b { color: var(--ink); }
.rv-daily-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rv-daily-meta span { padding: 4px 10px; border-radius: var(--r-sm); background: rgba(255,255,255,.12); font-size: 13px; font-weight: 600; color: #fff; }
.acct { display: grid; gap: 16px; }
.acct-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 12px; background: var(--hairline-2); }
.acct-tabs button { border: 0; background: transparent; padding: 9px 12px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; color: var(--slate); cursor: pointer; transition: all var(--t-fast); }
.acct-tabs button:hover { color: var(--ink); }
.acct-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.acct-intro { margin: 0; font-size: 14px; color: var(--slate); }
.acct-field { display: grid; gap: 6px; }
.acct-field label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.acct-field label small { font-size: 12px; font-weight: 500; color: var(--muted); }
.acct-field .input { height: 44px; font-size: 15px; }
.acct-opt { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--slate); cursor: pointer; line-height: 1.45; }
.acct-opt input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--violet); cursor: pointer; }
.acct-link { justify-self: start; font-size: 13px; margin-top: -6px; }
.acct-sent { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--green-50, #ECFDF3); color: var(--ink); font-size: 14px; line-height: 1.5; }
.acct-sent svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--green); }
.acct-sent p { margin: 0; min-width: 0; }
.acct-sent b { overflow-wrap: anywhere; }
.acct { min-width: 0; }
.seg-control { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--hairline-2); border: 1px solid var(--hairline); }
.seg-control button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font-weight: 550; font-size: 13px; color: var(--slate); transition: all var(--t-fast); }
.seg-control button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- Cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.card.pad { padding: 20px; }
.card.lift { transition: transform var(--t-panel) var(--ease), box-shadow var(--t-panel) var(--ease); }
.card.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hairline-2); }
.card-h h3 { font-size: 14px; }
.card-b { padding: 16px 20px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--hairline-2); margin: 12px 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #F2F0F7; color: var(--ink-2); white-space: nowrap; }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.red { background: var(--alert-bg); color: var(--alert); }
.pill.amber { background: var(--amber-bg); color: #A65F00; }
.pill.sky { background: var(--sky-bg); color: #1B6FA8; }
.pill.violet { background: var(--violet-bg); color: var(--violet); }
.pill.mud { background: var(--mud-bg); color: var(--mud); }
.pill.pink { background: var(--pink-bg); color: var(--pink); }
.pill.dark { background: var(--ink); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: var(--topbar) 1fr; height: 100vh; }
.sidebar {
  grid-row: 1 / 3; background: var(--surface); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--sunset); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px -4px rgba(255,61,127,.5); position: relative; overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); animation: shine 5s ease-in-out infinite; }
@keyframes shine { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.brand b { font-family: var(--display); font-size: 16px; display: block; line-height: 1.1; }
.brand small { color: var(--slate); font-size: 12px; }
.brand-logo { flex-direction: column; align-items: flex-start; gap: 6px; padding: 2px 6px 18px; }
.brand-logo img { width: 100%; max-width: 184px; height: auto; display: block; }
.brand-logo small { font-size: 13px; font-weight: 600; padding-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 12px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 520; position: relative;
  transition: background var(--t-fast), color var(--t-fast); text-decoration: none;
}
.nav a:hover { background: var(--hairline-2); }
.nav a.on { background: var(--violet-bg); color: var(--violet); }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sunset); }
.nav a .badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 700; display: grid; place-items: center; background: var(--sunset-2); color: #fff; animation: pop .4s var(--spring); }
.nav a .lock { margin-left: auto; opacity: .5; }
.sidebar .grow { flex: 1; }
.sidebar-foot { border-top: 1px solid var(--hairline-2); padding-top: 12px; display: grid; gap: 8px; }
.smartgig-chip { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: linear-gradient(135deg, #F4F1FF, #FFF1F4); font-size: 12px; color: var(--ink-2); text-decoration: none; border: 1px solid #EDE7FF; }
.smartgig-chip:hover { text-decoration: none; box-shadow: var(--shadow-1); }
.smartgig-chip b { color: var(--violet); }

.topbar {
  display: flex; align-items: center; gap: 16px; padding: 0 24px; background: rgba(247,248,251,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline); z-index: 4;
}
.fest-block { display: flex; flex-direction: column; min-width: 0; max-width: 240px; }
.save-status { border: 0; background: none; padding: 2px 0 0; display: inline-flex; gap: 5px; align-items: center; font: inherit; font-size: 12px; font-weight: 600; color: var(--slate); cursor: pointer; white-space: nowrap; text-align: left; }
.save-status svg { width: 13px; height: 13px; flex: none; }
.save-status.ok svg { color: var(--green); }
.save-status.guest { color: #A65F00; }
.save-status.guest:hover span, .save-status.ok:hover span { text-decoration: underline; text-underline-offset: 2px; }
.save-status.bad { color: var(--alert); }
.save-status .spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--hairline); border-top-color: var(--violet); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.title-save { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--hairline-2); border: 1px solid var(--hairline); font-size: 13px; line-height: 1.45; color: var(--slate); text-align: left; }
.title-save svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--violet); }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--violet); font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.topbar .fest-name { font-family: var(--display); font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; min-width: 0; }
.kpi { display: flex; flex-direction: column; line-height: 1.15; padding: 0 14px; border-left: 1px solid var(--hairline); cursor: help; }
.kpi small { font-size: 11px; color: var(--slate); font-weight: 600; white-space: nowrap; }
.kpi b { font-size: 16px; font-weight: 650; white-space: nowrap; }
.kpi b.neg { color: var(--alert); }
.month-pill { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--hairline); font-weight: 600; box-shadow: var(--shadow-1); white-space: nowrap; flex: none; }
.month-pill .fest-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sunset-2); box-shadow: 0 0 0 0 rgba(255,61,127,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,61,127,.55); } 70% { box-shadow: 0 0 0 10px rgba(255,61,127,0); } 100% { box-shadow: 0 0 0 0 rgba(255,61,127,0); } }

.main { overflow: auto; position: relative; }
.page { padding: 28px 32px 64px; max-width: 1280px; margin: 0 auto; animation: page-in var(--t-panel) var(--ease); }
.page.full { max-width: none; padding: 0; height: 100%; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-h h1 { font-family: var(--display); font-size: 28px; font-weight: 700; }
.page-h p { margin: 4px 0 0; color: var(--slate); max-width: 640px; text-wrap: pretty; }
.grid-key { margin: 12px 0 0; text-wrap: pretty; }
.street-done { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 28px 16px 8px; }
.street-done h3 { margin: 0 0 10px; font-size: 18px; }
.street-big { font-family: var(--display); font-size: 64px; font-weight: 700; line-height: 1; background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }
.street-done [data-res] { width: min(440px, 100%); }
.street-rows { display: grid; gap: 0; border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; text-align: left; }
.street-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.street-rows > div + div { border-top: 1px solid var(--hairline-2); }
.grid-sq { cursor: help; border-radius: 4px; outline-offset: 2px; }
.grid-sq:hover, .grid-sq:focus-visible { background: var(--violet-bg); }
.page-h .ch-sg { display: flex; gap: 10px; align-items: center; width: fit-content; max-width: 100%; box-sizing: border-box; margin-top: 12px; padding: 10px 14px 10px 12px; border-radius: 10px; background: linear-gradient(135deg, #F4F1FF, #FFF1F4); border: 1px solid #EDE7FF; font-size: 13px; color: var(--ink-2); }
.page-h .ch-sg > svg { flex: none; color: var(--violet); }
.page-h .ch-sg a { font-weight: 700; }

/* ---------- Stat tiles & sparklines ---------- */
.stat { padding: 16px 18px; display: grid; gap: 6px; position: relative; overflow: hidden; }
.stat small { color: var(--slate); font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.stat .big { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat .delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--green); } .delta.down { color: var(--alert); }
.spark { width: 100%; height: 32px; display: block; }
.why { border: 0; background: none; padding: 0 2px; color: var(--muted); font-size: 11px; font-weight: 700; border-bottom: 1px dashed var(--muted); line-height: 1; cursor: help; }
.why:hover { color: var(--violet); border-color: var(--violet); }

.meter { height: 8px; border-radius: 8px; background: var(--hairline-2); overflow: hidden; position: relative; }
.meter > i { position: absolute; inset: 0 auto 0 0; border-radius: 8px; background: var(--sunset); transition: width .8s var(--spring); }
.meter.green > i { background: var(--green); } .meter.sky > i { background: var(--sky); } .meter.mud > i { background: var(--mud); } .meter.alert > i { background: var(--alert); }

.rep-ring { position: relative; width: 44px; height: 44px; }
.rep-ring svg { transform: rotate(-90deg); }
.rep-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; }

/* ---------- Tables / lists ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--slate); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--hairline); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--hairline-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.hover:hover td { background: var(--surface-2); }
.right { text-align: right; }
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--hairline-2); transition: background var(--t-fast); }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }

/* ---------- Inbox ---------- */
.mail { cursor: pointer; }
.mail .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-weight: 700; font-size: 13px; }
.mail.unread .t { font-weight: 700; }
.mail.unread .av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sunset-2); }
.mail .body { white-space: pre-line; color: var(--ink-2); margin-top: 6px; display: none; }
.mail.open .body { display: block; animation: page-in .2s var(--ease); }

/* ---------- Checklist / timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.tl-m { display: grid; gap: 6px; justify-items: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.tl-m .bar { width: 100%; height: 8px; border-radius: 4px; background: var(--hairline-2); position: relative; overflow: hidden; }
.tl-m.past .bar { background: var(--ink-2); }
.tl-m.now .bar { background: var(--sunset); }
.tl-m.now { color: var(--ink); }
.tl-m.fest .bar { background: repeating-linear-gradient(45deg, var(--sunset-2), var(--sunset-2) 4px, var(--sunset-1) 4px, var(--sunset-1) 8px); }
.tl-m.now .bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: sweep 2s infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.check .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--hairline); display: grid; place-items: center; flex: none; transition: all .3s var(--spring); }
.check.done .box { background: var(--green); border-color: var(--green); color: #fff; transform: rotate(-8deg); }
.check.done span { color: var(--muted); text-decoration: line-through; }
.check:hover span { color: var(--violet); }

/* ---------- Maggie ---------- */
.maggie { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); background: linear-gradient(135deg, #FFF7F2 0%, #FFF0F5 50%, #F3F0FF 100%); border: 1px solid #FBE3EA; position: relative; }
.maggie .face { width: 44px; height: 44px; flex: none; }
.maggie p { margin: 2px 0 0; color: var(--ink-2); }
.maggie b { font-family: var(--display); }

/* ---------- Modal, drawer, toast, tooltip ---------- */
.scrim { position: fixed; inset: 0; background: rgba(14,27,61,.38); backdrop-filter: blur(3px); z-index: 50; display: grid; place-items: center; animation: fade .2s ease; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3); animation: modal-in .35s var(--spring); }
.modal.wide { width: min(860px, 100%); }
.modal-h { padding: 20px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-h h2 { font-family: var(--display); font-size: 22px; }
.modal-b { padding: 16px 24px 24px; flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.modal-h, .modal-f { flex: none; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.guide-steps li { display: flex; gap: 12px; align-items: flex-start; }
.guide-steps .guide-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--violet); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; margin-top: 1px; }
.guide-steps b { display: block; font-size: 15px; }
.guide-tips { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--hairline); display: grid; gap: 8px; font-size: 13px; color: var(--slate); }
.guide-tips .kbd { display: inline-block; font-size: 11px; font-weight: 700; color: var(--ink); border: 1px solid var(--hairline); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; margin-right: 4px; background: var(--surface-2); }
.guide-steps p { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--slate); }
@media (max-width: 640px) { .guide-steps { grid-template-columns: 1fr; gap: 14px; } .scrim { padding: 12px 10px max(12px, env(safe-area-inset-bottom)); } .modal-h { padding: 16px 18px 0; } .modal-b { padding: 12px 18px 18px; } .modal-f { padding: 12px 18px; } }
.modal-f { padding: 16px 24px; border-top: 1px solid var(--hairline-2); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.closing { animation: modal-out .18s ease forwards; }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow-3); font-weight: 520; animation: toast-in .4s var(--spring); max-width: 520px; }
.toast.bad { background: var(--alert); }
.toast.good { background: #0F7A48; }
.toast.out { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

.tip { position: fixed; z-index: 90; max-width: 300px; padding: 12px 14px; border-radius: 10px; background: var(--ink); color: #E8ECF6; font-size: 12.5px; box-shadow: var(--shadow-3); pointer-events: none; animation: tip-in .15s ease; }
.tip h5 { margin: 0 0 6px; color: #fff; font-size: 13px; }
.tip table { width: 100%; border-collapse: collapse; }
.tip td { padding: 2px 0; }
.tip td:last-child { text-align: right; font-weight: 600; color: #fff; }
.tip .tot td { border-top: 1px solid rgba(255,255,255,.18); padding-top: 6px; }
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------- Command palette ---------- */
.palette { width: min(560px, 100%); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-3); overflow: hidden; align-self: start; margin-top: 12vh; animation: modal-in .25s var(--spring); }
.palette input { width: 100%; border: 0; padding: 18px 20px; font-size: 16px; border-bottom: 1px solid var(--hairline); outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow: auto; }
.palette li { padding: 10px 12px; border-radius: 8px; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.palette li.on { background: var(--violet-bg); color: var(--violet); }
.palette li small { margin-left: auto; color: var(--muted); }

/* ---------- Celebrations ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
.coin { position: fixed; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFE58A, #F2B705 60%, #C98A00); box-shadow: 0 0 0 1px #C98A00 inset, 0 2px 6px rgba(201,138,0,.4); z-index: 101; pointer-events: none; }
.stamp { position: fixed; z-index: 102; left: 50%; top: 42%; font-family: var(--display); font-size: 72px; font-weight: 800; color: var(--sunset-2); border: 8px solid var(--sunset-2); border-radius: 14px; padding: 4px 24px; transform: translate(-50%, -50%) rotate(-14deg); animation: stamp 1.8s var(--spring) forwards; pointer-events: none; letter-spacing: .02em; background: rgba(255,255,255,.85); mix-blend-mode: multiply; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(3); } 15% { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(1.02); } }
.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.pop { animation: pop .45s var(--spring); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.flash-up { animation: flash-up .9s ease; }
@keyframes flash-up { 0% { color: var(--green); transform: translateY(-2px); } 100% { color: inherit; transform: none; } }
.flash-down { animation: flash-down .9s ease; }
@keyframes flash-down { 0% { color: var(--alert); } 100% { color: inherit; } }
.float-num { position: fixed; z-index: 103; font-weight: 800; font-family: var(--display); pointer-events: none; animation: float-up 1.4s var(--ease) forwards; font-size: 18px; text-shadow: 0 2px 8px rgba(255,255,255,.8); }
@keyframes float-up { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-48px) scale(1.15); } }

/* ---------- Skeleton ---------- */
.skel { background: linear-gradient(90deg, var(--hairline-2) 0%, #F7F9FC 50%, var(--hairline-2) 100%); background-size: 200% 100%; animation: skel 1.2s infinite; border-radius: 8px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Title screen ---------- */
.title-screen { position: fixed; inset: 0; background: #0E0B1F; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; color: #fff; z-index: 20; }
.title-screen canvas { position: fixed; inset: 0; width: 100%; height: 100%; }
.title-inner { position: relative; z-index: 2; min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 24px 16px max(32px, env(safe-area-inset-bottom)); }
.title-inner > :first-child { margin-top: auto; }
.title-inner > :last-child { margin-bottom: auto; }
.title-inner img { width: min(520px, 80vw, 92vh); max-height: 30vh; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0,0,0,.5)); animation: logo-in 1.1s var(--spring) both; }
@keyframes logo-in { from { opacity: 0; transform: translateY(-30px) scale(.9) rotate(-2deg); } }
.title-card { width: min(520px, 100%); background: rgba(255,255,255,.98); color: var(--ink); border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(0,0,0,.45); padding: 22px; animation: modal-in .6s .3s var(--spring) both; }
.title-card h2 { font-family: var(--display); font-size: 20px; }
.save-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 10px; cursor: pointer; transition: all var(--t-fast); }
.save-row:hover { border-color: var(--violet); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-tab { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; border: 1.5px solid var(--hairline); border-radius: 12px; padding: 12px; background: var(--surface); text-align: left; transition: all var(--t-fast); }
.mode-tab.on { border-color: var(--violet); box-shadow: var(--ring); }
.mode-tab b { display: block; font-family: var(--display); }
.mode-tab small { color: var(--slate); }

/* ---------- Line-up ---------- */
.act-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), border-color var(--t-fast); cursor: grab; }
.act-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); border-color: #D5DCE8; }
.act-card.dragging { opacity: .4; }
.act-art { width: 44px; height: 44px; border-radius: 10px; position: relative; overflow: hidden; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 800; font-size: 16px; }
.trend-up { color: var(--green); font-weight: 700; }
.trend-down { color: var(--alert); font-weight: 700; }
.slot { border: 1.5px dashed var(--hairline); border-radius: 12px; padding: 10px 12px; min-height: 64px; display: grid; align-content: center; transition: all var(--t-fast); background: var(--surface-2); position: relative; }
.slot.over { border-color: var(--violet); background: var(--violet-bg); transform: scale(1.01); }
.slot.filled { border-style: solid; background: var(--surface); }
.slot .slot-name { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.slot.headline { border-color: #F9C8D6; background: linear-gradient(135deg, #FFF8F5, #FFF0F6); }
.slot.headline.filled { border-color: var(--sunset-2); box-shadow: 0 6px 18px -8px rgba(255,61,127,.45); }

/* ---------- Traders ---------- */
.trader-card { border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; background: var(--surface); display: grid; transition: transform var(--t-panel) var(--ease), box-shadow var(--t-panel), opacity var(--t-panel); }
.trader-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.trader-card .hero { height: 76px; position: relative; overflow: hidden; }
.trader-card .hero canvas { width: 100%; height: 100%; display: block; }
.trader-card .tb { padding: 12px 14px; display: grid; gap: 8px; }
.trader-card.legend { border-color: #F2B705; box-shadow: 0 0 0 2px rgba(242,183,5,.25), var(--shadow-2); }
.trader-card.gone { animation: card-out .45s var(--ease) forwards; }
@keyframes card-out { to { opacity: 0; transform: translateX(60px) rotate(6deg); } }
.trader-card.accepted { animation: card-yes .6s var(--spring); }
@keyframes card-yes { 50% { transform: scale(1.04); box-shadow: 0 0 0 3px var(--green); } }
.hyg { display: inline-flex; gap: 2px; }
.hyg i { width: 14px; height: 14px; border-radius: 3px; background: var(--hairline); display: inline-block; }
.hyg i.on { background: var(--green); }
.powered { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 8px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--hairline); font-size: 12px; font-weight: 600; color: var(--slate); box-shadow: var(--shadow-1); }
.powered b { background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Site builder ---------- */
.builder { display: grid; grid-template-columns: 260px 1fr 300px; height: 100%; }
.catalogue { border-right: 1px solid var(--hairline); background: var(--surface); overflow: auto; padding: 16px; display: grid; align-content: start; gap: 6px; }
.cat-h { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 10px; }
.cat-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: all var(--t-fast); background: none; text-align: left; width: 100%; }
.cat-item:hover { background: var(--hairline-2); }
.cat-item.on { border-color: var(--violet); background: var(--violet-bg); box-shadow: var(--ring); }
.cat-item.locked { opacity: .45; cursor: not-allowed; }
.cat-item canvas { width: 36px; height: 36px; }
.cat-item b { font-size: 13px; font-weight: 600; display: block; line-height: 1.2; }
.cat-item small { color: var(--slate); font-size: 12px; }
.map-wrap { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #DFF2E3 0%, #CFE6D5 60%, #BFD9C6 100%); }
.map-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.map-tools { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 2; }
.map-tools .seg-control { background: rgba(255,255,255,.9); backdrop-filter: blur(6px); }
.map-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(14,27,61,.85); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 520; z-index: 2; white-space: nowrap; transition: opacity .3s; }
.map-legend { position: absolute; bottom: 14px; right: 14px; background: rgba(255,255,255,.95); border-radius: 10px; padding: 10px 12px; font-size: 12px; box-shadow: var(--shadow-2); z-index: 2; min-width: 160px; }
.legend-bar { height: 8px; border-radius: 4px; margin: 6px 0 2px; }
.inspector { border-left: 1px solid var(--hairline); background: var(--surface); overflow: auto; padding: 16px; display: grid; align-content: start; gap: 14px; }
.issue { display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 10px; border-radius: 10px; font-size: 13px; }
.issue.error { background: var(--alert-bg); } .issue.warn { background: var(--amber-bg); } .issue.info { background: var(--sky-bg); }
.issue small { display: block; color: var(--slate); }
.effect-pop { position: absolute; z-index: 3; pointer-events: none; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-2); animation: float-up 1.6s var(--ease) forwards; white-space: nowrap; }

/* ---------- Charts ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--slate); }
.chart .lbl { font-weight: 600; fill: var(--ink); }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .grow-bar { transform-box: fill-box; transform-origin: bottom; animation: grow-bar .7s var(--spring) both; }
@keyframes grow-bar { from { transform: scaleY(0); } }

/* ---------- Weekend ---------- */
.weekend { position: fixed; inset: 0; z-index: 30; background: #0B1026; display: grid; grid-template-columns: 1fr 340px; color: #fff; }
.weekend .field-view { position: relative; overflow: hidden; }
.weekend canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wk-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; gap: 10px; align-items: center; z-index: 3; pointer-events: none; }
.wk-top > * { pointer-events: auto; }
.glass { background: rgba(14,20,46,.62); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(12px); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.clock { padding: 8px 16px; font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: .02em; display: flex; gap: 10px; align-items: baseline; }
.clock small { font-family: var(--font); font-size: 12px; font-weight: 600; color: #B8C1DD; }
.speed { display: flex; padding: 4px; gap: 2px; }
.speed button { border: 0; background: transparent; color: #C9D1EA; height: 32px; min-width: 36px; padding: 0 8px; border-radius: 9px; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.speed button.on { background: rgba(255,255,255,.16); color: #fff; }
.now-playing { padding: 8px 14px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 18px; }
.eq i { width: 3px; background: var(--sunset-1); border-radius: 2px; animation: eq .8s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s; background: var(--sunset-2); } .eq i:nth-child(3) { animation-delay: .3s; background: var(--sunset-3); } .eq i:nth-child(4) { animation-delay: .45s; }
.eq.off i { animation: none; height: 3px !important; opacity: .4; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
.control-room { background: #0F1531; border-left: 1px solid rgba(255,255,255,.08); overflow: auto; padding: 16px; display: grid; align-content: start; gap: 10px; }
.cr-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8C97BD; display: flex; align-items: center; gap: 8px; }
.cr-h .live { width: 8px; height: 8px; border-radius: 50%; background: #FF3D7F; animation: pulse 1.4s infinite; }
.metric { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.metric small { color: #9BA6C9; font-size: 12px; font-weight: 600; }
.metric b { font-family: var(--display); font-size: 18px; font-weight: 700; text-align: right; }
.metric svg { grid-column: 1 / 3; width: 100%; height: 26px; }
.metric.bad b { color: #FF8A8E; } .metric.good b { color: #6BE3A4; }
.mood-face { width: 54px; height: 54px; }
.log { display: grid; gap: 6px; font-size: 12.5px; color: #C7CFE6; max-height: 220px; overflow: auto; }
.log div { padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.03); animation: page-in .3s ease; }
.log .good { border-left: 3px solid #2FBF71; } .log .bad { border-left: 3px solid #E5484D; } .log .warn { border-left: 3px solid #F2B705; } .log .info { border-left: 3px solid #3AA8F0; }
.log time { color: #7F8AB0; font-weight: 700; margin-right: 6px; }
.incident {
  position: absolute; right: 16px; top: 84px; width: min(400px, calc(100% - 32px)); z-index: 6; color: var(--ink); background: #fff; border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; animation: incident-in .55s var(--spring);
}
@keyframes incident-in { from { opacity: 0; transform: translateX(120%) rotate(4deg); } }
.incident.out { animation: incident-out .35s ease forwards; }
@keyframes incident-out { to { opacity: 0; transform: translateX(60px) scale(.95); } }
.incident-h { padding: 16px 18px 12px; display: grid; grid-template-columns: 48px 1fr 48px; gap: 12px; align-items: center; }
.incident-h .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.incident.alert .ic { background: linear-gradient(135deg, #FF6B6F, #E5484D); }
.incident.warn .ic { background: linear-gradient(135deg, #FFB547, #E8890C); }
.incident.good .ic { background: linear-gradient(135deg, #7B61FF, #FF3D7F); }
.incident h3 { font-family: var(--display); font-size: 17px; line-height: 1.2; }
.incident p { margin: 0; padding: 0 18px 12px; color: var(--ink-2); }
.timer-ring { width: 48px; height: 48px; position: relative; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.incident .opts { display: grid; gap: 8px; padding: 0 18px 18px; }
.incident .opt { text-align: left; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface); font-weight: 560; display: flex; justify-content: space-between; gap: 10px; align-items: center; transition: all var(--t-fast); }
.incident .opt:hover { border-color: var(--violet); background: var(--violet-bg); transform: translateX(3px); }
.incident .opt .kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--hairline); border-radius: 5px; padding: 0 5px; }
.incident .result { padding: 14px 18px 18px; font-weight: 560; }
.day-card { position: absolute; inset: 0; display: grid; place-items: center; z-index: 8; background: rgba(5,8,22,.55); backdrop-filter: blur(4px); animation: fade .4s; }
.day-card .inner { text-align: center; animation: modal-in .6s var(--spring); }
.day-card h2 { font-family: var(--display); font-size: 54px; font-weight: 800; background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Review ---------- */
.review { position: fixed; inset: 0; z-index: 40; overflow: auto; background: radial-gradient(1200px 600px at 50% -10%, #2B1B5E 0%, #120D2B 50%, #0A0818 100%); color: #fff; }
.review-inner { max-width: 1040px; margin: 0 auto; padding: 40px 24px 80px; display: grid; gap: 22px; }
.newspaper { background: #F6F1E6; color: #1A1611; border-radius: 6px; padding: 22px 28px; box-shadow: 0 30px 70px rgba(0,0,0,.5); transform-origin: center; animation: paper-in 1.1s var(--spring) both; font-family: Georgia, "Times New Roman", serif; position: relative; }
.newspaper::after { content: ""; position: absolute; inset: 0; border-radius: 6px; background: repeating-linear-gradient(0deg, rgba(0,0,0,.015) 0 2px, transparent 2px 4px); pointer-events: none; }
@keyframes paper-in { 0% { opacity: 0; transform: rotate(-540deg) scale(.1); } 100% { opacity: 1; transform: rotate(-1.2deg) scale(1); } }
.newspaper .mast { display: flex; justify-content: space-between; border-bottom: 3px double #1A1611; padding-bottom: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.newspaper .mast b { font-size: 28px; letter-spacing: -.01em; text-transform: none; font-family: "Old English Text MT", Georgia, serif; }
.newspaper h1 { font-family: Georgia, serif; font-size: clamp(26px, 4vw, 44px); line-height: 1.05; margin: 14px 0 8px; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.newspaper p { font-size: 16px; font-style: italic; margin: 0; }
.stars { display: inline-flex; gap: 4px; }
.rv-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 20px; backdrop-filter: blur(10px); }
.rv-card h3 { font-family: var(--display); font-size: 18px; margin-bottom: 12px; }
.rv-score { font-family: var(--display); font-size: 88px; font-weight: 800; line-height: 1; background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }
.seg-row { display: grid; grid-template-columns: 130px 1fr 60px; gap: 12px; align-items: center; padding: 6px 0; font-size: 13px; }
.post { background: #fff; color: var(--ink); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; animation: post-in .5s var(--spring) both; }
@keyframes post-in { from { opacity: 0; transform: translateY(20px) scale(.95); } }
.post .who { font-weight: 700; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.post .av { width: 28px; height: 28px; border-radius: 50%; }
.badge-ach { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,122,89,.2), rgba(123,97,255,.25)); border: 1px solid rgba(255,255,255,.15); animation: pop .6s var(--spring) both; }
.badge-ach .medal { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE58A, #F2B705 55%, #B57A00); display: grid; place-items: center; color: #5A3B00; box-shadow: 0 6px 16px rgba(242,183,5,.35); }
.rep-change { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; }
.rep-change .meter { background: rgba(255,255,255,.1); }

/* ---------- Mini-games ---------- */
.mini { position: relative; height: 380px; border-radius: 14px; overflow: hidden; background: linear-gradient(#BFE4FF, #E8F6FF 55%, #9BD08A 55%, #7DBF6E); cursor: crosshair; user-select: none; }
.mini canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Bank ---------- */
.bank-scene { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.bank-q { display: grid; gap: 8px; }
.bank-q button { text-align: left; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); font-weight: 520; transition: all var(--t-fast); }
.bank-q button:hover { border-color: var(--violet); }
.bank-q button.on { border-color: var(--violet); background: var(--violet-bg); box-shadow: var(--ring); }
.speech { background: var(--hairline-2); border-radius: 4px 14px 14px 14px; padding: 12px 14px; font-weight: 520; position: relative; animation: pop .35s var(--spring); }

/* ---------- Poster ---------- */
.poster { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; position: relative; box-shadow: var(--shadow-3); }
.poster canvas { width: 100%; height: 100%; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .builder { grid-template-columns: 220px 1fr; }
  .inspector { display: none; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; height: auto; min-height: 100vh; }
  .sidebar { grid-row: auto; flex-direction: row; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--hairline); position: sticky; top: 0; }
  .sidebar .brand, .sidebar .nav-label, .sidebar-foot, .sidebar .grow { display: none; }
  .nav { display: flex; gap: 4px; }
  .nav a { white-space: nowrap; }
  .nav a.on::before { display: none; }
  .topbar { overflow-x: auto; padding: 0 12px; }
  .fest-block { flex: none; max-width: 190px; }
  .topbar .fest-name { max-width: 190px; font-size: 16px; }
  .kpi.hide-sm { display: none; }
  .page { padding: 20px 16px 48px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .lineup-cols, .stage-cols { grid-template-columns: 1fr !important; }
  .builder { grid-template-columns: 1fr; grid-template-rows: auto 60vh; }
  .catalogue { display: flex; overflow-x: auto; padding: 8px; }
  .catalogue .cat-h { display: none; }
  .cat-item { min-width: 170px; }
  .weekend { grid-template-columns: 1fr; grid-template-rows: 60vh auto; overflow: auto; }
  .seg-row { grid-template-columns: 100px 1fr 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
