/* Creator Studio. One shell for every brand: a sidebar with the brand switcher, and pages drawn from theme tokens.
   Themes (Settings → Appearance) set the tokens below on <html data-theme-preset data-mode>; see THEMES in admin.js. */
:root {
  --bg: #061418; --panel: #0e2328; --ink: #e2eeec; --muted: #8aa7a8; --accent: #5fd0c8; --on-accent: #061418;
  --ok: #4fd6a4; --warn: #f0b46a; --bad: #ff7a6b; --info: #8ab4ff;
  --font-display: "Bricolage Grotesque", "Rubik", system-ui, sans-serif;
  --font-text: "Rubik", -apple-system, "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --card: color-mix(in srgb, var(--ink) 4%, var(--bg));
  --card-hi: color-mix(in srgb, var(--ink) 8%, var(--bg));
  --hair: color-mix(in srgb, var(--ink) 9%, transparent);
  --line: color-mix(in srgb, var(--ink) 13%, transparent);
  --side: 248px;
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body.admin { background: var(--bg); color: var(--ink); font: 15.5px/1.5 var(--font-text); letter-spacing: -0.005em; min-height: 100vh; }
.admin h1, .admin h2, .admin h3 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.admin h1 { font-weight: 700; font-size: clamp(1.7rem, 3.5vw, 2.3rem); line-height: 1.1; }
.admin h2 { font-weight: 650; font-size: 1.2rem; }
.admin a { color: var(--accent); text-decoration: none; }
.admin a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.msg { color: var(--warn); font-size: 0.9rem; }
code { color: var(--warn); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[dir="rtl"], .rtl { direction: rtl; text-align: right; }

/* Shell: sidebar + work area; on phones a top bar and a bottom tab bar. */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--hair); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 6px; font: 700 1.05rem var(--font-display); color: var(--ink); }
.logo:hover { text-decoration: none !important; }
.logo img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; flex: none; }
.logo i { width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-style: normal; font-size: 0.9rem; }
.switch { position: relative; }
.switch-btn { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--card-hi); border: 1px solid var(--hair); border-radius: 12px; padding: 9px 10px; cursor: pointer; color: var(--ink); font: inherit; text-align: start; }
.switch-btn .grow b { font-weight: 600; font-size: 0.93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 600; font-size: 0.78rem; color: #fff; flex: none; background: var(--av, #5d6475); }
.menu { position: absolute; inset: calc(100% + 6px) 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); padding: 6px; z-index: 40; }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; border-radius: 8px; padding: 8px; cursor: pointer; text-align: start; color: var(--ink); font: inherit; }
.menu button:hover, .menu button[aria-current] { background: var(--card-hi); }
.menu hr { border: 0; border-top: 1px solid var(--hair); margin: 6px 0; }
#tabs { display: flex; flex-direction: column; gap: 2px; }
#tabs button { display: flex; align-items: center; gap: 10px; background: none; border: 0; border-radius: 10px; padding: 9px 10px; cursor: pointer; color: var(--muted); font: inherit; text-align: start; }
#tabs svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#tabs button:hover { background: var(--card-hi); color: var(--ink); }
#tabs button[aria-current] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); font-weight: 500; }
#tabs button[aria-current] svg { color: var(--accent); }
#tabs .count { margin-inline-start: auto; }
.count:empty { display: none; }
.count { background: var(--warn); color: var(--bg); border-radius: 999px; min-width: 1.2rem; height: 1.2rem; padding: 0 0.35rem; display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 700; }
.side-budget { margin-top: auto; background: var(--card-hi); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.side-budget .meter { height: 8px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; padding: 0 4px; color: var(--muted); min-width: 0; }
.who img, .who .av { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.who { margin-top: auto; border-top: 1px solid var(--hair); padding-top: 12px; }
.side-budget:not([hidden]) ~ .who { margin-top: 0; }
.signout { display: inline-flex; align-items: center; gap: 6px; flex: none; background: none; border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; color: var(--ink); font: inherit; font-size: 0.82rem; cursor: pointer; }
.signout:hover { border-color: var(--bad); color: var(--bad); }
.signout .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button.plain { background: none; border: 0; color: var(--accent); font: inherit; font-size: 0.86rem; cursor: pointer; padding: 0.2rem 0; }
.admin main { padding: 26px max(20px, env(safe-area-inset-right, 0px)) 5rem max(20px, env(safe-area-inset-left, 0px)); min-width: 0; }
.admin main > section { max-width: 72rem; margin: 0 auto; }
.signed-out .shell { display: block; }
.signed-out .side { display: none; }

/* The flow line: where everything is, step by step. */
.flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; padding-top: 14px; }
.flow::before { content: ""; position: absolute; top: 33px; inset-inline: 8%; height: 3px; border-radius: 3px; background: var(--line); }
.flow .fill { position: absolute; top: 33px; inset-inline-start: 8%; height: 3px; border-radius: 3px; background: var(--accent); transition: width 0.6s var(--ease); }
.stop { position: relative; display: grid; justify-items: center; gap: 5px; text-align: center; background: none; border: 0; cursor: pointer; padding: 0 4px 8px; border-radius: 12px; color: var(--ink); font: inherit; }
.stop .dot { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); border: 3px solid var(--line); display: grid; place-items: center; font: 600 0.88rem var(--font-text); font-variant-numeric: tabular-nums; z-index: 1; }
.stop.done .dot { border-color: var(--accent); color: var(--accent); }
.stop.here .dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent); }
.stop.wait .dot { border-color: var(--warn); color: var(--warn); }
.stop b { font-size: 0.9rem; font-weight: 600; }
.stop .small { line-height: 1.3; }
.stop[aria-pressed="true"] { background: var(--card-hi); }
.stop .here-tag { position: absolute; top: -14px; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.stage-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; align-items: start; }
.mini-runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.mini-runs li a { display: flex; gap: 0.6rem; align-items: center; padding: 0.45rem 0; color: var(--ink); border-bottom: 1px solid var(--hair); font-size: 0.9rem; }
.mini-runs li:last-child a { border-bottom: 0; }

/* Pages common */
.row-inline { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.signin .btn { min-width: 16rem; margin-top: 0.5rem; }
.page-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-top > div { display: grid; gap: 0.3rem; min-width: 0; }
.eyebrow { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.chip { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 0.66rem; font-weight: 700; color: #fff; flex: none; }
.chip.youtube { background: #e0322d; } .chip.x, .chip.twitter { background: #222; } .chip.tiktok { background: #1a1a1a; box-shadow: inset -2px 0 #25f4ee, inset 2px 0 #fe2c55; } .chip.reddit { background: #ff4500; } .chip.instagram { background: #c13584; } .chip.facebook { background: #1877f2; } .chip.email { background: #6b7280; } .chip.other, .chip.production, .chip.budget { background: #5d6475; }
.seg2 { display: inline-flex; background: var(--card-hi); border-radius: 10px; padding: 3px; gap: 2px; }
.seg2 button { background: none; border: 0; border-radius: 8px; padding: 5px 12px; cursor: pointer; color: var(--muted); font: inherit; font-size: 0.86rem; }
.seg2 button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.month-title { margin: 1.6rem 0 0.6rem; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--card); border: 1px solid var(--hair); border-radius: 12px; padding: 8px; min-height: 150px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.day.today { border-color: var(--accent); }
.slot { display: flex; gap: 6px; align-items: center; font-size: 0.78rem; background: var(--card-hi); border-radius: 7px; padding: 4px 6px; min-width: 0; color: var(--ink); }
.slot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day .slot, .cal-hours .slot { flex-wrap: wrap; row-gap: 2px; }
.day .slot span, .cal-hours .slot span { white-space: normal; overflow-wrap: anywhere; }
/* Calendar: each kind of event has its own colour, used by the slot's edge, the month pills and the filter chips. */
.k-episode { --k: var(--accent); }
.k-hand { --k: var(--warn); }
.k-prep { --k: #a78bfa; }
.k-approval { --k: #f472b6; }
.k-boost { --k: var(--info); }
.k-outreach { --k: var(--bad); }
.k-jobs { --k: var(--muted); }
.slot { border-left: 3px solid var(--k, transparent); }
.slot b { font-weight: 500; color: var(--muted); flex: none; }
.slot .ic { width: 15px; height: 15px; flex: none; color: var(--k, var(--muted)); }
.slot.sent { opacity: 0.6; }
.slot.planned { background: transparent; border: 1px dashed color-mix(in srgb, var(--k, var(--ink)) 55%, transparent); border-left: 3px solid var(--k, transparent); }
.slot.waiting { background: color-mix(in srgb, var(--k) 20%, transparent); }
.slot.failed { background: color-mix(in srgb, var(--bad) 20%, transparent); }
.admin a.slot, .admin a.cal-pill, .admin .mday .n a { color: var(--ink); }
a.slot:hover { text-decoration: none; background: color-mix(in srgb, var(--k) 22%, var(--card-hi)); }
.cal-recur { border-top: 1px dashed var(--hair); padding-top: 4px; margin-top: 2px; display: flex; gap: 5px; align-items: flex-start; font-size: 0.72rem; }
.cal-recur .ic { width: 13px; height: 13px; flex: none; }
.cal-note { display: flex; gap: 6px; align-items: center; margin: 14px 0 0; }
.cal-note .ic { width: 14px; height: 14px; flex: none; }
.cal.month { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal.month .dow { text-align: center; }
.mday { background: var(--card); border: 1px solid var(--hair); border-radius: 10px; padding: 6px; min-height: 96px; display: grid; gap: 3px; align-content: start; min-width: 0; }
.mday.today { border-color: var(--accent); }
.mday .n a { color: var(--ink); font-weight: 600; }
.cal-pill { display: flex; gap: 4px; align-items: center; font-size: 0.7rem; border-radius: 5px; padding: 2px 5px; background: color-mix(in srgb, var(--k) 16%, transparent); color: var(--ink); overflow: hidden; white-space: nowrap; }
.cal-pill:hover { text-decoration: none; background: color-mix(in srgb, var(--k) 28%, transparent); }
.cal-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--k); flex: none; }
.cal-pill span { overflow: hidden; text-overflow: ellipsis; }
.chip-check { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--hair); background: var(--card); border-radius: 999px; padding: 4px 11px 4px 8px; font-size: 0.84rem; cursor: pointer; }
.chip-check input { accent-color: var(--accent); margin: 0; }
.chip-check i { width: 9px; height: 9px; border-radius: 50%; background: var(--k); flex: none; }
.chip-check.off { opacity: 0.55; }
.cal-allday { display: grid; gap: 5px; margin-bottom: 10px; }
.cal-hours { display: grid; grid-template-columns: 54px 1fr; background: var(--card); border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; }
.cal-hours .hr { padding: 8px 6px; border-top: 1px solid var(--hair); text-align: right; }
.cal-hours .cell { border-top: 1px solid var(--hair); padding: 5px 8px; display: grid; gap: 4px; min-height: 34px; min-width: 0; }
.cal-hours .cell.now { border-top: 2px solid var(--bad); position: relative; }
.cal-hours .cell.now::before { content: attr(data-now); position: absolute; right: 8px; top: -9px; font-size: 0.68rem; color: var(--bad); background: var(--card); padding: 0 4px; }
@media (max-width: 720px) {
  .cal:not(.month) { grid-template-columns: 1fr !important; }
  .day { min-height: 0; }
  .cal.month { gap: 3px; }
  .mday { min-height: 58px; padding: 4px; }
  .cal-pill span { display: none; }
  .cal-pill { justify-content: center; padding: 3px; }
  #cal-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  #cal-filters .chip-check { flex: none; }
}
#cal-custom input { font: inherit; font-size: 0.86rem; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); }

/* Appearance picker */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.theme-card { border: 2px solid var(--hair); border-radius: 14px; padding: 0; overflow: hidden; cursor: pointer; background: none; text-align: start; color: var(--ink); font: inherit; display: grid; }
.theme-card[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.theme-card .pv { padding: 12px; display: grid; gap: 7px; background: var(--pv-bg); color: var(--pv-ink); min-height: 104px; }
.theme-card .pv b { font: 700 1.05rem var(--pv-display); letter-spacing: -0.01em; }
.theme-card .pv i { display: block; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--pv-ink) 15%, transparent); }
.theme-card .pv i:nth-of-type(2) { width: 60%; }
.theme-card .pv span { justify-self: start; background: var(--pv-accent); color: var(--pv-on); border-radius: var(--pv-radius); padding: 3px 10px; font-size: 0.72rem; font-weight: 600; }
.theme-card .nm { padding: 8px 12px; font-size: 0.84rem; display: flex; justify-content: space-between; gap: 6px; background: var(--card); }


/* Buttons: soft pills. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: 0; border-radius: 999px; padding: 0.7rem 1.4rem; font: 600 0.98rem/1.1 var(--font-text); cursor: pointer; text-decoration: none; transition: transform 0.2s var(--ease), filter 0.2s, background 0.2s, opacity 0.2s; }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.1); }
.btn.primary.danger { background: var(--bad); color: #fff; }
.btn.quiet { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.btn.quiet:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 16%, transparent); }
.btn.soft { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); padding: 0.45rem 1rem; font-size: 0.88rem; }
.btn.soft:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.small-btn { padding: 0.5rem 1rem !important; font-size: 0.88rem !important; }

/* Inputs */
.admin input, .admin select, .admin textarea { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); border: 1px solid transparent; border-radius: 10px; font: inherit; padding: 0.6rem 0.8rem; transition: border-color 0.2s, background 0.2s; }
.admin input:focus, .admin select:focus, .admin textarea:focus { outline: none; border-color: var(--accent); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.admin select { appearance: none; -webkit-appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238aa7a8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.55rem center; background-size: 16px; }
.admin input[type="time"] { color-scheme: inherit; }

/* Page titles */
.page-head { padding: 1rem 0 1.5rem; }
.page-head p { margin: 0.35rem 0 0; }
.group-title { font-size: 0.8rem !important; font-weight: 600 !important; letter-spacing: 0.02em !important; text-transform: uppercase; color: var(--muted); margin: 2rem 0 0.6rem 1rem !important; }

/* Grouped lists (iOS "inset grouped" style) */
.group { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 16px; overflow: hidden; }
.group > li + li { border-top: 1px solid var(--hair); }
.row-item { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1.1rem; min-height: 3.2rem; color: var(--ink); }
.row-item > :first-child { flex: 1; min-width: 0; }
.row-item label { display: flex; flex-direction: column; }
.row-item p { margin: 0.1rem 0 0; }
.row-item select, .row-item input { min-width: 0; }
.row-item b { font-weight: 550; }
.link-row { transition: background 0.2s; }
.link-row:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); text-decoration: none !important; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chev { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.6; }
.row-item > .dot, .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.dot.running { background: var(--warn); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.35; transform: scale(0.8); } }

/* iOS toggle */
.toggle { position: relative; width: 51px; height: 31px; flex: none; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.toggle span { position: absolute; inset: 0; pointer-events: none; border-radius: 999px; background: color-mix(in srgb, var(--ink) 18%, transparent); transition: background 0.25s var(--ease); }
.toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: transform 0.3s var(--spring); }
.toggle input:checked + span { background: var(--ok); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle input:disabled + span { opacity: 0.4; }

/* Sign in */
.signin { max-width: 26rem; margin: 8vh auto 0; text-align: center; animation: rise 0.7s var(--ease) both; }
.signin img { margin: 0 auto 1.2rem; filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent)); }
.signin p { margin: 0.5rem 0 1.75rem; }
.signin-form { display: grid; gap: 0.75rem; }
.signin-form input { text-align: center; padding: 0.85rem; font-size: 1rem; }
.signin-form .btn { width: 100%; padding: 0.85rem; }
.signin-form .msg { margin: 0; }
.howto { margin-top: 2rem; text-align: left; }
.howto summary { text-align: center; color: var(--accent); cursor: pointer; list-style: none; font-size: 0.92rem; }
.howto summary::-webkit-details-marker { display: none; }
.howto .group { margin-top: 1rem; }
.numbered { counter-reset: n; }
.numbered li { counter-increment: n; display: flex; gap: 0.8rem; padding: 0.8rem 1rem; font-size: 0.92rem; }
.numbered li::before { content: counter(n); flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; }

