/* Layout: viewfinder-framed pitch beside the account form; signed in, projects list with an account sidebar. */
:root {
  --bg: #f2f4f8;
  --surface: #ffffff;
  --sunken: #e8ecf3;
  --ink: #131925;
  --muted: #5a6477;
  --line: #d8deea;
  --accent: #2b47d4;
  --accent-ink: #ffffff;
  --accent-soft: #e4e9ff;
  --rec: #e3393f;
  --ok: #1a8a57;
  --ok-soft: #dff3e9;
  --err: #c3282e;
  --err-soft: #fbe6e6;
  --warn: #a5660a;
  --warn-soft: #fbf0d9;

  --font-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 10px;
  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1118; --surface: #151b26; --sunken: #1c2432; --ink: #e7ebf3; --muted: #98a3b7;
    --line: #283246; --accent: #8096ff; --accent-ink: #0d1118; --accent-soft: #1f2a52;
    --rec: #ff5c62; --ok: #45d390; --ok-soft: #133528; --err: #ff6b70; --err-soft: #3a1a1d; --warn: #f2b84b; --warn-soft: #3a2c12;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1118; --surface: #151b26; --sunken: #1c2432; --ink: #e7ebf3; --muted: #98a3b7;
  --line: #283246; --accent: #8096ff; --accent-ink: #0d1118; --accent-soft: #1f2a52;
  --rec: #ff5c62; --ok: #45d390; --ok-soft: #133528; --err: #ff6b70; --err-soft: #3a1a1d; --warn: #f2b84b; --warn-soft: #3a2c12;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
}
h1, h2 { font-family: var(--font-display); line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); font-weight: 700; }
h2 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-size: var(--step--1); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Top bar */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); display: flex; align-items: center; gap: 8px; }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); display: inline-block; flex: none; }
.session { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--step--1); flex-wrap: wrap; }
.session strong { color: var(--ink); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.gear-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; flex: none; transition: color .15s, border-color .15s, transform .3s; }
.gear-btn:hover { color: var(--ink); border-color: var(--muted); }
.gear-btn:hover svg { transform: rotate(30deg); }
.gear-btn svg { transition: transform .3s; }
.gear-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { .gear-btn svg, .gear-btn:hover svg { transition: none; transform: none; } }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; padding-block: 32px 48px; }
.boot { color: var(--muted); }

/* Buttons */
.btn {
  font: 600 var(--step-0)/1 var(--font-body);
  border-radius: 8px; border: 1px solid transparent; padding: 12px 18px; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-small { padding: 7px 12px; font-size: var(--step--1); background: var(--sunken); color: var(--ink); }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Auth layout */
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 32px; align-items: start; }
@media (max-width: 860px) { .auth-grid { grid-template-columns: minmax(0, 1fr); } }

