/* flock.tt dashboard */
:root {
  /* ── flock.tt: black and white ──
     Black surfaces, white text and labels, white as the only accent. Hierarchy comes from
     white at different strengths, never from colour. */
  --ink-0: #000000;      /* wells, inputs */
  --ink-1: #000000;      /* app background */
  --ink-2: #0a0a0a;      /* panels */
  --ink-3: #141414;      /* raised */
  --ink-4: #1f1f1f;      /* hover */
  --bg: var(--ink-1);
  --panel: var(--ink-2);
  --raised: var(--ink-3);
  --hover: var(--ink-4);
  --chrome: #000000;
  --well: var(--ink-0);
  --row: #111111;
  --line: #222222;
  --line-2: #333333;
  --text: #ffffff;
  --dim: #a3a3a3;
  --faint: #666666;
  --ember: #ffffff;      /* the accent is white */
  --ember-hi: #ffffff;
  --ember-lo: #e5e5e5;
  --butter: #ffffff;
  --mint: #ffffff;
  --lilac: #ffffff;
  --rose: #ffffff;
  --sky: #ffffff;
  --on-light: #000000;
  --red: var(--ember);
  --red-hover: var(--ember-hi);
  --amber: var(--butter);
  --green: var(--mint);
  --blue: var(--sky);
  --plum: var(--lilac);
  --display: "Geist", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", "IBM Plex Mono", Consolas, Menlo, ui-monospace, monospace;
  --sans: "Geist", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --r-panel: 18px;
  --r-ctl: 999px;
  color-scheme: dark;
}


* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
a { color: var(--text); }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: rgba(255,255,255,.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 2px solid var(--bg); border-radius: 6px; }

