/* ShowPilot admin — new layout (v0.33.209+).
   Everything here is scoped to body.ui-new, which ui-new.js adds for users
   whose layout preference is 'new' (the default). Without that class the
   admin renders exactly as the classic layout. Colors come only from the
   theme tokens, so all themes apply unchanged. */

body.ui-new {
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --rail-collapsed: 72px;
  --rail-expanded: 248px;
  font-family: var(--font-body);
  padding-left: var(--rail-collapsed);
}
body.ui-new.rail-pinned { padding-left: var(--rail-expanded); }
/* Signed out (logged out, or the session expired): only the login form shows (beta.20). */
body.ui-new:has(#loginView:not(.hidden)) { padding-left: 0 !important; }
body.ui-new:has(#loginView:not(.hidden)) .spn-rail,
body.ui-new:has(#loginView:not(.hidden)) .spn-backdrop,
body.ui-new:has(#loginView:not(.hidden)) .spn-menu-btn { display: none !important; }

/* The classic chrome is replaced by the rail and the top bar. The elements
   stay in the page (hidden) so every existing script keeps working. */
body.ui-new .app-header,
body.ui-new .status-strip,
body.ui-new .tab-nav,
body.ui-new .sub-tabs { display: none !important; }
/* The card that only holds the (hidden) sub-tab bar would show as an empty
   strip at the top of Viewer Page and other tabs (v0.33.258-beta.4). */
body.ui-new .card:has(> .sub-tabs:only-child) { display: none !important; }

/* ---------- Rail ---------- */
body.ui-new .spn-rail {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 900;
  width: var(--rail-collapsed); overflow: hidden;
  display: flex; flex-direction: column; gap: 18px; padding: 16px 12px;
  background: var(--bg-elevated); border-right: 1px solid var(--border);
  transition: width .18s ease, box-shadow .18s ease;
}
body.ui-new .spn-rail:hover,
body.ui-new.rail-pinned .spn-rail { width: var(--rail-expanded); overflow-y: auto; }
body.ui-new:not(.rail-pinned) .spn-rail:hover { box-shadow: 8px 0 32px rgba(0,0,0,.35); }
/* Keyboard users: expand while focus is in the rail — but only KEYBOARD
   focus (:focus-visible). Plain :focus-within kept the rail open after a
   mouse click until you clicked elsewhere. Separate rules on purpose: a
   browser without :has() drops only these, not the hover rules above. */
body.ui-new .spn-rail:has(:focus-visible) { width: var(--rail-expanded); overflow-y: auto; }
body.ui-new:not(.rail-pinned) .spn-rail:has(:focus-visible) { box-shadow: 8px 0 32px rgba(0,0,0,.35); }
.spn-rail .spn-label { white-space: nowrap; opacity: 0; transition: opacity .12s ease; }
.spn-rail:hover .spn-label, body.rail-pinned .spn-rail .spn-label { opacity: 1; }
.spn-rail:has(:focus-visible) .spn-label { opacity: 1; }

.spn-brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; min-height: 40px; }
.spn-mark { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 34px; height: 34px; flex: 0 0 34px; }
.spn-mark span { border-radius: 2px; background: var(--text-dim); }
/* The logo links to the ShowPilot GitHub page (v0.33.286, GitHub #96). */
.spn-mark-link { text-decoration: none; border-radius: 6px; transition: transform 0.15s ease, filter 0.15s ease; }
.spn-mark-link:hover { transform: scale(1.08); filter: drop-shadow(0 0 6px var(--accent)); }
.spn-mark-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.spn-mark span:nth-child(1) { background: var(--rgb-red); }
.spn-mark span:nth-child(3) { background: var(--rgb-green); }
.spn-mark span:nth-child(5) { background: var(--accent); }
.spn-mark span:nth-child(7) { background: var(--rgb-blue); }
.spn-mark span:nth-child(9) { background: var(--rgb-amber); }
.spn-brand-name { font: 800 20px/1.1 var(--font-display); letter-spacing: -0.02em; }
.spn-brand-version { font: 500 11px/1.2 var(--font-mono); color: var(--text-muted); }

.spn-nav { display: flex; flex-direction: column; gap: 2px; }
/* v0.33.247-beta.3: the menu list scrolls on its own and the footer (status,
   Classic layout, Keep menu open) stays pinned to the bottom of the rail.
   Before, the whole rail scrolled, so once the open section's sub-pages made
   the list taller than the window, "Keep menu open" sat below the fold. */
body.ui-new .spn-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
body.ui-new .spn-foot { flex: 0 0 auto; }
body.ui-new .spn-rail:hover,
body.ui-new.rail-pinned .spn-rail,
body.ui-new .spn-rail:has(:focus-visible) { overflow-y: hidden; }
.spn-item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 44px; padding: 0 13px;
  border: 0; border-radius: 10px; background: transparent; text-align: left; text-decoration: none;
  font: 600 14px/1.2 var(--font-body); color: var(--text-muted); cursor: pointer;
}
.spn-item:hover { background: var(--bg-tertiary); color: var(--text); }
.spn-item[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.spn-item svg { flex: 0 0 20px; }
.spn-item .spn-chev { margin-left: auto; transition: transform .15s ease; }
.spn-item[aria-expanded="true"] .spn-chev { transform: rotate(90deg); }
.spn-sub { display: none; flex-direction: column; gap: 1px; margin: 2px 0 6px; }
.spn-sub.open { display: flex; }
/* Sub-pages only show while the rail is expanded; the collapsed rail stays icons-only. */
body.ui-new:not(.rail-pinned) .spn-rail:not(:hover) .spn-sub { display: none; }
body.ui-new:not(.rail-pinned) .spn-rail:has(:focus-visible) .spn-sub.open { display: flex; }
.spn-subitem {
  display: flex; align-items: center; width: 100%; min-height: 36px; padding: 0 12px 0 47px;
  border: 0; border-radius: 8px; background: transparent; text-align: left; white-space: nowrap;
  font: 500 13.5px/1.2 var(--font-body); color: var(--text-muted); cursor: pointer;
}
.spn-subitem:hover { background: var(--bg-tertiary); color: var(--text); }
.spn-subitem[aria-current="page"] { color: var(--text); background: var(--bg-tertiary); box-shadow: inset 3px 0 0 var(--accent); }
.spn-sep { height: 1px; background: var(--border); margin: 8px 6px; }

.spn-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.spn-status { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 13px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); font-size: 13px; }
.spn-status .spn-label small { display: block; color: var(--text-muted); font-size: 12px; }
.spn-status .plugin-dot { flex: 0 0 9px; }

/* ---------- Top bar ---------- */
.spn-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 28px 6px; }
.spn-top h1 { display: block; visibility: visible; opacity: 1; margin: 0; color: var(--text); font: 700 26px/1.15 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; }
.spn-top > div:first-child { min-width: 160px; }
.spn-top .spn-crumb { color: var(--text-muted); font-size: 14px; }
.spn-top .spn-spacer { flex: 1; }
.spn-top #themeSelect { min-height: 40px; width: auto; max-width: 220px; }
.spn-top .header-show-btn { min-height: 40px; }
/* Viewer control + mode in the top bar (v0.33.258): a switch and a menu,
   styled like the other top-bar controls (no pill badges). */
.spn-vc { display: inline-flex; align-items: center; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elevated); font-size: 14px; }
.spn-vc-switch { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; margin: 0; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 14px; cursor: pointer; border-radius: 10px 0 0 10px; }
/* The admin's general button styles (red fill, hover glow) don't apply here. */
.spn-vc .spn-vc-switch, .spn-vc .spn-vc-switch:hover, .spn-vc .spn-vc-switch:active, .spn-vc .spn-vc-switch:disabled { background: none !important; box-shadow: none !important; transform: none !important; border: 0 !important; min-height: 0; }
.spn-vc .spn-vc-switch:hover { color: var(--text); }
.spn-vc .spn-vc-switch:disabled { opacity: .6; cursor: progress; }
.spn-vc-knob { position: relative; width: 30px; height: 17px; border-radius: 9px; background: var(--border); transition: background .15s; flex: 0 0 auto; }
.spn-vc-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .15s; }
.spn-vc.is-on .spn-vc-knob { background: var(--status-success, #22c55e); }
.spn-vc.is-on .spn-vc-knob::after { transform: translateX(13px); }
.spn-vc.is-on .spn-vc-switch { color: var(--text); }
.spn-vc-sep { width: 1px; align-self: stretch; margin: 8px 0; background: var(--border); }
.spn-vc-mode { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 4px 0 12px; color: var(--text-muted); font-size: 14px; cursor: pointer; }
.spn-vc-mode select { width: auto; min-width: 0; margin: 0; padding: 0 22px 0 2px; height: 36px; border: 0; background-color: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: none; }
.spn-vc:not(.is-on) .spn-vc-mode select { color: var(--text-muted); font-weight: 400; }
/* The open list: Windows draws it with the select's (transparent) background
   and inherited text color, so set both on the options explicitly. */
.spn-vc-mode select option { background-color: var(--bg-elevated, #16213a); color: var(--text, #e6e9f0); font-weight: 400; }
.spn-vc-switch:focus-visible, .spn-vc-mode select:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 720px) { .spn-vc-label { display: none; } .spn-vc-state { display: none; } .spn-vc-switch { padding: 0 10px; } }
.spn-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elevated); font-size: 14px; }

.spn-notice { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 28px 0; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--accent); background: var(--accent-soft); }
.spn-notice p { margin: 0; flex: 1 1 360px; }

