:root {
  --brand: #6E1F35; --brand-2: #8d2a46; --brand-soft: #f6e7ea; --cream: #FBF6F2;
  --bg: #FBF6F2; --surface: #ffffff; --surface-2: #f6efea; --ink: #241519; --muted: #7d6b70; --line: #ecdfd9;
  --ok: #2f7d4f; --ok-soft: #e4f3ea; --warn: #b5650d; --warn-soft: #fdf0dc; --danger: #b3243a; --info: #3d5a99; --info-soft: #e7edf9;
  --radius: 16px; --shadow: 0 1px 2px rgba(60, 20, 30, .06), 0 6px 20px rgba(60, 20, 30, .06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140c0e; --surface: #1f1417; --surface-2: #281a1e; --ink: #f5ece8; --muted: #b29fa4; --line: #33232a;
    --brand-soft: #3a1823; --ok-soft: #173325; --warn-soft: #3a2810; --info-soft: #1c2742; --brand-2: #c0496a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--brand-2); }
img, video { max-width: 100%; display: block; }
.splash { min-height: 100vh; display: grid; place-items: center; } .splash img { width: 72px; border-radius: 18px; }

/* ---------- shell ---------- */
.app { min-height: 100vh; padding-bottom: calc(76px + var(--safe-b)); }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  padding: calc(10px + var(--safe-t)) 16px 10px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.top h1 { font-size: 20px; margin: 0; flex: 1; letter-spacing: -.01em; }
.top .logo { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; position: relative; }
.icon-btn svg { width: 20px; height: 20px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; text-decoration: none;
  color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 12px; position: relative; }
.tabs a svg { width: 23px; height: 23px; }
.tabs a.on { color: var(--brand-2); }
.badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; padding: 0 5px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
main { max-width: 1180px; margin: 0 auto; padding: 14px 16px 24px; }
@media (min-width: 900px) {
  .app { padding-bottom: 0; padding-left: 92px; }
  .tabs { top: 0; bottom: 0; right: auto; width: 92px; flex-direction: column; justify-content: flex-start; gap: 6px;
    padding: calc(18px + var(--safe-t)) 8px; border-top: 0; border-right: 1px solid var(--line); }
  .tabs a { flex: 0; padding: 10px 0; }
  .tabs a.on { background: var(--brand-soft); }
}

/* ---------- common ---------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.brand { background: var(--brand-soft); color: var(--brand-2); } .chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.info { background: var(--info-soft); color: var(--info); }
.chip.off { opacity: .6; text-decoration: line-through; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 650; cursor: pointer; background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--brand); color: #fff; } .btn.ok { background: var(--ok); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); } .btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty svg { width: 42px; height: 42px; opacity: .5; margin-bottom: 8px; }
h2.section { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 22px 2px 10px; }
.thumb { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 9/16; }
.thumb video, .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.thumb .play svg { width: 34px; height: 34px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }

/* ---------- inbox ---------- */
.threads { display: grid; gap: 10px; }
.thread-card { display: flex; gap: 12px; padding: 13px; text-decoration: none; color: inherit; align-items: flex-start; }
.thread-card .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-2); margin-top: 7px; flex: none; }
.thread-card .dot.wait { background: var(--info); } .thread-card .dot.closed { background: var(--line); }
.thread-card h3 { margin: 0 0 3px; font-size: 15.5px; line-height: 1.3; }
.thread-card p { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread-card .imgs { display: flex; gap: 4px; margin-top: 8px; } .thread-card .imgs img { width: 44px; height: 60px; object-fit: cover; border-radius: 7px; }
.thread-card .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 7px; }
.fab { position: fixed; right: 18px; bottom: calc(88px + var(--safe-b)); z-index: 25; border: 0; border-radius: 18px; background: var(--brand);
  color: #fff; padding: 14px 18px; font-weight: 700; box-shadow: 0 8px 24px rgba(110, 31, 53, .35); display: flex; gap: 8px; align-items: center; cursor: pointer; }
@media (min-width: 900px) { .fab { bottom: 24px; } }

/* ---------- thread ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; padding-bottom: 210px; max-width: 760px; margin: 0 auto; }
.msg { max-width: 92%; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.msg.owner { align-self: flex-end; background: var(--brand); color: #fff; border-color: transparent; border-bottom-right-radius: 6px; }
.msg.claude { align-self: flex-start; border-bottom-left-radius: 6px; }
.msg .who { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.msg.owner .who { color: rgba(255,255,255,.75); }
.msg .body h3, .msg .body h4 { margin: 10px 0 4px; font-size: 15px; } .msg .body p { margin: 6px 0; } .msg .body ul { margin: 6px 0; padding-left: 20px; }
.msg .body code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.attach { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 10px; }
.attach figure { margin: 0; } .attach img, .attach video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: #000; }
.attach figcaption { font-size: 11px; color: var(--muted); margin-top: 3px; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(64px + var(--safe-b)); z-index: 26; padding: 10px 14px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .composer { left: 92px; bottom: 0; } }
.composer .inner { max-width: 760px; margin: 0 auto; }
.quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.quick button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.actions { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; } .actions .btn { flex: 1; min-width: 130px; }
.write { display: flex; gap: 8px; align-items: flex-end; }
.write textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 11px 12px; }
.write .btn { padding: 11px 14px; }

/* ---------- list / reels ---------- */
.reels { display: grid; gap: 10px; }
.reel-row { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 10px; cursor: pointer; align-items: center; }
.reel-row .t { font-weight: 650; font-size: 14.5px; margin-bottom: 3px; }
.reel-row .h { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reel-row .chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.time-big { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- calendar ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; min-height: 220px; }
.day.today { border-color: var(--brand-2); }
.day.over { background: var(--brand-soft); }
.day h4 { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.day h4 b { color: var(--ink); font-size: 15px; }
.slot { display: grid; grid-template-columns: 44px 1fr; gap: 7px; padding: 6px; border-radius: 11px; background: var(--surface-2); margin-bottom: 6px; cursor: grab; align-items: center; }
.slot .thumb { border-radius: 7px; }
.slot .tm { font-size: 12px; font-weight: 700; } .slot .nm { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.drag { opacity: .4; } .slot.target { outline: 2px dashed var(--brand-2); }
.daystrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.daystrip button { flex: none; width: 50px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 7px 0; cursor: pointer; }
.daystrip button b { display: block; font-size: 17px; } .daystrip button span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.daystrip button.on { background: var(--brand); color: #fff; border-color: var(--brand); } .daystrip button.on span { color: rgba(255,255,255,.8); }
.daystrip button .n { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-2); margin: 3px auto 0; }
.daystrip button.on .n { background: #fff; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .dn { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 0; font-weight: 700; }
.mday { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 74px; padding: 4px; cursor: pointer; }
.mday.out { opacity: .35; } .mday.today { border-color: var(--brand-2); }
.mday .d { font-size: 12px; font-weight: 700; } .mday .ths { display: flex; gap: 2px; margin-top: 3px; }
.mday .ths div { width: 50%; aspect-ratio: 9/16; border-radius: 4px; background: var(--brand-soft) center/cover; }
.dayview { display: grid; gap: 10px; }
@media (max-width: 899px) { .week.desk { display: none; } }
@media (min-width: 900px) { .mobile-only { display: none !important; } }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.col { background: var(--surface-2); border-radius: 16px; padding: 10px; scroll-snap-align: start; min-height: 300px; }
.col h3 { margin: 2px 4px 10px; font-size: 13px; display: flex; justify-content: space-between; } .col h3 span { color: var(--muted); }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; cursor: pointer; display: block; text-decoration: none; color: inherit; }
.bcard .t { font-weight: 650; font-size: 13.5px; } .bcard .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.bcard .row { display: flex; gap: 8px; align-items: center; } .bcard .thumb { width: 38px; flex: none; border-radius: 7px; }

/* ---------- profile grid ---------- */
.profile { max-width: 520px; margin: 0 auto; }
.profile .head { display: flex; gap: 18px; align-items: center; padding: 6px 4px 16px; }
.profile .head img { width: 78px; height: 78px; border-radius: 50%; }
.profile .head b { font-size: 17px; } .profile .stats { display: flex; gap: 16px; font-size: 13px; margin-top: 4px; }
.igrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.igrid .cell { position: relative; aspect-ratio: 3/4; background: #000; cursor: pointer; overflow: hidden; }
.igrid .cell video { width: 100%; height: 100%; object-fit: cover; }
.igrid .cell.next video { opacity: .45; }
.igrid .cell .lbl { position: absolute; left: 4px; bottom: 4px; right: 4px; font-size: 10.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.igrid .cell .trial { position: absolute; top: 4px; right: 4px; }

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(20, 8, 12, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet .panel { background: var(--bg); width: 100%; max-width: 760px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(20px + var(--safe-b)); animation: up .22s ease-out; }
@media (min-width: 900px) { .sheet { align-items: center; } .sheet .panel { border-radius: 22px; max-height: 88vh; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 2px auto 12px; }
.reel-head { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 520px) { .reel-head { grid-template-columns: 1fr; } .reel-head .thumb { max-width: 240px; margin: 0 auto; } }
.field { margin-top: 12px; } .field label { display: block; font-size: 12px; font-weight: 650; color: var(--muted); margin: 0 0 5px 2px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.field textarea { min-height: 110px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.sheet-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; } .sheet-btns .btn { flex: 1; min-width: 140px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.switch input { width: 44px; height: 26px; appearance: none; border-radius: 13px; background: var(--line); position: relative; cursor: pointer; transition: .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--ok); } .switch input:checked::after { left: 21px; }
.links a { font-size: 13px; margin-right: 12px; }

/* ---------- login / settings / misc ---------- */
.login { max-width: 360px; margin: 14vh auto 0; padding: 26px 22px; text-align: center; }
.login img { width: 64px; border-radius: 16px; margin: 0 auto 12px; }
.login h1 { font-size: 22px; margin: 0 0 4px; } .login input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; margin: 16px 0 10px; }
.login .btn { width: 100%; margin-top: 6px; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }
.settings .item { display: flex; gap: 12px; align-items: center; padding: 14px; } .settings .item + .item { border-top: 1px solid var(--line); }
.settings .item .grow { flex: 1; } .settings .item b { display: block; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); z-index: 60; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); max-width: 90vw; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 16px; }
.lightbox img, .lightbox video { max-height: 92vh; border-radius: 12px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand-2); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn svg, .fab svg { width: 18px; height: 18px; flex: none; }
.write .btn { display: grid; place-items: center; }

/* month: real thumbnails, coloured border = status */
.mday { min-height: 0; }
.mday .ths { display: flex; gap: 3px; margin-top: 4px; }
.mday .mth { position: relative; flex: 0 0 auto; width: calc((100% - 6px) / 3); max-width: 64px; aspect-ratio: 9/16; border-radius: 6px; overflow: hidden;
  background: #000; border: 2px solid var(--brand-2); cursor: pointer; }
.mday .mth.trial { border-color: var(--warn); } .mday .mth.pub { border-color: var(--ok); }
.mday .mth video { width: 100%; height: 100%; object-fit: cover; }
.mday .mth span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; font-weight: 700; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); padding: 6px 0 1px; }
@media (max-width: 600px) { .mday .mth span { display: none; } .mday .mth { border-width: 1.5px; border-radius: 4px; } }

/* ---------- stats + A/B ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile span { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile small { font-size: 11.5px; color: var(--muted); }
.note { padding: 10px 14px; margin-bottom: 10px; font-size: 13.5px; } .note.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.bar { height: 6px; border-radius: 4px; background: var(--surface-2); margin: 6px 0 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand-2); min-width: 2px; }
.abs { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .abs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ab { padding: 12px; }
.ab-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.ab-row, .stat-row { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.ab-row .thumb, .stat-row .thumb { width: 44px; height: 78px; flex: none; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.ab-row .thumb video, .stat-row .thumb video { width: 100%; height: 100%; object-fit: cover; }
.ab-row .h, .stat-row .h { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-row.lead .bar i { background: var(--ok); }
.ab-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ab-foot .btn { text-decoration: none; }
.stat-list { padding: 0 10px; } .stat-list .stat-row:first-child { border-top: 0; }
.stat-row .nums { display: flex; flex-direction: column; align-items: flex-end; font-size: 11.5px; color: var(--muted); flex: none; text-align: right; }
.stat-row .nums b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .tabs a { font-size: 10px; } .tabs a svg { width: 21px; height: 21px; } }
.toolbar .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg button { flex: none; }

/* ---------- charts (networks: validated categorical slots 1-4, light + dark) ---------- */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; }
@media (prefers-color-scheme: dark) { :root { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; } }
.stat-filters { gap: 8px; }
.chart-card { padding: 12px 14px 10px; margin-bottom: 12px; min-width: 0; }
.chart-card h3 { margin: 0 0 6px; font-size: 14px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i, .dot-s, .netnums i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dot-s { margin-right: 5px; vertical-align: -1px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-size: 11px; fill: var(--muted); }
.chart text.dl { font-size: 11.5px; fill: var(--ink); font-weight: 600; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; cursor: crosshair; }
.stack { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.srow { display: flex; gap: 10px; align-items: flex-end; cursor: pointer; }
.srow .sl { flex: 1; min-width: 0; }
.srow .h { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px; }
.track { display: flex; gap: 2px; height: 12px; }
.track i { display: block; height: 100%; min-width: 3px; }
.track i:first-child { border-radius: 4px 0 0 4px; } .track i:last-child { border-radius: 0 4px 4px 0; } .track i:only-child { border-radius: 4px; }
.srow .sv { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; overflow-x: auto; }
.col-b { flex: 1 0 26px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; cursor: default; }
.col-b i { width: 70%; max-width: 34px; background: var(--brand-2); border-radius: 4px 4px 0 0; }
.col-b .cv { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.col-b .cl { font-size: 10.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.hb { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.hb-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; }
.hb-row .hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-row .ht { height: 12px; } .hb-row .ht i { display: block; height: 100%; background: var(--brand-2); border-radius: 0 4px 4px 0; }
.hb-row b { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.two { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin-bottom: 4px; }
@media (min-width: 900px) { .two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.netnums { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.netnums span { display: inline-flex; align-items: center; gap: 4px; }
#viz-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow); border-radius: 10px; padding: 7px 10px; font-size: 12px; max-width: 240px; }
#viz-tip b { display: block; margin-bottom: 2px; }
.ads-table { padding: 0; overflow-x: auto; }
.ads-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ads-table th, .ads-table td { padding: 8px 10px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
.ads-table th { color: var(--muted); font-weight: 600; border-top: 0; } .ads-table th:first-child, .ads-table td:first-child { text-align: left; }
.empty.small { padding: 18px 8px; font-size: 13px; }
.stat-filters .seg:first-child { flex-wrap: wrap; overflow: visible; }
.tile b { overflow-wrap: anywhere; }
/* cover images in place of video previews (scheduler/make_thumbs.py) */
img.cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.igrid .cell.next img.cover { opacity: .45; }

/* ---------- links ---------- */
.fabs { position: fixed; right: 18px; bottom: calc(88px + var(--safe-b)); z-index: 25; display: flex; gap: 8px; }
.fabs .fab { position: static; }
.fab.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 900px) { .fabs { bottom: 24px; } }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.filter-chips button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 11px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; }
.filter-chips button.on { background: var(--brand-soft); color: var(--brand-2); border-color: transparent; }
.row-input { display: flex; gap: 8px; } .row-input input { flex: 1; min-width: 0; }
.threads { padding-bottom: 70px; }
