:root {
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  color: #14244a;
  background: #fbfafc;
  --ink: #14244a;
  --surface: #ffffff;
  --line: #dfe3ec;
  --muted: #66718a;
  --accent: #ec1765;
  --accent-deep: #b80d49;
  --teal: #078b91;
  --yellow: #ffb000;
  --danger: #b4233a;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #fbfafc; }
.skip-link { position: absolute; left: 14px; top: -48px; z-index: 60; padding: 10px 14px; border-radius: 7px; color: #fff; background: var(--ink); font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.shell { max-width: 1180px; margin: 0 auto; padding: 34px 22px 118px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; min-height: 58px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 700; color: var(--ink); }
.brand img { display: block; width: min(310px, 52vw); height: 58px; object-fit: contain; object-position: left center; }
.brand small { display: block; color: var(--muted); font: 500 12px/1.4 Inter, "Segoe UI", sans-serif; margin-top: 4px; }
.actions, .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn, .dock-button { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 13px; color: var(--ink); background: var(--surface); font-weight: 700; text-decoration: none; }
.btn:hover, .dock-button:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn.primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.btn.primary:hover { background: var(--accent-deep); }
.btn.danger { color: var(--danger); }
.btn:focus-visible, .dock-button:focus-visible, .tab:focus-visible, .input:focus-visible, .command-project > summary:focus-visible { outline: 3px solid rgba(7,139,145,.36); outline-offset: 2px; }
.hero, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; box-shadow: 0 10px 30px rgba(20,36,74,.06); }
.hero { margin-bottom: 15px; border-top: 4px solid var(--accent); }
.eyebrow { color: var(--accent-deep); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.title { max-width: 760px; font-family: Georgia, "Times New Roman", serif; font-size: 34px; line-height: 1.08; margin: 9px 0; color: var(--ink); }
.muted { color: var(--muted); font-size: 13px; line-height: 1.55; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 15px 0; border-bottom: 1px solid var(--line); }
.tab { min-height: 40px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 8px 13px; font-weight: 750; }
.tab.on { color: var(--accent-deep); border-color: var(--accent); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field label { font-size: 11px; color: var(--muted); font-weight: 700; }
.input { width: 100%; color: var(--ink); background: #fff; border: 1px solid #cfd5e1; border-radius: 7px; padding: 10px; outline: none; }
.input:focus { border-color: var(--teal); }
textarea.input { min-height: 110px; resize: vertical; }
.section { font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.chapter { padding: 14px 0; border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; }
.chapter h3 { margin: 0 0 5px; font-size: 15px; }
.row .input { flex: 1; min-width: 160px; }
.draft { white-space: pre-wrap; line-height: 1.65; color: var(--ink); background: #f7f8fb; border: 1px solid var(--line); border-radius: 7px; padding: 13px; margin-top: 10px; }
.stat { display: inline-block; border-left: 3px solid var(--yellow); padding: 5px 9px; color: var(--muted); font-size: 11px; margin: 3px 3px 3px 0; }
.project-status { display: flex; flex-wrap: wrap; gap: 3px; }
.project-next-action { display: grid; gap: 4px; max-width: 760px; margin-top: 12px; padding: 11px 13px; border-left: 4px solid var(--teal); border-radius: 6px; background: #effbf7; color: var(--ink); }
.project-next-action-label { color: #075b4b; font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.project-next-action strong { font-size: 14px; line-height: 1.45; }
.notice { color: #7c4b00; background: #fff7dc; border: 1px solid #f5d47f; border-radius: 7px; padding: 10px; font-size: 12px; margin-top: 10px; }
.empty { color: var(--muted); padding: 18px 0; font-size: 13px; }
.creative-avatar-panel { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-height: 120px; background: #f7f8fb; }
.creative-avatar-video { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 7px; }
.creative-avatar-status { margin-top: 8px; color: var(--muted); font-size: 12px; }
.creative-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.shot { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.shot img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.shot .ov { display: flex; gap: 8px; padding: 9px; }
.production-meter { height: 8px; margin: 14px 0 10px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
.production-meter-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--teal)); }
.production-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.production-step { display: flex; gap: 7px; align-items: center; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.production-step.complete { color: #075b4b; border-color: #94d8c9; background: #effbf7; }
.production-shot { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; }
.production-shot-head { justify-content: space-between; margin-bottom: 10px; }
.production-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.production-fields .full { grid-column: 1 / -1; }
.production-fields textarea.input { min-height: 72px; }
.production-new-shot { border-style: dashed; }
.creative-start-card { border-top: 4px solid var(--teal); margin-bottom: 14px; }
.creative-start-card .eyebrow { color: #006c72; }
.creative-scene-card { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.creative-compass { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.creative-route-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.creative-route { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; font-size: 12px; line-height: 1.45; }
.creative-route.selected { border-color: var(--teal); background: #effbf7; }
.creative-route-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.creative-route h3 { margin: 0; font-size: 14px; }
.creative-route .btn { align-self: flex-start; margin-top: auto; }
.canon-card { border-top: 4px solid var(--teal); }
.creative-reference-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.reference-row h3 { margin: 0; font-size: 14px; }
.capability-card { border-top: 4px solid var(--accent); }
.capability-status-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.capability-status-summary span { padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); font-size: 11px; line-height: 1.25; }
.capability-status-summary b { display: block; color: var(--accent-deep); font-size: 18px; line-height: 1; margin-bottom: 3px; }
.capability-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.capability-metrics > div { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; }
.capability-metrics strong { display: block; font: 700 24px/1 Georgia, "Times New Roman", serif; color: var(--accent-deep); }
.capability-metrics span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.capability-list { display: grid; gap: 8px; }
.capability-row { padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; line-height: 1.5; }
.capability-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.capability-row h3 { margin: 0; font-size: 15px; }
.capability-gates { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.release-gate-list { display: grid; gap: 8px; margin-top: 10px; }
.release-gate { padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; font-size: 12px; line-height: 1.45; }
.capability-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #f7f8fb; font-size: 11px; font-weight: 800; white-space: nowrap; }
.capability-badge.done { color: #075b4b; border-color: #94d8c9; background: #effbf7; }
.capability-badge.beta { color: #7c4b00; border-color: #f5d47f; background: #fff7dc; }
.capability-badge.planned { color: var(--muted); border-style: dashed; }
.capability-badge.human { color: var(--accent-deep); border-color: #efabc5; background: #fff1f7; }
.capability-next { line-height: 1.5; }
.command-dock { position: fixed; z-index: 20; left: 50%; bottom: 16px; width: min(1120px, calc(100vw - 28px)); transform: translateX(-50%); display: flex; justify-content: space-between; gap: 10px; padding: 9px; border: 1px solid #cfd5e1; border-radius: 8px; background: rgba(255,255,255,.97); box-shadow: 0 16px 42px rgba(20,36,74,.18); }
.command-dock-heading, .tabs-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.command-dock-heading { align-self: center; white-space: nowrap; }
.tabs-label { margin-top: 15px; }
.command-group { display: flex; gap: 5px; min-width: 0; }
.command-main { overflow-x: auto; scrollbar-width: thin; }
.dock-button { white-space: nowrap; }
.command-group:first-child .dock-button:first-child { color: #fff; border-color: var(--accent); background: var(--accent); }
.command-project { position: relative; flex: 0 0 auto; }
.command-project > summary { display: block; list-style: none; user-select: none; }
.command-project > summary::-webkit-details-marker { display: none; }
.command-project > summary::after { content: ' ▴'; font-size: 10px; color: var(--muted); }
.command-project[open] > summary { border-color: var(--accent); color: var(--accent-deep); }
.command-menu { position: absolute; right: 0; bottom: calc(100% + 10px); width: min(280px, calc(100vw - 28px)); display: grid; gap: 6px; padding: 10px; border: 1px solid #cfd5e1; border-radius: 8px; background: #fff; box-shadow: 0 16px 42px rgba(20,36,74,.2); }
.command-menu .dock-button { width: 100%; text-align: left; }
.conflict-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 70px rgba(20,36,74,.28); }
.conflict-dialog::backdrop { background: rgba(20,36,74,.58); backdrop-filter: blur(3px); }
.conflict-card { padding: 24px; background: var(--surface); }
.conflict-card h2 { margin: 7px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; }
.conflict-card p { margin: 0 0 8px; line-height: 1.55; }
.conflict-actions { justify-content: flex-end; margin-top: 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) { .command-dock { justify-content: flex-start; } .command-main { flex: 1 1 auto; } }
@media (max-width: 760px) { .shell { padding: 20px 14px 122px; } .grid { grid-template-columns: 1fr; } .top { align-items: flex-start; flex-direction: column; } .brand img { width: min(300px, 86vw); height: 52px; } .title { font-size: 28px; } .hero, .card { padding: 16px; } }
@media (max-width: 700px) { .production-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); } .production-fields { grid-template-columns: 1fr; } .production-fields .full { grid-column: auto; } .creative-route-list { grid-template-columns: 1fr; } .capability-metrics, .capability-status-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .shell { padding-bottom: 24px; }
  .command-dock { position: sticky; top: 8px; bottom: auto; left: auto; transform: none; margin: 0 auto 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 7px; }
  .command-dock-heading { grid-column: 1 / -1; }
  .command-main { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); overflow: visible; width: 100%; }
  .command-main .dock-button { min-width: 0; padding-inline: 7px; text-align: center; }
  .command-project { align-self: stretch; display: flex; }
  .command-project > summary { display: grid; place-items: center; }
}
@media (max-width: 520px) {
  .conflict-actions { align-items: stretch; flex-direction: column; }
  .conflict-actions .btn { width: 100%; }
  .row > .btn, .row > .input { flex: 1 1 100%; }
}
@media (max-width: 360px) {
  .shell { padding-inline: 10px; }
  .command-dock { width: calc(100vw - 12px); padding: 6px; }
  .dock-button { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (forced-colors: active) {
  .btn.primary, .command-group:first-child .dock-button:first-child { border: 2px solid ButtonText; }
  .notice, .stat { border-color: CanvasText; }
}

/* Sign-in gate (standalone studio) */
.gate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(20, 36, 74, .55); backdrop-filter: blur(4px); }
.gate[hidden] { display: none; }
.gate-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px 22px; text-align: center; box-shadow: 0 24px 60px rgba(20, 36, 74, .25); }
.gate-logo { width: 220px; height: 44px; object-fit: contain; }
.gate-card h1 { font-family: Georgia, "Times New Roman", serif; font-size: 30px; margin: 14px 0 6px; }
.gate-card p { color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.gate-google { display: flex; justify-content: center; min-height: 44px; }
.gate-note { font-size: 12px; margin-top: 12px; }
