/* Halelu — components (final). Needs tokens.css first.
   Rules: no gradients, glow, blur, coloured left bars, rings around selected items, filled status badges,
   green, purple or per-item colours.
   Two state rules only:
   SELECTED = dark: the white pill (wide rows and section cards: --selected-row);
              light: a neutral grey tint on white, white + soft shadow on a grey fill.
   LIVE     = accent-tinted surface + accent dot. Nothing else uses the tint. */

/* ================= Base ================= */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--canvas);color:var(--text-1);font:400 var(--fs-md)/1.45 var(--font-ui);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
button{font:inherit;color:inherit;background:none;border:0;padding:0;margin:0;cursor:pointer;text-align:inherit}
input,textarea,select{font:inherit;color:inherit;margin:0}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4,p{margin:0}
:focus{outline:none}
[hidden]{display:none !important}
/* Keyboard focus only (accessibility). Never shown on click or tap. */
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}

.i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
.i--14{width:14px;height:14px}.i--16{width:16px;height:16px}.i--18{width:18px;height:18px}.i--22{width:22px;height:22px}.i--24{width:24px;height:24px}.i--28{width:28px;height:28px}
.i--fill{fill:currentColor}

/* ================= Type helpers (Urbanist: 24 card · 32 detail · 44 page · 60 hero) ================= */
.overline{font-size:var(--fs-sm);line-height:1.3;color:var(--text-3);font-weight:400}
.h-hero{font-family:var(--font-display);font-weight:300;font-size:var(--fs-hero);letter-spacing:-.025em;line-height:1}
.h1{font-family:var(--font-display);font-weight:300;font-size:var(--fs-page);letter-spacing:var(--track-tight);line-height:1.05}
.h2{font-family:var(--font-display);font-weight:300;font-size:var(--fs-detail);letter-spacing:var(--track-tight);line-height:1.1}
.h3{font-family:var(--font-display);font-weight:400;font-size:var(--fs-card);letter-spacing:var(--track-tight);line-height:1.15}
.h4{font-family:var(--font-display);font-weight:500;font-size:var(--fs-card);letter-spacing:-.01em;line-height:1.15}
.num{font-family:var(--font-display);font-weight:300;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.muted{color:var(--text-2)}.faint{color:var(--text-3)}
.small{font-size:var(--fs-sm)}.xs{font-size:var(--fs-xs)}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.sep-dot::before{content:"·";margin:0 6px;color:var(--text-3)}

/* ================= Shell (desktop) ================= */
.app{display:grid;grid-template-columns:var(--rail-w) minmax(0,1fr);height:100vh;min-height:0;overflow:hidden}
.main{display:flex;flex-direction:column;min-width:0;min-height:0;padding:0 20px 0 0}
.main__body{flex:1;min-height:0;display:flex;flex-direction:column;gap:var(--gap)}
.main > .livebar{margin-top:var(--gap)}

/* Icon rail: icon + small label, active = filled rounded square */
.rail{display:flex;flex-direction:column;align-items:center;padding:18px 0 16px;min-height:0}
.rail__logo{width:44px;height:44px;display:grid;place-items:center;color:var(--text-1);margin-bottom:22px} /* just the glyph: no white or black tile */
.rail__logo .i{width:26px;height:26px}
.rail__nav{display:flex;flex-direction:column;align-items:center;gap:6px}
.rail__item{width:68px;height:62px;border-radius:var(--r-lg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:var(--text-2);font-size:var(--fs-micro);font-weight:500;line-height:1;transition:background var(--t-fast),color var(--t-fast)}
.rail__item .i{width:22px;height:22px}
.rail__item:hover{color:var(--text-1);background:var(--hover)}
.rail__item.is-active{background:var(--raised);color:var(--text-1)}
.rail__foot{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:10px}

/* Top bar: overline + large light title on the left, actions / search on the right.
   The title sits on the bottom of a 104 px bar, so 24 px of air separates it from the first card. */
.topbar{height:var(--topbar-h);flex:none;display:flex;align-items:flex-end;gap:10px;padding-bottom:24px}
.topbar__lead{margin-right:auto;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;gap:2px}
.topbar__title{font-family:var(--font-display);font-weight:300;font-size:var(--fs-page);letter-spacing:var(--track-tight);line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar .search{width:340px}
.topbar--slim{height:76px;align-items:center;padding:4px 0 0}

.credit{flex:none;height:34px;display:flex;align-items:center;justify-content:center;gap:5px;font-size:var(--fs-micro);color:var(--text-3)}
.credit .heart{width:10px;height:10px;fill:var(--danger);stroke:none}

/* ================= Buttons ================= */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--h-md);padding:0 18px;border-radius:var(--r-full);font-size:var(--fs-md);font-weight:500;line-height:1;white-space:nowrap;flex:none;transition:background var(--t-fast),color var(--t-fast),transform var(--t-fast)}
.btn .i{width:18px;height:18px}
.btn:active{transform:scale(.97)}
.btn--accent{background:var(--accent);color:var(--accent-fg)}
.btn--accent:hover{background:var(--accent-hover)}
.btn--grey{background:var(--surface-2);color:var(--text-1)}
.btn--grey:hover{background:var(--surface-3)}
.btn--grey-2{background:var(--surface-3);color:var(--text-1);font-weight:600} /* Next in the Live now bar: quiet, one step up from Back */
.btn--grey-2:hover{background:var(--surface-4)}
.btn--raised{background:var(--raised);color:var(--text-1)}
.btn--ghost{background:transparent;color:var(--text-2)}
.btn--ghost:hover{background:var(--hover);color:var(--text-1)}
.btn--danger{background:var(--danger);color:var(--danger-fg)} /* destructive confirmations only */
.btn--danger:hover{filter:brightness(1.08)}
/* Disabled: "nothing to do yet". The accent button turns a plain grey pill (a faded accent read as a second hue);
   the others fade. Disabled buttons do not press. */
.btn:disabled,.btn[aria-disabled="true"]{cursor:default;pointer-events:none;transition:none} /* no accent flash while a page disables it */
.btn:disabled:active{transform:none}
:root .btn.btn--accent:is(:disabled,[aria-disabled="true"]),
:root .btn.btn--danger:is(:disabled,[aria-disabled="true"]){background:var(--surface-3);color:var(--text-3);filter:none;opacity:1} /* :root .btn: above page CSS that re-applies the accent */
.btn--grey:disabled,.btn--grey-2:disabled,.btn--raised:disabled,.btn--ghost:disabled{opacity:.5}
.btn--sm{height:var(--h-sm);padding:0 14px;font-size:var(--fs-sm);gap:6px}
.btn--sm .i{width:16px;height:16px}
.btn--lg{height:var(--h-lg);padding:0 24px;font-size:var(--fs-lg)}
.btn--xl{height:var(--h-xl);padding:0 28px;font-size:18px;font-weight:600;gap:10px}
.btn--xl .i{width:22px;height:22px}
.btn--block{width:100%}
.btn__sub{font-size:var(--fs-sm);font-weight:400} /* full colour: white on the accent is only 4.5:1, any fade fails AA */

/* The big round accent button (Present / Open presenter). The label sits next to it. */
.btn-play{width:64px;height:64px;border-radius:50%;background:var(--accent);color:var(--accent-fg);display:grid;place-items:center;flex:none;transition:background var(--t-fast),transform var(--t-fast)}
.btn-play:hover{background:var(--accent-hover);transform:scale(1.04)}
.btn-play .i{width:26px;height:26px;fill:currentColor;margin-left:3px}
.btn-play--sm{width:48px;height:48px}.btn-play--sm .i{width:20px;height:20px;margin-left:2px}
.play-label{display:flex;flex-direction:column;gap:2px;font-size:18px;font-weight:500;line-height:1.2}
.play-label .overline{font-weight:400;line-height:1.2}

/* Round icon buttons (always paired with a tooltip / aria-label) */
.icon-btn{width:40px;height:40px;border-radius:50%;background:var(--surface-2);color:var(--text-1);display:inline-grid;place-items:center;flex:none;transition:background var(--t-fast),color var(--t-fast)}
.icon-btn:hover{background:var(--surface-3)}
.icon-btn--raised{background:var(--raised)}
.icon-btn--ghost{background:transparent;color:var(--text-2)}
.icon-btn--ghost:hover{background:var(--hover);color:var(--text-1)}
.icon-btn--sm{width:32px;height:32px}.icon-btn--sm .i{width:18px;height:18px}
.icon-btn--lg{width:48px;height:48px}

/* Quiet back link with a round chevron button */
.back{display:inline-flex;align-items:center;gap:10px;font-size:var(--fs-md);color:var(--text-2);height:40px}
.back__btn{width:32px;height:32px;border-radius:50%;background:var(--raised);display:grid;place-items:center;color:var(--text-1)}
.back__btn .i{width:18px;height:18px}
.back:hover{color:var(--text-1)}

/* Text link: "View all ›" */
.link{display:inline-flex;align-items:center;gap:2px;font-size:var(--fs-sm);color:var(--text-2);font-weight:500}
.link .i{width:15px;height:15px}
.link:hover{color:var(--text-1)}

.avatar{width:40px;height:40px;border-radius:50%;background:var(--raised);color:var(--text-1);display:inline-grid;place-items:center;font-size:13px;font-weight:600;flex:none}
.avatar--sm{width:30px;height:30px;font-size:11px;background:var(--surface-2)}

/* Wordmark: glyph + name, no tile */
.wordmark{display:inline-flex;align-items:center;gap:10px;color:var(--text-1)}
.wordmark .i{width:26px;height:26px}

/* ================= Inputs ================= */
.field{display:flex;flex-direction:column;gap:7px;min-width:0}
.field__label{font-size:var(--fs-sm);font-weight:500;color:var(--text-2)}
.field__labelrow{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.field__hint{font-size:var(--fs-xs);color:var(--text-3)}
.input{display:flex;align-items:center;gap:10px;height:46px;width:100%;border:0;border-radius:var(--r-md);background:var(--surface-2);padding:0 16px;color:var(--text-1);font-size:var(--fs-md);box-shadow:inset 0 0 0 1px transparent;transition:background var(--t-fast),box-shadow var(--t-fast)}
.input::placeholder,.input .ph{color:var(--text-3)}
.input:hover{background:var(--surface-3)}
.input:focus,.input.is-focus{background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line-2)}
.input--raised{background:var(--raised)}
[data-theme="light"] .input:not(:focus):not(.is-focus),[data-theme="light"] .search{box-shadow:inset 0 0 0 1px var(--line)}
.input .i{color:var(--text-3)}
.input__end{margin-left:auto;display:inline-flex;align-items:center;gap:6px}
input.input{outline:none}
.textarea{display:block;width:100%;min-height:96px;height:auto;padding:12px 16px;line-height:1.55;resize:vertical;border:0;outline:none}
/* Keyboard focus in a text field: the same clear 2 px ring as Settings (a 1 px hairline could not be seen). */
.input:focus-visible,.textarea:focus-visible{outline:2px solid var(--text-2);outline-offset:1px}
.select{cursor:pointer;justify-content:space-between}
.select .i:last-child{color:var(--text-2);width:18px;height:18px}

.search{display:flex;align-items:center;gap:10px;height:46px;border-radius:var(--r-md);background:var(--surface-2);padding:0 8px 0 16px;color:var(--text-3);min-width:0}
.search .i{width:18px;height:18px}
.search__input{flex:1;min-width:0;border:0;background:none;outline:none;font-size:var(--fs-md);color:var(--text-1);padding:0;height:100%}
.search__input::placeholder{color:var(--text-3)}
.search:has(.search__input:focus-visible){outline:2px solid var(--text-2);outline-offset:1px}
.search--raised{background:var(--raised)}
.kbd{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:var(--r-xs);background:var(--surface-3);color:var(--text-2);font:500 var(--fs-micro)/1 var(--font-ui);letter-spacing:.02em;white-space:nowrap}
.search--raised .kbd{background:var(--surface-2)}

/* ================= Segmented control (dark pill) ================= */
.seg{display:inline-flex;align-items:center;gap:2px;padding:4px;border-radius:var(--r-full);background:var(--seg-track)}
.seg__item{flex:1 0 auto;height:32px;padding:0 15px;border-radius:var(--r-full);font-size:var(--fs-sm);font-weight:500;color:var(--text-2);display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;transition:background var(--t-fast),color var(--t-fast)}
.seg__item .i{width:17px;height:17px}
.seg__item:hover{color:var(--text-1)}
.seg__item.is-on{background:var(--seg-thumb);color:var(--text-1);box-shadow:var(--shadow-thumb)}
.seg--block{display:flex;width:100%}
.seg--block .seg__item{flex:1 1 0}
.seg--lg .seg__item{height:44px;font-size:var(--fs-lg)}
/* Show · Clear · Black: Show rests on the normal thumb. Only Clear or Black, when active, turn inverse,
   because that is the state the person at the console must notice from across the room. */
.seg__item--loud.is-on{background:var(--inverse);color:var(--inverse-fg);box-shadow:none}

/* ================= Tabs (selected = solid pill, others grey text + icon + count) ================= */
.tabs{display:flex;align-items:center;gap:2px;min-width:0;overflow:hidden}
.tab{height:40px;padding:0 15px;border-radius:var(--r-full);display:inline-flex;align-items:center;gap:8px;color:var(--text-2);font-size:var(--fs-md);font-weight:500;white-space:nowrap;flex:none;transition:background var(--t-fast),color var(--t-fast)}
.tab .i{width:18px;height:18px}
.tab:hover{color:var(--text-1);background:var(--hover)}
.tab.is-on{background:var(--selected-bg);color:var(--selected-fg)}
.tab__count{min-width:20px;height:20px;padding:0 6px;border-radius:var(--r-full);background:var(--surface-2);color:var(--text-2);font-size:var(--fs-micro);font-weight:500;display:inline-grid;place-items:center;font-variant-numeric:tabular-nums}
.tab.is-on .tab__count{background:rgba(0,0,0,.08);color:var(--selected-fg-2)}
[data-theme="light"] .tab.is-on .tab__count{background:rgba(255,255,255,.8)}
.tabs--sm .tab{height:34px;padding:0 13px;font-size:var(--fs-sm)}

/* ================= Chips (sections, arrangement) ================= */
.chip{height:36px;padding:0 15px;border-radius:var(--r-full);background:var(--surface-2);color:var(--text-1);font-size:var(--fs-md);font-weight:500;display:inline-flex;align-items:center;gap:7px;white-space:nowrap;flex:none}
.chip:hover{background:var(--surface-3)}
.chip.is-on{background:var(--on-bg);color:var(--on-fg);box-shadow:var(--on-shadow)}
.chip.is-on .i{color:inherit;opacity:.6}
.chip.is-live{background:var(--accent-tint)}
.chip.is-live::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent-dot)}
.chip--sm{height:30px;padding:0 12px;font-size:var(--fs-sm)}
.chip .i{width:16px;height:16px;color:var(--text-3)}