/* Tabs fade in */
.tab.enter { animation: page 0.45s var(--ease) both; }
@keyframes page { from { opacity: 0; transform: translateY(8px); } }

/* Review */
#review-list { display: grid; gap: 1.25rem; }
.ep { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 2rem; padding: 1.5rem; align-items: start; }
.player video, .poster { width: 100%; aspect-ratio: 9 / 16; border-radius: 16px; background: #000; display: block; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
.poster { display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 5%, transparent); text-align: center; padding: 1rem; }
.ep-body { padding-top: 0.5rem; min-width: 0; }
.eyebrow-s { margin: 0 0 0.3rem; color: var(--accent); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; }
.ep-body h2 { font-size: clamp(1.6rem, 3vw, 2.2rem) !important; font-weight: 700 !important; letter-spacing: -0.03em !important; line-height: 1.1; }
.ep-body > .muted { margin: 0.4rem 0 0; }
.ep-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.5rem 0; }
.ep-actions .btn { min-width: 8rem; }
.status { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 1rem; border-radius: 999px; font-weight: 600; font-size: 0.92rem; animation: pop 0.4s var(--spring) both; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.approved { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.status.rejected { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } }
.details { border-top: 1px solid var(--hair); padding: 0.9rem 0; margin-bottom: 0.5rem; }
.details summary { cursor: pointer; font-weight: 550; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.25s var(--ease); margin-right: 4px; }
.details[open] summary::after { transform: rotate(-135deg); }
.details .md { margin-top: 0.6rem; }

/* Empty states and loading */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state img { margin: 0 auto 1rem; opacity: 0.85; }
.empty-state p { margin: 0.4rem 0 0; }
.spinner { width: 28px; height: 28px; margin: 4rem auto; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--ink) 12%, transparent); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.poster .spinner { margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Markdown (reports, review details) */
.md { line-height: 1.6; overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { font-family: var(--font-text); letter-spacing: -0.02em; margin: 1.4em 0 0.4em; }
.md h1 { font-size: 1.6rem; } .md h2 { font-size: 1.25rem; } .md h3 { font-size: 1.05rem; }
.md > :first-child { margin-top: 0; }
.md table { border-collapse: collapse; width: 100%; font-size: 0.9rem; display: block; overflow-x: auto; }
.md th, .md td { border-bottom: 1px solid var(--hair); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.md th { color: var(--muted); font-weight: 500; }
.md .chart { background: rgba(0, 0, 0, 0.15); border-radius: 12px; padding: 1rem; margin: 1rem 0; overflow-x: auto; }
.md img { max-width: 100%; border-radius: 10px; }

/* Reports */
.split { display: grid; grid-template-columns: 18rem 1fr; gap: 1.5rem; align-items: start; }
.nav-list button { width: 100%; display: flex; align-items: center; gap: 0.75rem; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; padding: 0.85rem 1rem; cursor: pointer; transition: background 0.2s; }
.nav-list button > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nav-list button:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.nav-list button[aria-current] { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.nav-list button b { font-weight: 550; }
#report-body { padding: 1.75rem 2rem; min-height: 12rem; }

/* Runs */
.actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.85rem; }
.action { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem !important; border-radius: 18px !important; }
.action > div { flex: 1; min-width: 0; }
.action p { margin: 0.1rem 0 0; }
.icon { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--accent) 10%, transparent)); }
.icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Settings */
#quick .row-item select { max-width: 15rem; }
.money { display: inline-flex; align-items: center; gap: 0.2rem; color: var(--muted); }
.money input { width: 6.5rem; text-align: right; }
.form-foot { display: flex; justify-content: flex-end; margin-top: 1.25rem; }
.advanced { margin-top: 2.5rem; }
.advanced > summary { cursor: pointer; color: var(--accent); list-style: none; font-weight: 550; margin-left: 1rem; }
.advanced > summary::-webkit-details-marker { display: none; }
.file-bar { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 0.75rem; }
.file-bar select { flex: 1; min-width: 14rem; }
textarea#editor { width: 100%; min-height: 26rem; font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; border-radius: 14px; padding: 1rem; }

/* Bottom sheet and toast */
.sheet { border: 0; padding: 0; background: transparent; color: var(--ink); width: min(28rem, calc(100vw - 24px)); margin: auto auto max(16px, env(safe-area-inset-bottom)); max-height: none; }
@media (min-width: 721px) { .sheet { margin: auto; } }
.sheet form { background: var(--panel); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--hair); border-radius: 22px; padding: 1.5rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.sheet[open] form { animation: sheet 0.4s var(--ease) both; }
@keyframes sheet { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
.sheet::backdrop { background: color-mix(in srgb, #000 45%, transparent); backdrop-filter: blur(4px); }
.sheet p { margin: 0.4rem 0 1rem; }
.sheet textarea { width: 100%; resize: vertical; margin-bottom: 1rem; }
.sheet label { display: grid; gap: 0.3rem; margin-bottom: 0.9rem; }
.sheet select, .sheet input[type="file"] { width: 100%; }
.lib-replace { margin-top: 0.5rem; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 30; background: var(--panel); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--hair); border-radius: 14px; width: max-content; padding: 0.7rem 1.2rem; font-size: 0.92rem; font-weight: 500; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); transition: opacity 0.3s var(--ease), transform 0.4s var(--spring); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.toast.bad::before { content: "! "; color: var(--bad); font-weight: 700; }

/* Phones: a bottom tab bar with icons, like an iOS app. */
@media (max-width: 720px) {
  .admin main { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .ep { grid-template-columns: 1fr; padding: 1rem; gap: 1.25rem; }
  .ep .player { max-width: 280px; margin: 0 auto; width: 100%; }
  .ep-actions .btn { flex: 1; }
  .split { grid-template-columns: 1fr; }
  #report-body { padding: 1.25rem; }
  .actions-grid { grid-template-columns: 1fr; }
  .row-item { flex-wrap: wrap; }
  #quick .row-item select { max-width: none; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .tab.enter, .signin, .status, .sheet[open] form, .seg-thumb, .toast, .toggle span::after { animation: none !important; transition: none !important; }
}

/* ---- Dashboard: big numbers, soft tiles, smooth charts ---- */
.dash { display: grid; gap: 1rem; }
.foot { margin-top: 2rem; text-align: center; font-size: 0.85rem; }
.hello { padding: 1rem 0 0.75rem; }
.hello h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; margin: 0.2rem 0; }
.small { font-size: 0.85rem; }
.tile { background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); border-radius: var(--radius); padding: 1.4rem 1.5rem; position: relative; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.label { margin: 0 0 0.35rem; font-size: 0.82rem; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.big { font-size: clamp(3.2rem, 9vw, 5.5rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; margin: 0.25rem 0 0.75rem; font-variant-numeric: tabular-nums; }
.mid { font-size: 2.3rem; font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; margin: 0.1rem 0 0.5rem; font-variant-numeric: tabular-nums; }
.hero-tile { padding: 2rem 2rem 1.6rem; background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent) 2%, transparent) 60%), var(--card); }
.progress { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; margin-top: 1.1rem; }
.progress span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--accent); animation: grow 1.2s var(--ease) both; }
@keyframes grow { from { width: 0; } }
.pill { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--muted); }
.pill.up { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pill.down { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.banner { display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: left; font: inherit; font-weight: 600; color: var(--bg); background: var(--warn); border: 0; border-radius: 16px; padding: 0.95rem 1.2rem; cursor: pointer; transition: transform 0.25s var(--ease), filter 0.25s; }
.banner:hover { transform: translateY(-1px); filter: brightness(1.05); }
.banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg); }
.banner .chev { margin-left: auto; font-size: 1.4rem; line-height: 1; }

