/* ReelWrap web pages (D-089): one quiet, readable style. Tokens first, then the shell,
   the shared components, and the pages in the order of docs/design/ux-v1.md. */
:root {
  --ink: #172033; --muted: #667085; --faint: #98a2b3; --line: #e4e7ec; --bg: #f6f7fb; --card: #fff;
  --brand: #3b5bfd; --brand-ink: #2a45d8; --brand-weak: #eef1ff;
  --ok: #12804a; --ok-bg: #e7f6ee; --warn: #a15c07; --warn-bg: #fff4e0; --bad: #c4320a; --bad-bg: #fdeceb;
  --info: #2e5bdb; --info-bg: #edf2ff;
  --radius: 12px; --radius-s: 8px; --shadow: 0 1px 2px rgba(16, 24, 40, .05); --shadow-l: 0 12px 32px rgba(16, 24, 40, .14);
  font: 14.5px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }
h1 { font-size: 24px; line-height: 1.3; margin: 0 0 6px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 28px 0 12px; font-weight: 600; }
h3 { font-size: 15.5px; margin: 0; font-weight: 600; }
h4 { margin: 0 0 4px; font-size: 14.5px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
.error { color: var(--bad); }
.icon { flex: none; vertical-align: -3px; }
code { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: #f2f4f7; padding: 2px 6px; border-radius: 6px; word-break: break-all; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* --- shell ----------------------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 236px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; display: flex;
  flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; color: var(--ink); padding: 0 8px; }
.logo.big { font-size: 22px; color: #fff; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.org { color: var(--muted); font-size: 13px; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-s); color: #344054; font-weight: 500; }
.side nav a:hover { background: #f2f4f7; }
.side nav a.on { background: var(--brand-weak); color: var(--brand-ink); }
.me { position: relative; }
.me-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: var(--radius-s);
  font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.me-btn:hover { background: #f2f4f7; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-weak); color: var(--brand-ink); display: inline-grid;
  place-items: center; font-weight: 600; flex: none; }
.avatar.small { width: 24px; height: 24px; font-size: 12px; margin-right: 8px; }
.me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { position: absolute; bottom: 48px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-l); padding: 6px; z-index: 20; }
.menu a, .menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; background: none;
  font: inherit; color: var(--ink); border-radius: 6px; cursor: pointer; }
.menu a:hover, .menu button:hover { background: #f2f4f7; }
.content { flex: 1; min-width: 0; }
.assist-bar { background: var(--warn-bg); color: var(--warn); padding: 8px 24px; display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 36px 120px; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 80px; color: var(--muted); }

/* --- components ------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: var(--radius-s);
  border: 1px solid transparent; font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(59, 91, 253, .3); }
.btn.primary:hover { background: var(--brand-ink); color: #fff; }
.btn.secondary { background: #fff; color: #344054; border-color: #d0d5dd; box-shadow: var(--shadow); }
.btn.secondary:hover { background: #f9fafb; }
.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: #f2f4f7; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.icon-btn { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 6px; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover:not(:disabled) { background: #f2f4f7; color: var(--ink); }
.icon-btn.on { color: var(--brand); background: var(--brand-weak); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.link { border: 0; background: none; color: var(--brand); font: inherit; cursor: pointer; padding: 0 2px; }
.link:hover { color: var(--brand-ink); text-decoration: underline; }
.link.danger { color: var(--muted); font-size: 13px; }
.link.danger:hover, .link.asking { color: var(--bad); }
.ai-link { display: inline-flex; gap: 5px; align-items: center; margin-top: 8px; font-size: 13.5px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.family { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.family li { display: flex; flex-direction: column; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-head p { margin: 4px 0 0; }
.card.callout { border-color: #c7d3ff; background: linear-gradient(180deg, #f5f7ff, #fff); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 550;
  background: #f2f4f7; color: #475467; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.empty { text-align: center; padding: 64px 24px; background: #fff; border: 1px dashed #d0d5dd; border-radius: var(--radius); }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }
.empty p { max-width: 460px; margin: 6px auto 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-weight: 550; font-size: 13.5px; color: #344054; }
.field-hint { font-size: 12.5px; color: var(--muted); }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 9px 12px; border: 1px solid #d0d5dd; border-radius: var(--radius-s); font: inherit; color: var(--ink); background: #fff;
  box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #8098ff; box-shadow: 0 0 0 4px rgba(59, 91, 253, .12); }
textarea { resize: vertical; line-height: 1.55; }
input.big { font-size: 16px; padding: 11px 14px; }
input[type=color] { width: 56px; height: 38px; padding: 3px; border: 1px solid #d0d5dd; border-radius: var(--radius-s); background: #fff; cursor: pointer; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  display: inline-block; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; background: none; font: inherit; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--brand-ink); border-bottom-color: var(--brand); font-weight: 600; }
.tab-count { background: var(--bad); color: #fff; border-radius: 999px; font-size: 11.5px; padding: 0 7px; line-height: 18px; }
.steps { list-style: none; display: flex; gap: 0; padding: 0; margin: 18px 0 22px; counter-reset: s; }
.steps li { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--faint); font-weight: 550; position: relative; padding-right: 12px; }
.steps li::after { content: ""; flex: 1; height: 2px; background: var(--line); margin-left: 4px; }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ok); }
.steps li.done::after { background: #a6dfc0; }
.steps li.now { color: var(--brand-ink); }
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid currentColor; font-size: 13px; flex: none; background: #fff; }
.steps li.now .step-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.steps li.done .step-dot { background: var(--ok-bg); }
.overlay { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-l); width: min(520px, 100%); max-height: 90vh; overflow: auto; }
.modal.wide { width: min(720px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
.modal-body { padding: 16px 22px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { display: flex; gap: 8px; align-items: center; background: #101828; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-l); max-width: 560px; }
.toast.bad { background: #b42318; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.banner > .icon { margin-top: 3px; }
.banner > div { flex: 1; }
.banner details { margin-top: 6px; }
.banner.info { background: var(--info-bg); border-color: #c7d6ff; color: #1d3a8a; }
.banner.warn { background: var(--warn-bg); border-color: #f6d89c; color: #7a4306; }
.banner.bad { background: var(--bad-bg); border-color: #f7c1bb; color: #8c1d0b; }
.banner.ok { background: var(--ok-bg); border-color: #b3e3c8; color: #0d5c36; }
.working-card { display: flex; gap: 18px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 16px; }
.working-card h3 { font-size: 17px; margin-bottom: 6px; }
.pulse { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; animation: pulse 1.8s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }
.stage { display: flex; gap: 8px; align-items: center; color: var(--brand-ink); margin-bottom: 4px; }
.dropzone { border: 1.5px dashed #c3cad5; border-radius: var(--radius); padding: 18px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  background: #fbfcfe; color: var(--muted); flex-wrap: wrap; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-weak); }
.dropzone b { color: var(--ink); }
.file-list { list-style: none; padding: 0; margin: 4px 0 0; width: 100%; cursor: default; }
.file-list li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink); }
.file-list li .muted { margin-left: auto; }
.form .form-foot, .step-foot { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.step-foot { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.step-foot .muted { margin-right: auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.sticky-foot { position: sticky; bottom: 0; margin: 20px -36px -120px; padding: 14px 36px; background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line); display: flex; justify-content: flex-end; align-items: center; gap: 14px; backdrop-filter: blur(6px); z-index: 10; }
.sticky-foot > span { margin-right: auto; }
.card .sticky-foot { margin: 16px -22px -20px; padding: 12px 22px; border-radius: 0 0 var(--radius) var(--radius); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { border: 1px solid #d0d5dd; background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13.5px; cursor: pointer; color: #344054; }
.chip:hover { border-color: var(--brand); }
.chip.on { background: var(--brand-weak); border-color: var(--brand); color: var(--brand-ink); font-weight: 550; }
.chip-input { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.chip-input input { width: 84px; padding: 5px 10px; }
.ask-ai { display: flex; gap: 10px; align-items: flex-start; background: linear-gradient(180deg, #f5f7ff, #fafbff); border: 1px solid #d5ddff;
  border-radius: var(--radius); padding: 12px; }
.ask-ai > .icon { color: var(--brand); margin-top: 8px; }
.ask-ai textarea { border: 0; box-shadow: none; background: transparent; padding: 6px 4px; min-height: 40px; }
.ask-ai textarea:focus { box-shadow: none; }
.ask-ai.big textarea { font-size: 15.5px; }
.col-btns { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; cursor: pointer; }
.check input { margin-top: 4px; }
.check span { display: flex; flex-direction: column; }
.more { margin-top: 6px; }
.more > summary { margin-bottom: 12px; }
.table { width: 100%; border-collapse: collapse; }
.table td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table .right { text-align: right; white-space: nowrap; }
.inline-num { width: 90px !important; display: inline-block; padding: 4px 8px !important; margin: 0 6px; }

/* --- auth ------------------------------------------------------------------------------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-side { background: radial-gradient(120% 120% at 10% 10%, #4f6bff 0%, #2a3bb8 60%, #1b2575 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: flex-end; }
.auth-side h2 { font-size: 30px; line-height: 1.35; margin: 24px 0 12px; max-width: 520px; }
.auth-side p { opacity: .85; max-width: 480px; font-size: 15.5px; }
.auth-side .logo { margin-bottom: auto; padding: 0; }
.auth-side .logo-mark { background: #fff; color: var(--brand); }
.auth-main { display: grid; place-items: center; padding: 40px; position: relative; }
.auth-form { width: min(380px, 100%); }
.auth-form h1 { margin-bottom: 20px; }
.auth-form .btn { width: 100%; margin: 6px 0 14px; padding: 11px; }
.lang-switch { position: absolute; top: 20px; right: 24px; }

/* --- videos (home) --------------------------------------------------------------------- */
.group h2 { display: flex; gap: 8px; align-items: baseline; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.video-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; }
.video-card:hover { box-shadow: var(--shadow-l); transform: translateY(-1px); color: var(--ink); }
.video-card.needs { border-color: #b9c6ff; }
.cover { position: relative; aspect-ratio: 16 / 9; background: #eef0f4; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.a9x16 img, .cover.a1x1 img { object-fit: contain; }
.cover .pill { position: absolute; left: 10px; top: 10px; box-shadow: var(--shadow); }
.cover-blank { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); }
.video-meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.first-run { text-align: center; padding: 48px 24px; max-width: 860px; margin: 0 auto; }
.first-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.first-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; margin: 28px 0; text-align: left; }
.first-steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; position: relative; color: var(--brand); }
.first-steps li b { color: var(--ink); font-size: 15.5px; }
.first-num { position: absolute; right: 16px; top: 12px; font-size: 26px; font-weight: 700; color: #e4e9ff; }

/* --- library ----------------------------------------------------------------------------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.lib-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow); }
.lib-card:hover { box-shadow: var(--shadow-l); color: var(--ink); }
.lib-card > div:nth-child(2) { flex: 1; min-width: 0; }
.lib-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.col-side { display: flex; flex-direction: column; gap: 16px; }
.col-side .card + .card { margin-top: 0; }
.lead { font-size: 15.5px; line-height: 1.75; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-s); background: #fafbfc; padding: 12px; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; }
.stat:hover { border-color: #b9c6ff; }
.stat b { font-size: 22px; }
.stat span { color: var(--muted); font-size: 13px; }
.brand-mini { display: flex; gap: 14px; align-items: center; }
.logo-img { height: 44px; max-width: 120px; object-fit: contain; background: #f2f4f7; padding: 6px; border-radius: 8px; }
.swatches { display: flex; gap: 6px; margin-top: 6px; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .08); display: inline-block; }
.color-row { display: flex; gap: 20px; flex-wrap: wrap; }
.field.color { margin-bottom: 12px; }
.pick-grid, .pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pick { position: relative; border: 2px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.pick img, .pic-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f6f7f9; border-radius: 6px; }
.pick.on { border-color: var(--brand); }
.pick-check { position: absolute; top: 4px; right: 4px; background: var(--brand); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.pick select { padding: 4px 8px; font-size: 12.5px; }
.pic-grid figure { margin: 0; }
.pic-grid figcaption { display: flex; gap: 6px; align-items: center; justify-content: space-between; margin-top: 6px; min-height: 24px; }
.rec { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.rec:first-of-type { border-top: 0; padding-top: 0; }
.rec video { width: 100%; border-radius: 10px; background: #000; }
.moments { padding-left: 0; list-style: none; margin: 8px 0; font-size: 13.5px; }
.moments li { padding: 3px 0; display: flex; gap: 10px; }
.time { color: var(--brand); font-variant-numeric: tabular-nums; flex: none; font-size: 12.5px; padding-top: 1px; min-width: 34px; }
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.doc-list li:first-child { border-top: 0; }
.choice-list { display: flex; flex-direction: column; gap: 6px; }
.choice { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.question { padding: 14px 0; border-top: 1px solid var(--line); }
.question p { margin-bottom: 6px; }
.quote { border-left: 3px solid var(--line); padding-left: 10px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.option { border: 1px solid #d0d5dd; background: #fff; border-radius: var(--radius-s); padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.option.on { border-color: var(--brand); background: var(--brand-weak); color: var(--brand-ink); }
.excluded { list-style: none; padding: 0; margin: 0 0 14px; }
.excluded li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.excluded li:first-child { border-top: 0; }
.excluded li span { flex: 1; }
.excluded .icon { color: var(--faint); margin-top: 3px; }
.inline-add { display: flex; gap: 10px; }

/* --- new video ----------------------------------------------------------------------------- */
.wizard .card { margin-top: 18px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.type-card, .choice-card { border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius); padding: 14px 16px; text-align: left; font: inherit;
  cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.type-card:hover, .choice-card:hover { border-color: #a9b8ff; }
.type-card.on, .choice-card.on { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(59, 91, 253, .1); background: #fbfcff; }
.type-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; margin-bottom: 4px; }
.type-card b { font-size: 15px; }
.type-card .small { color: #475467; }
.type-foot { margin-top: auto; padding-top: 6px; }
.type-warn { color: var(--warn); display: flex; gap: 4px; align-items: center; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.choice-card { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.choice-card.frame { flex-direction: column; align-items: flex-start; }
.frame-shape { border: 2px solid currentColor; border-radius: 4px; color: var(--muted); display: block; margin-bottom: 4px; }
.choice-card.on .frame-shape { color: var(--brand); }
.frame-shapes { display: flex; gap: 6px; align-items: flex-end; }
.frame-pick { margin-top: 10px; }
.f16x9 { width: 38px; height: 22px; } .f9x16 { width: 16px; height: 28px; } .f1x1 { width: 24px; height: 24px; }

/* --- video ------------------------------------------------------------------------------------ */
.video-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ask-echo { display: flex; gap: 8px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 14px; color: #475467; margin-bottom: 16px; }
.ask-echo .icon { color: var(--brand); margin-top: 3px; }
.list-editor { display: flex; flex-direction: column; gap: 6px; }
.list-item { display: flex; gap: 6px; align-items: center; }
.list-item.add input { border-style: dashed; box-shadow: none; }
.directions { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.direction-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stills { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.stills img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.stills.a9x16 { grid-template-columns: repeat(4, 1fr); }
.stills.a9x16 img { aspect-ratio: 9 / 16; }
.stills.a1x1 img { aspect-ratio: 1; }
.direction-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.direction-title { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.direction-title h3 { font-size: 17px; }
.beats { margin: 0 0 6px; padding-left: 20px; font-size: 13.5px; }
.beats li { margin: 3px 0; }
.beats .muted { margin-right: 6px; }
.direction-body .btn { margin-top: auto; align-self: flex-start; }
.again { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; border-top: 1px solid var(--line); padding-top: 16px; }

/* storyboard */
.board-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.shortfall { background: #fffaf0; border: 1px solid #f6d89c; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.shortfall h3 { display: flex; gap: 8px; align-items: center; color: #7a4306; margin-bottom: 8px; }
.shortfall ul { margin: 0 0 10px; padding-left: 22px; }
.shortfall li { margin: 4px 0; }
.asks ol { padding-left: 22px; margin: 6px 0 12px; }
.asks li { margin: 6px 0; }
.asks .pill { margin-right: 8px; }
.shortfall .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.shots { display: flex; flex-direction: column; gap: 14px; }
.shot { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.shot.blocked { border-color: #f4a79c; box-shadow: 0 0 0 3px rgba(217, 45, 32, .06); }
.shot.removed { opacity: .55; }
.shot-pic { position: relative; }
.shot-pic img, .shot-pic .cover-blank { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #eef0f4; display: block; }
.shot.a9x16 { grid-template-columns: 180px minmax(0, 1fr); }
.shot.a9x16 .shot-pic img, .shot.a9x16 .shot-pic .cover-blank { aspect-ratio: 9 / 16; }
.shot.a1x1 { grid-template-columns: 240px minmax(0, 1fr); }
.shot.a1x1 .shot-pic img, .shot.a1x1 .shot-pic .cover-blank { aspect-ratio: 1; }
.shot-pic img.clip { object-fit: contain; }  /* the recording's own frame, not the film's */
.pic-toggle { display: flex; gap: 4px; margin-top: 6px; }
.pic-toggle button { border: 1px solid var(--line); background: #fff; border-radius: 6px; font: inherit; font-size: 12px; padding: 2px 8px; cursor: pointer; color: var(--muted); }
.pic-toggle button.on { border-color: var(--brand); color: var(--brand); }
.shot-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.shot-num { font-weight: 650; }
.shot-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.shot-field > span { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.shot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.translation { margin: -2px 0 8px; }
.translation p { margin: 4px 0 0; }
.shot-notes { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 6px; }
.shot-notes li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; }
.shot-notes li.block { background: var(--bad-bg); color: #8c1d0b; }
.shot-notes li.warn { background: var(--warn-bg); color: #7a4306; }
.shot-notes .icon { margin-top: 3px; }
.shot-notes .quote { border: 0; padding: 0; margin-left: 4px; }
.shot-ask { margin-top: 8px; }
.shot-ask .chips { margin-bottom: 6px; }
.whole-ask { margin-top: 16px; }

/* film */
.film-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.film-tabs { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.film-tabs select { width: auto; }
.player { width: 100%; background: #000; border-radius: var(--radius); display: block; max-height: 70vh; }
.player.a9x16 { max-width: 380px; margin: 0 auto; }
.player.a1x1 { max-width: 560px; margin: 0 auto; }
.film-main > p { margin: 8px 0 14px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.comment-list li { display: flex; gap: 8px; align-items: flex-start; }
.time-tag { border: 0; background: var(--brand-weak); color: var(--brand-ink); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
textarea.general { margin-top: 12px; }
.film-side { display: flex; flex-direction: column; gap: 16px; }
.film-side .card + .card { margin-top: 0; }
.transcript ol { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow: auto; }
.transcript li { display: flex; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.transcript li:hover { background: #f5f6f8; }
.transcript li.on { background: var(--brand-weak); }
.downloads, .versions { list-style: none; padding: 0; margin: 0; }
.downloads li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.downloads li:first-child { border-top: 0; }
.downloads li .muted { flex-basis: 100%; padding-left: 24px; }
.versions li { padding: 6px 0; }
.versions li.on .link { font-weight: 650; }

/* team, platform */
.copy-link { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.invite-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.invite-row:first-child { border-top: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fafbfc; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; display: flex; flex-direction: column; }
.kpi b { font-size: 22px; }
.kpi span { color: var(--muted); font-size: 12.5px; }

/* --- guidance (D-097) ----------------------------------------------------------------------- */
.side nav.nav-foot { margin-bottom: 8px; }
.banner-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.how-it-works { margin: 28px auto 0; max-width: 560px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; text-align: left; }
.how-it-works p { margin: 0; display: flex; gap: 8px; align-items: flex-start; }
.how-it-works p + p { display: block; margin-top: 6px; padding-left: 24px; }
.how-it-works .icon { margin-top: 3px; flex: none; color: var(--brand-ink); }
.help-list { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.6; }
.faq { border-top: 1px solid var(--line); padding: 10px 0; }
.faq:first-of-type { border-top: none; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { margin: 8px 0 0; color: #344054; line-height: 1.6; }
.help-ask textarea { width: 100%; }
.letter { margin-top: 10px; border: 1px dashed var(--line); border-radius: var(--radius-s); padding: 10px 12px; background: #fafbfc; }
.letter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.letter pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 13px; line-height: 1.6; color: #344054; }
.join-what { margin: 0 0 16px; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.mail-note { margin: 4px 0 0 26px; }
.phone-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.phone-form .field { margin: 0; min-width: 220px; }
.phone-form > p { flex-basis: 100%; margin: 0; }
.note-input { width: 160px !important; padding: 4px 8px !important; margin-right: 6px; font-size: 13px; }
.help-text { max-width: 420px; white-space: pre-wrap; }

/* --- review and delivery links (D-100) ------------------------------------------------------ */
.share-make { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.share-make .check { margin: 0; }
.share-row { border-top: 1px solid var(--line); padding: 10px 0; }
.share-row.ended { opacity: .55; }
.share-row .copy-link { display: flex; gap: 8px; align-items: center; min-width: 0; }
.share-row .copy-link code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row .copy-link button { flex: none; white-space: nowrap; }
.share-actions { display: flex; gap: 12px; margin-top: 4px; }
.reviewer-notes { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; margin-bottom: 14px; background: #fafbfc; }
.reviewer-notes h4 { margin: 0 0 6px; }
.reviewer-notes ul, .shared-list { list-style: none; margin: 0; padding: 0; }
.reviewer-notes li, .shared-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.reviewer-notes li:first-child, .shared-list li:first-child { border-top: none; }
.reviewer-notes p, .shared-list p { margin: 4px 0; }
.shared { min-height: 100vh; background: var(--bg, #f5f6f8); }
.shared-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.shared-head .logo { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.shared-main { max-width: 1240px; margin: 0 auto; padding: 24px 28px 60px; }
.shared-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.shared-title h1 { margin: 0; }
.player-wrap { position: relative; }
.draft-mark { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 4px; pointer-events: none; }
.shared-notes textarea { width: 100%; margin-top: 8px; }
.shared-notes .field { margin-bottom: 10px; max-width: 260px; }
.shared-others { margin-top: 28px; }
.shared-other h3 { margin: 16px 0 8px; }
.shared-gone { text-align: center; padding: 80px 20px; color: var(--muted); }
.shared-gone h1 { color: var(--ink); }
.shared-foot { margin-top: 36px; text-align: center; }

/* --- narrow screens ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 14px; gap: 10px; overflow-x: auto; }
  .org, .side .grow { display: none; }
  .side nav { flex-direction: row; }
  .me { margin-left: auto; }
  .me-name { display: none; }
  .menu { bottom: auto; top: 44px; left: auto; right: 0; width: 200px; }
  .page { padding: 20px 16px 120px; }
  .sticky-foot { margin: 20px -16px -120px; padding: 12px 16px; }
  .two-col, .film-grid, .shot, .rec, .row2, .row4, .again, .auth, .first-steps { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .stats, .kpis { grid-template-columns: repeat(2, 1fr); }
  .shot-row { grid-template-columns: 1fr; }
  .shot.a9x16, .shot.a1x1 { grid-template-columns: 1fr; }
  .shot.a9x16 .shot-pic { max-width: 220px; }
}