/* ---------- Restyle of the existing admin content ---------- */
/* Full width beside the rail (the classic 1600px centered cap made wide
   tables like Sequences overflow once the rail took its share). */
body.ui-new main { padding: 12px 28px 48px; max-width: none; margin: 0; }
body.ui-new h2 { font-family: var(--font-display); letter-spacing: -0.01em; }
body.ui-new h3 { font-family: var(--font-display); }
/* overflow-x: wide tables scroll inside their card instead of being cut off. */
body.ui-new .card { border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow-card); overflow-x: auto; }
body.ui-new button:not(.spn-item):not(.spn-subitem):not(.toggle-thumb) { border-radius: 10px; min-height: 40px; font-family: var(--font-body); font-weight: 600; }
body.ui-new input[type="text"], body.ui-new input[type="number"], body.ui-new input[type="password"],
body.ui-new input[type="url"], body.ui-new input[type="email"], body.ui-new select, body.ui-new textarea {
  border-radius: 9px; min-height: 40px; font-family: var(--font-body);
}
body.ui-new textarea { min-height: 80px; }
/* No overflow:hidden on tables: it clipped columns (e.g. Sequences' delete button). */
body.ui-new .stat-value, body.ui-new .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
body.ui-new :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- New dashboard (replaces the classic dashboard content) ---------- */
body.ui-new .tab-pane[data-pane="dashboard"] > :not(#spnDash):not(.dash-banner) { display: none !important; }
#spnDash { display: flex; flex-direction: column; gap: 20px; }
body:not(.ui-new) #spnDash { display: none; }
/* Viewer QR Code under the new dashboard (v0.33.278-master.4) */
body.ui-new .spn-qr { margin-top: 0; }
body.ui-new .spn-qr > .card { margin: 0; }
.spn-strip { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-elevated); box-shadow: var(--shadow-card); }
.spn-group { display: flex; align-items: center; gap: 12px; }
.spn-group > span { font-weight: 600; }
.spn-vsep { width: 1px; align-self: stretch; background: var(--border); }
.spn-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 0 14px 0 6px !important; border-radius: 999px !important; border: 1px solid var(--border); background: transparent; color: var(--text); }
.spn-toggle .t { display: flex; align-items: center; width: 44px; height: 26px; padding: 3px; border-radius: 999px; background: var(--status-neutral); justify-content: flex-start; }
.spn-toggle .t i { width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.spn-toggle[aria-pressed="true"] { border-color: var(--status-success); background: var(--status-success-soft); }
.spn-toggle[aria-pressed="true"] .t { background: var(--status-success); justify-content: flex-end; }
.spn-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-input); }
.spn-seg button { min-height: 36px !important; min-width: 88px; padding: 0 14px; border: 0; background: transparent; color: var(--text-muted); }
.spn-seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.spn-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.spn-actions button { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 0 16px; }
.spn-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; }
.spn-panel { border-radius: 18px; border: 1px solid var(--border); background: var(--bg-elevated); box-shadow: var(--shadow-card); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.spn-onair { gap: 18px; padding: 26px 28px; }
.spn-tally { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 5px 11px; border-radius: 6px; background: var(--status-danger-soft); font: 700 12px/1 var(--font-mono); letter-spacing: .12em; }
.spn-tally i { width: 8px; height: 8px; border-radius: 50%; background: var(--status-danger); animation: spn-onair 1.6s ease-in-out infinite; }
.spn-tally.off { background: var(--status-neutral-soft); }
.spn-tally.off i { background: var(--status-neutral); animation: none; }
@keyframes spn-onair { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.spn-title { margin: 0; font: 800 clamp(34px, 4.2vw, 56px)/1 var(--font-display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.spn-artist { font-size: 18px; color: var(--text-muted); }
.spn-track { height: 8px; border-radius: 999px; background: var(--bg-tertiary); overflow: hidden; }
.spn-fill { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width 1s linear; }
.spn-times { display: flex; justify-content: space-between; margin-top: 8px; font: 500 13px/1 var(--font-mono); color: var(--text-muted); }
.spn-next { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border); }
.spn-next b { font-weight: 600; font-size: 16px; }
.spn-pill { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--status-neutral-soft); font-size: 12px; font-weight: 600; }
.spn-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.spn-stat { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-elevated); }
.spn-stat .v { font: 700 34px/1 var(--font-mono); letter-spacing: -0.02em; }
.spn-stat small { color: var(--text-muted); font-size: 12px; }
.spn-panel h2 { margin: 0; font: 700 20px/1.2 var(--font-display); }
.spn-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.spn-bars { display: flex; flex-direction: column; gap: 12px; }
.spn-bar-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 56px; align-items: center; gap: 12px; }
.spn-bar-row .c { text-align: right; font: 700 15px/1 var(--font-mono); }
.spn-bar { height: 6px; margin-top: 6px; border-radius: 999px; background: var(--bg-tertiary); overflow: hidden; }
.spn-bar > div { height: 100%; border-radius: 999px; background: var(--border-hover); }
.spn-bar-row:first-child .spn-bar > div { background: var(--accent); }
.spn-q { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; min-height: 56px; border-bottom: 1px solid var(--border); }
.spn-q:last-child { border-bottom: 0; }
.spn-x { width: 44px; min-height: 44px !important; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: transparent; color: var(--text-muted); }
.spn-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; border-radius: 12px; border: 1px dashed var(--border-hover); background: var(--bg); }
.spn-top-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.spn-top-list li { display: flex; align-items: center; gap: 12px; min-height: 34px; }
.spn-top-list .n { width: 22px; color: var(--text-muted); font-family: var(--font-mono); }
.spn-top-list .p { margin-left: auto; color: var(--text-muted); font-family: var(--font-mono); }
.spn-muted { color: var(--text-muted); }

