/* Hyper Jingle — neo-brutalist B2B UI: cream paper, thick ink borders, hard offset shadows, flat bold accents.
   Behind everything: a low-key retail scene with one vivid product (generated per store type). */
:root {
  --ink: #111111; --ink-2: #3a3936; --muted: #6b6a64; --paper: #fbf6ec; --card: #ffffff; --line: #111111;
  --yellow: #FFD23F; --pink: #FF6FB5; --blue: #4D96FF; --green: #3DDC97; --orange: #FF8A3D; --violet: #B084F5; --red: #FF5C39;
  --bw: 2.5px; --shadow: 4px 4px 0 var(--ink); --shadow-lg: 7px 7px 0 var(--ink); --radius: 10px;
  --font: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif; --display: "Archivo Black", "Arial Black", var(--font);
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  --side: 236px; --top: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.45 var(--font); min-height: 100vh;
  display: grid; grid-template-columns: var(--side) 1fr; grid-template-rows: var(--top) 1fr; }
body.has-mini { padding-bottom: 78px; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font: 34px/1.1 var(--display); letter-spacing: -.5px; }
h2 { font: 22px var(--display); }
h3 { font-size: 18px; font-weight: 700; }
hr { border: 0; border-top: var(--bw) solid var(--ink); margin: 14px 0; }
small { font-size: 12.5px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.lead { font-size: 16px; color: var(--ink-2); margin: 6px 0 0; max-width: 760px; }
.warn { color: #b3261e; font-weight: 600; }
.ok { color: #0d7a4c; font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.spread, .spread { justify-content: space-between; }
.row.end { justify-content: flex-end; flex-wrap: nowrap; }
.row.center { justify-content: center; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }

/* ---------- backdrop ---------- */
#backdrop { position: fixed; inset: 0; z-index: -1; background: var(--backdrop, none) right center / cover no-repeat; transition: background-image .4s; }
#backdrop::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(251,246,236,.97) 0%, rgba(251,246,236,.93) 45%, rgba(251,246,236,.72) 75%, rgba(251,246,236,.45) 100%); }

/* ---------- chrome ---------- */
#sidebar { grid-row: 1 / 3; position: sticky; top: 0; height: 100vh; background: var(--yellow); border-right: var(--bw) solid var(--ink);
  display: flex; flex-direction: column; padding: 16px 12px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 9px; font: 19px var(--display); white-space: nowrap; text-decoration: none; margin: 0 2px 20px; letter-spacing: -.5px; }
.logo { flex: none; width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink); color: var(--yellow); border-radius: 9px; font: 22px var(--display); box-shadow: 3px 3px 0 var(--pink); }
#sidebar nav { display: flex; flex-direction: column; gap: 3px; }
#sidebar hr { margin: 8px 6px; border-top-width: 2px; opacity: .25; }
.nav { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px; text-decoration: none; font-weight: 600; border: var(--bw) solid transparent; }
.nav:hover { background: rgba(255,255,255,.55); }
.nav.on { background: var(--card); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.side-foot { margin-top: auto; }
.plan { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.plan small { color: var(--muted); }
#topbar { grid-column: 2; position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(251,246,236,.9); backdrop-filter: blur(6px); border-bottom: var(--bw) solid var(--ink); }
.ws { display: flex; align-items: center; gap: 10px; }
.ws-name { font-weight: 700; font-size: 16px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.onair { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; padding: 5px 11px; border: var(--bw) solid var(--ink); border-radius: 99px; background: var(--card); }
.onair i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.user { display: flex; align-items: center; gap: 10px; }
.user-name { display: flex; flex-direction: column; line-height: 1.15; }
.user-name small { color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--c, var(--pink)); border: var(--bw) solid var(--ink); flex: none; }
.avatar.big { width: 54px; height: 54px; font: 22px var(--display); }
.menu { display: none; }
#view { grid-column: 2; padding: 28px 32px 48px; max-width: 1480px; width: 100%; min-width: 0; }
body.bare { grid-template-columns: 1fr; grid-template-rows: 1fr; }
body.bare #sidebar, body.bare #topbar { display: none; }
body.bare #view { grid-column: 1; max-width: 980px; margin: 0 auto; padding-top: 24px; }
.loading { display: grid; place-items: center; min-height: 40vh; }

/* ---------- primitives ---------- */
.card { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
section.card { margin-bottom: 20px; }
.card.narrow { max-width: 820px; }
.card-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.section { margin: 26px 0 14px; font-size: 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; margin-bottom: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14.5px var(--font); color: var(--ink); background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: 8px; padding: 8px 15px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .06s, box-shadow .06s; white-space: nowrap; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--pink); }
.btn.primary:hover { box-shadow: 4px 4px 0 var(--pink); }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn.small { padding: 5px 10px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }
.btn.ghost { box-shadow: none; border-color: transparent; background: transparent; }
.btn.ghost:hover { border-color: var(--ink); background: var(--card); }
.btn.danger { background: #ffe3dc; }
.iconbtn { border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 6px; display: inline-grid; place-items: center; color: var(--ink); }
.iconbtn:hover { background: rgba(0,0,0,.07); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--c, var(--card)); white-space: nowrap; }
.pill.muted { background: #f1ece2; color: var(--ink-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.pickable .pill { cursor: pointer; font-size: 14px; padding: 5px 13px; background: var(--card); }
.chips.pickable .pill.on { background: var(--ink); color: #fff; }
.badge { font-size: 11px; background: var(--pink); border: 2px solid var(--ink); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.flabel { font-weight: 700; font-size: 13.5px; margin: 14px 0 7px; }
.field .flabel { margin: 0; }
.hint { color: var(--muted); }
input, select, textarea { font: 15px var(--font); color: var(--ink); background: var(--card); border: var(--bw) solid var(--ink); border-radius: 8px; padding: 8px 11px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 3px 3px 0 var(--blue); }
input[type=range] { padding: 0; border: 0; accent-color: var(--ink); flex: 1; }
input[type=checkbox] { width: auto; accent-color: var(--ink); width: 18px; height: 18px; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.actions.spread { justify-content: space-between; }
.seg { display: inline-flex; border: var(--bw) solid var(--ink); border-radius: 9px; overflow: hidden; background: var(--card); box-shadow: 3px 3px 0 var(--ink); }
.seg button { font: 600 14px var(--font); border: 0; background: transparent; padding: 7px 14px; cursor: pointer; border-right: 2px solid var(--ink); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: #fff; }
.seg.big button { padding: 10px 18px; font-size: 15px; }
.seg.small button { padding: 4px 10px; font-size: 13px; }
.empty { text-align: center; padding: 42px 20px; }
.empty p { color: var(--muted); }
.spinner { width: 16px; height: 16px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
body.has-mini #toasts { bottom: 96px; }
.toast { background: var(--card); border: var(--bw) solid var(--ink); border-radius: 8px; padding: 10px 14px; box-shadow: var(--shadow); font-weight: 600; max-width: 420px; animation: pop .15s; }
.toast.error { background: #ffe3dc; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal-wrap { position: fixed; inset: 0; background: rgba(17,17,17,.45); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; padding: 8px 10px; border-bottom: var(--bw) solid var(--ink); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1.5px solid #e6e0d4; vertical-align: middle; }
.table tfoot td { border-top: var(--bw) solid var(--ink); border-bottom: 0; font-weight: 700; }
.table.small td, .table.small th { padding: 5px 8px; font-size: 13px; }
.clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb { width: 52px; height: 52px; border: 2px solid var(--ink); border-radius: 8px; background: #f3eee4 center / cover; display: grid; place-items: center; flex: none; }
.thumb.sm { width: 36px; height: 36px; }
.thumb.lg { width: 110px; height: 110px; }
.search { display: flex; align-items: center; gap: 6px; border: var(--bw) solid var(--ink); border-radius: 8px; background: var(--card); padding: 0 10px; }
.search input { border: 0; padding: 7px 4px; box-shadow: none !important; }
.dropzone { border: var(--bw) dashed var(--ink); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; background: repeating-linear-gradient(45deg, #fff, #fff 12px, #fdf8ee 12px, #fdf8ee 24px); }
.dropzone.over { background: var(--yellow); }
.dropzone small { color: var(--muted); max-width: 440px; }
.dz-icon { width: 46px; height: 46px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--yellow); }
.importer { margin-bottom: 8px; }
details > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }
.table-view { margin-top: 12px; font-size: 13px; }
.table-view summary { font-weight: 600; color: var(--ink-2); }
.tip { position: absolute; pointer-events: none; background: var(--card); border: 2px solid var(--ink); border-radius: 8px; padding: 7px 10px; box-shadow: 3px 3px 0 var(--ink); font-size: 13px; display: flex; flex-direction: column; gap: 2px; z-index: 5; min-width: 150px; }
.tip-row { display: flex; align-items: center; gap: 6px; }
.tip-row b { margin-left: auto; font-family: var(--mono); }
.tip-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.switch input { display: none; }
.switch span { width: 42px; height: 24px; border: var(--bw) solid var(--ink); border-radius: 99px; background: #e9e3d6; position: relative; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); transition: left .15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { left: 20px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 8px; }
.kpi { display: flex; flex-direction: column; gap: 4px; text-decoration: none; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--c); border-right: var(--bw) solid var(--ink); }
.kpi > * { margin-left: 8px; }
.kpi-label { font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
.kpi-value { font: 34px/1.05 var(--display); letter-spacing: -.5px; }
.kpi small { color: var(--muted); }

/* ---------- live wall ---------- */
.zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.zone { padding: 0; text-decoration: none; overflow: hidden; display: flex; flex-direction: column; transition: transform .08s, box-shadow .08s; }
.zone:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.zone.tuned { box-shadow: 5px 5px 0 var(--pink); }
.zone-art { height: 128px; background: center / cover; border-bottom: var(--bw) solid var(--ink); position: relative; }
.zone-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.25)); }
.zone-cover { position: absolute; left: 16px; bottom: -26px; width: 84px; height: 84px; border: var(--bw) solid var(--ink); border-radius: 8px; background: var(--yellow) center / cover; z-index: 2; box-shadow: 3px 3px 0 var(--ink); display: grid; place-items: center; font: 20px var(--display); }
.zone-type { position: absolute; right: 10px; top: 10px; z-index: 2; background: var(--card); border: 2px solid var(--ink); border-radius: 99px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; }
.zone-body { padding: 34px 16px 14px; display: flex; flex-direction: column; gap: 9px; }
.zone-title { display: flex; flex-direction: column; }
.zone-title b { font-size: 18px; }
.zone-title small { color: var(--muted); }
.zone-now { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 24px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.zone-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.zone-foot .muted { display: inline-flex; align-items: center; gap: 4px; }
.nextbreak { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 7px; padding: 3px 9px; font-weight: 600; }
.nextbreak b { font-family: var(--mono); }
.kind { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 6px; border: 2px solid var(--ink); border-radius: 5px; font: 700 11.5px var(--mono); background: var(--green); flex: none; }
.kind.ad { background: var(--yellow); }
.eq { position: absolute; right: 12px; bottom: 10px; z-index: 3; display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.eq i { width: 5px; background: var(--card); border: 1.5px solid var(--ink); animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; } .eq i:nth-child(4) { animation-delay: .1s; }
.eq.big { height: 44px; right: 16px; bottom: 16px; } .eq.big i { width: 9px; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-top: 22px; }
.tl-track { position: relative; height: 54px; border: var(--bw) solid var(--ink); border-radius: 8px; background: #f3eee4; overflow: hidden; }
.tl-track.compact { height: 16px; border-width: 2px; border-radius: 5px; }
.timeline:has(.compact) { padding-top: 0; }
.tl-block { position: absolute; top: 0; bottom: 0; border-right: 2px solid var(--ink); background: color-mix(in srgb, var(--c) 70%, white); display: flex; align-items: center; gap: 6px; overflow: hidden; padding: 0 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tl-block img { height: 38px; width: 38px; border: 1.5px solid var(--ink); border-radius: 4px; object-fit: cover; flex: none; }
.tl-block span { overflow: hidden; text-overflow: ellipsis; }
.tl-block.ad { background: repeating-linear-gradient(135deg, var(--yellow) 0 7px, var(--ink) 7px 12px); }
.tl-flag { position: absolute; top: -22px; transform: translateX(-2px); font: 700 11px var(--mono); background: var(--ink); color: var(--yellow); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.tl-now { position: absolute; left: 0; top: 14px; bottom: 18px; width: 3px; background: var(--red); z-index: 3; }
.timeline:has(.compact) .tl-now { top: -2px; bottom: -2px; }
.tl-ticks { position: relative; height: 18px; }
.tl-ticks span { position: absolute; top: 3px; transform: translateX(-50%); font: 11px var(--mono); color: var(--muted); }
.legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.lgd { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lgd::before { content: ""; width: 16px; height: 12px; border: 2px solid var(--ink); border-radius: 3px; }
.lgd.song::before { background: #b9ecd5; }
.lgd.ad::before { background: repeating-linear-gradient(135deg, var(--yellow) 0 4px, var(--ink) 4px 7px); }
.lgd.up::before { background: #fff; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--ink); }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg-item i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.breaks-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ad-pill { background: var(--yellow); }

/* ---------- room page ---------- */
.room-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; margin-bottom: 20px; }
.room-grid2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 20px; align-items: start; }
.room-picker { min-width: 240px; font-weight: 600; }
.hero { display: grid; grid-template-columns: 260px 1fr; gap: 26px; position: relative; overflow: hidden; padding: 24px; margin: 0 !important;
  background: linear-gradient(90deg, rgba(255,255,255,.96) 30%, rgba(255,255,255,.78)), var(--bg) center / cover; }
.hero-cover { aspect-ratio: 1; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--yellow) center / cover; box-shadow: var(--shadow-lg); position: relative; }
.hero-cover.ad { background: repeating-linear-gradient(135deg, var(--yellow) 0 18px, var(--ink) 18px 30px); }
.ad-tile { position: absolute; inset: 18%; background: var(--card); border: var(--bw) solid var(--ink); border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.ad-tile img { width: 100%; height: 100%; object-fit: cover; }
.ad-tile b { position: absolute; top: 6px; left: 6px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 5px; padding: 0 6px; font: 13px var(--display); }
.hero-info { display: flex; flex-direction: column; gap: 10px; justify-content: center; min-width: 0; }
.hero-title { font: 40px/1.05 var(--display); letter-spacing: -.8px; overflow-wrap: anywhere; }
.hero-sub { margin: 0; color: var(--ink-2); font-size: 16px; }
.hero .kind { align-self: flex-start; padding: 0 10px; }
.progress { height: 14px; border: var(--bw) solid var(--ink); border-radius: 99px; background: #f3eee4; overflow: hidden; }
.progress > div { height: 100%; background: var(--pink); border-right: 2px solid var(--ink); width: 0; transition: width .25s linear; }
.progress.lg { height: 18px; }
.progress.lg > div { background: var(--green); }
.stat { display: inline-flex; align-items: center; gap: 6px; }
.breakcard { margin: 0 !important; background: var(--yellow); }
.countdown { display: flex; flex-direction: column; margin-bottom: 14px; }
.countdown b { font: 64px/1 var(--display); letter-spacing: -1px; }
.break-ads { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.break-ad { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--ink); border-radius: 8px; padding: 7px; }
.break-ad > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.break-ad small { color: var(--muted); }
.history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.history li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1.5px solid #ece6da; }
.mood-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.mood { font: 600 14px var(--font); border: var(--bw) solid var(--ink); border-radius: 99px; padding: 6px 14px; background: var(--card); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.mood small { font: 11px var(--mono); background: #f1ece2; border-radius: 99px; padding: 0 6px; border: 1.5px solid var(--ink); }
.mood.on { background: var(--c); box-shadow: 3px 3px 0 var(--ink); }
.mood.on[style*="#222"] { color: #fff; }
.advanced { margin-top: 18px; border-top: var(--bw) solid var(--ink); padding-top: 14px; }
.mood-edit { border: 2px solid var(--ink); border-left: 9px solid var(--c); border-radius: 8px; padding: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; background: #fffdf8; }
.mappings .card { padding: 6px 14px 14px; }
.playlist { max-height: 320px; overflow: auto; border: 2px solid var(--ink); border-radius: 8px; }
.pl-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1.5px solid #ece6da; cursor: pointer; }
.pl-item.off { opacity: .45; }
.pl-cover { width: 30px; height: 30px; border-radius: 5px; border: 1.5px solid var(--ink); background: #eee center / cover; flex: none; }

/* ---------- mini player ---------- */
.mini { position: fixed; left: calc(var(--side) + 20px); right: 20px; bottom: 14px; z-index: 40; display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #fff; border: var(--bw) solid var(--ink); border-radius: 12px; padding: 8px 10px; box-shadow: 4px 4px 0 var(--pink); }
.mini-cover { width: 46px; height: 46px; border-radius: 7px; border: 2px solid #fff; background: var(--yellow) center / cover; display: grid; place-items: center; color: var(--ink); font: 13px var(--display); flex: none; }
.mini-text { display: flex; flex-direction: column; text-decoration: none; min-width: 0; flex: 1; }
.mini-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text small { color: #c8c5bc; }
.mini-next { color: #c8c5bc; white-space: nowrap; }
.mini-next b { color: var(--yellow); font-family: var(--mono); }

/* ---------- onboarding ---------- */
.onb-top { display: flex; align-items: center; gap: 20px; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; }
.onb-top .brand { margin: 0; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 2px solid transparent; color: var(--muted); }
.steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid currentColor; font-size: 12px; }
.steps li.on { color: var(--ink); border-color: var(--ink); background: var(--yellow); }
.steps li.done { color: var(--ink); }
.steps li.done span { background: var(--green); border-color: var(--ink); }
.onb-body { padding: 30px 34px; box-shadow: var(--shadow-lg); }
.onb-body > h1, .onb-body form > h1 { margin-bottom: 4px; }
.onb-body .lead { margin-bottom: 22px; }
.type-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 9px; }
.type-tiles.compact { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.type-tile { font: 600 13.5px var(--font); border: var(--bw) solid var(--ink); border-radius: 9px; background: var(--card); padding: 10px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.type-tile .ti { font-size: 24px; }
.type-tile:hover { background: color-mix(in srgb, var(--c) 25%, white); }
.type-tile.on { background: var(--c); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.store-form .grid3 { margin-top: 16px; }
.suggest { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.sg { border: 2px solid var(--ink); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; background: #fffdf8; }
.sg small { color: var(--muted); font-weight: 600; }
.sg.hl { background: var(--green); }
.sg.hl small { color: var(--ink); }
.store-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.store-chip { display: flex; align-items: center; gap: 12px; border: var(--bw) solid var(--ink); border-left: 10px solid var(--c); border-radius: 9px; padding: 8px 12px; background: var(--card); }
.store-chip > div { flex: 1; display: flex; flex-direction: column; }
.store-chip small { color: var(--muted); }
.ti { font-size: 22px; }
.soon { text-align: center; background: #f3eee4; box-shadow: none; padding: 30px; }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.voice-pick { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.voice-pick.on { background: color-mix(in srgb, var(--c) 35%, white); box-shadow: 5px 5px 0 var(--ink); }
.voice-pick small { color: var(--ink-2); }
.link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.ready { text-align: center; padding: 20px 0; }
.ready .lead { margin: 10px auto 26px; }
.big-emoji { font-size: 64px; }

/* ---------- stores, products, campaigns ---------- */
.store-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }
.store-card { padding: 0; overflow: hidden; }
.store-art { height: 120px; background: center / cover; border-bottom: var(--bw) solid var(--ink); position: relative; }
.store-body { padding: 14px 18px 18px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.facts > div { border: 2px solid var(--ink); border-radius: 7px; padding: 6px 9px; display: flex; flex-direction: column; background: #fffdf8; min-width: 0; }
.facts small { color: var(--muted); }
.facts b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-links { display: flex; flex-direction: column; gap: 6px; }
.zone-link { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; border: 2px solid var(--ink); border-radius: 8px; padding: 6px 10px; background: var(--card); }
.zone-link .chips { margin-left: auto; }
.zone-link:hover { background: var(--yellow); }
.zone-edit { display: flex; flex-direction: column; gap: 8px; }
.camp-list { display: flex; flex-direction: column; gap: 16px; }
.camp { display: flex; gap: 18px; align-items: flex-start; }
.camp.paused { opacity: .7; }
.camp-main { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.script { margin: 0; font-style: italic; color: var(--ink-2); background: #fffdf8; border: 2px dashed var(--ink); border-radius: 8px; padding: 8px 12px; }

/* ---------- characters ---------- */
.voice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.voice-card { display: flex; flex-direction: column; gap: 10px; border-top: 12px solid var(--c, var(--ink)); }
.voice-card p { margin: 0; }
.voice-card audio { width: 100%; margin-top: 8px; height: 36px; }
.voice-card.add { border-style: dashed; border-top: var(--bw) dashed var(--ink); align-items: center; justify-content: center; text-align: center; cursor: pointer; font: inherit; color: inherit; background: rgba(255,255,255,.75); min-height: 240px; }
.voice-card.add small { color: var(--muted); }
.swatches { display: flex; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: var(--bw) solid var(--ink); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.tips { display: flex; gap: 10px; align-items: flex-start; background: #e9f7ff; border: 2px solid var(--ink); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.recorder { box-shadow: none; display: flex; flex-direction: column; gap: 8px; background: #fffdf8; }
.recorder .read { margin: 0; font-size: 15px; font-weight: 500; }
.recorder audio { height: 34px; }
.rec-live { display: flex; align-items: center; gap: 10px; }
.rec-live i { width: 14px; height: 14px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
.analysis { margin-top: 14px; box-shadow: none; background: #fffdf8; }
.issues { margin: 8px 0; padding-left: 20px; color: #b3261e; font-weight: 600; }
.char-editor .dropzone { padding: 14px; margin-bottom: 8px; }

/* ---------- library ---------- */
.songs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin-top: 18px; }
.song { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.song.playing { box-shadow: 5px 5px 0 var(--c); }
.song-cover { aspect-ratio: 1; border: 0; border-bottom: var(--bw) solid var(--ink); background: var(--c) center / cover; cursor: pointer; position: relative; padding: 0; }
.play-badge { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: var(--bw) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); opacity: 0; transition: opacity .12s; }
.song-cover:hover .play-badge, .song.playing .play-badge { opacity: 1; }
.song-meta { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 4px; }
.song-meta > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song .style { padding: 0 12px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.generator { margin: 12px 0 0; box-shadow: none; }
.generator[open] { box-shadow: var(--shadow); }
.generator .grid3 { margin-top: 12px; }

/* ---------- traffic ---------- */
.traffic-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 14px; align-items: start; }
.bars { display: flex; gap: 3px; height: 150px; align-items: stretch; user-select: none; touch-action: none; cursor: ns-resize; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.bar-col .bar { width: 100%; background: var(--c); border: 2px solid var(--ink); border-bottom-width: 0; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-col .bar.closed { background: repeating-linear-gradient(135deg, #ddd 0 3px, #fff 3px 6px); min-height: 6px; border-style: dashed; }
.bar-col small { font: 10.5px var(--mono); color: var(--muted); height: 18px; line-height: 18px; border-top: 2px solid var(--ink); width: 100%; text-align: center; }
.heat { display: grid; grid-template-columns: 36px repeat(24, minmax(0, 1fr)); gap: 2px; position: relative; }
.heat .hh, .heat .hd { font: 10.5px var(--mono); color: var(--muted); text-align: center; align-self: center; }
.heat .hd { text-align: left; font-weight: 700; color: var(--ink); }
.cell { aspect-ratio: 1; border-radius: 3px; border: 1px solid rgba(17,17,17,.15); position: relative; }
.cell.closed { background: #f1ece2; border-style: dashed; }
.cell.up::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: var(--card); border: 1.5px solid var(--ink); }
.ramp { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 3px; overflow: hidden; }
.ramp i { width: 12px; height: 12px; }
section.card { position: relative; }
.explain { border: 2px solid var(--ink); border-radius: 8px; padding: 14px; background: #fffdf8; }
.explain p { margin: 6px 0 10px; color: var(--ink-2); }

/* ---------- analytics ---------- */
.chart-host { position: relative; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #e4ded1; stroke-width: 1; }
.chart .axis { font: 11px var(--mono); fill: var(--muted); }
.empty-chart { padding: 40px 0; text-align: center; }
.method { margin-top: 16px; font-size: 13.5px; color: var(--ink-2); }
.method p { margin: 8px 0; }
.rank { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.rank li { display: flex; flex-direction: column; }
.rank span { color: var(--muted); font-size: 12.5px; }
.danger-zone .row > div { max-width: 520px; }
.danger-zone p { margin: 2px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-grid, .room-grid2, .grid-2-1, .traffic-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  body { grid-template-columns: minmax(0, 1fr); }
  #sidebar { position: fixed; left: 0; top: 0; width: var(--side); transform: translateX(-100%); transition: transform .2s; }
  body.nav-open #sidebar { transform: none; box-shadow: 8px 0 0 rgba(0,0,0,.2); }
  #topbar, #view { grid-column: 1; }
  #topbar { padding: 0 16px; }
  .menu { display: inline-grid; }
  .user-name { display: none; }
  #view { padding: 20px 16px 40px; }
  .mini { left: 12px; right: 12px; }
  .mini-next { display: none; }
  .grid2, .grid3, .facts { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-cover { max-width: 260px; }
  .hero-title { font-size: 30px; }
  h1 { font-size: 28px; }
  .onb-body { padding: 20px 16px; }
  .zones, .store-cards { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .kpis, .grid2, .grid3 { grid-template-columns: 1fr; }
  .camp { flex-direction: column; }
  .heat { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 1px; }
}
.table td:first-child b { white-space: nowrap; }
.table td.mono { white-space: nowrap; }
.onair { white-space: nowrap; }
@media (max-width: 520px) { .ws-name { font-size: 14px; } .onair { font-size: 12.5px; padding: 4px 9px; } .kpis { grid-template-columns: 1fr 1fr; gap: 12px; } .kpi-value { font-size: 24px; } .kpi small { display: none; } }
.tl-flags { position: absolute; left: 0; right: 0; top: 0; height: 20px; }
.tl-flag { top: 0; }
.tl-block.ad { min-width: 7px; z-index: 1; }

/* radio settings changed: the programme is being re-planned */
.card.replanning { opacity: .55; transition: opacity .15s; pointer-events: none; }
.card:not(.replanning) { transition: opacity .25s; }

/* ---------- sign in ---------- */
.auth { max-width: 460px; margin: 6vh auto 0; display: flex; flex-direction: column; gap: 22px; }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth h1, .auth .lead { margin: 0; }
.auth .warn { margin: 0; min-height: 1.2em; }

/* ---------- onboarding ---------- */
.steps li button { all: unset; display: flex; align-items: center; gap: inherit; cursor: pointer; }
.steps li button:disabled { cursor: default; }
.steps li button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.steps li.skipped { opacity: .7; }
.zone-moods { display: flex; flex-direction: column; gap: 14px; margin-bottom: 12px; }
.zone-mood { display: flex; flex-direction: column; gap: 10px; }
.mood-with-sample { display: inline-flex; align-items: center; }
.now-sample { min-height: 34px; }
.voice-pick .voice-choose { all: unset; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; width: 100%; }
.voice-pick .voice-choose:focus-visible { outline: 2px solid var(--blue); }
.voice-pick button.link { background: none; border: 0; cursor: pointer; font: inherit; }
.problems ul { margin: 6px 0; padding-left: 18px; max-height: 160px; overflow: auto; }
.ready .facts { margin: 6px 0 18px; }
.field > .seg { align-self: flex-start; }
.notice { border: 2px solid var(--ink); border-radius: 8px; background: #fff3c4; padding: 10px 14px; margin: 0 0 14px; }

/* ---------- language switch ---------- */
.lang { display: inline-flex; flex: none; border: 2px solid #111; border-radius: 999px; overflow: hidden; background: #fff; }
.lang button { border: 0; background: none; font: 700 12px/1 inherit; font-family: inherit; padding: 6px 9px; cursor: pointer; color: #111; }
.lang button.on { background: #111; color: #fff; }
.auth .lang { align-self: center; }
@media (max-width: 520px) { /* the top bar keeps one button: the other language */
  #topbar .lang button.on { display: none; }
  #topbar .top-right { gap: 8px; }
  #topbar .ws, #topbar .top-right { min-width: 0; }
  #topbar .ws { overflow: hidden; }
  #topbar .user { display: none; }
}
@media (max-width: 420px) { #topbar .onair { display: none; } } /* no room for it beside the buttons */
.mood-edit .row { flex-wrap: wrap; } .mood-edit .row input { min-width: 0; }
.timeline { overflow-x: clip; } /* an ad flag near the end must not widen the page */
.demo-banner{position:fixed;left:0;right:0;bottom:0;z-index:70;background:#111;color:#fff;font-size:12.5px;padding:6px 16px;text-align:center}
.demo-banner a{color:#FFD23F}
body{padding-bottom:30px}
