/* ─────────────────────────────────────────────────────────────────────────
   Guardian — quiet, dense, and precise.

   The old look leaned on the tells of a generated dashboard: fat 24px corners,
   gradients on every surface, a drop shadow under every card, and 700–800
   weight text everywhere. This rewrite strips all of that. Flat fills, hairline
   borders, one accent, tight radii, and a calm type scale — so the single
   number or the one red alert that matters is the loudest thing on screen,
   not the chrome around it. Every class name is preserved; only the paint
   changed.
   ───────────────────────────────────────────────────────────────────────── */
:root{
  /* surfaces — clean neutral, a hair of warmth, no gradient wash */
  --bg:#F7F7F8;
  --bg-tint:#F2F2F4;
  --surface:#FFFFFF;
  --surface-2:#F6F6F8;
  --hover:#F1F1F4;
  --line:#E7E7EA;
  --line-soft:#EFEFF1;

  /* text */
  --text:#1A1C22;
  --text-dim:#6A6E78;
  --text-faint:#A0A4AE;

  /* one accent, used sparingly */
  --accent:#4F46E5;
  --accent-soft:#EEEDFB;
  --ok:#0E9F6E;
  --warn:#D97706;
  --hot:#E5484D;

  /* severity — meaning only, kept legible on white */
  --sev1:#9CA3AF;
  --sev2:#D97706;
  --sev3:#EC5A67;
  --sev4:#E5484D;
  --sev1-soft:#F2F3F5;
  --sev2-soft:#FBF1E3;
  --sev3-soft:#FDECEE;
  --sev4-soft:#FCE9EA;

  --r:12px;
  --r-sm:9px;
  --r-xs:6px;
  /* only overlays get a shadow; cards use borders */
  --shadow:0 1px 2px rgba(20,22,28,.04);
  --pop:0 8px 28px -10px rgba(20,22,28,.28);
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,sans-serif;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow:hidden;
}
.hidden{display:none !important}
button{font:inherit;color:inherit;cursor:pointer}
h1,h2,h3{margin:0;font-weight:640;letter-spacing:-.01em}
.muted{color:var(--text-dim);font-size:12.5px}
.spacer{flex:1}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#DBDBDE;border-radius:8px;border:3px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:#C7C7CB;background-clip:content-box}
::-webkit-scrollbar-track{background:transparent}

/* ── lock screen ─────────────────────────────────────────────────────── */
.lock{position:fixed;inset:0;z-index:200;display:grid;place-items:center;background:var(--bg)}
.lock-card{width:min(340px,92vw);background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);padding:32px 28px;text-align:center;box-shadow:var(--shadow)}
.lock-badge{font-size:34px;margin-bottom:10px}
.lock-card h1{font-size:21px;margin-bottom:4px}
.lock-card p{color:var(--text-dim);font-size:13px;margin:0 0 18px}
.lock-card input{width:100%;margin-bottom:10px}
.lock-error{color:var(--hot);font-size:12.5px;min-height:17px;margin-top:6px}

/* ── shell ───────────────────────────────────────────────────────────── */
.app{display:grid;grid-template-columns:216px 1fr;height:100vh}
.sidebar{display:flex;flex-direction:column;gap:18px;padding:16px 12px;
  background:var(--surface);border-right:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;padding:2px 8px 2px}
.brand-mark{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;
  font-size:16px;background:var(--accent-soft)}
.brand-text{display:flex;flex-direction:column;line-height:1.2}
.brand-text strong{font-size:15px;letter-spacing:-.01em}
.brand-text span{font-size:10px;color:var(--text-faint);text-transform:uppercase;letter-spacing:.08em}

.nav{display:flex;flex-direction:column;gap:1px}
.nav-item{display:flex;align-items:center;gap:11px;width:100%;padding:9px 11px;border:0;
  border-radius:var(--r-sm);background:transparent;color:var(--text-dim);
  font-size:13.5px;font-weight:500;text-align:left;transition:background .12s,color .12s}
.nav-item i{font-style:normal;width:18px;text-align:center;font-size:13px;opacity:.85}
.nav-item span{flex:1}
.nav-item:hover{background:var(--hover);color:var(--text)}
.nav-item.active{background:var(--accent-soft);color:var(--accent);font-weight:600}
.nav-item.active i{opacity:1}
.pill{background:var(--hot);color:#fff;font-size:10.5px;font-weight:700;
  padding:1px 6px;border-radius:20px;min-width:18px;text-align:center}
.pill.zero{display:none}

.sidebar-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px}
.engine-chip{display:flex;gap:9px;align-items:center;padding:9px 10px;border-radius:var(--r-sm);
  background:var(--surface-2);border:1px solid var(--line-soft)}
