* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--fg-1);
  font-family: var(--f-ui);
  font-size: 13px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, oklch(0.22 0.02 55 / 0.45), transparent 60%),
    var(--bg-0);
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }
::selection { background: var(--accent-glow); color: var(--fg-0); }
a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- app grid ---------- */
.app {
  display: grid;
  grid-template-columns: 232px 1fr 360px;
  grid-template-rows: 44px 1fr;
  height: 100vh;
  min-height: 820px;
}
.pod-rail { grid-column: 1 / -1; }
.sidebar { border-right: 1px solid var(--line-1); background: var(--bg-1); overflow-y: auto; }
.main { overflow-y: auto; position: relative; }
.ops-panel { border-left: 1px solid var(--line-1); background: var(--bg-1); overflow-y: auto; }

/* ---------- utility ---------- */
.mono { font-family: var(--f-mono); font-feature-settings: "ss01", "zero"; letter-spacing: -0.01em; }
.serif { font-family: var(--f-display); font-weight: 400; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-3); }
.dim { color: var(--fg-4); }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.hairline { height: 1px; background: var(--line-1); margin: 0; border: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 7px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-family: var(--f-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
  white-space: nowrap;
  background: transparent;
}
.chip.accent { color: var(--accent-bright); border-color: var(--accent-dim); background: var(--accent-glow); }
.chip.ok { color: var(--ok); border-color: var(--ok-dim); }
.chip.warn { color: var(--warn); border-color: color-mix(in oklch, var(--warn), black 40%); }
.chip.err { color: var(--err); border-color: color-mix(in oklch, var(--err), black 40%); }
.chip.info { color: var(--info); border-color: color-mix(in oklch, var(--info), black 40%); }
.chip.ghost { color: var(--fg-3); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px color-mix(in oklch, currentColor, transparent 70%); }
.dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 2px color-mix(in oklch, currentColor, transparent 70%); }
  50% { opacity: 0.4; box-shadow: 0 0 0 6px color-mix(in oklch, currentColor, transparent 90%); }
}

/* ---------- pod rail ---------- */
.pod-rail {
  display: flex; align-items: stretch;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-1);
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--fg-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  z-index: 10;
  height: 44px;
  line-height: 1;
}
.pod-rail > * { display: flex; align-items: center; }
.pod-rail .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  border-right: 1px solid var(--line-1);
  min-width: 232px;
}
.pod-rail .brand-mark {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--bg-0);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0;
  border-radius: 2px;
  box-shadow: 0 0 16px var(--accent-glow);
}
.pod-rail .brand-name {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--fg-0);
}
.pod-rail .brand-sub {
  color: var(--fg-3);
  font-size: 9.5px;
  margin-top: 3px;
}
.pod-rail .brand > div { display: flex; flex-direction: column; gap: 0; }
.pod-rail .cell {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
  border-right: 1px solid var(--line-1);
}
.pod-rail .cell .label { color: var(--fg-3); }
.pod-rail .cell .val { color: var(--fg-0); font-weight: 500; }
.pod-rail .cell.live .val { color: var(--accent-bright); }
.pod-rail .grow { flex: 1; }
.pod-rail .timecode {
  padding: 0 16px;
  color: var(--fg-0);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 10px;
}

/* ---------- sidebar ---------- */
.sidebar { display: flex; flex-direction: column; }
.sidebar .section {
  padding: 14px 14px 6px;
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  display: flex; justify-content: space-between; align-items: center;
}
.sidebar .item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  color: var(--fg-2);
  font-size: 12.5px;
  cursor: pointer;
  border-left: 2px solid transparent;
  background: transparent;
  border-top: 0; border-right: 0; border-bottom: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.sidebar .item:hover { background: var(--bg-2); color: var(--fg-0); }
.sidebar .item.active {
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 70%);
  color: var(--fg-0);
  border-left-color: var(--accent);
}
.sidebar .item .sw {
  width: 10px; height: 10px; border-radius: 2px;
  flex-shrink: 0;
  background: var(--line-2);
}
.sidebar .item.active .sw { background: var(--accent); }
.sidebar .item .count {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--fg-3);
}
.sidebar .item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .scroll { flex: 1; overflow-y: auto; }

/* ---------- main area: layout ---------- */
.main-inner {
  padding: 20px 24px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-1);
}
.page-head h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 38px;
  line-height: 1;
  margin: 0;
  color: var(--fg-0);
  letter-spacing: -0.01em;
}
.page-head h1 em {
  font-style: italic;
  color: var(--accent-bright);
}
.page-head .crumb {
  font-family: var(--f-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-3);
  margin-bottom: 8px;
  display: block;
}

