/* =========================================================
   GoodNews+ Admin — Black & Gold theme
   Palette matches the GN+ app: deep black, gold gradient, a touch of brown.
   No blue anywhere. Gold is for actions + highlights, never heavy borders.
   ========================================================= */

:root {
  /* blacks */
  --bg:        #070605;
  --bg-2:      #0d0b09;
  --surface:   #13110e;
  --surface-2: #1a1713;
  --surface-3: #221e18;
  --line:      rgba(255, 236, 200, .07);
  --line-2:    rgba(255, 236, 200, .12);

  /* gold */
  --gold-50:  #fff4d1;
  --gold-100: #f8e3a1;
  --gold-300: #f0c95a;
  --gold-400: #e5b53a;
  --gold-500: #d4a02a;
  --gold-600: #b1821c;
  --gold-700: #8a6414;
  --gold-grad: linear-gradient(100deg, #fbe7a6 0%, #eec453 35%, #d39f2a 70%, #a77a19 100%);
  --gold-grad-soft: linear-gradient(135deg, rgba(240,201,90,.16), rgba(167,122,25,.06));
  --gold-glow: 0 8px 28px -8px rgba(229, 181, 58, .45);

  /* brown */
  --brown-500: #6b4a2b;
  --brown-700: #3a2817;

  /* text */
  --text:   #f6f1e7;
  --text-2: #c9bfae;
  --text-3: #8a8072;
  --text-4: #5d554b;

  /* status (warm-shifted, no blue) */
  --ok:     #6fcf8e;  --ok-bg:   rgba(111,207,142,.12);
  --warn:   #f0b84a;  --warn-bg: rgba(240,184,74,.13);
  --bad:    #ef6b5b;  --bad-bg:  rgba(239,107,91,.12);
  --info:   #d8c7a4;  --info-bg: rgba(216,199,164,.10);

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px -16px rgba(0,0,0,.8);

  --side-w: 268px;
  --top-h: 68px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(var(--acc-rgb),.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(var(--brown-rgb),.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(var(--acc-rgb),.35); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }

/* ---------------- Layout ---------------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-2) 100%);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-logo {
  font-weight: 800; letter-spacing: .5px; line-height: .9; font-size: 22px;
}
.brand-logo small { display: block; font-size: 9px; letter-spacing: 4.5px; font-weight: 600; margin-top: 3px; }
.brand-tag {
  margin-left: auto; font-size: 10px; font-weight: 600; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 999px; color: var(--gold-300);
  background: rgba(var(--acc-rgb),.1);
}

.nav-group { margin-top: 14px; }
.nav-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-4); padding: 0 12px 6px;
}
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin: 2px 0;
  border-radius: var(--r);
  color: var(--text-2); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active {
  color: var(--gold-100);
  background: var(--gold-grad-soft);
}
.nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--gold-grad);
}
.nav a.active svg { color: var(--gold-300); opacity: 1; }
.nav .count {
  margin-left: auto; font-size: 11px; font-weight: 600;
  padding: 1px 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-2);
}
.nav a.active .count { background: rgba(var(--acc-rgb),.18); color: var(--gold-100); }

.nav button.nav-parent {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin: 2px 0; border: 0; border-radius: var(--r);
  background: none; color: var(--text-2); font: 500 14px var(--font); cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
}
.nav button.nav-parent svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav button.nav-parent .caret { margin-left: auto; width: 15px; height: 15px; transition: transform .2s; opacity: .6; }
.nav button.nav-parent:hover { background: var(--surface-2); color: var(--text); }
.nav-item.open > button.nav-parent { color: var(--text); }
.nav-item.open > button.nav-parent .caret { transform: rotate(90deg); opacity: 1; color: var(--gold-300); }
.nav-item.has-active > button.nav-parent { color: var(--gold-100); }
.nav-item.has-active > button.nav-parent > svg:first-child { color: var(--gold-300); opacity: 1; }
.nav-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.nav-sub > div { overflow: hidden; }
.nav-item.open > .nav-sub { grid-template-rows: 1fr; }
.nav-sub a { padding: 7px 12px 7px 42px; font-size: 13px; position: relative; }
.nav-sub a::after { content: ""; position: absolute; left: 21px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--text-4); transform: translateY(-50%); }
.nav-sub a.active::after { background: var(--gold-300); box-shadow: 0 0 0 3px rgba(var(--acc-rgb),.18); }
.nav-sub a.active::before { display: none; }
.nav-sub a.active { background: linear-gradient(90deg, rgba(var(--acc-rgb),.18), rgba(var(--acc-rgb),.04)); }
.nav-sub > div { padding-bottom: 2px; }

.side-foot { margin-top: auto; padding-top: 18px; }
.storage {
  padding: 14px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
}
.storage .bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 10px 0 6px; }
.storage .bar i { display: block; height: 100%; background: var(--gold-grad); border-radius: 6px; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--top-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  background: rgba(var(--bg-rgb),.78);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.search {
  flex: 1; max-width: 460px;
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px;
  border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text-3);
}
.search svg { width: 17px; height: 17px; flex: none; }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.search kbd {
  font: 600 11px var(--font); color: var(--text-3);
  padding: 2px 7px; border-radius: 6px; background: var(--surface-3);
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--gold-100); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.menu-btn { display: none; }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--gold-grad); color: var(--on-acc);
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.pill-select {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--gold-100); font-weight: 600; font-size: 13px; cursor: pointer;
}
.pill-select svg { width: 16px; height: 16px; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 999px; cursor: pointer; }
.me:hover { background: var(--surface); }
.me .meta { line-height: 1.2; }
.me .meta b { display: block; font-size: 13px; font-weight: 600; }
.me .meta span { font-size: 11px; color: var(--gold-300); }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  color: var(--on-acc); background: var(--gold-grad);
}
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.brown { background: linear-gradient(135deg, var(--brown), var(--muted-fill)); color: var(--gold-100); }
.avatar.dim   { background: var(--surface-3); color: var(--text-2); }

.content { padding: 28px; max-width: 1480px; width: 100%; }

/* ---------------- Page header ---------------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--text-3); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--text-3); margin-bottom: 6px; display: flex; gap: 6px; }
.crumbs a:hover { color: var(--gold-300); }

.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; margin: 0;
}
.section-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--gold-grad);
}

/* ---------------- Buttons ---------------- */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .12s, box-shadow .2s, background .15s, color .15s, filter .15s;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold-grad); color: var(--on-acc); box-shadow: var(--gold-glow); }
.btn-gold:hover { filter: brightness(1.07); box-shadow: 0 10px 34px -8px rgba(var(--acc-rgb),.6); }
.btn-dark { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.btn-dark:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-outline { background: transparent; color: var(--gold-100); border-color: rgba(var(--acc-rgb),.35); }
.btn-outline:hover { background: rgba(var(--acc-rgb),.08); }
.btn-danger { background: var(--bad-bg); color: var(--bad); }
.btn-danger:hover { background: rgba(239,107,91,.2); }
.btn-sm { --h: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-lg { --h: 48px; padding: 0 26px; font-size: 15px; }
.btn-icon { width: var(--h); padding: 0; }
.btn-block { width: 100%; }

/* ---------------- Cards ---------------- */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.card-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 20px; }

.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mt { margin-top: 18px; }
.mt-lg { margin-top: 28px; }

/* KPI */
.kpi { position: relative; overflow: hidden; padding: 20px; }
.kpi .label { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 500; }
.kpi .ic {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--gold-grad-soft); color: var(--gold-300);
}
.kpi .ic svg { width: 18px; height: 18px; }
.kpi .value { font-size: 30px; font-weight: 700; letter-spacing: -.6px; margin: 16px 0 4px; }
.kpi .delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.kpi .delta.up { color: var(--ok); }
.kpi .delta.down { color: var(--bad); }
.kpi .spark { position: absolute; right: 18px; top: 66px; width: 96px; height: 38px; }
.kpi.hero {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(var(--acc-rgb),.22), transparent 55%),
    linear-gradient(160deg, var(--surface-2), var(--bg-2) 70%);
}
.kpi.hero .value { font-size: 34px; }

/* ---------------- Chips / badges ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.ok   { background: var(--ok-bg);   color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad  { background: var(--bad-bg);  color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.gold { background: rgba(var(--acc-rgb),.14); color: var(--gold-100); }
.chip.solid-gold { background: var(--gold-grad); color: var(--on-acc); }
.chip.solid-gold::before { display: none; }

.plan { font-weight: 700; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; }
.plan.silver   { background: rgba(200,200,200,.1);  color: #cfcac2; }
.plan.gold     { background: rgba(var(--acc-rgb),.14);  color: var(--gold-300); }
.plan.platinum { background: rgba(230,220,200,.12); color: #ede3cf; }
.plan.diamond  { background: var(--gold-grad);      color: var(--on-acc); }
.plan.free     { background: var(--surface-3);      color: var(--text-3); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: rgba(255,255,255,.01);
}
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: rgba(var(--acc-rgb),.035); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.who { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.who b { display: block; font-weight: 600; }
.who span { font-size: 12px; color: var(--text-3); }
.thumb { width: 72px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex: none; }
.thumb.tall { width: 44px; aspect-ratio: 2/3; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: .55; transition: opacity .15s; }
.tbl tr:hover .row-actions { opacity: 1; }

.check { appearance: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--text-4); background: transparent; cursor: pointer; display: inline-grid; place-items: center; margin: 0; }
.check:checked { background: var(--gold-grad); border-color: transparent; }
.check:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--on-acc); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar .search { height: 36px; max-width: 300px; }
.toolbar .spacer { flex: 1; }

.pager { display: flex; align-items: center; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.pager .pages { margin-left: auto; display: flex; gap: 4px; }
.pager a {
  min-width: 32px; height: 32px; padding: 0 8px; display: grid; place-items: center;
  border-radius: 8px; color: var(--text-2);
}
.pager a:hover { background: var(--surface-2); }
.pager a.on { background: var(--gold-grad); color: var(--on-acc); font-weight: 700; }

/* ---------------- Tabs / segmented ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 20px; overflow-x: auto; }
.tabs a {
  position: relative; padding: 14px 4px; margin-right: 18px;
  color: var(--text-3); font-weight: 500; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--gold-100); }
.tabs a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--gold-grad); }
.tabs a .count { margin-left: 6px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg button, .seg a {
  height: 30px; padding: 0 14px; border-radius: 999px; border: 0; background: none;
  color: var(--text-3); font: 500 12.5px var(--font); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg svg { width: 15px; height: 15px; }
.seg .on { background: var(--gold-grad); color: var(--on-acc); font-weight: 600; }

/* ---------------- Forms ---------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px;
  border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text);
  font: 400 14px var(--font); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(var(--fg-rgb),.2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(var(--acc-rgb),.6); background: var(--bg-2);
  box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.12);
}
.select {
  appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.select option { background: var(--bg-2); }
.input-group { position: relative; }
.input-group svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); pointer-events: none; }
.input-group .input { padding-left: 42px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.form-grid .span-2 { grid-column: span 2; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 40px; height: 22px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform .2s, background .2s; }
.switch input:checked + i { background: var(--gold-grad); }
.switch input:checked + i::after { transform: translateX(18px); background: var(--on-acc); }

.radio-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); }
.radio-cards label {
  position: relative; padding: 14px; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-2); transition: border-color .15s, background .15s;
}
.radio-cards input { position: absolute; opacity: 0; }
.radio-cards b { display: block; font-size: 13px; }
.radio-cards span { font-size: 12px; color: var(--text-3); }
.radio-cards label:has(input:checked) { border-color: rgba(var(--acc-rgb),.55); background: rgba(var(--acc-rgb),.06); }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 30px 20px; border-radius: var(--r-lg);
  border: 1.5px dashed rgba(var(--acc-rgb),.3);
  background: radial-gradient(100% 120% at 50% 0%, rgba(var(--acc-rgb),.07), transparent 70%), var(--bg-2);
  color: var(--text-3); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold-400); color: var(--text-2); }
.dropzone .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-grad-soft); color: var(--gold-300); }
.dropzone .ic svg { width: 22px; height: 22px; }
.dropzone b { color: var(--text); font-weight: 600; }
.dropzone.r169 { aspect-ratio: 16/9; padding: 12px; }
.dropzone.r11  { aspect-ratio: 1/1; padding: 12px; }
.dropzone.r23  { aspect-ratio: 2/3; padding: 12px; }
.dropzone.r167 { aspect-ratio: 16/7; padding: 12px; }

.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--gold-grad); border-radius: 6px; transition: width .3s; }

/* ---------------- Content cards (poster grid) ---------------- */
.poster-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); padding: 20px; }
.poster {
  position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2);
  transition: transform .2s, box-shadow .2s;
}
.poster:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(0,0,0,.9), 0 0 0 1px rgba(var(--acc-rgb),.25); }
.poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.poster .badge-tl { position: absolute; top: 10px; left: 10px; }
.poster .menu { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; opacity: 0; transition: opacity .15s; border: 0; cursor: pointer; }
.poster:hover .menu { opacity: 1; }
.poster .meta { padding: 12px 12px 14px; }
.poster .meta b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster .meta span { font-size: 12px; color: var(--text-3); }
.poster-ph {
  aspect-ratio: 2/3; display: grid; place-items: end start; padding: 14px;
  font-weight: 800; font-size: 20px; line-height: 1.05; letter-spacing: .5px;
}

/* ---------------- Lists ---------------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .grow span { font-size: 12px; color: var(--text-3); }
.rank { width: 26px; font-weight: 800; font-size: 18px; text-align: center; }

.timeline { list-style: none; margin: 0; padding: 4px 20px 16px; }
.timeline li { position: relative; padding: 10px 0 10px 24px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: -10px; width: 1px; background: var(--line-2); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--line-2); }
.timeline li.gold::after { background: var(--gold-400); box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.15); }
.timeline b { font-weight: 600; }
.timeline span { display: block; font-size: 12px; color: var(--text-3); }

/* ---------------- Charts ---------------- */
.chart { width: 100%; height: 260px; display: block; }
.chart .gridline { stroke: rgba(var(--fg-rgb),.06); }
.chart .axis { fill: var(--text-4); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.donut-wrap { display: flex; align-items: center; gap: 22px; padding: 20px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.donut-legend div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------------- Alerts / empty ---------------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); font-size: 13.5px; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.gold { background: rgba(var(--acc-rgb),.08); color: var(--gold-100); }
.alert.bad  { background: var(--bad-bg); color: #f5b2a8; }
.alert.ok   { background: var(--ok-bg);  color: #b6e8c5; }
.empty { text-align: center; padding: 50px 20px; color: var(--text-3); }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--gold-grad-soft); color: var(--gold-300); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------------- Modal / toast / dropdown ---------------- */
.modal-back {
  position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 20px;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
}
.modal-back.open { display: grid; animation: fade .18s ease; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow: auto; border-radius: var(--r-xl); background: linear-gradient(180deg, var(--bg-2), var(--bg-2)); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -20px #000; animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.modal-head { display: flex; align-items: center; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-head .icon-btn { margin-left: auto; width: 34px; height: 34px; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 22px 22px; }

.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 280px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -10px #000; animation: rise .25s cubic-bezier(.2,.8,.2,1); }
.toast .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--on-acc); flex: none; }
.toast .ic svg { width: 15px; height: 15px; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 200px; display: none;
  padding: 6px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 24px 48px -12px #000;
}
.dropdown.open .dropdown-menu { display: block; animation: rise .15s ease; }
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text-2); font-size: 13px; }
.dropdown-menu a:hover { background: var(--surface-3); color: var(--text); }
.dropdown-menu a svg { width: 16px; height: 16px; }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.dropdown-menu a.danger { color: var(--bad); }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------------- Login ---------------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-wall { position: relative; overflow: hidden; background: #000; }
.auth-wall .cols { position: absolute; inset: -40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 14px; transform: rotate(-4deg) scale(1.08); }
.auth-wall .col { display: flex; flex-direction: column; gap: 14px; }
.auth-wall .col.down { animation: drift-down 60s linear infinite; }
.auth-wall .col.up   { animation: drift-up 60s linear infinite; }
.auth-wall .tile { aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; background: var(--surface); flex: none; }
.auth-wall .tile img { width: 100%; height: 100%; object-fit: cover; }
.auth-wall::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 40%, var(--bg) 100%),
    linear-gradient(0deg, rgba(0,0,0,.85) 0%, transparent 45%),
    radial-gradient(80% 60% at 30% 40%, transparent, rgba(0,0,0,.55));
}
.auth-wall .caption { position: absolute; z-index: 2; left: 48px; bottom: 48px; right: 48px; }
.auth-wall .caption h2 { font-size: 34px; line-height: 1.15; margin: 0 0 10px; font-weight: 700; letter-spacing: -.5px; }
.auth-wall .caption p { color: var(--text-2); margin: 0; max-width: 420px; }
@keyframes drift-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes drift-up   { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(400px, 100%); }
.auth-card .brand { padding: 0 0 36px; }
.auth-card .brand-logo { font-size: 34px; }
.auth-card .brand-logo small { font-size: 11px; letter-spacing: 7px; }
.auth-card h1 { font-size: 26px; margin: 0 0 6px; }
.auth-card > p { color: var(--text-3); margin: 0 0 28px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-foot { margin-top: 28px; font-size: 12px; color: var(--text-4); text-align: center; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; z-index: 50; width: var(--side-w); transform: translateX(-100%); transition: transform .25s; }
  body.nav-open .sidebar { transform: none; box-shadow: 30px 0 60px #000; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.6); }
  .icon-btn.menu-btn { display: grid; }
  .auth { grid-template-columns: 1fr; }
  .auth-wall { display: none; }
  .g-3, .g-2 { grid-template-columns: 1fr; }
  .me .meta, .search kbd { display: none; }
}
@media (max-width: 640px) {
  .content { padding: 18px 16px; }
  .topbar { padding: 0 16px; }
  .g-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .pill-select { display: none; }
  .page-head h1 { font-size: 22px; }
}

/* =========================================================
   Additional page components
   ========================================================= */
.stat-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 18px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
.stat.hero { background: radial-gradient(120% 140% at 100% 0%, rgba(var(--acc-rgb),.2), transparent 60%), linear-gradient(160deg,var(--surface),var(--bg-2) 70%); }
.up { color: var(--ok); } .down { color: var(--bad); }

/* profile header */
.profile-head { display: flex; gap: 20px; align-items: center; padding: 24px; flex-wrap: wrap;
  background: radial-gradient(80% 140% at 100% 0%, rgba(var(--acc-rgb),.14), transparent 60%), linear-gradient(160deg,var(--surface),var(--bg-2)); }
.profile-head .avatar { width: 72px; height: 72px; font-size: 24px; }
.profile-head h2 { margin: 0; font-size: 22px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--text-3); } .kv dd { margin: 0; }

/* permission matrix */
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.dot-on { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--gold-grad); color: var(--on-acc); }
.dot-on svg { width: 13px; height: 13px; }
.dot-off { width: 22px; height: 22px; border-radius: 50%; display: inline-block; background: var(--surface-3); }

/* live */
.live-card { overflow: hidden; }
.live-card .screen { position: relative; aspect-ratio: 16/9; background: linear-gradient(160deg,var(--muted-fill),var(--bg-2)); display: grid; place-items: center; }
.live-card .screen .play { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--on-acc); box-shadow: var(--gold-glow); }
.live-card .screen .play svg { width: 22px; height: 22px; margin-left: 3px; }
.live-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: #c9392b; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.live-card .viewers { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 6px; background: rgba(0,0,0,.6); font-size: 12px; }
@keyframes blink { 50% { opacity: .3; } }