.ring-tile { display: flex; gap: 1.1rem; align-items: center; }
.ring { width: 96px; height: 96px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring .track { stroke: color-mix(in srgb, var(--ink) 8%, transparent); }
.ring .proj { stroke: color-mix(in srgb, var(--accent) 25%, transparent); transition: stroke-dasharray 1.2s var(--ease); }
.ring .used { stroke: var(--accent); stroke-dashoffset: var(--to); animation: ring 1.2s var(--ease) both; }
@keyframes ring { from { stroke-dashoffset: 264; } }
.budget { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; margin: 0.6rem 0 0; }
.budget span { width: 8px; height: 8px; border-radius: 50%; }
.budget.good span { background: var(--ok); } .budget.warn span { background: var(--warn); } .budget.serious span { background: var(--bad); }

.chart { position: relative; margin-top: 0.5rem; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: none; }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s var(--ease) 0.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .area { opacity: 0; animation: fade 1s var(--ease) 0.6s forwards; }
.chart .ref { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: 0.7; }
.chart .base { stroke: color-mix(in srgb, var(--ink) 10%, transparent); }
.chart text { fill: var(--muted); font-size: 12px; font-family: var(--font-text); }
.chart .cross line { stroke: color-mix(in srgb, var(--ink) 25%, transparent); }
.chart .cross circle { stroke: var(--bg); stroke-width: 2; }
.chart .ghost { fill: none; stroke: color-mix(in srgb, var(--ink) 12%, transparent); stroke-width: 2; stroke-dasharray: 3 6; }
.chart .empty { position: relative; }
.chart .empty svg { height: 160px; }
.chart .empty p { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 0.92rem; text-align: center; padding: 0 1rem; }
.tip { position: absolute; top: 0; transform: translate(-50%, -100%); background: var(--panel); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 12px; padding: 0.5rem 0.75rem; font-size: 0.85rem; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.tip b { font-size: 1.05rem; } .tip span { color: var(--muted); } .tip small { display: block; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.82rem; color: var(--muted); margin-top: 0.4rem; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 0.4rem; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 8px); }

.stack { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; margin: 0.9rem 0 1rem; }
.stack span { min-width: 4px; flex: none; }
.keys { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; font-size: 0.92rem; }
.keys li { display: flex; align-items: center; gap: 0.6rem; }
.keys i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.keys b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.facts p { margin: 0; } .facts p:nth-child(2) { font-size: 1.4rem; font-weight: 650; letter-spacing: -0.02em; }

.eps { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.eps li { display: grid; grid-template-columns: 1fr auto 64px; gap: 1rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.eps li:last-child { border-bottom: 0; }
.eps a { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; min-width: 0; }
.eps .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.eps .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.eps .n small { display: block; font-weight: 400; color: var(--muted); font-size: 0.75rem; }
.meter { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: inherit; }
.meter.over span { background: var(--bad, #c0392b); }
.empty-list { padding: 1.5rem 0 0.5rem; } .empty-list p { margin: 0 0 0.3rem; }

.rise { animation: rise 0.7s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .rise, .chart .line, .chart .area, .progress span, .ring .used { animation: none !important; opacity: 1; stroke-dashoffset: 0; }
  .ring .used { stroke-dashoffset: var(--to); }
}
@media (max-width: 860px) {
  .tiles, .tiles.two { grid-template-columns: 1fr; }
  .hero-tile { padding: 1.5rem; }
}

/* Overview: brain, distribution, production */
.brain-tile { background: linear-gradient(140deg, color-mix(in srgb, var(--info) 14%, transparent), color-mix(in srgb, var(--info) 2%, transparent) 60%), var(--card); }
.brain-tile .summary { font-size: 1.05rem; line-height: 1.5; margin: 0.2rem 0 1rem; }
.acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.acts li { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; padding: 0.7rem 0.85rem; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.acts .p { font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.45rem; border-radius: 6px; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--muted); margin-top: 0.15rem; }
.acts .p.p1 { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.acts .p.p2 { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.acts .a { font-weight: 550; }
.acts .w { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.86rem; }
.acts .tag { font-size: 0.74rem; color: var(--muted); margin-left: 0.4rem; text-transform: uppercase; letter-spacing: 0.03em; }
.health { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; margin-left: 0.5rem; vertical-align: middle; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--muted); }
.health.growing { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); } .health.declining { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.chans { list-style: none; margin: 0.3rem 0 0; padding: 0; }
.chans li { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 0.6rem; align-items: center; padding: 0.65rem 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.chans li:last-child { border-bottom: 0; }
.chans li.head { color: var(--muted); font-size: 0.78rem; font-weight: 600; padding-top: 0; }
.chans .nm { display: flex; flex-direction: column; min-width: 0; } .chans .nm b { font-weight: 550; } .chans .nm span { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chans .num { text-align: right; } .chans .num small { display: block; color: var(--muted); font-size: 0.74rem; }
.prod { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.3rem; }
.prod p { margin: 0; } .prod .v { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; }
.tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.tile-head .btn { padding: 0.35rem 0.8rem; font-size: 0.82rem; }

/* Campaigns */
.camp-bar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.list-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; align-items: center; }
.list-filter select, .list-filter input { width: auto; padding: 0.45rem 0.7rem; font-size: 0.88rem; }
.list-filter .seg2 button { padding: 5px 10px; }
.list-filter .seg2 .ch-label { display: inline-flex; align-items: center; gap: 0.3rem; }
.list-filter .lf-dates { display: inline-flex; gap: 0.4rem; }
.list-filter .lf-dates[hidden] { display: none; }
.camps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.camps li { background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 16px; padding: 1rem 1.2rem; display: grid; grid-template-columns: 1fr auto; gap: 0.75rem 1rem; }
.camps .meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.84rem; color: var(--muted); }
.camps .ttl { font-weight: 600; font-size: 1.05rem; margin: 0 0 0.25rem; }
.camps .camp-n { font-weight: 500; font-size: 0.85rem; color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; }
.camps .camp-n:hover { color: var(--accent); }
.camp-hidden { margin: 0 0 0.6rem; }
.camps .camp-group .meta .ch-label { margin-right: 0.35rem; }
.camp-rows { grid-column: 1 / -1; display: grid; gap: 0.3rem; margin-top: 0.1rem; }
.camp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; padding: 0.4rem 0.6rem; border-radius: 10px; background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 0.86rem; }
.camp-row .grow { flex: 1; }
.camp-row .nums { display: inline-flex; gap: 0.6rem; color: var(--muted); }
.camp-row .btn { padding: 0.25rem 0.7rem; font-size: 0.82rem; }
.camps .copy { grid-column: 1 / -1; margin: 0.25rem 0 0; white-space: pre-wrap; font-size: 0.92rem; color: var(--ink); max-height: 7.5em; overflow: hidden; position: relative; }
.camps .copy.open { max-height: none; }
.camps .copy:not(.open)::after { content: ""; position: absolute; inset: auto 0 0; height: 2.5em; background: linear-gradient(transparent, var(--card)); }
.camps .nums { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: 0.86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.camps .nums b { color: var(--ink); font-weight: 600; }
.camps .tools { display: flex; gap: 0.4rem; align-self: start; }
.camps .icon-btn { display: inline-flex; align-items: center; gap: 0.3rem; }
.camps .icon-btn .ic { width: 15px; height: 15px; }
.camps .danger-quiet:hover:not(:disabled) { color: var(--bad); }
.st.hidden-tag { background: transparent; border: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
.camps li:has(> div > .meta .hidden-tag), .camp-row.is-hidden { opacity: 0.6; }
@media (max-width: 640px) { .list-filter { margin-left: 0; } .list-filter .seg2 { flex-wrap: wrap; } .camps li { grid-template-columns: 1fr; } .camps .tools { flex-wrap: wrap; gap: 0.4rem; } }
.st { font-size: 0.74rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--muted); }
.st.live { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); } .st.scheduled { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); } .st.done { color: var(--muted); } .st.dropped { text-decoration: line-through; }
.drafts { display: grid; gap: 0.85rem; margin-bottom: 1.5rem; }
.drafts .tile { padding: 1rem 1.2rem; border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.drafts .tile p.copy { white-space: pre-wrap; font-size: 0.92rem; margin: 0.4rem 0 0.6rem; max-height: 6em; overflow: hidden; }
.drafts .tile p.copy.open { max-height: none; }
.sheet.wide { width: min(40rem, calc(100vw - 24px)); }
.field { display: flex; flex-direction: column; gap: 0.3rem; margin: 0 0 0.8rem; font-size: 0.86rem; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; box-sizing: border-box; color: var(--ink); }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; } .chans li { grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); } .chans .x { display: none; } .prod { grid-template-columns: 1fr; } }
.bars { list-style: none; margin: 0.3rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.bars li { display: grid; grid-template-columns: minmax(6rem, 0.8fr) 1fr auto; gap: 0.7rem; align-items: center; font-size: 0.9rem; }
.bars li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars i { display: block; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); position: relative; overflow: hidden; }
.bars i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--accent); border-radius: inherit; animation: grow 0.9s var(--ease) both; }
.bars b { font-weight: 600; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stats > div { background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); border-radius: var(--radius); padding: 1rem 1.2rem; }
.stats p { margin: 0; } .stats .v { font-size: 1.7rem; font-weight: 650; letter-spacing: -0.03em; margin: 0.15rem 0; font-variant-numeric: tabular-nums; }
.tbl { border-collapse: collapse; width: 100%; font-size: 0.9rem; margin-top: 0.4rem; display: block; overflow-x: auto; }
.tbl th, .tbl td { border-bottom: 1px solid var(--hair); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; white-space: nowrap; }
.tbl td:first-child { white-space: normal; min-width: 12rem; }
.tbl th { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.nav-list li.sub { padding: 0.9rem 1rem 0.3rem; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr 1fr; } }