/* ---------- card ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  position: relative;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-1);
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-2);
}
.card-hd .l { display: flex; align-items: center; gap: 10px; }
.card-hd .r { display: flex; align-items: center; gap: 8px; }
.card-bd { padding: 16px; }
.card-bd.nopad { padding: 0; }
.card-sub { font-family: var(--f-ui); font-size: 11.5px; text-transform: none; letter-spacing: 0; color: var(--fg-3); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-3);
  color: var(--fg-1);
  font-size: 12px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-4); color: var(--fg-0); border-color: var(--line-3); }
.btn.ghost { background: transparent; }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: oklch(0.15 0.008 60);
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 0 24px var(--accent-glow), 0 1px 0 oklch(1 0 0 / 0.2) inset;
}
.btn.primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--bg-0); }
.btn.primary:disabled, .btn:disabled {
  background: var(--bg-3); color: var(--fg-3); border-color: var(--line-2);
  box-shadow: none; cursor: not-allowed;
}
.btn.lg { height: 42px; padding: 0 18px; font-size: 13px; }
.btn.sm { height: 24px; padding: 0 8px; font-size: 11px; }
.btn.icon { width: 30px; padding: 0; justify-content: center; }
.btn.danger { color: var(--err); border-color: color-mix(in oklch, var(--err), black 50%); }
.btn.danger:hover { background: color-mix(in oklch, var(--err), black 60%); color: var(--err); }

/* ---------- input ---------- */
.input, .textarea, .select {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--line-1);
  color: var(--fg-0);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color .15s, background .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent-dim); background: var(--bg-3); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; font-family: var(--f-ui); }
.label {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  display: block;
  margin-bottom: 6px;
}
.field { display: block; }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.field-row.full { grid-template-columns: 1fr; }
@media (max-width: 900px) { .field-row, .field-row.three { grid-template-columns: 1fr; } }
.hint { font-family: var(--f-mono); font-size: 10px; color: var(--fg-4); margin-top: 4px; letter-spacing: 0.05em; }

/* file input pretty */
.file-input {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-3);
  border: 1px dashed var(--line-2);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--fg-2);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.file-input:hover { border-color: var(--line-3); color: var(--fg-0); }
.file-input input { display: none; }
.file-input .pick {
  font-family: var(--f-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 4px 8px;
  border: 1px solid var(--accent-dim);
  color: var(--accent-bright);
  background: var(--accent-glow);
  border-radius: var(--r-sm);
}

/* segmented control */
.seg {
  display: inline-flex; border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.seg button {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--fg-2);
  background: var(--bg-3);
  border: none;
  border-right: 1px solid var(--line-1);
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent-glow); color: var(--accent-bright); }
.seg button:hover:not(.on) { background: var(--bg-4); color: var(--fg-0); }

/* toggle */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
}
.tog {
  width: 32px; height: 18px; border-radius: 9px;
  background: var(--line-2);
  position: relative; cursor: pointer; flex-shrink: 0;
  transition: background .15s;
  border: 0;
}
.tog::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--fg-0);
  transition: left .15s;
}
.tog.on { background: var(--accent); }
.tog.on::after { left: 16px; }

/* ---------- KPI tiles (top stats strip) ---------- */
.kpi-grid {
  display: grid; gap: 0;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--bg-2);
  overflow: hidden;
}
@media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } .kpi:nth-child(n+5) { border-top: 1px solid var(--line-1); } }
@media (max-width: 720px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  padding: 14px 16px;
  border-right: 1px solid var(--line-1);
  display: flex; flex-direction: column; gap: 4px;
}
.kpi:last-child { border-right: 0; }
.kpi .k {
  font-family: var(--f-mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--fg-3);
}
.kpi .v {
  font-family: var(--f-display); font-size: 30px;
  font-style: italic;
  color: var(--fg-0); line-height: 1;
}
.kpi .v.mono { font-family: var(--f-mono); font-style: normal; font-size: 22px; letter-spacing: -0.01em; }
.kpi .h { font-family: var(--f-mono); font-size: 9.5px; color: var(--fg-4); letter-spacing: 0.05em; }
.kpi.warn .v { color: var(--warn); }
.kpi.err .v { color: var(--err); }
.kpi.ok .v { color: var(--ok); }
.kpi.accent .v { color: var(--accent-bright); }

