/* Dark premium SaaS theme. One palette, defined once here. */
:root {
  --bg: #08090b;
  --side: #0d0f12;
  --panel: #12151a;
  --panel-2: #171b21;
  --panel-3: #1c2128;
  --line: #20242b;
  --line-2: #2a2f38;
  --text: #f5f5f5;
  --muted: #8b919c;
  --accent: #7c6cff;
  --accent-b: #5b8cff;
  --accent-soft: rgba(124, 108, 255, 0.14);
  --accent-2: #3ddc97;
  --warn: #f0b24a;
  --bad: #ff6b7a;
  --radius: 14px;
  --radius-s: 10px;
  --glass: rgba(18, 21, 26, 0.72);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font: 14px/1.55 "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* A faint accent glow behind the top of the page: the only decoration on the canvas. */
  background:
    radial-gradient(900px 420px at 78% -160px, rgba(124, 108, 255, 0.10), transparent 70%),
    radial-gradient(700px 380px at 12% -200px, rgba(91, 140, 255, 0.07), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
h1 { font-size: 22px; font-weight: 650; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 11px; margin: 26px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: rgba(124, 108, 255, 0.35); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.dot { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--accent-b)); box-shadow: 0 0 18px rgba(124, 108, 255, 0.45); flex: none; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: 100%; max-width: 360px; display: grid; gap: 14px; padding: 30px;
  background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 60px rgba(0, 0, 0, 0.45);
}
.login-card label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.login-card .sub { margin: 0; }
.login-card .link { justify-self: center; font-size: 13px; }
input, select, textarea {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-s); padding: 9px 12px; font: inherit; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { width: 100%; resize: vertical; }
select { padding-right: 28px; }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.error { color: var(--bad); margin: 0; font-size: 13px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--side); border-right: 1px solid var(--line); padding: 20px 12px 16px;
  display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh;
}
.side .brand { padding: 2px 10px; }
nav { display: grid; gap: 2px; }
nav button {
  display: flex; align-items: center; gap: 11px; text-align: left; background: none; border: 1px solid transparent;
  padding: 9px 10px; border-radius: var(--radius-s); color: var(--muted); transition: background 0.15s, color 0.15s, border-color 0.15s;
}
nav button svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
nav button:hover { background: var(--panel); color: var(--text); }
nav button.on { background: var(--panel); border-color: var(--line); color: var(--text); font-weight: 550; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset; }
nav button.on svg { stroke: var(--accent); }
.side-foot { margin-top: auto; display: grid; gap: 12px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.quota { font-size: 12px; color: var(--muted); }
.bar { height: 4px; background: var(--panel-3); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-b)); border-radius: 99px; }
.who { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.link:hover { color: var(--text); }

main { padding: 0 32px 72px; min-width: 0; }
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 5; margin: 0 -32px 22px; padding: 18px 32px 16px;
  background: rgba(8, 9, 11, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}

.top-right { display: flex; align-items: center; gap: 14px; }
.only-mobile { display: none; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { background: none; border: 0; padding: 6px 13px; border-radius: 8px; color: var(--muted); white-space: nowrap; transition: background 0.15s, color 0.15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--text); font-weight: 550; box-shadow: 0 0 0 1px var(--line-2), 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
.seg.tabs { margin-bottom: 18px; flex-wrap: wrap; }

.notice { background: rgba(240, 178, 74, 0.08); border: 1px solid rgba(240, 178, 74, 0.28); border-radius: var(--radius); padding: 11px 15px; margin-bottom: 16px; font-size: 13px; }
.empty { color: var(--muted); padding: 44px 0; text-align: center; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.toolbar h2 { margin: 0; }
.top-gap { margin: 10px 0 6px; }
.legend { margin-top: 14px; max-width: 110ch; }
.sub { color: var(--muted); font-size: 12.5px; }
.para { margin: 0 0 10px; }
.hot { color: var(--accent-2); font-weight: 650; }
.ok { color: var(--accent-2); }
.fail { color: var(--bad); }

.btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 14px; transition: background 0.15s, border-color 0.15s, transform 0.05s; }
.btn:hover { background: var(--panel-3); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-b)); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 6px 20px rgba(124, 108, 255, 0.22); }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; filter: none; }
a.btn { text-decoration: none; display: inline-block; }