/* Episodes library */
.lib { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.lib-card { background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.lib-card.playing { grid-column: 1 / -1; }
.lib-poster { position: relative; aspect-ratio: 9 / 16; width: 100%; border: 0; cursor: pointer; background: radial-gradient(120% 80% at 50% 110%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 60%), linear-gradient(170deg, #0e2a30, #061418); display: grid; place-items: center; color: var(--ink); background-size: cover; background-position: center; }
.lib-card.playing video { width: 100%; max-height: 80vh; background: #000; display: block; }
.lib-play { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 14%, transparent); font-size: 1.3rem; padding-left: 4px; transition: transform 0.25s var(--ease), background 0.25s; }
.lib-poster:hover .lib-play { transform: scale(1.08); background: var(--accent); color: var(--bg); }
.lib-poster.loading .lib-play { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.lib-dur { position: absolute; right: 0.6rem; bottom: 0.6rem; font-size: 0.78rem; font-weight: 600; background: rgba(0, 0, 0, 0.55); padding: 0.15rem 0.45rem; border-radius: 6px; }
.lib-meta { padding: 0.8rem 1rem 1rem; }
.lib-meta p { margin: 0; }
.lib-meta .eyebrow { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.lib-meta .ttl { font-weight: 600; font-size: 1.02rem; margin: 0.15rem 0 0.3rem; }
.run-progress { display: flex; align-items: center; gap: 0.45rem; margin: 0.35rem 0 0 !important; color: var(--muted); min-height: 0; }
.run-progress:empty { display: none; }
/* A running job's progress: bar, what it is doing and the time left (admin.js runProgress). */
.run-prog { display: flex; align-items: center; gap: 0.55rem; min-width: 0; flex-wrap: wrap; color: var(--muted); }
.grow .run-prog { margin-top: 0.3rem; }
.run-bar { position: relative; flex: 0 0 auto; width: 9rem; max-width: 40vw; height: 6px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.run-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--accent); transition: width 1.2s ease;
  background-image: linear-gradient(90deg, transparent 0, color-mix(in srgb, #fff 45%, transparent) 50%, transparent 100%); background-size: 60% 100%; background-repeat: no-repeat; animation: run-shine 1.6s linear infinite; background-color: var(--accent); }
.run-bar.indet i { width: 35%; animation: run-slide 1.4s ease-in-out infinite; }
.run-what { font-size: 0.82rem; overflow-wrap: anywhere; }
@keyframes run-shine { from { background-position: -60% 0; } to { background-position: 160% 0; } }
@keyframes run-slide { 0% { left: -35%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .run-bar i { animation: none; } .run-bar.indet i { left: 30%; } }
.run-progress .dot { width: 8px; height: 8px; }

/* Buffer actions */
.act-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.5rem 0 0; }
.act-btns .btn { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.act-btns .run-progress { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0 0 0 0.3rem; }
.bposts { list-style: none; margin: 0; padding: 0; }
.bpost { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: flex-start; justify-content: space-between; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.bpost:last-child { border-bottom: 0; }
.bpost .grow { flex: 1 1 16rem; min-width: 0; }
.bpost .copy { margin: 0.2rem 0 0; white-space: pre-wrap; max-height: 2.8em; overflow: hidden; cursor: pointer; color: var(--muted); font-size: 0.88rem; }
.bpost .copy.open { max-height: none; }
.bpost .nums { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--muted); }
.bpost .act-btns { margin: 0; flex: 0 0 auto; }
.st.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.ep.leaving { opacity: 0; transform: translateY(-6px); transition: opacity 0.35s, transform 0.35s; }
.acts-done { margin: 0.6rem 0 0; }
.acts-done summary { cursor: pointer; }
.acts-done ul { margin: 0.4rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.25rem; }

/* Phones: brand switcher on top, sections in a bottom tab bar. */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 30; height: auto; align-self: start; flex-direction: row; align-items: center; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--hair); gap: 10px; overflow: visible; }
  .side .logo span, .side-budget, .who > img, .who > span { display: none; }
  /* Phones: just the sign-out icon at the right end of the top bar. */
  .who { margin: 0; padding: 0; border: 0; flex: none; }
  .signout { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 11px; }
  .signout span { display: none; }
  .signout .ic { width: 19px; height: 19px; }
  .switch { flex: 1; min-width: 0; }
  #tabs { position: fixed; inset: auto 0 0 0; z-index: 30; flex-direction: row; background: var(--panel); border-top: 1px solid var(--hair); padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); overflow-x: auto; gap: 0; }
  #tabs button { flex: 1 0 auto; flex-direction: column; gap: 2px; font-size: 0.68rem; padding: 6px 8px; position: relative; }
  #tabs button[aria-current] { background: none; color: var(--accent); }
  #tabs .count { position: absolute; top: 2px; inset-inline-start: calc(50% + 6px); margin: 0; }
  .admin main { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .flow::before, .flow .fill { display: none; }
  .stage-grid { grid-template-columns: minmax(0, 1fr); }
  .cal { grid-template-columns: minmax(0, 1fr); }
  .day { min-height: 0; }
}

/* Campaign editor: AI draft box, idea chips, product picker */
.ai-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.9rem; margin: 0.4rem 0 0.9rem; background: var(--card-hi); }
.ai-box summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.ai-box[open] summary { margin-bottom: 0.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.2rem 0 0.6rem; }
.chips button { font: inherit; font-size: 0.8rem; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 0.2rem 0.65rem; cursor: pointer; }
.chips button:hover { border-color: var(--accent); color: var(--accent); }
.prod-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.5rem; max-height: 15rem; overflow: auto; margin-bottom: 0.6rem; }
.prod { display: flex; flex-direction: column; gap: 0.25rem; border: 1px solid var(--line); border-radius: calc(var(--radius) * 0.7); padding: 0.4rem; font-size: 0.8rem; cursor: pointer; }
.prod img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) * 0.5); background: var(--hair); }
.prod:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.prod input { position: absolute; opacity: 0; pointer-events: none; }
.check { display: flex; gap: 0.5rem; align-items: center; font-size: 0.85rem; color: var(--muted); margin: -0.3rem 0 0.8rem; }
@media (max-width: 860px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* Icons: platform marks in chips and labels, action glyphs in buttons. */
.ic { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.15em; }
.btn .ic, button.plain .ic { margin-inline-end: 0.1rem; }
.chip .ic { width: 13px; height: 13px; color: #fff; }
.ch-label { display: inline-flex; align-items: center; gap: 0.35em; }
.ch-label .ic { width: 1.1em; height: 1.1em; }
.ch-label.youtube .ic { color: #e0322d; } .ch-label.instagram .ic { color: #c13584; } .ch-label.facebook .ic { color: #1877f2; }
.ch-label.reddit .ic { color: #ff4500; } .ch-label.email .ic { color: var(--muted); }
.ch-label.tiktok .ic { color: var(--ink); filter: drop-shadow(1px 0 #fe2c55) drop-shadow(-1px 0 #25f4ee); }
.av.img { padding: 0; overflow: hidden; background: var(--card-hi, #fff); }
.av.img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The brand banner across the top of every page, and its preview in Settings. */
.brand-banner { position: relative; display: flex; align-items: flex-end; gap: 0.8rem; min-height: 112px; margin: 0 0 1.2rem; padding: 1rem 1.2rem; border-radius: 18px; overflow: hidden; color: #fff;
  background: linear-gradient(120deg, var(--av, #5d6475), color-mix(in srgb, var(--av, #5d6475) 45%, #000)); background-size: cover; background-position: center; }
.brand-banner.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.55), transparent 70%); }
.brand-banner > * { position: relative; }
.brand-banner .av { width: 44px; height: 44px; border-radius: 12px; font-size: 1rem; box-shadow: 0 0 0 2px rgb(255 255 255 / 0.85); }
.brand-banner b { display: block; font: 700 1.15rem/1.2 var(--font-display); }
.brand-banner .small { opacity: 0.85; }
.brand-look { display: grid; gap: 1rem; }
.bl-banner { position: relative; height: 120px; border-radius: 14px; background: linear-gradient(120deg, var(--av, #5d6475), color-mix(in srgb, var(--av, #5d6475) 45%, #000)); background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 0.8rem; }
.bl-logo .av { width: 56px; height: 56px; border-radius: 14px; font-size: 1.1rem; box-shadow: 0 0 0 2px rgb(255 255 255 / 0.85); }
.bl-rows { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.bl-rows p { margin: 0.2rem 0 0; }
.bl-sites { display: grid; gap: 0.8rem; margin-top: 0.8rem; }
.bl-sites p { margin: 0.2rem 0 0; }
.site-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.site-row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; padding: 0.6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.site-row input { font: inherit; padding: 0.45rem 0.7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); min-width: 0; width: 100%; }
.site-row .site-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.site-row .site-acts { display: flex; gap: 0.3rem; }
.site-row .site-acts .btn { padding: 0.35rem 0.7rem; font-size: 0.82rem; }
.site-row .pill.main { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.site-row .pill.data { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
@media (max-width: 640px) { .site-row { grid-template-columns: 1fr; } .site-row .site-acts { justify-content: flex-end; } }
#bl-color { width: 44px; height: 32px; padding: 0; border-radius: 8px; cursor: pointer; }
/* Phones show the brand in the top bar already, so the banner is just the picture, or nothing. */
@media (max-width: 720px) { .brand-banner { min-height: 72px; padding: 0; border-radius: 14px; } .brand-banner > * { display: none; } .brand-banner:not(.has-img) { display: none; } }
.signed-out .brand-banner { display: none; }

/* Campaign editor: a page inside Campaigns (not a pop-up), copy and media on the left, settings on the right. */
#camp-editor .back { margin: 0 0 0.6rem -0.4rem; }
.editor { background: var(--panel); border: 1px solid var(--hair); border-radius: var(--radius); padding: 1.4rem; }
.editor h2 { margin: 0 0 1rem; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: 1.4rem; align-items: start; }
.editor-side { background: var(--card-hi); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; position: sticky; top: 1rem; }
.field-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.7rem; }
.field-stack .field:first-child { grid-column: 1 / -1; }
.editor textarea { min-height: 14rem; resize: vertical; }
.editor-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 0.6rem; padding: 0.9rem 0 0.2rem; margin-top: 0.6rem; background: linear-gradient(transparent, var(--panel) 35%); }
.editor-actions .btn { min-width: 8rem; }
@media (max-width: 860px) { .editor-grid { grid-template-columns: 1fr; } .editor-side { position: static; } .editor { padding: 1rem; } }
.media-pick { display: block; }
.mp-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.5rem; margin: 0.3rem 0 0.6rem; }
.mp { display: flex; flex-direction: column; gap: 0.25rem; text-align: start; font: inherit; color: var(--ink); background: var(--card-hi); border: 1.5px solid var(--line); border-radius: 12px; padding: 0.35rem; cursor: pointer; }
.mp.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.mp-thumb { display: block; aspect-ratio: 16 / 10; border-radius: 8px; background: color-mix(in srgb, var(--muted) 18%, transparent) center / cover; overflow: hidden; position: relative; }
.mp-thumb video, .lib-poster video.lib-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.lib-poster { position: relative; overflow: hidden; }
.lib-poster > span { position: relative; z-index: 1; }
/* The corner badges stay in their corner over a poster (the rule above made them a box in the middle). */
.lib-poster > .lib-dur { position: absolute; z-index: 1; }
.lib-poster > .lib-kind { right: auto; left: 0.5rem; bottom: 0.5rem; font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 999px; background: rgba(0, 0, 0, 0.5); color: #fff; line-height: 1.4; }
.mp-name { font-size: 0.8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-tags { font-size: 0.72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-more summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.85rem; margin: 0.2rem 0; }
.mp-q { width: 100%; margin: 0.4rem 0 0.2rem; }

/* Library: tag filter and grouping, drag and drop. */
.lib-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 1rem; }
.lib-tools input[type=search] { flex: 0 1 16rem; }
.lib-tools .chips { margin: 0; }
.lib-tools .check { margin: 0; }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on, #fff); }
.lib-drop { position: fixed; inset: 1rem; z-index: 50; display: grid; place-items: center; border: 3px dashed var(--accent); border-radius: 24px; background: color-mix(in srgb, var(--bg) 80%, transparent); font-size: 1.4rem; font-weight: 700; color: var(--accent); pointer-events: none; }
.item-open { margin: 1rem 0; }
#lib-new { cursor: pointer; }
.btn.danger { color: var(--bad); }
.editor-actions .grow { flex: 1; }

/* Flow: the three-gate episode flow */
.steps3 { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.steps3 li { display: grid; gap: 0.2rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 10px; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.5rem; margin-top: 0.6rem; }
.ep-tile { display: grid; gap: 0.15rem; text-align: start; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; }
.ep-tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.ep-tile b { font-size: 0.95rem; }
.ep-tile .t { font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-tile .st { justify-self: start; font-size: 0.7rem; }
#ep-panel { margin-top: 1rem; }
.ep-status { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem 0.8rem; margin: 0.2rem 0 0.8rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; }
.ep-status label { display: grid; gap: 0.2rem; font-size: 0.8rem; }
.ep-status .ep-posted { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; flex: 1 1 22rem; }
.ep-status .ep-posted[hidden] { display: none; }
.ep-status .grow { flex: 1 1 14rem; }
.ep-status input[type=url] { width: 100%; }
.ep-status p { flex-basis: 100%; margin: 0; }
.mode-seg { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0; }
.mode-seg label { display: grid; gap: 0.1rem; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; flex: 1 1 10rem; }
.mode-seg input { position: absolute; opacity: 0; }
.mode-seg label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ep-notes { width: 100%; min-height: 5rem; }
.frames3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0.8rem 0; }
.frames3 figure { margin: 0; }
.frames3 img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: var(--line); }
.frames3 figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }
.script-shots { list-style: none; padding: 0; margin: 0.6rem 0; display: grid; gap: 0.55rem; }
.script-shots li { padding: 0.55rem 0.7rem; border-inline-start: 3px solid var(--line); }
.script-shots .beat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.script-shots .ln { margin: 0.15rem 0; }
.script-shots .ln i { color: var(--muted); font-style: normal; font-size: 0.8rem; margin-inline-end: 0.35rem; }
@media (max-width: 640px) { .steps3 { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; } .steps3 li { padding: 0.45rem 0.7rem; } .ep-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; } .ep-tile { padding: 0.4rem 0.45rem; } .ep-tile .t { display: none; } .ep-tile .st, .ep-tile .muted { font-size: 0.62rem; white-space: normal; max-width: 100%; overflow-wrap: anywhere; line-height: 1.2; } .frames3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35rem; } }
.ep-work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; margin-top: 0.8rem; }
.ep-work:has(.ep-player:not([hidden])) { grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); align-items: start; }
.ep-player { position: sticky; top: 1rem; }
.script-shots .ln { display: block; }
.script-shots .ln-edit { display: block; width: 100%; margin-top: 0.15rem; padding: 0.3rem 0.45rem; font: inherit; line-height: 1.4; resize: vertical; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; }
.script-shots .ln-edit:hover { border-color: var(--line); }
.script-shots .ln-edit:focus { border-color: var(--accent, var(--line)); outline: none; background: var(--card, transparent); }
.script-shots li.haiku { border-inline-start-color: var(--accent, #2a8a8a); }
.script-shots li.haiku .ln-edit { font-weight: 700; font-style: italic; }
@media (max-width: 640px) { .ep-work:has(.ep-player:not([hidden])) { grid-template-columns: minmax(0, 1fr); } .ep-player { position: static; max-width: 260px; margin: 0 auto; width: 100%; } }
.series-doc { max-width: 46rem; }
.series-doc h1 { font-size: 1.6rem; margin: 0.2rem 0 0.6rem; }
.series-doc h2 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }
.series-doc table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.series-doc th, .series-doc td { text-align: start; vertical-align: top; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); }
.series-editor { width: 100%; min-height: 70vh; font: 0.9rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0.8rem; }

/* Campaign editor: the Platforms checkboxes (each says how it posts), and the same row in Flow and Promotions */
.field.also { border: 0; padding: 0; min-width: 0; }
.field.also legend { padding: 0; margin-bottom: 0.3rem; }
.also-row { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
.also-row label { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink); }
.also-row input { width: auto; }
.also-row small { font-size: 0.72rem; }
.chart-plats { margin: 0 0 0.8rem; font-size: 0.88rem; }
.chart-plats i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.chart-plats label:has(input:disabled) { opacity: 0.55; }
#camp-also .also-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem 0.6rem; }
#camp-also .also-row label:has(input:disabled) { opacity: 0.75; }
#camp-plats-note { margin: 0.35rem 0 0.8rem; }
#camp-plats-note:empty { display: none; }
.promote-sub { margin: 0.6rem 0 0.2rem; }

/* Flow: Refresh stats sits beside the schedule switch; setup tools are rows in Settings. */
.page-top > .flow-tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.refresh-pill { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }
.refresh-pill .run-progress { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.refresh-pill .run-progress:empty { display: none; }
.tool-row .grow { display: flex; flex-direction: column; min-width: 0; }
.tool-row .icon { width: 34px; height: 34px; border-radius: 10px; }
.tool-row .icon svg { width: 19px; height: 19px; }
.tool-row .run-progress:not(:empty) { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }

/* ---- Home: cinematic header over real footage, to-dos, season vitals, footage reel, ops ---- */
.home-hero { position: relative; overflow: hidden; border-radius: calc(var(--radius) + 6px); min-height: clamp(20rem, 46vh, 28rem); display: flex; align-items: flex-end; isolation: isolate; color: #f4f8f8;
  background: radial-gradient(120% 90% at 85% 10%, #1b4b5a 0%, transparent 55%), radial-gradient(90% 80% at 10% 100%, #2a1d4a 0%, transparent 60%), #05090d; }
.hero-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; opacity: 0; transform: scale(1.06); transition: opacity 1.2s var(--ease), transform 8s linear; filter: saturate(1.1) contrast(1.05); }
.home-hero.has-vid .hero-vid { opacity: 0.85; transform: scale(1); }
.hero-aura { position: absolute; inset: -20%; z-index: -2; pointer-events: none; filter: blur(60px); opacity: 0.7; mix-blend-mode: screen; }
.hero-aura i { position: absolute; width: 42%; aspect-ratio: 1; border-radius: 50%; animation: drift 18s ease-in-out infinite alternate; }
.hero-aura i:nth-child(1) { background: color-mix(in srgb, var(--accent) 70%, transparent); top: 10%; left: 55%; }
.hero-aura i:nth-child(2) { background: #6b4bd8; top: 45%; left: 5%; animation-duration: 23s; animation-delay: -6s; }
.hero-aura i:nth-child(3) { background: #d8508a; top: 55%; left: 70%; width: 26%; animation-duration: 15s; animation-delay: -3s; opacity: 0.6; }
.home-hero.has-vid .hero-aura { opacity: 0.35; }
@keyframes drift { to { transform: translate(-12%, 10%) scale(1.15); } }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(3, 6, 9, 0.15) 0%, rgba(3, 6, 9, 0.35) 45%, rgba(3, 6, 9, 0.88) 100%), linear-gradient(90deg, rgba(3, 6, 9, 0.6), transparent 70%); }
.hero-shade::after { content: ""; position: absolute; inset: 0; opacity: 0.18; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.hero-in { padding: clamp(1.4rem, 4vw, 2.6rem); width: 100%; display: grid; gap: 1.1rem; }
.hero-eye { margin: 0; display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244, 248, 248, 0.82); }
.hero-eye .live { width: 8px; height: 8px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 77, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); } }
.home-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.6vw, 3.3rem) !important; line-height: 1.04; letter-spacing: -0.035em; max-width: 22ch; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35); }
.home-hero .grad { background: linear-gradient(92deg, #7ff0e6, #b9a4ff 50%, #ff9cc4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(1rem, 4vw, 3rem); }
.hero-stats > div { min-width: 8rem; }
.hs-v { margin: 0; font: 700 clamp(1.8rem, 4vw, 2.6rem)/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.hs-l { margin: 0.3rem 0 0; font-size: 0.85rem; color: rgba(244, 248, 248, 0.72); display: flex; align-items: center; gap: 0.4rem; }
.hs-l .pill { background: rgba(255, 255, 255, 0.14); color: #fff; }
.hs-by { margin: 0.35rem 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.7rem; font-size: 0.78rem; color: rgba(244, 248, 248, 0.82); font-variant-numeric: tabular-nums; }
.hs-by i, .tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.3rem; vertical-align: 0.05em; }
.goal { margin-top: 0.55rem; height: 5px; width: 9rem; border-radius: 5px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.goal span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #7ff0e6, #b9a4ff); box-shadow: 0 0 12px #7ff0e6; }
.hero-shuffle { position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(10, 14, 18, 0.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform 0.3s var(--ease), background 0.3s; }
.hero-shuffle:hover { transform: rotate(90deg); background: rgba(10, 14, 18, 0.55); }
.hero-shuffle svg { width: 18px; height: 18px; }

.todo-tile { padding: 0 !important; overflow: hidden; background: linear-gradient(140deg, color-mix(in srgb, var(--info) 12%, transparent), transparent 55%), var(--card); }
.todo-tile > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.75rem; padding: 1.05rem 1.4rem; }
.todo-tile > summary::-webkit-details-marker { display: none; }
.todo-tile > summary .chev { width: 18px; height: 18px; margin-inline-start: auto; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform 0.3s var(--ease); }
.todo-tile[open] > summary .chev { transform: rotate(90deg); }
.todo-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.todo-head b { font: 650 1.05rem var(--font-display); }
.todo-head .spark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), #8b6cf0); }
.todo-head .spark svg { width: 17px; height: 17px; }
.todo-tile > :not(summary) { margin-inline: 1.4rem; }
.todo-tile > :last-child { margin-bottom: 1.3rem; }
.todo-tile .summary { font-size: 1rem; line-height: 1.5; margin: 0.1rem 1.4rem 0.9rem; }
.todo-tile .banner { width: auto; margin-bottom: 0.9rem; }

.vitals { background: radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--card); }
.vital-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0.6rem 0 1.2rem; }
.vital { display: flex; align-items: center; gap: 0.8rem; }
.vital p { margin: 0; display: grid; }
.vital-ring, .ops-ring { position: relative; width: 72px; height: 72px; flex: none; display: grid; place-items: center; }
.vital-ring b, .ops-ring b { position: absolute; font: 700 1.25rem var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.vring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.vring circle { fill: none; stroke-width: 7; }
.vring .track { stroke: color-mix(in srgb, var(--ink) 9%, transparent); }
.vring .arc { stroke: var(--vc, var(--accent)); stroke-linecap: round; transition: stroke-dasharray 1s var(--ease); }
.vring.ok { --vc: var(--ok); } .vring.warn { --vc: var(--warn); } .vring.bad { --vc: var(--bad); }
.vital.scripted { --vc: #8b6cf0; } .vital.produced { --vc: var(--info); } .vital.approved { --vc: var(--accent); } .vital.posted { --vc: #ff7aa8; }
.ep-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; }
.ep-strip .cell { height: 34px; border-radius: 8px; border: 0; display: grid; place-items: center; font: 600 0.72rem var(--font-text); color: var(--muted); background: color-mix(in srgb, var(--ink) 6%, transparent); cursor: pointer; transition: transform 0.2s var(--ease); padding: 0; }
.ep-strip .cell:hover { transform: translateY(-2px) scale(1.06); }
.ep-strip .k-work, .legend-row .k-work { background: color-mix(in srgb, #8b6cf0 40%, transparent); color: #fff; }
.ep-strip .k-made, .legend-row .k-made { background: color-mix(in srgb, var(--info) 55%, transparent); color: #fff; }
.ep-strip .k-approved, .legend-row .k-approved { background: var(--accent); color: var(--on-accent); }
.ep-strip .k-posted, .legend-row .k-posted { background: linear-gradient(135deg, #ff7aa8, #8b6cf0); color: #fff; }
.legend-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.8rem 0 0; }
.legend-row span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 10%, transparent); }

.reel-wrap .tile-head { padding: 0 0.3rem; }
.reel { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(8.5rem, 16vw, 11rem); gap: 0.75rem; overflow-x: auto; padding: 0.3rem 0.1rem 0.8rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.reel .spinner { margin: 2rem auto; }
.frame { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; border: 0; padding: 0; cursor: pointer; background: #0a0f13; scroll-snap-align: start; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); transition: transform 0.35s var(--ease), box-shadow 0.35s; }
.frame:hover, .frame.playing { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3); }
.frame img, .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame video { opacity: 0; transition: opacity 0.4s; }
.frame.playing video { opacity: 1; }
.frame .cap { position: absolute; inset: auto 0 0; padding: 2rem 0.7rem 0.6rem; text-align: left; color: #fff; font-size: 0.78rem; line-height: 1.25; background: linear-gradient(transparent, rgba(0, 0, 0, 0.82)); display: grid; }
.frame .cap b { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: #7ff0e6; }

.tiles.ops { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; }
.ops-claude .act-btns { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.2rem; }
.ops-claude .mid .bad { color: var(--bad); }
.ops .tile, .ops.tiles > .tile { display: grid; align-content: start; gap: 0.35rem; }
.ops p { margin: 0; }
.ops-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.45rem; height: 88px; align-items: end; margin: 0.3rem 0 0.3rem; }
.ops-bars .spinner { grid-column: 1 / -1; margin: 1rem auto; }
.ob { display: grid; gap: 4px; justify-items: center; height: 100%; grid-template-rows: 1fr auto; }
.stackbar { width: 100%; max-width: 26px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.stackbar i { display: block; height: var(--h); transition: height 0.8s var(--ease); }
.stackbar .ok { background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent)); }
.stackbar .bad { background: var(--bad); }
.ob small { font-size: 0.68rem; color: var(--muted); }
.ops-ring { margin: 0.3rem 0; }
.more-tile > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.6rem; }
.more-tile > summary::-webkit-details-marker { display: none; }
.more-tile > summary .chev { width: 18px; height: 18px; margin-inline-start: auto; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform 0.3s var(--ease); }
.more-tile[open] > summary .chev { transform: rotate(90deg); }
.more-tile .tiles .tile { background: color-mix(in srgb, var(--ink) 3%, transparent); }

@media (max-width: 900px) { .tiles.ops { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ops-runs { grid-column: 1 / -1; } }
@media (max-width: 720px) {
  .vital-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ep-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .home-hero { min-height: 24rem; }
  .hero-stats > div { min-width: 6.5rem; }
}
@media (prefers-reduced-motion: reduce) { .hero-aura i, .hero-eye .live { animation: none !important; } .hero-vid { transition: none; } }
.dash > * { min-width: 0; }
.todo-tile .brain-note { margin: 0.6rem 1.4rem 1.3rem; }
.todo-tile .todo-stale { display: flex; gap: 0.6rem; align-items: baseline; margin: 0 1.4rem 0.9rem; padding: 0.7rem 0.9rem; border-radius: 12px; font-size: 0.92rem; color: var(--ink); background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.todo-tile .todo-stale .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); transform: translateY(-1px); }
.todo-tile .todo-refresh { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 0.35rem; }
.todo-tile .todo-refresh svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.todo-tile .todo-refresh + .chev { margin-inline-start: 0; }
.todo-tile .todo-refresh[disabled] svg { animation: todo-spin 1s linear infinite; }
@keyframes todo-spin { to { transform: rotate(360deg); } }
.todo-tile #todo-run:empty { display: none; }
.todo-tile #todo-run { margin: 0 1.4rem 0.7rem; }
@media (max-width: 560px) { .todo-tile .todo-refresh span { display: none; } }
/* The clip itself, upright, on the right of the header; the same clip fills the background, blurred. */
.home-hero.has-vid .hero-vid { filter: blur(18px) saturate(1.2); opacity: 0.55; }
.hero-phone { position: absolute; right: clamp(4rem, 6vw, 5rem); top: 50%; height: 84%; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; z-index: 0; opacity: 0; transform: translateY(-46%) rotate(3deg); transition: opacity 1s var(--ease), transform 1s var(--ease);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 60px color-mix(in srgb, var(--accent) 35%, transparent); background: #000; }
.hero-phone video { width: 100%; height: 100%; object-fit: cover; }
.home-hero.has-vid .hero-phone { opacity: 1; transform: translateY(-50%) rotate(3deg); }
.home-hero .hero-in { position: relative; z-index: 1; padding-right: clamp(1.4rem, 30%, 18rem); }
@media (max-width: 720px) { .hero-phone { display: none; } .home-hero .hero-in { padding-right: clamp(1.4rem, 4vw, 2.6rem); } }
.group > .tool-row.action { padding: 0.85rem 1.1rem !important; border-radius: 0 !important; }
.tool-row > .icon { flex: none; }
.tool-row > .grow { flex: 1; }
@media (max-width: 720px) { .vital-ring { width: 60px; height: 60px; } .vital { gap: 0.6rem; } .hero-in { padding-top: 3.6rem; } }

/* Promotions (site/promotions.js): one card per ad platform, then the promotions list. */
.promo-setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.promo-conn { background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 14px; padding: 0.8rem 1rem; }
.promo-conn p { margin: 0 0 0.35rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.promo-conn p .st { margin-left: auto; }
.promo-conn code { display: block; font-size: 0.74rem; margin-top: 0.4rem; line-height: 1.5; word-break: break-all; }
.promo-countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.4rem 1rem; }
.promo-countries .check { margin: 0; white-space: nowrap; }
.promo-countries .check input { width: auto; flex: none; }
.promo-err { color: var(--bad); grid-column: 1 / -1; margin: 0; }
#promo-total { margin: 0.2rem 0 0; }
@media (max-width: 720px) { .promo-setup { grid-template-columns: 1fr; } #promo-list .camps li { grid-template-columns: 1fr; } #promo-list .camps .tools { flex-wrap: wrap; } }
.field-stack #promo-goal-note, .field-stack #promo-total { grid-column: 1 / -1; }
.promo-conn .field { margin: 0.5rem 0 0; font-size: 0.8rem; }
.promo-key { margin-bottom: 0.8rem; }
.promo-key p { display: block; }
.promo-key .act-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.promo-routes { margin-bottom: 0.8rem; }
.promo-routes .label span { display: block; font-weight: 400; margin-top: 0.15rem; }
.promo-route-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem 0.8rem; }
.promo-route-row .field > span { display: flex; align-items: center; gap: 0.35rem; }
.promo-customs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.4rem; }
.promo-customs .promo-cchip { padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--surface-2, rgba(255,255,255,0.06)); font-size: 0.85rem; }
.promo-conn[data-direct] .field { margin: 0.3rem 0; }
.promo-find { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.promo-find input { flex: 1; }
.promo-find select { width: auto; }
#promo-product .field > span .btn { margin-left: 0.5rem; padding: 0.15rem 0.6rem; font-size: 0.78rem; }
#promo-list .camps li.promo-item { grid-template-columns: 3.6rem 1fr auto; }
.editor #promo-product textarea { min-height: 6rem; }
#promo-product .field-row { grid-template-columns: 2fr 1fr; }
.promo-thumb { width: 3.6rem; height: 3.6rem; object-fit: cover; border-radius: 10px; background: var(--hair); }
@media (max-width: 720px) { #promo-product .field-row { grid-template-columns: 1fr; } #promo-list .camps li.promo-item { grid-template-columns: 3.6rem 1fr; } #promo-list .camps li.promo-item .tools { grid-column: 1 / -1; } }
#sheet-input.secret { -webkit-text-security: disc; text-security: disc; font-family: monospace; }

/* Flow → Promote: the library as a pick list, at most N (Settings → Flow) picked at once. */
#promote .promote-row { max-height: 22rem; overflow-y: auto; padding: 2px; }
#promote .mp:disabled { opacity: 0.45; cursor: not-allowed; }
#promote .act-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.4rem 0 0; }
#promote .promote-plats { align-items: center; margin: 0 0 0.6rem; }

/* Promotions: Posting (how campaigns go out per platform) and one post link per ticked platform in the form */
.promo-posting .promo-route-row .field > .muted, .promo-posting .promo-route-row .field > select + select { margin-top: 0.25rem; }
.promo-chain { margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--line); display: grid; gap: 0.4rem; }
.promo-chain .check { display: block; line-height: 1.45; margin: 0; color: var(--ink); }
.promo-chain .check .muted { display: block; margin-left: 1.5rem; }
.promo-chain input#chain-playlist { width: 100%; }
.promo-posting .promo-route-row .field > .muted { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#promo-posts { display: grid; gap: 0.6rem; }
.promo-post { border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 12px; padding: 0.55rem 0.7rem; display: grid; gap: 0.35rem; }
.promo-post-head { margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.promo-none { margin: 0; }

/* Outreach (site/outreach.js): views, the pipeline board, venue rows, history. */
.out-seg { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 1.2rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--hair); }
.out-seg button { background: none; border: 0; border-radius: 999px; padding: 0.45rem 1rem; color: var(--muted); font: inherit; cursor: pointer; }
.out-seg button:hover { color: var(--ink); }
.out-seg button[aria-pressed="true"] { background: var(--card-hi); color: var(--ink); font-weight: 500; }
.out-stats { margin-bottom: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.out-due-box { margin-bottom: 1.2rem; padding: 1rem 1.2rem; border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.out-due-box p { margin: 0; }
.out-mail { display: grid; gap: 0.1rem; }
.out-mail .field { margin-bottom: 0.5rem; }
.out-stats .v.warn { color: var(--warn); }
.out-board { display: grid; grid-template-columns: repeat(5, minmax(13rem, 1fr)); gap: 0.8rem; overflow-x: auto; padding-bottom: 0.6rem; margin-bottom: 0.6rem; }
.out-col { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 0.7rem; display: grid; gap: 0.5rem; align-content: start; min-width: 0; }
.out-col h3 { font-size: 0.92rem; display: flex; justify-content: space-between; padding: 0.1rem 0.25rem; }
.out-card { display: grid; gap: 0.35rem; text-align: start; background: var(--card-hi); border: 1px solid var(--line); border-radius: 12px; padding: 0.65rem 0.75rem; color: var(--ink); font: inherit; cursor: pointer; }
.out-card:hover { border-color: var(--accent); }
.out-card b { font-weight: 500; }
.out-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.out-tag { font-size: 0.72rem; border-radius: 999px; padding: 0.05rem 0.5rem; background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); white-space: nowrap; }
.out-tag.type { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--muted); }
.out-due { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.out-due.soon { color: var(--warn); font-weight: 500; }
.out-due.past { text-decoration: line-through; }
.out-tbl tbody tr { cursor: pointer; }
.out-tbl tbody tr:hover td { background: var(--card-hi); }
.out-tbl tr.out-banned td { opacity: 0.5; }
.out-sub { display: block; margin-top: 0.1rem; }
.out-check { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; color: var(--muted); }
.out-start { max-width: 40rem; display: grid; gap: 0.6rem; }
.out-warn { color: var(--bad); margin: -0.4rem 0 1rem; }
.field-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .field-row.two { grid-template-columns: 1fr; } }
.out-side { display: grid; gap: 0.6rem; }
.out-side p { margin: 0; }
.out-side textarea { width: 100%; min-height: 12rem; resize: vertical; color: var(--ink); font-size: 0.88rem; }
.out-stages { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.out-stage { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem; color: var(--muted); font: inherit; font-size: 0.84rem; cursor: pointer; }
.out-stage[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.out-stage:disabled { opacity: 0.35; cursor: default; }
.out-hist { margin-top: 1.4rem; border-top: 1px solid var(--hair); padding-top: 1rem; display: grid; gap: 0.7rem; }
.out-log { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }
@media (max-width: 720px) { .out-log { grid-template-columns: 1fr 1fr; } .out-log input[name="text"] { grid-column: 1 / -1; } }
.out-evs { list-style: none; margin: 0; padding: 0; display: grid; }
.out-ev p:last-child { white-space: pre-line; }
.out-evs.tile { padding: 0.4rem 1.2rem; }
.out-ev { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: start; padding: 0.6rem 0; border-bottom: 1px solid var(--hair); }
.out-ev:last-child { border-bottom: 0; }
.out-ev .st { justify-self: start; }
.out-ev p { margin: 0; overflow-wrap: anywhere; }
.out-x { color: var(--muted) !important; font-size: 1.1rem; line-height: 1; padding: 0 0.3rem !important; }
.out-x:hover { color: var(--bad) !important; }
.out-pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.9rem; }
.out-pkg { text-align: start; color: var(--ink); font: inherit; cursor: pointer; display: grid; gap: 0.4rem; align-content: start; }
.out-pkg:hover { border-color: var(--accent); }
.out-pkg p { margin: 0; }
.out-pick { margin: 0.2rem 0 0.4rem 1.6rem; }
.out-pick summary { cursor: pointer; font-size: 0.88rem; }
.out-pick .out-pick-q { margin: 0.5rem 0; width: 100%; max-width: 22rem; }
.out-pick .out-items { max-height: 16rem; }
.out-items { display: grid; gap: 0.35rem; max-height: 32rem; overflow-y: auto; margin: 0; }
.out-replies { margin: 0 0 1rem; display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.out-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.out-dot.live { background: var(--ok); }
.out-replies .plain { color: var(--accent); }
/* Home: new followers */
.fol-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.8rem; margin: 0.6rem 0 0.4rem; }
.fol-row .v { font-size: 1.5rem; font-weight: 600; margin: 0.1rem 0 0; }
.fol-row .up { color: var(--ok); }
.fol-row .down { color: var(--bad); }
.fol-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.fol-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; }
.fol-list img, .fol-list .ph { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--line); }
.fol-list .who { min-width: 0; }
.fol-list .who b, .fol-list .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fol-list .act-btns { display: flex; gap: 0.3rem; }
#out-pform textarea { min-height: 0; }
@media (max-width: 560px) { .fol-list li { grid-template-columns: 36px minmax(0, 1fr); } .fol-list .act-btns { grid-column: 2; } }
.out-ai { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.2rem 0 0.6rem; min-width: 0; }
.out-ai input { flex: 1 1 10rem; min-width: 0; }
.out-ai .btn { white-space: nowrap; }
.out-side, .out-mail { min-width: 0; }
.out-answer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: 0.5rem; }
.out-answer p { margin: 0; }
.out-answer textarea { width: 100%; }
.out-ai-field { font-size: 0.78rem; color: var(--accent); margin-inline-start: 0.4rem; display: inline-flex; align-items: center; gap: 0.2rem; }
.out-ai-field .ic { width: 0.9em; height: 0.9em; }
.out-contacts { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.4rem; }
.out-contacts legend { margin-bottom: 0.4rem; }
#out-crows { display: grid; gap: 0.4rem; }
.out-crow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1.4fr) 4.5rem 1.6rem; gap: 0.4rem; align-items: center; }
.out-crow input { min-width: 0; }
.out-csrc { font-size: 0.78rem; white-space: nowrap; }
.out-contacts > .plain { justify-self: start; color: var(--accent); display: inline-flex; gap: 0.3rem; align-items: center; }
.out-to-pick { margin: -0.3rem 0 0.4rem; }
@media (max-width: 560px) { .out-crow { grid-template-columns: 1fr 1fr; } .out-crow input[name="c_email"] { grid-column: 1 / -1; } }

/* Visits (site/visits.js) */
#visits .tile { margin-bottom: 1rem; }
#visits .tiles { margin-bottom: 0; }
#visits h3 { margin: 0 0 0.9rem; font-size: 1rem; }
.vis-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem; margin: 0 0 1.2rem; }
.vis-bar .vis-seg { margin: 0; padding: 0; border: 0; }
.vis-admins { display: inline-flex; align-items: center; gap: 0.4rem; }
.vis-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.vis-kpi { display: grid; gap: 0.15rem; min-width: 0; }
.vis-kpi b { font-size: 1.9rem; font-weight: 650; line-height: 1.1; }
.vis-chart { width: 100%; height: auto; display: block; }
.vis-chart text { font-size: 11px; fill: var(--muted); }
.vis-chart .vis-col { fill: color-mix(in srgb, var(--accent) 35%, transparent); }
.vis-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.vis-axis { stroke: var(--hair); }
.vis-legend { display: flex; align-items: center; gap: 0.4rem; margin: 0.4rem 0 0; }
.vis-key { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-left: 0.6rem; }
.vis-key.bar { background: color-mix(in srgb, var(--accent) 35%, transparent); margin-left: 0; }
.vis-key.line { height: 3px; background: var(--accent); }
.vis-rank, .vis-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.vis-rank li, .vis-funnel li { position: relative; display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.6rem; border-radius: 6px; min-width: 0; }
.vis-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 6px; z-index: 0; }
.vis-label { position: relative; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vis-rank b, .vis-funnel b, .vis-funnel .small { position: relative; }
.vis-funnel .small { width: 3rem; text-align: right; }
.vis-gap { margin-top: 1.4rem !important; }
.vis-heat { display: grid; grid-template-columns: 2.4rem repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.vis-cell { aspect-ratio: 1; border-radius: 2px; background: color-mix(in srgb, var(--accent) calc(var(--a) * 100%), color-mix(in srgb, var(--ink) 6%, transparent)); }
.vis-heat-day, .vis-heat-hour { font-size: 0.7rem; color: var(--muted); }
.vis-table-wrap { overflow-x: auto; }
.vis-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.vis-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.78rem; padding: 0 0.6rem 0.5rem; }
.vis-table td { padding: 0.55rem 0.6rem; border-top: 1px solid var(--hair); vertical-align: top; }
.vis-foot { margin-top: 0.5rem; }
@media (max-width: 900px) { .vis-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .vis-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vis-kpi b { font-size: 1.5rem; }
  .vis-table th:nth-child(4), .vis-table td:nth-child(4) { display: none; }
}
/* System → Connector audit log (site/audit.js) */
.aud { margin-top: 1.2rem; }
.aud > summary { cursor: pointer; font-weight: 600; }
.aud > summary .small { font-weight: 400; margin-left: 0.4rem; }
.aud[open] > summary { margin-bottom: 1rem; }
.aud h3 { margin: 0 0 0.9rem; font-size: 1rem; }
.aud-bar { gap: 0.6rem 1rem; }
.aud-filters, .aud-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; }
.aud-filters select, .aud-custom input { font: inherit; font-size: 0.86rem; padding: 0.3rem 0.5rem; border-radius: 8px; border: 1px solid var(--hair); background: var(--panel); color: var(--ink); max-width: 14rem; }
.aud-custom label { display: inline-flex; align-items: center; gap: 0.4rem; }
.aud-kpis { margin-bottom: 1.2rem; }
.aud-kpi-err b { color: var(--bad); }
.aud-kpi-den b { color: var(--warn); }
.aud-sec { margin: 0 0 1.4rem; min-width: 0; }
.aud .tiles.two { margin-bottom: 0; }
.aud-ok { fill: var(--accent); }
.aud-err { fill: var(--bad); }
.aud-den { fill: var(--warn); }
.aud-hit { fill: transparent; }
.aud-col:hover .aud-hit { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.aud-k-ok { background: var(--accent); margin-left: 0; }
.aud-k-err { background: var(--bad); }
.aud-k-den { background: var(--warn); }
.aud-per { margin-left: auto; }
.aud-meta { position: relative; white-space: nowrap; }
.aud-err-t { color: var(--bad); }
.aud-den-t { color: var(--warn); }
.aud-table td.nowrap { white-space: nowrap; }
.aud-args { display: block; color: var(--muted); font-size: 0.78rem; overflow-wrap: anywhere; white-space: pre-wrap; max-width: 30rem; }
.aud-error { color: var(--bad); margin-top: 0.25rem; }
.aud-chg { font-size: 0.7rem; padding: 0.05rem 0.4rem; border-radius: 999px; border: 1px solid var(--hair); color: var(--muted); }
.aud-badge { white-space: nowrap; font-size: 0.8rem; font-weight: 600; }
.aud-badge.aud-ok { color: var(--ok); }
.aud-badge.aud-error { color: var(--bad); }
.aud-badge.aud-denied { color: var(--warn); }
@media (max-width: 600px) {
  /* One card per event on a phone: time and result on top, then who, what and the details. */
  .aud-table thead { display: none; }
  .aud-table tr { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.6rem; padding: 0.6rem 0; border-top: 1px solid var(--hair); }
  .aud-table td { border: 0; padding: 0; }
  .aud-table td:nth-child(2), .aud-table td:nth-child(3), .aud-table td:nth-child(4) { grid-column: 1 / -1; }
  .aud-table td:nth-child(5) { grid-row: 1; grid-column: 2; }
  .aud-filters select { max-width: 9.5rem; }
}
/* Outreach: the email preview before Send. */
.sheet.out-preview { width: min(44rem, calc(100vw - 24px)); }
.out-mailhead { display: grid; gap: 0.25rem; margin: 0 0 0.8rem; font-size: 0.9rem; }
.out-mailhead div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.5rem; }
.out-mailhead dt { color: var(--muted); }
.out-mailhead dd { margin: 0; overflow-wrap: anywhere; }
.out-mailbody { width: 100%; height: min(55vh, 34rem); border: 1px solid var(--hair); border-radius: 12px; background: #fff; }

/* Library → the series page's episodes (functions/series.mjs) */
.series-tile { margin: 0 0 1rem; }
.series-head { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: baseline; justify-content: space-between; }
.series-head .label { margin: 0; }
.series-tile > .muted { margin: 0.25rem 0 0.75rem; }
.series-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.series-list li { display: flex; gap: 0.4rem; align-items: center; padding: 0.5rem 0; border-top: 1px solid var(--line, rgba(127,127,127,0.2)); }
.series-list li:first-child { border-top: 0; }
.series-list .grow { flex: 1; min-width: 0; }
.series-list .s-row { display: flex !important; flex-wrap: wrap; gap: 0.2rem 0.8rem; align-items: baseline; }
.series-list .s-ttl { font-weight: 600; }
.series-list .s-now { font-size: 0.78rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.lib-series { margin-top: 0.4rem; }

/* Settings → Flow → Section order (admin.js drawFlowOrder). */
.flow-order-row { align-items: flex-start; }
.flow-order-row > div { display: flex; flex-direction: column; }
.flow-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; min-width: 14rem; counter-reset: fo; }
.flow-order li { display: flex; align-items: center; gap: 0.3rem; border: 1px solid var(--line); border-radius: 10px; padding: 0.25rem 0.3rem 0.25rem 0.7rem; counter-increment: fo; }
.flow-order li::before { content: counter(fo); color: var(--muted); font-size: 0.8rem; width: 1.1rem; }
.flow-order li span { flex: 1; }
.flow-order .btn { padding: 0.2rem 0.55rem; min-width: 2rem; }
.flow-order .btn:disabled { opacity: 0.3; }
@media (max-width: 640px) { .flow-order { min-width: 0; width: 100%; } }

/* Library → Episode stills (site/stills.js): one folded row per episode, its pictures with their titles inside. */
.stills-box { margin-top: 0.4rem; }
.stills-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.stills-head .group-title { margin-bottom: 0.2rem !important; }
.stills-note { margin: 0 0 0.7rem 1rem; }
.still-ep { background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 14px; margin-bottom: 0.5rem; overflow: hidden; }
.still-ep > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.9rem; min-height: 3.2rem; }
.still-ep > summary::-webkit-details-marker { display: none; }
.still-ep > summary::before { content: "›"; font-size: 1.2rem; line-height: 1; color: var(--muted); transition: transform 0.2s var(--ease); }
.still-ep[open] > summary::before { transform: rotate(90deg); }
.still-ep > summary:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.still-n { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3.2rem; color: var(--muted); }
.still-ep .ttl { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.still-strip { display: flex; gap: 3px; }
.still-strip i, .still-choice i { display: block; width: 1.35rem; aspect-ratio: 9 / 16; border-radius: 3px; background: color-mix(in srgb, var(--ink) 10%, transparent) center / cover no-repeat; }
.still-ep[open] .still-strip { visibility: hidden; }
.stills { list-style: none; margin: 0; padding: 0.2rem 0.9rem 0.9rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.8rem; }
.still { display: flex; flex-direction: column; gap: 0.35rem; position: relative; }
.still-pic { display: block; aspect-ratio: 9 / 16; border-radius: 10px; background: color-mix(in srgb, var(--ink) 8%, transparent) center / cover no-repeat; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.still-pic.on:hover { transform: translateY(-2px); box-shadow: 0 8px 22px -12px #000; }
.still-ttl { font-size: 0.82rem; margin: 0; line-height: 1.3; }
textarea.still-ttl { resize: none; overflow: hidden; line-height: 1.3;  width: 100%; border: 1px solid transparent; background: transparent; color: var(--ink); padding: 0.2rem 0.3rem; border-radius: 6px; font: inherit; font-size: 0.82rem; }
textarea.still-ttl:hover { border-color: color-mix(in srgb, var(--ink) 15%, transparent); }
textarea.still-ttl:focus { border-color: var(--accent); outline: none; background: var(--bg); }
.still-acts { margin: 0; padding: 0 0.9rem 0.8rem; }
.lf-cap { width: 100%; font-size: 0.8rem; margin-bottom: 0.2rem; }
dialog.still-pick { width: min(46rem, 94vw); }
.still-pick-body { max-height: 62vh; overflow: auto; margin: 0.6rem 0; }
.still-choices { list-style: none; margin: 0; padding: 0.2rem 0.9rem 0.9rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.6rem; }
.still-choice { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.78rem; line-height: 1.25; }
.still-choice i { width: 100%; border-radius: 8px; }
.still-choice:hover i, .still-choice:focus-visible i { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) {
  .still-strip { display: none; }
  .stills { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.6rem; padding: 0.2rem 0.6rem 0.7rem; }
  .stills-note { margin-left: 0.4rem; }
}

/* To-dos: the hand-done guide (steps with Open and Copy text) and the result of a Do it */
.todo-tile .act-guide, #reports .act-guide { margin-top: 0.55rem; }
.act-guide > summary { cursor: pointer; font-size: 0.88rem; color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.act-guide > summary::-webkit-details-marker { display: none; }
.act-guide > summary::before { content: "›"; display: inline-block; transition: transform 0.2s var(--ease); }
.act-guide[open] > summary::before { transform: rotate(90deg); }
.act-guide ol { margin: 0.6rem 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0.55rem; }
.act-guide ol > li, .act-result .issues > li { display: block; }
.act-guide ol > li { counter-increment: step; position: relative; padding: 0.65rem 0.8rem 0.65rem 2.4rem; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); border: 1px solid var(--hair); }
.act-guide ol > li::before { content: counter(step); position: absolute; left: 0.75rem; top: 0.65rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; font-weight: 600; color: var(--on-accent); background: var(--accent); }
.act-guide ol > li > p { margin: 0; font-size: 0.92rem; }
.act-guide .paste pre { margin: 0.45rem 0 0; padding: 0.55rem 0.7rem; border-radius: 9px; white-space: pre-wrap; font-family: inherit; font-size: 0.85rem; line-height: 1.45; background: color-mix(in srgb, var(--ink) 6%, var(--bg)); border-inline-start: 3px solid var(--accent); max-height: 9.5em; overflow: auto; }
.act-guide .act-btns { margin-top: 0.45rem; }
.act-result { margin-top: 0.6rem; padding: 0.7rem 0.85rem; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 3%, transparent); }
.act-result .verdict { display: flex; gap: 0.5rem; align-items: baseline; margin: 0 0 0.3rem; }
.act-result .verdict .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.act-result .verdict.ok .dot { background: var(--ok); }
.act-result .verdict.bad .dot { background: var(--bad); }
.act-result .issues { margin: 0.4rem 0 0; padding-inline-start: 1.1rem; font-size: 0.88rem; display: grid; gap: 0.35rem; }
.act-result p { margin: 0.2rem 0; }
.acts li > div { min-width: 0; }
.act-guide .paste pre, .act-guide ol > li > p { overflow-wrap: anywhere; }
#s-master.bad { color: var(--bad); }

/* Search the Studio (site/search.js): a button under the brand switcher, and a box over the page. */
.find-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--card); border: 1px solid var(--hair); border-radius: 10px; padding: 8px 10px; color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; text-align: start; }
.find-btn:hover { color: var(--ink); border-color: var(--line); }
.find-btn span { flex: 1; }
.find-btn svg, .find-in svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; flex: none; }
.find-btn kbd { font: 600 0.72rem var(--font-text); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; color: var(--muted); }
.find { border: 0; padding: 0; background: transparent; color: var(--ink); width: min(40rem, calc(100vw - 24px)); max-height: none; margin: 10vh auto auto; overflow: visible; }
.find::backdrop { background: color-mix(in srgb, #000 45%, transparent); backdrop-filter: blur(4px); }
.find-box { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); overflow: hidden; }
.find-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--hair); color: var(--muted); }
.admin .find-in input, .admin .find-in input:focus { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 1.02rem; padding: 4px 0; border-radius: 0; }
.find-in input::-webkit-search-cancel-button { display: none; }
.find-x { background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font: inherit; font-size: 0.75rem; padding: 2px 7px; cursor: pointer; }
.find-out { max-height: min(60vh, 32rem); overflow-y: auto; padding: 6px; }
.find-head { margin: 0.6rem 0.6rem 0.25rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.find-row { display: grid; gap: 1px; width: 100%; text-align: start; background: none; border: 0; border-radius: 10px; padding: 8px 10px; color: var(--ink); font: inherit; cursor: pointer; }
.find-row b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-row[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.find-sub { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-note { margin: 0.6rem 0.6rem 0.4rem; }
.find-card { padding: 0.6rem 0.8rem 0.8rem; }
.find-card h2 { margin: 0.3rem 0 0.5rem; font-size: 1.1rem; }
.find-card ol { margin: 0.4rem 0 0.9rem; padding-inline-start: 1.3rem; display: grid; gap: 0.35rem; }
.find-card .act-btns { flex-wrap: wrap; }
.find-hit { outline: 2px solid var(--accent) !important; outline-offset: 4px; border-radius: 8px; animation: find-hit 2.4s var(--ease, ease) both; }
@keyframes find-hit { 0%, 40% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .find-hit { animation: none; } }
@media (max-width: 860px) {
  .find-btn { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 11px; flex: none; }
  .find-btn span, .find-btn kbd { display: none; }
  .find { margin: 12px auto auto; }
}

/* Search, Spotlight style: icons per kind, kind chips, a preview pane beside the list on wide screens */
.find { transition: width 0.18s ease; }
.find.has-pv { width: min(58rem, calc(100vw - 24px)); }
.find-main { display: grid; grid-template-columns: 1fr; }
.find.has-pv .find-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.find-pv { display: none; border-inline-start: 1px solid var(--hair); max-height: min(60vh, 32rem); overflow-y: auto; }
.find.has-pv .find-pv { display: block; }
.find-pv-in { padding: 14px 16px 16px; }
.find-pv-in h2 { margin: 0.2rem 0 0.15rem; font-size: 1.15rem; line-height: 1.3; }
.find-pv-kind { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.find-pv-kind .find-ic { width: 22px; height: 22px; border-radius: 6px; }
.find-pv-kind .find-ic svg { width: 14px; height: 14px; }
.find-pv-body { margin: 0.7rem 0 0.9rem; font-size: 0.92rem; line-height: 1.5; }
.find-pv-h { margin: 0 0 0.35rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.find-pv-lead { margin: 0 0 0.7rem; color: var(--muted); }
.find-pv-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.find-script { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.find-script li { padding: 5px 8px; border-radius: 8px; }
.find-script li.on { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.find-script .who { display: block; font-size: 0.72rem; color: var(--muted); }
.find mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.find-row { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; }
.find-txt { display: grid; gap: 1px; min-width: 0; }
.find-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: color-mix(in srgb, var(--k, var(--muted)) 18%, transparent); color: var(--k, var(--muted)); flex: none; }
.find-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.k-episode { --k: #ff6b5e; } .k-line { --k: #f4a340; } .k-doc { --k: #b48cf2; } .k-item { --k: #4fb6f4; }
.k-campaign { --k: #3fc98a; } .k-promotion { --k: #f06aa8; } .k-venue { --k: #e8c547; } .k-page { --k: #5fd0c8; }
.k-tab, .k-how, .k-ask { --k: var(--accent); }
.find-snip { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-more { grid-column: 1 / -1; font-size: 0.82rem; color: var(--accent); padding-inline-start: 38px; }
.find-chips { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; }
.find-chips button { flex: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); font: inherit; font-size: 0.8rem; cursor: pointer; }
.find-chips button span { opacity: 0.7; margin-inline-start: 2px; }
.find-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.find-foot { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px; border-top: 1px solid var(--hair); font-size: 0.75rem; color: var(--muted); }
.find-foot .spinner.sm { width: 12px; height: 12px; margin: 0; border-width: 2px; }
.find-card .find-pv-in { padding: 0.4rem 0 0; }
@media (max-width: 720px) {
  .find, .find.has-pv { width: calc(100vw - 16px); margin: 8px auto auto; }
  .find.has-pv .find-main { grid-template-columns: 1fr; }
  .find.has-pv .find-pv { display: none; }
  .find-out { max-height: calc(100dvh - 170px); }
  .find-row { padding: 9px 8px; }
  .find-foot-more { display: none; }
}

/* Brand types (site/brandtype.js): the Products tab, Home's shop cards and Settings → Brand type */
.tile.wide { margin-bottom: 1rem; }
.pill.soon { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.bad-text { color: var(--bad); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.prod-card { display: flex; flex-direction: column; gap: 0.6rem; background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); padding: 0.8rem; min-width: 0; }
.prod-card img, .prod-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.prod-body { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }
.prod-body p { margin: 0.3rem 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-prods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.home-prod { display: flex; flex-direction: column; gap: 0.3rem; background: none; border: 1px solid var(--hair); border-radius: 10px; padding: 0.4rem; font: inherit; font-size: 0.8rem; color: var(--ink); cursor: pointer; text-align: start; min-width: 0; }
.home-prod img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; }
.home-prod span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-prod:hover { border-color: var(--accent); }
.bt { display: flex; flex-direction: column; gap: 1rem; }
.bt-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.bt-type, .bt-brick { display: flex; gap: 0.6rem; align-items: flex-start; border: 1px solid var(--hair); border-radius: 10px; padding: 0.6rem 0.7rem; cursor: pointer; }
.bt-brick { padding: 0.35rem 0.6rem; font-size: 0.9rem; }
.bt-brick > span { min-width: 0; }
.bt-brick .muted.small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.span-all { grid-column: 1 / -1; }
.soon-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.8rem 1.2rem; }
.soon-list li { display: flex; flex-direction: column; gap: 0.15rem; }
.bt-type:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.bt-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bt-group { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.bt-brick:not(.on) { opacity: 0.7; }
@media (max-width: 720px) { .bt-types, .bt-groups { grid-template-columns: 1fr; } .home-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bt-new { border-top: 1px solid var(--hair); padding-top: 0.8rem; }
.bt-new input[type="text"] { font: inherit; padding: 0.45rem 0.7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); min-width: 0; flex: 1 1 200px; max-width: 320px; }

/* Sales, Bookings, Signups, Releases (site/business.js) */
.biz-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.biz-head h1 { margin: 0; }
.biz-body > .tile { margin-bottom: 1rem; }
.biz-bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; margin-top: 1rem; padding-bottom: 1.2rem; }
.biz-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-width: 2px; }
.biz-bar i { display: block; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 1px; }
.biz-bar span { position: absolute; top: 100%; left: 0; font-size: 0.7rem; color: var(--muted); white-space: nowrap; margin-top: 0.25rem; }
.biz-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.biz-table th { text-align: start; font-weight: 500; color: var(--muted); font-size: 0.8rem; padding: 0.3rem 0.4rem; }
.biz-table td { padding: 0.35rem 0.4rem; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.biz-table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.biz-reqs { list-style: none; margin: 0; padding: 0; }
.biz-reqs li { padding: 0.8rem 0; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.biz-reqs li:first-child { border-top: 0; padding-top: 0; }
.biz-reqs p { margin: 0.3rem 0 0; }
.biz-rel ul { margin: 0.2rem 0 0.6rem; padding-inline-start: 1.2rem; }
.bt-set { display: block; width: 100%; margin: 0.35rem 0 0.2rem; font-size: 0.85rem; }
.biz-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.biz-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .biz-stats, .biz-stats.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Library → Rework (site/rework.js) */
.rw-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.3rem 1rem; max-height: 220px; overflow: auto; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 12px; margin: 0.3rem 0 0.8rem; }
.rw-item { display: flex; gap: 0.45rem; align-items: center; min-width: 0; }
.rw-item span[dir] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-chains { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.rw-chain { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rw-head { display: flex; gap: 0.6rem; align-items: flex-start; width: 100%; text-align: start; background: none; border: 0; color: inherit; font: inherit; padding: 0.7rem 0.9rem; cursor: pointer; }
.rw-head .dot { margin-top: 0.45rem; flex: none; }
.rw-head > span:last-child { min-width: 0; flex: 1; }
.rw-ask { display: block; margin-top: 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70ch; }
.rw-chain.open .rw-ask { white-space: normal; }
.rw-body { padding: 0 0.9rem 0.9rem; }
.rw-player { display: flex; justify-content: center; background: #000; border-radius: 12px; overflow: hidden; margin: 0.3rem 0 0.5rem; }
.rw-player video { max-width: 100%; max-height: 62vh; display: block; }
.rw-notes { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 10px; padding: 0.5rem 0.7rem; }
.rw-again { margin-top: 0.6rem; }
@media (max-width: 640px) { .rw-items { grid-template-columns: 1fr; } .rw-player video { max-height: 55vh; } }
.rw-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 0.6rem; margin: 0.4rem 0 0.6rem; }
.rw-cut { margin: 0; }
.rw-cut img { width: 100%; aspect-ratio: var(--rw-ratio, 9 / 16); object-fit: cover; border-radius: 10px; background: color-mix(in srgb, var(--ink) 8%, transparent); display: block; }
.rw-end img { outline: 2px solid var(--accent); outline-offset: 2px; }
.rw-cut figcaption { margin-top: 0.25rem; }
.rw-outro { border: 1px solid var(--line); border-radius: 12px; padding: 0.6rem 0.9rem; margin-bottom: 0.6rem; }
.rw-outro ol { margin: 0.3rem 0 0; padding-inline-start: 1.3rem; display: grid; gap: 0.2rem; }
.rw-outro .rw-cta { list-style: none; margin-top: 0.3rem; margin-inline-start: -1.3rem; }
@media (max-width: 640px) { .rw-board { grid-template-columns: repeat(3, 1fr); } }

/* Library ⬇: saves the file instead of opening it in the browser, top-right on every card and still. */
.lib-card { position: relative; }
.dl-btn { position: absolute; top: 0.45rem; inset-inline-end: 0.45rem; z-index: 3; width: 2rem; height: 2rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 999px; cursor: pointer; color: #fff; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(4px); opacity: 0.85; transition: opacity 0.15s, background 0.15s; }
.dl-btn:hover, .dl-btn:focus-visible { opacity: 1; background: var(--accent); color: var(--bg); }
.dl-btn:disabled { opacity: 0.4; cursor: progress; }
.dl-btn .ic { width: 1rem; height: 1rem; }
.tbl-wrap { overflow-x: auto; }
#autopost .lang-times label { display: block; white-space: nowrap; }
#autopost .lang-times input[type=time] { margin-left: .4rem; }

/* Usage (site/usage.js) */
.use-bar { justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.6rem; }
.use-custom input { width: auto; }
.use-act { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr 4.5rem; gap: 0.8rem; align-items: center; margin: 0.45rem 0; }
.use-act b { text-align: right; }
.use-tbl td:first-child { min-width: 0; }
.use-tbl .num { text-align: right; }
.use-tbl .nowrap { white-space: nowrap; }
.use-tbl td { white-space: normal; }
.use-tbl tr.total td { border-bottom: 0; }
