/* Hueman Pixels Ticker — interface styles
   Tokens: graphite (brand) · ink · canvas · coral (live / attention only) */
:root {
  --graphite: #3a3a3a;
  --graphite-hi: #464646;
  --graphite-lo: #2f2f2f;
  --ink: #17171a;
  --ink-2: #3f3f46;
  --muted: #6f6f76;
  --faint: #a2a2a8;
  --canvas: #f1f1ef;
  --panel: #ffffff;
  --sunken: #f7f7f6;
  --line: #e2e2df;
  --line-2: #d2d2ce;
  --coral: #d4533f;
  --coral-ink: #a8402f;
  --coral-tint: #fbece8;
  --ok: #2f7d55;
  --ok-tint: #e7f3ec;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow-1: 0 1px 2px rgba(23, 23, 26, .05);
  --shadow-2: 0 1px 2px rgba(23, 23, 26, .04), 0 10px 30px -14px rgba(23, 23, 26, .18);
  --shadow-3: 0 2px 6px rgba(23, 23, 26, .06), 0 30px 80px -20px rgba(23, 23, 26, .35);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --pixel: "Silkscreen", var(--mono);
  --focus: 0 0 0 3px rgba(212, 83, 63, .28);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--canvas); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .92em; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.eyebrow { margin: 0; font: 10px/1 var(--pixel); text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .55); }
.eyebrow.dark { color: var(--muted); }
.lede { margin: 6px 0 0; color: var(--muted); max-width: 52ch; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sm { font-size: 12.5px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 500; font-size: 13px; letter-spacing: -.005em; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.block { width: 100%; height: 40px; }
.btn.primary { background: var(--graphite); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.18); }
.btn.primary:hover { background: var(--graphite-lo); }
.btn.secondary { background: var(--panel); border-color: var(--line-2); color: var(--ink); box-shadow: var(--shadow-1); }
.btn.secondary:hover { border-color: var(--faint); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(23, 23, 26, .05); }
.btn.danger { color: var(--coral-ink); }
.btn.danger:hover { background: var(--coral-tint); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 15px; height: 15px; flex: none; }

.field { display: block; }
.field > span { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.field + .field { margin-top: 14px; }
.input, .field input:not([type=checkbox]):not([type=range]):not([type=color]), .field select, .search input {
  width: 100%; height: 36px; padding: 0 11px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  outline: none; transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow-1);
}
.field input:focus, .field select:focus, .search input:focus { border-color: var(--coral); box-shadow: var(--focus); }
.field select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236f6f76' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
input[type=range] { width: 100%; accent-color: var(--graphite); }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: rgba(23, 23, 26, .055); border-radius: 8px; }
.seg button { height: 28px; padding: 0 12px; border: 0; background: none; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.03); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

.check { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check + .check { border-top: 1px solid var(--line); }
.switch { position: relative; width: 30px; height: 18px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--graphite); }
.switch input:checked + i::after { transform: translateX(12px); }
.switch input:focus-visible + i { box-shadow: var(--focus); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 500; background: var(--sunken); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; background: currentColor; } /* square, like a pixel */
.pill.live { color: var(--coral-ink); background: var(--coral-tint); border-color: rgba(212, 83, 63, .2); }
.pill.live::before { background: var(--coral); animation: tick 1s steps(1) infinite; }
.pill.evergreen { color: var(--ink-2); background: var(--panel); }
.pill.ended { color: var(--faint); }
@keyframes tick { 50% { opacity: .25; } }

.alert { margin: 16px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--coral-tint); color: var(--coral-ink); font-size: 13px; border: 1px solid rgba(212, 83, 63, .2); }