/* media gallery */
.gallery { display: grid; gap: 14px; padding: 20px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.asset { border-radius: var(--r); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.asset:hover { border-color: rgba(var(--acc-rgb),.35); transform: translateY(-2px); }
.asset .art { aspect-ratio: 16/9; display: grid; place-items: end start; padding: 10px; font-weight: 800; font-size: 15px; }
.asset .art.r23 { aspect-ratio: 2/3; } .asset .art.r11 { aspect-ratio: 1/1; } .asset .art.r167 { aspect-ratio: 16/7; }
.asset .info { padding: 10px 12px; font-size: 12px; color: var(--text-3); display: flex; justify-content: space-between; gap: 8px; }
.asset .info b { color: var(--text); font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* storage bars */
.stack { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.stack i { display: block; height: 100%; }

/* rail builder */
.rail { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); cursor: grab; }
.rail:last-child { border-bottom: 0; }
.rail.dragging { opacity: .4; }
.rail .grip { color: var(--text-4); width: 18px; height: 18px; flex: none; }
.rail .grip svg { width: 18px; height: 18px; }
.rail .mini { display: flex; gap: 4px; }
.rail .mini span { width: 22px; aspect-ratio: 2/3; border-radius: 3px; }
.rail .mini.wide span { width: 38px; aspect-ratio: 16/9; }
.rail .grow { flex: 1; min-width: 0; }
.rail .grow b { display: block; font-weight: 600; }
.rail .grow span { font-size: 12px; color: var(--text-3); }

/* phone preview */
.phone {
  width: 300px; margin: 0 auto; aspect-ratio: 9/19.5; border-radius: 42px; padding: 10px;
  background: linear-gradient(160deg, var(--surface-3), var(--bg-2)); box-shadow: 0 0 0 1px rgba(var(--fg-rgb),.08), 0 40px 80px -30px #000;
}
.phone .scr { position: relative; height: 100%; border-radius: 34px; overflow: hidden; background: #000; display: flex; flex-direction: column; }
.phone .notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 90px; height: 24px; border-radius: 20px; background: #000; z-index: 3; }
.phone .p-top { display: flex; align-items: center; justify-content: space-between; padding: 40px 14px 8px; }
.phone .p-logo { font-weight: 800; font-size: 15px; line-height: .9; }
.phone .p-logo small { display: block; font-size: 6px; letter-spacing: 3px; }
.phone .p-chips { display: flex; gap: 6px; padding: 4px 14px 10px; overflow: hidden; }
.phone .p-chips span { flex: none; font-size: 9px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--bg-2); color: var(--text-2); }
.phone .p-chips span.on { background: var(--gold-grad); color: var(--on-acc); }
.phone .p-hero { margin: 0 34px; aspect-ratio: 2/3; border-radius: 14px; display: grid; place-items: end center; padding: 14px; font-weight: 800; font-size: 18px; text-align: center; }
.phone .p-rail { padding: 12px 14px 0; }
.phone .p-rail b { font-size: 11px; display: flex; align-items: center; gap: 6px; }
.phone .p-rail b::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: var(--gold-grad); }
.phone .p-row { display: flex; gap: 6px; margin-top: 7px; }
.phone .p-row span { flex: none; width: 54px; aspect-ratio: 2/3; border-radius: 7px; }
.phone .p-row.wide span { width: 100px; aspect-ratio: 16/9; }
.phone .p-wall { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding: 6px; opacity: .9; }
.phone .p-wall span { aspect-ratio: 2/3; border-radius: 8px; }
.phone .p-wall::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #000 38%, transparent 75%); }
.phone .p-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; z-index: 2; }
.phone .p-bottom h4 { margin: 10px 0 4px; font-size: 17px; line-height: 1.15; }
.phone .p-bottom p { margin: 0 0 12px; font-size: 10px; color: var(--text-2); }
.phone .p-btn { height: 34px; border-radius: 999px; background: var(--gold-grad); color: var(--on-acc); display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.phone .p-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--gold-grad); color: var(--on-acc); display: grid; place-items: center; }
.phone .p-ic svg { width: 14px; height: 14px; }
.phone .p-dots { display: flex; gap: 4px; margin-bottom: 12px; }
.phone .p-dots i { width: 5px; height: 5px; border-radius: 3px; background: #444; }
.phone .p-dots i.on { width: 16px; background: var(--gold-400); }
.phone .p-nav { margin-top: auto; display: flex; justify-content: space-around; padding: 10px 6px 16px; border-top: 1px solid var(--surface); font-size: 8px; color: var(--text-3); }
.phone .p-nav span.on { color: var(--gold-300); }
.phone .p-notif { margin: 70px 10px 0; padding: 10px 12px; border-radius: 16px; background: rgba(40,34,26,.92); display: flex; gap: 10px; }
.phone .p-notif .ap { width: 30px; height: 30px; border-radius: 8px; background: #000; display: grid; place-items: center; font-weight: 800; font-size: 7px; flex: none; }
.phone .p-notif b { font-size: 11px; display: block; }
.phone .p-notif p { margin: 2px 0 0; font-size: 10px; color: var(--text-2); line-height: 1.35; }
.phone .p-notif .art { margin-top: 8px; aspect-ratio: 16/9; border-radius: 8px; }
.split-preview { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 18px; align-items: start; }
.split-preview .sticky { position: sticky; top: calc(var(--top-h) + 20px); }

/* slides / banners editor */
.slide-row { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: grab; }
.slide-row:last-child { border-bottom: 0; }
.slide-row.dragging { opacity: .4; }
.slide-row .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--gold-300); flex: none; }
.banner-card { overflow: hidden; cursor: grab; }
.banner-card.dragging { opacity: .4; }
.banner-card .art { aspect-ratio: 16/7; display: grid; place-items: end start; padding: 16px; font-weight: 800; font-size: 22px; position: relative; }
.banner-card .order { position: absolute; top: 12px; left: 12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.65); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--gold-100); }
.banner-card .foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }

/* games */
.game-card { overflow: hidden; }
.game-card .art { aspect-ratio: 16/10; display: grid; place-items: center; position: relative; }
.game-card .art .gi { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: rgba(0,0,0,.35); color: var(--gold-100); }
.game-card .art .gi svg { width: 30px; height: 30px; }
.game-card .body { padding: 16px; }
.game-card .body h4 { margin: 0 0 4px; font-size: 15px; }

/* settings groups */
.setting { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting .grow { flex: 1; }
.setting .grow b { display: block; font-weight: 600; }
.setting .grow span { font-size: 12.5px; color: var(--text-3); }

/* qr */
.qr-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.qr-box { aspect-ratio: 1; border-radius: var(--r); background: var(--cream); padding: 14px; display: grid; place-items: center; }
.qr-box svg { width: 100%; height: 100%; }

/* analytics */
.hbar { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 13px; }
.hbar .lbl { width: 90px; color: var(--text-2); }
.hbar .track { flex: 1; height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 6px; background: var(--gold-grad); }
.hbar b { width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.heat { display: grid; gap: 4px; }
.heat .r { display: grid; grid-template-columns: 70px repeat(8, 1fr); gap: 4px; align-items: center; font-size: 11px; color: var(--text-3); }
.heat .c { aspect-ratio: 1.8; border-radius: 5px; display: grid; place-items: center; font-size: 10.5px; font-weight: 600; }

@media (max-width: 1200px) { .split-preview { grid-template-columns: 1fr; } .split-preview .sticky { position: static; } }

.slide-row .grip { color: var(--text-4); display: inline-flex; }
.slide-row .grip svg { width: 18px; height: 18px; }
.live-card .viewers svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; }
.nav button.nav-parent span:not(.caret) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .scr > * { flex: none; }
.phone .scr > .p-nav { margin-top: auto; }
.phone .p-hero { margin: 0 44px; }
.search { min-width: 0; }
.search input { min-width: 0; width: 100%; }
@media (max-width: 640px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat b { font-size: 20px; }
  .topbar { gap: 10px; }
  .split-preview .phone { width: 260px; }
}

/* ---------------- Multi-platform previews (OTT) ---------------- */
.pf-switch { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.pf-switch a {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
}
.pf-switch a svg { width: 18px; height: 18px; }
.pf-switch a b { display: block; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.2; }
.pf-switch a span { font-size: 11px; color: var(--text-3); }
.pf-switch a.on { border-color: rgba(var(--acc-rgb),.5); background: rgba(var(--acc-rgb),.07); }
.pf-switch a.on svg { color: var(--gold-300); }

.tv { width: 100%; max-width: 620px; margin: 0 auto; }
.tv .bezel { padding: 10px; border-radius: 14px; background: linear-gradient(180deg,var(--surface),var(--bg-2)); box-shadow: 0 0 0 1px rgba(var(--fg-rgb),.08), 0 30px 60px -30px #000; }
.tv .scr { position: relative; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: #000; }
.tv .stand { width: 140px; height: 10px; margin: 0 auto; border-radius: 0 0 10px 10px; background: var(--bg-2); }
.tv .hero { position: absolute; inset: 0 0 42% 0; display: flex; align-items: flex-end; padding: 0 0 14px 26px; }
.tv .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, transparent 60%), linear-gradient(0deg, #000 0%, transparent 50%); }
.tv .hero > div { position: relative; z-index: 1; }
.tv .hero h5 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.tv .hero .btns { display: flex; gap: 6px; }
.tv .hero .btns span { font-size: 8px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12); }
.tv .hero .btns span.g { background: var(--gold-grad); color: var(--on-acc); outline: 2px solid #fff; outline-offset: 2px; }
.tv .side { position: absolute; left: 0; top: 0; bottom: 0; width: 22px; display: flex; flex-direction: column; align-items: center; gap: 9px; padding-top: 14px; z-index: 2; background: linear-gradient(90deg,#000,transparent); }
.tv .side i { width: 7px; height: 7px; border-radius: 2px; background: var(--muted-fill); }
.tv .side i.on { background: var(--gold-400); }
.tv .top { position: absolute; top: 10px; left: 30px; right: 14px; display: flex; align-items: center; gap: 12px; z-index: 2; font-size: 7.5px; color: var(--text-2); }
.tv .top .lg { font-weight: 800; font-size: 11px; line-height: .9; }
.tv .rows { position: absolute; left: 26px; right: 0; bottom: 6px; top: 60%; overflow: hidden; }
.tv .rows b { font-size: 8px; display: block; margin: 0 0 4px; }
.tv .rows .r { display: flex; gap: 5px; margin-bottom: 8px; }
.tv .rows .r span { flex: none; width: 58px; aspect-ratio: 16/9; border-radius: 4px; }
.tv .rows .r span.f { outline: 2px solid var(--gold-300); outline-offset: 1px; }

.browser { width: 100%; max-width: 620px; margin: 0 auto; border-radius: 12px; overflow: hidden; background: var(--bg-2); box-shadow: 0 0 0 1px rgba(var(--fg-rgb),.08), 0 30px 60px -30px #000; }
.browser .bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--bg-2); }
.browser .bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-fill); }
.browser .bar .url { flex: 1; margin-left: 10px; height: 18px; border-radius: 6px; background: var(--bg-2); font-size: 9px; color: var(--text-3); display: flex; align-items: center; padding: 0 8px; }
.browser .page { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.browser .nav { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: 10px 18px; font-size: 8px; color: var(--text-2); background: linear-gradient(180deg, rgba(0,0,0,.8), transparent); }
.browser .nav .lg { font-weight: 800; font-size: 12px; line-height: .9; }
.browser .nav .on { color: var(--gold-300); }
.browser .nav .cta { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--gold-grad); color: var(--on-acc); font-weight: 700; }
.browser .hero { position: absolute; inset: 0 0 45% 0; display: flex; align-items: flex-end; padding: 0 0 12px 18px; }
.browser .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.8), transparent 65%), linear-gradient(0deg, var(--bg-2), transparent 55%); }
.browser .hero > div { position: relative; z-index: 1; }
.browser .hero h5 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.browser .hero .play { display: inline-block; font-size: 8px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--gold-grad); color: var(--on-acc); }
.browser .rows { position: absolute; left: 18px; right: 0; top: 58%; bottom: 0; overflow: hidden; }
.browser .rows b { font-size: 8px; display: block; margin-bottom: 4px; }
.browser .rows .r { display: flex; gap: 5px; margin-bottom: 8px; }
.browser .rows .r span { flex: none; width: 40px; aspect-ratio: 2/3; border-radius: 4px; }
.browser .rows .r.wide span { width: 66px; aspect-ratio: 16/9; }

.split-preview.wide-pv { grid-template-columns: minmax(0,1fr) minmax(0, 560px); }

.pf-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.pf-card .hd { display: flex; align-items: center; gap: 12px; }
.pf-card .hd .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-grad-soft); color: var(--gold-300); flex: none; }
.pf-card .hd .ic svg { width: 20px; height: 20px; }
.pf-card .hd b { display: block; font-weight: 600; font-size: 15px; }
.pf-card .hd span { font-size: 12px; color: var(--text-3); }
.pf-card .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; border-radius: var(--r); background: var(--bg-2); }
.pf-card .nums div { display: flex; flex-direction: column; }
.pf-card .nums b { font-size: 16px; }
.pf-card .nums span { font-size: 11px; color: var(--text-3); }
.pf-card dl { margin: 0; display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; font-size: 12.5px; }
.pf-card dt { color: var(--text-3); } .pf-card dd { margin: 0; }

.pf-tiles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; }
.pf-tiles > div, .pf-tiles > a { padding: 18px 20px; border-right: 1px solid var(--line); display: flex; gap: 14px; align-items: center; }
.pf-tiles > :last-child { border-right: 0; }
.pf-tiles .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-grad-soft); color: var(--gold-300); flex: none; }
.pf-tiles .ic svg { width: 20px; height: 20px; }
.pf-tiles b { font-size: 22px; font-weight: 700; display: block; line-height: 1.1; }
.pf-tiles .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 5px; animation: blink 1.4s infinite; }
@media (max-width: 1200px) { .split-preview.wide-pv { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .pf-tiles { grid-template-columns: 1fr; } .pf-tiles > div, .pf-tiles > a { border-right: 0; border-bottom: 1px solid var(--line); } }

.pf-tiles > a:hover { background: rgba(var(--acc-rgb),.04); }

/* =========================================================
   Refinement pass — calmer, lighter, gold as accent only
   ========================================================= */
:root { --r-lg: 14px; --r-xl: 18px; --top-h: 60px; }
body { font-size: 13.5px; }
h1, h2, h3, h4, b, strong { font-weight: 600; }

/* page header */
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -.2px; }
.page-head p { font-size: 13px; }
.section-title { font-size: 14.5px; font-weight: 600; }
.section-title::before { width: 3px; height: 14px; }
.card-head { padding: 14px 18px; }
.card-body { padding: 18px; }

/* sidebar: quieter */
.brand-logo { font-size: 20px; }
.nav a, .nav button.nav-parent { font-size: 13.5px; padding: 8px 12px; font-weight: 500; }
.nav a svg, .nav button.nav-parent svg { width: 17px; height: 17px; }
.nav a.active { background: rgba(var(--acc-rgb),.09); color: var(--gold-100); }
.nav-sub a { font-size: 13px; padding: 6px 12px 6px 41px; }
.nav-sub a.active { background: rgba(var(--acc-rgb),.07); }

/* topbar */
.search { height: 38px; }
.icon-btn { width: 38px; height: 38px; }
.pill-select { height: 38px; font-weight: 500; color: var(--text-2); }
.me .meta b { font-weight: 600; }
.me .meta span { color: var(--text-3); }

/* buttons: smaller, less glow */
.btn { --h: 38px; font-weight: 600; font-size: 13px; padding: 0 16px; }
.btn-gold { box-shadow: none; }
.btn-gold:hover { box-shadow: 0 6px 20px -8px rgba(var(--acc-rgb),.5); }
.btn-dark { background: var(--surface); }

/* segmented: active is dark with gold text, not a gold blob */
.seg { padding: 3px; }
.seg button, .seg a { height: 30px; padding: 0 12px; }
.seg .on { background: var(--surface-3); color: var(--gold-100); font-weight: 600; }

/* cards */
.card { box-shadow: none; background: var(--surface); }

/* KPI: one consistent layout, muted sparks */
.kpi { padding: 18px 18px 16px; }
.kpi.hero { background: var(--surface); }
.kpi .label { font-size: 12.5px; color: var(--text-3); gap: 10px; }
.kpi .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); }
.kpi.hero .ic { background: rgba(var(--acc-rgb),.12); color: var(--gold-300); }
.kpi .ic svg { width: 16px; height: 16px; }
.kpi .value, .kpi.hero .value { font-size: 26px; font-weight: 600; letter-spacing: -.5px; margin: 14px 0 6px; }
.kpi .delta { font-size: 11.5px; padding: 2px 6px; border-radius: 6px; }
.kpi .delta svg { display: none; }
.kpi .delta.up { background: var(--ok-bg); }
.kpi .delta.down { background: var(--bad-bg); }
.kpi .spark { top: auto; bottom: 18px; right: 18px; width: 88px; height: 32px; opacity: .9; }
.kpi .spark path:last-child { stroke: var(--gold-600); stroke-width: 1.5; }

/* platform strip: compact, neutral */
.pf-tiles > div, .pf-tiles > a { padding: 14px 18px; gap: 12px; }
.pf-tiles .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); }
.pf-tiles .ic svg { width: 17px; height: 17px; }
.pf-tiles b { font-size: 18px; font-weight: 600; }
.pf-tiles b.gold-text { background: none; -webkit-text-fill-color: var(--text-3); color: var(--text-3); font-size: 13px !important; font-weight: 500; }

/* stats on list pages */
.stat b { font-size: 21px; font-weight: 600; }
.stat.hero { background: var(--surface); }

/* tables slightly tighter */
.tbl td { padding: 12px 16px; }
.tbl th { padding: 11px 16px; font-size: 10.5px; }
.avatar.sm { width: 28px; height: 28px; font-size: 10.5px; }
.chip { height: 22px; font-size: 11px; }
.plan { font-size: 10.5px; }

/* lists */
.rank { font-size: 15px; }
.list li { padding: 11px 18px; }
.kpi .spark { top: 18px; bottom: auto; right: 18px; width: 76px; height: 28px; }
.kpi .label { padding-right: 84px; }
.kpi .label { padding-right: 0; white-space: nowrap; }
.kpi .spark { top: 64px; right: 18px; width: 90px; height: 30px; }
.btn-icon { padding: 0; }
.btn-sm { --h: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-sm.btn-icon { padding: 0; }
.btn-lg { --h: 46px; padding: 0 24px; font-size: 14.5px; }
.toolbar .select { font-size: 13px; }

/* =========================================================
   LAYOUT v3 — top pill navigation + bento dashboard
   ========================================================= */
:root {
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #0a0908;
  --surface: #151311;
  --surface-2: #1c1916;
  --surface-3: #25211c;
  --line: rgba(255, 240, 210, .06);
  --line-2: rgba(255, 240, 210, .1);
  --r: 12px; --r-lg: 22px; --r-xl: 26px;
  --wrap: 1400px;
}
body.topnav { background: radial-gradient(1000px 500px at 80% -15%, rgba(var(--acc-rgb),.07), transparent 60%), var(--bg); font-size: 13.5px; }
.brand-logo { font-family: "Poppins", var(--font); font-weight: 800; }
.num, .big-num { font-feature-settings: "tnum"; }

/* top bar */
.tn-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  max-width: var(--wrap); margin: 0 auto; padding: 18px 28px 14px;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(var(--bg-rgb),0));
}
.tn-logo { display: flex; align-items: center; gap: 10px; flex: none; }
.tn-logo .brand-logo { font-size: 21px; }
.tn-pills {
  margin: 0 auto; display: flex; gap: 2px; padding: 5px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2);
  overflow-x: auto; scrollbar-width: none; max-width: 100%;
}
.tn-pills::-webkit-scrollbar { display: none; }
.tn-pills a {
  flex: none; padding: 9px 16px; border-radius: 999px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.tn-pills a:hover { color: var(--text); background: var(--surface-2); }
.tn-pills a.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tn-right { display: flex; align-items: center; gap: 10px; flex: none; }
.tn-right .icon-btn { width: 42px; height: 42px; background: transparent; border-color: var(--line-2); }
.tn-avatar {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gold-grad); color: var(--on-acc); font: 700 13px var(--font);
}
.dropdown-menu { min-width: 220px; }

/* sub tabs */
.tn-sub { position: sticky; top: 74px; z-index: 25; background: linear-gradient(180deg, var(--bg) 75%, rgba(var(--bg-rgb),0)); }
.tn-sub-inner { max-width: var(--wrap); margin: 0 auto; padding: 4px 28px 10px; display: flex; align-items: center; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.tn-sub-inner::-webkit-scrollbar { display: none; }
.tn-sub-title { flex: none; font-size: 12px; color: var(--text-3); letter-spacing: .3px; }
.tn-tabs { display: flex; gap: 6px; }
.tn-tabs a { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--text-3); border: 1px solid transparent; white-space: nowrap; }
.tn-tabs a:hover { color: var(--text); }
.tn-tabs a.on { color: var(--gold-100); border-color: rgba(var(--acc-rgb),.35); background: rgba(var(--acc-rgb),.06); }

.tn-content { max-width: var(--wrap); margin: 0 auto; padding: 14px 28px 48px; }
.tn-content .crumbs { display: none; }

/* global softening for v3 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-head { border-bottom: 0; padding: 18px 20px 6px; }
.section-title { font-weight: 600; font-size: 15px; }
.section-title::before { display: none; }
.page-head h1 { font-weight: 500; font-size: 26px; letter-spacing: -.4px; }
.tbl th { background: transparent; }
.tbl thead tr th { border-bottom: 1px solid var(--line); }
.toolbar { border-bottom: 0; }
.tabs { border-bottom: 1px solid var(--line); }
.input, .select, .textarea { background: var(--bg-2); border-radius: 12px; }
.btn { font-family: var(--font); }

/* ---------------- Bento dashboard ---------------- */
.hello { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin: 6px 0 24px; }
.hello h1 { margin: 0 0 16px; font-size: 38px; font-weight: 400; letter-spacing: -1px; line-height: 1.1; }
.hello h1 span { color: var(--text-3); }
.meters { display: flex; gap: 10px; flex-wrap: wrap; }
.meter { display: flex; flex-direction: column; gap: 7px; }
.meter > span { font-size: 12.5px; color: var(--text-2); }
.meter > div {
  height: 36px; min-width: 110px; padding: 0 14px; border-radius: 999px;
  display: flex; align-items: center; font-weight: 600; font-size: 13px;
  background: var(--surface-2); color: var(--text-2);
}
.meter.gold > div { background: var(--gold-grad); color: var(--on-acc); }
.meter.cream > div { background: var(--cream); color: var(--on-acc); }
.meter.hatch > div { background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); color: var(--text-2); }
.meter.wide > div { min-width: 170px; }