.engine-chip div{display:flex;flex-direction:column;min-width:0}
.engine-chip strong{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.engine-chip span{font-size:11px;color:var(--text-faint)}
.version{font-size:10.5px;color:var(--text-faint);text-align:center;letter-spacing:.03em}

.dot{width:8px;height:8px;border-radius:50%;background:var(--text-faint);flex:none}
.dot.ok{background:var(--ok)}
.dot.warn{background:var(--warn)}
.dot.bad{background:var(--hot)}
.dot.idle{background:#CBD0D8}

/* ── main ────────────────────────────────────────────────────────────── */
.main{display:flex;flex-direction:column;min-width:0;overflow:hidden}
.topbar{display:flex;align-items:center;gap:12px;padding:11px 20px;
  border-bottom:1px solid var(--line);background:var(--surface)}
.devices{display:flex;gap:7px;flex-wrap:wrap;min-width:0;flex:1}
.device-chip{display:flex;align-items:center;gap:7px;padding:5px 11px;border-radius:20px;
  background:var(--surface-2);border:1px solid var(--line-soft);font-size:12.5px;font-weight:500}
.device-chip.offline{opacity:.5}
.device-chip small{color:var(--text-faint)}
.topbar-right{display:flex;align-items:center;gap:8px}
.clock{font:12px/1 var(--mono);color:var(--text-faint);min-width:70px;text-align:right}

.btn{display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border-radius:var(--r-sm);
  text-decoration:none;border:1px solid var(--line);background:var(--surface);color:var(--text);
  font-size:13px;font-weight:550;transition:.12s}
.btn:hover{background:var(--hover);border-color:#D8D8DC}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn.primary:hover{background:#443CD0;border-color:#443CD0}
.btn.ghost{background:transparent;border-color:transparent}
.btn.ghost:hover{background:var(--hover)}
.btn.tiny{padding:5px 10px;font-size:12px;border-radius:var(--r-xs)}
.btn.block{width:100%;justify-content:center;padding:11px}
.btn.listen.on{background:var(--ok);border-color:var(--ok);color:#fff}
.btn.listen.on .listen-ico{animation:pulse 1.4s infinite}
.btn.danger{border-color:transparent;color:var(--hot)}
.btn.danger:hover{background:var(--sev4-soft)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}

.view{display:none;padding:20px;overflow-y:auto;flex:1;scroll-behavior:smooth}
.view.active{display:block}

/* ── live panel ──────────────────────────────────────────────────────── */
.live-panel{display:grid;grid-template-columns:1.6fr 1fr;gap:14px;margin-bottom:16px}
.live-left,.live-right{background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);padding:16px}
.live-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.live-head h2{font-size:16px;font-weight:600}
.live-sub{font-size:12px;color:var(--text-faint)}
.live-dot{width:9px;height:9px;border-radius:50%;background:#CBD0D8;flex:none;transition:.2s}
.live-dot.on{background:var(--ok)}
.live-dot.speech{background:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
#waveCanvas{width:100%;height:110px;display:block;border-radius:var(--r-sm);background:var(--surface-2)}
.live-meta{display:flex;align-items:center;gap:11px;margin-top:12px;font-size:12px;color:var(--text-dim)}
.live-meta .sep{width:1px;height:11px;background:var(--line)}

.ticker-head{font-size:11px;text-transform:uppercase;letter-spacing:.07em;
  color:var(--text-faint);margin-bottom:10px;font-weight:600}
.ticker{height:150px;overflow-y:auto;display:flex;flex-direction:column;gap:5px}
.ticker-empty{color:var(--text-faint);font-size:13px;line-height:1.7}
.ticker-line{display:flex;gap:9px;align-items:flex-start;font-size:13px;line-height:1.5;
  padding:8px 10px;border-radius:var(--r-sm);background:var(--surface-2);animation:slidein .2s ease}
.ticker-line time{font:10px var(--mono);color:var(--text-faint);display:block;margin-bottom:2px}
.ticker-line.flagged{background:var(--sev3-soft)}
.ticker-line.playing{box-shadow:inset 0 0 0 1.5px var(--accent)}
@keyframes slidein{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}

.line-play{width:24px;height:24px;flex:none;border-radius:50%;border:1px solid var(--line);
  background:var(--surface);color:var(--text-dim);font-size:9px;display:grid;place-items:center;
  transition:.12s;margin-top:1px}
.line-play:hover{border-color:var(--accent);color:var(--accent)}
.line-play.on{background:var(--accent);border-color:var(--accent);color:#fff}
.line-body{flex:1;min-width:0}

/* ── tiles ───────────────────────────────────────────────────────────── */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:16px}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:15px 16px;display:flex;flex-direction:column;gap:3px}
.tile-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;
  color:var(--text-faint);font-weight:600}
.tile-value{font-size:30px;font-weight:680;letter-spacing:-.02em;line-height:1.05}
.tile-value em{font-size:15px;font-style:normal;color:var(--text-dim);margin-left:1px}
.tile-foot{font-size:12px;color:var(--text-dim)}
.tile.danger .tile-value{color:var(--hot)}

/* ── cards ───────────────────────────────────────────────────────────── */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:16px;margin-bottom:14px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.card-head h3{font-size:14.5px;font-weight:600}
.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px}

.activity{display:flex;align-items:flex-end;gap:3px;height:100px}
.act-col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;gap:3px;height:100%}
.act-bar{width:100%;border-radius:3px;min-height:2px;transition:height .3s;background:#C9CCF3}
.act-bar.has-flag{background:var(--sev3)}
.act-label{font-size:9px;color:var(--text-faint);text-align:center;font-family:var(--mono)}
.act-col:hover .act-bar{background:var(--accent)}

.cats{display:flex;flex-direction:column;gap:9px}
.cat-row{display:flex;align-items:center;gap:10px;font-size:13px}
.cat-name{width:134px;display:flex;align-items:center;gap:8px;flex:none}
.cat-swatch{width:8px;height:8px;border-radius:3px;flex:none}
.cat-track{flex:1;height:6px;border-radius:4px;background:var(--surface-2);overflow:hidden}
.cat-fill{height:100%;border-radius:4px;transition:width .4s}
.cat-n{width:32px;text-align:right;color:var(--text-dim);font:12px var(--mono)}
.empty{color:var(--text-faint);font-size:13px;text-align:center;padding:30px 12px;line-height:1.8}

/* ── toolbar / inputs ────────────────────────────────────────────────── */
.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.input{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);
  padding:8px 12px;color:var(--text);font:inherit;font-size:13px;outline:none;transition:.12s}
.input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.input.grow{flex:1;min-width:190px}
select.input{cursor:pointer}
.seg{display:flex;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-sm);padding:2px}
.seg button{border:0;background:transparent;color:var(--text-dim);padding:6px 12px;
  border-radius:var(--r-xs);font-size:12.5px;font-weight:500}
.seg button.on{background:var(--surface);color:var(--text);font-weight:600;box-shadow:var(--shadow)}
.check{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-dim);
  cursor:pointer;user-select:none;margin-bottom:9px}
