/*
 * Office TV settings (/admin/tv) and the login form, in the screen's bento look
 * (src/dashboard/tv_screen/tv.css): a warm grey canvas, white tiles, one orange hero,
 * Manrope for text and numbers, Old Standard only in titles. Fonts and the logo are the
 * screen's own files (mounted under /static in main.py), nothing from a CDN.
 * Light/dark follows the system; the header button pins one (data-theme on <html>).
 */

@font-face { font-family: 'Manrope'; src: url('/static/fonts/Manrope-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/static/fonts/Manrope-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/static/fonts/Manrope-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/static/fonts/Manrope-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Old Standard TT'; src: url('/static/fonts/OldStandardTT-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Old Standard TT'; src: url('/static/fonts/OldStandardTT-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --canvas: #ece9e5;
  --card: #ffffff;
  --well: #f5f2ee;
  --well-strong: #ebe6e0;
  --ink-card: #141210;
  --ink-well: #2a2623;
  --ink-fg: #ffffff;
  --ink-muted: #a5a09a;
  --tab-on: #141210;
  --tab-on-fg: #ffffff;
  --foreground: #0a0a0a;
  --muted: #6b655f;
  --border: #ece7e1;
  --border-strong: #d6d1cb;
  --brand: #fe6d2c;
  --brand-ink: #c4450a;
  --brand-tint: #fff1e9;
  --on-brand: #0a0a0a;
  --ok: #15803d;
  --ok-tint: #e7f6ec;
  --warn: #b45309;
  --warn-tint: #fdf3e2;
  --alert: #d92d20;
  --alert-tint: #fdecea;
  --shadow: 0 1px 2px rgba(20, 18, 16, 0.04);
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Old Standard TT', Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 28px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #090909; --card: #161412; --well: #211e1b; --well-strong: #2b2724;
    --ink-card: #2b2622; --ink-well: #3a342f; --ink-fg: #f4f2ef; --ink-muted: #a5a09a;
    --tab-on: #f4f2ef; --tab-on-fg: #0a0a0a; --foreground: #f4f2ef; --muted: #9a948e;
    --border: #26221f; --border-strong: #3a3733; --brand-ink: #ff8a52; --brand-tint: rgba(254, 109, 44, 0.16);
    --ok: #4ade80; --ok-tint: rgba(74, 222, 128, 0.12); --warn: #fbbf24; --warn-tint: rgba(251, 191, 36, 0.12);
    --alert: #f87171; --alert-tint: rgba(248, 113, 113, 0.12); --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #090909; --card: #161412; --well: #211e1b; --well-strong: #2b2724;
  --ink-card: #2b2622; --ink-well: #3a342f; --ink-fg: #f4f2ef; --ink-muted: #a5a09a;
  --tab-on: #f4f2ef; --tab-on-fg: #0a0a0a; --foreground: #f4f2ef; --muted: #9a948e;
  --border: #26221f; --border-strong: #3a3733; --brand-ink: #ff8a52; --brand-tint: rgba(254, 109, 44, 0.16);
  --ok: #4ade80; --ok-tint: rgba(74, 222, 128, 0.12); --warn: #fbbf24; --warn-tint: rgba(251, 191, 36, 0.12);
  --alert: #f87171; --alert-tint: rgba(248, 113, 113, 0.12); --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.82em; color: var(--muted); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ header: three pills */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px;
  background: linear-gradient(var(--canvas) 70%, transparent);
}
.pill { background: var(--card); border-radius: 999px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 12px; height: 56px; padding: 8px 22px 8px 8px; text-decoration: none; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 21px; }
.brand-sub { font-size: 12px; font-weight: 600; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 2px; height: 56px; padding: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  display: flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav-item:hover { color: var(--foreground); background: var(--well); }
.nav-item.on { background: var(--tab-on); color: var(--tab-on-fg); }
.top-actions { display: flex; align-items: center; gap: 4px; height: 56px; padding: 6px; flex-shrink: 0; }
.top-actions form { margin: 0; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ------------------------------------------------------------------ page */
.wrap { max-width: 1240px; margin: 0 auto; padding: 8px 24px 140px; display: flex; flex-direction: column; gap: 20px; }
.page-title, .sec-title { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
.page-title { font-size: 44px; line-height: 1.05; margin: 8px 0 4px; }
.sec-title { font-size: 30px; line-height: 1.1; margin: 22px 0 0; }
.page-title em, .sec-title em { font-style: normal; color: var(--brand-ink); }
.anchor { position: absolute; top: -96px; }

.bento { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

.tile {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px 24px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: tile-in 0.5s var(--ease) both;
}
.bento > .tile:nth-of-type(2) { animation-delay: 0.05s; }
.bento > .tile:nth-of-type(3) { animation-delay: 0.1s; }
.bento > .tile:nth-of-type(4) { animation-delay: 0.15s; }
@keyframes tile-in { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tile { animation: none; } html { scroll-behavior: auto; } }

.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tile-title { font-size: 17px; font-weight: 700; }
.tile-ico {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 999px; background: var(--well); color: var(--brand-ink); text-decoration: none;
}
.tile.stack { gap: 22px; }
.muted { color: var(--muted); font-size: 13px; }
.num { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.num-l { font-size: 52px; }
.big-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.big-unit { font-size: 16px; font-weight: 600; color: var(--muted); }

/* hero: the screen's state */
.hero { background: var(--brand); color: var(--on-brand); }
.hero .k, .hero .hero-note { color: rgba(10, 10, 10, 0.62); }
.hero code { color: rgba(10, 10, 10, 0.75); background: rgba(255, 255, 255, 0.35); padding: 1px 6px; border-radius: 6px; }
.hero-state { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.hero-meta { display: flex; flex-direction: column; gap: 4px; font-size: 14px; margin-top: auto; }
.dot { width: 16px; height: 16px; border-radius: 999px; background: rgba(10, 10, 10, 0.25); flex-shrink: 0; }
.dot.ok { background: #0a0a0a; box-shadow: 0 0 0 0 rgba(10, 10, 10, 0.4); animation: pulse 2.4s var(--ease) infinite; }
.dot.warn { background: #fff; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(10, 10, 10, 0.35); } 70% { box-shadow: 0 0 0 12px rgba(10, 10, 10, 0); } 100% { box-shadow: 0 0 0 0 rgba(10, 10, 10, 0); } }

.ov-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ov-list li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ov-list li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ink tile: the screen link */
.ink { background: var(--ink-card); color: var(--ink-fg); }
.ink-muted { color: var(--ink-muted); }
.token-tile { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.token-main { display: flex; flex-direction: column; gap: 4px; }
.token-state { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; font-size: 15px; font-weight: 600; }
.token-state .ink-muted { font-size: 13px; font-weight: 500; }
.token-act { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; max-width: 620px; }
.small-note { font-size: 12.5px; line-height: 1.4; margin: 0; }
.token-once { flex-basis: 100%; padding: 16px; border-radius: 18px; background: var(--ink-well); }
.token-once p { margin: 0 0 10px; font-size: 14px; }
.token-once .small-note { margin: 10px 0 0; color: var(--ink-muted); }
.token-row { display: flex; gap: 8px; }
.token-once .tv-input { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--ink-card); color: var(--ink-fg); }
.ink .alert { flex-basis: 100%; }

/* ------------------------------------------------------------------ forms */
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.form-note { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0; }
.tv-input, .tv-select {
  width: 100%; height: 46px; padding: 0 16px;
  background: var(--well); color: var(--foreground);
  border: 1.5px solid transparent; border-radius: 14px;
  font: 600 16px/1 var(--font-sans); font-variant-numeric: tabular-nums;
  outline: none; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.tv-input::placeholder { color: var(--muted); font-weight: 500; }
.tv-input:hover, .tv-select:hover { background: var(--well-strong); }
.tv-input:focus, .tv-select:focus { border-color: var(--brand); background: var(--card); box-shadow: 0 0 0 4px var(--brand-tint); }
.tv-input.invalid { border-color: var(--alert); background: var(--alert-tint); }
.tv-select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 36px; font-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23878079' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.tv-select option { background: var(--card); color: var(--foreground); }

.seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 4px; background: var(--well); border-radius: 999px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s; }
.seg input:checked + span { background: var(--tab-on); color: var(--tab-on-fg); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* iOS-like toggle on a plain checkbox */
.toggle {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; margin: 0; cursor: pointer;
  position: relative; width: 46px; height: 28px; border-radius: 999px;
  background: var(--border-strong); transition: background 0.25s var(--ease);
}
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.25s var(--ease);
}
.toggle:checked { background: var(--brand); }
.toggle:checked::after { transform: translateX(18px); }
.toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch strong { display: block; font-size: 15px; font-weight: 700; }
.switch small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* ------------------------------------------------------------------ slides */
.slide-list { display: flex; flex-direction: column; gap: 6px; }
.slide-row {
  display: grid; grid-template-columns: auto 30px 1fr auto auto; align-items: center; gap: 14px;
  padding: 10px 12px 10px 14px; border-radius: 18px; background: var(--well);
  transition: opacity 0.2s, background 0.2s;
}
.slide-row:hover { background: var(--well-strong); }
.slide-row.off { opacity: 0.5; }
.slide-num { font-weight: 700; font-size: 14px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.slide-row:not(.off) .slide-num { color: var(--brand-ink); }
.slide-name { font-size: 15px; font-weight: 700; }
.slide-desc { font-size: 12.5px; color: var(--muted); margin-top: 1px; line-height: 1.4; }
.slide-dur { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.slide-dur .tv-input { width: 72px; height: 38px; padding: 0 10px; text-align: right; background: var(--card); font-size: 15px; }
.slide-move { display: flex; gap: 4px; }
.slide-row.moved { animation: flash 0.6s var(--ease); }
@keyframes flash { from { background: var(--brand-tint); } to { background: var(--well); } }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: none; cursor: pointer;
  font: 700 14px/1 var(--font-sans); background: var(--well); color: var(--foreground);
  white-space: nowrap; transition: background 0.2s, transform 0.15s var(--ease), opacity 0.2s;
}
.btn:hover:not(:disabled) { background: var(--well-strong); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn.small { height: 36px; padding: 0 14px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--well); color: var(--foreground); }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover:not(:disabled) { background: #ff7f45; }
.btn.danger { background: var(--alert); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #c0261a; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 999px; border: none; cursor: pointer; background: var(--card); color: var(--foreground);
  font-size: 12px; transition: background 0.2s, opacity 0.2s;
}
.icon-btn:hover:not(:disabled) { background: var(--brand-tint); color: var(--brand-ink); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn.ghost { width: 44px; height: 44px; background: transparent; color: var(--muted); }
.icon-btn.ghost:hover { background: var(--well); color: var(--foreground); }

/* ------------------------------------------------------------------ chips and picker */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; border-radius: 999px;
  background: var(--well); font-size: 13.5px; font-weight: 600; animation: chip-in 0.3s var(--ease) both;
}
@keyframes chip-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.chip button {
  width: 24px; height: 24px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--card); color: var(--muted); font-size: 14px; line-height: 1;
}
.chip button:hover { color: var(--alert); background: var(--alert-tint); }
.chips-empty { font-size: 13px; color: var(--muted); }
.alias-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.alias-add .btn { grid-column: 1 / -1; justify-self: start; }
.person-add { display: grid; grid-template-columns: minmax(0, 420px) auto; gap: 8px; justify-content: start; }
.picker { position: relative; }
.picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  max-height: 280px; overflow-y: auto; padding: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 18px 48px rgba(20, 18, 16, 0.18);
}
.picker-list button {
  display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 10px 12px;
  background: none; border: none; border-radius: 12px; text-align: left; cursor: pointer;
  color: var(--foreground); font: 600 14px/1.3 var(--font-sans);
}
.picker-list button:hover, .picker-list button:focus { background: var(--well); outline: none; }
.picker-list small { color: var(--muted); white-space: nowrap; }
.picker-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ tables, badges */
.table-wrap { overflow-x: auto; margin: 0 -8px; }
.tv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tv-table th {
  padding: 8px; text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border);
}
.tv-table td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tv-table tr:last-child td { border-bottom: none; }
.tv-table tbody tr { transition: background 0.15s; }
.tv-table tbody tr:hover { background: var(--well); }
.tv-table .muted { font-size: 12.5px; }
.tv-table .tv-select { height: 38px; font-size: 13.5px; min-width: 150px; }
.src-name { font-weight: 700; }

.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--well); color: var(--muted);
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.badge-ok { background: var(--ok-tint); color: var(--ok); }
.badge-warn { background: var(--warn-tint); color: var(--warn); }
.badge-err { background: var(--alert-tint); color: var(--alert); }
.badge-skip { background: var(--well); color: var(--muted); }
.hero .badge-warn { background: rgba(10, 10, 10, 0.85); color: #fff; }
.err-text { margin-top: 4px; font-size: 12px; color: var(--alert); max-width: 360px; }

/* ------------------------------------------------------------------ alerts, save bar */
.alert { display: none; padding: 12px 16px; border-radius: 16px; font-size: 14px; font-weight: 600; line-height: 1.5; white-space: pre-line; }
.alert.error { display: block; background: var(--alert-tint); color: var(--alert); }
.alert.info { display: block; background: var(--well); color: var(--muted); font-weight: 500; }
.alert-row { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
#stagesBody > .form-note { margin: 10px 0; }

.save-bar {
  position: fixed; left: 50%; bottom: 20px; z-index: 60;
  display: flex; align-items: center; gap: 18px;
  width: max-content; max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 24px; border-radius: 999px;
  background: var(--tab-on); color: var(--tab-on-fg);
  box-shadow: 0 16px 40px rgba(10, 10, 10, 0.25);
  transform: translateX(-50%);
  transition: transform 0.35s var(--ease);
}
.save-bar.dirty { transform: translateX(-50%) translateY(-4px); }
.save-state { font-size: 14px; font-weight: 600; opacity: 0.75; }
.save-state.dirty { opacity: 1; }
.save-state.dirty::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 999px; background: var(--brand); vertical-align: 1px; }
.save-state.error { opacity: 1; color: #ff9a8f; }
.save-bar .btn.primary:disabled { opacity: 1; background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; filter: opacity(0.45); }

.loading-note { text-align: center; color: var(--muted); padding: 48px 0; }

/* ------------------------------------------------------------------ login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; padding: 32px 28px; gap: 18px; }
.login-card .brand-logo { width: 56px; height: 56px; }
.login-card h1 { font-family: var(--font-display); font-weight: 400; font-size: 34px; margin: 0; line-height: 1.1; }
.login-card h1 em { font-style: normal; color: var(--brand-ink); }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.login-card .btn { width: 100%; height: 48px; }
.login-card [role=alert] { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--alert-tint); color: var(--alert); font-size: 14px; font-weight: 600; }

/* ------------------------------------------------------------------ narrow screens */
@media (max-width: 1000px) {
  .span-3, .span-4, .span-5, .span-7, .span-8 { grid-column: span 6; }
  .bento > .hero { grid-column: span 12; }
}
@media (max-width: 860px) {
  .top { flex-wrap: wrap; padding: 10px 16px; }
  .nav { order: 3; width: 100%; }
  .brand-sub { display: none; }
}
@media (max-width: 700px) {
  .wrap { padding: 4px 16px 140px; }
  .bento { gap: 12px; }
  .bento > * { grid-column: span 12 !important; }
  .page-title { font-size: 34px; }
  .sec-title { font-size: 26px; }
  .tile { padding: 18px; border-radius: 22px; }
  .num-l { font-size: 42px; }
  .slide-row { grid-template-columns: auto 1fr auto; gap: 10px; }
  .slide-num { display: none; }
  .slide-dur { grid-column: 2; }
  .slide-move { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; }
  .alias-add, .person-add, .form-row { grid-template-columns: 1fr; }
  .token-row { flex-direction: column; }
  .save-bar { left: 16px; right: 16px; bottom: 12px; width: auto; transform: none; justify-content: space-between; padding-left: 18px; }
  .save-bar.dirty { transform: translateY(-4px); }
  .save-state { font-size: 13px; }
}