.bignums { margin-left: auto; display: flex; gap: 34px; }
.bignum { display: flex; flex-direction: column; }
.bignum .row { display: flex; align-items: center; gap: 12px; }
.bignum .badge {
  position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cream); color: var(--on-acc); font-size: 10px; font-weight: 700;
}
.bignum .badge i { position: absolute; top: -5px; left: -5px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: var(--bg-2); }
.bignum .badge.down i { background: var(--bad); color: #2a0905; }
.bignum .badge i svg { width: 11px; height: 11px; }
.bignum b { font-size: 46px; font-weight: 300; letter-spacing: -1.5px; line-height: 1; }
.bignum > span { margin-top: 6px; font-size: 12.5px; color: var(--text-2); padding-left: 50px; }

.bento { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.b-3 { grid-column: span 3; } .b-4 { grid-column: span 4; } .b-5 { grid-column: span 5; }
.b-6 { grid-column: span 6; } .b-7 { grid-column: span 7; } .b-8 { grid-column: span 8; } .b-12 { grid-column: span 12; }
.bento .card { padding: 20px; position: relative; overflow: hidden; }
.bento .card > h3 { margin: 0 0 16px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.bento .card > h3 .right { margin-left: auto; display: flex; gap: 8px; align-items: center; font-weight: 500; }
.arrow-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--text); flex: none; }
.arrow-btn svg { width: 16px; height: 16px; }
.arrow-btn:hover { background: var(--surface-3); }

/* combined summary + chart card */
.combo { display: grid; grid-template-columns: 250px 1fr; padding: 0 !important; }
.combo .sum { padding: 20px; background: var(--surface-2); border-right: 1px solid var(--line); border-radius: var(--r-lg) 0 0 var(--r-lg); display: flex; flex-direction: column; gap: 10px; }
.combo .sum h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.sum-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line); font-weight: 500; }
.sum-row i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.sum-row b { margin-left: auto; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); }
.sum-note { margin-top: auto; display: flex; gap: 10px; font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.sum-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--text-2); }
.combo .plot { padding: 20px 20px 14px; min-width: 0; }
.combo .plot-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.combo .plot-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.combo .plot-head .seg { margin-left: auto; }
.seg { background: transparent; border-color: var(--line-2); }
.seg .on { background: var(--surface-3); color: var(--text); }
.chart-tip { position: absolute; padding: 6px 10px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 11px; line-height: 1.35; pointer-events: none; transform: translate(-50%, -115%); white-space: nowrap; }

/* accent card */
.accent { background: var(--gold-grad) !important; border: 0 !important; color: var(--on-acc); }
.accent > h3 { color: var(--on-acc); }
.accent .arrow-btn { border-color: rgba(26,18,5,.25); color: var(--on-acc); background: rgba(255,255,255,.25); }
.accent p { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: rgba(26,18,5,.8); }
.stack-cards { position: relative; height: 112px; }
.stack-cards a {
  position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 14px; font-weight: 600; color: var(--on-acc);
  box-shadow: 0 10px 24px -14px rgba(60,40,5,.7);
}
.stack-cards a:nth-child(1) { top: 0; background: var(--cream); transform: rotate(2deg); z-index: 2; }
.stack-cards a:nth-child(2) { top: 56px; background: var(--cream); transform: rotate(-2.5deg); }
.stack-cards a b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--on-acc); color: var(--cream); font-size: 12px; }

/* task cards (like "active incidents") */
.tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.task { padding: 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.task:nth-child(2) { margin-top: 14px; }
.task .top { display: flex; align-items: flex-start; gap: 8px; }
.task .tag { padding: 6px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--cream); color: var(--on-acc); }
.task .tag.gold { background: var(--gold-grad); }
.task .id { margin-left: auto; text-align: right; font-size: 11.5px; color: var(--text-3); line-height: 1.35; }
.task p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.task .who { min-width: 0; gap: 10px; margin-top: auto; }