/* Key: plain text (the column header already says "Key") */
.key{font-size:var(--fs-sm);font-weight:500;color:var(--text-1);font-variant-numeric:tabular-nums;white-space:nowrap}

/* ================= Status: tiny dot + plain text (never a filled badge) ================= */
.status{display:inline-flex;align-items:center;gap:7px;font-size:var(--fs-sm);font-weight:500;color:var(--text-2);white-space:nowrap;line-height:1}
.status::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--dot-muted);flex:none}
.status--live{color:var(--text-1)}
.status--live::before{background:var(--accent-dot)}
.status--connected::before{background:var(--dot-connected)}
.status--offline{color:var(--text-1)}
.status--offline::before{background:var(--danger)}
.status--dot{gap:0} /* the dot alone, e.g. in the # column of the live row */
.ok{display:inline-flex;align-items:center;gap:6px;font-size:var(--fs-sm);color:var(--text-2)} /* success = plain text + check icon */
.ok .i{width:16px;height:16px;color:var(--text-1)}

/* ================= Cards ================= */
.card{background:var(--surface-1);border-radius:var(--r-xl);padding:20px;min-width:0;min-height:0;position:relative}
.card--flush{padding:0}
.card--tint{background:var(--accent-tint)}
.card__head{display:flex;align-items:flex-start;gap:10px;margin-bottom:16px;min-width:0}
.card__titles{margin-right:auto;min-width:0;display:flex;flex-direction:column;gap:3px}
.card__title{font-family:var(--font-display);font-weight:400;font-size:var(--fs-card);letter-spacing:var(--track-tight);line-height:1.15}
.card__actions{display:flex;align-items:center;gap:6px;flex:none;margin-left:auto}
.inner{background:var(--surface-2);border-radius:var(--r-lg);padding:16px;min-width:0}
.stat{display:flex;flex-direction:column;gap:4px}
.stat__value{font-family:var(--font-display);font-weight:300;font-size:var(--fs-detail);letter-spacing:-.02em;line-height:1;font-variant-numeric:tabular-nums}
.stat__label{font-size:var(--fs-sm);color:var(--text-2)}
.divider{height:1px;background:var(--line);border:0;margin:16px 0}
/* A plain label / value row (e.g. "Look  Global look") */
.kv{display:flex;align-items:center;gap:12px;min-height:44px;font-size:var(--fs-md)}
.kv + .kv{border-top:1px solid var(--line)}
.kv__label{color:var(--text-2);margin-right:auto}
.kv__value{font-weight:500}