/* ---------- auth ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); min-height: 100vh; }
.auth-stage {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 44px; color: #fff; overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--graphite);
}
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.01em; }
.auth-brand .mark { width: 22px; height: 26px; fill: #fff; }
.matrix-wrap { max-width: 620px; }
.matrix { --px: clamp(9px, 1.2vw, 16px); display: flex; align-items: flex-start; gap: calc(var(--px) * 1.45); margin: 22px 0 28px; }
.glyph { display: grid; grid-template-columns: repeat(3, var(--px)); grid-auto-rows: var(--px); gap: calc(var(--px) * .2); }
.glyph.colon { grid-template-columns: var(--px); margin: 0 calc(var(--px) * -.35); }
.glyph i { background: rgba(255, 255, 255, .045); }
.glyph i.on { transition: background .12s; }
.glyph i.on { background: #fff; }
.glyph.secs i.on { background: var(--coral); }
.glyph.colon i.on { background: rgba(255, 255, 255, .6); animation: tick 1s steps(1) infinite; }
.glyph.colon i:not(.on) { background: transparent; }
.matrix-caption { margin: 0; max-width: 40ch; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .7); }
.auth-foot { margin: 0; font: 10px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .35); }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--panel); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { margin-top: 12px; font-size: 26px; }
.auth-form { margin-top: 26px; }
.auth-form .btn { margin-top: 20px; }
.recover { margin-top: 22px; font-size: 12.5px; color: var(--muted); }
.recover summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.recover p { margin: 8px 0 0; line-height: 1.6; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-stage { min-height: 300px; padding: 28px 24px; }
}

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--graphite); color: rgba(255, 255, 255, .78); padding: 18px 12px; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 22px; text-decoration: none; color: #fff; }
.side-brand .mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.side-brand .mark svg { width: 13px; height: 16px; fill: #fff; }
.side-brand b { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.side-brand small { display: block; font: 9.5px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .45); margin-top: 3px; }
.side-label { padding: 14px 10px 6px; font: 9.5px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .38); }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-nav button {
  position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: var(--r-sm);
  background: none; color: inherit; text-decoration: none; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; width: 100%;
}
.side-nav a:hover, .side-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.on { background: rgba(255, 255, 255, .1); color: #fff; }
.side-nav a.on::before { content: ""; position: absolute; left: -12px; top: 13px; width: 4px; height: 8px; background: var(--coral); }
.side-nav svg { width: 16px; height: 16px; opacity: .8; flex: none; }
.side-nav .count { margin-left: auto; font: 11px var(--mono); color: rgba(255, 255, 255, .45); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-status { display: flex; align-items: center; gap: 8px; padding: 10px 10px 4px; font-size: 11.5px; color: rgba(255, 255, 255, .45); }
.side-status i { width: 6px; height: 6px; background: #7fd1a0; }

.main { min-width: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: 34px 36px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.loading { padding: 80px 0; text-align: center; color: var(--faint); }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); margin-bottom: 18px; }
.stat { padding: 14px 18px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dt { font-size: 12px; color: var(--muted); }
.stat dd { margin: 4px 0 0; font: 500 22px/1.1 var(--mono); letter-spacing: -.02em; color: var(--ink); }

/* toolbar + table */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.search { position: relative; flex: 1; max-width: 320px; }
.search input { padding-left: 32px; height: 34px; }
.search svg { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.table-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.timers { width: 100%; border-collapse: collapse; }
.timers th { text-align: left; font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 10px 14px; background: var(--sunken); border-bottom: 1px solid var(--line); white-space: nowrap; }
.timers td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.timers tr:last-child td { border-bottom: 0; }
.timers tbody tr { cursor: pointer; transition: background .12s; }
.timers tbody tr:hover { background: #fafaf9; }
.t-thumb { width: 132px; height: 46px; border-radius: 6px; display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.t-thumb img { max-width: 92%; max-height: 80%; }
.t-name { font-weight: 600; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.t-id { display: block; font: 11.5px var(--mono); color: var(--faint); margin-top: 2px; }
.t-when { color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.t-when small { display: block; color: var(--muted); font-size: 12px; }
.t-opens { font: 13px var(--mono); color: var(--ink); white-space: nowrap; }
.t-opens small { display: block; font: 11.5px var(--sans); color: var(--muted); }
.t-actions { text-align: right; white-space: nowrap; }
.t-actions .btn { opacity: 0; }
.timers tr:hover .t-actions .btn, .timers tr:focus-within .t-actions .btn { opacity: 1; }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.spark i { width: 4px; background: var(--graphite); opacity: .75; min-height: 2px; }
.spark i.zero { background: var(--line-2); opacity: 1; }
.empty-row td { padding: 56px 20px; text-align: center; color: var(--muted); cursor: default; }

.empty { display: grid; justify-items: center; text-align: center; padding: 72px 24px; background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty h2 { margin-top: 18px; font-size: 17px; }
.empty p { margin: 6px 0 20px; max-width: 42ch; }
.empty .mini-matrix { display: flex; gap: 6px; }
.empty .mini-matrix .glyph { --px: 7px; }
.empty .mini-matrix .glyph i { background: var(--line); }
.empty .mini-matrix .glyph i.on { background: var(--graphite); }

.section-title { display: flex; align-items: baseline; gap: 10px; margin: 36px 0 10px; }
.trash-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.trash-list li { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 16px; }
.trash-list li + li { border-top: 1px solid var(--line); }
.trash-list b { font-weight: 500; }
.trash-list .btn { margin-left: auto; }

/* ---------- editor ---------- */
.editor { display: flex; flex-direction: column; height: 100vh; }
.ed-bar { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 20px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--ink); }
.crumb .sep { color: var(--faint); }
.name-input { min-width: 0; width: 320px; height: 32px; padding: 0 8px; margin-left: -8px; border: 1px solid transparent; border-radius: var(--r-sm); background: none; font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); outline: none; }
.name-input:hover { border-color: var(--line); }
.name-input:focus { border-color: var(--coral); box-shadow: var(--focus); }
.ed-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.save-state { white-space: nowrap; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.save-state::before { content: ""; width: 6px; height: 6px; background: var(--faint); }
.save-state.dirty::before { background: var(--coral); }
.save-state.saved::before { background: var(--ok); }
.save-state.error { color: var(--coral-ink); }
.save-state.error::before { background: var(--coral); }

.ed-body { flex: 1; display: grid; grid-template-columns: 372px minmax(0, 1fr); min-height: 0; }
.inspector { background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; }
.group { border-bottom: 1px solid var(--line); }
.group > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 20px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); user-select: none; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary .meta { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(45deg); margin: -3px 2px 0 0; transition: transform .15s; }
.group[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.group-body { padding: 2px 20px 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .field + .field { margin-top: 0; }

.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.preset:hover { border-color: var(--line-2); }
.preset.on { border-color: var(--graphite); box-shadow: 0 0 0 1px var(--graphite); }
.preset i { display: block; height: 30px; }
.preset em { display: block; padding: 5px 0; font: 500 10.5px var(--sans); font-style: normal; color: var(--muted); text-transform: capitalize; border-top: 1px solid var(--line); }

.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.swatch { display: grid; gap: 6px; justify-items: center; font-size: 11px; color: var(--muted); cursor: pointer; }
.swatch input { appearance: none; -webkit-appearance: none; width: 100%; height: 36px; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: none; cursor: pointer; box-shadow: var(--shadow-1); }
.swatch input::-webkit-color-swatch-wrapper { padding: 3px; }
.swatch input::-webkit-color-swatch { border: 0; border-radius: 5px; }
.swatch input::-moz-color-swatch { border: 0; border-radius: 5px; }

.font-trigger { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--panel); box-shadow: var(--shadow-1); cursor: pointer; text-align: left; }
.font-trigger:hover { border-color: var(--faint); }
.font-trigger .sample { width: 64px; height: 40px; display: grid; place-items: center; border-radius: 5px; background: var(--sunken); font-size: 22px; line-height: 1; color: var(--ink); }
.font-trigger b { display: block; font-size: 13px; font-weight: 600; }
.font-trigger small { display: block; font-size: 12px; color: var(--muted); }
.font-trigger .chev { margin-left: auto; color: var(--faint); font-size: 12px; }

.units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.unit { display: grid; gap: 6px; }
.unit-toggle { display: flex; align-items: center; justify-content: center; height: 30px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer; user-select: none; background: var(--panel); }
.unit-toggle input { display: none; }
.unit-toggle:has(input:checked) { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.unit input[data-label] { height: 30px; padding: 0 8px; font-size: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--sunken); outline: none; width: 100%; }
.unit input[data-label]:focus { border-color: var(--coral); box-shadow: var(--focus); background: var(--panel); }

.canvas { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.canvas-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; flex: none; }
.canvas-meta { font: 12px var(--mono); color: var(--muted); }
.stage { flex: 1; overflow: auto; display: grid; place-items: center; padding: 28px 28px 36px; transition: background .25s; }
.stage.light { background: radial-gradient(circle at 50% 0%, #fafaf9, var(--canvas) 70%); }
.stage.dark { background: #1f1f22; }
.stage.mobile .mail { max-width: 390px; }
.mail { width: 100%; max-width: 640px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-3); overflow: hidden; transition: max-width .3s ease, background .25s; }
.stage.dark .mail { background: #2b2b2f; }
.mail header { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 12px; color: #74747a; }
.stage.dark .mail header { border-color: rgba(255,255,255,.07); }
.mail header i { width: 28px; height: 28px; border-radius: 50%; background: #e4e4e1; }
.mail header strong { display: block; color: #1d1d20; font-size: 13px; }
.stage.dark .mail header strong { color: #eee; }
.mail-body { padding: 32px 40px 36px; text-align: center; }
.mail-body h2 { font-size: 22px; letter-spacing: -.02em; color: #141416; }
.stage.dark .mail-body h2 { color: #f3f3f3; }
.mail-body p { margin: 6px 0 22px; color: #74747a; }
.slot { min-height: 110px; display: grid; place-items: center; }
.slot img { display: block; max-width: 100%; height: auto; }
.skeleton { max-width: 100%; border-radius: 8px; background: linear-gradient(90deg, rgba(0,0,0,.04), rgba(0,0,0,.08), rgba(0,0,0,.04)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.cta { display: inline-block; margin-top: 24px; padding: 12px 24px; border-radius: 8px; background: #141416; color: #fff; font-size: 13px; font-weight: 600; }
.form-error { color: var(--coral-ink); font-size: 13px; }

.embed { flex: none; background: var(--panel); border-top: 1px solid var(--line); padding: 14px 20px 16px; }
.embed-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.embed-head h2 { font-size: 13px; }
.embed-note { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 200px; }
.embed-note.warn { color: var(--coral-ink); }
.embed pre { margin: 0; padding: 12px 14px; max-height: 92px; overflow: auto; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); font: 12px/1.6 var(--mono); color: var(--ink-2); white-space: pre-wrap; word-break: break-all; }
.embed-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.field.inline { margin-bottom: 10px; max-width: 440px; }
.wp-steps { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.wp-steps b { color: var(--ink); font-weight: 600; }
.wp-steps a { color: var(--ink); }

/* ---------- font picker ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(23, 23, 26, .36); backdrop-filter: blur(2px); animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(880px, 100%); max-height: min(720px, calc(100vh - 48px)); display: flex; flex-direction: column; background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; animation: rise .2s ease; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 15px; }
.sheet-head .seg { margin-left: auto; }
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 16px 20px 20px; overflow-y: auto; }
.font-tile { display: grid; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; }
.font-tile:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.font-tile.on { border-color: var(--graphite); box-shadow: 0 0 0 1px var(--graphite); }
.font-tile .digits { height: 76px; display: grid; place-items: center; border-radius: 7px; background: var(--graphite); color: #fff; font-size: 40px; line-height: 1; letter-spacing: .01em; overflow: hidden; }
.font-tile b { font-size: 13px; font-weight: 600; }
.font-tile small { display: block; font-size: 11.5px; color: var(--muted); }
.font-tile .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--r); background: var(--graphite); color: #fff; font-size: 13px; box-shadow: var(--shadow-3); transform: translate(-50%, 16px); opacity: 0; transition: all .2s; pointer-events: none; }
.toast::before { content: ""; width: 6px; height: 6px; background: #7fd1a0; }
.toast.error::before { background: var(--coral); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .col-updated { display: none; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; }
  .side-brand { padding: 0; }
  .side-label, .side-status, .side-nav .count { display: none; }
  .side-brand > span:last-child { display: none; }
  .side-nav { display: flex; margin-left: auto; }
  .side-nav a, .side-nav button { width: auto; padding: 0 9px; font-size: 0; gap: 0; }
  .side-nav a svg, .side-nav button svg { width: 18px; height: 18px; }
  .side-nav a.on::before { display: none; }
  .side-foot { margin: 0 0 0 4px; padding: 0; border: 0; }
  .page { padding: 22px 16px 56px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .head-actions { justify-content: flex-start; }
  .col-type, .col-opens { display: none; }
  .toolbar { flex-wrap: wrap; }
  .search { max-width: none; flex-basis: 100%; }
  .toolbar .seg { max-width: 100%; overflow-x: auto; }
  .table-card { overflow-x: auto; }
  .timers th:first-child, .timers td:first-child { display: none; }
  .t-name { display: inline-block; min-width: 130px; }
  .t-actions .btn { padding: 0 8px; }
  .t-thumb { width: 96px; height: 38px; }
  .editor { height: auto; }
  .ed-body { grid-template-columns: 1fr; }
  .inspector { border-right: 0; border-bottom: 1px solid var(--line); }
  .name-input { width: 100%; }
  .crumb a, .crumb .sep { display: none; }
  .mail-body { padding: 24px 16px; }
  .t-actions .btn { opacity: 1; }
}

/* ---------- blocks ---------- */
.pill.progress { color: var(--ink-2); background: var(--panel); }
.pill.progress::before { background: var(--graphite); }
.pill.complete { color: var(--ok); background: var(--ok-tint); border-color: rgba(47, 125, 85, .2); }
.chooser { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; max-width: 760px; }
.choice { display: grid; gap: 8px; padding: 12px 12px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s, transform .15s; }
.choice:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.choice b { margin: 8px 6px 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.choice > span.muted { margin: 0 6px; }
.choice-art { height: 128px; border-radius: 9px; display: grid; place-items: center; }
.choice-art .mini-matrix { display: flex; gap: 6px; }
.choice-art .mini-matrix .glyph { --px: 8px; }
.choice-art .mini-matrix .glyph i { background: rgba(255,255,255,.07); }
.choice-art .mini-matrix .glyph i.on { background: #fff; }
.choice-bar { position: relative; width: 72%; height: 12px; }
.choice-bar i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 99px; }

/* Phones: the save state shrinks to its status dot so the block name stays readable. */
@media (max-width: 600px) {
  .save-state:not(.error) { font-size: 0; gap: 0; }
}

/* ---------- live data sources (progress) ---------- */
.sub-label { display: block; margin: 16px 0 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.live-box { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.live-box[hidden] { display: none; }
.live-box .field input, .live-box .field select { background: var(--panel); }
.live-box .row2 .btn { height: 38px; width: 100%; }
.live-status { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.live-status:empty { display: none; }
.live-status::before { content: ""; flex: none; width: 6px; height: 6px; transform: translateY(-1px); background: var(--faint); }
.live-status.ok { color: var(--ok); }
.live-status.ok::before { background: var(--ok); }
.live-status.bad { color: var(--coral-ink); }
.live-status.bad::before { background: var(--coral); }
.url-row { display: flex; gap: 8px; align-items: stretch; }
.url-box { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 11.5px; line-height: 1.45; word-break: break-all; user-select: all; }
.url-examples { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.url-examples li { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.url-examples code { color: var(--ink); }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ---------- calendar block ---------- */
.chooser { max-width: 1160px; }
.choice-cal { display: grid; width: 64px; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); text-align: center; }
.choice-cal i { font: 600 10px/1 var(--sans); letter-spacing: .14em; color: #fff; padding: 6px 0 5px; font-style: normal; }
.choice-cal b { font: 600 26px/1 var(--sans); padding: 9px 0 11px; margin: 0; }
.field textarea { width: 100%; min-height: 76px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--shadow-1); background: var(--panel); resize: vertical; line-height: 1.45; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea:focus { border-color: var(--coral); box-shadow: var(--focus); }
#btnPreview:empty { display: none; }