@media (max-width: 1100px) { .spn-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  body.ui-new main { padding: 10px 14px 40px; }
  .spn-top { padding: 14px 14px 4px; }
  .spn-notice { margin: 10px 14px 0; }
  .spn-actions { margin-left: 0; }
  .spn-vsep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .spn-rail, .spn-rail .spn-label, .spn-fill { transition: none !important; }
  .spn-tally i { animation: none; }
}

/* ---------- Phones and touch-only devices (v0.33.212+) ----------
   No hover here, so the hover-expand rail can't work (and its Settings
   sub-pages were unreachable). The rail becomes a slide-out menu opened
   from a button in the top bar; the page gets the full width. Desktop with
   a mouse is unchanged. ui-new.js decides (updateDrawerMode). */
.spn-menu-btn, .spn-backdrop { display: none; }
/* v0.33.247-beta.4: drawer styles hang off body.spn-drawer, set by ui-new.js
   (updateDrawerMode) instead of a media query — see the note there. */
body.ui-new.spn-drawer, body.ui-new.spn-drawer.rail-pinned { padding-left: 0; }
body.ui-new.spn-drawer .spn-rail,
body.ui-new.spn-drawer.rail-pinned .spn-rail {
  width: min(300px, 86vw);
  transform: translateX(-105%);
  transition: transform .22s ease;
  box-shadow: none;
  overflow-y: auto;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
body.ui-new.spn-drawer.spn-drawer-open .spn-rail { transform: none; box-shadow: 8px 0 32px rgba(0,0,0,.45); }
body.ui-new.spn-drawer .spn-rail .spn-label { opacity: 1; }
body.ui-new.spn-drawer .spn-rail .spn-sub { display: none; }
body.ui-new.spn-drawer .spn-rail .spn-sub.open { display: flex !important; }
body.ui-new.spn-drawer #spnPin { display: none; }
body.ui-new.spn-drawer .spn-item, body.ui-new.spn-drawer .spn-subitem { min-height: 48px; }
body.ui-new.spn-drawer .spn-backdrop { position: fixed; inset: 0; z-index: 899; background: rgba(0,0,0,.45); }
body.ui-new.spn-drawer:not(.spn-drawer-open) .spn-backdrop { display: none; }
body.ui-new.spn-drawer.spn-drawer-open .spn-backdrop { display: block; }
body.ui-new.spn-drawer.spn-drawer-open { overflow: hidden; }

body.ui-new.spn-drawer .spn-menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; min-height: 44px !important; padding: 0 !important; flex: 0 0 44px;
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text);
}
body.ui-new.spn-drawer .spn-top { padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 4px; gap: 10px; }
body.ui-new.spn-drawer .spn-top > div:first-of-type { min-width: 0; flex: 1 1 auto; }
body.ui-new.spn-drawer .spn-top h1 { font-size: 22px; overflow: hidden; text-overflow: ellipsis; }
body.ui-new.spn-drawer .spn-top .spn-spacer { display: none; }
body.ui-new.spn-drawer .spn-top .spn-chip, body.ui-new.spn-drawer .spn-top .header-show-btn, body.ui-new.spn-drawer .spn-top #themeSelect { min-height: 40px; }
body.ui-new.spn-drawer .spn-top #themeSelect { width: auto; max-width: min(46vw, 220px); }
body.ui-new.spn-drawer main { padding: 8px 12px 40px; }
body.ui-new.spn-drawer .spn-notice { margin: 8px 12px 0; }