/* layout */
.app { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--chrome); border-right: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 9px; padding: 16px 18px; font-weight: 800; font-size: 19px; letter-spacing: -.5px; border-bottom: 1px solid var(--line); }
.logo img { width: 24px; height: 24px; }
.nav { display: flex; flex-direction: column; padding: 10px 8px; gap: 1px; }
.nav button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 5px; background: none; color: var(--dim); font: 500 14px var(--sans); cursor: pointer; text-align: left; }
.nav button:hover { color: var(--text); background: var(--raised); }
.nav button.active { color: var(--text); background: var(--raised); box-shadow: inset 2px 0 0 var(--red); }
.side-foot { margin-top: auto; padding: 12px 18px; color: var(--faint); font-size: 12px; border-top: 1px solid var(--line); }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 24px; min-height: 57px; background: var(--chrome); border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; font-size: 16px; font-weight: 650; }
.connect { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.at { position: relative; }
.at::before { content: "@"; position: absolute; left: 10px; top: 50%; transform: translateY(-52%); color: var(--faint); }
.at input { padding-left: 25px; width: 200px; }
.onair { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 4px; font: 700 11.5px var(--mono); letter-spacing: .8px; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.onair i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.onair.connected { color: #fff; background: var(--red); border-color: var(--red); }
.onair.connected i { background: #fff; animation: blink 1.4s steps(2, start) infinite; }
.onair.connecting { color: var(--amber); border-color: rgba(255,255,255,.4); }
.onair.error { color: var(--amber); }
@keyframes blink { to { visibility: hidden; } }

.content { padding: 20px 24px 60px; max-width: 1280px; }
.page { display: none; }
.page.active { display: block; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: start; }
.cols.even { grid-template-columns: 1fr 1fr; }
.stack { display: grid; gap: 16px; align-content: start; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.panel-head { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 13px; font-weight: 650; }
.panel-head .grow { flex: 1; }
.panel-body { padding: 14px; }
.note { color: var(--dim); font-size: 13px; margin: 0 0 12px; }
.note code { color: var(--text); background: var(--raised); padding: 1px 5px; border-radius: 3px; }

/* stat strip */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); margin-bottom: 16px; }
.strip > div { padding: 12px 14px; border-right: 1px solid var(--line); }
.strip > div:last-child { border-right: 0; }
.strip .k { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--dim); }
.strip .v { font: 600 24px var(--mono); letter-spacing: -.5px; margin-top: 2px; }
.strip .v.up { animation: up .5s ease; }
@keyframes up { 0% { color: var(--amber); } }

/* controls */
input, select, textarea { width: 100%; padding: 7px 10px; background: var(--well); color: var(--text); border: 1px solid var(--line-2); border-radius: 4px; font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--dim); }
input::placeholder { color: var(--faint); }
input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--red); }
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--red); margin: 0; }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.f { display: flex; flex-direction: column; gap: 4px; }
.f > span { font-size: 12px; color: var(--dim); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.form .span2 { grid-column: span 2; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; background: var(--raised); color: var(--text); border: 1px solid var(--line-2); border-radius: 4px; font: 600 13px var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: var(--red-hover); }
.btn.flat { background: none; border-color: transparent; color: var(--dim); }
.btn.flat:hover { color: var(--text); background: var(--raised); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.sq { padding: 6px; }
.btn.unsaved::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* activity log */
.filters { display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--dim); }
.filters label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.log { height: 560px; overflow-y: auto; font-size: 13.5px; }
.log .empty { padding: 40px 20px; text-align: center; color: var(--faint); }
.line { display: grid; grid-template-columns: 50px 62px minmax(0, 1fr); gap: 8px; padding: 5px 14px; border-bottom: 1px solid var(--row); align-items: baseline; }
.line:hover { background: var(--row); }
.line .t { font: 12px var(--mono); color: var(--faint); }
.line .ty { font: 700 10.5px var(--mono); letter-spacing: .6px; text-transform: uppercase; color: var(--c); }
.line .msg { overflow-wrap: anywhere; }
.line .msg b { font-weight: 650; margin-right: 6px; }
.line .msg .d { color: var(--dim); }
.line.gift { background: rgba(255,255,255,.05); }
.amt { color: var(--amber); font-family: var(--mono); font-size: 12.5px; }

/* simulator & lists */
.btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.list { display: flex; flex-direction: column; }
.list .item { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list .n { font: 12px var(--mono); color: var(--faint); text-align: right; }
.list .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.meter { height: 6px; background: var(--ink-3); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.meter i { display: block; height: 100%; background: var(--red); transition: width .4s; }
.goalline { margin-bottom: 12px; }
.goalline:last-child { margin-bottom: 0; }
.goalline .row { justify-content: space-between; font-size: 13px; }

/* actions */
.bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.bar .grow { flex: 1; }
.rule { border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: 0; }
.rule-top { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; cursor: pointer; }
.rule-top:hover { background: var(--row); }
.rule.off .rule-name, .rule.off .rule-sum { opacity: .45; }
.rule-name { font-weight: 600; }
.rule-sum { color: var(--dim); font-size: 12.5px; margin-top: 1px; }
.rule-sum .arrow { color: var(--faint); margin: 0 5px; }
.rule-edit { display: none; padding: 4px 14px 16px 48px; }
.rule.open .rule-edit { display: block; }
.rule.open .rule-top { background: var(--row); }
.sub { margin: 14px 0 8px; font: 700 10.5px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.vars { display: flex; flex-wrap: wrap; gap: 5px; }
.vars code { background: var(--raised); border: 1px solid var(--line); padding: 2px 6px; border-radius: 3px; cursor: pointer; }
.vars code:hover { border-color: var(--line-2); }

/* sound actions */
.snd { display: grid; grid-template-columns: 22px minmax(130px, .8fr) minmax(250px, 1.5fr) minmax(150px, 1fr) 80px auto; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.snd:last-child { border-bottom: 0; }
.snd.off > :not(:first-child) { opacity: .45; }
.snd .opts { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--dim); }
.snd .opts input[type=number] { width: 58px; padding: 5px 6px; }
.snd-head { color: var(--faint); font: 700 10.5px var(--mono); letter-spacing: .8px; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.lib .s { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; background: var(--raised); border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.lib .s span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib .s.custom { border-color: rgba(255,255,255,.28); }
.lib .s .btn { padding: 3px 5px; }

/* timer */
.clock { font: 600 54px var(--mono); letter-spacing: -1px; text-align: center; padding: 8px 0 14px; }
.clock.paused { color: var(--dim); }

/* overlays */
.ovs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ov .pv { position: relative; height: 170px; overflow: hidden; border-bottom: 1px solid var(--line);
  background: var(--well) repeating-conic-gradient(#1d1734 0 25%, var(--well) 0 50%) 0 0 / 16px 16px; border-radius: 6px 6px 0 0; }
.ov .pv iframe { position: absolute; inset: 0; width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: 0 0; pointer-events: none; color-scheme: normal; }
.ov .pv .idle { position: absolute; left: 10px; top: 8px; color: var(--faint); font-size: 11.5px; }
.ov .info { padding: 10px 12px 12px; }
.ov h3 { margin: 0; font-size: 14px; }
.ov p { margin: 2px 0 10px; color: var(--dim); font-size: 12.5px; }
.ov .url { display: flex; gap: 6px; }
.ov .url input { font: 12px var(--mono); color: var(--dim); }
.ov-group { margin: 22px 0 10px; font: 700 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.ov-group:first-child { margin-top: 0; }

/* toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 6px; z-index: 50; }
.toast { padding: 9px 14px; background: var(--ink-3); border: 1px solid var(--line-2); border-left: 3px solid var(--green); border-radius: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.4); font-size: 13px; }
.toast.err { border-left-color: var(--amber); }

/* responsive */
@media (max-width: 1150px) { .cols { grid-template-columns: 1fr; } .strip { grid-template-columns: repeat(3, 1fr); } .strip > div:nth-child(3) { border-right: 0; } .strip > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }
@media (max-width: 980px) { .snd { grid-template-columns: 22px 1fr 1fr; } .snd-head { display: none; } .snd .opts { grid-column: 2 / -1; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .logo { border-bottom: 0; padding: 10px 12px; }
  .logo span { display: none; }
  .nav { flex-direction: row; padding: 6px; }
  .nav button { padding: 7px 9px; }
  .nav button.active { box-shadow: inset 0 -2px 0 var(--red); }
  .nav button span { display: none; }
  .side-foot { display: none; }
  .cols.even { grid-template-columns: 1fr; }
  .top, .content { padding-left: 16px; padding-right: 16px; }
  .connect { margin-left: 0; width: 100%; }
  .at { flex: 1; }
  .at input { width: 100%; }
  .rule-edit { padding-left: 14px; }
}
@media (max-width: 520px) {
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip > div { border-bottom: 1px solid var(--line); }
  .strip > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .strip > div:nth-child(even) { border-right: 0; }
  .btn-grid { grid-template-columns: repeat(2, 1fr); }
  .form .span2 { grid-column: auto; }
  .line { grid-template-columns: 54px minmax(0, 1fr); }
  .line .t { display: none; }
  .snd { grid-template-columns: 22px 1fr; }
  .snd > :nth-child(n+3) { grid-column: 2; }
}

/* nav hints */
.nav button span { display: flex; flex-direction: column; line-height: 1.25; }
.nav button small { font-size: 11.5px; color: var(--faint); font-weight: 400; }
.nav button.active small { color: var(--dim); }

/* search */
.search { position: relative; flex: 1; max-width: 460px; min-width: 200px; display: flex; align-items: center; }
.search > svg { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.search input { padding-left: 32px; padding-right: 34px; background: var(--well); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 8px; font: 11px var(--mono); color: var(--faint); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 5px; pointer-events: none; }
.search:focus-within kbd { display: none; }
.results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.55); padding: 4px; }
.results .grp { padding: 8px 10px 4px; font: 700 10.5px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.results .hit { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 4px; cursor: pointer; }
.results .hit svg { color: var(--dim); }
.results .hit .t { font-weight: 600; }
.results .hit .s { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .hit .where { font-size: 11.5px; color: var(--faint); }
.results .hit.sel { background: var(--hover); }
.results .hit.sel svg { color: var(--red); }
.results mark { background: none; color: var(--amber); }
.results .none { padding: 14px 10px; color: var(--dim); }

/* highlight what search jumped to */
.flash { animation: flash 1.8s ease; border-radius: 6px; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 2px var(--amber), 0 0 0 6px rgba(255,255,255,.25); } 100% { box-shadow: 0 0 0 2px transparent; } }

/* overlay tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--dim); font: 600 13px var(--sans); cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--text); border-color: var(--text); color: var(--on-light); }
.tabs button .c { font: 11px var(--mono); opacity: .6; margin-left: 4px; }

/* get started */
.start { margin-bottom: 16px; }
.steps { list-style: none; margin: 0; padding: 6px 14px 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 6px; counter-increment: s; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--mono); background: var(--raised); color: var(--dim); }
.steps li.done::before { content: "✓"; background: var(--green); color: var(--on-light); }
.steps li.done { opacity: .6; }
.steps b { display: block; font-size: 13.5px; }
.steps span { color: var(--dim); font-size: 12.5px; }
.steps .btn { margin-top: 6px; }

@media (max-width: 1100px) { .search { order: 3; max-width: none; flex-basis: 100%; } }
@media (max-width: 860px) { .nav button small { display: none; } .steps { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .nav button span { display: none; } }

/* layout editor */
.ed-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.ed-bar .grow { flex: 1; }
.ed-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.ed-bar label.check { font-size: 13px; color: var(--dim); }
.ed-link { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.ed-link .url { display: flex; gap: 6px; flex: 1; min-width: 260px; max-width: 520px; }
.ed-link input { font: 12px var(--mono); color: var(--text); }
.ed { display: grid; grid-template-columns: 220px minmax(0, 1fr) 260px; gap: 12px; align-items: start; }
.ed-lib, .ed-insp { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow-y: auto; }
.ed-lib .g { font: 700 10.5px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--faint); margin: 10px 2px 4px; }
.ed-lib .g:first-child { margin-top: 0; }
.ed-lib button.item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--text); font: 13px var(--sans); text-align: left; cursor: pointer; }
.ed-lib button.item:hover { background: var(--raised); border-color: var(--line); }
.ed-lib button.item svg { color: var(--faint); }
.ed-lib button.item:hover svg { color: var(--red); }
.ed-stage-wrap { position: relative; height: calc(100vh - 230px); min-height: 520px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: var(--well); }
.ed-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; outline: 1px solid var(--line-2); box-shadow: 0 0 0 9999px rgba(0,0,0,.35);
  background: var(--chrome) repeating-conic-gradient(var(--row) 0 25%, var(--chrome) 0 50%) 0 0 / 40px 40px; }
.ed-zoom { position: absolute; right: 8px; bottom: 6px; color: var(--faint); font-size: 11px; }
.ed-w { position: absolute; outline: 1px dashed rgba(255,255,255,.25); cursor: move; touch-action: none; }
.ed-w iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; color-scheme: normal; }
.ed-w .tag { position: absolute; left: 0; top: 0; transform: translateY(-100%); padding: 2px 8px; background: var(--ink-4); color: var(--text); white-space: nowrap; border-radius: 4px 4px 0 0; font: 600 calc(12px / var(--s)) var(--sans); }
.ed-w.hidden-w { opacity: .3; }
.ed-w.sel { outline: calc(2px / var(--s)) solid var(--red); z-index: 9000 !important; }
.ed-w.sel .tag { background: var(--red); color: #fff; }
.ed-w .h { position: absolute; width: calc(14px / var(--s)); height: calc(14px / var(--s)); background: #fff; border: calc(2px / var(--s)) solid var(--red); border-radius: 2px; display: none; }
.ed-w.sel .h { display: block; }
.h.nw { left: 0; top: 0; transform: translate(-50%, -50%); cursor: nwse-resize; }
.h.ne { right: 0; top: 0; transform: translate(50%, -50%); cursor: nesw-resize; }
.h.sw { left: 0; bottom: 0; transform: translate(-50%, 50%); cursor: nesw-resize; }
.h.se { right: 0; bottom: 0; transform: translate(50%, 50%); cursor: nwse-resize; }
.h.e { right: 0; top: 50%; transform: translate(50%, -50%); cursor: ew-resize; }
.h.s { left: 50%; bottom: 0; transform: translate(-50%, 50%); cursor: ns-resize; }
.ed-zone { position: absolute; background: rgba(255,255,255,.07); border: 1px dashed rgba(255,255,255,.22); color: rgba(255,255,255,.45); pointer-events: none;
  font: 600 34px var(--sans); display: flex; align-items: flex-start; padding: 12px 18px; z-index: 8000; }
.ed-guide { position: absolute; background: var(--amber); pointer-events: none; z-index: 9500; }
.ed-insp .empty-insp { padding: 16px 14px; color: var(--dim); font-size: 13px; }
.ed-insp .layers { display: flex; flex-direction: column; gap: 2px; }
.ed-insp .layer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.ed-insp .layer:hover { background: var(--raised); }
.ed-insp .layer.sel { background: var(--hover); box-shadow: inset 2px 0 0 var(--red); }
.ed-insp .layer.off span { opacity: .45; }
.ed-insp .xywh { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ed-insp .aligns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ed-insp .aligns .btn { padding: 5px 4px; font-size: 12px; }
.ed-banner { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; }
@media (max-width: 1150px) { .ed { grid-template-columns: 200px minmax(0, 1fr); } .ed-insp { grid-column: 1 / -1; position: static; max-height: none; } }
@media (max-width: 760px) { .ed { grid-template-columns: 1fr; } .ed-lib { position: static; max-height: 260px; } .ed-stage-wrap { height: 70vh; min-height: 420px; } }

/* editor: use the full width of the window */
.content:has(#page-layout.active) { max-width: none; }
.ed-zone.ed-safe { background: none; border: 2px dashed rgba(255,255,255,.45); color: rgba(255,255,255,.7); }
.ed-zone.ed-mid { background: none; border: 0; border-left: 1px dashed rgba(255,255,255,.18); border-top: 1px dashed rgba(255,255,255,.18); padding: 0; }
#edPreview.on { background: var(--text); color: var(--on-light); }
/* preview: show the canvas exactly as viewers see it */
.ed-preview .ed-w { outline: none; }
.ed-preview .ed-w .tag, .ed-preview .ed-w .h, .ed-preview .ed-zone, .ed-preview .ed-guide { display: none !important; }
.ed-preview .ed-w.hidden-w { display: none; }
.ed-preview { background: #000 !important; }
/* full screen editor */
body.ed-full .side, body.ed-full .top, body.ed-full .demo-note, body.ed-full .ed-link, body.ed-full .ed-help { display: none !important; }
body.ed-full .app { grid-template-columns: 1fr; }
body.ed-full .content { padding: 8px 10px; max-width: none; }
body.ed-full .ed-bar { margin-bottom: 8px; }
body.ed-full .ed { grid-template-columns: 200px minmax(0, 1fr) 250px; }
body.ed-full .ed-stage-wrap { height: calc(100vh - 62px); min-height: 0; }
body.ed-full .ed-lib, body.ed-full .ed-insp { top: 8px; max-height: calc(100vh - 62px); }
body.ed-bare .ed-lib, body.ed-bare .ed-insp { display: none; }
body.ed-bare .ed { grid-template-columns: 1fr !important; }
@media (max-width: 1150px) { body.ed-full .ed { grid-template-columns: 180px minmax(0, 1fr); } body.ed-full .ed-insp { display: none; } }

/* OBS */
.how-obs { margin-top: 12px; font-size: 13px; color: var(--dim); }
.how-obs summary { cursor: pointer; color: var(--text); }
.how-obs ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.7; }
.how-obs code { background: var(--raised); padding: 1px 5px; border-radius: 3px; color: var(--text); }
.scenes { display: flex; flex-wrap: wrap; gap: 6px; }
.scenes .btn.live { background: var(--red); border-color: var(--red); color: #fff; }
.obs-log { max-height: 340px; overflow-y: auto; font-size: 13px; }
.obs-log .e { display: grid; grid-template-columns: 50px 1fr; gap: 8px; padding: 5px 14px; border-bottom: 1px solid var(--row); }
.obs-log .e .t { font: 12px var(--mono); color: var(--faint); }
.obs-log .e.err { color: var(--amber); }
.obsr { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.obsr:last-child { border-bottom: 0; }
.obsr.off > :not(.obsr-top) { opacity: .45; }
.obsr-top { display: flex; gap: 10px; align-items: center; }
.obsr-top input[type=text] { font-weight: 600; flex: 1; min-width: 0; }
.obsr-line { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; align-items: center; }
.obsr-line > span { color: var(--dim); font-size: 12.5px; }
.obsr-line .row { flex-wrap: nowrap; }
.obsr-line .row > * { min-width: 0; }
.obsr input[type=number] { width: 72px; flex: none; }
.obs-off-note { padding: 10px 14px; background: rgba(255,255,255,.07); border-bottom: 1px solid var(--line); color: var(--amber); font-size: 13px; }
@media (max-width: 560px) { .obsr-line { grid-template-columns: 1fr; } .obsr-line .row { flex-wrap: wrap; } }
#obsPill.connected { background: var(--green); border-color: var(--green); color: var(--on-light); }
#obsPill.connected i { background: var(--on-light); animation: none; }
#obsDetail.err { color: var(--amber); }
@media (max-width: 560px) { .obsr-line .row > .grow, .obsr-line .row > div[style*="flex:0 0 160px"] { flex: 1 1 100% !important; } }


/* ═══════════════════ flock.tt: black and white ═══════════════════ */
body { font-family: var(--sans); background: #000; letter-spacing: -.005em; }
h1, h2, h3, .logo span { font-family: var(--display); }
::selection { background: #fff; color: #000; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* logo */
.logo { gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: -.03em; }
.logo svg.mark { width: 30px; height: 30px; flex: none; }
.logo span b { font-weight: 600; color: var(--dim); }
.logo .flock { transform-origin: 16px 16px; }
body.is-live .logo .flock { animation: murmur 3.2s ease-in-out infinite; }
@keyframes murmur { 0%, 100% { transform: none; } 35% { transform: translate(.5px, -.7px) scale(1.03, .96) rotate(-3deg); } 70% { transform: translate(-.4px, .3px) scale(.97, 1.04) rotate(2deg); } }

/* sidebar + top bar */
.side { background: #000; }
.nav { gap: 2px; padding: 12px 10px; }
.nav button { border-radius: 999px; padding: 9px 14px; transition: background .2s, color .2s; }
.nav button svg { color: var(--faint); transition: color .2s; }
.nav button:hover { background: var(--raised); }
.nav button:hover svg { color: #fff; }
.nav button.active { background: #fff; color: #000; box-shadow: none; }
.nav button.active svg, .nav button.active small { color: #000; }
.nav button.active small { opacity: .6; }
.top { background: rgba(0,0,0,.85); backdrop-filter: blur(14px); }
.top h1 { font-size: 18px; font-weight: 600; letter-spacing: -.03em; }

/* panels: flat black, a hairline, no glow */
.panel { border-radius: var(--r-panel); background: var(--panel); border-color: var(--line); box-shadow: none; }
.panel-head h2 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }

/* controls */
input, select, textarea { border-radius: 12px; background: #000; border-color: var(--line-2); transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.14); }
.search input { border-radius: 999px; background: #0a0a0a; }
input[type=checkbox], input[type=range] { accent-color: #fff; }

/* animated rounded buttons: pill shape, a white fill that sweeps in on hover, a squash on press */
.btn { position: relative; overflow: hidden; isolation: isolate; border-radius: 999px; padding: 8px 16px; background: #000; color: #fff; border: 1px solid #fff;
  box-shadow: none; font-weight: 600; transition: color .25s ease, transform .15s cubic-bezier(.3,1.6,.5,1), border-color .2s; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.65,0,.35,1); }
.btn:hover { color: #000; background: #000; }
.btn:hover::before { transform: scaleX(1); }
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .4; }
.btn:disabled::before { transform: scaleX(0); }
.btn.red { background: #fff; color: #000; border-color: #fff; text-shadow: none; box-shadow: none; filter: none; }
.btn.red::before { background: #000; }
.btn.red:hover { color: #fff; background: #fff; }
.btn.flat { border-color: transparent; background: transparent; color: var(--dim); }
.btn.flat::before { background: var(--raised); }
.btn.flat:hover { color: #fff; background: transparent; }
.btn.sm { padding: 5px 12px; }
.btn.sq { padding: 7px; }
.btn.unsaved::after { background: currentColor; box-shadow: none; }
.btn.red.unsaved::after { background: #000; }
@keyframes pop-in { from { transform: scale(.9); opacity: 0; } }
.btn { animation: pop-in .35s cubic-bezier(.3,1.6,.5,1) both; }

/* status pills */
.onair { border-radius: 999px; padding: 6px 12px; font-family: var(--mono); letter-spacing: .08em; color: var(--dim); border-color: var(--line-2); }
.onair.connected { background: #fff; color: #000; border-color: #fff; animation: onair 2s infinite; }
.onair.connected i { background: #000; }
@keyframes onair { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.5); } 70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
#obsPill.connected { background: #fff; border-color: #fff; color: #000; }
#obsPill.connected i { background: #000; }

/* stat strip */
.strip > div { position: relative; padding: 14px 16px 30px; }
.strip .k { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--dim); }
.strip .k::before { display: none; }
.strip .v { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -.04em; color: #fff; font-variant-numeric: tabular-nums; }
.strip .v.up { animation: none; }
.strip .spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26px; }
.strip .spark path.area { fill: #fff; opacity: .06; }
.strip .spark path.line { fill: none; stroke: #fff; stroke-width: 1.25; vector-effect: non-scaling-stroke; opacity: .7; }

/* activity log */
.line { padding: 7px 16px; }
.line .ty { font-size: 10px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--dim); background: transparent; justify-self: start; }
.line.gift .ty, .line.follow .ty { background: #fff; color: #000; border-color: #fff; }
.line.gift, .line.follow { background: transparent; }
.amt { color: #fff; font-weight: 600; }

/* meters, lists */
.meter { height: 6px; border-radius: 999px; background: var(--line); box-shadow: none; }
.meter i { border-radius: 999px; background: #fff; box-shadow: none; }
.list .item:nth-child(1) .n { color: #fff; font-weight: 700; }

/* tabs, chips, search results */
.tabs button { border-radius: 999px; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.tabs button:active { transform: scale(.95); }
.tabs button.active { background: #fff; border-color: #fff; color: #000; box-shadow: none; }
.results { border-radius: 18px; background: rgba(10,10,10,.98); border-color: var(--line-2); }
.results .hit { border-radius: 12px; }
.results .hit.sel { background: #fff; color: #000; }
.results .hit.sel svg, .results .hit.sel .s, .results .hit.sel .where { color: #000; }
.results mark { color: inherit; text-decoration: underline; text-underline-offset: 3px; background: none; }

/* get started */
.steps li { border-radius: 16px; background: transparent; }
.steps li::before { background: transparent; border: 1px solid #fff; color: #fff; }
.steps li.done::before { background: #fff; border-color: #fff; color: #000; }

/* overlay cards */
.ov { transition: transform .25s cubic-bezier(.3,1.4,.5,1), border-color .2s; }
.ov:hover { transform: translateY(-3px); border-color: #fff; box-shadow: none; }
.ov .pv { border-radius: var(--r-panel) var(--r-panel) 0 0; background: #050505 repeating-conic-gradient(#101010 0 25%, #070707 0 50%) 0 0 / 18px 18px; }
.ov h3 { font-size: 14.5px; font-weight: 600; letter-spacing: -.02em; }
.ov-group { color: var(--faint); }
.ed-banner { background: var(--panel); border-color: #fff; }

/* toasts */
.toast { border-radius: 999px; padding: 10px 18px; background: #fff; color: #000; border: 0; font-weight: 600; animation: toast-in .35s cubic-bezier(.3,1.6,.5,1); }
.toast.err { background: #000; color: #fff; border: 1px solid #fff; }
@keyframes toast-in { from { transform: translateY(14px) scale(.92); opacity: 0; } }

/* everything else */
.rule-top:hover, .rule.open .rule-top { background: var(--row); }
.lib .s { border-radius: 999px; }
.lib .s.custom { border-color: var(--line-2); }
.clock { font-family: var(--display); font-weight: 600; font-size: 56px; letter-spacing: -.05em; }
.flash { animation: flash 1.8s ease; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(255,255,255,.2); } 100% { box-shadow: 0 0 0 2px transparent; } }
.ed-stage-wrap { border-radius: var(--r-panel); background: #050505; }
.ed-stage { background: #0a0a0a repeating-conic-gradient(#121212 0 25%, #0a0a0a 0 50%) 0 0 / 40px 40px; }
.ed-w .tag { background: var(--ink-4); }
.ed-w.sel .tag { background: #fff; color: #000; }
.ed-w.sel { outline-color: #fff; }
.ed-w .h { border-color: #000; }
.ed-guide { background: #fff; }
.ed-zone.ed-safe { border-color: rgba(255,255,255,.4); color: rgba(255,255,255,.6); }
#edPreview.on { background: #fff; color: #000; }
.demo-note a { color: #fff !important; text-decoration: underline !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── desktop app title bar (black, replaces the white Windows one) ── */
.appbar { display: none; }
.in-app .appbar { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 36px; align-items: center; gap: 9px; padding: 0 150px 0 14px;
  background: #000; border-bottom: 1px solid #1c1c1c; color: #fff; font: 600 13px var(--sans); letter-spacing: -.02em; -webkit-app-region: drag; user-select: none; }
.in-app-mac .appbar { padding-left: 84px; justify-content: center; }
.appbar .appbar-mark { width: 18px; height: 18px; flex: none; display: block; }
.appbar b { font-weight: 600; color: #8a8a8a; }
.in-app body { padding-top: 36px; box-sizing: border-box; }
.in-app .app { min-height: calc(100vh - 36px); }
.in-app .side { top: 36px; height: calc(100vh - 36px); }
.in-app .top { top: 36px; }
.in-app .ed-lib, .in-app .ed-insp { top: 108px; max-height: calc(100vh - 126px); }
.in-app body.ed-full .ed-stage-wrap, .in-app body.ed-full .ed-lib, .in-app body.ed-full .ed-insp { max-height: calc(100vh - 98px); }
.in-app body.ed-full .ed-stage-wrap { height: calc(100vh - 98px); }

/* bigger tap area for the Activity filters on touch screens */
@media (pointer: coarse) { .filters label { min-height: 32px; padding: 0 4px; } .filters { gap: 6px 10px; } }

/* demo only */
.demo-note { margin-bottom: 16px; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--dim); font-size: 13px; }
.demo-note b { color: var(--text); font-weight: 600; }