/* bubbles */
.bubbles { position: relative; height: 210px; }
.bubble { position: absolute; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.bubble b { font-weight: 400; letter-spacing: -.5px; line-height: 1; }
.bubble span { font-size: 11px; margin-top: 4px; }
.bubble.b1 { width: 150px; height: 150px; left: 4%; top: 30px; background: var(--gold-grad); color: var(--on-acc); }
.bubble.b1 b { font-size: 34px; }
.bubble.b2 { width: 104px; height: 104px; left: 46%; top: 98px; background: var(--cream); color: var(--on-acc); }
.bubble.b2 b { font-size: 24px; }
.bubble.b3 { width: 76px; height: 76px; left: 40%; top: 6px; background: repeating-linear-gradient(135deg, var(--muted-fill) 0 5px, var(--surface-3) 5px 10px); color: var(--text); border: 1px solid var(--line-2); }
.bubble.b3 b { font-size: 16px; }
.bubble.b4 { width: 58px; height: 58px; left: 74%; top: 30px; background: var(--brown); color: var(--cream); }
.bubble.b4 b { font-size: 13px; }

/* assistant */
.assist h4 { margin: 0; font-size: 15px; font-weight: 500; }
.assist h2 { margin: 2px 0 16px; font-size: 21px; font-weight: 600; letter-spacing: -.3px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.quick a:hover { color: var(--text); border-color: var(--line-2); }
.quick a .q { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.quick a .q svg { width: 14px; height: 14px; }
.ask { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.ask input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 400 13px var(--font); }
.ask button { width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--gold-grad); color: var(--on-acc); cursor: pointer; }
.ask button svg { width: 15px; height: 15px; }

@media (max-width: 1280px) {
  .bignums { margin-left: 0; width: 100%; }
  .b-3, .b-4, .b-5 { grid-column: span 6; } .b-7, .b-8 { grid-column: span 12; }
}
@media (max-width: 1100px) {
  .tn-bar { flex-wrap: wrap; }
  .tn-pills { order: 3; width: 100%; margin: 0; }
  .tn-right { margin-left: auto; }
  .tn-sub { top: 128px; }
}
@media (max-width: 760px) {
  .tn-bar, .tn-sub-inner, .tn-content { padding-left: 16px; padding-right: 16px; }
  .hello h1 { font-size: 28px; }
  .bignums { gap: 20px; flex-wrap: wrap; }
  .bignum b { font-size: 34px; }
  .bento > * { grid-column: span 12 !important; }
  .combo { grid-template-columns: 1fr; }
  .combo .sum { border-right: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .tasks { grid-template-columns: 1fr; }
  .task:nth-child(2) { margin-top: 0; }
}
.input, .select, .textarea { background-color: var(--bg-2); }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.tn-bar { max-width: none; padding-left: max(28px, calc((100vw - var(--wrap)) / 2 + 28px)); padding-right: max(28px, calc((100vw - var(--wrap)) / 2 + 28px)); }
.combo svg text { font-family: var(--font); }
.chart-tip.below { transform: translate(-50%, 18px); }
.accent { display: flex; flex-direction: column; }
.accent .acc-foot { margin-top: auto; padding-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.accent .acc-foot div { display: flex; flex-direction: column; }
.accent .acc-foot b { font-size: 26px; font-weight: 400; letter-spacing: -.6px; line-height: 1.1; }
.accent .acc-foot span { font-size: 11.5px; color: rgba(26,18,5,.7); }
.stack-cards { flex: none; }
@media (max-width: 760px) { .tn-bar { padding-left: 16px; padding-right: 16px; } }

/* =========================================================
   THEMES — gold (default) · dark · light
   Switch with <html data-theme="gold|dark|light">
   ========================================================= */
:root, [data-theme="gold"], .phone, .tv, .browser, .auth-wall {
  --bg: #0a0908; --bg-2: #0e0c0a;
  --surface: #151311; --surface-2: #1c1916; --surface-3: #25211c;
  --muted-fill: #3a3127; --cream: #f4ead6; --brown: #6b4a2b; --brown-rgb: 107,74,43;
  --line: rgba(255,240,210,.06); --line-2: rgba(255,240,210,.1);
  --text: #f6f1e7; --text-2: #c9bfae; --text-3: #8a8072; --text-4: #5d554b;
  --gold-50: #fff4d1; --gold-100: #f8e3a1; --gold-300: #f0c95a; --gold-400: #e5b53a;
  --gold-500: #d4a02a; --gold-600: #b1821c; --gold-700: #8a6414;
  --gold-grad: linear-gradient(100deg, #fbe7a6 0%, #eec453 35%, #d39f2a 70%, #a77a19 100%);
  --gold-grad-soft: linear-gradient(135deg, rgba(240,201,90,.16), rgba(167,122,25,.06));
  --on-acc: #1a1205; --acc-rgb: 229,181,58; --fg-rgb: 255,240,210; --bg-rgb: 10,9,8;
  --ok: #6fcf8e; --ok-bg: rgba(111,207,142,.12); --bad: #ef6b5b; --bad-bg: rgba(239,107,91,.12);
  --warn: #f0b84a; --warn-bg: rgba(240,184,74,.13); --info: #d8c7a4; --info-bg: rgba(216,199,164,.10);
  color-scheme: dark;
}

[data-theme="dark"] {
  --bg: #09090b; --bg-2: #0d0d10;
  --surface: #141417; --surface-2: #1b1b1f; --surface-3: #24242a;
  --muted-fill: #34343b; --cream: #e8e8ec; --brown: #4b4b53; --brown-rgb: 75,75,83;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.11);
  --text: #f5f5f7; --text-2: #c3c3ca; --text-3: #8a8a93; --text-4: #5c5c65;
  --gold-50: #ffffff; --gold-100: #ffffff; --gold-300: #ffffff; --gold-400: #e9e9ee;
  --gold-500: #cfcfd6; --gold-600: #a7a7b0; --gold-700: #7c7c86;
  --gold-grad: linear-gradient(100deg, #ffffff 0%, #e4e4ea 60%, #c9c9d1 100%);
  --gold-grad-soft: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  --on-acc: #0b0b0d; --acc-rgb: 255,255,255; --fg-rgb: 255,255,255; --bg-rgb: 9,9,11;
  --info: #c3c3ca; --info-bg: rgba(255,255,255,.08);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f3f1; --bg-2: #fbfbfa;
  --surface: #ffffff; --surface-2: #f6f6f4; --surface-3: #ececea;
  --muted-fill: #d9d9d5; --cream: #ecebe6; --brown: #b9b7b0; --brown-rgb: 120,118,110;
  --line: rgba(0,0,0,.07); --line-2: rgba(0,0,0,.12);
  --text: #121212; --text-2: #46464b; --text-3: #75757c; --text-4: #a3a3a9;
  --gold-50: #121212; --gold-100: #121212; --gold-300: #121212; --gold-400: #1d1d1f;
  --gold-500: #2c2c30; --gold-600: #4a4a50; --gold-700: #6a6a70;
  --gold-grad: linear-gradient(100deg, #141414 0%, #2b2b2e 100%);
  --gold-grad-soft: linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.02));
  --on-acc: #ffffff; --acc-rgb: 20,20,20; --fg-rgb: 0,0,0; --bg-rgb: 243,243,241;
  --ok: #17924a; --ok-bg: rgba(23,146,74,.1); --bad: #d23c2b; --bad-bg: rgba(210,60,43,.09);
  --warn: #b7791f; --warn-bg: rgba(183,121,31,.11); --info: #46464b; --info-bg: rgba(0,0,0,.06);
  color-scheme: light;
}

/* light/dark: neutral placeholders (real artwork replaces these) */
[data-theme="dark"] :is(.poster-ph, .asset .art, .banner-card .art, .live-card .screen, .game-card .art, .rail .mini span, .profile-head),
[data-theme="light"] :is(.poster-ph, .asset .art, .banner-card .art, .live-card .screen, .game-card .art, .rail .mini span) { filter: grayscale(1); }
[data-theme="light"] .poster-ph .gold-text, [data-theme="light"] .art .gold-text { -webkit-text-fill-color: #fff; color: #fff; background: none; }
[data-theme="light"] .avatar.brown { color: #fff; }
[data-theme="light"] .plan.silver { color: #55555b; background: rgba(0,0,0,.06); }
[data-theme="light"] .plan.platinum { color: #3a3a3f; background: rgba(0,0,0,.09); }
[data-theme="light"] .alert.bad { color: #a12a1d; }
[data-theme="light"] .alert.ok { color: #116a37; }
[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(0,0,0,.04); }
[data-theme="light"] .meter.hatch > div, [data-theme="light"] .bubble.b3 { background: repeating-linear-gradient(135deg, #dcdcd8 0 6px, #ececea 6px 12px); }
[data-theme="dark"] .meter.hatch > div, [data-theme="dark"] .bubble.b3 { background: repeating-linear-gradient(135deg, #2c2c33 0 6px, #1c1c21 6px 12px); }
[data-theme="light"] .stack-cards a:nth-child(1) { background: #fff; }
[data-theme="light"] .stack-cards a:nth-child(2) { background: #e6e6e3; }
[data-theme="light"] .accent { color: #fff; }
[data-theme="light"] .accent > h3, [data-theme="light"] .accent p, [data-theme="light"] .accent .acc-foot span { color: rgba(255,255,255,.85); }
[data-theme="light"] .accent .arrow-btn { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.1); }
[data-theme="light"] .stack-cards a { color: #121212; }
[data-theme="light"] .stack-cards a b { background: #121212; color: #fff; }
[data-theme="dark"] .stack-cards a:nth-child(1) { background: #fff; }
[data-theme="dark"] .stack-cards a:nth-child(2) { background: #dedee4; }
[data-theme="dark"] .stack-cards a b { background: #0b0b0d; color: #fff; }
.phone, .tv, .browser { color: var(--text); }

/* theme switcher */
.theme-pick { display: flex; gap: 6px; padding: 6px 8px 8px; }
.theme-pick button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text-2); font: 500 11.5px var(--font); cursor: pointer;
}
.theme-pick button i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128,128,128,.35); }
.theme-pick button[data-theme-set="gold"] i { background: linear-gradient(135deg, #0a0908 50%, #e5b53a 50%); }
.theme-pick button[data-theme-set="dark"] i { background: linear-gradient(135deg, #09090b 50%, #ffffff 50%); }
.theme-pick button[data-theme-set="light"] i { background: linear-gradient(135deg, #ffffff 50%, #141414 50%); }
.theme-pick button.on { border-color: var(--gold-400); color: var(--text); }
.theme-btn svg { width: 18px; height: 18px; }
:root, [data-theme="gold"], .phone, .tv, .browser, .auth-wall { --on-cream: #1a1205; --chart-2: #f4ead6; }
[data-theme="dark"] { --on-cream: #0b0b0d; --chart-2: #8a8a93; }
[data-theme="light"] { --on-cream: #121212; --chart-2: #b0b0b6; }
.meter.cream > div, .bignum .badge, .task .tag:not(.gold), .bubble.b2, .stack-cards a { color: var(--on-cream); }
[data-theme="light"] .bubble.b4 { color: #fff; }
[data-theme="light"] .meter.cream > div, [data-theme="light"] .bubble.b2 { background: #dcdcd7; }
[data-theme="light"] .bignum .badge, [data-theme="light"] .task .tag:not(.gold) { background: #e4e4e0; }

/* List thumbnails are video frames: always 16:9 (poster grid stays 2:3) */
.thumb, .poster-ph.thumb, .poster-ph.thumb.tall, .thumb.tall {
  width: 112px; height: auto; aspect-ratio: 16 / 9; flex: none;
  border-radius: 10px; padding: 0 !important;
}
.list .poster-ph.thumb { width: 104px; }
.who .poster-ph.thumb { width: 96px; }
@media (max-width: 640px) { .thumb, .poster-ph.thumb, .poster-ph.thumb.tall { width: 84px; } }

/* Sticky bars: solid background so page content doesn't show through */
.tn-bar { background: var(--bg); }
.tn-sub { background: var(--bg); border-bottom: 1px solid var(--line); }
.tn-sub-inner { padding-bottom: 12px; }
.tn-content { padding-top: 22px; }

/* sub-tab group separators (e.g. Media: Library | Files) */
.tn-tabs { align-items: center; }
.tn-sep { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 4px 0 8px; font-size: 11px; letter-spacing: .4px; color: var(--text-4); text-transform: uppercase; }
.tn-sep::before { content: ""; width: 1px; height: 18px; background: var(--line-2); }
.tn-sep:empty { margin: 0 4px; }
.tn-tabs a.tn-cta { color: var(--gold-100); }

/* ---------- Kids games (Epic Kids) ---------- */
.kg-status { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.kg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; flex: none; }
.kg-dot.live { background: #3ecf72; box-shadow: 0 0 0 0 rgba(62,207,114,.6); animation: kgPulse 2s infinite; }
@keyframes kgPulse { 70% { box-shadow: 0 0 0 7px rgba(62,207,114,0); } 100% { box-shadow: 0 0 0 0 rgba(62,207,114,0); } }
.kg-lbl { display: flex; align-items: center; gap: 6px; }
.kg-lbl svg { width: 14px; height: 14px; }
.kg-bars { display: flex; align-items: flex-end; gap: 3px; height: 190px; }
.kg-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.kg-bar i { display: block; width: 100%; border-radius: 4px 4px 1px 1px; background: rgba(var(--acc-rgb), .35); transition: background .15s; }
.kg-bar i.peak, .kg-bar:hover i { background: var(--gold-grad); }
.kg-axis { display: flex; justify-content: space-between; margin-top: 8px; }
.kg-feed li { padding-top: 10px; padding-bottom: 10px; }
.kg-feed .grow b, .list .grow b { display: block; font-weight: 600; }
.list .grow span { font-size: 12px; color: var(--text-3); }
.grow { flex: 1; min-width: 0; }
.kg-av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.kg-tile { width: 72px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); border: 1px solid var(--line); }
.kg-tile.ph { display: grid; place-items: center; color: var(--text-3); }
.kg-tile.ph svg { width: 18px; height: 18px; }
.kg-meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 4px; }
.kg-meter i { display: block; height: 100%; background: var(--gold-grad); border-radius: 99px; }
.kg-rank { width: 20px; text-align: center; font-weight: 700; color: var(--text-3); flex: none; }
.kg-chart { display: flex; flex-direction: column; }
.kg-chart .card-body { flex: 1; display: flex; flex-direction: column; }
.kg-chart .kg-bars { flex: 1; min-height: 190px; }

/* Kids games - sub nav, pages */
.kg-nav { display: flex; align-items: center; gap: 12px; margin: -4px 0 16px; flex-wrap: wrap; }
.kg-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.kg-tabs a { padding: 7px 16px; border-radius: 999px; color: var(--text-2); font-size: 13.5px; white-space: nowrap; }
.kg-tabs a:hover { color: var(--text); background: var(--surface-2); }
.kg-tabs a.on { background: var(--surface-3); color: var(--gold-100); font-weight: 600; }
.kg-drop { position: relative; margin-left: auto; }
.kg-drop summary { list-style: none; cursor: pointer; }
.kg-drop summary::-webkit-details-marker { display: none; }
.kg-drop summary svg:last-child { width: 14px; height: 14px; transition: transform .15s; }
.kg-drop[open] summary svg:last-child { transform: rotate(180deg); }
.kg-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.kg-menu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text); font-size: 13.5px; }
.kg-menu a svg { width: 14px; height: 14px; color: var(--text-3); }
.kg-menu a:hover { background: var(--surface-2); }
.kg-menu-h { display: block; padding: 6px 12px 8px; font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.kg-refresh { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.kg-refresh:hover { color: var(--gold-100); }
.kg-refresh svg { width: 14px; height: 14px; }
.kg-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.kg-filter a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-size: 13px; background: var(--surface); }
.kg-filter a:hover { color: var(--text); border-color: var(--line-2); }
.kg-filter a.on { background: rgba(var(--acc-rgb), .14); border-color: rgba(var(--acc-rgb), .45); color: var(--gold-100); font-weight: 600; }
.kg-row { cursor: pointer; }
.kg-row:hover td { background: var(--surface-2); }
.kg-av.lg { width: 56px; height: 56px; font-size: 30px; }
.kg-av.xl { width: 72px; height: 72px; font-size: 40px; }
.kg-profile { display: flex; align-items: center; gap: 20px; padding: 22px 24px; flex-wrap: wrap; }
.kg-profile h2 { margin: 0 0 2px; font-size: 22px; }
.kg-chips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.kg-timeline { max-height: 900px; overflow-y: auto; }
.kg-timeline .grow span.mono { font-size: 11.5px; }
.kg-bars.dense { gap: 1px; }
.kg-stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-2); margin-bottom: 18px; }
.kg-stack i { display: block; height: 100%; }
.kg-stack .t-ok { background: var(--ok); } .kg-stack .t-bad { background: var(--bad); }
.kg-stack .t-warn { background: var(--warn); } .kg-stack .t-plain { background: var(--text-3); }
.kg-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.kg-legend li { display: grid; grid-template-columns: 1fr auto 48px; align-items: center; gap: 10px; }
.kg-legend li .muted { text-align: right; font-size: 13px; }
.kg-ratings { display: grid; gap: 18px; border-top: 1px solid var(--line); }
.kg-rating-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.kg-rating-h b { flex: 1; }
.kg-spread { display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; gap: 10px; }
.kg-spread .kg-meter { margin: 0; }
.kg-spread span:last-child { text-align: right; }
.kg-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.kg-pod { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; text-align: center; color: var(--text); transition: transform .15s; }
.kg-pod:hover { transform: translateY(-2px); }
.kg-pod.p1 { padding-top: 34px; padding-bottom: 30px; border-color: rgba(var(--acc-rgb), .45); background: linear-gradient(180deg, rgba(var(--acc-rgb), .12), var(--surface) 70%); }
.kg-medal { font-size: 26px; line-height: 1; }
.kg-pts { font-size: 22px; font-weight: 700; }
.kg-rate-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kg-rate { color: var(--text); }
.kg-rate:hover { border-color: var(--line-2); }
.kg-rate.on { border-color: rgba(var(--acc-rgb), .55); background: rgba(var(--acc-rgb), .08); }
.kg-stars { letter-spacing: 2px; font-size: 16px; white-space: nowrap; }
.kg-stars i { font-style: normal; color: var(--line-2); }
.kg-stars i.on { color: var(--gold-100); }
[data-theme="light"] .kg-menu { box-shadow: 0 18px 40px rgba(0,0,0,.12); }
@media (max-width: 760px) {
  .kg-drop { margin-left: 0; }
  .kg-menu { left: 0; right: auto; }
  .kg-podium { grid-template-columns: 1fr; }
}
.kg-legend li .chip { justify-self: start; }

/* ---------- Splash screens (device previews) ---------- */
.sp-device { flex: none; border-radius: 22px; padding: 6px; background: #0d0d0f; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 14px 30px rgba(0,0,0,.35); }
.sp-device.phone { aspect-ratio: 9 / 19.5; }
.sp-device.tv { aspect-ratio: 16 / 9; border-radius: 10px; padding: 5px; }
.sp-device.lg.phone { width: 210px; }
.sp-device.lg.tv { width: 100%; max-width: 340px; }
.sp-device.xs { padding: 2px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line-2); }
.sp-device.xs.phone { width: 34px; }
.sp-device.xs.tv { width: 60px; border-radius: 5px; }
.sp-screen { position: relative; width: 100%; height: 100%; border-radius: 17px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sp-device.tv .sp-screen { border-radius: 6px; }
.sp-device.xs .sp-screen { border-radius: 6px; }
.sp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp-logo { position: relative; z-index: 1; max-width: 30%; max-height: 14%; object-fit: contain; }   /* same size as the app: about 28% of the screen width */
.sp-tag { position: absolute; left: 10%; right: 10%; bottom: 9%; z-index: 1; text-align: center; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.sp-video, .sp-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: rgba(255,255,255,.6); font-size: 12px; }
.sp-video svg, .sp-empty svg { width: 26px; height: 26px; }
.sp-device.xs .sp-tag, .sp-device.xs .sp-video span, .sp-device.xs .sp-empty span { display: none; }
.sp-device.xs .sp-video svg, .sp-device.xs .sp-empty svg { width: 12px; height: 12px; }
.sp-color { width: 44px; height: 42px; padding: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; flex: none; }
.row-actions form { display: inline; margin: 0; }
.switch.small span { font-size: 13px; }
.sp-screen [hidden] { display: none !important; }
.sp-thumb { width: 62px; flex: none; display: flex; justify-content: center; }

/* ---------- Upload button ---------- */
.upl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upl-bar { display: none; width: 120px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.upl-bar i { display: block; height: 100%; width: 0; background: var(--gold-grad); transition: width .15s; }
.upl.busy .upl-bar { display: block; }
.upl-msg { font-size: 12.5px; color: var(--text-3); }
.upl-msg.bad { color: var(--bad); }
.field .upl { margin-top: 2px; }

/* ---------- Intro screen ---------- */
.it-slides { display: flex; flex-direction: column; }
.it-slide { border-top: 1px solid var(--line); }
.it-slide > summary { display: flex; align-items: center; gap: 12px; padding: 12px 20px; cursor: pointer; list-style: none; }
.it-slide > summary::-webkit-details-marker { display: none; }
.it-slide > summary:hover { background: var(--surface-2); }
.it-slide.dragging { opacity: .45; }
.it-slide .grip { cursor: grab; color: var(--text-3); display: grid; place-items: center; }
.it-slide .grip svg { width: 18px; height: 18px; }
.it-ic { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: rgba(var(--acc-rgb), .14); color: var(--gold-100); }
.it-ic svg { width: 18px; height: 18px; }
.it-title { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-body { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-chev svg { width: 16px; height: 16px; color: var(--text-3); transition: transform .15s; }
.it-slide[open] > summary .it-chev svg { transform: rotate(180deg); }
.it-slide[open] > summary { background: var(--surface-2); }
.it-form { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.it-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.it-actions .spacer { flex: 1; }
.it-new > summary b { font-weight: 600; }
.it-add { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.it-add-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.it-add-row .spacer { flex: 1; }
.it-tray { display: flex; flex-wrap: wrap; gap: 8px; }
.it-tray-item { position: relative; width: 56px; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.it-tray-item img { width: 100%; height: 100%; object-fit: cover; }
.it-tray-item button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.it-urls summary { cursor: pointer; }
.it-urls textarea { margin-top: 8px; }
.it-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
.it-poster { display: flex; flex-direction: column; gap: 6px; cursor: grab; }
.it-poster.dragging { opacity: .45; }
.it-poster.off .it-art img { opacity: .45; filter: grayscale(.5); }
.it-art { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.it-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.it-n { position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(0,0,0,.65); color: #fff; font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
.it-flag { position: absolute; bottom: 6px; left: 6px; }
.it-pedit > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.it-pedit > summary::-webkit-details-marker { display: none; }
.it-pedit > summary svg { width: 13px; height: 13px; }
.it-pform { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); position: relative; z-index: 5; width: 240px; }
.it-set-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.it-set { align-items: end; }
.it-switch { padding: 10px 0; }
/* preview phone */
.it-pv-card { position: sticky; top: 90px; }
.it-pv { background: #000; justify-content: flex-end; }
.it-pv-wall { position: absolute; inset: 0; display: flex; gap: var(--gap); padding: 0 calc(var(--gap) / 2); overflow: hidden; }
.it-pv-col { flex: 1; overflow: hidden; }
.it-pv-track { display: flex; flex-direction: column; gap: var(--gap); animation: itScroll var(--loop) linear infinite; }
.it-pv-col.up .it-pv-track { animation-direction: reverse; }
.it-pv-track img { width: 100%; object-fit: cover; border-radius: calc(var(--rad) * .5); display: block; background: #222; }
@keyframes itScroll { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.it-pv-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,var(--dim)) 0%, rgba(0,0,0,var(--dim)) calc(100% - var(--fade)), #000 100%); pointer-events: none; }
.it-pv-logo { position: absolute; top: 16px; left: 14px; color: #f3d27a; font-weight: 800; font-size: 13px; letter-spacing: .02em; line-height: 1; }
.it-pv-logo small { display: block; font-size: 6px; letter-spacing: .3em; color: #fff; margin-top: 2px; }
.it-pv-skip { position: absolute; top: 14px; right: 14px; color: #fff; font-size: 10px; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.14); }
.it-pv-slide { position: relative; z-index: 1; width: 100%; padding: 0 14px 16px; color: #fff; display: flex; flex-direction: column; gap: 6px; }
.it-pv-slide b { font-size: 14px; line-height: 1.25; }
.it-pv-slide p { margin: 0; font-size: 9.5px; color: rgba(255,255,255,.72); line-height: 1.4; }
.it-pv-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg,#f6d77a,#c8962e); color: #1a1206; }
.it-pv-ic svg { width: 14px; height: 14px; }
.it-pv-dots { display: flex; gap: 4px; margin: 2px 0 4px; }
.it-pv-dots i { width: 5px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); }
.it-pv-dots i.on { width: 14px; background: #f3d27a; }
.it-pv-btn { text-align: center; padding: 8px; border-radius: 99px; background: linear-gradient(90deg,#f6d77a,#c8962e); color: #1a1206; font-size: 10.5px; font-weight: 700; }
.it-pv-nav { display: flex; align-items: center; gap: 10px; }
.it-pv-nav [data-pv-step="-1"] svg { transform: rotate(90deg); }
.it-add [hidden], .it-tray[hidden], .it-pv-slide[hidden] { display: none !important; }

/* ---- API coverage strip (pages not on the GoodNews+ API yet) ---- */
.api-gap { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 14px;
  border: 1px dashed rgba(224, 160, 60, .55); border-radius: 12px; background: rgba(224, 160, 60, .07);
  font-size: 12.5px; color: var(--text, inherit); line-height: 1.45; }
.api-gap i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #e0a03c; }
.api-gap .mono { opacity: .8; word-break: break-word; }
.api-gap.ro { border-style: solid; border-color: rgba(60, 190, 120, .45); background: rgba(60, 190, 120, .07); }
.api-gap.ro i { background: #3cbe78; }

/* ---- forgot-password code box ---- */
.otp-input { text-align: center; font-size: 24px; letter-spacing: .5em; font-weight: 600; height: 56px; }

/* ---- real GoodNews+ logo ---- */
.brand-img { display: block; height: 34px; width: auto; }
.tn-logo .brand-img { height: 38px; }
.auth-card .brand-img { height: 58px; }
.auth-wall .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* =====================================================================
   App-accurate intro preview (matches the GN+ app onboarding screen)
   ===================================================================== */
.sp-device.lg.phone.it-pv-phone { width: 270px; }
.it-pv { background: #000; justify-content: flex-end; }
.it-pv-wall {                         /* tilted, over-sized poster wall */
  position: absolute; top: -14%; left: -26%; right: -26%; height: 82%;
  display: flex; gap: var(--gap); padding: 0; overflow: visible;
  transform: rotate(-9deg); transform-origin: 50% 0;
}
.it-pv-col { flex: 1; overflow: hidden; height: 120%; }
.it-pv-col:nth-child(even) { margin-top: 18%; }
.it-pv-track img { border-radius: var(--rad); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.it-pv-shade {                        /* lit at the top, black from the middle down */
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,var(--dim)) 0%,
      rgba(0,0,0,calc(var(--dim) + .15)) calc(100% - var(--fade) - 22%),
      #000 calc(100% - var(--fade) + 2%),
      #000 100%);
}
.it-pv-logo { position: absolute; z-index: 2; top: 18px; left: 16px; width: 64px; height: auto; color: inherit; }
.it-pv-skip {
  z-index: 2; top: 16px; right: 14px; font-size: 11px; font-weight: 600; padding: 6px 13px;
  background: rgba(20,20,20,.72); color: #fff; backdrop-filter: blur(6px);
}
.it-pv-slide { z-index: 2; padding: 0 18px 20px; gap: 0; }
.it-pv-ic {
  width: 40px; height: 40px; margin-bottom: 14px;
  background: linear-gradient(145deg, #f7d97c 0%, #e9b53c 55%, #c99128 100%);
  color: #2a1c05; box-shadow: 0 6px 18px rgba(233,181,60,.25);
}
.it-pv-ic svg { width: 19px; height: 19px; stroke-width: 2.2; }
.it-pv-slide b { font-family: "Poppins", var(--font); font-size: 19px; font-weight: 800; line-height: 1.2; letter-spacing: -.2px; }
.it-pv-slide p { margin-top: 8px; font-size: 10.5px; line-height: 1.45; letter-spacing: .02em; color: rgba(255,255,255,.66); }
.it-pv-dots { gap: 5px; margin: 16px 0 16px; }
.it-pv-dots i { width: 6px; height: 6px; background: rgba(255,255,255,.45); }
.it-pv-dots i.on { width: 22px; background: linear-gradient(90deg, #f7d97c, #e2a935); }
.it-pv-btn {
  padding: 12px; font-family: "Poppins", var(--font); font-size: 13px; font-weight: 700; color: #1a1206;
  background: linear-gradient(90deg, #f8e08e 0%, #eebe4c 50%, #c99128 100%);
  box-shadow: 0 10px 28px rgba(238,190,76,.35);
}

/* ---- sign-in wall: tilted poster wall, 6 slow columns, original fade ---- */
.auth-wall .cols { inset: -16% -12% -12% -12%; gap: 12px; padding: 0; transform: rotate(-9deg); }
.auth-wall .col { gap: 12px; }
.auth-wall .col:nth-child(even) { margin-top: 9%; }
.auth-wall .col.down { animation-duration: 160s; }
.auth-wall .col.up   { animation-duration: 160s; }
.auth-wall .tile { border-radius: 14px; box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.auth-wall .caption h2 { font-family: "Poppins", var(--font); font-weight: 800; font-size: 40px; color: #fff; }
.auth-wall .caption p { color: rgba(255,255,255,.66); }
.logo-gold {   /* same gold as the GoodNews+ logo */
  background: linear-gradient(180deg, #f9c43c 0%, #f4b326 55%, #eba21f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- logo inside the device mock-ups ---- */
.phone .p-logo-img { height: 18px; width: auto; display: block; }
.tv .top .lg-img { height: 16px; width: auto; }
.browser .nav .lg-img { height: 18px; width: auto; }
.ap img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

/* ---- small inline popover (Block user) ---- */
.dropdown-lite { position: relative; }
.dropdown-lite > summary { list-style: none; cursor: pointer; }
.dropdown-lite > summary::-webkit-details-marker { display: none; }
.dropdown-lite .pop { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; z-index: 30; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }

/* =====================================================================
   Media library (live) — titles, episodes, videos, live channels
   ===================================================================== */
.mb { margin-bottom: 18px; }
.poster .badge-tr { position: absolute; top: 10px; right: 10px; z-index: 2; height: 20px; font-size: 10.5px; }
.img-row { display: flex; gap: 10px; align-items: center; }
.img-row .input { flex: 1; min-width: 0; }
.img-mini { flex: none; object-fit: cover; border-radius: 8px; background: var(--surface-2, #1c1a17); border: 1px solid var(--line); }
.img-mini.tall { width: 40px; height: 60px; }
.img-mini.wide { width: 80px; height: 45px; }
.img-mini.sq   { width: 46px; height: 46px; }
.art-field .upl { margin-top: 6px; }

.ep-list, .vid-list { display: flex; flex-direction: column; }
.ep { border-top: 1px solid var(--line); }
.ep:first-child { border-top: 0; }
.ep > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; }
.ep > summary::-webkit-details-marker { display: none; }
.ep > summary .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ep > summary .grow b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep > summary:hover { background: rgba(var(--fg-rgb, 255,255,255), .025); }
.ep[open] > summary { background: rgba(var(--fg-rgb, 255,255,255), .035); }
.ep .chev { display: inline-flex; transition: transform .15s; opacity: .6; }
.ep .chev svg { width: 16px; height: 16px; }
.ep[open] .chev { transform: rotate(180deg); }
.ep-no { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700;
  font-size: 13px; background: var(--surface-2, #1c1a17); border: 1px solid var(--line); }
.ep-no svg { width: 16px; height: 16px; }
.ep-new > summary b { color: var(--gold-300, #e9c46a); }
.ep-form { padding: 6px 18px 18px; }
.ep-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card > .vid-list .ep:first-child { border-top: 1px solid var(--line); }

.season { display: flex; flex-direction: column; gap: 10px; }
.season-head > summary { list-style: none; display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
.season-head > summary::-webkit-details-marker { display: none; }
.season-head > summary b { font-size: 15px; }

details.vid-add > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.vid-add > summary::-webkit-details-marker { display: none; }
details.vid-add > summary .section-title { display: flex; align-items: center; gap: 8px; }
details.vid-add > summary .section-title svg { width: 16px; height: 16px; }
.img-mini[hidden], [data-art-pv][hidden] { display: none !important; }

/* =====================================================================
   Generic API pages (crud.html)
   ===================================================================== */
.crud-list .ep > summary { align-items: center; }
.crud-cells { display: grid !important; grid-template-columns: minmax(180px, 2fr) repeat(auto-fit, minmax(96px, 1fr)); gap: 4px 16px; align-items: center; }
.crud-cells .cc { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.crud-cells .cc small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3, #8a8478); }
.crud-cells .cc b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crud-cells .cc-main b { font-weight: 700; font-size: 14px; }
.crud-cells .cc b.muted { color: var(--text-2, #b9b2a5); font-weight: 400; }
.crud-cells .cc b.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.crud-cells .chip { align-self: flex-start; }
.dot-bool { font-size: 12px; color: var(--text-3, #8a8478); display: inline-flex; align-items: center; gap: 6px; }
.dot-bool::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .5; }
.dot-bool.on { color: #3cbe78; }
.dot-bool.on::before { opacity: 1; }
.crud-list .grip { cursor: grab; opacity: .5; display: inline-flex; }
.crud-list .grip svg { width: 16px; height: 16px; }
.crud-list [data-sort-item].dragging { opacity: .4; }
.crud-order-note { padding: 10px 18px 0; }
.crud-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.crud-acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--line); }
.crud-act-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.crud-act-form .field { min-width: 160px; margin: 0; }
.crud-act-form > b { align-self: center; }
.crud-kv { grid-template-columns: 180px 1fr; }
.crud-kv dd { word-break: break-word; }
.chips-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-pick label { cursor: pointer; }
.chips-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chips-pick span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--line-2, var(--line)); color: var(--text-2, inherit); }
.chips-pick input:checked + span { background: var(--gold-grad, #e9b53c); color: var(--on-acc, #1a1206); border-color: transparent; font-weight: 600; }
.aud-preview { display: flex; gap: 12px; align-items: center; }
details.vid-add > summary .chev { opacity: .6; display: inline-flex; transition: transform .15s; }
details.vid-add[open] > summary .chev { transform: rotate(180deg); }

/* settings */
.set-list { display: flex; flex-direction: column; }
.set-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(200px, 1.4fr) auto; gap: 14px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); }
.set-key { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-key b { font-size: 13px; word-break: break-all; }
@media (max-width: 760px) { .set-row { grid-template-columns: 1fr auto; } .set-row .set-key { grid-column: 1 / -1; } .crud-cells { grid-template-columns: 1fr 1fr; } }

/* reports */
.rep-row { display: grid; grid-template-columns: minmax(220px, 1.2fr) 2fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.rep-row:first-child { border-top: 0; }
.rep-name { display: flex; flex-direction: column; gap: 2px; }
.rep-opts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rep-opts label { display: flex; align-items: center; gap: 6px; }
.rep-opts .input, .rep-opts .select { height: 34px; width: auto; }
@media (max-width: 760px) { .rep-row { grid-template-columns: 1fr; } }

/* ---- live channel schedule editor */
.slot-row { display: flex; gap: 10px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid rgba(var(--fg-rgb), .07); }
.slot-row:first-child { padding-top: 0; }
.slot-row .grip { margin-top: 32px; color: var(--text-4); }
.slot-row [data-slot-del] { margin-top: 26px; }
.slot-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr 1.4fr .9fr; gap: 10px 12px; }
.slot-grid .span-2 { grid-column: span 2; }
.slot-grid .upl { flex: none; }
@media (max-width: 900px) { .slot-grid { grid-template-columns: 1fr 1fr; } }
[data-show-if][hidden] { display: none !important; }
.ep-static { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid rgba(var(--fg-rgb), .06); }
.ep-static .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ep-static a.mono { color: inherit; text-decoration: underline; text-decoration-color: rgba(var(--fg-rgb), .25); }

/* ---- roles & permissions (cards) */
.roles-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.role-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: opacity .15s; }
.role-top { display: flex; align-items: flex-start; gap: 10px; }
.role-name { display: block; width: 100%; font: inherit; font-size: 16px; font-weight: 600; color: var(--text, inherit);
  background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin: -5px -9px 0; }
input.role-name:hover { border-color: var(--line-2, var(--line)); }
input.role-name:focus { outline: none; border-color: var(--gold-400); background: rgba(var(--fg-rgb), .03); }
.role-meta { font-size: 12px; color: var(--text-3, inherit); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.role-code { font-size: 12px; height: 26px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-2, var(--line));
  background: transparent; color: inherit; width: 150px; }
.role-code:focus { outline: none; border-color: var(--gold-400); }
.role-perms span { height: 28px; font-size: 12px; padding: 0 11px; }
.role-perms input:disabled + span { cursor: default; }
.role-card.locked .role-perms input:checked + span { opacity: .85; }
.role-del { position: relative; display: inline-flex; cursor: pointer; }
.role-del input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.role-del span { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--text-3, inherit); border: 1px solid transparent; }
.role-del:hover span { border-color: var(--line-2, var(--line)); color: var(--bad, #e5534b); }
.role-gone { display: none; font-size: 12.5px; color: var(--bad, #e5534b); }
.role-card.removing { opacity: .55; }
.role-card.removing .role-gone { display: block; }
.role-card.removing .role-perms { pointer-events: none; }
.role-new { border: 1.5px dashed var(--line-2, var(--line)); background: transparent; box-shadow: none; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.role-del input:checked + span { background: var(--bad, #e5534b); color: #fff; }
.add-staff-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.add-staff-row .input, .add-staff-row .select { height: 40px; }
fieldset.bare { border: 0; margin: 0; padding: 0; min-width: 0; }

/* top bar: "More" menu (inside the scrolling pill bar, so the menu is fixed-positioned) */
.tn-more { flex: none; position: static; }
.tn-more > button { display: inline-flex; align-items: center; gap: 4px; padding: 9px 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; }
.tn-more > button:hover, .tn-more.open > button { color: var(--text); background: var(--surface-2); }
.tn-more > button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tn-more > button svg { width: 14px; height: 14px; }
.tn-more .dropdown-menu { position: fixed; right: auto; min-width: 210px; }
.tn-more .dropdown-menu a.on { color: var(--text); background: var(--surface-3); }
[data-jump][hidden] { display: none !important; }
.sudo-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(var(--fg-rgb), .06); color: var(--warn, #d9a43b); }

/* ---- support desk */
.tk-row { color: inherit; text-decoration: none; transition: background .12s; }
.tk-row:hover, .tk-row.on { background: rgba(var(--fg-rgb), .04); }
.tk-row .chev { opacity: .5; display: inline-flex; }
.tab-n { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(var(--fg-rgb), .08); margin-left: 4px; }
.tk-thread { display: flex; flex-direction: column; gap: 14px; }
.tk-msg { display: block; max-width: 80%; align-self: flex-start; padding: 12px 14px; border-radius: 14px 14px 14px 4px;
  background: rgba(var(--fg-rgb), .05); border: 1px solid rgba(var(--fg-rgb), .07); }
.tk-msg.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: rgba(233, 181, 60, .12); border-color: rgba(233, 181, 60, .25); }
.tk-who { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; font-size: 13px; }
.tk-text { white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.sp-preview iframe { width: 100%; height: 420px; border: 1px solid rgba(var(--fg-rgb), .1); border-radius: 12px; background: #fff; }
.tk-msg.me { display: block; } .tk-msg > div { display: block; }
.tk-msg.me { padding: 12px 14px; border-radius: 14px 14px 4px 14px; cursor: default; } .tk-msg.me:hover { background: rgba(233, 181, 60, .12); }
/* chart hover: keep the tooltip inside the card at the edges */
.chart-tip.edge-r { transform: translate(-92%, -115%); }
.chart-tip.edge-l { transform: translate(-8%, -115%); }
.chart-tip.below.edge-r { transform: translate(-92%, 18px); }
.chart-tip.below.edge-l { transform: translate(-8%, 18px); }
.chart-dot, .chart-halo { transition: cx .12s ease, cy .12s ease; }

/* ---- overview v2 */
.ov-date { margin: 6px 0 14px; }
.ov-tiles { margin-top: 6px; }
.ov-tile { color: inherit; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.ov-tile:hover { transform: translateY(-2px); }
.ov-tile .value { margin: 6px 0 4px; }
.ov-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.ov-plot-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ov-list { display: flex; flex-direction: column; padding: 0 8px 10px; }
.ov-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: inherit; text-decoration: none; transition: background .12s; }
.ov-row:hover { background: rgba(var(--fg-rgb), .04); }
.ov-row .grow { display: flex; flex-direction: column; gap: 1px; }
.ov-row.zero { opacity: .55; }
.ov-ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: rgba(var(--fg-rgb), .06); color: var(--text-3); }
.ov-ic svg { width: 16px; height: 16px; }
.ov-ic.warn { background: rgba(217, 164, 59, .14); color: var(--warn, #d9a43b); }
.ov-ic.bad { background: rgba(229, 83, 75, .13); color: var(--bad, #e5534b); }
.ov-ic.ok { background: rgba(63, 183, 111, .13); color: var(--ok, #3fb76f); }
.ov-ic.info { background: rgba(106, 166, 255, .13); color: #6aa6ff; }
.ov-ic.live { background: rgba(229, 83, 75, .13); color: var(--bad, #e5534b); }
.ov-n { min-width: 28px; height: 26px; padding: 0 9px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 13px; background: rgba(var(--fg-rgb), .08); }
.ov-n.warn { background: rgba(217, 164, 59, .18); color: var(--warn, #d9a43b); }
.ov-n.bad { background: rgba(229, 83, 75, .16); color: var(--bad, #e5534b); }
.ov-n.info { background: rgba(106, 166, 255, .16); color: #6aa6ff; }
.ov-ok { color: var(--ok, #3fb76f); display: inline-flex; }
.ov-ok svg { width: 16px; height: 16px; }
.ov-av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--gold-grad); color: var(--on-acc); }
.ov-rank { width: 22px; text-align: center; font-weight: 700; color: var(--text-3); }
.ov-ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-live { color: var(--bad, #e5534b); font-weight: 600; }
.ov-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: ovpulse 1.4s infinite; }
@keyframes ovpulse { 50% { opacity: .3; } }

/* ---- Content -> Media library */
.drop { display: flex; align-items: center; gap: 16px; padding: 22px; border: 1.5px dashed var(--line-2, rgba(128,128,128,.4)); border-radius: 16px; margin: 6px; transition: background .15s, border-color .15s; flex-wrap: wrap; }
.drop.over { border-color: var(--gold-400); background: rgba(233, 181, 60, .07); }
.drop > div:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 200px; }
.drop-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-grad); color: var(--on-acc); flex: none; }
.drop-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.drop-acts label { display: flex; gap: 6px; align-items: center; }
.uq { padding: 6px 12px 12px; }
.uq-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 6px; }
.uq-item { padding: 10px 6px; border-top: 1px solid rgba(var(--fg-rgb), .07); }
.uq-item.err .ep-no { color: var(--bad, #e5534b); }
.uq-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.uq-top .grow { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.uq-sel { width: auto !important; height: 34px; min-width: 110px; }
.uq-btns { display: flex; gap: 6px; }
.uq-bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 8px 0 0 46px; }
.uq-bar i { display: block; height: 100%; width: 0; background: var(--gold-grad); transition: width .25s; }
.uq-item[data-state="done"] .uq-bar i { background: var(--ok, #3fb76f); }
.uq-msg { margin: 6px 0 0 46px; color: var(--text-3); }
.uq-msg.bad { color: var(--bad, #e5534b); } .uq-msg.ok { color: var(--ok, #3fb76f); } .uq-msg.warn { color: var(--warn, #d9a43b); }
.uq-msg .link-btn { color: inherit; font-weight: 600; }
.ml-row { cursor: pointer; }
.ml-row:hover { background: rgba(var(--fg-rgb), .03); }
.ml-thumb { width: 80px; height: 45px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); color: var(--text-4); }
.ml-thumb.tall { width: 32px; height: 56px; }
.ml-thumb.ph svg { width: 18px; height: 18px; }
.ml-err { display: block; color: var(--bad, #e5534b); max-width: 260px; }
.ml-player { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.ml-player.tall { aspect-ratio: 9 / 16; max-width: 340px; margin: 0 auto; }
.ml-player video { width: 100%; height: 100%; display: block; }
.ml-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.uq-item [hidden], .uq [hidden] { display: none !important; }

/* ---- artwork slots + crop dialog (phase 2) */
.islot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; align-items: start; }
.islot { display: flex; flex-direction: column; gap: 8px; }
.islot-pic { position: relative; border-radius: 12px; overflow: hidden; background: repeating-conic-gradient(rgba(var(--fg-rgb), .05) 0 25%, transparent 0 50%) 0 0 / 16px 16px;
  border: 1px dashed rgba(var(--fg-rgb), .18); display: grid; place-items: center; }
.islot.has .islot-pic { border-style: solid; border-color: rgba(var(--fg-rgb), .1); }
.islot-pic.free { min-height: 120px; }
.islot-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.islot-pic.free img { object-fit: contain; max-height: 160px; }
.islot-ph { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: var(--text-3); padding: 12px; text-align: center; }
.islot-ph small { font-size: 11px; color: var(--text-4); }
.islot-foot { display: flex; align-items: center; gap: 8px; }
.islot-foot .grow { display: flex; flex-direction: column; }
.islot-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.islot-msg { color: var(--ok, #3fb76f); min-height: 0; } .islot-msg.bad { color: var(--bad, #e5534b); }
.islot [hidden] { display: none !important; }
.crop-back .crop-modal { width: min(900px, 96vw); }
.crop-head { display: flex; gap: 6px; align-items: baseline; margin-bottom: 10px; }
.crop-stage { height: min(60vh, 520px); background: #111; border-radius: 12px; overflow: hidden; }
.crop-stage img { display: block; max-width: 100%; }
.crop-prev { display: grid; place-items: center; background: repeating-conic-gradient(rgba(var(--fg-rgb), .06) 0 25%, transparent 0 50%) 0 0 / 16px 16px; border-radius: 12px; padding: 12px; min-height: 200px; }
.crop-prev img { max-width: 100%; max-height: min(60vh, 520px); border-radius: 8px; box-shadow: 0 10px 30px -10px #000; }
.crop-warn { color: var(--warn, #d9a43b); min-height: 18px; margin: 10px 0 0; }
.crop-acts { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.crop-acts > div:first-child { display: flex; gap: 4px; }
.crop-back [hidden] { display: none !important; }
.art-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 16px; }
.art-item { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.art-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: rgba(var(--fg-rgb), .05); border-radius: 10px; }

/* plan limits / devices tab */
[data-warn][hidden] { display: none !important; }
.dev-dlg { border: 0; padding: 0; background: transparent; color: inherit; }
.dev-dlg::backdrop { background: rgba(0,0,0,.55); }
.pl-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; padding: 8px 18px 18px; }
.pl-form .pl-full { grid-column: 1 / -1; }
@media (max-width: 900px) { .pl-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pl-form { grid-template-columns: 1fr; } }

/* roles: API permissions per role */
.role-api { border-top: 1px solid var(--line); padding-top: 10px; }
.role-api > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.role-api > summary::-webkit-details-marker { display: none; }
.role-api > summary .muted { margin-left: auto; font-weight: 400; }
.role-api[open] > summary .chev { transform: rotate(180deg); }
.role-api-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; max-height: 320px; overflow: auto; padding-right: 4px; }
.role-api-grp { display: flex; flex-direction: column; gap: 4px; }
.role-api-grp > b { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.role-api-grp label { display: grid; grid-template-columns: 16px 1fr; column-gap: 8px; align-items: start; font-size: 12.5px; cursor: pointer; }
.role-api-grp label small { grid-column: 2; color: var(--muted); font-size: 11.5px; }
.role-api-grp input { margin-top: 2px; accent-color: var(--gold-100, #e9b53c); }
.role-api > summary > span:first-child { white-space: nowrap; }
.role-api > summary .muted { text-align: right; }

/* ================= usability layer (ux.js) ================= */
/* toasts: success + error, closable */
.toast.bad .ic { background: var(--bad, #e5484d); color: #fff; }
.toast > div { flex: 1; min-width: 0; line-height: 1.4; }
.toast-x { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.toast-x:hover { color: var(--text); }
.toasts { max-width: min(440px, calc(100vw - 32px)); }
/* required + inline errors */
label.req::after { content: " *"; color: var(--gold-100, #e9b53c); font-weight: 700; }
.field-err { display: block; color: var(--bad, #e5484d); font-size: 12px; margin-top: 5px; }
.field-err[hidden] { display: none; }
.input.invalid, .select.invalid, .textarea.invalid, .invalid + .ss-btn { border-color: var(--bad, #e5484d) !important; box-shadow: 0 0 0 3px rgba(229,72,77,.15); }
/* busy buttons */
.btn.is-busy { position: relative; opacity: .8; cursor: progress; }
.btn.is-busy svg { animation: gn-spin .9s linear infinite; }
@keyframes gn-spin { to { transform: rotate(360deg); } }
/* searchable select */
.ss { position: relative; display: inline-block; width: 100%; }
.field .ss, .form-grid .ss { display: block; }
.ss-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; }
.ss-btn { text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 34px; width: 100%; }
.ss-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: 360px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.35); padding: 8px; }
.ss-pop[hidden] { display: none; }
.ss-q { height: 36px; margin-bottom: 6px; }
.ss-list { max-height: 260px; overflow: auto; }
.ss-opt { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.ss-opt.act, .ss-opt:hover { background: rgba(var(--fg-rgb), .07); }
.ss-opt.sel { color: var(--gold-100, #e9b53c); font-weight: 600; }
.ss-none { padding: 10px; color: var(--muted); font-size: 13px; }
.toolbar .ss { width: auto; min-width: 140px; }
.toolbar .ss-btn { height: 36px; }
.ss-reset { align-self: center; font-size: 12.5px; white-space: nowrap; }
/* "Scheduled for" */
.when-hint { color: var(--gold-100, #e9b53c); }
.when-hint.past { color: var(--warn, #f5a524); }
/* page loading: top bar + skeleton */
.nav-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: var(--gold-grad, #e9b53c); opacity: 0; pointer-events: none; }
body.nav-loading .nav-bar { opacity: 1; animation: gn-load 8s cubic-bezier(.1,.6,.2,1) forwards; }
@keyframes gn-load { from { width: 0; } 20% { width: 45%; } to { width: 92%; } }
/* full-panel skeleton (ux.js swaps the old page for these blocks while the next one loads) */
.sk-page { display: flex; flex-direction: column; gap: 20px; animation: sk-in .2s ease; }
@keyframes sk-in { from { opacity: 0; } to { opacity: 1; } }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, rgba(var(--fg-rgb), .06) 0, rgba(var(--fg-rgb), .12) 40%, rgba(var(--fg-rgb), .06) 80%) 0 0/200% 100%;
  animation: gn-shimmer 1.3s linear infinite; }
.sk-head { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.sk-h1 { width: 220px; height: 30px; }
.sk-sub { width: 360px; max-width: 70%; height: 14px; }
.sk-card { padding: 0; overflow: hidden; }
.sk-tools { display: flex; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sk-search { width: 280px; height: 36px; border-radius: 999px; }
.sk-pill { width: 130px; height: 36px; border-radius: 999px; }
.sk-row { display: grid; grid-template-columns: 36px minmax(0, 1.6fr) 90px 1fr 0.7fr; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sk-row:last-child { border-bottom: 0; }
.sk-av { width: 36px; height: 36px; border-radius: 50%; }
.sk-lines { display: flex; flex-direction: column; gap: 7px; }
.sk-l1 { width: 55%; height: 13px; }
.sk-l2 { width: 75%; height: 11px; }
.sk-chip { width: 64px; height: 22px; border-radius: 999px; }
.sk-col { height: 12px; width: 80%; }
.sk-col.sm { width: 55%; }
@media (max-width: 760px) { .sk-row { grid-template-columns: 36px 1fr 70px; } .sk-row .sk-col { display: none; } .sk-search { width: 100%; } }
@keyframes gn-shimmer { to { background-position: -200% 0, 0 0; } }
/* sticky save bar */
.savebar { position: sticky; bottom: 0; z-index: 40; margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; border-radius: 16px 16px 0 0; background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; box-shadow: 0 -12px 30px rgba(0,0,0,.25); }
.savebar [data-savebar-state] { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.savebar [data-savebar-state]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #30a46c); }
.savebar.dirty [data-savebar-state] { color: var(--text); font-weight: 600; }
.savebar.dirty [data-savebar-state]::before { background: var(--gold-100, #e9b53c); }
.savebar .grow { flex: 1; }
/* in-form tabs */
.form-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.form-tabs button { background: none; border: 0; color: var(--muted); padding: 12px 14px; font: inherit; font-size: 14px; cursor: pointer; position: relative; white-space: nowrap; }
.form-tabs button:hover { color: var(--text); }
.form-tabs button.on { color: var(--gold-100, #e9b53c); font-weight: 600; }
.form-tabs button.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--gold-grad, #e9b53c); }
.form-tabs .tab-n { margin-left: 6px; }
[data-tab-pane][hidden] { display: none !important; }
/* bulk bar */
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px; background: rgba(var(--fg-rgb), .04); border-bottom: 1px solid var(--line); }
.bulk-bar[hidden] { display: none; }
.bulk-bar b { font-size: 13px; margin-right: 6px; }
.tbl td.ck, .tbl th.ck { width: 36px; padding-right: 0; }
.tbl input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold-100, #e9b53c); cursor: pointer; }
/* copy chip */
.code-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; padding: 3px 8px; border-radius: 8px; background: rgba(var(--fg-rgb), .06); border: 1px solid var(--line); cursor: pointer; color: inherit; }
.code-chip:hover { border-color: var(--gold-100, #e9b53c); }
.code-chip svg { width: 13px; height: 13px; opacity: .7; }
/* no horizontal scroll on laptop/tablet */
html, body { overflow-x: clip; }
.table-wrap { overflow-x: auto; }
/* title page: savebar only for the main form's tabs */
body[data-tab="episodes"] [data-savebar-for="title-form"], body[data-tab="notes"] [data-savebar-for="title-form"] { display: none; }
.art-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .art-grid { grid-template-columns: 1fr; } }
/* "View in app" preview (the app's black + gold) */
.app-pv-modal { width: min(440px, 100%); padding: 16px; }
.app-pv-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.app-pv-top .muted { flex: 1; }
.app-phone { width: 100%; max-width: 380px; margin: 0 auto; border-radius: 28px; overflow: hidden; background: #000; color: #f5f1e8; border: 6px solid #1c1a17; box-shadow: 0 30px 60px rgba(0,0,0,.5); max-height: 70vh; overflow-y: auto; font-family: Manrope, system-ui, sans-serif; }
.app-hero { position: relative; aspect-ratio: 16/11; background: #141210 center/cover no-repeat; display: flex; align-items: flex-end; justify-content: center; }
.app-hero-fade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0) 35%, #000 100%); }
.app-logo { position: relative; max-width: 70%; max-height: 90px; margin-bottom: 14px; object-fit: contain; }
.app-title { position: relative; margin-bottom: 14px; font: 800 26px/1.1 Poppins, sans-serif; text-align: center; padding: 0 16px; background: linear-gradient(180deg, #f8e3a0, #d6a43c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.app-body { padding: 4px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.app-meta { text-align: center; font-size: 12px; color: #b9b1a1; }
.app-age { border: 1px solid #6d6556; border-radius: 4px; padding: 0 4px; }
.app-badge { align-self: center; font-size: 11px; font-weight: 700; color: #1a1206; background: linear-gradient(180deg, #f8e3a0, #d6a43c); border-radius: 999px; padding: 2px 10px; }
.app-btns { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.app-play, .app-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.app-play { background: linear-gradient(180deg, #f8e3a0, #d6a43c); color: #1a1206; }
.app-ghost { padding: 0 14px; background: #1c1a17; color: #f5f1e8; }
.app-play svg, .app-ghost svg { width: 16px; height: 16px; }
.app-desc { margin: 0; font-size: 13px; line-height: 1.5; color: #d9d2c3; white-space: pre-line; }
.app-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.app-genres span { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: #1c1a17; color: #d6a43c; }
.app-eps { display: flex; flex-direction: column; gap: 10px; }
.app-eps > b { font-size: 14px; }
.app-ep { display: flex; gap: 10px; align-items: center; }
.app-ep img, .app-ep-ph { width: 110px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; background: #1c1a17; flex: none; display: grid; place-items: center; color: #d6a43c; font-weight: 700; }
.app-ep b { display: block; font-size: 13px; }
.app-ep span { font-size: 11.5px; color: #9c9483; }
/* genre tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; padding: 6px 8px; cursor: text; position: relative; }
.tags .tag { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 10px; border-radius: 999px; background: rgba(var(--fg-rgb), .08); font-size: 13px; }
.tags .tag button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.tags .tag button:hover { color: var(--bad, #e5484d); }
.tags input { flex: 1; min-width: 120px; border: 0; background: none; outline: none; color: inherit; font: inherit; height: 30px; }
.tags-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.35); padding: 6px; max-height: 240px; overflow: auto; }
.tags-pop[hidden] { display: none; }
.app-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body:has(.savebar) .toasts { bottom: 96px; }

/* ================= Page Builder ================= */
.pb-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 14px; position: sticky; top: calc(var(--sticky-top, 82px) + 8px); z-index: 20; }   /* under the top bar and its account menu */
.pb-scope { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.pb-lbl { display: flex; flex-direction: column; gap: 5px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pb-lbl .select { height: 36px; min-width: 150px; text-transform: none; letter-spacing: 0; }
.pb-status { display: flex; flex-direction: column; gap: 3px; margin-left: auto; align-items: flex-end; }
.pb-acts { display: flex; gap: 8px; align-items: center; }
.pb-auto, .pb-mem { margin-bottom: 14px; }
.pb-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
@media (max-width: 1280px) { .pb-grid { grid-template-columns: 280px minmax(0, 1fr); } .pb-edit { grid-column: 1 / -1; } }
@media (max-width: 860px) { .pb-grid { grid-template-columns: 1fr; } }
.pb-list, .pb-edit { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
@media (max-width: 1280px) { .pb-edit { position: static; max-height: none; } }
.pb-secs { display: flex; flex-direction: column; padding: 0 8px; }
.pb-sec { display: flex; align-items: center; gap: 6px; padding: 9px 6px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.pb-sec:hover { background: rgba(var(--fg-rgb), .04); }
.pb-sec.on { border-color: var(--gold-100, #e9b53c); background: rgba(233,181,60,.06); }
.pb-sec.off .grow, .pb-sec.ai-off .grow { opacity: .45; }
.pb-sec.dragging { opacity: .4; }
.pb-sec .grow { min-width: 0; display: flex; flex-direction: column; }
.pb-sec .grow b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-sec .grow span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-sec .btn-icon { width: 28px; height: 28px; padding: 0; opacity: .55; }
.pb-sec:hover .btn-icon, .pb-sec.on .btn-icon { opacity: 1; }
.pb-sec .btn-icon svg { width: 15px; height: 15px; }
.pb-del:hover { color: var(--bad, #e5484d); }
.pb-grip { cursor: grab; color: var(--muted); display: inline-flex; }
.pb-grip svg { width: 14px; height: 14px; }
.pb-n { width: 20px; text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; flex: none; }
.pb-add { position: relative; padding: 10px 12px 14px; }
.pb-add-menu { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 4px); z-index: 40; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.4); padding: 6px; display: flex; flex-direction: column; max-height: 420px; overflow: auto; }
.pb-add-menu[hidden] { display: none; }
.pb-add-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 9px 10px; border-radius: 10px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.pb-add-opt:hover:not(:disabled) { background: rgba(var(--fg-rgb), .06); }
.pb-add-opt b { font-size: 13.5px; }
.pb-add-opt.disabled { opacity: .45; cursor: not-allowed; }
.pb-form { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.pb-form h4 { margin: 4px 0 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pb-row3 { display: grid; grid-template-columns: 1.3fr auto 90px; gap: 10px; align-items: end; }
.seg-sm a { height: 34px; padding: 0 12px; font-size: 13px; }
.pb-titles { display: flex; flex-direction: column; gap: 6px; }
.pb-tl { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; }
.pb-tl .input { height: 38px; }
.pb-titles .pb-tl.more { display: none; }
.pb-titles.open .pb-tl.more { display: grid; }
.pb-rules { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.pb-pick { display: flex; flex-direction: column; gap: 6px; }
.pb-pick-l { font-size: 13px; font-weight: 600; }
.pb-search { position: relative; }
.pb-res { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.4); padding: 4px; }
.pb-res[hidden] { display: none; }
.pb-r, .pb-pk { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; }
.pb-r { cursor: pointer; }
.pb-r:hover { background: rgba(var(--fg-rgb), .06); }
.pb-r img, .pb-pk img, .pb-ph { width: 30px; height: 44px; object-fit: cover; border-radius: 5px; background: rgba(var(--fg-rgb), .08); flex: none; display: inline-block; }
.pb-r div, .pb-pk .grow { display: flex; flex-direction: column; min-width: 0; }
.pb-r b, .pb-pk b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-picked { display: flex; flex-direction: column; gap: 2px; }
.pb-pk { background: rgba(var(--fg-rgb), .03); }
.pb-pk .btn-icon { width: 26px; height: 26px; padding: 0; }
.pb-pk .btn-icon svg { width: 14px; height: 14px; }
.pb-slides { display: flex; flex-direction: column; gap: 10px; }
.pb-slide { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pb-slide-h { display: flex; align-items: center; gap: 4px; }
.pb-slide-h b { flex: 1; font-size: 13px; }
.pb-slide-h .btn-icon { width: 28px; height: 28px; padding: 0; }
.pb-slide-h .btn-icon svg { width: 14px; height: 14px; }
.pb-ver { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pb-ver .grow { display: flex; flex-direction: column; }
/* preview stage */
.pb-prev { padding: 14px; }
.pb-prev-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; margin-bottom: 14px; }
.pb-prev-bar .seg a { height: 32px; font-size: 12.5px; }
.pb-prev-bar .seg svg { width: 14px; height: 14px; }
.pb-stage { display: flex; justify-content: center; overflow: auto; padding: 4px; }
.pb-device { background: #000; border: 8px solid #1c1a17; box-shadow: 0 30px 60px rgba(0,0,0,.45); overflow: hidden; transition: width .2s; }
.pb-device.phone { width: 360px; height: 720px; border-radius: 34px; }
.pb-device.tablet { width: 640px; height: 820px; border-radius: 26px; }
.pb-device.tv { width: 100%; max-width: 960px; aspect-ratio: 16/9; height: auto; border-radius: 10px; border-width: 10px; }
.pb-screen { height: 100%; overflow-y: auto; color: #f5f1e8; font-family: Manrope, system-ui, sans-serif; padding-bottom: 30px; }
.pv-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px; }
.pv-logo { font: 800 15px/1 Poppins, sans-serif; letter-spacing: .04em; background: linear-gradient(180deg, #f8e3a0, #d6a43c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-tag { font-size: 11px; color: #9c9483; }
.pv-empty { padding: 60px 20px; text-align: center; color: #9c9483; font-size: 13px; }
.pv-sec { padding: 8px 0 6px; cursor: pointer; border: 2px solid transparent; border-radius: 10px; margin: 2px 4px; }
.pv-sec:hover { border-color: rgba(214,164,60,.35); }
.pv-sec.sel { border-color: #d6a43c; }
.pv-h { font-size: 14px; font-weight: 700; padding: 0 10px 8px; }
.pv-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 10px; scrollbar-width: none; }
.pv-row::-webkit-scrollbar { display: none; }
.pv-card { position: relative; flex: none; width: 96px; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; background: #1c1a17; }
.pv-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-card.sk { background: linear-gradient(90deg, #1c1a17, #2a2622, #1c1a17) 0 0/200% 100%; animation: gn-shimmer 1.2s linear infinite; }
.pv-ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 6px; font-size: 10.5px; font-weight: 700; color: #d6a43c; }
.pv-size-s .pv-card { width: 78px; } .pv-size-l .pv-card { width: 122px; }
.pv-c169 .pv-card { width: 160px; aspect-ratio: 16/9; } .pv-c169.pv-size-s .pv-card { width: 130px; } .pv-c169.pv-size-l .pv-card { width: 200px; }
.pv-c167 .pv-card { width: 220px; aspect-ratio: 16/7; }
.pv-c11 .pv-card { width: 96px; aspect-ratio: 1; }
.pv-top10 .pv-card { width: 92px; margin-left: 26px; overflow: visible; }
.pv-top10 .pv-card img { border-radius: 8px; }
.pv-num { position: absolute; left: -30px; bottom: -6px; font: 800 64px/1 Poppins, sans-serif; color: #000; -webkit-text-stroke: 2px #d6a43c; z-index: 0; }
.pv-top10 .pv-card img, .pv-top10 .pv-card .pv-ph { position: relative; z-index: 1; }
.pv-hero .pv-row, .pv-promo .pv-row { scroll-snap-type: x mandatory; }
.pv-hero .pv-card, .pv-promo .pv-card { width: calc(100% - 4px); aspect-ratio: 16/9; scroll-snap-align: center; border-radius: 12px; }
.pv-hero.pv-c167 .pv-card, .pv-promo.pv-c167 .pv-card { aspect-ratio: 16/7; }
.pv-hero-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.85)); display: flex; align-items: center; gap: 8px; }
.pv-hero-cap b { flex: 1; font-size: 15px; }
.pv-play { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(180deg, #f8e3a0, #d6a43c); color: #1a1206; display: grid; place-items: center; }
.pv-play svg { width: 13px; height: 13px; }
.pv-lock { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.7); color: #d6a43c; display: grid; place-items: center; z-index: 2; }
.pv-lock svg { width: 11px; height: 11px; }
.pv-prog { position: absolute; left: 0; bottom: 0; height: 3px; background: #d6a43c; }
.pv-continue .pv-card, .pv-live .pv-card { width: 150px; aspect-ratio: 16/9; }
.pv-genre { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #f5f1e8; background: linear-gradient(135deg, #2a2216, #120f0b); }
.pv-genres .pv-card { width: 110px; aspect-ratio: 16/10; }
.pv-note { align-self: center; font-size: 11px; color: #6d6556; white-space: nowrap; padding-left: 4px; }
.pv-none { font-size: 12px; color: #9c9483; padding: 12px 0; }
.pb-device.tv .pv-card { width: 120px; } .pb-device.tv .pv-c169 .pv-card { width: 200px; } .pb-device.tv .pv-hero .pv-card { width: 70%; }
.ai-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ai-row:last-child { border-bottom: 0; }
.ai-row .grow { display: flex; flex-direction: column; gap: 3px; }
.alert[hidden], .empty[hidden] { display: none !important; }
.btn[hidden] { display: none !important; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; filter: saturate(.6); }
.btn.is-busy:disabled { opacity: .8; cursor: progress; }
/* header: who is signed in */
.tn-who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; margin-right: 2px; }
.tn-who b { font-size: 13px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-who span { font-size: 11px; color: var(--gold-100, #e9b53c); }
@media (max-width: 1180px) { .tn-who { display: none; } }
/* global search results */
.gs-results { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; margin-top: 8px; }
.gs-results:empty { display: none; }
.gs-h { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 6px 4px; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.gs-item:hover, .gs-item.act { background: rgba(var(--fg-rgb), .07); }
.gs-item div { display: flex; flex-direction: column; min-width: 0; }
.gs-item b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-img { width: 28px; height: 40px; border-radius: 5px; object-fit: cover; background: rgba(var(--fg-rgb), .08); flex: none; }
.gs-wait { padding: 10px 6px; }
.ov-stats { display: flex; gap: 10px; white-space: nowrap; flex-wrap: wrap; justify-content: flex-end; }
.title-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.title-stats .ts { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.title-stats .ts b { font-size: 20px; }
@media (max-width: 760px) { .title-stats { grid-template-columns: 1fr 1fr; } }
.art-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .art-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .art-slots { grid-template-columns: 1fr; } }
.pb-viewer { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.pb-viewer .select { height: 32px; width: auto; min-width: 150px; font-size: 13px; }
.pb-screen.loading { opacity: .55; transition: opacity .2s; }
.pv-round .pv-card { width: 76px; aspect-ratio: 1; border-radius: 50%; }

/* search box: hover animation on page chips and results */
#modal-search .modal { animation: gs-pop .18s cubic-bezier(.2,.8,.2,1); }
@keyframes gs-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
#modal-search [data-jump] { transition: transform .16s cubic-bezier(.2,.8,.2,1), background .16s, color .16s, box-shadow .16s, border-color .16s; }
#modal-search [data-jump]:hover, #modal-search [data-jump]:focus-visible {
  transform: translateY(-2px); background: var(--gold-grad, #e9b53c); color: var(--on-acc, #1a1206); border-color: transparent;
  box-shadow: 0 8px 18px -8px rgba(214,164,60,.65); outline: none; }
#modal-search [data-jump]:active { transform: translateY(0) scale(.97); }
.gs-item { transition: background .15s, transform .15s, padding-left .15s; }
.gs-item:hover, .gs-item.act { transform: translateX(3px); box-shadow: inset 3px 0 0 var(--gold-100, #e9b53c); }
@media (prefers-reduced-motion: reduce) { #modal-search .modal, #modal-search [data-jump], .gs-item { animation: none; transition: none; } }

/* ================= liquid glass menu pill (ux.js) ================= */
.lq-host { position: relative; isolation: isolate; }
.lq-host > a, .lq-host > button { position: relative; z-index: 1; }
.lq { position: absolute; z-index: 0; left: 0; top: 0; width: 0; height: 0; border-radius: 999px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.03)), rgba(var(--fg-rgb), .07);
  -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 1px rgba(0,0,0,.12), inset 0 0 0 1px rgba(var(--fg-rgb), .10),
              0 8px 22px -10px rgba(0,0,0,.45);
  transition: left .55s cubic-bezier(.25,1.45,.45,1), top .55s cubic-bezier(.25,1.45,.45,1), width .55s cubic-bezier(.25,1.45,.45,1),
              height .4s ease, transform .26s cubic-bezier(.3,.7,.4,1), opacity .2s; }
.lq.lq-move { transform: scaleY(.84) scaleX(1.06); }
.lq.lq-instant { transition: none; }
/* the moving pill draws the "current" state, so items stop drawing their own */
.lq-ready > a:not(.tn-cta).on { background: transparent !important; box-shadow: none !important; border-color: transparent !important; }
.lq-ready > a:not(.tn-cta):hover { background: transparent; }
.tn-pills.lq-ready > a.lq-on { color: var(--text); }
.tn-tabs.lq-ready > a.lq-on { color: var(--gold-100); }
.tn-pills.lq-ready > a.on:not(.lq-on) { color: var(--text-2); }
.tn-tabs.lq-ready > a.on:not(.lq-on) { color: var(--text-3); }
.tn-tabs.lq-ready .lq { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 0 0 1px rgba(var(--acc-rgb), .45), 0 8px 20px -12px rgba(var(--acc-rgb), .6);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)), rgba(var(--acc-rgb), .08); }
[data-theme="light"] :is(.tn-pills, .tn-tabs).lq-ready .lq {
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.11)), #e9e9e6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 1px rgba(0,0,0,.06), inset 0 0 0 1px rgba(0,0,0,.16),
              0 6px 16px -8px rgba(0,0,0,.35); }
@media (prefers-reduced-motion: reduce) { .lq { transition: none; } }

/* ================= UI polish: sub-bar label, fades, crumbs, tables, status chips, account menu ================= */
/* 1. section name in the sub-bar is a label, not a tab */
.tn-sub-title { display: flex; align-items: center; gap: 14px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--text-4); }
.tn-sub-title::after { content: ""; width: 1px; height: 18px; background: var(--line-2); }

/* 2. menus that scroll sideways fade at the edge that has more */
.tn-sub-inner.fade-r, .tn-pills.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.tn-sub-inner.fade-l, .tn-pills.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px); mask-image: linear-gradient(90deg, transparent, #000 48px); }
.tn-sub-inner.fade-l.fade-r, .tn-pills.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.tn-sub-inner, .tn-pills { scroll-behavior: smooth; }

/* 3. breadcrumbs: only real back-links remain */
.crumbs .crumb-sep { font-style: normal; color: var(--text-4); }
.crumbs a { color: var(--text-3); }
.crumbs > span:last-child { color: var(--text-2); }

/* 4. dates: hover shows the other form (full IST time / how long ago) */
time[title] { cursor: help; text-decoration: underline dotted rgba(var(--fg-rgb), .14); text-underline-offset: 3px; }

/* 5. one status palette: grey = draft / off / ended */
.chip.grey { background: rgba(var(--fg-rgb), .07); color: var(--text-3); }
.chip.grey::before { display: block; opacity: .7; }
.chip.info::before { animation: chip-pulse 1.6s ease-in-out infinite; }
@keyframes chip-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .chip.info::before { animation: none; } }

/* 6. tables: header stays while scrolling, clearer hover, whole row opens */
.table-wrap.tw-fit { overflow: visible; }
.table-wrap.tw-fit .tbl thead th { position: sticky; top: var(--sticky-top, 0px); z-index: 5; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
.tbl tbody tr:hover { background: rgba(var(--acc-rgb), .06); }
.tbl tbody tr.row-link { cursor: pointer; }
.tbl tbody tr.row-link:hover > td:first-child { box-shadow: inset 2px 0 0 rgba(var(--acc-rgb), .8); }
.tbl tbody tr.row-link:active { background: rgba(var(--acc-rgb), .1); }

/* 7. account menu: name + role + avatar is one button */
.tn-acct { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 12px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; font: inherit; transition: background .15s, border-color .15s; }
.tn-acct:hover, .tn-account.open .tn-acct { background: var(--surface); border-color: var(--line-2); }
.tn-acct .tn-who { margin: 0; text-align: right; }
.tn-acct .tn-avatar, .acct-head .tn-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; }
.tn-chev { display: grid; color: var(--text-3); transition: transform .2s; }
.tn-chev svg { width: 14px; height: 14px; }
.tn-account.open .tn-chev { transform: rotate(180deg); }
.tn-account .dropdown-menu { right: 0; left: auto; min-width: 250px; }
.acct-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 8px; }
.acct-head b { display: block; }
.acct-head span.small { display: block; }
.acct-mail { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1180px) { .tn-acct { padding: 2px; } .tn-acct .tn-chev { display: none; } }
.pv-auto { margin: 0 12px 10px; padding: 6px 10px; border-radius: 8px; font-size: 10.5px; color: rgba(255,255,255,.7); background: rgba(255,255,255,.07); text-align: center; }
/* body was fixed at 100% height, so on long pages the sticky top bar scrolled away after one screen */
body.topnav { height: auto; min-height: 100%; }

/* ================= v2: stat tiles, plans, form sections ================= */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.kpi-t { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0; }
.kpi-t span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-t b { font-size: 24px; font-weight: 700; letter-spacing: -.4px; line-height: 1.2; }
.kpi-t small { font-size: 11.5px; color: var(--text-4); }
a.kpi-t:hover { border-color: rgba(var(--acc-rgb), .45); transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(0,0,0,.5); }
a.kpi-t.on { border-color: rgba(var(--acc-rgb), .7); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .35); }
a.kpi-t.on span { color: var(--gold-100); }

.plan-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--line); color: var(--text); transition: border-color .15s, transform .15s, box-shadow .2s; }
.plan-card:hover { border-color: rgba(var(--acc-rgb), .5); transform: translateY(-2px); box-shadow: 0 18px 40px -26px rgba(0,0,0,.6); }
.plan-card.off { opacity: .72; }
.pc-top { display: flex; align-items: flex-start; gap: 8px; }
.pc-top .grow > * { display: block; }
.pc-name { font-size: 18px; font-weight: 700; }
.pc-price { display: flex; align-items: baseline; gap: 6px; }
.pc-price b { font-size: 22px; font-weight: 700; }
.pc-members { display: flex; align-items: flex-end; gap: 14px; padding: 14px; border-radius: 12px; background: rgba(var(--fg-rgb), .035); flex-wrap: wrap; }
.pc-big b { display: block; font-size: 30px; font-weight: 700; line-height: 1; color: var(--gold-100); }
.pc-big span { font-size: 12px; color: var(--text-3); }
.pc-mini { display: flex; gap: 12px; margin-left: auto; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.pc-mini b { color: var(--text); font-weight: 600; }
.pc-limits { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--text-2); }
.pc-limits span { display: inline-flex; align-items: center; gap: 5px; }
.pc-limits svg { width: 14px; height: 14px; color: var(--text-3); }
.pc-open { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--gold-100); margin-top: auto; }
.pc-open svg { width: 14px; height: 14px; }

.fsec { padding: 4px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.fsec:last-of-type { border-bottom: 0; }
.fsec > h3 { margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.fsec > p.lead { margin: -8px 0 14px; font-size: 12.5px; color: var(--text-3); }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .form-grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .form-grid.g3, .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }
.dl-row { display: flex; align-items: center; gap: 10px; }
.dl-row[hidden] { display: none; }
.kpis-6 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ================= v2: video library ================= */
.up-steps { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 18px 20px 0; }
.up-steps .field { min-width: 160px; }
.up-steps .select { height: 38px; }
.up-note { flex: 1 1 260px; margin: 0 0 8px; color: var(--text-3); }
.seg a.disabled { opacity: .45; cursor: not-allowed; }
.ml-sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; min-width: 0; }
.ml-st { min-width: 150px; }
.pbar { height: 5px; border-radius: 99px; background: rgba(var(--fg-rgb), .09); overflow: hidden; margin: 6px 0 3px; max-width: 160px; }
.pbar i { display: block; height: 100%; border-radius: inherit; background: var(--gold-grad); transition: width .6s ease; }
.pbar.lg { height: 8px; max-width: none; margin-top: 14px; }
.tc-now { padding: 18px 20px; }
.tc-now-top { display: flex; align-items: center; gap: 14px; }
.tc-now-top .grow > * { display: block; }
.tc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--acc-rgb), .12); color: var(--gold-100); flex: none; }
.tc-ic svg { width: 20px; height: 20px; }
.tc-ic.spin svg { animation: tc-spin 1.4s linear infinite; }
@keyframes tc-spin { to { transform: rotate(360deg); } }
.tc-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.tc-go { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.choice { position: relative; display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.choice:hover { border-color: rgba(var(--acc-rgb), .45); }
.choice input { margin-top: 3px; accent-color: var(--gold-100, #e9b53c); }
.choice:has(input:checked) { border-color: rgba(var(--acc-rgb), .8); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .4); background: rgba(var(--acc-rgb), .05); }
.choice.disabled { opacity: .5; cursor: not-allowed; }
.choice-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.res-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.res-chips i { font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: rgba(var(--fg-rgb), .07); color: var(--text-2); }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl li { position: relative; padding: 0 0 16px 26px; display: flex; flex-direction: column; gap: 2px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg); z-index: 1; }
.tl li::after { content: ""; position: absolute; left: 10px; top: 14px; bottom: -4px; width: 2px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl li.done::before { background: var(--ok); border-color: var(--ok); }
.tl li.now::before { background: var(--gold-100); border-color: var(--gold-100); box-shadow: 0 0 0 4px rgba(var(--acc-rgb), .18); }
.tl li.bad::before { background: var(--bad); border-color: var(--bad); }
.tl b { font-size: 13px; }
.tl span { font-size: 12px; color: var(--text-3); }
.mb { margin-bottom: 18px; }

/* ================= v2: assets + wizard ================= */
.type-pick { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.type-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  color: var(--text); transition: border-color .15s, transform .15s, box-shadow .2s; }
.type-card:hover { border-color: rgba(var(--acc-rgb), .55); transform: translateY(-2px); box-shadow: 0 18px 40px -26px rgba(0,0,0,.6); }
.type-card b { font-size: 17px; }
.type-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(var(--acc-rgb), .12); color: var(--gold-100); margin-bottom: 4px; }
.type-ic svg { width: 22px; height: 22px; }
.type-go { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--gold-100); }
.type-go svg { width: 14px; height: 14px; }
.as-thumb { width: 44px; aspect-ratio: 2/3; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); color: var(--text-4); }
.as-thumb svg { width: 18px; height: 18px; }

.wz-steps { display: flex; align-items: center; gap: 0; margin: 0 0 18px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.wz-step { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px 8px 8px; border-radius: 999px; color: var(--text-3); white-space: nowrap; flex: none; transition: background .15s, color .15s; }
a.wz-step:hover { background: var(--surface); color: var(--text); }
.wz-step i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12.5px; font-weight: 700;
  border: 1.5px solid var(--line-2); color: var(--text-3); background: var(--bg); }
.wz-step i svg { width: 14px; height: 14px; }
.wz-step b { font-size: 13px; font-weight: 600; }
.wz-step.done i { background: rgba(var(--acc-rgb), .14); border-color: rgba(var(--acc-rgb), .5); color: var(--gold-100); }
.wz-step.on { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .45); }
.wz-step.on i { background: var(--gold-grad); color: var(--on-acc); border-color: transparent; }
.wz-step.off { opacity: .6; }
.wz-line { flex: 1 1 24px; min-width: 18px; height: 2px; border-radius: 2px; background: var(--line-2); margin: 0 4px; }
.wz-line.done { background: rgba(var(--acc-rgb), .55); }
.wz-card { padding: 24px 26px; }
.wz-head { margin-bottom: 20px; }
.wz-head h2 { margin: 0 0 4px; font-size: 19px; font-weight: 600; }
.wz-head p { margin: 0; color: var(--text-3); font-size: 13px; }
.wz-extra { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.wz-extra h3 { margin: 0 0 2px; font-size: 14px; }
.wz-switches { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 12px; }
.wz-switches .switch span { display: flex; flex-direction: column; }
.wz-switches .switch span b { font-size: 13px; font-weight: 600; }
.wz-switches .switch span small { font-size: 11.5px; color: var(--text-3); }
.wz-more summary { cursor: pointer; font-size: 13px; color: var(--gold-100); }
.prov-row { display: flex; gap: 8px; align-items: center; }
.prov-row .select, .prov-row .gs { flex: 1; min-width: 0; }
.seg-wrap { flex-wrap: wrap; border-radius: 18px; }
.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.wz-thumbs { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); align-items: start; }
.vpick { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; background: rgba(var(--fg-rgb), .02); }
.vpick-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.vpick-h .spacer { flex: 1; }
.vpick-h a { display: inline-flex; align-items: center; gap: 4px; }
.vpick-h a svg { width: 14px; height: 14px; }
.vpick .hint { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.empty.slim { padding: 18px; text-align: left; }
.wz-info { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(var(--acc-rgb), .06); border: 1px solid rgba(var(--acc-rgb), .2); margin-bottom: 14px; }
.wz-info > svg { width: 20px; height: 20px; color: var(--gold-100); flex: none; }
.wz-info div { display: flex; flex-direction: column; min-width: 0; }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.ck-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; font-size: 13px; }
.ck-row svg { width: 16px; height: 16px; flex: none; }
.ck-row.bad { background: var(--bad-bg); color: var(--bad); }
.ck-row.warn { background: var(--warn-bg); color: var(--warn); }
.ck-row.ok { background: var(--ok-bg); color: var(--ok); }
.ep-season { margin: 16px 0 8px; font-size: 13px; color: var(--text-2); }
.ep-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ep-row .grow { display: flex; flex-direction: column; }
.ep-row .select { height: 36px; }
.ep-add { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ep-add .field { min-width: 80px; }
.ep-add .field.grow { flex: 1 1 200px; }
.ep-add .field input[type=number] { width: 90px; }
.wz-bar .back svg { transform: rotate(180deg); }
.wz-bar .btn svg { width: 15px; height: 15px; }
.field[hidden], .form-grid[hidden], .choices[hidden], .vpick[hidden] { display: none !important; }
body:has(.wz-bar) .toasts { bottom: auto; top: 150px; }
.ep-row .grow { flex: 1 1 180px; min-width: 0; }
.ep-row > .select, .ep-row > .gs { flex: 0 1 340px; min-width: 200px; }
@media (max-width: 700px) { .ep-row > .select, .ep-row > .gs { flex-basis: 100%; } }
/* page builder: auto / manual */
.pb-src { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pb-src .choice { padding: 12px 14px; }
.pb-pick-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pb-search-row { display: flex; gap: 8px; }
.pb-search-row .pb-search { flex: 1; min-width: 0; }
.pb-tsel { width: auto; flex: none; height: 40px; }
.pb-n { width: 20px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--gold-100); flex: none; }
.pb-r.have { opacity: .55; cursor: default; }
@media (max-width: 600px) { .pb-src { grid-template-columns: 1fr; } .pb-search-row { flex-direction: column; } }
.pb-edit { overflow-x: hidden; }
.pb-edit .pb-src { grid-template-columns: 1fr; }
.pb-edit .pb-src .choice { padding: 10px 12px; }
.pb-edit .pb-search-row { flex-direction: column; }
.pb-edit .pb-tsel { width: 100%; }
.pb-edit .pb-pk .grow { min-width: 0; }
.pb-edit .pb-pk .grow span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-thumb { position: relative; }
.wz-most { position: absolute; z-index: 2; top: 8px; left: 8px; }
.islot-msg a { margin-left: 2px; }
.wz-notes > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.wz-notes > summary::-webkit-details-marker { display: none; }
.wz-notes[open] > summary { margin-bottom: 18px; }
.wz-notes h2 { display: flex; align-items: center; gap: 10px; }
.wz-notes h2 svg { width: 18px; height: 18px; color: var(--gold-100); }
.notes-pdf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 14px; }
.notes-pdf .grow { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
/* avatars */
.av-layout { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .av-layout { grid-template-columns: 1fr; } }
.av-add { display: flex; flex-direction: column; gap: 14px; }
.av-add .av-slot .islot-pic { border-radius: 50%; max-width: 200px; margin: 0 auto; }
.av-add .av-slot .islot-pic img { border-radius: 50%; }
.av-c { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3);
  color: var(--text-4); font-size: 22px; box-shadow: 0 0 0 2px var(--line-2); flex: none; }
.av-c img { width: 100%; height: 100%; object-fit: cover; }
.av-c.sm { width: 52px; height: 52px; }
.av-strip { display: flex; flex-direction: column; gap: 14px; padding: 4px 20px 20px; }
.av-strip-g { display: flex; flex-direction: column; gap: 8px; }
.av-strip-row { display: flex; flex-wrap: wrap; gap: 12px; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 18px 20px 20px; }
.av-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px 12px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(var(--fg-rgb), .02); text-align: center; min-width: 0; }
.av-card.off .av-c { opacity: .45; }
.av-card.dragging { opacity: .4; }
.av-card b { max-width: 100%; }
.av-grip { position: absolute; top: 8px; left: 8px; color: var(--text-4); cursor: grab; }
.av-grip svg { width: 15px; height: 15px; }
.av-act .switch { font-size: 12px; }
.av-edit { width: 100%; }
.av-edit summary { list-style: none; cursor: pointer; }
.av-edit summary::-webkit-details-marker { display: none; }
.av-edit-f { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; text-align: left; }
.av-edit-f .islot-pic { border-radius: 50%; }
.av-edit-b { display: flex; justify-content: space-between; }
.av-order { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: rgba(var(--acc-rgb), .08); border-bottom: 1px solid var(--line); }
.av-order[hidden] { display: none; }
.av-order .small { flex: 1; }

/* ---- Overview trend chart + subscribers (v3) */
.ov-trend-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ov-trend-sum > div { display: flex; flex-direction: column; margin-right: 6px; }
.ov-trend-sum > div b { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.ov-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.ov-legend i { width: 18px; height: 0; border-top: 2.5px solid var(--gold-400); display: inline-block; border-radius: 2px; }
.ov-legend i.was { border-top: 2px dashed rgba(var(--fg-rgb), .35); margin-left: 8px; }
.ov-ax { fill: var(--text-4); font-size: 11px; font-family: var(--font); }
.chart-tip span { color: var(--text-3); }
.ov-subs { padding: 20px; }
.ov-stack { display: flex; gap: 3px; height: 14px; border-radius: 99px; overflow: hidden; }
.ov-stack a { min-width: 6px; transition: filter .15s; }
.ov-stack a:hover { filter: brightness(1.2); }
.ov-stack .gold, .ov-stack-k i.gold { background: linear-gradient(90deg, var(--gold-300), var(--gold-500)); }
.ov-stack .cream, .ov-stack-k i.cream { background: var(--gold-100); }
.ov-stack .warn, .ov-stack-k i.warn { background: #e0a245; }
.ov-stack .bad, .ov-stack-k i.bad { background: #c9524a; }
.ov-stack-k { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.ov-stack-k a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.ov-stack-k a:hover { border-color: var(--line-2); background: rgba(var(--fg-rgb), .03); }
.ov-stack-k i { width: 10px; height: 10px; border-radius: 3px; background: rgba(var(--fg-rgb), .18); flex: none; }
.ov-stack-k span:first-of-type { flex: 1; font-size: 13px; }

/* ---- App readiness (v3) */
.rd-score { display: flex; align-items: center; gap: 20px; padding: 20px; flex-wrap: wrap; }
.rd-ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--gold-400) calc(var(--p) * 1%), rgba(var(--fg-rgb), .08) 0); position: relative; }
.rd-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface-1, var(--bg)); }
.rd-ring b { position: relative; font-size: 22px; font-weight: 700; }
.rd-ring small { font-size: 12px; color: var(--text-3); font-weight: 500; }
.rd-legend { display: flex; gap: 14px; color: var(--text-3); }
.rd-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rd-legend i { width: 9px; height: 9px; border-radius: 50%; }
.rd-legend i.ok, .rd-row.ok .rd-dot { background: rgba(70, 190, 120, .16); color: #46be78; }
.rd-legend i.warn, .rd-row.warn .rd-dot { background: rgba(224, 162, 69, .16); color: #e0a245; }
.rd-legend i.bad, .rd-row.bad .rd-dot { background: rgba(201, 82, 74, .16); color: #e06a60; }
.rd-legend i.ok { background: #46be78; } .rd-legend i.warn { background: #e0a245; } .rd-legend i.bad { background: #e06a60; }
.rd-groups { display: grid; gap: 16px; }
.rd-group .card-head > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.rd-list { display: flex; flex-direction: column; }
.rd-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); }
.rd-row b { display: block; font-size: 14px; }
.rd-row .muted { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.rd-dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(var(--fg-rgb), .06); color: var(--text-3); }
.rd-dot svg { width: 16px; height: 16px; }
.rd-row .btn { flex: none; }
@media (max-width: 640px) { .rd-row { flex-wrap: wrap; } .rd-row .btn { margin-left: 46px; } .rd-legend { width: 100%; } }

/* ---- phone + tablet layout (v3) */
.code-chip { white-space: nowrap; }
.ov-chart-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.ov-chart-scroll::-webkit-scrollbar { display: none; }
@media (max-width: 1024px) {
  .page-head .actions { margin-left: 0; }
  .form-grid { gap: 14px; }
}
@media (max-width: 760px) {
  .bignums { margin-left: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
  .bignum b { font-size: 26px; letter-spacing: -.5px; }
  .bignum > span { padding-left: 0; font-size: 11.5px; }
  .ov-plot-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .ov-plot-head .seg { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .ov-plot-head .seg::-webkit-scrollbar { display: none; }
  .seg a { white-space: nowrap; }
  .ov-chart-scroll [data-chart] { min-width: 560px; }
  .ov-legend { margin-left: 0; width: 100%; }
  .ov-stats { display: none; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  .card-head .actions { margin-left: auto; }
  .tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; flex: none; }
  .form-grid { grid-template-columns: 1fr !important; }
  .form-grid > .span-2, .form-grid > [class*="span-"] { grid-column: auto !important; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  .input, .select, .textarea { font-size: 16px; }           /* no iOS zoom on focus */
  .rd-score { gap: 14px; }
  dialog .card, .dev-dlg form { width: calc(100vw - 32px) !important; }
}
@media (max-width: 640px) {
  .rd-row { padding: 14px 16px; }
  .ov-stack-k { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .savebar { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; }
  .savebar [data-savebar-state] { font-size: 12px; min-width: 0; }
  .savebar .btn { padding-left: 12px; padding-right: 12px; }
}

/* ---- glass pill on page switchers + gliding tab bar (ux.js) */
.lq-seg-host.lq-ready > :is(a, button).on { background: transparent !important; box-shadow: none !important; }
.lq-seg-host > :is(a, button) { transition: color .25s; }
.lq.lq-seg { box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 1px rgba(0,0,0,.12), inset 0 0 0 1px rgba(var(--fg-rgb), .10), 0 6px 16px -10px rgba(0,0,0,.5); }
[data-theme="light"] .lq.lq-seg { background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(0,0,0,.05)), #ececea;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(0,0,0,.14), 0 4px 12px -6px rgba(0,0,0,.3); }
.lq-tabs-host { position: relative; }
.lq-tabs-host.lq-ready > a.on::after { opacity: 0; }
.lq-bar { position: absolute; bottom: -1px; left: 0; width: 0; height: 2px; border-radius: 2px; background: var(--gold-grad); pointer-events: none; opacity: 0; z-index: 2;
  box-shadow: 0 0 10px rgba(var(--acc-rgb), .55);
  transition: left .5s cubic-bezier(.25,1.35,.45,1), width .5s cubic-bezier(.25,1.35,.45,1), opacity .2s; }
.lq-bar.lq-instant { transition: none; }
.lq-bar.lq-move { height: 3px; }

/* ---- side menu on long forms (ux.js) */
.lf { display: grid; grid-template-columns: 188px minmax(0, 1fr); column-gap: 32px; row-gap: 0; align-items: start; }
.lf > * { grid-column: 2; }
.lf > .lf-nav { grid-column: 1; grid-row: 1 / span 60; position: sticky; top: calc(var(--sticky-top, 0px) + 16px); display: flex; flex-direction: column; gap: 2px;
  padding: 6px; border-radius: 16px; border: 1px solid var(--line); background: rgba(var(--fg-rgb), .02); }
.lf-sec { scroll-margin-top: calc(var(--sticky-top, 0px) + 20px); }
.lf-head { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); padding: 8px 10px 6px; }
.lf-nav a { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px;
  font-size: 13px; color: var(--text-3); text-decoration: none; transition: color .2s, background .2s; }
.lf-nav a:hover { color: var(--text); background: rgba(var(--fg-rgb), .04); }
.lf-nav a.on { color: var(--gold-100); background: rgba(var(--acc-rgb), .09); box-shadow: inset 2px 0 0 var(--gold-400); }
.lf-dot { width: 7px; height: 7px; border-radius: 50%; background: #e06a60; flex: none; opacity: 0; transition: opacity .2s; }
.lf-nav a.bad .lf-dot { opacity: 1; }
.lf-nav a.bad { color: #e8837a; }
@media (max-width: 1100px) {
  .lf { display: block; }
  .lf > .lf-nav { position: sticky; z-index: 30; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; padding: 5px; border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .lf > .lf-nav::-webkit-scrollbar { display: none; }
  .lf-head { display: none; }
  .lf-nav a { white-space: nowrap; border-radius: 999px; padding: 7px 14px; flex: none; }
  .lf-nav a.on { box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .4); }
  .lf-sec { scroll-margin-top: calc(var(--sticky-top, 0px) + 70px); }
}

/* ---- empty states (v3) */
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 48px 20px; max-width: 460px; margin: 0 auto; }
.empty .ic { width: 56px; height: 56px; border-radius: 18px; margin: 0 0 10px; position: relative;
  background: radial-gradient(circle at 30% 20%, rgba(var(--acc-rgb), .22), rgba(var(--acc-rgb), .06)); color: var(--gold-300);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(var(--acc-rgb), .22); }
.empty .ic::after { content: ""; position: absolute; inset: -8px; border-radius: 24px; border: 1px dashed rgba(var(--acc-rgb), .22); }
.empty .ic svg { width: 24px; height: 24px; }
.empty b { margin: 0; }
.empty > .muted { max-width: 360px; line-height: 1.5; }
.empty .empty-act { margin-top: 14px; }
.empty.bad .ic { background: rgba(201, 82, 74, .12); color: #e06a60; box-shadow: inset 0 0 0 1px rgba(201, 82, 74, .3); }
.empty.bad .ic::after { border-color: rgba(201, 82, 74, .25); }
.empty.slim { display: block; max-width: none; margin: 0; }
[style*="grid-column:1/-1"].empty, .empty[style*="grid-column"] { max-width: none; }

/* ---- full-size image view (admin.js) */
.lb { position: fixed; inset: 0; z-index: 2000; display: none; flex-direction: column; background: rgba(5, 5, 5, .86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: lbIn .18s ease; }
.lb.on { display: flex; }
.lb-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 28px 28px 8px; cursor: zoom-out; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
  background: repeating-conic-gradient(rgba(255,255,255,.06) 0 25%, transparent 0 50%) 0 0 / 18px 18px; cursor: default; }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 12px 20px 18px; justify-content: center; flex-wrap: wrap; }
.lb-info { color: rgba(255,255,255,.75); font-size: 13px; font-family: var(--mono, ui-monospace, monospace); margin-right: 8px; }
.lb .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); }
html.lb-lock { overflow: hidden; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-zoom { position: absolute; z-index: 60; width: 24px; height: 24px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center;
  background: rgba(10,10,10,.65); color: #fff; cursor: zoom-in; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb-zoom:hover { background: rgba(10,10,10,.85); border-color: var(--gold-300); }
main img:not(a img):not(button img):not(label img) { cursor: zoom-in; }
.lb-zoom[hidden], .lb-open[hidden] { display: none !important; }

/* ---- image link message + avatar edit gets room (v3) */
.islot-msg { line-height: 1.45; overflow-wrap: anywhere; }
.islot-copy { padding: 0; border: 0; background: none; color: var(--gold-100); text-decoration: underline; cursor: pointer; font: inherit; }
.av-card:has(.av-edit[open]) { grid-column: span 2; align-items: stretch; }
.av-card:has(.av-edit[open]) > :is(.av-c, b, .av-act) { align-self: center; }
.av-edit[open] summary { text-align: center; }
.av-edit-f .islot-pic { max-width: 180px; margin: 0 auto; }
.av-edit-f .islot-foot .islot-hint { white-space: normal; }
@media (max-width: 520px) { .av-card:has(.av-edit[open]) { grid-column: 1 / -1; } }
.islot-msg.pend { color: var(--text-3); font-size: 12px; }
.islot-msg.pend b { color: #e0a245; font-weight: 600; }
[data-theme="light"] .islot-msg.pend b { color: #a86a0c; }

/* ---- one sticky header (top bar + sub tabs move together, no overlap or jump while scrolling) */
.tn-head { position: sticky; top: 0; z-index: 55; background: var(--bg); }   /* above every sticky bar in the page (save bars 40, page tools 20-30), below dialogs (60) */
.tn-head > .tn-bar, .tn-head > .tn-sub { position: relative; top: auto; }
.tn-head > .tn-bar { z-index: 2; }
.tn-head > .tn-sub { z-index: 1; }
@media (max-width: 1100px) { .tn-head > .tn-sub { top: auto; } }
.vpick-code { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.vpick-code .input { max-width: 260px; height: 34px; }
.vp-spin { display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 50%;
  border: 2px solid rgba(var(--fg-rgb), .2); border-top-color: var(--gold-400); animation: vpSpin .8s linear infinite; }
@keyframes vpSpin { to { transform: rotate(360deg); } }

/* ---- step 4 video boxes (v4: picker list + link on select) */
.vpick.v2 { position: relative; }
.vpick.v2.saving { opacity: .7; pointer-events: none; }
.vp-cur { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(var(--fg-rgb), .03); }
.vp-cur[hidden], .vp-pick[hidden], .vp-err[hidden], .vp-empty[hidden] { display: none !important; }
.vp-thumb { width: 96px; height: 54px; border-radius: 8px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--text-4); position: relative; }
.vp-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vp-thumb svg { width: 18px; height: 18px; }
.vp-err { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(201, 82, 74, .1); color: #e8837a; font-size: 13px; }
.vp-err svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.vp-err-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.vp-err-act:empty { display: none; }
[data-theme="light"] .vp-err { color: #b0413a; }
.vp-pick { margin-top: 10px; }
.vp-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.vp-tools .search { flex: 1; min-width: 220px; }
.vp-others { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); }
.vp-list { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.vp-row { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; width: 100%; }
.vp-row:hover { background: rgba(var(--fg-rgb), .05); }
.vp-row.on { background: rgba(var(--acc-rgb), .1); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .35); }
.vp-row .vp-thumb { width: 72px; height: 40px; border-radius: 6px; }
.vp-row.grey { opacity: .5; }
.vp-row.grey:hover { opacity: .75; }
.vp-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.vp-sep { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); padding: 10px 8px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.vp-loading, .vp-none, .vp-loaderr { padding: 14px 10px; font-size: 13px; color: var(--text-3); }
.vp-loaderr { color: #e8837a; }
.vp-empty { display: flex; flex-direction: column; gap: 4px; padding: 14px 4px 2px; }
.vp-empty-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.vp-toast { position: absolute; top: 12px; right: 14px; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(70, 190, 120, .15); color: #46be78; animation: lbIn .2s ease; }
.vp-check { margin-top: 14px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(224, 162, 69, .4); background: rgba(224, 162, 69, .08); }
.vp-check b { font-size: 13px; color: #e0a245; }
.vp-check ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.vp-check ul:empty { display: none; }
.vp-check.ok { border-color: rgba(70, 190, 120, .35); background: rgba(70, 190, 120, .07); }
.vp-check.ok b { color: #46be78; }
@media (max-width: 640px) { .vp-thumb { width: 64px; height: 36px; } .vp-cur { flex-wrap: wrap; } }

/* ---- motion (Dashboard V14 style): card entrance, count-up, hover lift, circular theme switch */
@keyframes gn-card-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.gn-in { animation: gn-card-in .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--gn-i, 0) * 45ms); }
.gn-counting { font-variant-numeric: tabular-nums; }
a.card, .ov-tile, a.kpi-t, .plan-card, .rd-group, .av-card, .vp-row { transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .2s, background .2s; }
a.card:hover, .ov-tile:hover, a.kpi-t:hover, .plan-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -22px rgba(0, 0, 0, .7), 0 0 0 1px rgba(var(--acc-rgb), .18); }
[data-theme="light"] a.card:hover, [data-theme="light"] .ov-tile:hover, [data-theme="light"] a.kpi-t:hover, [data-theme="light"] .plan-card:hover { box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .25), 0 0 0 1px rgba(0, 0, 0, .06); }
.av-card:hover { transform: translateY(-3px); }
/* the theme switch: no cross-fade, the new theme is revealed by the circle drawn from the button */
html.vt-theme::view-transition-old(root), html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-theme::view-transition-old(root) { z-index: 1; }
html.vt-theme::view-transition-new(root) { z-index: 2; }
@media (prefers-reduced-motion: reduce) { .gn-in { animation: none; } a.card:hover, .ov-tile:hover, a.kpi-t:hover, .plan-card:hover, .av-card:hover { transform: none; } }

/* ---- login page entrance (Dashboard V14 style) */
@keyframes auth-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes auth-part-in { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
html.auth-enter .auth-wall .col.down { animation: drift-down 60s linear infinite, auth-fade 1s ease both; animation-delay: 0s, calc(var(--gn-i, 0) * 160ms); }
html.auth-enter .auth-wall .col.up { animation: drift-up 60s linear infinite, auth-fade 1s ease both; animation-delay: 0s, calc(var(--gn-i, 0) * 160ms); }
html.auth-enter .auth-wall .caption { animation: auth-part-in .8s .45s cubic-bezier(.2, .8, .2, 1) both; }
html.auth-enter .auth-card > *:not(form), html.auth-enter .auth-card form > * {
  animation: auth-part-in .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.15s + var(--gn-i, 0) * 60ms); }
@media (prefers-reduced-motion: reduce) { html.auth-enter * { animation: none !important; } }

/* ---- Overview: gold hero card (V14 style) */
.ov-tiles.with-hero { grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr)); }
.ov-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--r-lg, 18px);
  color: #1b1406; text-decoration: none;
  background: radial-gradient(120% 140% at 85% -10%, rgba(255, 255, 255, .45), transparent 55%),
              radial-gradient(90% 120% at 0% 120%, rgba(120, 72, 6, .35), transparent 60%),
              linear-gradient(135deg, #f6dc8c 0%, #e8b84a 45%, #c48a1f 100%);
  box-shadow: 0 22px 44px -26px rgba(196, 138, 31, .9), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.ov-hero:hover { transform: translateY(-4px); box-shadow: 0 28px 52px -24px rgba(196, 138, 31, 1), inset 0 1px 0 rgba(255, 255, 255, .5); }
.ov-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 65%); pointer-events: none; }
.ov-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ov-hero-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: rgba(27, 20, 6, .12); box-shadow: inset 0 0 0 1px rgba(27, 20, 6, .12); }
.ov-hero-chip svg { width: 13px; height: 13px; }
.ov-hero-note { font-size: 12px; opacity: .75; }
.ov-hero-num { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.ov-hero-num b { font-size: 46px; font-weight: 700; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.ov-hero-num span { font-size: 13px; opacity: .75; }
.ov-hero-bar { position: relative; height: 8px; border-radius: 99px; overflow: hidden;
  background: repeating-linear-gradient(-45deg, rgba(27, 20, 6, .16) 0 4px, rgba(27, 20, 6, .05) 4px 8px); }
.ov-hero-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: #1b1406; animation: heroBar 1.1s .2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes heroBar { from { width: 0; } }
.ov-hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.ov-hero-go { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex: none; padding: 6px 12px; border-radius: 99px; background: #1b1406; color: #f6dc8c; font-weight: 600; }
.ov-hero-go svg { width: 13px; height: 13px; }
@media (max-width: 1100px) { .ov-tiles.with-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-hero { grid-column: 1 / -1; } }
@media (max-width: 760px) { .ov-tiles.with-hero { grid-template-columns: 1fr; } .ov-hero-num b { font-size: 38px; } }

/* ---- Overview chart: Line / Bars */
.ov-plot-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ov-view a { padding: 0 10px !important; }
.ov-view svg { width: 15px; height: 15px; }
.is-bars .chart-dot, .is-bars .chart-halo { opacity: 0 !important; }
.ov-bar { transform-box: fill-box; transform-origin: bottom; animation: ovBarUp .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 12ms); }
@keyframes ovBarUp { from { transform: scaleY(0); } }
.ov-legend.bars i.now { height: 9px; width: 12px; border: 0; border-radius: 3px; background: linear-gradient(var(--gold-300), var(--gold-500)); }
.ov-legend.bars i.was { height: 9px; width: 12px; border: 0; border-radius: 3px; margin-left: 8px;
  background: repeating-linear-gradient(45deg, var(--gold-400) 0 2px, transparent 2px 5px); opacity: .7; }
@media (prefers-reduced-motion: reduce) { .ov-bar, .ov-hero-bar i { animation: none; } }
@media (max-width: 760px) { .ov-plot-r { width: 100%; justify-content: space-between; } }

/* ---- Overview header numbers: label on top, number, one line of context; no floating labels */
.bignums { gap: 0; align-items: stretch; }
.bignum { padding: 2px 28px; min-width: 150px; border-left: 1px solid var(--line); gap: 6px; }
.bignum:first-child { border-left: 0; padding-left: 0; }
.bignum:last-child { padding-right: 0; }
.bignum .bn-label { font-size: 12.5px; color: var(--text-3); padding: 0; margin: 0; order: 0; }
.bignum b { font-size: 44px; font-weight: 400; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; }
.bignum small { font-size: 12px; color: var(--text-3); }
.bignum.zero b { color: var(--text-4); }
@media (max-width: 760px) {
  .bignum { padding: 0 12px; min-width: 0; }
  .bignum b { font-size: 28px; }
  .bignum .bn-label { font-size: 11.5px; }
  .bignums { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .bignum:first-child { padding-left: 0; }
}
.perf-note { margin: 28px 0 4px; font-size: 11.5px; color: var(--text-4); text-align: right; }

/* ---- left vertical page menu (the section's pages) - desktop; phones/tablets keep the chip row under the bar */
.tn-shell { max-width: var(--wrap); margin: 0 auto; }
.tn-side { display: none; }
@media (min-width: 1101px) {
  .tn-head .tn-sub { display: none; }
  .tn-shell.has-side { display: grid; grid-template-columns: 216px minmax(0, 1fr); column-gap: 32px; padding: 0 28px; align-items: start; }
  .tn-shell.has-side > .tn-content { max-width: none; margin: 0; padding-left: 0; padding-right: 0; min-width: 0; }
  .tn-side { display: block; position: sticky; top: calc(var(--sticky-top, 82px) + 18px); padding-top: 22px; max-height: calc(100vh - var(--sticky-top, 82px) - 24px); overflow-y: auto; scrollbar-width: thin; }
}
.tn-side-in { display: flex; flex-direction: column; gap: 10px; padding: 8px; border-radius: 18px; border: 1px solid var(--line); background: rgba(var(--fg-rgb), .02); }
.tn-side-title { padding: 8px 12px 2px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--text-4); }
.tn-vtabs { position: relative; display: flex; flex-direction: column; gap: 2px; }
.tn-vtabs > a { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; color: var(--text-2); text-decoration: none; transition: color .2s, background .2s; }
.tn-vtabs > a:hover { color: var(--text); background: rgba(var(--fg-rgb), .04); }
.tn-vtabs > a.on { color: var(--gold-100); background: rgba(var(--acc-rgb), .09); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .3); }
.tn-vtabs > a.tn-cta { margin-top: 6px; justify-content: center; color: var(--on-acc, #1b1406); background: var(--gold-grad); font-weight: 600; }
.tn-vtabs > a.tn-cta:hover { filter: brightness(1.05); background: var(--gold-grad); }
.tn-vsep { padding: 12px 12px 4px; font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--text-4); border-top: 1px solid var(--line); margin-top: 6px; }
.tn-vsep.blank { padding: 0; margin: 6px 0 0; }
/* the moving glass pill (ux.js) works up and down here too */
.tn-vtabs.lq-ready > a.lq-on { color: var(--gold-100); }
.tn-vtabs.lq-ready > a.on:not(.lq-on) { color: var(--text-2); }
.tn-vtabs.lq-ready .lq { border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 1px rgba(var(--acc-rgb), .4), 0 8px 20px -12px rgba(var(--acc-rgb), .6);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0)), rgba(var(--acc-rgb), .1); }
[data-theme="light"] .tn-vtabs > a.on, [data-theme="light"] .tn-vtabs.lq-ready > a.lq-on { color: var(--text); }
[data-theme="light"] .tn-vtabs.lq-ready .lq { background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.08)), #e9e9e6; box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(0,0,0,.14); }
/* long forms: their "On this form" menu moves to the right, the page menu owns the left */
@media (min-width: 1101px) {
  .lf { grid-template-columns: minmax(0, 1fr) 188px; }
  .lf > * { grid-column: 1; }
  .lf > .lf-nav { grid-column: 2; }
}

/* ---- left menu icons + collapse to an icon rail */
.tn-side-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-right: 4px; }
.tn-side-tog { width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: var(--text-4); display: grid; place-items: center; cursor: pointer; }
.tn-side-tog:hover { background: rgba(var(--fg-rgb), .06); color: var(--text); }
.tn-side-tog svg { width: 15px; height: 15px; transform: rotate(90deg); transition: transform .25s; }
.tn-vtabs > a svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.tn-vtabs > a.on svg, .tn-vtabs > a.lq-on svg, .tn-vtabs > a:hover svg { opacity: 1; }
.tn-vlabel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1101px) {
  .tn-shell.has-side { transition: grid-template-columns .25s ease; }
  html.side-mini .tn-shell.has-side { grid-template-columns: 64px minmax(0, 1fr); }
  html.side-mini .tn-side-in { padding: 8px 6px; align-items: center; }
  html.side-mini .tn-side-head { justify-content: center; padding: 0; }
  html.side-mini .tn-side-title, html.side-mini .tn-vlabel { display: none; }
  html.side-mini .tn-side-tog svg { transform: rotate(-90deg); }
  html.side-mini .tn-vtabs { align-items: center; }
  html.side-mini .tn-vtabs > a { width: 44px; height: 40px; padding: 0; justify-content: center; }
  html.side-mini .tn-vsep { padding: 0; margin: 6px 4px 2px; width: 32px; font-size: 0; }
}
/* stat tiles: the small chart gets its own row under the text, full width - never on top of the "vs previous" line */
.ov-tile { position: relative; display: flex; flex-direction: column; }
.ov-tile .spark { position: static; display: block; width: 100%; height: 36px; margin-top: auto; padding-top: 12px; }

/* login: "too many devices" - pick one to sign out (409 DEVICE_LIMIT) */
.dl-pick { min-width: 0; width: 100%; box-sizing: border-box; margin: 0 0 16px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--fg-rgb), .02); display: flex; flex-direction: column; gap: 4px; }
.dl-pick legend { float: left; width: 100%; padding: 2px 4px 8px; font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.dl-pick legend span { font-weight: 400; color: var(--text-4); font-size: 12px; margin-left: auto; }
.dl-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.dl-row:hover { background: rgba(var(--fg-rgb), .04); }
.dl-row:has(input:checked) { border-color: rgba(var(--acc-rgb), .55); background: rgba(var(--acc-rgb), .08); }
.dl-row input { accent-color: var(--gold-100, #e3b341); margin: 0; flex: none; }
.dl-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--fg-rgb), .06); color: var(--text-2); }
.dl-ic svg { width: 17px; height: 17px; }
.dl-txt { display: flex; flex-direction: column; min-width: 0; }
.dl-txt b { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-txt b em { font-style: normal; font-weight: 500; font-size: 11px; margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: rgba(var(--acc-rgb), .14); color: var(--gold-100, #e3b341); }
.dl-txt small { font-size: 12px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-pick p { margin: 6px 4px 2px; font-size: 12px; color: var(--text-4); }
[data-theme="light"] .dl-txt b em { color: #8a6412; }

/* side menu: icon micro-animations - ux.js adds .ic-play on hover / keyboard focus / page open, removes it after 0.9 s */
.tn-vtabs > a svg, .tn-vtabs > a svg * { transform-box: fill-box; transform-origin: center; }
.tn-vtabs > a.ic-play svg { animation: ic-pop .5s cubic-bezier(.34, 1.56, .64, 1); }
.tn-vtabs > a.ic-play:is([data-ic=chart], [data-ic=pie], [data-ic=download], [data-ic=grid], [data-ic=apps], [data-ic=qr], [data-ic=layout],
  [data-ic=image], [data-ic=users], [data-ic=user], [data-ic=receipt], [data-ic=gift], [data-ic=mail], [data-ic=clock], [data-ic=globe],
  [data-ic=list], [data-ic=check], [data-ic=shield], [data-ic=radio], [data-ic=database], [data-ic=file], [data-ic=copy], [data-ic=cpu],
  [data-ic=subtitle], [data-ic=calendar]) svg { animation: none; }
/* whole icon */
.tn-vtabs > a.ic-play[data-ic=home] svg { animation: ic-hop .6s ease; }
.tn-vtabs > a.ic-play:is([data-ic=game], [data-ic=link], [data-ic=crown], [data-ic=film]) svg { animation: ic-wiggle .6s ease; }
.tn-vtabs > a.ic-play[data-ic=bell] svg { transform-origin: 50% 12%; animation: ic-swing .8s ease; }
.tn-vtabs > a.ic-play[data-ic=settings] svg { animation: ic-turn .8s cubic-bezier(.65, 0, .35, 1); }
.tn-vtabs > a.ic-play[data-ic=plus] svg { animation: ic-quarter .45s cubic-bezier(.34, 1.56, .64, 1); }
.tn-vtabs > a.ic-play[data-ic=undo] svg { animation: ic-undo .6s ease; }
.tn-vtabs > a.ic-play[data-ic=smartphone] svg { animation: ic-shake .45s linear; }
.tn-vtabs > a.ic-play[data-ic=card] svg { animation: ic-flip .6s ease-in-out; }
.tn-vtabs > a.ic-play[data-ic=filter] svg { animation: ic-drop .5s ease; }
.tn-vtabs > a.ic-play[data-ic=play] svg { animation: ic-push .45s ease; }
.tn-vtabs > a.ic-play[data-ic=star] svg { animation: ic-star .6s ease; }
.tn-vtabs > a.ic-play[data-ic=sparkles] svg { animation: ic-twinkle .6s ease; }
.tn-vtabs > a.ic-play[data-ic=send] svg { animation: ic-fly .7s ease; }
.tn-vtabs > a.ic-play[data-ic=flag] svg { transform-origin: 15% 50%; animation: ic-wave .7s ease; }
/* one part of the icon */
.tn-vtabs > a.ic-play:is([data-ic=chart], [data-ic=layout], [data-ic=receipt], [data-ic=mail], [data-ic=shield], [data-ic=file], [data-ic=subtitle]) svg > :nth-child(2),
.tn-vtabs > a.ic-play:is([data-ic=list], [data-ic=check]) svg > :nth-child(1),
.tn-vtabs > a.ic-play[data-ic=image] svg > :nth-child(3) { animation: ic-draw .6s ease-out; }
.tn-vtabs > a[data-ic=chart] svg > :nth-child(2) { --L: 20; }
.tn-vtabs > a[data-ic=layout] svg > :nth-child(2) { --L: 31; }
.tn-vtabs > a[data-ic=image] svg > :nth-child(3) { --L: 22; }
.tn-vtabs > a[data-ic=receipt] svg > :nth-child(2) { --L: 22; }
.tn-vtabs > a[data-ic=mail] svg > :nth-child(2) { --L: 25; }
.tn-vtabs > a[data-ic=list] svg > :nth-child(1) { --L: 41; }
.tn-vtabs > a[data-ic=check] svg > :nth-child(1) { --L: 24; }
.tn-vtabs > a[data-ic=shield] svg > :nth-child(2) { --L: 10; }
.tn-vtabs > a[data-ic=file] svg > :nth-child(2) { --L: 31; }
.tn-vtabs > a[data-ic=subtitle] svg > :nth-child(2) { --L: 13; }
.tn-vtabs > a.ic-play[data-ic=pie] svg > :nth-child(2) { animation: ic-slice .6s cubic-bezier(.34, 1.56, .64, 1); }
.tn-vtabs > a.ic-play[data-ic=download] svg > :nth-child(2) { animation: ic-drop .55s ease; }
.tn-vtabs > a.ic-play:is([data-ic=grid], [data-ic=apps], [data-ic=qr]) svg > * { animation: ic-blink .42s ease; }
.tn-vtabs > a.ic-play:is([data-ic=grid], [data-ic=apps], [data-ic=qr]) svg > :nth-child(2) { animation-delay: .06s; }
.tn-vtabs > a.ic-play:is([data-ic=grid], [data-ic=apps], [data-ic=qr]) svg > :nth-child(3) { animation-delay: .12s; }
.tn-vtabs > a.ic-play:is([data-ic=grid], [data-ic=apps], [data-ic=qr]) svg > :nth-child(4) { animation-delay: .18s; }
.tn-vtabs > a.ic-play[data-ic=image] svg > :nth-child(2),
.tn-vtabs > a.ic-play[data-ic=database] svg > :nth-child(1),
.tn-vtabs > a.ic-play[data-ic=calendar] svg > :nth-child(2) { animation: ic-rise .55s ease; }
.tn-vtabs > a.ic-play[data-ic=users] svg > :nth-child(2),
.tn-vtabs > a.ic-play[data-ic=user] svg > :nth-child(1) { animation: ic-hop .55s ease; }
.tn-vtabs > a.ic-play[data-ic=users] svg > :nth-child(3) { animation: ic-slide .55s ease .08s backwards; }
.tn-vtabs > a.ic-play[data-ic=gift] svg > :nth-child(1) { animation: ic-lid .6s ease; }
.tn-vtabs > a.ic-play[data-ic=clock] svg > :nth-child(2) { transform-box: view-box; transform-origin: 12px 12px; animation: ic-tick .8s cubic-bezier(.65, 0, .35, 1); }
.tn-vtabs > a.ic-play[data-ic=globe] svg > :nth-child(2) { animation: ic-flip .7s ease-in-out; }
.tn-vtabs > a.ic-play:is([data-ic=radio], [data-ic=cpu]) svg > :nth-child(2), .tn-vtabs > a.ic-play[data-ic=cpu] svg > :nth-child(3) { animation: ic-pulse .7s ease; }
.tn-vtabs > a.ic-play[data-ic=copy] svg > :nth-child(1) { animation: ic-nudge .5s ease; }
@keyframes ic-pop { 40% { transform: scale(1.18); } }
@keyframes ic-hop { 30% { transform: translateY(-3px) scale(1.04, .96); } 55% { transform: translateY(0) scale(1.06, .94); } 75% { transform: translateY(-1px); } }
@keyframes ic-wiggle { 25% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } }
@keyframes ic-swing { 20% { transform: rotate(14deg); } 40% { transform: rotate(-10deg); } 60% { transform: rotate(6deg); } 80% { transform: rotate(-3deg); } }
@keyframes ic-turn { to { transform: rotate(360deg); } }
@keyframes ic-quarter { to { transform: rotate(90deg); } }
@keyframes ic-tick { to { transform: rotate(360deg); } }
@keyframes ic-undo { 40% { transform: rotate(-40deg); } }
@keyframes ic-shake { 20%, 60% { transform: translateX(-1.5px) rotate(-5deg); } 40%, 80% { transform: translateX(1.5px) rotate(5deg); } }
@keyframes ic-flip { 50% { transform: scaleX(-1); } }
@keyframes ic-drop { 35% { transform: translateY(3px); } 65% { transform: translateY(-1px); } }
@keyframes ic-rise { 35% { transform: translateY(-3px); } 65% { transform: translateY(1px); } }
@keyframes ic-push { 40% { transform: translateX(2.5px); } }
@keyframes ic-star { 50% { transform: rotate(36deg) scale(1.2); } 100% { transform: rotate(72deg); } }
@keyframes ic-twinkle { 30% { transform: scale(.7) rotate(-15deg); } 65% { transform: scale(1.2) rotate(10deg); } }
@keyframes ic-fly { 45% { transform: translate(7px, -7px); opacity: 0; } 46% { transform: translate(-7px, 7px); opacity: 0; } }
@keyframes ic-wave { 30% { transform: skewY(-6deg); } 60% { transform: skewY(4deg); } }
@keyframes ic-draw { from { stroke-dasharray: var(--L); stroke-dashoffset: var(--L); } to { stroke-dasharray: var(--L); stroke-dashoffset: 0; } }
@keyframes ic-slice { 40% { transform: translate(2px, -2px); } }
@keyframes ic-blink { 50% { transform: scale(.55); } }
@keyframes ic-slide { from { transform: translateX(4px); opacity: 0; } }
@keyframes ic-lid { 35% { transform: translateY(-3px) rotate(-10deg); } }
@keyframes ic-pulse { 30% { opacity: .15; } }
@keyframes ic-nudge { 40% { transform: translate(-2px, -2px); } }
@media (prefers-reduced-motion: reduce) { .tn-vtabs > a.ic-play svg, .tn-vtabs > a.ic-play svg * { animation: none !important; } }

/* splash previews: a playing Lottie animation fills the screen like the app (r19-lottie.js) */
.sp-lottie { position: absolute; inset: 0; display: grid; place-items: center; }
.sp-lottie-box { position: absolute; inset: 0; }
.sp-lottie-box svg { width: 100% !important; height: 100% !important; }
.sp-lottie-err { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 10px; color: rgba(255,255,255,.65); text-align: center; }
.sp-device.xs .sp-lottie-err { display: none; }
/* splash video: shown whole (letterboxed on the background colour), like the app - a landscape clip isn't cropped */
video.sp-img { object-fit: contain; }