/* ---------- influencer grid ---------- */
.persona-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1100px) { .persona-grid { grid-template-columns: repeat(2, 1fr); } }
.persona-card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .2s, transform .2s;
  text-align: left;
  font-family: inherit;
  color: inherit;
  padding: 0;
}
.persona-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.persona-card.active { border-color: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent-dim), 0 12px 40px -20px var(--accent-glow); }
.persona-art {
  aspect-ratio: 16/9;
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 40% at 50% 70%, oklch(0.55 0.18 55 / 0.7), transparent 70%),
    radial-gradient(ellipse 40% 60% at 30% 40%, oklch(0.35 0.12 280 / 0.55), transparent 70%),
    repeating-linear-gradient(0deg, oklch(0.18 0.01 60) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, oklch(0.22 0.04 280), oklch(0.12 0.01 60));
}
.persona-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, oklch(0.1 0.01 60 / 0.85) 100%);
}
.persona-art .badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
}
.persona-meta { padding: 14px; }
.persona-meta .name {
  font-family: var(--f-display);
  font-size: 22px;
  line-height: 1.05;
  color: var(--fg-0);
  margin-bottom: 4px;
  font-style: italic;
}
.persona-meta .handle {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.persona-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-1);
  padding: 10px 14px;
}
.persona-stats div { border-right: 1px solid var(--line-1); padding-right: 8px; }
.persona-stats div:last-child { border-right: 0; padding-right: 0; }
.persona-stats .k { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 2px; }
.persona-stats .v { font-family: var(--f-mono); font-size: 12px; color: var(--fg-0); }

/* ---------- launch button (big primary) ---------- */
.launch {
  display: flex; flex-direction: column;
  padding: 16px 20px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  color: oklch(0.12 0.008 60);
  border: 1px solid var(--accent-bright);
  cursor: pointer;
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  transition: transform .1s;
}
.launch:hover { transform: translateY(-1px); }
.launch:active { transform: translateY(0); }
.launch:disabled { opacity: 0.5; cursor: not-allowed; }
.launch .top {
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
  margin-bottom: 4px;
  opacity: 0.7;
}
.launch .big { font-family: var(--f-display); font-size: 28px; font-style: italic; line-height: 1; }
.launch .bot { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; margin-top: 8px; display: flex; justify-content: space-between; }
.launch .spark { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: var(--f-display); font-size: 56px; opacity: 0.18; font-style: italic; }

/* ---------- queue / activity table ---------- */
.queue-row {
  display: grid;
  grid-template-columns: 16px 1fr 100px 110px 90px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-1);
  font-size: 12px;
}
.queue-row:last-child { border-bottom: 0; }
.queue-row .title { font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-row .meta { font-family: var(--f-mono); font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; }
.queue-row .links { display: flex; gap: 8px; }
.queue-row .links a { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.queue-row.active { background: color-mix(in oklch, var(--accent-glow), transparent 70%); }
.queue-row.active .title { color: var(--accent-bright); }
.queue-row.failed .title { color: var(--err); }

.activity-head {
  display: grid;
  grid-template-columns: 16px 1fr 100px 110px 90px;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-1);
  font-family: var(--f-mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg-3);
}

/* ---------- library (completed videos + image sets) ---------- */
.lib-tabs { display: flex; gap: 0; }
.lib-tabs button {
  padding: 6px 14px;
  font-size: 11px;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent;
  border: 1px solid var(--line-1);
  border-right: 0;
  color: var(--fg-3);
  cursor: pointer;
}
.lib-tabs button:last-child { border-right: 1px solid var(--line-1); }
.lib-tabs button.on { background: var(--accent-glow); color: var(--accent-bright); border-color: var(--accent-dim); }
.lib-tabs button:hover:not(.on) { background: var(--bg-3); color: var(--fg-1); }

.lib-empty { padding: 32px 16px; text-align: center; color: var(--fg-4); font-size: 12px; }

.video-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1100px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
.video-tile {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.video-tile:hover { border-color: var(--line-3); transform: translateY(-2px); }
.video-tile-art {
  aspect-ratio: 9/16;
  position: relative;
  overflow: hidden;
  background: var(--bg-3);
  cursor: pointer;
}
.video-tile-art video, .video-tile-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-tile-art .corner-tl, .video-tile-art .corner-tr, .video-tile-art .corner-bl {
  position: absolute; z-index: 2;
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 6px;
  background: oklch(0 0 0 / 0.55);
  color: oklch(1 0 0 / 0.92);
}
.video-tile-art .corner-tl { top: 8px; left: 8px; }
.video-tile-art .corner-tr { top: 8px; right: 8px; background: var(--accent-glow); color: var(--accent-bright); border: 1px solid var(--accent-dim); }
.video-tile-art .corner-bl { bottom: 8px; left: 8px; }
.video-tile-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, oklch(0.1 0.01 60 / 0.8) 100%);
  pointer-events: none;
}
.video-tile-meta {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.video-tile-meta .name {
  font-family: var(--f-display);
  font-size: 18px;
  font-style: italic;
  color: var(--fg-0);
  line-height: 1.1;
}
.video-tile-meta .idea {
  font-size: 11.5px;
  color: var(--fg-2);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-tile-meta .stats {
  display: flex; gap: 10px;
  font-family: var(--f-mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-3);
  margin-top: 4px;
}
.video-tile-actions {
  display: flex; gap: 0;
  border-top: 1px solid var(--line-1);
}
.video-tile-actions a {
  flex: 1; text-align: center;
  padding: 8px 10px;
  font-family: var(--f-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg-2);
  border-right: 1px solid var(--line-1);
  cursor: pointer;
}
.video-tile-actions a:hover { background: var(--bg-3); color: var(--accent-bright); text-decoration: none; }
.video-tile-actions a:last-child { border-right: 0; }

.iset-card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.iset-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-1);
}
.iset-hd .l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.iset-hd .name { font-family: var(--f-display); font-style: italic; font-size: 17px; color: var(--fg-0); }
.iset-hd .idea { font-size: 11px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 600px; }
.iset-hd .r { display: flex; gap: 8px; align-items: center; }