/* ================= Table header band + tracklist rows ================= */
.tracks{--cols:40px minmax(0,1fr) 80px 60px;display:flex;flex-direction:column;min-width:0}
.band__sort{display:inline-flex;align-items:center;gap:4px;color:var(--text-2)}
.band{display:grid;grid-template-columns:var(--cols);align-items:center;column-gap:16px;height:36px;padding:0 16px;border-radius:var(--r-sm);background:var(--surface-2);font-size:var(--fs-xs);font-weight:500;color:var(--text-3);margin-bottom:4px;flex:none}
.track{display:grid;grid-template-columns:var(--cols);align-items:center;column-gap:16px;min-height:62px;padding:8px 16px;border-radius:var(--r-md);position:relative;transition:background var(--t-fast)}
.track + .track::before{content:"";position:absolute;left:16px;right:16px;top:0;height:1px;background:var(--line)}
.track:hover,.track.is-hover{background:var(--hover)}
.track.is-selected{background:var(--selected-row)} /* wide rows: never the white pill */
.track.is-live{background:var(--accent-tint)}
.track:hover::before,.track:hover + .track::before,
.track.is-hover::before,.track.is-hover + .track::before,
.track.is-selected::before,.track.is-selected + .track::before,
.track.is-live::before,.track.is-live + .track::before{display:none}
.track__num{font-size:var(--fs-md);color:var(--text-3);font-variant-numeric:tabular-nums;display:flex;align-items:center}
.track__main{min-width:0;display:flex;flex-direction:column;gap:2px}
.track__title{font-size:var(--fs-lg);font-weight:500;letter-spacing:var(--track-ui);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.track__sub{font-size:var(--fs-sm);color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.track__cell{font-size:var(--fs-sm);color:var(--text-2);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.track__actions{display:flex;align-items:center;justify-content:flex-end;gap:4px;opacity:0;transition:opacity var(--t-fast)}
.track:hover .track__actions,.track.is-hover .track__actions,.track.is-selected .track__actions{opacity:1}
.track__actions--always{opacity:1}
/* Touch screens have no hover: row actions (⋯, Add to setlist, drag grips) are always shown there. */
@media (hover:none){.track .track__actions,.row .sl-row__more{opacity:1}}
.track.is-selected .track__num{color:var(--text-2)} /* --text-3 on --selected-row is 4.0:1 */
.track .btn--grey{background:var(--surface-3)}
.track.is-selected .btn--grey{background:var(--surface-4)}
.track .drag{color:var(--text-3);cursor:grab}
.codes{display:flex;gap:10px;font-size:var(--fs-sm);color:var(--text-2);white-space:nowrap;overflow:hidden}

/* Generic list row (settings menu, setlist lists, song list in the console) */
.list{display:flex;flex-direction:column;gap:2px}
.row{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 12px;border-radius:var(--r-md);color:var(--text-1);transition:background var(--t-fast)}
.row:hover,.row.is-hover{background:var(--hover)}
.row.is-selected{background:var(--selected-bg);color:var(--selected-fg)}
.row.is-live{background:var(--accent-tint)}
.row__main{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.row__title{font-size:var(--fs-lg);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:var(--track-ui)}
.row__sub{font-size:var(--fs-sm);color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row__end{display:flex;align-items:center;gap:8px;flex:none;color:var(--text-3)}
.row .i{color:var(--text-2)}
.row.is-selected .row__sub,.row.is-selected .i,.row.is-selected .row__end{color:var(--selected-fg-2)}
.row__num{width:22px;font-size:var(--fs-md);color:var(--text-3);font-variant-numeric:tabular-nums;flex:none;display:flex;align-items:center}
/* A wide list (Setlists) selects like the table: --selected-row, normal text colours */
.list--wide .row.is-selected{background:var(--selected-row);color:var(--text-1)}
.list--wide .row.is-selected .row__sub{color:var(--text-2)}
.list--wide .row.is-selected .i,.list--wide .row.is-selected .row__end{color:var(--text-3)}

/* ================= Date tile (neutral — no per-setlist colours) ================= */
.date-tile{width:128px;height:128px;border-radius:var(--r-lg);background:var(--surface-2);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;flex:none}
.date-tile__dow,.date-tile__mon{font-size:var(--fs-sm);color:var(--text-2);line-height:1.2}
.date-tile__day{font-family:var(--font-display);font-weight:300;font-size:var(--fs-hero);line-height:1;letter-spacing:-.03em}
.date-tile--sm{width:48px;height:48px;border-radius:var(--r-sm);gap:0}
.date-tile--sm .date-tile__day{font-size:var(--fs-card);font-weight:400}
.date-tile--sm .date-tile__mon{font-size:var(--fs-micro);line-height:1.1}
.date-tile--sm .date-tile__dow{display:none}
.row.is-selected .date-tile,.row.is-live .date-tile{background:rgba(255,255,255,.06)}
[data-theme="light"] .row.is-selected .date-tile,[data-theme="light"] .row.is-live .date-tile{background:rgba(255,255,255,.75)}
/* The 11 px month on a small tile in a selected / live row: --text-2 there is only 4.35:1 in dark. */
.row.is-selected .date-tile__mon,.row.is-selected .date-tile__dow{color:var(--selected-fg-2)}
.list--wide .row.is-selected .date-tile__mon,.list--wide .row.is-selected .date-tile__dow{color:var(--text-2)}
[data-theme="dark"] .list--wide .row.is-selected .date-tile--sm .date-tile__mon,[data-theme="dark"] .row.is-live .date-tile--sm .date-tile__mon{color:var(--text-1)}

/* ================= Playlist header (setlist) ================= */
.playlist-head{display:flex;align-items:flex-end;gap:28px;min-width:0}
.playlist-head__text{min-width:0;display:flex;flex-direction:column;gap:8px;padding-bottom:4px}
.playlist-head__title{font-family:var(--font-display);font-weight:300;font-size:var(--fs-hero);letter-spacing:-.025em;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.playlist-head__meta{font-size:var(--fs-md);color:var(--text-2);display:flex;flex-wrap:wrap;align-items:center}
.playlist-head__meta b{color:var(--text-1);font-weight:500}
.playlist-actions{display:flex;align-items:center;gap:12px}

/* ================= Progress ================= */
.progress{height:4px;border-radius:var(--r-full);background:var(--surface-3);overflow:hidden;min-width:0}
.progress__fill{height:100%;border-radius:var(--r-full);background:var(--accent)}
.progress--thin{height:3px}
.steps{display:flex;gap:4px;min-width:0}
.steps__seg{flex:1;height:4px;border-radius:var(--r-full);background:var(--surface-3)}
.steps__seg.is-done{background:var(--accent)}
.progress-row{display:flex;align-items:center;gap:12px;font-size:var(--fs-xs);color:var(--text-3);font-variant-numeric:tabular-nums}
.progress-row .progress,.progress-row .steps{flex:1}

/* ================= Hatch (empty / inactive areas) ================= */
.hatch{background-image:var(--hatch)}
.hatch-tile{border-radius:var(--r-md);background-image:var(--hatch);box-shadow:inset 0 0 0 1px var(--line);display:flex;align-items:center;justify-content:center;gap:8px;color:var(--text-3);font-size:var(--fs-sm)}

/* ================= Slide stills (small thumbnails are rendered frames, not scaled-down live text) ================= */
.still{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:var(--r-xs);background:#000}

/* ================= Live now bar ================= */
.livebar{flex:none;height:var(--livebar-h);border-radius:var(--r-xl);background:var(--surface-1);display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:20px;padding:0 14px 0 12px}
.livebar__now{display:flex;align-items:center;gap:14px;min-width:0}
.livebar__thumb{width:84px;flex:none}
.livebar__text{min-width:0;display:flex;flex-direction:column;gap:5px}
.livebar__song{font-size:var(--fs-lg);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:var(--track-ui)}
.livebar__where{display:flex;align-items:center;min-width:0;font-size:var(--fs-sm);color:var(--text-2);overflow:hidden;white-space:nowrap}
.livebar__where .status{font-size:inherit}
.livebar__ctl{display:flex;flex-direction:column;align-items:center;gap:8px;width:340px}
.livebar__btns{display:flex;gap:8px}
.livebar__ctl .progress-row{width:100%}
.livebar__end{display:flex;align-items:center;justify-content:flex-end;gap:12px}

/* ================= Phone dock: mini bar + tab bar on one solid canvas-coloured band ================= */
.dock{position:fixed;left:0;right:0;bottom:0;z-index:6;background:var(--canvas);padding:8px 8px 0}
.minibar{position:relative;height:var(--minibar-h);border-radius:var(--r-lg);background:var(--surface-2);display:flex;align-items:center;gap:12px;padding:0 8px;overflow:hidden}
[data-theme="light"] .minibar{background:var(--surface-1)}
.minibar__thumb{width:68px;flex:none}
.minibar__text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.minibar .progress{position:absolute;left:14px;right:14px;bottom:0;height:2px}

.tabbar{height:calc(var(--tabbar-h) + var(--safe-bottom));display:grid;grid-template-columns:repeat(3,1fr);padding:6px 8px var(--safe-bottom)}
.tabbar__item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--text-2);font-size:var(--fs-micro);font-weight:500}
.tabbar__icon{width:60px;height:32px;border-radius:var(--r-md);display:grid;place-items:center}
.tabbar__icon .i{width:22px;height:22px}
.tabbar__item.is-active{color:var(--text-1)}
.tabbar__item.is-active .tabbar__icon{background:var(--raised)}

/* ================= Menus, dialogs, sheets, toasts ================= */
.menu{min-width:232px;padding:6px;border-radius:var(--r-md);background:var(--surface-pop);box-shadow:var(--shadow-pop);font-size:var(--fs-md)}
.menu__label{font-size:var(--fs-xs);color:var(--text-3);padding:8px 10px 6px}
.menu__item{display:flex;align-items:center;gap:10px;height:40px;padding:0 10px;border-radius:var(--r-sm);color:var(--text-1);width:100%}
.menu__item .i{width:18px;height:18px;color:var(--text-2)}
.menu__item:hover,.menu__item.is-hover{background:var(--hover)}
[data-theme="dark"] .menu__item:hover,[data-theme="dark"] .menu__item.is-hover{background:rgba(255,255,255,.07)}
.menu__item:focus-visible{outline-offset:-2px} /* inside the menu box (it scrolls, an outer ring would be cut) */
.menu__item:disabled{color:var(--text-3);cursor:default}
.menu__item:disabled:hover{background:none}
.menu__hint{margin-left:auto;font-size:var(--fs-xs);color:var(--text-3)}
.menu__check{margin-left:auto}
.menu__item .menu__check{color:var(--text-1)}
/* A chosen option shows a check, not a fill. Unchecked options keep the check's room so labels line up. */
.menu__item .menu__check--none{visibility:hidden}
.menu__sep{height:1px;background:var(--line);margin:6px 4px}

.scrim{position:absolute;inset:0;background:var(--scrim);display:grid;place-items:center}
.dialog{width:440px;max-width:calc(100vw - 32px);border-radius:var(--r-xl);background:var(--surface-pop);box-shadow:var(--shadow-dialog);padding:24px}
.dialog__title{font-family:var(--font-display);font-weight:400;font-size:var(--fs-card);letter-spacing:var(--track-tight);line-height:1.2}
.dialog__body{color:var(--text-2);margin:10px 0 24px;font-size:var(--fs-md)}
.dialog__actions{display:flex;justify-content:flex-end;gap:8px}
.sheet{border-radius:var(--r-xl) var(--r-xl) 0 0;background:var(--surface-pop);box-shadow:var(--shadow-dialog);padding:10px 20px calc(28px + var(--safe-bottom))}
.sheet__grabber{width:38px;height:5px;border-radius:var(--r-full);background:var(--surface-3);margin:0 auto 18px}
.sheet__title{font-family:var(--font-display);font-weight:400;font-size:var(--fs-card);letter-spacing:var(--track-tight);margin-bottom:12px}

.toast{display:inline-flex;align-items:center;gap:10px;height:48px;padding:0 6px 0 16px;border-radius:var(--r-full);background:var(--surface-pop);box-shadow:var(--shadow-pop);font-size:var(--fs-md);color:var(--text-1);white-space:nowrap}
.toast .i{width:18px;height:18px}
.toast--plain{padding-right:18px}
/* ui.js toast(): a long message wraps inside the pill (it never runs out of it) */
.toasts .toast{height:auto;min-height:48px;max-width:100%;white-space:normal;line-height:1.35;padding:7px 6px 7px 16px;border-radius:24px}
.toast__text{flex:1;min-width:0;padding:5px 0;overflow-wrap:anywhere}
.toast .icon-btn{color:var(--text-2)}
.toast .icon-btn:hover{color:var(--text-1)}

.tooltip{display:inline-block;padding:6px 10px;border-radius:var(--r-xs);background:var(--inverse);color:var(--inverse-fg);font-size:var(--fs-xs);font-weight:500}

/* ================= Toggle, slider ================= */
.toggle{width:44px;height:26px;border-radius:var(--r-full);background:var(--surface-3);position:relative;flex:none;transition:background var(--t)}
.toggle::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:var(--knob-off);box-shadow:var(--shadow-thumb);transition:left var(--t) var(--ease),background var(--t)}
.toggle.is-on{background:var(--inverse)}
.toggle.is-on::after{left:21px;background:var(--inverse-fg)}
.toggle::before{content:"";position:absolute;inset:-9px -4px} /* a 44 px tall hit area around the 26 px track */
.setting{display:flex;align-items:center;gap:16px;min-height:60px;padding:10px 0}
.setting + .setting{border-top:1px solid var(--line)}
.setting__text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.setting__title{font-size:var(--fs-md);font-weight:500}
.setting__sub{font-size:var(--fs-sm);color:var(--text-2)}

.slider{position:relative;height:22px;display:flex;align-items:center;width:100%}
.slider__track{position:relative;flex:1;height:4px;border-radius:var(--r-full);background:var(--surface-3)}
.slider__fill{position:absolute;left:0;top:0;bottom:0;border-radius:var(--r-full);background:var(--text-1)}
.slider__knob{position:absolute;top:50%;width:20px;height:20px;border-radius:50%;background:var(--text-1);transform:translate(-50%,-50%);box-shadow:var(--shadow-thumb)}
[data-theme="light"] .slider__knob{background:#fff;box-shadow:0 1px 3px rgba(16,24,40,.25)}
.slider-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:6px}
.slider-head__label{font-size:var(--fs-sm);font-weight:500}
.slider-head__value{font-size:var(--fs-sm);color:var(--text-2);font-variant-numeric:tabular-nums}

/* ================= Look controls: one row per setting ================= */
.look-row{display:flex;align-items:center;gap:8px;min-height:36px}
.look-row__label{font-size:var(--fs-sm);font-weight:500;margin-right:auto}
.look-row .btn .i:last-child{width:16px;height:16px;color:var(--text-2)}
.look-caption{font-size:var(--fs-xs);color:var(--text-3);margin-top:8px}

/* ================= Slides (previews and thumbnails) ================= */
.slide{position:relative;aspect-ratio:16/9;border-radius:var(--r-sm);overflow:hidden;background:#000 center/cover no-repeat;display:grid;place-items:center;container-type:inline-size;width:100%}
.slide::before{content:"";position:absolute;inset:0;background:var(--slide-dim)}
.slide__text{position:relative;color:#fff;text-align:center;font:600 5.6cqw/1.32 "Inter",var(--font-ui);padding:0 7%;letter-spacing:-.005em}
.slide--black{background:#000}.slide--black::before{display:none}
.slide--clear::before{background:rgba(0,0,0,.12)}
.slide--lg{border-radius:var(--r-md)}

.slide-card{display:block;padding:6px 6px 8px;border-radius:var(--r-md);transition:background var(--t-fast);min-width:0}
.slide-card:hover,.slide-card.is-hover{background:var(--hover)}
.slide-card.is-live{background:var(--accent-tint)}
.slide-card__cap{display:flex;align-items:center;gap:8px;padding:8px 4px 0;font-size:var(--fs-sm);min-width:0}
.slide-card__num{color:var(--text-3);font-variant-numeric:tabular-nums}
.slide-card__name{color:var(--text-1);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.slide-card__state{margin-left:auto;font-size:var(--fs-xs);color:var(--text-2);font-weight:500}

/* ================= Background picker: nothing is drawn on top of a poster ================= */
.bgpick{display:flex;flex-direction:column;gap:18px}
.bgpick__head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.bgpick__title{font-size:var(--fs-sm);font-weight:500}
.bgpick__meta{font-size:var(--fs-xs);color:var(--text-3)}
.bgpick__grid{display:grid;grid-template-columns:repeat(var(--bg-cols,4),minmax(0,1fr));gap:8px}
.bgpick__inuse{display:flex;align-items:center;gap:6px;margin-top:10px;font-size:var(--fs-xs);color:var(--text-2)}
.bgpick__inuse .i{width:14px;height:14px;color:var(--text-1)}
.bgpick__inuse b{color:var(--text-1);font-weight:500}
.bg-thumb{position:relative;display:block;aspect-ratio:16/9;border-radius:var(--r-sm);background:#000 center/cover no-repeat;overflow:hidden}
.bg-thumb__del{position:absolute;right:6px;top:6px;width:28px;height:28px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;display:grid;place-items:center;opacity:0;transition:opacity var(--t-fast)} /* a hover control on Media only */
.bg-thumb__del .i{width:14px;height:14px}
.bg-thumb:hover .bg-thumb__del,.bg-thumb.is-hover .bg-thumb__del{opacity:1}
.bg-upload{width:100%;aspect-ratio:16/9;border-radius:var(--r-sm);background-image:var(--hatch);box-shadow:inset 0 0 0 1px var(--line-2);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--text-2);font-size:var(--fs-xs);font-weight:500;text-align:center;line-height:1.2}
.bg-upload .i{width:18px;height:18px}
/* Caption under a poster on Media: name, then "Standard" (or type and size) in plain grey text */
.bg-cap{display:flex;flex-direction:column;gap:1px;margin-top:7px;font-size:var(--fs-xs);line-height:1.35;min-width:0}
.bg-cap__name{color:var(--text-1);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bg-cap__meta{color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ================= Console: Show · Clear · Black lives in .seg ================= */
.kbd-hints{display:grid;grid-template-columns:repeat(3,auto);justify-content:space-between;gap:10px 16px;font-size:var(--fs-xs);color:var(--text-3)}
.kbd-hints span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}

/* ================= QR ================= */
.qr{width:120px;height:120px;border-radius:var(--r-sm);background:#fff;padding:8px;flex:none}
.qr svg{display:block;width:100%;height:100%}

/* ================= Misc ================= */
.stack{display:flex;flex-direction:column}
.hstack{display:flex;align-items:center}
.gap-1{gap:4px}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}
.grow{flex:1;min-width:0}
.scroll{overflow:auto;min-height:0;scrollbar-width:none}
.scroll::-webkit-scrollbar{display:none}

/* ================= Finger-sized targets (44 px) on phones and touch screens =================
   App pages and sign in only; the console and the phone remote size their own controls. */
@media (max-width:720px),(pointer:coarse){
  :is(.spa,.login-body) :is(.btn,.btn--sm,.tab,.seg__item,.menu__item,.switch){min-height:44px}
  :is(.spa,.login-body) :is(.icon-btn,.icon-btn--sm){min-width:44px;min-height:44px}
  :is(.spa,.login-body) a.back{height:44px}
}

/* ================= Text fields: no focus ring (owner 2026-10-25) =================
   "all inputs should not have the highlight border": no outline, ring or border on any text field when it is
   focused, anywhere in the app. The kit fields (.input, .textarea, the .search and .chip-input pills, copy fields)
   take a slightly different fill instead, and the caret shows where typing goes. Buttons, switches and tabs keep
   their keyboard focus rings. !important: it replaces the field rings set in the page stylesheets. */
:is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="color"]), textarea, select, [contenteditable="true"]):is(:focus, :focus-visible),
:is(.input, .textarea, .search, .chip-input, .input--copy):is(:focus, :focus-visible, :focus-within),
:is(.input, .textarea, .search, .chip-input, .input--copy):has(:focus) {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
:is(.input, .textarea, .search, .chip-input, .input--copy):is(:focus, :focus-within) {
  background-color: var(--surface-3) !important;
}