.frame { position: relative; padding: 40px 36px; display: grid; gap: 20px; justify-items: start; }
.corner { position: absolute; width: 28px; height: 28px; border-color: var(--muted); border-style: solid; border-width: 0; }
.corner.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.timecode { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.08em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.timecode .rec { animation: blink 1.4s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .timecode .rec { animation: none; } }
.pitch h1 { max-width: 14ch; }
.lede { color: var(--muted); max-width: 46ch; font-size: var(--step-1); }
.specs { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.specs li { font-family: var(--font-mono); font-size: var(--step--1); padding: 4px 10px; border: 1px dashed var(--line); border-radius: 999px; color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.auth-panel { display: grid; gap: 20px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--sunken); border-radius: 8px; padding: 4px; }
.tabs button { font: 600 var(--step-0)/1 var(--font-body); border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 6px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }

.notice { background: var(--accent-soft); color: var(--ink); padding: 12px 14px; border-radius: 8px; font-size: var(--step--1); }

/* Forms */
form { display: grid; gap: 20px; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
.field { display: grid; gap: 6px; grid-column: span 2; min-width: 0; border: 0; padding: 0; margin: 0; }
.field.half { grid-column: span 1; }
@media (max-width: 420px) { .field.half { grid-column: span 2; } }
label, legend { font-weight: 600; font-size: var(--step--1); padding: 0; }
.optional { font-weight: 400; color: var(--muted); }
input, textarea, select {
  width: 100%; font: 400 var(--step-0)/1.4 var(--font-body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { resize: vertical; }
input:hover, textarea:hover { border-color: var(--muted); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input { border-color: var(--err); }
.field.valid input { border-color: var(--ok); }
.hint { color: var(--muted); font-size: var(--step--1); }
.error { color: var(--err); font-size: var(--step--1); min-height: 0; }
.error:empty { display: none; }
.form-error { color: var(--err); font-size: var(--step--1); grid-column: span 2; }
.fine { color: var(--muted); font-size: var(--step--1); text-align: center; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--sunken); color: var(--ink); font: 600 12px/1 var(--font-body); padding: 7px 9px; border-radius: 6px; cursor: pointer; }

.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.meter span { height: 4px; border-radius: 2px; background: var(--line); transition: background-color .2s; }
.meter[data-score="1"] span:nth-child(-n+1) { background: var(--err); }
.meter[data-score="2"] span:nth-child(-n+2) { background: #d98a1c; }
.meter[data-score="3"] span:nth-child(-n+3) { background: var(--ok); }
.meter[data-score="4"] span { background: var(--ok); }
.meter-label { font-size: var(--step--1); color: var(--muted); }

.prefix { display: flex; align-items: stretch; }
.prefix span { display: grid; place-items: center; padding: 0 12px; background: var(--sunken); border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; color: var(--muted); }
.prefix input { border-radius: 0 8px 8px 0; font-variant-numeric: tabular-nums; }

.demo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); }

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.eyebrow { color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 28px; align-items: start; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

.new-project { margin-bottom: 28px; display: grid; gap: 18px; }
.np-fields .field { grid-column: span 1; }
.np-fields .field.span-2 { grid-column: span 2; }
@media (max-width: 520px) { .np-fields .field { grid-column: span 2; } }
.style-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.style-option { position: relative; display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400; }
.style-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.style-option strong { font-size: var(--step-0); }
.style-option small { color: var(--muted); font-size: var(--step--1); }
.style-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.style-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { position: relative; font-family: var(--font-mono); font-size: var(--step--1); font-weight: 500; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.projects h2 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.count { color: var(--muted); font-weight: 400; }
.project-list { display: grid; gap: 12px; }
.project {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
}
.thumb {
  aspect-ratio: 9 / 16; max-width: 100%; border-radius: 6px; background: var(--sunken);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--muted); position: relative; overflow: hidden;
}
.thumb::after { content: ""; position: absolute; inset: 6px; border: 1px dashed var(--line); border-radius: 3px; }
.thumb.wide { aspect-ratio: 16 / 9; align-self: center; }
.project-body { display: grid; gap: 8px; min-width: 0; }
.project-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; flex-wrap: wrap; }
.project h3 { font-family: var(--font-display); font-size: var(--step-1); margin: 0; overflow-wrap: anywhere; }
.project .city { color: var(--muted); font-size: var(--step--1); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.meta b { color: var(--ink); font-weight: 600; }
.notes { font-size: var(--step--1); color: var(--muted); border-left: 2px solid var(--line); padding-left: 10px; overflow-wrap: anywhere; }
.pill { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.pill.example { background: var(--accent-soft); color: var(--accent); }
.project-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: var(--step--1); }
.danger { color: var(--err); }
.confirm-text { color: var(--ink); }

.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px 24px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.empty strong { color: var(--ink); font-family: var(--font-display); font-size: var(--step-1); }

.account { display: grid; gap: 16px; }
.details { margin: 0; display: grid; gap: 12px; }
.details div { display: grid; gap: 2px; min-width: 0; }
.details dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; }
.details dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.json summary { cursor: pointer; font-weight: 600; font-size: var(--step--1); color: var(--accent); }
.json-actions { margin: 10px 0 8px; }
.json pre { margin: 0; background: var(--sunken); border-radius: 8px; padding: 12px; overflow-x: auto; font: 400 12px/1.5 var(--font-mono); max-height: 320px; }

.storage-note { color: var(--muted); font-size: var(--step--1); margin-top: 32px; }
.storage-note { overflow-wrap: anywhere; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 500;
  max-width: calc(100% - 32px); z-index: 10;
}

/* ---------- Project cards: readiness summary ---------- */
.project { cursor: pointer; transition: border-color .15s; }
.project:hover { border-color: var(--muted); }
.project h3 button { all: unset; cursor: pointer; }
.project h3 button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pill.ready { background: var(--ok-soft); color: var(--ok); }
.pill.queued { background: var(--accent-soft); color: var(--accent); }
.pill.todo { background: var(--warn-soft); color: var(--warn); }
.readiness-line { font-size: var(--step--1); color: var(--muted); }

/* ---------- Project editor ---------- */
.editor-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: end; margin-bottom: 24px; }
.editor-head .back { grid-column: 1 / -1; justify-self: start; text-decoration: none; font-weight: 600; }
.editor-title { min-width: 0; }
.editor-title h1 { overflow-wrap: anywhere; }
.save-state { color: var(--muted); white-space: nowrap; }

.banner { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  background: var(--accent-soft); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.banner.muted { background: var(--sunken); }
.banner p { color: var(--muted); font-size: var(--step--1); }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 24px; align-items: start; }
@media (max-width: 900px) { .editor-grid { grid-template-columns: minmax(0, 1fr); } .check { order: -1; } }
.editor-main { display: grid; gap: 20px; }
#editor-sections { display: grid; gap: 20px; }
.ed-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: grid; gap: 16px; scroll-margin-top: 80px; }
.ed-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ed-section > header .mono { color: var(--muted); }
.ed-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 14px 12px; }
.ed-fields .field { grid-column: auto; }
.ed-fields .field.wide { grid-column: 1 / -1; }
.ed-fields .field.invalid input, .ed-fields .field.invalid textarea { border-color: var(--err); }
.with-unit { display: flex; }
.with-unit input { border-radius: 8px 0 0 8px; min-width: 0; }
.with-unit select, .with-unit .unit { width: auto; flex: none; border-radius: 0 8px 8px 0; border-left: 0; background: var(--sunken); }
.with-unit .unit { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: 0; color: var(--muted); font-size: var(--step--1); }
input[type="text"].num { font-variant-numeric: tabular-nums; }
.char-count { font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; justify-self: end; }
fieldset:disabled .dropzone, fieldset:disabled .tile-actions { display: none; }
#project-editor fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Upload slots */
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.slot { display: grid; gap: 10px; align-content: start; min-width: 0; }
.slot.wide { grid-column: 1 / -1; }
.slot h3 { margin: 0; font-family: var(--font-display); font-size: var(--step-0); display: flex; justify-content: space-between; gap: 8px; }
.slot h3 .mono { color: var(--muted); font-weight: 400; }
.dropzone { position: relative; display: grid; place-items: center; text-align: center; gap: 4px; padding: 18px 14px;
  border: 1.5px dashed var(--line); border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 400; font-size: var(--step--1); }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone strong { color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tiles.single { grid-template-columns: minmax(0, 220px); }
.tile { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); display: grid; }
.tile.bad { border-color: var(--err); }
.tile.warn { border-color: var(--warn); }
.tile .img { aspect-ratio: 4 / 3; background: var(--sunken) repeating-conic-gradient(var(--line) 0 25%, transparent 0 50%) 0 0 / 14px 14px; position: relative; }
.tile .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .img.contain img { object-fit: contain; padding: 8px; }
.tile .badge { position: absolute; top: 6px; left: 6px; font: 500 10px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 6px; border-radius: 4px; background: var(--ink); color: var(--bg); }
.tile-info { padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.tile-name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-meta { font: 400 11px/1.4 var(--font-mono); color: var(--muted); }
.tile-problem { font-size: 12px; line-height: 1.35; }
.tile-problem.error { color: var(--err); }
.tile-problem.warning { color: var(--warn); }
.tile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 0 6px 6px; }
.tile-actions .icon-btn.include, .tile-actions [data-act="exclude"] { order: 5; flex-basis: 100%; text-align: left; white-space: nowrap; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font: 600 12px/1 var(--font-body); padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.icon-btn.danger:hover { color: var(--err); }
.icon-btn:disabled { opacity: .35; cursor: default; background: none; }
.rejects { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rejects li { background: var(--err-soft); color: var(--ink); border-radius: 6px; padding: 8px 10px; font-size: var(--step--1); overflow-wrap: anywhere; }
.rejects li b { font-weight: 600; }
.upload-progress { font-size: var(--step--1); color: var(--muted); }

/* Video choices reuse .style-option and .chip */

/* Production check panel */
.check { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); display: grid; gap: 14px; max-height: calc(100vh - 100px); overflow: auto; }
@media (max-width: 900px) { .check { position: static; max-height: none; } }
.check-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.check-count { color: var(--muted); }
.progress { height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.progress.done span { background: var(--ok); }
.check-summary { font-size: var(--step--1); }
.check-list { display: grid; gap: 12px; }
.check-group h3 { margin: 0 0 4px; font: 600 11px/1.4 var(--font-body); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.check-group ul { list-style: none; margin: 0; padding: 0; display: grid; }
.check-item { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: var(--step--1); }
.check-item:hover { background: var(--sunken); }
.check-item:focus-visible { outline: 2px solid var(--accent); }
.check-item .msg { grid-column: 2; color: var(--muted); font-size: 12px; }
.check-item.missing .msg { color: var(--warn); }
.check-item.invalid .msg { color: var(--err); }
.mark { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font: 700 10px/1 var(--font-body); margin-top: 2px; }
.mark.ok { background: var(--ok); color: var(--surface); }
.mark.missing { border: 1.5px solid var(--warn); }
.mark.invalid { background: var(--err); color: var(--surface); }
.check-warnings:empty { display: none; }
.check-warnings { background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; font-size: 12px; display: grid; gap: 6px; }
.check-warnings strong { font-size: var(--step--1); }
.check-warnings ul { margin: 0; padding-left: 16px; display: grid; gap: 4px; }
.start-hint { text-align: center; }
.start-hint:empty { display: none; }
.locked .dropzone, .locked .tile-actions { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.field { align-content: start; }
.ed-fields { align-items: start; }
.tile-meta { overflow-wrap: anywhere; } .tiles { align-items: start; }
.thumb:has(img)::after { display: none; }

/* ---------- Admin ---------- */
.admin-login { max-width: 440px; margin: 24px auto 0; display: grid; gap: 20px; }
.admin-login .back { justify-self: start; text-decoration: none; font-weight: 600; }
.admin-login h1 { font-size: var(--step-2); }
.admin-intro { color: var(--muted); max-width: 70ch; margin-bottom: 20px; }
.warn-banner { background: var(--warn-soft); }
.api-cards { display: grid; gap: 16px; margin-bottom: 20px; }
.api-card { display: grid; gap: 16px; }
.api-card > header { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.api-card h2 { font-size: var(--step-1); margin-bottom: 2px; }
.api-meta { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px 20px; }
.api-meta div { display: grid; gap: 2px; min-width: 0; }
.api-meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.api-meta dd { margin: 0; overflow-wrap: anywhere; font-size: var(--step--1); }
.api-meta dd.ok { color: var(--ok); }
.api-meta dd.bad { color: var(--err); }
.api-form .fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.api-form .field { grid-column: auto; }
.api-form .field.key { grid-column: 1 / -1; }
.pill.bad { background: var(--err-soft); color: var(--err); }
.pill.untested { background: var(--sunken); color: var(--muted); }
.admin-pw { display: grid; gap: 16px; max-width: 640px; }
.services-note { background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; font-size: 12px; }
.btn:disabled { opacity: .6; cursor: not-allowed; } /* not a busy cursor: a greyed-out button is off, not working */
.btn[aria-busy="true"]:disabled { cursor: progress; }

/* ---------- Video options: format, music, voice ---------- */
.format-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.format-option { position: relative; display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400; }
.format-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.format-option span:last-child { display: grid; gap: 2px; min-width: 0; }
.format-option small { color: var(--muted); font-size: var(--step--1); }
.format-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.format-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.aspect-frame { flex: none; border: 2px solid var(--muted); border-radius: 3px; }
.aspect-frame.wide { width: 40px; height: 22.5px; }
.aspect-frame.tall { width: 18px; height: 32px; margin-inline: 11px; }
.format-option:has(input:checked) .aspect-frame { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }

.seg { display: inline-grid; grid-auto-flow: column; background: var(--sunken); border-radius: 8px; padding: 4px; gap: 2px; justify-self: start; max-width: 100%; }
.seg-opt { position: relative; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: var(--step--1); color: var(--muted); white-space: nowrap; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 420px) { .seg { grid-auto-flow: row; } }
.music-panel { display: grid; gap: 10px; margin-top: 4px; }
.score-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.score-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px; padding: 10px 8px 10px 14px; border: 1px solid var(--line); border-radius: 8px; }
.score-option label { position: relative; display: grid; gap: 2px; cursor: pointer; font-weight: 400; min-width: 0; }
.score-option label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.score-option small { color: var(--muted); font-size: var(--step--1); }
.score-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.score-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn.play { white-space: nowrap; color: var(--accent); }
.music-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: var(--step--1); cursor: pointer; }
.checkbox-row input { width: auto; }
#music-status:empty { display: none; }

.voice-tools { display: flex; gap: 8px; }
.voice-tools input { flex: 1; min-width: 0; }
.voice-list { display: grid; gap: 4px; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.voice-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 6px; }
.voice-option:hover { background: var(--sunken); }
.voice-option.selected { background: var(--accent-soft); }
.voice-option label { position: relative; display: grid; gap: 1px; cursor: pointer; font-weight: 400; min-width: 0; }
.voice-option label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.voice-option label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.v-name { font-weight: 600; }
.voice-option.selected .v-name::before { content: "✓ "; color: var(--accent); }
.v-labels { font-size: 12px; color: var(--muted); text-transform: capitalize; overflow-wrap: anywhere; }
.v-labels.v-desc { text-transform: none; }
.voice-error { color: var(--err); font-size: var(--step--1); padding: 8px; }

/* ---------- Production: tag images ---------- */
.production { display: grid; gap: 14px; margin-bottom: 20px; }
.prod-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.prod-head h2 { font-size: var(--step-2); }
.prod-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.prod-status { font-size: var(--step-0); }
.prod-status.bad { color: var(--err); }
.tag-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-summary:empty { display: none; }
.tag-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--sunken); color: var(--ink); font-variant-numeric: tabular-nums; }
.tag-chip b { font-weight: 600; margin-left: 4px; }
.tag-chip.other { background: var(--warn-soft); color: var(--warn); }
.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.tag-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: grid; align-content: start; background: var(--surface); }
.tag-card.check-me { border-color: var(--warn); }
.tag-card.failed { border-color: var(--err); }
.tag-card .img { aspect-ratio: 3 / 2; background: var(--sunken); position: relative; }
.tag-card .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag-card .order { position: absolute; top: 6px; left: 6px; font: 500 11px/1 var(--font-mono); padding: 4px 6px; border-radius: 4px; background: var(--ink); color: var(--bg); }
.tag-body { padding: 10px; display: grid; gap: 6px; min-width: 0; }
.tag-body select { font-size: var(--step--1); padding: 7px 8px; }
.tag-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 11px; color: var(--muted); }
.tag-flag { font: 600 10px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; padding: 3px 6px; border-radius: 4px; }
.tag-flag.warn { background: var(--warn-soft); color: var(--warn); }
.tag-flag.edited { background: var(--accent-soft); color: var(--accent); }
.tag-flag.err { background: var(--err-soft); color: var(--err); }
.tag-reason { font-size: 12px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.tag-pending { font-size: 12px; color: var(--muted); }
.conf { font-variant-numeric: tabular-nums; }

/* ---------- Production: scenes ---------- */
.scene-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.scene { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.scene.other { border-color: var(--warn); }
.scene-num { font: 600 var(--step-0)/1 var(--font-mono); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.scene-main { display: grid; gap: 8px; min-width: 0; }
.scene-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.scene-title strong { font-family: var(--font-display); font-size: var(--step-1); }
.scene-title span { color: var(--muted); font-size: var(--step--1); }
.scene-thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.scene-thumbs img { width: 84px; height: 56px; object-fit: cover; border-radius: 4px; flex: none; background: var(--sunken); }
.scene-moves { display: flex; flex-direction: column; gap: 2px; }
.scene-note { font-size: 12px; color: var(--warn); }
@media (max-width: 520px) { .scene { grid-template-columns: 26px minmax(0, 1fr); } .scene-moves { grid-column: 2; flex-direction: row; } }

/* ---------- Production: sequence and cull ---------- */
.scene { grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; }
.scene-num { padding-top: 4px; }
.scene-state { font: 600 10px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; padding: 4px 7px; border-radius: 4px; background: var(--sunken); color: var(--muted); }
.scene-state.claude { background: var(--ok-soft); color: var(--ok); }
.scene-state.manual { background: var(--accent-soft); color: var(--accent); }
.scene-state.pending { background: var(--accent-soft); color: var(--accent); }
.scene-state.failed { background: var(--err-soft); color: var(--err); }
.scene-notes { font-size: 12px; color: var(--muted); }
.shots { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.shot { flex: none; width: 132px; display: grid; gap: 4px; align-content: start; }
.shot .img { position: relative; }
.shot img { width: 132px; height: 88px; object-fit: cover; border-radius: 4px; display: block; background: var(--sunken); }
.shot .order { position: absolute; top: 4px; left: 4px; font: 500 10px/1 var(--font-mono); padding: 3px 5px; border-radius: 3px; background: var(--ink); color: var(--bg); }
.shot-role { font-size: 11px; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.shot-ctrls { display: flex; gap: 0; }
.shot-ctrls .icon-btn { padding: 4px 6px; font-size: 11px; }
.culled-label { font: 600 11px/1.4 var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 2px; }
.shot.culled img { filter: grayscale(1); opacity: .55; }
.shot.culled .shot-role { color: var(--err); }
.scene-thumbs:empty { display: none; }

/* ---------- Production: narration ---------- */
.narration { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 2px; }
.narr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.narr-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.narr-meta { color: var(--muted); font-size: 11px; }
.narr-meta.over { color: var(--warn); font-weight: 600; }
.narration textarea { font-size: var(--step-0); line-height: 1.5; resize: vertical; min-height: 3.2em; }
.narration textarea:disabled { background: var(--sunken); color: var(--muted); }
.narr-warn { font-size: 12px; color: var(--warn); }

/* ---------- Production: visual prompts ---------- */
.visuals { border-top: 1px dashed var(--line); padding-top: 10px; }
.visuals summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.visuals summary::-webkit-details-marker { display: none; }
.visuals summary::before { content: "▸"; color: var(--muted); font-size: 11px; transition: transform .15s; }
.visuals[open] summary::before { transform: rotate(90deg); }
.visuals-body { display: grid; gap: 10px; margin-top: 10px; }
.vshots { display: grid; gap: 10px; }
.vshots:empty { display: none; }
.vshot { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.vshot img { width: 120px; height: 80px; object-fit: cover; border-radius: 4px; background: var(--sunken); }
.vshot-body { display: grid; gap: 6px; min-width: 0; }
.vshot-meta { font-size: 11px; color: var(--muted); }
.edited-tag { color: var(--accent); font-weight: 600; }
.vchips { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 6px 14px; }
.vchips div { display: grid; gap: 1px; min-width: 0; }
.vchips dt { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.vchips dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.vshot textarea { font-size: 13px; line-height: 1.45; }
.vneg { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 560px) { .vshot { grid-template-columns: minmax(0, 1fr); } .vshot img { width: 100%; height: auto; aspect-ratio: 3 / 2; } }
.visuals-body > .btn { justify-self: start; }

/* ---------- Production: audio and render ---------- */
.scenes-total { font-size: var(--step--1); color: var(--ink); }
.scenes-total:empty { display: none; }
.audio-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.audio-row audio { height: 32px; max-width: 100%; }
.render-row { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }
.render-row > .btn { justify-self: start; }
.clips { display: flex; gap: 8px; flex-wrap: wrap; }
.clips video { width: min(100%, 320px); border-radius: 6px; background: #000; }

/* ---------- Production: end card ---------- */
.endcard-img { width: min(100%, 720px); border-radius: 6px; border: 1px solid var(--line); display: block; }
.endcard-img.tall { width: min(100%, 300px); }

.music-player { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.music-player audio { height: 36px; width: min(100%, 420px); }

/* ---------- Production: final video ---------- */
.final { display: grid; gap: 14px; margin-bottom: 20px; border-color: var(--accent); }
.final-frame { background: #000; border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
.final-frame video { width: 100%; max-height: 72vh; display: block; background: #000; }
.final-frame.tall video { width: auto; max-width: 100%; height: 72vh; }
.final-meta { font-size: var(--step--1); color: var(--muted); }
.final-meta:empty { display: none; }
.btn-primary.btn-small { background: var(--accent); color: var(--accent-ink); }

/* ---------- MLS lookup ---------- */
.with-action { display: flex; gap: 8px; align-items: stretch; }
.with-action input { flex: 1; min-width: 0; }
.with-action .btn { white-space: nowrap; }
.lookup { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--sunken); display: grid; gap: 10px; font-size: var(--step--1); }
.lookup p { margin: 0; }
.lookup.past { background: transparent; border-style: dashed; padding: 8px 12px; }
.lookup.running { background: var(--accent-soft); border-color: var(--accent); }
.lookup.done { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.lookup.failed { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.lookup-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.lookup-head strong { font-size: var(--step-0); }
.lookup-head .mark.ok { width: 22px; height: 22px; font-size: 12px; background: var(--ok); color: #fff; margin-top: 0; }
.lookup-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lookup-steps { list-style: none; margin: 0; padding: 0 0 0 34px; display: grid; gap: 3px; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.lookup-steps li::before { content: "✓ "; color: var(--ok); }
.lookup-steps li.now::before { content: "… "; color: var(--accent); }
.lookup-steps li.now { color: var(--ink); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.warn-text { color: var(--warn); }
.filled-list summary { cursor: pointer; font-weight: 600; }
.filled-list dl { margin: 8px 0 0; display: grid; gap: 4px; }
.filled-list dl div { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; }
.filled-list dt { color: var(--muted); }
.filled-list dd { margin: 0; overflow-wrap: anywhere; }
.filled-list .was { color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.img-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.img-line { display: flex; gap: 10px; align-items: center; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); flex: none; }
.thumb.empty { display: inline-block; background: repeating-linear-gradient(45deg, var(--sunken), var(--sunken) 4px, var(--surface) 4px, var(--surface) 8px); }
.img-line.warn strong { color: var(--warn); }
.match-list { display: grid; gap: 8px; }
.match { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.match p { margin: 2px 0 0; }
.looking-up [data-field] input:disabled, .looking-up [data-field] textarea:disabled, .looking-up [data-field] select:disabled { background: repeating-linear-gradient(90deg, var(--sunken) 0 40%, var(--surface) 50%, var(--sunken) 60% 100%); background-size: 300% 100%; animation: shimmer 1.6s linear infinite; color: var(--muted); }
.looking-up #f-mlsNumber { background: var(--surface); animation: none; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.slot.waiting { opacity: .55; }
.field.autofilled > label::after { content: "From listing"; margin-left: 8px; font: 500 10px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; padding: 3px 6px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); vertical-align: 1px; }
.field.autofilled input, .field.autofilled textarea { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
@media (max-width: 640px) { .match { grid-template-columns: 1fr; } .filled-list dl div { grid-template-columns: 1fr; gap: 0; } }
.ed-fields [data-field="mlsNumber"] { grid-column: 1 / -1; }
.ed-fields [data-field="mlsNumber"] .with-action { max-width: 460px; }

/* ---------- End card in the form ---------- */
.endcard-slot .endcard-frame { position: relative; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); display: grid; place-items: center; min-height: 160px; overflow: hidden; }
.endcard-slot .endcard-img { width: 100%; max-width: 760px; border: 0; border-radius: 0; display: block; }
.endcard-slot .endcard-img.tall { width: auto; max-width: 100%; height: min(70vh, 640px); }
.endcard-frame.busy .endcard-img { opacity: .55; transition: opacity .2s; }
.endcard-empty { color: var(--muted); font-size: var(--step--1); padding: 40px 16px; text-align: center; }
.endcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.endcard-foot .upload-progress { margin: 0; }

/* ---------- Admin: tabs and service costs ---------- */
.admin-tabs { max-width: 420px; margin: 0 0 20px; }
.costs-panel { display: grid; gap: 14px; margin-bottom: 20px; }
.costs-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.costs-head h2 { margin: 0; }
.costs-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cost-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cost-tile { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: grid; gap: 4px; background: var(--surface); }
.cost-tile span { color: var(--muted); font-size: var(--step--1); }
.cost-tile strong { font: 700 var(--step-2)/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.cost-tile.total { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.table-wrap { overflow-x: auto; }
.cost-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 640px; }
.cost-table th, .cost-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cost-table thead th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.cost-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-table .total { font-weight: 700; }
.cost-table tfoot th, .cost-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--line); }
.cost-row { cursor: pointer; }
.cost-row:hover, .cost-row:focus-visible { background: var(--sunken); }
.cost-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cost-row .caret { display: inline-block; width: 1.2em; color: var(--muted); }
.cost-detail td { background: var(--sunken); padding: 6px 10px 10px 30px; }
.cost-lines { width: 100%; border-collapse: collapse; }
.cost-lines td { padding: 5px 8px; border-bottom: 1px dashed var(--line); }
.cost-lines tr:last-child td { border-bottom: 0; }
.cost-table td.empty { color: var(--muted); padding: 24px 10px; }
.rate-group { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 4px; margin: 0 0 12px; }
.rate-group legend { font-weight: 700; padding: 0 6px; }
.rate-group legend a { font-weight: 400; margin-left: 6px; }
.rate-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px 14px; }
.field.rate .prefix input { width: 100%; }

/* ---------- Tagging pass 2 ---------- */
.room-summary { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--sunken); margin: 10px 0; }
.room-summary h3 { margin: 0 0 6px; font-size: var(--step-0); }
.room-summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.room-summary li { display: grid; grid-template-columns: 11em 6em 1fr; gap: 10px; align-items: baseline; font-size: var(--step--1); }
@media (max-width: 640px) { .room-summary li { grid-template-columns: 1fr; gap: 0; } }
.tag-flag.pass2 { background: var(--accent-soft); color: var(--accent); }
.tag-reason.pass2 { color: var(--ink); }
.tag-reason.pass2 b { color: var(--accent); font-weight: 600; }

/* ---------- Progress: narration, render, assemble ---------- */
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; margin: 6px 0 14px; }
.pipe { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); display: grid; gap: 8px; }
.pipe-head { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.pipe-head .mono { color: var(--muted); font-size: 12px; }
.pipe-mark { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 11px/1 var(--font-body); border: 2px solid var(--line); }
.pipe.active .pipe-mark { border-color: var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
.pipe.done .pipe-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.pipe.error .pipe-mark { background: var(--err); border-color: var(--err); color: #fff; }
.pipe-bar { height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.pipe-bar > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--muted); transition: width .4s ease; }
.pipe.active .pipe-bar > span { background: var(--accent); }
.pipe.done .pipe-bar > span { background: var(--ok); }
.pipe.error .pipe-bar > span { background: var(--err); }
.pipe-bar.indeterminate > span { animation: pipe-slide 1.3s ease-in-out infinite; }
@keyframes pipe-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .pipe-bar.indeterminate > span { animation: none; opacity: .5; } .pipe.active .pipe-mark { animation: none; } }
.pipe-text { margin: 0; font-size: var(--step--1); color: var(--muted); }
.pipe.active .pipe-text { color: var(--ink); }
.pipe.error .pipe-text { color: var(--err); }
.endcard-scene { border-style: dashed; }
.endcard-scene .clips video, .endcard-thumb { width: min(100%, 420px); border-radius: 6px; border: 1px solid var(--line); display: block; }
.endcard-line { margin: 4px 0 6px; font-size: var(--step-0); font-style: italic; }
.endcard-scene textarea[data-endcard-line] { width: 100%; margin: 4px 0 6px; font-style: italic; }
.endcard-scene .audio-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Collapsible section (Service prices) ---------- */
.collapse-head { margin: 0; }
.collapse-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 4px 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.collapse-btn .chev { flex: none; color: var(--muted); transition: transform .2s ease; }
.collapse-btn[aria-expanded="true"] .chev { transform: rotate(90deg); color: var(--ink); }
.collapse-btn:hover .chev { color: var(--accent); }
.collapse-hint { margin-left: auto; font: 400 var(--step--1)/1.3 var(--font-body); color: var(--muted); }
#rates-body { display: grid; gap: 14px; }
#rates-body[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .collapse-btn .chev { transition: none; } }

/* ---------- SILVA logo in the top bar (every page) ---------- */
.brand { gap: 12px; }
.brand-logo { display: inline-flex; align-items: center; border-radius: 6px; }
.brand-logo img { height: 40px; width: auto; display: block; }
.brand-divider { width: 1px; height: 26px; background: var(--line); }
.brand-app { display: inline-flex; align-items: center; gap: 8px; }
/* The VIDAIMAX logo, then the SILVA logo beside it. VIDAIMAX's lettering is dark: on the dark theme it sits on a light plate.
   SILVA: slate lettering (silva-logo.png) on light, white lettering (silva-logo-white.png) on dark. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vidaimax-logo { background: #f5f8fb; padding: 3px 8px; } }
:root[data-theme="dark"] .vidaimax-logo { background: #f5f8fb; padding: 3px 8px; }
.silva-logo { display: inline-flex; align-items: center; }
.silva-logo img { height: 36px; width: auto; display: block; } /* 90% of the VIDAIMAX logo's 40px */
.silva-logo .logo-on-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .silva-logo .logo-on-light { display: none; } :root:not([data-theme="light"]) .silva-logo .logo-on-dark { display: block; } }
:root[data-theme="dark"] .silva-logo .logo-on-light { display: none; }
:root[data-theme="dark"] .silva-logo .logo-on-dark { display: block; }
@media (max-width: 560px) { .brand { gap: 8px; } .brand-logo img { height: 26px; } .silva-logo img { height: 23.4px; } .brand-app { display: none; } }

/* Shot size from the style guide's shot grammar (wide, medium, detail). */
.shot-size { font-weight: 600; text-transform: uppercase; font-size: 0.72em; letter-spacing: 0.04em; margin-right: 2px; }

/* Unusable photos: greyed out, a red band across the picture, a red frame and tinted card. */
.tile.bad { border: 2px solid var(--err); background: var(--err-soft); }
.tile.bad .img img { filter: grayscale(1) brightness(.62); }
.tile.warn { border: 2px solid var(--warn); }
.tile .flag { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  font: 600 12px/1.2 var(--font-sans, inherit); color: #fff; background: var(--err); }
.tile .flag.warn { background: var(--warn); color: #fff; }
.tile.bad .tile-name { text-decoration: line-through; text-decoration-color: var(--err); }
.tile-problem { display: flex; gap: 5px; align-items: baseline; }
.tile-problem .pi { font-weight: 700; flex: none; }
.tiles.only-problems .tile:not(.bad):not(.warn) { display: none; }
.slot-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; margin: 0 0 10px; border-radius: 8px;
  font-size: 13px; line-height: 1.4; border: 1px solid var(--warn); background: var(--warn-soft); }
.slot-alert.bad { border-color: var(--err); background: var(--err-soft); }
.slot-alert .pi { font-weight: 700; color: var(--warn); }
.slot-alert.bad .pi, .slot-alert.bad strong { color: var(--err); }
.slot-alert > span:nth-child(2) { flex: 1 1 260px; }
.slot-alert .alert-actions { display: flex; gap: 10px; align-items: center; }
.btn-danger { background: var(--err); color: #fff; border-color: var(--err); }

/* Hover to enlarge a tagged photo. It never takes the pointer, so moving away closes it. */
.hover-preview { position: fixed; z-index: 1000; pointer-events: none; padding: 8px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); opacity: 0; transform: scale(.97); transition: opacity .12s ease, transform .12s ease; }
.hover-preview.shown { opacity: 1; transform: none; }
.hover-preview img { display: block; border-radius: 6px; object-fit: contain; background: var(--sunken); }
.hover-preview-cap { margin: 8px 2px 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hover-preview-cap:empty { display: none; }
.tag-card .img img, .shot .img img, .vshot > img { cursor: zoom-in; }
@media (prefers-reduced-motion: reduce) { .hover-preview { transition: none; } }

/* The app name with its full name underneath, small. */
.brand-app { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.brand-full { flex-basis: 100%; padding-left: 16px; font-size: 10px; font-weight: 500; letter-spacing: .04em; color: var(--muted); }

/* Find the listing by MLS number or by address. */
.find-listing { display: grid; gap: 6px; }
.find-listing .lookup-by { border: 0; padding: 0; margin: 0 0 4px; }
.find-listing .lookup-by legend { font-weight: 600; font-size: var(--step--1, 13px); margin-bottom: 6px; padding: 0; }
.find-listing .by-address { display: grid; gap: 6px; margin-bottom: 6px; }
.find-listing[data-by="mls"] .by-address, .find-listing[data-by="mls"] .by-address-only { display: none; }
.find-listing[data-by="address"] .by-mls-only { display: none; }

.slot-alert.info { border-color: var(--line); background: var(--sunken); }
.slot-alert.info .pi { color: var(--muted); font-style: italic; font-family: Georgia, serif; }

/* ---------- Membership: plans and points ---------- */
.points-dialog { max-width: 460px; width: calc(100% - 32px); border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--surface); color: inherit; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.points-dialog::backdrop { background: rgba(10, 14, 30, .45); }
.points-dialog h2 { margin: 0 0 8px; font-size: 19px; }
.points-dialog p { margin: 0 0 12px; line-height: 1.5; }
.pd-figures { display: grid; gap: 6px; margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; background: var(--sunken); }
.pd-figures:empty { display: none; }
.pd-figures div { display: flex; justify-content: space-between; gap: 12px; }
.pd-figures dt { color: var(--muted); } .pd-figures dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.pd-figures .pd-short { border-top: 1px solid var(--line); padding-top: 6px; } .pd-figures .pd-short dd { color: var(--accent); font-size: 17px; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.topoff-suggest { margin: 6px 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); font-size: 13px; }
.autotop { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.autotop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.autotop h3 { margin: 0; font-size: 15px; }
.autotop-fields { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 14px; }
.autotop-fields.off { opacity: .6; }
.autotop-fields input { width: 4.5em; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; font: inherit; text-align: right; }
.autotop .btn { justify-self: start; }
.points-estimate { margin: 0 0 10px; font-size: 13px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; background: var(--sunken); }
.points-estimate.short { background: var(--warn-soft); border: 1px solid var(--warn); }
.topoff { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); border-radius: 6px; transition: background .4s ease; }
.topoff.flash { background: var(--accent-soft); }
.topoff h3 { margin: 0 0 4px; font-size: 15px; }
.topoff-packs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.topoff-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.topoff-custom input { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; font: inherit; }
.dash-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.points-pill { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: inherit; cursor: pointer; font: inherit; }
.points-pill:hover { border-color: var(--accent, #3346d3); }
.points-pill .pp-num { font-size: 16px; font-weight: 700; }
.points-pill .pp-label { font-size: 13px; color: var(--muted); }
.points-pill.low .pp-num { color: var(--warn); }
.ed-side { display: grid; justify-items: end; gap: 2px; }
.ed-points { font-size: 12px; color: var(--muted); margin: 0; }
.billing-switch { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0 20px; }
.bs-label { font-weight: 600; color: var(--muted); }
.bs-label.on { color: inherit; }
.save-badge { display: inline-block; margin-left: 4px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--ok-soft, #e3f6ec); color: var(--ok, #1a7f4b); }
.switch { position: relative; width: 52px; height: 28px; border-radius: 999px; border: 1px solid var(--line); background: var(--sunken); cursor: pointer; padding: 0; transition: background .15s ease; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s ease; }
.switch[aria-checked="true"] { background: var(--accent, #3346d3); border-color: var(--accent, #3346d3); }
.switch[aria-checked="true"] .knob { transform: translateX(24px); }
.switch:focus-visible { outline: 2px solid var(--accent, #3346d3); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch, .switch .knob { transition: none; } }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.plan-card { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.plan-card.current { border: 2px solid var(--accent, #3346d3); }
.plan-card h2 { margin: 0; font-size: 20px; }
.plan-videos { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.plan-price { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
.plan-price .amt { font-size: clamp(24px, 2.3vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.plan-price .per { color: var(--muted); }
.plan-billed { margin: 0; font-size: 12px; color: var(--muted); min-height: 1.4em; }
.plan-billed s { margin-left: 4px; }
.plan-facts { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.plan-action .btn { width: 100%; }
.current-tag { display: block; text-align: center; font-weight: 700; color: var(--accent, #3346d3); padding: 8px 0; }
.plan-action .confirm-text { font-size: 13px; margin: 0 0 8px; }
.membership-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.big-points { font-size: 15px; margin: 0 0 6px; }
.big-points .mono { font-size: 30px; font-weight: 800; margin-right: 4px; }
.how-points { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.points-history { width: 100%; border-collapse: collapse; font-size: 13px; }
.points-history th, .points-history td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.points-history .num, .members-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.points-history .sub, .members-table .sub { display: block; color: var(--muted); font-size: 12px; }
.neg { color: var(--err); } .pos { color: var(--ok, #1a7f4b); }
.add-points { display: flex; gap: 6px; flex-wrap: wrap; }
.add-points input { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; font: inherit; font-size: 13px; }

#plans-table .sub, #members-table .sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
#plans-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Add a new tag */
.tag-dialog form { display: grid; gap: 6px; }
.tag-dialog input[type="text"], .tag-dialog select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; }
.tag-dialog .field-label { font-weight: 600; font-size: 14px; margin-top: 6px; }
.tag-dialog .field-error { color: var(--err); min-height: 1.2em; margin: 4px 0 0; font-size: 14px; }
.td-photo { display: flex; gap: 12px; align-items: center; margin: 4px 0 6px; font-size: 14px; word-break: break-word; }
.td-photo img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }

/* Declutter a photo (tagging step) */
.declutter { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px 8px; margin: 2px 0 0; display: grid; gap: 6px; min-width: 0; }
.declutter.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.declutter legend { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 4px; }
.dc-choice { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
.declutter .dc-choice label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-weight: 400; font-size: 12px; white-space: nowrap; margin: 0; padding: 0; }
.declutter .dc-choice input { margin: 0; }
.declutter .link-btn { justify-self: start; font-size: 12px; }
.declutter textarea { width: 100%; min-height: 48px; resize: vertical; font: inherit; font-size: 12px; line-height: 1.4; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; }
.dc-status { font-size: 11px; line-height: 1.4; color: var(--muted); margin: 0; }
.dc-status.warn { color: var(--warn); }
.dc-status.err { color: var(--err); }
.dc-status.busy { color: var(--accent); }
.dc-badge { position: absolute; top: 6px; right: 6px; font: 600 10px/1 var(--font-mono); text-transform: uppercase; padding: 4px 6px; border-radius: 4px; background: var(--accent); color: #fff; }

/* A finished project's total points (dashboard card) */
.points-used { font-size: var(--step--1); color: var(--muted); margin: 2px 0 0; }
.points-used strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Stage a photo */
.stage-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.compare-row { padding: 8px 10px 0; }
.compare-row .link-btn { font-size: 12px; }
.stage-report { margin: 6px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.45; }
.stage-report li { margin-bottom: 6px; }
.stage-report code { font-size: 11px; }
.stage-report .err { color: var(--danger, #b42318); }
.try-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stage-row .btn.staged { border-color: var(--accent); color: var(--accent); }
.stage-row .link-btn { font-size: 12px; }
.stage-status { margin-top: -2px; }
.stage-dialog { max-width: 560px; }
.stage-dialog form { display: grid; gap: 8px; }
.sd-styles { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 46vh; overflow: auto; }
.sd-styles legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.sd-style { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-weight: 400; }
.sd-style:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.sd-style input { margin: 3px 0 0; width: auto; flex: none; padding: 0; }
.stage-dialog .field-error { color: var(--err); min-height: 1.2em; margin: 0; font-size: 14px; }
.stage-dialog .field-error:empty { display: none; }
.sd-style b { display: block; font-size: 14px; }
.sd-style .hint { display: block; font-size: 12px; line-height: 1.35; }

/* Learning (admin) and the staging "usual" label */
.learn-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.learn-switch { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; font-size: var(--step--1); font-weight: 500; }
.sub-cell { font-size: 12px; color: var(--muted); max-width: 360px; }
.sd-style .usual { display: inline-block; margin-left: 6px; font: 600 10px/1 var(--font-mono); text-transform: uppercase; padding: 3px 6px; border-radius: 4px; background: var(--accent); color: #fff; vertical-align: 2px; }

/* Passwords */
.forgot-row { margin: 10px 0 0; text-align: center; font-size: var(--step--1); display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
#reset-form { display: grid; gap: 14px; }
.reset-title { font-size: var(--step-1); margin: 0; }
.reset-step2 { display: grid; gap: 14px; }
#reset-form .fields > * { grid-column: 1 / -1; }
.form-note { color: var(--ok); font-size: var(--step--1); margin: 0; }
.pw-dialog form { display: flex; flex-direction: column; gap: 12px; }
.pw-dialog .pd-actions { justify-content: flex-end; }
.pw-dialog .field input { width: 100%; }
.banner-note { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 10px 12px; font-size: var(--step--1); margin: 0; }
.temp-pw { margin-top: 6px; max-width: 260px; }
.temp-pw code { font-family: var(--font-mono); font-size: 13px; color: var(--ink); user-select: all; }
#change-password-open { margin-top: 12px; }

/* Payments */
.pay-status:empty { display: none; }
.pay-status { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }
.pay-note { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--surface); line-height: 1.5; }
.pay-note.warn { border-color: #d9822b; background: rgba(217, 130, 43, .08); }
.pay-note.bad { border-color: #c0392b; background: rgba(192, 57, 43, .08); }
.pay-note .mono { font-weight: 600; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.pay-method { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; }
.pay-method .hint { font-weight: 400; }
.pz-to, .pz-ref { font-size: 17px; }
.test-mode { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #d9822b; color: #fff; margin-left: 6px; }
.btn-primary.pay-method .hint { color: rgba(255, 255, 255, .88); }
#zelle-table .sub { display: block; }

/* A production step closed to its heading and status line */
.panel.production.step-closed > :not(.prod-head):not(.prod-status) { display: none; }
.panel.production.step-closed .prod-head .hint { display: none; }
.panel.production.step-closed .prod-actions { display: none; }
.step-toggle { margin-left: 12px; align-self: flex-start; white-space: nowrap; }

/* How was your last video? (stars: highest first in the markup, shown right to left so hover fills to the left) */
.fb-project { font-weight: 600; }
.fb-stars { border: 0; padding: 0; margin: 4px 0 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.fb-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fb-stars label { font-size: 38px; line-height: 1; color: #c9ced8; cursor: pointer; transition: color .1s, transform .1s; }
.fb-stars label:hover, .fb-stars label:hover ~ label, .fb-stars input:checked ~ label { color: #f2b01e; }
.fb-stars input:focus-visible + label { outline: 2px solid var(--accent, #2f49d1); outline-offset: 2px; border-radius: 4px; }
.fb-stars label:active { transform: scale(.92); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ratings-summary { display: flex; flex-wrap: wrap; gap: 18px; align-items: baseline; margin: 6px 0 12px; }
.ratings-summary .big { font-size: 30px; font-weight: 800; }
.stars-text { color: #f2b01e; letter-spacing: 1px; white-space: nowrap; }

.feedback-dialog { max-width: 520px; }
.feedback-dialog form { display: flex; flex-direction: column; gap: 10px; }
.feedback-dialog h2 { margin: 0; }
.feedback-dialog .fb-label { font-weight: 600; margin: 4px 0 0; }
.feedback-dialog .fb-scale { margin: 0; }
.feedback-dialog .field textarea { width: 100%; }
.feedback-dialog .pd-actions { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.icon-btn.include { color: var(--accent, #2f49d1); font-weight: 600; }

/* Brighten (tagging page): an on-screen preview; the video uses the brightened copy SILVA makes */
.tag-card .img img.bright-10 { filter: brightness(1.08) saturate(1.03); }
.tag-card .img img.bright-20 { filter: brightness(1.16) saturate(1.06); }
.tag-card .img img.bright-30 { filter: brightness(1.24) saturate(1.09); }
.tag-card .img img.bright-40 { filter: brightness(1.31) saturate(1.12); }
.tag-card .img img.bright-50 { filter: brightness(1.38) saturate(1.15); }
.bright-badge { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.stage-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bright-auto { margin: 4px 0 0; font-size: 12px; color: var(--muted, #667); }
.bright-row { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.bright-row select { font-size: 13px; padding: 3px 6px; }

.admin-forgot { text-align: center; margin: 10px 0 0; }
#admin-reset-form { display: flex; flex-direction: column; gap: 12px; }
#admin-reset-form h2 { margin: 0; font-size: 19px; }
#admin-reset-form .fields > * { width: 100%; }
#admin-reset-message.error { color: var(--danger, #c0392b); }

/* Two-step sign-in */
.tf-account { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.tf-account h3 { margin: 0 0 4px; font-size: 15px; }
.tf-account .hint { margin: 0 0 10px; }
.tf-form .field { margin: 14px 0; }
#tf-code, #admin-tf-code, #tfd-code { font-family: var(--font-mono); font-size: 20px; letter-spacing: .18em; max-width: 220px; }
.tf-dialog { max-width: 520px; }
.tfd-body > div, .tfd-body > form { margin-top: 10px; }
.tfd-methods { display: grid; gap: 10px; margin-top: 12px; }
.tfd-method { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunken); color: inherit; font: inherit; cursor: pointer; }
.tfd-method:hover, .tfd-method:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.tfd-method span { font-size: 13px; color: var(--muted); }
.tfd-steps { margin: 0 0 10px; padding-left: 20px; font-size: 14px; }
#tfd-qr { display: block; margin: 8px auto; background: #fff; padding: 8px; border-radius: 10px; }
.tfd-secret { text-align: center; font-size: 14px; word-break: break-all; color: var(--muted); }
.tfd-codes { columns: 2; list-style: none; padding: 14px; margin: 10px 0; background: var(--sunken); border-radius: var(--radius); font-size: 15px; line-height: 1.9; }
.tfd-manage-actions { margin-bottom: 12px; }
.admin-tf .tf-status { font-weight: 600; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; }
.check-row input { margin-top: 3px; }

/* Fireworks thank-you (adding a tag) */
.celebrate { position: fixed; inset: 0; z-index: 1000; pointer-events: none; display: flex; align-items: flex-start; justify-content: center; transition: opacity .45s ease; }
.celebrate.fw-out { opacity: 0; }
.fw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.celebrate::before { content: ''; position: absolute; inset: 0; background: rgba(8, 12, 28, .42); animation: fw-veil .4s ease both; }
@keyframes fw-veil { from { opacity: 0; } to { opacity: 1; } }
.fw-card { pointer-events: auto; position: relative; margin-top: 18vh; max-width: min(440px, calc(100% - 32px)); padding: 20px 24px; text-align: center; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.35); animation: fw-pop .5s cubic-bezier(.2,1.4,.4,1) both; cursor: pointer; }
.fw-title { margin: 0 0 6px; font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.fw-text { margin: 0; color: var(--muted); font-size: 14px; }
@keyframes fw-pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fw-card { animation: none; } }

/* Editing or deleting an account */
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-delete { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.danger-link { color: var(--err); }
.danger-link:hover { color: var(--err); text-decoration: underline; }
.profile-dialog { max-width: 520px; }
.pf-fields { display: flex; flex-wrap: wrap; gap: 0 12px; }
.pf-fields .field { flex: 1 1 100%; }
.pf-fields .field.half { flex: 1 1 calc(50% - 6px); min-width: 160px; }
.dl-list { margin: 6px 0 12px; padding-left: 20px; font-size: 14px; }
.warn-note { background: var(--err-soft); color: var(--err); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.member-actions { display: flex; gap: 10px; margin-top: 4px; font-size: 13px; }
.delete-dialog { max-width: 500px; }
.delete-dialog form, .profile-dialog form { display: flex; flex-direction: column; gap: 10px; }
.delete-dialog form > *, .profile-dialog form > * { margin-top: 0; margin-bottom: 0; }
.delete-dialog .pd-actions, .profile-dialog .pd-actions { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Production check: the item jumped to flashes briefly */
.jump-flash { animation: jump-flash 1.5s ease-out; border-radius: 10px; }
@keyframes jump-flash { 0%, 35% { background-color: var(--accent-soft); box-shadow: 0 0 0 10px var(--accent-soft); } 100% { background-color: transparent; box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .jump-flash { animation: none; background-color: var(--accent-soft); } }

/* Admin › Examples */
.ex-form textarea, .ex-edit textarea { width: 100%; resize: vertical; }
.ex-source { display: grid; gap: 8px; }
.ex-source select { max-width: 100%; }
.ex-list { display: grid; gap: 14px; }
.ex-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunken); }
.ex-thumb { width: 160px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; color: #aab; font-size: 12px; }
.ex-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-edit { display: grid; gap: 6px; }
.ex-edit input { font-weight: 600; }
.ex-actions { display: grid; gap: 8px; justify-items: end; }
.ex-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 720px) { .ex-row { grid-template-columns: 1fr; } .ex-thumb { width: 100%; } .ex-actions { justify-items: start; } }
/* Checkboxes and radio buttons with their label beside them (not stretched like text boxes). */
.check-row { justify-content: flex-start; text-align: left; font-weight: 500; }
.check-row input[type=checkbox], .check-row input[type=radio] { width: auto; min-width: 0; flex: none; margin: 3px 0 0; padding: 0; box-shadow: none; }
.ex-source .check-row { margin-top: 4px; }
.td-place { display: flex; gap: 8px; }
.td-place #td-where { flex: 0 0 auto; width: auto; }
.td-place #td-after { flex: 1 1 auto; min-width: 0; }
/* Plan cards: what every plan includes, above the button (which lines up at the bottom). */
.plan-card { display: flex; flex-direction: column; }
.plan-card .plan-action { margin-top: auto; padding-top: 6px; }
.plan-included { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; }
.plan-inc-title { font-weight: 700; font-size: 13px; margin: 0 0 6px; }
.plan-included ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.plan-included li { position: relative; padding-left: 18px; line-height: 1.35; }
.plan-included li::before { content: '✓'; position: absolute; left: 0; color: var(--ok, #1a8754); font-weight: 700; }
.res-photo-warning { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-size: 13px; font-weight: 500; }

/* Clone your voice */
.clone-dialog { max-width: 560px; }
.clone-dialog form { display: flex; flex-direction: column; gap: 10px; }
.cv-script summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.cv-script p { margin: 8px 0 0; padding: 10px 12px; background: var(--sunken); border-radius: 8px; font-size: 14px; line-height: 1.55; }
.cv-record { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#cv-rec.recording { background: var(--err); color: #fff; border-color: var(--err); }
.cv-takes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cv-takes li { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.cv-takes audio { height: 32px; max-width: 240px; }
.mine-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; vertical-align: middle; }
.plan-inc-toggle { font-weight: 600; font-size: 14px; }
.plan-inc-body { margin-top: 8px; }
/* 1080i/4K: photos SILVA upscales with AI (good to know, not a problem) */
.upscale-note { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; line-height: 1.45; }
.upscale-note .pi { color: var(--accent); font-weight: 700; }
.check-notes { margin-top: 8px; display: grid; gap: 4px; font-size: 13px; color: var(--ink); }
.check-notes p { margin: 0; }
.tile-problem.info { color: var(--accent); }

/* Photos being upscaled, decluttered or staged on fal.ai */
.edit-banner { position: sticky; top: calc(80px + env(safe-area-inset-top, 0px)); z-index: 4; display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--warn-soft); border: 1px solid var(--warn); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.edit-banner strong { display: block; font-size: 15px; }
.edit-banner p { margin: 2px 0 0; font-size: 13px; }
.edit-spin { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: edit-spin .8s linear infinite; }
@keyframes edit-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .edit-spin { animation: none; border-right-color: currentColor; opacity: .6; } }
.editing-badge { position: absolute; left: 6px; bottom: 6px; display: inline-flex; gap: 6px; align-items: center; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 600; }
.editing-badge .edit-spin { width: 10px; height: 10px; margin: 0; border-width: 2px; }

/* Admin › Service costs › Video models */
.models-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.model-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 10px; align-content: start; }
.model-group legend { font-weight: 700; padding: 0 6px; }
.model-opt { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-weight: 400; cursor: pointer; }
.model-opt input { margin-top: 3px; }
.model-opt .hint { font-size: 12.5px; }
.model-price { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-left: 4px; }
.tag-rec { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }

/* Step 2: one scene at a time */
.scene-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.scene-nav select { flex: 1 1 220px; min-width: 0; max-width: 420px; }
.scene-list > li[hidden] { display: none; }

/* Produce video: the bar at the top of the project, and the question after pre-production */
.produce-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 14px; padding: 14px 18px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent); }
.produce-bar strong { display: block; font-size: 16px; }
.produce-bar p { margin: 2px 0 0; font-size: 13.5px; }
.produce-bar.producing { background: var(--surface, #fff); border-color: var(--line); }
.produce-dialog { max-width: 520px; }
.pv-list { margin: 10px 0 16px; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
.tag-card.unknown { outline: 3px solid var(--warn); outline-offset: 2px; }
.unknown-note { margin: 6px 0 0; font-size: 12.5px; color: var(--warn); font-weight: 600; }
.pill.producing { background: var(--accent-soft); color: var(--accent); }
.pill.attention { background: var(--warn-soft); color: var(--warn); }
.card-status { margin: 6px 0 0; font-size: 13px; font-weight: 600; }
.card-status.bad { color: var(--warn); }

/* Identify and Alter Photos: each photo's Declutter, Stage and Brightness */
.alter { display: grid; gap: 6px; margin-top: 4px; }
.alter-box { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px 8px; margin: 0; min-width: 0; }
.alter-box.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.alter-box legend { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 4px; }
.alter-box select { width: 100%; }

/* Edit Scenes: each scene's parts in order (visual prompt, narration, photo order, sample, render) */
.scene-part { margin-top: 12px; }
.sample-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 8px 0; }
.sample-clip { margin: 0; }
.sample-clip video { width: 100%; border-radius: 6px; background: #000; display: block; }
.sample-clip figcaption { font-size: 12px; color: var(--muted); margin-top: 3px; }
.sample-clip.pending { display: grid; place-items: center; min-height: 100px; border: 1px dashed var(--line); border-radius: 6px; gap: 6px; padding: 10px; }
.stop-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stop-confirm .confirm-text { font-size: 13px; }
.check-row.more-info { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 14px; font-weight: 400; font-size: 14px; line-height: 1.4; cursor: pointer; }
.check-row.more-info input { margin-top: 3px; flex: none; }
.check-row.more-info .hint { display: block; font-size: 12.5px; }
.more-info-tag { color: var(--accent); font-weight: 600; }
/* Video options › Branding: optional opening title and end card */
.brand-row { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 10px; font-weight: 400; cursor: pointer; }
.brand-row input { margin-top: 4px; flex: none; }
.brand-row span { display: grid; gap: 2px; }
.brand-row small { color: var(--muted); font-size: 13px; line-height: 1.45; }
#choice-branding .optional { font-weight: 400; color: var(--muted); font-size: 13px; }

/* Start pre-production: confirm the configuration */
.confirm-dialog { max-width: 560px; }
.cf-body { display: grid; gap: 14px; margin: 12px 0 18px; }
.cf-body h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cf-body ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.cf-estimate { border: 1px solid var(--line, #dde3ea); border-radius: 10px; padding: 10px 14px; display: grid; gap: 4px; font-size: 14px; }
.cf-estimate.short { border-color: var(--warn, #c98a00); }
.cf-estimate .cf-row { display: flex; justify-content: space-between; gap: 12px; }
.cf-estimate .cf-row strong { font-variant-numeric: tabular-nums; }

/* Desktop app: connect to the SILVA server (connect.html) */
.connect-wrap { max-width: 620px; margin: 48px auto; padding: 0 16px; }
.connect-panel { display: grid; gap: 16px; }
.connect-panel h1 { margin: 0; font-size: 1.6rem; }
.connect-panel form { display: grid; gap: 14px; }
.connect-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.connect-local { border-top: 1px solid var(--line); padding-top: 14px; }
.connect-local summary { cursor: pointer; color: var(--muted); }
.connect-local[open] { display: grid; gap: 10px; }

/* Tagging flagged empty rooms: stage them automatically? */
.autostage-dialog { max-width: 620px; }
.autostage-dialog form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.autostage-dialog h2, .autostage-dialog p { margin: 0; }
.autostage-dialog .field { grid-column: auto; }
.autostage-dialog .pd-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
.as-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.as-photo { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.as-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.as-photo b { color: var(--text, inherit); font-weight: 600; }
.tag-flag.stage { background: #e7f1fb; color: #1d4f91; }
.tag-flag.declutter { background: #fdf1e3; color: #8a4b0f; }
.autostage-dialog { max-width: 680px; }
.autostage-dialog h3 { margin: 0 0 4px; font-size: 1rem; }
.as-section { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.as-section[hidden] { display: none; }
.as-photo { cursor: pointer; }
.as-photo input, .as-dc-head input { width: auto; min-width: 0; height: auto; display: inline-block; margin: 0 4px 0 0; vertical-align: -2px; }
.as-dc-list { display: flex; flex-direction: column; gap: 12px; }
.as-dc-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
.as-dc-item img { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.as-dc-body { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.as-dc-head { cursor: pointer; }
.as-dc-note { width: 100%; box-sizing: border-box; font: inherit; resize: vertical; }
.as-dc-note:disabled { opacity: .5; }
.autostage-dialog .error:empty { display: none; }
@media (max-width: 560px) { .as-dc-item { grid-template-columns: 80px minmax(0, 1fr); } .as-dc-item img { width: 80px; } }

/* Pre-production progress bar */
.ps-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ps-bar span { display: block; height: 100%; width: 0; background: var(--accent, #2f5fe0); border-radius: inherit; transition: width .4s ease; }

/* Pre-production progress bar at the top of the project */
.pre-progress { border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); padding: 14px 16px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.pre-progress[hidden] { display: none; }
.pp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pp-pct { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.pp-bar { height: 10px; }
.pp-text { margin: 0; font-size: 14px; color: var(--muted); }
.pre-progress.bad { border-color: var(--err); }
.pre-progress.bad .pp-pct { color: var(--err); }
.pre-progress.bad .ps-bar span { background: var(--err); }
.pp-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#pp-actions[hidden], .pp-confirm[hidden], .pp-text[hidden] { display: none; }
.pp-confirm { border: 1px solid var(--err); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.pp-confirm p { margin: 0; }

/* Branding: the MLS warning */
.brand-warning { margin: 6px 0 0; color: var(--err); font-size: var(--step--1, 14px); }
.brand-warning em { font-style: italic; }

/* "Check your video" after the listing is loaded */
.videocheck-dialog { max-width: 520px; }
.videocheck-dialog h2, .videocheck-dialog p { margin: 0 0 10px; }
.vc-list { margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 10px; }
.vc-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); }
.vc-row:first-child { border-top: 0; }
.vc-row dt { font-weight: 600; }
.vc-row dd { margin: 0; color: var(--muted); }
.videocheck-dialog .pd-actions { display: flex; justify-content: flex-end; }

/* After tagging: check the tags, then Continue Pre-production */
.tagreview-dialog { max-width: 520px; }
.tagreview-dialog h2, .tagreview-dialog p { margin: 0 0 10px; }
.tr-unknown { background: #fdf1e3; color: #8a4b0f; border-radius: 8px; padding: 8px 10px; }
.tagreview-dialog .pd-actions { display: flex; justify-content: flex-end; }
.tag-continue { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 18px; padding: 16px 18px; border: 1px solid var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.tag-continue[hidden] { display: none; }
.tag-continue p { margin: 0; }

/* Project card: how long the video took (Start pre-production to the finished video) */
.make-time { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.make-time b { color: var(--ink, inherit); font-weight: 600; }
.make-time.done b { color: #1f8a4c; }
.make-time-icon { margin-right: 2px; }

/* Project card progress: pre-production phase 1 and 2, then production. */
.card-progress { display: grid; gap: 4px; margin-top: 8px; }
.card-progress .card-bar { height: 6px; }
.card-progress .card-pct { font-size: 12px; color: var(--muted, #5f6368); }

/* Edit Scenes: each part of a scene is a collapsible section (▸), in the order Visual prompt (with the
   scene's direction under it), Narration, Audio, Photo order (culled photos beside it), Render. */
.scene-part-d { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 2px; }
.scene-part-d > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.scene-part-d > summary::-webkit-details-marker { display: none; }
.scene-part-d > summary::before { content: "▸"; color: var(--muted); font-size: 11px; transition: transform .15s; }
.scene-part-d[open] > summary::before { transform: rotate(90deg); }
.scene-part-d > .part-body { display: grid; gap: 8px; margin-top: 8px; }
.scene-part-d.narration { display: block; border-top: 1px dashed var(--line); }
.scene-part-d.narration textarea { font-size: var(--step-1, 1.15rem); line-height: 1.5; resize: vertical; min-height: 3.2em; width: 100%; }
.scene-direction { display: grid; gap: 4px; margin: 6px 0 2px; }
.order-grid { display: grid; gap: 14px; }
.order-grid.with-culled { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; }
.order-grid.with-culled > .shots { flex: 0 1 auto; }
.culled-col { flex: 0 0 260px; }
.culled-col { display: grid; gap: 6px; }
.culled-col .shot-role { color: var(--err, #b42318); }
.render-body { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.render-body .clips { display: flex; gap: 10px; flex-wrap: wrap; }
.render-body video { width: 370px; max-width: 100%; border-radius: 6px; background: #000; }

/* ---------- Contact popup (the desktop app on this computer) ---------- */
.contact-dialog { max-width: 560px; }
.contact-dialog h2 { margin: 0 0 6px; }
.contact-dialog form { display: flex; flex-direction: column; gap: 10px; }
.contact-dialog form > * { margin-top: 0; margin-bottom: 0; }
.contact-dialog .field { display: grid; gap: 4px; margin: 0; grid-column: auto; }
.contact-dialog .pd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-grid .field { margin-bottom: 10px; }
.contact-dialog input, .contact-dialog select, .contact-dialog textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: inherit; }
.contact-dialog textarea { resize: vertical; }
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .ct-grid { grid-template-columns: 1fr; } }
.ct-err { color: var(--bad, #c0392b); min-height: 0; }
.ct-err:empty { display: none; }
.ct-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ct-status { margin: 4px 0 10px; }
.ct-status:empty { display: none; }
.ct-status.bad { color: var(--bad, #c0392b); }
.ct-status.good { color: var(--good, #1e7d4f); font-weight: 600; }

/* A single-photo scene's camera move (Visual prompt) */
.camera-pick { display: grid; gap: 4px; margin: 4px 0 12px; max-width: 520px; }
.camera-pick select { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: inherit; max-width: 280px; }
.camera-pick .hint { margin: 0; }

/* Changing a finished video (abandon-dialog) */
.ab-warn { color: var(--bad, #c0392b); margin: 0 0 8px; }
#ab-status:empty { display: none; }

/* Captions option: a sample of how captions look (white, bold, thin dark outline) on a bright photo tone. */
.caption-sample { margin-top: 8px; padding: 18px 12px; border-radius: 10px; text-align: center; background: linear-gradient(135deg, #f4efe6, #dfe8f0 60%, #fdfcf8); }
.caption-sample span { font: 700 18px/1.3 "DejaVu Sans", "Verdana", system-ui, sans-serif; color: #fff; -webkit-text-stroke: 0; text-shadow: 0 0 1px #000, 0 0 1px #000, 1px 0 0 rgba(0,0,0,.75), -1px 0 0 rgba(0,0,0,.75), 0 1px 0 rgba(0,0,0,.75), 0 -1px 0 rgba(0,0,0,.75); }

.stage-report-box img.guide-preview { display: block; max-width: 100%; margin: 6px 0; border: 1px solid #d0d4da; border-radius: 8px; }