/* Dashboard: stack the control strip, full-width mode buttons */
body.ui-new.spn-drawer .spn-strip { flex-direction: column; align-items: stretch; gap: 14px; }
body.ui-new.spn-drawer .spn-group { justify-content: space-between; flex-wrap: wrap; }
body.ui-new.spn-drawer .spn-vsep { display: none; }
body.ui-new.spn-drawer .spn-seg { flex: 1 1 100%; }
body.ui-new.spn-drawer .spn-seg button { flex: 1 1 0; min-width: 0; padding: 0 6px; }
body.ui-new.spn-drawer .spn-actions { margin-left: 0; }
body.ui-new.spn-drawer .spn-actions button { flex: 1 1 0; }
body.ui-new.spn-drawer .spn-onair { padding: 20px; }
body.ui-new.spn-drawer .spn-panel { padding: 18px; }
body.ui-new.spn-drawer .spn-stat { padding: 14px; }
body.ui-new.spn-drawer .spn-stat .v { font-size: 28px; }
/* In the drawer, hover must not resize the rail: the desktop :hover width
   (248px) beat the drawer width (300px), so a pointer near the drawer's
   edge made it shrink, un-hover, grow, re-hover — rapid flashing. */
body.ui-new.spn-drawer .spn-rail:hover,
body.ui-new.spn-drawer .spn-rail:has(:focus-visible) { width: min(300px, 86vw); overflow-y: hidden; box-shadow: none; }
body.ui-new.spn-drawer.spn-drawer-open .spn-rail:hover { box-shadow: 8px 0 32px rgba(0,0,0,.45); }
@media (prefers-reduced-motion: reduce) { body.ui-new.spn-drawer .spn-rail { transition: none; } }

/* Unread visitor messages on the rail (v0.33.250+): a dot on the icon when
   the rail is collapsed, a count pill next to the label when expanded. */
.spn-item[data-unread] { position: relative; }
.spn-item[data-unread]::after { content: attr(data-unread); position: absolute; top: 4px; left: 26px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-text, #fff); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; pointer-events: none; }

/* "Coming soon" style tag on a sub-page label (data-tag on .sub-tab). */
.spn-subitem .sp-soon-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 0.68em; font-weight: 600; letter-spacing: 0.02em; background: var(--accent-soft, rgba(245, 158, 11, 0.18)); color: var(--accent-text, #f59e0b); vertical-align: 1px; }