/* ---------- Cards ---------- */
.card, .stat, .idea, .script, .table-wrap {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}
.card { padding: 18px 20px; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 15px 17px; transition: background 0.15s, border-color 0.15s; }
.stat:hover, .card:hover { background: var(--panel-2); border-color: var(--line-2); }
.stat b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.stat span { color: var(--muted); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 14px; }

.ideas { display: grid; gap: 10px; }
.idea { padding: 15px 17px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 15px; align-items: center; cursor: pointer; text-align: left; width: 100%; transition: background 0.15s, border-color 0.15s; }
.idea:hover { background: var(--panel-2); border-color: var(--line-2); }
.idea.dim { opacity: 0.5; }
.score { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 16px; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--panel-3) 0); position: relative; flex: none; }
.score::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--panel); }
.idea:hover .score::before { background: var(--panel-2); }
.score span { position: relative; }
.idea-title { font-weight: 600; font-size: 15px; margin-bottom: 3px; letter-spacing: -0.01em; }
.idea-angle { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; color: var(--muted); font-size: 12.5px; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.on { background: var(--accent-soft); border-color: rgba(124, 108, 255, 0.4); color: var(--text); }
input.wide { flex: 1; min-width: 240px; }
.card .stats { margin: 4px 0 10px; }
.card-line { font-size: 13px; margin: 3px 0; color: var(--text); }
.card.publish { padding: 4px 18px; margin: 14px 0 6px; }
.card.publish:hover { background: var(--panel); border-color: var(--line); }
.field { padding: 13px 0; border-top: 1px solid var(--line); }
.field:first-child { border-top: 0; }
.field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.field-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.field:first-child .field-text { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.btn.small { padding: 3px 10px; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); }
.wave .idea-title { font-size: 17px; }
.wave .idea-title .sub { font-weight: 400; }
.wave-nums { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.wave-nums b { color: var(--text); font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums; }
.wave-nums span:first-child b { color: var(--accent-2); }
.idea-meta { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag { font-size: 11px; padding: 2px 9px; border-radius: 99px; background: var(--panel-3); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.a { background: var(--accent-soft); border-color: rgba(124, 108, 255, 0.3); color: #cfc8ff; }
.tag.g { background: rgba(61, 220, 151, 0.1); border-color: rgba(61, 220, 151, 0.28); color: #a6f0cf; }
.tag.w { background: rgba(240, 178, 74, 0.1); border-color: rgba(240, 178, 74, 0.28); color: #f5d59a; }
.finding { border-top: 1px solid var(--line); padding: 13px 0 2px; }
.finding .tags { margin: 0 0 6px; }

.hype { display: inline-block; min-width: 34px; text-align: center; padding: 2px 9px; border-radius: 99px; font-weight: 650; font-variant-numeric: tabular-nums; border: 1px solid transparent; }
.hype.hi { background: rgba(61, 220, 151, 0.14); border-color: rgba(61, 220, 151, 0.35); color: var(--accent-2); }
.hype.mid { background: var(--accent-soft); border-color: rgba(124, 108, 255, 0.3); color: #cfc8ff; }
.hype.lo { background: var(--panel-3); border-color: var(--line); color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 550; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(255, 255, 255, 0.012); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background 0.12s; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--panel-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.plain td { border: 0; padding: 5px 16px 5px 0; vertical-align: top; background: none !important; }
table.plain td.when { color: #b9b0ff; font-weight: 600; white-space: nowrap; }
.vid { display: flex; gap: 12px; align-items: center; min-width: 260px; }
.vid img { width: 38px; height: 66px; object-fit: cover; border-radius: 8px; background: var(--panel-3); border: 1px solid var(--line); flex: none; }
.vid a { font-weight: 600; text-decoration: none; }
.vid a:hover { text-decoration: underline; }

/* ---------- Drawer ---------- */
.drawer {
  margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(680px, 100vw); border: 0; border-left: 1px solid var(--line);
  background: rgba(10, 12, 15, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: var(--text); padding: 24px 26px 64px; overflow-y: auto; box-shadow: -24px 0 60px rgba(0, 0, 0, 0.4);
}
.drawer::backdrop { background: rgba(4, 5, 7, 0.6); backdrop-filter: blur(3px); }
.drawer-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.drawer-head h2 { font-size: 19px; flex: 1; margin: 0; letter-spacing: -0.02em; line-height: 1.3; }
.x { background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; width: 32px; height: 32px; font-size: 18px; line-height: 1; color: var(--muted); flex: none; }
.x:hover { color: var(--text); border-color: var(--line-2); }
.drawer .stats { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.drawer .stat { padding: 10px 12px; }
.drawer .stat b { font-size: 16px; }
.script { padding: 16px 18px; margin-top: 14px; }
.beat { display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.beat .t { color: #b9b0ff; font-weight: 650; font-size: 12px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.beat .vo { font-weight: 500; }
.beat .cap { display: inline-block; margin-top: 5px; font-size: 12px; background: var(--panel-3); border: 1px solid var(--line); padding: 1px 9px; border-radius: 6px; }
ol.hooks { margin: 0; padding-left: 20px; }
ol.hooks li { margin-bottom: 5px; }
.chart svg { width: 100%; height: auto; display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s); margin: 5px 0 12px; }

/* ---------- Mobile: the sidebar becomes a fixed bottom bar ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; inset: auto 0 0 0; top: auto; height: auto; z-index: 20; flex-direction: row; align-items: center; gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line);
    background: rgba(13, 15, 18, 0.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .side .brand, .side-foot { display: none; }
  .only-mobile { display: inline; }
  nav { display: flex; width: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  nav button { flex: 1 0 auto; flex-direction: column; gap: 3px; padding: 7px 10px; font-size: 10.5px; min-width: 64px; align-items: center; text-align: center; }
  nav button svg { width: 19px; height: 19px; }
  main { padding: 0 14px 96px; }
  .top { margin: 0 -14px 16px; padding: 14px; }
  h1 { font-size: 19px; }
  .idea { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; padding: 13px; }
  .idea-meta { display: none; }
  .score { width: 46px; height: 46px; font-size: 14px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat b { font-size: 19px; }
  .drawer { width: 100vw; padding: 18px 16px 90px; border-left: 0; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Channel chips in the studio: the name selects the channel, the cross removes it. */
span.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.chip-main { background: none; border: 0; color: inherit; font: inherit; padding: 6px 12px; cursor: pointer; border-radius: 99px; }
.chip-x { background: none; border: 0; color: var(--muted); font-size: 15px; line-height: 1; padding: 4px 10px 5px 2px; cursor: pointer; }
.chip-x:hover { color: var(--text); }

/* Sidebar: the channel the panel is oriented to. */
.focus { display: grid; gap: 2px; font-size: 13px; }
.focus b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Video studio */
.veditor { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.vside { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tpl { display: grid; gap: 6px; text-align: left; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.tpl:hover { background: var(--panel-2); border-color: var(--line-2); }
.scene { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; transition: border-color 0.15s; }
.scene.drop { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.scene .toolbar { margin-bottom: 8px; }
.scene textarea { margin-bottom: 6px; }
.scene .hint { margin: 0 0 8px; }
.vprev-box { display: grid; gap: 4px; justify-items: center; }
.vprev { width: 132px; aspect-ratio: 9 / 16; border-radius: var(--radius-s); background: var(--panel-3); border: 1px solid var(--line); object-fit: cover; transition: opacity 0.2s; }
.vprev.loading { opacity: 0.45; }
.vrow { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 8px; }
.vfield { display: grid; gap: 4px; min-width: 150px; }
.vfield input:not([type=checkbox]):not([type=range]):not([type=color]) { min-width: 150px; }
.vfield .toolbar { margin: 0; flex-wrap: nowrap; }
.vmore { margin: 4px 0 8px; }
.vmore summary { cursor: pointer; margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.sec { width: 74px; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.lib-item { display: grid; gap: 4px; font-size: 12px; }
.lib-item img, .lib-icon { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-s); background: var(--panel-3); display: grid; place-items: center; font-size: 22px; }
.lib-item .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 7px; font-size: 13px; }
.checks b { display: inline-block; width: 18px; text-align: center; }
.warn-c { color: #f0b24a; }
.vproj { grid-template-columns: 36px minmax(0, 1fr) auto; }
.vthumb-s { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.render-out { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 10px; }
.vplayer { width: 170px; aspect-ratio: 9 / 16; border-radius: var(--radius-s); background: #000; }
.no-margin { margin: 0; }
.publish input.wide { width: 100%; }
@media (max-width: 1100px) {
  .veditor { grid-template-columns: 1fr; }
  .vside { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .scene { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
  .vprev { width: 84px; }
  .render-out { grid-template-columns: 1fr; }
  .vplayer { width: 100%; max-width: 260px; }
}

.examples { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 9px; font-size: 13px; }
.examples li { line-height: 1.45; }
.vside .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.thumbs a { display: grid; gap: 4px; }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.swatches { display: flex; gap: 3px; }
.swatches i, .swatch-btn { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.25); background: var(--background, #000); }
.swatch-btn { width: 26px; height: 26px; cursor: pointer; padding: 0; }
.cover-img { width: 180px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius-s); border: 1px solid var(--line); margin-top: 6px; }
.cover-img.wide { width: 100%; aspect-ratio: 16 / 9; }
.auto-card { border-color: rgba(124, 108, 255, 0.4); }
.auto-notes ul { margin: 6px 0 0; padding-left: 18px; }
nav button .badge { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; text-align: center; }
.notice-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
.notice-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; font-size: 18px; }
.plan-row { display: grid; gap: 8px; margin: 8px 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bar.indeterminate i { width: 35%; animation: slide-bar 1.2s ease-in-out infinite; }
@keyframes slide-bar { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.ai-box { display: grid; gap: 8px; margin: 10px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); }

/* dressing challenge editor */
.dress-grid { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.dress-prev { width: 240px; }
.dress-body h3 { margin: 14px 0 4px; }
.dress-body h3.no-margin { margin-top: 0; }
.dress-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dress-player { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: start; }
.dress-player-body { display: grid; gap: 6px; min-width: 0; }
.dress-player-body select { max-width: 100%; }
.dress-thumb, .dress-wig-img { width: 72px; aspect-ratio: 1; object-fit: contain; border-radius: var(--radius-s); background: repeating-conic-gradient(var(--panel-3) 0 25%, var(--panel) 0 50%) 0 0 / 14px 14px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.dress-wigs { display: flex; flex-wrap: wrap; gap: 10px; }
.dress-wig { display: grid; gap: 4px; justify-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--swatch); cursor: pointer; padding: 0; }
.swatch.on { outline: 2px solid var(--text); outline-offset: 2px; }
@media (max-width: 700px) {
  .dress-grid { grid-template-columns: 1fr; justify-items: center; }
  .dress-body { width: 100%; }
}

/* format DNA tab */
.format-grid { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.format-sketch { width: 260px; aspect-ratio: 9 / 16; border-radius: var(--radius-s); border: 1px solid var(--line); display: block; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 760px) {
  .format-grid { grid-template-columns: 1fr; justify-items: center; }
  .facts { grid-template-columns: 1fr; }
}

/* plans and the fit report */
.plan { display: grid; gap: 6px; }
li.fail { color: var(--warn, #f0a35e); }