.iset-grid {
  display: grid; gap: 8px; padding: 12px;
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 1100px) { .iset-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px) { .iset-grid { grid-template-columns: repeat(3, 1fr); } }
.iset-cell {
  aspect-ratio: 9/16;
  background: var(--bg-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.iset-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iset-cell:hover { border-color: var(--accent-dim); }
.iset-cell .num {
  position: absolute; top: 6px; left: 6px;
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.12em;
  color: oklch(1 0 0 / 0.92);
  background: oklch(0 0 0 / 0.55);
  padding: 2px 5px;
  z-index: 2;
}

/* lightbox for previewing a single image / video */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: oklch(0.08 0.005 60 / 0.92);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox .frame {
  max-width: 90vw; max-height: 90vh;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 40px 120px -20px oklch(0 0 0 / 0.8);
  cursor: default;
  display: flex; flex-direction: column;
}
.lightbox .frame > * { display: block; max-width: 90vw; max-height: 80vh; }
.lightbox .meta {
  padding: 10px 14px;
  font-family: var(--f-mono); font-size: 10.5px;
  color: var(--fg-2);
  border-top: 1px solid var(--line-1);
  display: flex; justify-content: space-between; align-items: center;
}

/* ---------- log ---------- */
.log {
  background: oklch(0.10 0.008 60);
  border: 1px solid var(--line-1);
  padding: 10px 12px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--fg-2);
  max-height: 240px;
  overflow-y: auto;
  border-radius: var(--r-sm);
  white-space: pre-wrap;
}
.log .ts { color: var(--fg-4); margin-right: 8px; }
.log .lv-info { color: var(--fg-1); }
.log .lv-ok { color: var(--ok); }
.log .lv-warn { color: var(--warn); }
.log .lv-err { color: var(--err); }

/* ---------- response box (success/error after submit) ---------- */
.respbox {
  font-family: var(--f-mono);
  font-size: 11px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}
.respbox.ok { background: color-mix(in oklch, var(--ok), transparent 88%); border: 1px solid var(--ok-dim); color: var(--ok); }
.respbox.err { background: color-mix(in oklch, var(--err), transparent 86%); border: 1px solid color-mix(in oklch, var(--err), black 40%); color: var(--err); }

/* ---------- ops panel inner sections ---------- */
.ops-section {
  border-bottom: 1px solid var(--line-1);
  padding: 14px 16px;
}
.ops-section h3 {
  font-family: var(--f-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--fg-2);
  margin: 0 0 10px;
}

/* cost waveform (per-vendor bar list) */
.vendor-bar { margin-bottom: 8px; }
.vendor-bar .vb-row { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--f-mono); font-size: 11px; }
.vendor-bar .vb-row .v-name { color: var(--fg-2); }
.vendor-bar .vb-row .v-amt { color: var(--fg-0); font-variant-numeric: tabular-nums; }
.vendor-bar .vb-row .v-meta { color: var(--fg-4); font-size: 10px; }
.vendor-bar .vb-track { height: 3px; background: var(--bg-3); margin-top: 4px; border-radius: 1.5px; overflow: hidden; }
.vendor-bar .vb-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent-bright)); }

/* progress (small) */
.progress { height: 3px; background: var(--bg-3); border-radius: 1.5px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent-bright)); transition: width .3s ease-out; }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

/* mobile fallback: collapse the 3-column grid */
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 44px auto auto auto; height: auto; }
  .sidebar, .ops-panel { border-left: 0; border-right: 0; border-top: 1px solid var(--line-1); }
  .main-inner { padding: 16px; }
  .pod-rail { overflow-x: auto; }
}