.check input{accent-color:var(--accent);width:16px;height:16px}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;font-size:13px;color:var(--text-dim)}
.field > span{display:flex;justify-content:space-between;align-items:center;font-weight:500}
.field em{font-style:normal;color:var(--text);font:12px var(--mono)}
.field small{color:var(--text-faint);font-size:11.5px;line-height:1.5}
.field input[type=range]{accent-color:var(--accent);width:100%}
.row{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.kv{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12.5px;
  color:var(--text-dim);padding-top:11px;margin-top:11px;border-top:1px solid var(--line-soft)}
.kv code{font:12px var(--mono);color:var(--text);word-break:break-all}
.code{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-sm);
  padding:12px 14px;font:12px/1.65 var(--mono);color:var(--accent);white-space:pre-wrap;
  word-break:break-all;margin:0 0 9px}
.hint{font-size:12px;color:var(--text-faint);line-height:1.55;margin-top:6px}
.save-bar{position:sticky;bottom:0;display:flex;align-items:center;justify-content:flex-end;
  gap:12px;padding:14px 0 6px;background:linear-gradient(180deg,transparent,var(--bg) 45%)}

/* ── alert preferences bar ───────────────────────────────────────────── */
.prefs-bar{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:14px 16px;margin-bottom:14px}
.prefs-bar>summary{list-style:none;cursor:pointer}
.prefs-bar>summary::-webkit-details-marker{display:none}
.prefs-head{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.prefs-head::before{content:"▸";color:var(--text-faint);font-size:11px;transition:transform .15s}
.prefs-bar[open] .prefs-head::before{transform:rotate(90deg)}
.prefs-bar[open] .prefs-chips{margin-top:12px}
.prefs-hint{margin:9px 0 0;font-size:12px;line-height:1.55}
.prefs-head strong{font-size:13.5px;font-weight:600}
.prefs-chips{display:flex;flex-wrap:wrap;gap:7px}
.pref-chip{display:inline-flex;align-items:center;gap:7px;padding:6px 9px;border-radius:var(--r-sm);
  border:1px solid var(--line);background:var(--surface);font-size:12.5px;
  font-weight:500;transition:.12s;color:var(--text)}
.pref-chip:hover{border-color:#D8D8DC;background:var(--hover)}
.pref-chip em{font-style:normal;font-size:10px;font-weight:600;padding:2px 6px;
  border-radius:var(--r-xs);letter-spacing:.02em;white-space:nowrap}
.pref-chip.alert em{background:rgba(14,159,110,.14);color:var(--ok)}
.pref-chip.log em{background:var(--sev2-soft);color:var(--warn)}
.pref-chip.hide em{background:var(--sev1-soft);color:var(--text-dim)}
.pref-chip.hide{opacity:.55}
.pref-chip.hide span{text-decoration:line-through}

/* ── alert cards ─────────────────────────────────────────────────────── */
.alert-list{display:flex;flex-direction:column;gap:10px}
.alert{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:15px 16px;position:relative;border-left:3px solid var(--sev2)}
.alert[data-sev="1"]{border-left-color:var(--sev1)}
.alert[data-sev="2"]{border-left-color:var(--sev2)}
.alert[data-sev="3"]{border-left-color:var(--sev3)}
/* Critical stays unmistakable, but with a clean tint + one calm pulsing dot
   rather than an animated full-card glow. Quieter, still impossible to miss. */
.alert[data-sev="4"]{border-left-color:var(--sev4);border-left-width:3px;background:var(--sev4-soft)}
.alert[data-sev="4"]:not(.acked) .badge.sev4::before{
  content:"";width:6px;height:6px;border-radius:50%;background:#fff;
  display:inline-block;margin-right:5px;vertical-align:middle;animation:pulse 1.6s infinite}
.alert.acked{opacity:.55}
.alert.new{animation:flash .8s ease}
@keyframes flash{0%{border-left-color:var(--accent);background:var(--accent-soft)}100%{}}

.alert-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.badge{font-size:10px;font-weight:650;letter-spacing:.05em;text-transform:uppercase;
  padding:3px 7px;border-radius:var(--r-xs);background:var(--surface-2);color:var(--text-dim)}
.badge.sev1{background:var(--sev1-soft);color:#5B616B}
.badge.sev2{background:var(--sev2-soft);color:var(--warn)}
.badge.sev3{background:var(--sev3-soft);color:var(--sev4)}
.badge.sev4{background:var(--sev4);color:#fff}
.badge.cat{background:var(--surface-2);border:1px solid var(--line)}
.alert-word{font-size:14.5px;font-weight:600}
.alert-word q{color:var(--sev4);background:var(--sev4-soft);padding:1px 8px;border-radius:var(--r-xs);quotes:'"' '"'}
.alert-word.ai{font-weight:550;color:var(--text)}
.ai-tag{font-size:9.5px;font-weight:700;letter-spacing:.06em;padding:2px 7px;border-radius:var(--r-xs);
  background:var(--accent-soft);color:var(--accent)}
.media-tag{font-size:10.5px;color:var(--text-dim);border:1px solid var(--line);
  padding:2px 7px;border-radius:var(--r-xs);background:var(--surface-2)}
.fuzzy-tag{font-size:10.5px;color:var(--warn);border:1px dashed rgba(217,119,6,.5);
  padding:2px 7px;border-radius:var(--r-xs)}
.alert-when{margin-left:auto;font:11px var(--mono);color:var(--text-faint);
  text-align:right;white-space:nowrap}
.alert-when b{display:block;color:var(--text-dim);font-weight:600}
.alert-text{font-size:14px;line-height:1.6;color:var(--text);background:var(--surface-2);
  padding:11px 13px;border-radius:var(--r-sm);margin-bottom:12px}
.alert-text mark{background:var(--sev3-soft);color:var(--sev4);padding:1px 4px;border-radius:var(--r-xs);font-weight:600}
.alert-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}

/* player */
.player{background:var(--surface-2);border:1px solid var(--line-soft);border-radius:var(--r-sm);
  padding:11px 13px;margin-bottom:12px;display:flex;flex-direction:column;gap:9px}
.player-row{display:flex;align-items:center;gap:10px}
.player-row.ctx{gap:6px;flex-wrap:wrap;padding-top:9px;border-top:1px solid var(--line-soft)}
.ctx-label{font-size:11px;color:var(--text-faint);font-weight:600}
.ctx-note{font-size:11px;color:var(--text-faint);margin-left:auto;font-family:var(--mono)}
.play-btn{width:40px;height:40px;flex:none;border-radius:50%;border:0;display:grid;place-items:center;
  background:var(--accent);color:#fff;font-size:14px;transition:.12s}
.play-btn:hover{background:#443CD0}
.play-btn.playing{background:var(--ok)}
.pbtn{border:1px solid var(--line);background:var(--surface);color:var(--text-dim);
  border-radius:var(--r-xs);padding:6px 9px;font:11px var(--mono);flex:none;transition:.12s}
.pbtn:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}
.pbtn:disabled{opacity:.4;cursor:not-allowed}
.pbtn.on{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.ctx-btn{font-family:inherit;font-size:11.5px;font-weight:550}
.track{flex:1;height:28px;position:relative;cursor:pointer;touch-action:none}
.track-bg{position:absolute;top:12px;left:0;right:0;height:5px;border-radius:3px;background:var(--line)}
.track-buffer{position:absolute;top:12px;left:0;height:5px;border-radius:3px;background:#DDDEE2;width:0}
.track-fill{position:absolute;top:12px;left:0;height:5px;border-radius:3px;background:var(--accent);width:0}
.track-head{position:absolute;top:8px;width:14px;height:14px;margin-left:-7px;border-radius:50%;
  background:#fff;border:2px solid var(--accent);box-shadow:0 1px 3px rgba(0,0,0,.2);
  left:0;pointer-events:none;transition:left .08s linear}
.track-mark{position:absolute;top:5px;width:2px;height:19px;background:var(--sev4);
  border-radius:2px;pointer-events:none}
.track:hover .track-bg,.track:hover .track-fill,.track:hover .track-buffer{height:7px;top:11px}
.track-time{font:11px var(--mono);color:var(--text-dim);min-width:82px;text-align:right}
.no-clip{font-size:12px;color:var(--text-faint);padding:7px 0}


/* ── collapsible player ──────────────────────────────────────────────── */
.player-wrap{margin-bottom:12px}
.player-wrap>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;
  gap:8px;padding:7px 13px;border-radius:var(--r-sm);border:1px solid var(--line);
  background:var(--surface);color:var(--text-dim);font-size:12.5px;font-weight:550;
  transition:.12s;user-select:none}
.player-wrap>summary::-webkit-details-marker{display:none}
.player-wrap>summary:hover{border-color:var(--accent);color:var(--accent)}
.player-wrap[open]>summary{color:var(--accent);border-color:var(--accent);
  background:var(--accent-soft);margin-bottom:9px}
.po-ico{font-size:9px;transition:transform .18s}
.player-wrap[open] .po-ico{transform:rotate(90deg)}
.player-wrap .player{margin-bottom:0}

/* ── install card ────────────────────────────────────────────────────── */
#installCard{margin-bottom:14px}
#installCard .muted{margin:0 0 12px;line-height:1.55}
.install-help{margin-top:12px}
.install-help>summary{list-style:none;cursor:pointer;font-size:12.5px;
  color:var(--text-faint);user-select:none}
.install-help>summary::-webkit-details-marker{display:none}
.install-help>summary::before{content:"▸ ";transition:.15s}
.install-help[open]>summary::before{content:"▾ "}
.install-help>summary:hover{color:var(--accent)}
.install-help .hint{margin-top:8px}

/* ── timeline ────────────────────────────────────────────────────────── */
.timeline{display:flex;flex-direction:column;gap:1px}
.tl-day{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-faint);
  font-weight:600;margin:18px 0 7px;padding-bottom:7px;border-bottom:1px solid var(--line)}
.tl-row{display:flex;gap:11px;padding:9px 11px;border-radius:var(--r-sm);transition:background .12s;align-items:flex-start}
.tl-row:hover{background:var(--hover)}
.tl-row.playing{background:var(--accent-soft)}
.tl-time{font:11px var(--mono);color:var(--text-faint);flex:none;width:74px;padding-top:4px}
.tl-text{flex:1;font-size:13.5px;line-height:1.6}
.tl-row.flagged .tl-text{font-weight:550}
.tl-text mark{background:var(--sev3-soft);color:var(--sev4);padding:1px 4px;border-radius:var(--r-xs)}
.tl-side{display:flex;gap:7px;align-items:center;flex:none}
.tl-dot{width:7px;height:7px;border-radius:50%;background:var(--sev2)}

/* ── rules ───────────────────────────────────────────────────────────── */
.rule-add{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:13px}
.rule-test{display:flex;flex-direction:column;gap:8px}
.test-out{min-height:20px;display:flex;gap:7px;flex-wrap:wrap;font-size:12px}
.rule-group{margin-bottom:15px}
.rule-group-head{display:flex;align-items:center;gap:9px;margin-bottom:11px}
.rule-group-head h4{margin:0;font-size:14px;font-weight:600}
.rule-group-head .muted{margin-right:auto}
.rules{display:flex;flex-wrap:wrap;gap:7px}
.rule{display:inline-flex;align-items:center;gap:7px;padding:5px 9px 5px 11px;border-radius:var(--r-sm);
  background:var(--surface-2);border:1px solid var(--line);font-size:12.5px;font-weight:500}
.rule.off{opacity:.42;text-decoration:line-through}
.rule .sev{font:9px var(--mono);font-weight:700;padding:2px 5px;border-radius:var(--r-xs);background:var(--surface)}
.rule .x{border:0;background:transparent;color:var(--text-faint);padding:0 2px;font-size:14px;line-height:1}
.rule .x:hover{color:var(--hot)}
.rule.custom{border-color:var(--accent);background:var(--accent-soft)}

/* ── setup checklist ─────────────────────────────────────────────────── */
.setup-card{border-color:var(--accent);background:var(--accent-soft)}
.setup-count{font:12px var(--mono);color:var(--text-faint);margin-left:8px}
.setup-steps{display:flex;flex-direction:column;gap:1px}
.setup-step{display:flex;gap:11px;align-items:flex-start;padding:9px 10px;border-radius:var(--r-sm)}
.setup-step:hover{background:rgba(255,255,255,.5)}
.setup-mark{width:20px;height:20px;border-radius:50%;flex:none;display:grid;place-items:center;
  font-size:10px;font-weight:700;margin-top:1px}
.setup-mark.ok{background:rgba(14,159,110,.16);color:var(--ok)}
.setup-mark.todo{background:var(--surface);color:var(--text-faint);box-shadow:inset 0 0 0 1px var(--line)}
.setup-mark.warn{background:var(--sev2-soft);color:var(--warn)}
.setup-mark.wait{background:var(--accent-soft);color:var(--accent)}
.setup-mark.bad{background:var(--sev4-soft);color:var(--sev4)}
.setup-body{flex:1;min-width:0}
.setup-body strong{display:block;font-size:13.5px;font-weight:600}
.setup-body span{font-size:12px;color:var(--text-dim);line-height:1.55;white-space:pre-wrap;word-break:break-word}
.setup-step.done .setup-body strong{color:var(--text-dim);font-weight:500}
.setup-body code{font:11.5px var(--mono);color:var(--accent)}

/* ── modal / calibration ─────────────────────────────────────────────── */
.modal{position:fixed;inset:0;z-index:180;display:grid;place-items:center;
  background:rgba(20,22,28,.4);backdrop-filter:blur(3px);padding:20px;overflow-y:auto}
.modal-card{width:min(600px,100%);background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);padding:24px;box-shadow:var(--pop)}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.modal-head h3{font-size:17px;font-weight:600}
.modal-card > .muted{margin:0 0 18px;line-height:1.6}
.modal-foot{display:flex;align-items:center;gap:11px;margin-top:20px;padding-top:16px;border-top:1px solid var(--line-soft)}
.cal-steps{display:flex;flex-direction:column;gap:9px}
.cal-step{display:flex;gap:13px;align-items:flex-start;padding:14px;border-radius:var(--r-sm);
  background:var(--surface-2);border:1px solid var(--line-soft);transition:.15s}
.cal-step.active{border-color:var(--accent);background:var(--accent-soft)}
.cal-step.done{border-color:var(--ok)}
.cal-num{width:26px;height:26px;border-radius:50%;flex:none;display:grid;place-items:center;
  background:var(--surface);font:12px var(--mono);font-weight:600;color:var(--text-dim)}
.cal-step.done .cal-num{background:rgba(14,159,110,.16);color:var(--ok)}
.cal-body{flex:1;min-width:0}
.cal-body strong{display:block;font-size:14px;margin-bottom:4px;font-weight:600}
.cal-body span{font-size:12.5px;color:var(--text-dim);line-height:1.55}
.cal-result{font:12px var(--mono);color:var(--ok);margin-top:7px;font-weight:600}
.cal-result.err{color:var(--hot)}
.cal-step button{flex:none;align-self:center}
.cal-live{margin-top:18px;text-align:center}
.cal-timer{font:40px var(--mono);font-weight:600;letter-spacing:-.02em;color:var(--accent)}
.cal-bar{height:6px;border-radius:4px;background:var(--line);overflow:hidden;margin:13px 0 8px}
.cal-bar-fill{height:100%;width:0;background:var(--accent);border-radius:4px;transition:width .3s linear}
.cal-hint{font-size:12.5px;color:var(--text-dim)}
.cal-verdict{margin-top:18px;padding:16px;border-radius:var(--r-sm);background:var(--surface-2);
  border:1px solid var(--line-soft)}
.cal-verdict h4{margin:0 0 10px;font-size:14.5px;font-weight:600}
.cal-verdict.good h4{color:var(--ok)}
.cal-verdict.workable h4{color:var(--warn)}
.cal-verdict.unusable h4,.cal-verdict.clipping h4{color:var(--hot)}
.cal-verdict ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px}
.cal-verdict li{font-size:12.5px;color:var(--text-dim);line-height:1.6}
.cal-numbers{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:11px;padding-bottom:11px;
  border-bottom:1px solid var(--line-soft)}
.cal-numbers div{display:flex;flex-direction:column}
.cal-numbers span{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-faint);font-weight:600}
.cal-numbers b{font:15px var(--mono);font-weight:600}

/* ── music ───────────────────────────────────────────────────────────────
   One card per song. The old row put a verdict circle, a verdict chip, a
   severity badge, concern chips, a play count and a source tag on a single
   line, then offered two identical buttons that never showed which verdict
   was actually set. Now: title and artist lead, the verdict IS the control,
   and the reasoning only appears when something is wrong.
   ──────────────────────────────────────────────────────────────────────── */
.song-list{display:flex;flex-direction:column;gap:8px}
.song{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:13px 15px;display:flex;flex-direction:column;gap:7px;transition:border-color .12s}
.song:hover{border-color:#D8D8DC}
.song.bad{border-color:rgba(229,72,77,.35);background:var(--sev4-soft)}

.song-main{display:flex;align-items:flex-start;gap:12px}
.song-id{flex:1;min-width:0}
.song-title{margin:0;font-size:14.5px;font-weight:600;line-height:1.35;
  overflow-wrap:anywhere}
.song-artist{margin:1px 0 0;font-size:13px;color:var(--text-dim);line-height:1.35;
  overflow-wrap:anywhere}

/* The verdict is a two-state control, not two buttons that look the same. */
.song-pick{display:flex;flex:none;background:var(--surface-2);padding:2px;
  border:1px solid var(--line);border-radius:var(--r-sm);gap:2px}
.song.bad .song-pick{background:var(--surface)}
.sp-btn{border:0;background:transparent;color:var(--text-dim);white-space:nowrap;
  padding:5px 11px;border-radius:var(--r-xs);font-size:12px;font-weight:550;transition:.12s}
.sp-btn:hover{color:var(--text)}
.sp-btn.ok.on{background:var(--ok);color:#fff}
.sp-btn.bad.on{background:var(--sev4);color:#fff}

.song-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  font-size:11.5px;color:var(--text-faint);font-family:var(--mono)}
.sm-dot{width:3px;height:3px;border-radius:50%;background:var(--text-faint);
  opacity:.55;flex:none}

.song-why{border-top:1px solid var(--line-soft);padding-top:8px;
  display:flex;flex-direction:column;gap:6px}
.song.bad .song-why{border-top-color:rgba(229,72,77,.2)}
.song-concerns{display:flex;flex-wrap:wrap;gap:5px}
.song-concern{font-size:10px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;
  padding:2px 7px;border-radius:var(--r-xs);background:var(--sev4);color:#fff}
.song-reason{margin:0;font-size:12.5px;color:var(--text-dim);line-height:1.5}

.qr{background:#fff;border:1px solid var(--line);border-radius:var(--r-sm);padding:14px;
  width:max-content;margin:12px 0}
.qr svg{width:180px;height:180px;display:block}

/* ── first-run tour ──────────────────────────────────────────────────── */
.tour{position:fixed;inset:0;z-index:400;pointer-events:none}
.tour-spot{position:absolute;border-radius:var(--r-sm);display:none;
  box-shadow:0 0 0 9999px rgba(20,22,28,.55), 0 0 0 2px var(--accent);
  transition:top .26s cubic-bezier(.4,0,.2,1),left .26s cubic-bezier(.4,0,.2,1),width .26s,height .26s}
.tour-dim{position:absolute;inset:0;background:rgba(20,22,28,.55)}
.tour-card{position:absolute;width:min(360px,calc(100vw - 32px));pointer-events:auto;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:20px;box-shadow:var(--pop);transition:top .26s,left .26s}
.tour-card h3{font-size:17px;margin-bottom:8px;padding-right:28px;font-weight:600}
.tour-card p{margin:0;font-size:13.5px;line-height:1.6;color:var(--text-dim)}
.tour-card p b{color:var(--text)}
.tour-step{font-size:10.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;
  color:var(--accent);margin-bottom:6px}
.tour-x{position:absolute;top:14px;right:14px;width:30px;height:30px;border-radius:50%;
  border:1px solid var(--line);background:var(--surface);color:var(--text-dim);
  font-size:18px;line-height:1;display:grid;place-items:center;transition:.12s}
.tour-x:hover{border-color:var(--hot);color:var(--hot)}
.tour-foot{display:flex;align-items:center;gap:11px;margin-top:18px}
.tour-dots{display:flex;gap:6px;flex:1;justify-content:center}
.tour-dots i{width:6px;height:6px;border-radius:50%;background:var(--line);transition:.2s}
.tour-dots i.on{background:var(--accent);width:18px;border-radius:3px}
@media (max-width:700px){
  .tour-card{left:16px !important;right:16px;width:auto;top:auto !important;bottom:88px;transform:none !important}
}

/* ── toasts ──────────────────────────────────────────────────────────── */
.toasts{position:fixed;right:20px;bottom:20px;display:flex;flex-direction:column;
  gap:9px;z-index:150;max-width:370px}
.toast{display:flex;gap:11px;align-items:flex-start;padding:13px 15px;border-radius:var(--r);
  background:var(--surface);border:1px solid var(--line);box-shadow:var(--pop);
  animation:toastin .24s ease;cursor:pointer}
.toast.sev4{border-left:3px solid var(--sev4)}
.toast.sev3{border-left:3px solid var(--sev3)}
.toast-ico{font-size:17px;line-height:1.2}
.toast-body strong{display:block;font-size:13.5px;margin-bottom:2px;font-weight:600}
.toast-body span{font-size:12.5px;color:var(--text-dim);line-height:1.45}
@keyframes toastin{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.toast.out{animation:toastout .2s forwards}
@keyframes toastout{to{opacity:0;transform:translateX(30px)}}

.load-more{display:flex;justify-content:center;padding:18px 0 40px}

/* ── responsive: sidebar becomes a bottom tab bar on phones ──────────── */
@media (max-width:1020px){
  .live-panel{grid-template-columns:1fr}
}
@media (max-width:700px){
  body{overflow:auto}
  .app{grid-template-columns:1fr;height:100dvh}
  .sidebar{position:fixed;bottom:0;left:0;right:0;z-index:120;
    flex-direction:row;align-items:center;gap:0;padding:5px 6px calc(5px + env(safe-area-inset-bottom));
    border-right:0;border-top:1px solid var(--line)}
  .brand,.sidebar-foot{display:none}
  .nav{flex-direction:row;width:100%;gap:1px}
  .nav-item{flex-direction:column;gap:3px;padding:7px 2px;border-radius:var(--r-sm);
    font-size:10px;font-weight:600;text-align:center;position:relative}
  .nav-item i{width:auto;font-size:17px}
  .nav-item span{flex:none}
  .nav-item.active{background:transparent;color:var(--accent)}
  .pill{position:absolute;top:1px;right:50%;margin-right:-20px;font-size:9px;padding:1px 5px;min-width:16px}
  .main{padding-bottom:76px}
  .view{padding:14px 12px 26px}
  .topbar{flex-wrap:wrap;position:sticky;top:0;z-index:60}
  .clock{display:none}
  .row{grid-template-columns:1fr}
  .toasts{right:10px;left:10px;bottom:88px;max-width:none}
}

/* -- phone layout: reflow the dense rows so touch targets are usable ---- */
@media (max-width:700px){
  .player{padding:13px 12px;gap:12px}
  .player-row{flex-wrap:wrap;justify-content:center;gap:10px}
  .player-row .track{order:-2;flex:1 1 100%;height:32px;margin:0}
  .track-bg,.track-buffer,.track-fill{top:14px;height:6px}
  .track:hover .track-bg,.track:hover .track-fill,.track:hover .track-buffer{height:6px;top:14px}
  .track-head{top:9px;width:18px;height:18px;margin-left:-9px}
  .track-mark{top:6px;height:24px;width:3px}
  .player-row .track-time{order:-1;flex:1 1 100%;text-align:center;min-width:0;font-size:12.5px}
  .play-btn{width:56px;height:56px;font-size:19px;order:2}
  .player-row .pbtn[data-seek]{order:1;min-width:60px;height:44px;font-size:12.5px;
    display:grid;place-items:center;border-radius:var(--r-sm)}
  .player-row .pbtn[data-seek="10"]{order:3}
  .player-row .rate{order:4;min-width:50px;height:44px;display:grid;place-items:center}
  .player-row.ctx{justify-content:flex-start;gap:7px}
  .ctx-btn{flex:1 1 auto;min-height:38px;display:grid;place-items:center}
  .ctx-label{flex:1 1 100%;margin-bottom:2px}
  .ctx-note{flex:1 1 100%;margin-left:0;text-align:center}

  .alert{padding:15px 14px}
  .player-wrap>summary{width:100%;justify-content:center;min-height:42px}
  .alert-word{flex:1 1 100%;font-size:15px;line-height:1.4;order:5}
  .alert-when{order:6;flex:1 1 100%;margin-left:0;text-align:left;font-size:11px;margin-top:2px}
  .alert-text{font-size:14px;padding:12px}
  .alert-actions{gap:7px}
  .alert-actions .btn{flex:1 1 auto;justify-content:center;min-height:42px}
  .alert-actions .btn.danger{flex:0 0 auto}

  .line-play{width:32px;height:32px;font-size:11px}
  .tl-row{gap:10px;padding:11px 9px;flex-wrap:wrap;align-items:center}
  .tl-time{width:auto;order:2;font-size:11px;padding-top:0}
  .tl-text{flex:1 1 100%;order:3;font-size:14px;margin-top:2px}
  .tl-side{order:4;margin-left:auto}
  .ticker{height:auto;max-height:280px}

  .toolbar{gap:7px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;
    scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .toolbar::-webkit-scrollbar{display:none}
  .toolbar .seg,.toolbar .input,.toolbar .check,.toolbar .btn{flex:0 0 auto;white-space:nowrap}

  .tiles{grid-template-columns:1fr 1fr;gap:9px}
  .tile{padding:13px}
  .tile-value{font-size:25px}
  .card{padding:14px}
  .grid-2{gap:12px}
  .live-left,.live-right{padding:14px}
  .live-meta{flex-wrap:wrap;gap:8px}
  .live-meta .btn{width:100%;justify-content:center;margin-top:4px}
  .topbar-right{width:100%;gap:7px}
  .topbar-right .btn{flex:1;justify-content:center;min-height:42px}
  /* Narrow screens cannot fit the title and the verdict control side by
     side without shredding the title, so the control drops below. */
  .song{padding:12px 13px}
  .song-main{flex-wrap:wrap;gap:9px}
  .song-id{flex:1 1 100%}
  .song-pick{flex:1 1 100%}
  .sp-btn{flex:1;min-height:38px}

  /* Search gets its own full-width row so the day picker beside the range
     buttons stays reachable instead of scrolling off the edge. */
  #view-music .toolbar{flex-wrap:wrap}
  #songSearch{flex:1 1 100%;min-width:0}
  #view-music .toolbar .seg{flex:1 1 auto}
  #view-music .daypick{flex:0 0 auto}
  .daypick .input{min-width:132px}
  .pref-chip{flex:1 1 calc(50% - 4px);justify-content:space-between;min-height:42px}
  .rule-add .input,.rule-add .btn{flex:1 1 100%}
  .cal-step{flex-wrap:wrap;gap:10px}
  .cal-step button{width:100%}
}
@media (max-width:380px){
  .tiles{grid-template-columns:1fr}
  .pref-chip{flex:1 1 100%}
  .play-btn{width:52px;height:52px}
  .player-row .pbtn[data-seek]{min-width:52px}
}

/* ── night: same design, dark neutral surfaces ──────────────────────── */
/* ── themes ──────────────────────────────────────────────────────────────
   data-theme on <html> is the explicit choice. "auto" leaves it unset and the
   media query at the bottom follows the system. Every theme is only a variable
   swap - no component rules are duplicated.
   ──────────────────────────────────────────────────────────────────────── */

/* Night - warm-neutral dark, the default dark palette */
:root[data-theme="night"]{
  --bg:#131417; --bg-tint:#191A1E; --surface:#1B1C20; --surface-2:#212227;
  --hover:#26272D; --line:#2C2D33; --line-soft:#242529;
  --text:#ECEDEF; --text-dim:#9EA1A9; --text-faint:#6B6E76;
  --accent:#8B85F0; --accent-soft:#26243A;
  --sev1-soft:#26272D; --sev2-soft:#33280F; --sev3-soft:#3A2024; --sev4-soft:#3A1F22;
  --shadow:0 1px 2px rgba(0,0,0,.3); --pop:0 10px 30px -12px rgba(0,0,0,.7);
}

/* Midnight - true black, easiest on the eyes for a 2am check */
:root[data-theme="midnight"]{
  --bg:#000000; --bg-tint:#0A0A0C; --surface:#0D0D10; --surface-2:#141418;
  --hover:#1A1A20; --line:#232329; --line-soft:#1B1B21;
  --text:#F2F2F4; --text-dim:#9B9BA4; --text-faint:#6A6A73;
  --accent:#7EA8FF; --accent-soft:#152036;
  --sev1-soft:#1A1A20; --sev2-soft:#2E2410; --sev3-soft:#331C21; --sev4-soft:#331B1E;
  --shadow:0 1px 2px rgba(0,0,0,.5); --pop:0 10px 30px -12px rgba(0,0,0,.85);
}

/* Warm - the original friendly cream, for anyone who liked it */
:root[data-theme="warm"]{
  --bg:#FFFDF9; --bg-tint:#FFF4E8; --surface:#FFFFFF; --surface-2:#FFF9F2;
  --hover:#FFF4E6; --line:#F0E6DA; --line-soft:#F6EEE4;
  --text:#2E3340; --text-dim:#6B7280; --text-faint:#9CA3AF;
  --accent:#F59E0B; --accent-soft:#FEF3C7;
  --sev2-soft:#FEF3C7; --sev3-soft:#FFE4E6; --sev4-soft:#FEE2E2;
}

/* Forest - low-saturation green, calm and unlike a console */
:root[data-theme="forest"]{
  --bg:#F5F8F5; --bg-tint:#EAF1EA; --surface:#FFFFFF; --surface-2:#F2F7F2;
  --hover:#E9F1E9; --line:#DEE8DE; --line-soft:#E8F0E8;
  --text:#1B2620; --text-dim:#5A6B60; --text-faint:#93A399;
  --accent:#2F855A; --accent-soft:#DFF0E6;
}

/* Slate - cool neutral grey-blue */
:root[data-theme="slate"]{
  --bg:#F4F6F8; --bg-tint:#EAEEF3; --surface:#FFFFFF; --surface-2:#F3F5F8;
  --hover:#EAEEF3; --line:#DFE4EA; --line-soft:#EAEDF1;
  --text:#1A2027; --text-dim:#5F6B78; --text-faint:#94A0AC;
  --accent:#2563EB; --accent-soft:#E3EBFD;
}

/* Shared dark-mode text tweaks, applied to both dark themes. */
:root[data-theme="night"] .badge.sev2,
:root[data-theme="midnight"] .badge.sev2{color:#F5B860}
:root[data-theme="night"] .badge.sev3,
:root[data-theme="midnight"] .badge.sev3{color:#F08A92}
:root[data-theme="night"] .alert-word q,
:root[data-theme="midnight"] .alert-word q{color:#F08A92}
:root[data-theme="night"] .alert-text mark, :root[data-theme="night"] .tl-text mark,
:root[data-theme="midnight"] .alert-text mark, :root[data-theme="midnight"] .tl-text mark{
  background:var(--sev3-soft);color:#F08A92}
:root[data-theme="night"] .act-bar,
:root[data-theme="midnight"] .act-bar{background:#3B3A5E}
:root[data-theme="night"] ::-webkit-scrollbar-thumb,
:root[data-theme="midnight"] ::-webkit-scrollbar-thumb{background:#34353B}

/* ── theme picker ────────────────────────────────────────────────────── */
.theme-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(126px,1fr));gap:10px}
.theme-opt{border:1px solid var(--line);border-radius:var(--r-sm);padding:10px;
  background:var(--surface);text-align:left;transition:.12s;display:flex;
  flex-direction:column;gap:8px}
.theme-opt:hover{border-color:var(--accent)}
.theme-opt.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.theme-swatch{height:38px;border-radius:var(--r-xs);display:flex;overflow:hidden;
  border:1px solid rgba(0,0,0,.06)}
.theme-swatch i{flex:1;display:block}
.theme-name{font-size:12.5px;font-weight:550;display:flex;align-items:center;gap:6px}
.theme-name b{margin-left:auto;color:var(--accent);font-size:11px}

/* A pinned day overrides the range buttons; show that rather than leaving
   two controls looking equally active. */
.daypick{display:flex;align-items:center;gap:4px}
.daypick .input{padding:7px 10px}
.seg button.dimmed{opacity:.4}

@media (prefers-color-scheme: dark){
  :root:not([data-theme]){
    --bg:#131417;
    --bg-tint:#191A1E;
    --surface:#1B1C20;
    --surface-2:#212227;
    --hover:#26272D;
    --line:#2C2D33;
    --line-soft:#242529;

    --text:#ECEDEF;
    --text-dim:#9EA1A9;
    --text-faint:#6B6E76;

    --accent:#8B85F0;
    --accent-soft:#26243A;

    --sev1-soft:#26272D;
    --sev2-soft:#33280F;
    --sev3-soft:#3A2024;
    --sev4-soft:#3A1F22;

    --shadow:0 1px 2px rgba(0,0,0,.3);
    --pop:0 10px 30px -12px rgba(0,0,0,.7);
  }
  :root:not([data-theme]) .badge.sev2{color:#F5B860}
  :root:not([data-theme]) .badge.sev3{color:#F08A92}
  :root:not([data-theme]) .alert-word q{color:#F08A92}
  :root:not([data-theme]) .alert-text mark,:root:not([data-theme]) .tl-text mark{background:var(--sev3-soft);color:#F08A92}
  :root:not([data-theme]) .code,:root:not([data-theme]) .setup-body code{color:var(--accent)}
  :root:not([data-theme]) .cal-verdict.workable h4{color:#F5B860}
  :root:not([data-theme]) .cal-verdict.unusable h4,:root:not([data-theme]) .cal-verdict.clipping h4{color:#F08A92}
  :root:not([data-theme]) .pref-chip.log em{color:#F5B860}
  :root:not([data-theme]) .setup-mark.warn{color:#F5B860}
  :root:not([data-theme]) .act-bar{background:#3B3A5E}
  :root:not([data-theme]) ::-webkit-scrollbar-thumb{background:#34353B}
  :root:not([data-theme]) ::-webkit-scrollbar-thumb:hover{background:#42434A}
}
