:root {
  --ink: #17201b;
  --muted: #6c756f;
  --line: #e4e8e4;
  --paper: #ffffff;
  --canvas: #f5f7f4;
  --green: #16774a;
  --green-dark: #0e5c38;
  --green-soft: #e8f4ed;
  --amber: #b76b08;
  --amber-soft: #fff2d8;
  --red: #b33b31;
  --red-soft: #fcebea;
  --blue: #356f9f;
  --blue-soft: #eaf3f9;
  --shadow: 0 18px 60px rgba(26, 44, 34, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.site-header { height: 72px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: white; font-weight: 800; font-size: 18px; box-shadow: 0 7px 16px rgba(23,32,27,.18); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 17px; letter-spacing: .08em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.top-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: #4f5953; }
.top-nav a:hover, .text-button:hover { color: var(--green); }
.top-nav form { margin: 0; }
.text-button { border: 0; padding: 0; background: none; color: inherit; cursor: pointer; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 90px; }
.page-heading { margin-bottom: 34px; }
.page-heading h1, .project-hero h1 { margin: 7px 0 8px; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -.04em; }
.page-heading p, .project-hero p { margin: 0; max-width: 720px; color: var(--muted); line-height: 1.7; }
.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.dashboard-actions { display: flex; gap: 9px; }
.narrow-heading { max-width: 760px; margin-inline: auto; }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.back-link { display: inline-block; margin-bottom: 27px; color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--green); }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 12px; padding: 0 19px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--green); color: white; box-shadow: 0 8px 22px rgba(22,119,74,.18); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { background: white; border-color: #ccd5ce; color: var(--ink); }
.button.secondary:hover { border-color: var(--green); color: var(--green); }
.button.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.button.danger { background: var(--red-soft); border-color: #efc4c0; color: var(--red); }
.button.danger:hover { background: var(--red); color: white; }
.button.wide { width: 100%; }

.toast-stack { position: fixed; right: 22px; top: 86px; display: grid; gap: 8px; z-index: 100; }
.toast { min-width: 260px; max-width: 420px; padding: 13px 16px; background: #18221c; color: white; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; animation: toast-in .25s ease; }
.toast.error { background: #8c2e28; }
.toast.success { background: var(--green-dark); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } }

.auth-shell { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 42px 20px 80px; background: radial-gradient(circle at 15% 15%, #e4f2e8 0, transparent 32%), radial-gradient(circle at 85% 80%, #f7ead2 0, transparent 27%), var(--canvas); }
.auth-card { width: min(880px, 100%); padding: clamp(28px, 5vw, 54px); background: rgba(255,255,255,.96); border: 1px solid white; border-radius: 25px; box-shadow: var(--shadow); }
.auth-card.compact { width: min(450px, 100%); }
.auth-card h1 { margin: 7px 0 9px; font-size: clamp(29px, 5vw, 42px); letter-spacing: -.035em; }
.lead { color: var(--muted); margin: 0 0 28px; line-height: 1.65; }
.people-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
fieldset { margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 16px; }
legend { padding: 0 8px; font-size: 16px; font-weight: 800; }
legend small { margin-left: 7px; color: var(--muted); font-weight: 500; }
.role-dot { width: 9px; height: 9px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--green); }
.role-dot.reviewer { background: var(--amber); }
.stack-form { display: grid; gap: 18px; }
.stack-form label, .project-form label, .upload-candidates label { display: grid; gap: 8px; color: #3e4942; font-size: 13px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid #d7ddd8; border-radius: 11px; padding: 12px 13px; background: white; color: var(--ink); outline: 0; transition: .18s; }
textarea { resize: vertical; line-height: 1.65; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,119,74,.1); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px; }
.project-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 7px 30px rgba(20,36,26,.035); transition: .2s; }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d4ddd6; }
.project-card-main { display: block; padding: 25px 25px 18px; }
.project-topline { display: flex; align-items: center; justify-content: space-between; }
.project-code { color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.status { padding: 5px 9px; border-radius: 999px; background: #eff1ef; color: #687169; font-size: 11px; font-weight: 800; }
.status-in_review { background: var(--blue-soft); color: var(--blue); }
.status-awaiting_confirmation { background: var(--amber-soft); color: var(--amber); }
.status-locked { background: var(--green-soft); color: var(--green); }
.project-card h2 { margin: 17px 0 8px; font-size: 23px; letter-spacing: -.02em; }
.project-card p { height: 47px; overflow: hidden; margin: 0 0 21px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.progress-line { height: 6px; overflow: hidden; background: #edf0ed; border-radius: 99px; }
.progress-line span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.project-stats { display: flex; align-items: baseline; gap: 7px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.project-stats strong { color: var(--ink); font-size: 16px; }
.project-stats em { margin-left: auto; color: var(--red); font-style: normal; font-weight: 700; }
.continue-link { padding: 14px 25px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--green); font-size: 13px; font-weight: 800; }
.continue-link:hover { background: var(--green-soft); }
.empty-state { padding: 80px 20px; text-align: center; border: 1px dashed #ccd4ce; border-radius: 20px; background: rgba(255,255,255,.55); }
.empty-state h2 { margin: 24px 0 8px; }
.empty-state p { margin: 0 auto 23px; color: var(--muted); }
.empty-illustration { display: flex; justify-content: center; align-items: end; gap: 8px; height: 72px; }
.empty-illustration span { width: 48px; height: 64px; border-radius: 7px; background: #dcebe1; border: 2px solid white; box-shadow: 0 7px 20px rgba(28,67,42,.09); transform: rotate(-8deg); }
.empty-illustration span:nth-child(2) { height: 72px; background: #f0dfbd; transform: none; }
.empty-illustration span:nth-child(3) { transform: rotate(8deg); }

.editor-card { max-width: 900px; margin: 0 auto; padding: clamp(25px, 5vw, 46px); background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 40px rgba(30,45,35,.04); }
.editor-card section + section { margin-top: 42px; padding-top: 36px; border-top: 1px solid var(--line); }
.editor-card h2 { margin: 0 0 21px; font-size: 19px; }
.editor-card h2 > span { margin-right: 8px; color: var(--green); font-size: 11px; letter-spacing: .12em; }
.editor-card h2 small { color: var(--muted); font-size: 12px; font-weight: 500; }
.form-grid { display: grid; gap: 17px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.project-form > section > label { margin-top: 17px; }
.drop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.file-drop { position: relative; min-height: 120px; place-content: center; text-align: center; border: 1px dashed #bfcac2; border-radius: 14px; cursor: pointer; background: #fafbfa; }
.file-drop:hover { border-color: var(--green); background: var(--green-soft); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop strong { font-size: 15px; color: var(--ink); }
.file-drop span { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.help-details { margin-top: 15px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.help-details summary { color: var(--green); cursor: pointer; font-weight: 700; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 35px; padding-top: 26px; border-top: 1px solid var(--line); }
.narrow-card { max-width: 560px; }

.project-hero { margin-bottom: 34px; }
.project-hero-row { display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.project-kicker { color: var(--muted); font-size: 13px; font-weight: 700; }
.project-kicker span { margin-right: 9px; color: var(--green); letter-spacing: .14em; }
.hero-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 22px; }
.shot-list-panel, .context-card, .owner-card, .add-shot-card { background: white; border: 1px solid var(--line); border-radius: 16px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; padding: 23px 24px 17px; }
.section-heading h2 { margin: 0 0 3px; font-size: 19px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.legend { color: var(--muted); font-size: 11px; }
.dot { width: 7px; height: 7px; margin: 0 4px 0 10px; display: inline-block; border-radius: 50%; background: #ccd2ce; }
.dot.done { background: var(--green); }.dot.redo { background: var(--red); }
.shot-row { min-height: 76px; padding: 12px 20px; display: grid; grid-template-columns: 9px 55px minmax(0, 1fr) 48px 12px; align-items: center; gap: 12px; border-top: 1px solid var(--line); transition: .15s; }
.shot-row:hover { background: #f8faf8; }
.shot-state { width: 8px; height: 8px; border-radius: 50%; background: #c8cec9; }
.shot-state.selected { background: var(--green); }.shot-state.redo { background: var(--red); }.shot-state.skipped { background: var(--amber); }
.shot-number { color: var(--green); font-size: 12px; font-weight: 800; }
.shot-copy { min-width: 0; display: grid; gap: 5px; }
.shot-copy strong, .shot-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-copy strong { font-size: 14px; }.shot-copy small { color: var(--muted); font-size: 12px; }.shot-copy small b { color: var(--green); font-weight: 800; }
.shot-count { color: var(--muted); font-size: 11px; }.chevron { color: #98a19b; font-size: 22px; }
.project-sidebar { display: grid; gap: 14px; position: sticky; top: 92px; }
.context-card { overflow: hidden; }
.context-card summary { padding: 17px 18px; cursor: pointer; font-size: 13px; font-weight: 800; }
.context-card[open] summary { border-bottom: 1px solid var(--line); }
.long-copy { padding: 17px 18px; max-height: 310px; overflow: auto; color: #505a54; font-size: 13px; line-height: 1.85; white-space: pre-wrap; }
.reader-link { display: block; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--green); font-size: 12px; font-weight: 800; }
.owner-card { padding: 18px; }
.owner-card h3 { margin: 0 0 8px; font-size: 15px; }.owner-card p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.inline-empty { padding: 50px 20px; display: grid; place-items: center; gap: 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }.inline-empty strong { color: var(--ink); font-size: 16px; }.inline-empty.large { min-height: 360px; border: 1px dashed var(--line); border-radius: 15px; }
.add-shot-card { max-width: 830px; margin-top: 24px; padding: 0 24px; }
.add-shot-card > summary { padding: 19px 0; color: var(--green); cursor: pointer; font-weight: 800; }
.add-shot-card[open] > summary { border-bottom: 1px solid var(--line); }
.add-shot-card form { padding: 24px 0; }
.danger-zone { max-width: 830px; margin-top: 14px; border: 1px solid #edd0cd; border-radius: 14px; background: #fffafa; }
.danger-zone > summary { padding: 16px 20px; color: #8f5751; cursor: pointer; font-size: 12px; font-weight: 800; }.danger-zone-body { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #f1d9d7; }.danger-zone-body strong { font-size: 14px; }.danger-zone-body p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }.danger-zone-body form { flex: 0 0 auto; }
.trash-list { display: grid; gap: 14px; }.trash-card { padding: 23px 25px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border: 1px solid var(--line); border-radius: 16px; background: white; }.trash-main > span { color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: .12em; }.trash-main h2 { margin: 5px 0 7px; font-size: 20px; }.trash-main p { margin: 0 0 7px; color: var(--muted); font-size: 12px; }.trash-main small { color: #929a95; font-size: 10px; }.trash-actions { display: flex; align-items: center; gap: 10px; }.destroy-details { position: relative; }.destroy-details > summary { padding: 12px 15px; color: var(--red); cursor: pointer; font-size: 12px; font-weight: 800; list-style: none; }.destroy-details[open] form { width: 290px; padding: 17px; position: absolute; right: 0; top: 46px; z-index: 10; border: 1px solid #edcecb; border-radius: 13px; background: white; box-shadow: var(--shadow); }.destroy-details label { display: grid; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 800; }.destroy-details p { color: var(--red); font-size: 10px; line-height: 1.5; }

/* review workspace */
.review-shell { width: 100%; padding: 0 0 78px; }
.review-topbar { height: 65px; padding: 0 24px; display: grid; grid-template-columns: 1fr minmax(260px, 420px) 1fr; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); background: white; position: sticky; top: 72px; z-index: 25; }
.review-topbar .back-link { margin: 0; }
.review-progress { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; color: var(--muted); font-size: 11px; }
.review-progress strong { color: var(--green); font-weight: 800; }
.save-state { justify-self: end; color: var(--muted); font-size: 12px; }
.save-state span { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: var(--green); }
.save-state.saving span { background: var(--amber); animation: pulse .8s infinite alternate; }.save-state.error { color: var(--red); }.save-state.error span { background: var(--red); }
@keyframes pulse { to { opacity: .3; } }
.review-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; min-height: calc(100vh - 209px); }
.story-panel, .decision-panel { padding: 28px 23px; background: white; }
.story-panel { border-right: 1px solid var(--line); }
.decision-panel { border-left: 1px solid var(--line); }
.shot-label { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.story-panel h1 { margin: 7px 0 25px; font-size: 25px; letter-spacing: -.03em; }
.story-block { margin: 0 0 12px; padding: 15px; border-radius: 12px; background: #f6f8f6; }
.story-block.accent { background: var(--green-soft); }.story-block.quote { background: #f4f1eb; }
.story-block > span, .continuity-card > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.story-block h3 { margin: 0 0 6px; font-size: 14px; }.story-block p { margin: 0; color: #455048; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.continuity-card { margin: 21px 0 14px; padding-top: 19px; border-top: 1px solid var(--line); }
.continuity-card img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; }
.continuity-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.script-details { border-top: 1px solid var(--line); }.script-details summary { padding: 15px 0; cursor: pointer; color: var(--green); font-size: 12px; font-weight: 700; }.script-details .long-copy { max-height: 260px; padding: 0 0 15px; }
.script-reader-button { margin: 15px 0; padding: 11px 13px; display: block; border: 1px solid #cfe0d4; border-radius: 10px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 800; text-align: center; }
.candidate-panel { padding: 28px; background: #f3f5f3; min-width: 0; }
.candidate-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 19px; }.candidate-heading h2, .decision-heading h2 { margin: 5px 0 0; font-size: 20px; }.candidate-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.candidate-card { overflow: hidden; border: 2px solid transparent; border-radius: 14px; background: white; box-shadow: 0 5px 22px rgba(23,32,27,.05); transition: .18s; }
.candidate-card:hover { transform: translateY(-2px); box-shadow: 0 11px 27px rgba(23,32,27,.1); }
.candidate-card.is-primary { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,119,74,.1); }.candidate-card.is-backup { border-color: var(--blue); }
.image-button { position: relative; width: 100%; display: block; padding: 0; border: 0; background: #e8ebe8; cursor: pointer; }
.image-button img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.choice-badge { position: absolute; top: 10px; left: 10px; display: none; padding: 5px 9px; border-radius: 999px; color: white; font-size: 10px; font-weight: 800; box-shadow: 0 4px 12px rgba(0,0,0,.16); }
.primary-badge { background: var(--green); }.backup-badge { background: var(--blue); }
.is-primary .primary-badge, .is-backup .backup-badge { display: block; }.is-primary.is-backup .backup-badge { left: auto; right: 10px; }
.candidate-actions { min-height: 43px; padding: 0 11px; display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--line); }
.candidate-actions span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.candidate-actions button { padding: 5px 7px; border: 0; border-radius: 6px; background: #f2f4f2; color: #58625b; cursor: pointer; font-size: 10px; font-weight: 700; }.candidate-actions button:hover { background: var(--green-soft); color: var(--green); }
.decision-heading { margin-bottom: 17px; }
.decision-buttons { display: grid; gap: 8px; }
.decision-button { padding: 13px; display: grid; grid-template-columns: 32px 1fr; text-align: left; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); cursor: pointer; }
.decision-button > span { grid-row: span 2; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #edf0ed; }
.decision-button strong { font-size: 13px; }.decision-button small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.decision-button:hover { background: #fafbfa; }.decision-button.selected.active { border-color: var(--green); background: var(--green-soft); }.decision-button.selected.active > span { background: var(--green); color: white; }
.decision-button.redo.active { border-color: var(--red); background: var(--red-soft); }.decision-button.redo.active > span { background: var(--red); color: white; }
.decision-button.skipped.active { border-color: var(--amber); background: var(--amber-soft); }.decision-button.skipped.active > span { background: var(--amber); color: white; }
.issue-section { margin-top: 22px; }.field-title { display: flex; justify-content: space-between; margin-bottom: 10px; color: #3f4943; font-size: 12px; font-weight: 800; }.field-title small, .comment-field small { color: var(--muted); font-weight: 500; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }.issue-tag { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: white; color: #5f6862; cursor: pointer; font-size: 10px; }.issue-tag.active { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.comment-field { display: grid; gap: 9px; margin-top: 20px; color: #3f4943; font-size: 12px; font-weight: 800; }.comment-field textarea { font-size: 12px; }
.upload-candidates { margin-top: 23px; padding-top: 20px; display: grid; gap: 10px; border-top: 1px solid var(--line); }.upload-candidates input { font-size: 11px; }
.edit-shot-link { margin-top: 22px; display: block; color: var(--green); font-size: 11px; font-weight: 800; text-align: center; }
.review-footer { min-height: 72px; padding: 12px 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; background: white; border-top: 1px solid var(--line); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; }.review-footer > :last-child { justify-self: end; }.keyboard-tip { color: var(--muted); font-size: 10px; }
.image-dialog { max-width: 92vw; max-height: 92vh; padding: 0; border: 0; border-radius: 14px; background: #111; box-shadow: 0 30px 100px rgba(0,0,0,.4); }.image-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(4px); }.image-dialog img { max-width: 90vw; max-height: 86vh; object-fit: contain; }.image-dialog button { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: white; cursor: pointer; font-size: 23px; }

/* Separate file imports */
.import-heading { max-width: 900px; }
.import-heading code, .import-card code { padding: 2px 6px; border-radius: 5px; background: #e9eeea; color: #3d5144; font-size: .9em; }
.import-summary { margin-top: 23px; display: flex; gap: 10px; flex-wrap: wrap; }
.import-summary span { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: 12px; }
.import-summary strong { margin-right: 4px; color: var(--ink); }
.import-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.import-card { padding: 25px; display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 17px; align-content: start; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 7px 28px rgba(23,32,27,.035); }
.import-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--green-soft); color: var(--green); font-size: 14px; font-weight: 900; }
.import-icon.json { background: var(--blue-soft); color: var(--blue); }.import-icon.shots { background: var(--amber-soft); color: var(--amber); font-size: 18px; }.import-icon.images { background: #f0eafb; color: #744ca1; font-size: 18px; }.import-icon.python { background: #fff2c7; color: #6c5b18; }
.import-card-copy .step { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.import-card h2 { margin: 4px 0 7px; font-size: 20px; }.import-card-copy p { min-height: 44px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.compact-file { grid-column: 1/-1; min-height: 82px; padding: 16px; display: grid; place-content: center; gap: 5px; position: relative; overflow: hidden; border: 1px dashed #bdc9c0; border-radius: 12px; background: #fafbfa; cursor: pointer; text-align: center; transition: .16s; }
.compact-file:hover, .compact-file.has-file { border-color: var(--green); background: var(--green-soft); }.compact-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.compact-file span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13px; font-weight: 800; }.compact-file small { color: var(--muted); font-size: 10px; }
.upload-progress { grid-column: 1/-1; height: 5px; display: none; overflow: hidden; border-radius: 99px; background: #e7ebe8; }.upload-progress.active { display: block; }.upload-progress span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--green); transition: width .15s; }
.upload-status { grid-column: 1/-1; min-height: 0; color: var(--muted); font-size: 11px; }.upload-status:empty { display: none; }.upload-status.success { color: var(--green); }.upload-status.error { color: var(--red); }
.import-card > .button, .card-reader-link { grid-column: 1/-1; }.import-card > .button:disabled { opacity: .6; cursor: wait; transform: none; }
.card-reader-link { color: var(--green); font-size: 11px; font-weight: 800; text-align: center; }
.or-divider { grid-column: 1/-1; display: flex; align-items: center; gap: 10px; color: #9aa19d; font-size: 10px; }.or-divider::before,.or-divider::after { content:""; height: 1px; flex: 1; background: var(--line); }
.naming-guide { margin-top: 19px; padding: 24px 28px; display: flex; justify-content: space-between; align-items: center; gap: 30px; border: 1px solid var(--line); border-radius: 18px; background: #1c2821; color: white; }.naming-guide h2 { margin: 5px 0 0; font-size: 18px; }.filename-examples { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }.filename-examples code { padding: 7px 9px; border-radius: 7px; background: rgba(255,255,255,.1); color: #d8e8de; font-size: 11px; }.filename-examples span { color: #789182; }.filename-examples strong { color: #79d5a0; font-size: 11px; }
.upload-dialog { width: min(440px, calc(100% - 30px)); padding: 32px; border: 0; border-radius: 20px; text-align: center; box-shadow: 0 30px 90px rgba(0,0,0,.24); }.upload-dialog::backdrop { background: rgba(16,25,19,.68); backdrop-filter: blur(4px); }.result-mark { width: 54px; height: 54px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 25px; font-weight: 900; }.upload-dialog h2 { margin: 0 0 8px; }.upload-dialog > p { margin: 0 0 18px; color: var(--muted); line-height: 1.6; }.unmatched-box { margin: 0 0 18px; padding: 12px; border-radius: 10px; background: var(--amber-soft); text-align: left; }.unmatched-box strong { color: var(--amber); font-size: 11px; }.unmatched-box p { margin: 5px 0 0; color: #6f5a38; font-size: 10px; line-height: 1.55; }

/* Markdown reader */
.reader-shell { min-height: calc(100vh - 72px); background: #f1f2ed; }
.reader-hero { padding: 62px 24px 54px; color: #f8fbf9; background: radial-gradient(circle at 82% 15%, rgba(77,150,105,.28), transparent 28%), linear-gradient(135deg, #14251b, #26372d); }
.reader-hero-inner { width: min(850px, 100%); margin: 0 auto; }.reader-hero .back-link { color: #a9b9af; }.reader-code { color: #7fd29f; font-size: 11px; font-weight: 900; letter-spacing: .16em; }.reader-hero h1 { margin: 9px 0 13px; font-family: ui-serif, "Songti SC", "Noto Serif SC", serif; font-size: clamp(36px, 6vw, 60px); letter-spacing: -.03em; }.reader-hero p { max-width: 680px; margin: 0; color: #c4d0c8; font-size: 15px; line-height: 1.8; }.reader-meta { margin-top: 24px; display: flex; gap: 9px; }.reader-meta span { padding: 6px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #b8c9be; font-size: 10px; }
.reader-layout { width: min(1120px, calc(100% - 36px)); margin: 0 auto; display: grid; grid-template-columns: 220px minmax(0, 780px); justify-content: center; align-items: start; gap: 34px; }
.reader-toc { position: sticky; top: 98px; padding-top: 54px; }.toc-inner > span { display: block; margin-bottom: 12px; color: #7c857f; font-size: 10px; font-weight: 900; letter-spacing: .15em; }.reader-toc ul { margin: 0; padding: 0; list-style: none; }.reader-toc ul ul { margin: 5px 0 0 12px; }.reader-toc li { margin: 0 0 7px; }.reader-toc a { color: #667169; font-size: 11px; line-height: 1.4; }.reader-toc a:hover { color: var(--green); }
.markdown-body { min-height: 680px; margin: -30px 0 80px; padding: clamp(34px, 7vw, 74px); position: relative; border: 1px solid #e1e1da; border-radius: 4px; background: #fffefa; box-shadow: 0 25px 70px rgba(36,46,38,.09); font-family: ui-serif, "Songti SC", "Noto Serif SC", Georgia, serif; color: #2c302d; font-size: 16px; line-height: 2; }
.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4 { scroll-margin-top: 100px; color: #19221c; line-height: 1.35; letter-spacing: -.02em; }.markdown-body h1 { margin: 0 0 1.4em; padding-bottom: .65em; border-bottom: 2px solid #24352a; font-size: 2.15em; }.markdown-body h2 { margin: 2.25em 0 .8em; padding-left: 14px; border-left: 4px solid var(--green); font-size: 1.55em; }.markdown-body h3 { margin: 1.9em 0 .55em; color: var(--green-dark); font-size: 1.2em; }.markdown-body h4 { margin: 1.6em 0 .4em; font-size: 1.03em; }.markdown-body p { margin: 0 0 1.25em; }.markdown-body strong { color: #14241a; }.markdown-body em { color: #5e665f; }.markdown-body hr { margin: 2.7em 0; border: 0; border-top: 1px solid #d9ddd8; }.markdown-body blockquote { margin: 1.7em 0; padding: 1em 1.3em; border-left: 3px solid #b59b69; background: #f5f0e5; color: #5d5546; }.markdown-body blockquote p:last-child { margin-bottom: 0; }.markdown-body ul,.markdown-body ol { padding-left: 1.5em; }.markdown-body li { margin: .35em 0; }.markdown-body code { padding: .15em .38em; border-radius: 4px; background: #edf0ec; color: #375341; font-family: ui-monospace, monospace; font-size: .84em; }.markdown-body pre { overflow: auto; padding: 1.1em 1.25em; border-radius: 9px; background: #1e2922; color: #dce9df; line-height: 1.65; }.markdown-body pre code { padding: 0; background: transparent; color: inherit; }.markdown-body table { width: 100%; margin: 1.8em 0; border-collapse: collapse; font-family: ui-sans-serif, sans-serif; font-size: .84em; }.markdown-body th,.markdown-body td { padding: 10px 12px; border: 1px solid #dfe3df; text-align: left; vertical-align: top; }.markdown-body th { background: #edf3ee; color: #254330; }.markdown-body a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }.reader-empty { padding: 100px 0; text-align: center; }.reader-empty p { color: var(--muted); }

/* Production board */
.production-heading { max-width: 900px; }.production-overview { max-width: 560px; margin-top: 25px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 5px 10px; }.production-overview strong { font-size: 23px; }.production-overview > span { color: var(--muted); font-size: 12px; }.production-overview .progress-line { grid-column: 1/-1; }
.narrator-explainer { margin-bottom: 22px; padding: 25px 28px; display: grid; grid-template-columns: 54px 1fr; gap: 20px; border-radius: 18px; color: #eef7f1; background: radial-gradient(circle at 85% 20%, rgba(100,182,130,.25), transparent 26%), #18271e; }.narrator-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: #e9c376; color: #392b12; font-family: ui-serif, serif; font-size: 23px; font-weight: 900; }.narrator-explainer h2 { margin: 5px 0 8px; font-size: 20px; }.narrator-explainer p { margin: 0; color: #b9c9be; font-size: 13px; line-height: 1.75; }.narrator-explainer code { padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.1); color: #92d5aa; }
.production-section { margin-top: 20px; padding: 27px; border: 1px solid var(--line); border-radius: 18px; background: white; }.section-title-row { margin-bottom: 21px; display: flex; align-items: start; justify-content: space-between; gap: 20px; }.section-title-row h2 { margin: 4px 0; font-size: 22px; }.section-title-row p { margin: 0; color: var(--muted); font-size: 12px; }.source-badge { padding: 7px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 800; }
.workflow-editor { display: grid; gap: 10px; }.workflow-step { padding: 15px; display: grid; grid-template-columns: 42px 180px minmax(0,1fr) minmax(190px,.7fr); align-items: end; gap: 11px; border: 1px solid var(--line); border-radius: 13px; background: #fafbfa; }.workflow-step label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }.workflow-step input,.workflow-step textarea { padding: 9px 10px; font-size: 11px; }.step-handle { align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: space-between; }.step-handle span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 11px; font-weight: 900; }.step-handle button { padding: 2px 6px; border: 0; background: none; color: #a3aaa5; cursor: pointer; font-size: 18px; }.step-handle button:hover { color: var(--red); }.workflow-actions { margin-top: 15px; display: flex; justify-content: space-between; gap: 10px; }.workflow-readonly { display: grid; gap: 10px; }.workflow-readonly article { padding: 16px; display: grid; grid-template-columns: 32px 1fr; gap: 13px; border: 1px solid var(--line); border-radius: 12px; }.workflow-readonly article > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 900; }.workflow-readonly h3 { margin: 1px 0 5px; font-size: 14px; }.workflow-readonly p { margin: 0 0 7px; color: var(--muted); font-size: 12px; }.workflow-readonly code,.python-analysis code { display: inline-block; margin: 2px 5px 2px 0; padding: 4px 7px; border-radius: 5px; background: #edf0ed; color: #3d5244; font-size: 10px; }
.python-analysis { margin-top: 15px; border-top: 1px solid var(--line); }.python-analysis summary { padding: 15px 0 0; color: var(--green); cursor: pointer; font-size: 11px; font-weight: 800; }.python-analysis div { padding-top: 12px; }.python-analysis div > span { color: var(--muted); font-size: 10px; font-weight: 800; }.python-analysis p { margin: 6px 0 13px; }
.workflow-role-list { display: grid; gap: 6px; }.workflow-role-list article { padding: 9px 11px; display: grid; grid-template-columns: minmax(180px,.8fr) 120px 1fr; align-items: center; gap: 9px; border-radius: 9px; background: #f5f7f5; }.workflow-role-list strong { color: var(--green); font-size: 11px; }.workflow-role-list small { color: var(--muted); font-size: 10px; }
.production-table { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }.production-row { min-height: 71px; padding: 10px 13px; display: grid; grid-template-columns: minmax(240px,1.5fr) 100px 150px minmax(180px,1fr) minmax(150px,.8fr); align-items: center; gap: 9px; border-top: 1px solid var(--line); }.production-row:first-child { border-top: 0; }.production-table-head { min-height: 40px; background: #edf3ee; color: #526158; font-size: 10px; font-weight: 900; }.production-row input,.production-row select { padding: 8px 9px; border-radius: 8px; font-size: 10px; }.production-shot { min-width: 0; display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 8px; }.production-shot b { color: var(--green); font-size: 11px; }.production-shot strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.production-status { width: fit-content; padding: 5px 8px; border-radius: 999px; background: #eff1ef; color: var(--muted); font-size: 10px; font-weight: 800; }.production-status.status-final,.production-status.status-edited { background: var(--green-soft); color: var(--green); }.production-status.status-i2v { background: var(--blue-soft); color: var(--blue); }.production-status.status-retouch { background: var(--red-soft); color: var(--red); }.progress-save { margin-top: 16px; display: flex; justify-content: flex-end; }.shot-production-line { margin: -13px 0 20px; display: flex; gap: 6px; }.shot-production-line span { padding: 4px 7px; border-radius: 999px; background: #eef2ef; color: #637068; font-size: 9px; font-weight: 800; }

@media (max-width: 1180px) {
  .review-layout { grid-template-columns: 260px minmax(0, 1fr) 290px; }
  .candidate-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .project-layout { grid-template-columns: 1fr; }.project-sidebar { position: static; grid-template-columns: 1fr 1fr; }.owner-card { grid-column: 1/-1; }
  .review-layout { grid-template-columns: 1fr; }.story-panel, .decision-panel { border: 0; }.story-panel { border-bottom: 1px solid var(--line); }.decision-panel { border-top: 1px solid var(--line); }.candidate-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .review-footer { position: static; }.review-shell { padding-bottom: 0; }.review-topbar { top: 72px; }
  .reader-layout { grid-template-columns: 1fr; }.reader-toc { display: none; }.markdown-body { margin-top: -30px; }
  .workflow-step { grid-template-columns: 38px 1fr; }.workflow-step .step-handle { grid-row: 1 / 4; }.production-table { overflow-x: auto; }.production-row { min-width: 950px; }
}
@media (max-width: 680px) {
  .site-header { height: 62px; padding: 0 16px; }.brand small { display: none; }.top-nav { gap: 14px; }.top-nav a:first-child { display: none; }
  .page-shell { width: min(100% - 28px, 1180px); padding: 36px 0 65px; }.split-heading, .project-hero-row { align-items: stretch; flex-direction: column; }.split-heading .button, .hero-actions .button { flex: 1; }
  .project-grid, .people-grid, .form-grid.two, .drop-grid { grid-template-columns: 1fr; }
  .project-sidebar { grid-template-columns: 1fr; }.owner-card { grid-column: auto; }
  .project-hero h1 { font-size: 34px; }.section-heading { display: block; }.legend { margin-top: 12px; }.shot-row { grid-template-columns: 8px 38px minmax(0,1fr) 12px; padding-inline: 14px; }.shot-count { display: none; }
  .review-topbar { top: 62px; height: auto; min-height: 58px; grid-template-columns: 1fr auto; padding: 10px 14px; }.review-progress { grid-column: 1/-1; grid-row: 2; }.save-state { grid-column: 2; grid-row: 1; }.review-layout { min-height: auto; }.story-panel, .candidate-panel, .decision-panel { padding: 22px 16px; }.candidate-grid { grid-template-columns: 1fr; }.candidate-heading { display: block; }.candidate-heading p { margin-top: 6px; }.review-footer { grid-template-columns: 1fr 1fr; padding: 10px 14px; }.keyboard-tip { display: none; }
  .toast-stack { left: 14px; right: 14px; top: 72px; }.toast { min-width: 0; max-width: none; }
  .dashboard-actions { width: 100%; }.dashboard-actions .button { flex: 1; }.danger-zone-body,.trash-card { align-items: stretch; flex-direction: column; }.trash-actions { align-items: stretch; flex-direction: column; }.trash-actions .button { width: 100%; }.destroy-details[open] form { width: 100%; position: static; margin-top: 8px; }
  .import-grid { grid-template-columns: 1fr; }.naming-guide { align-items: flex-start; flex-direction: column; }.filename-examples { display: grid; grid-template-columns: 1fr auto auto; width: 100%; }.filename-examples code { overflow: hidden; text-overflow: ellipsis; }.reader-hero { padding: 40px 18px 48px; }.reader-layout { width: calc(100% - 20px); }.markdown-body { padding: 28px 22px; font-size: 15px; }.reader-shell { min-height: calc(100vh - 62px); }
  .narrator-explainer { padding: 21px; grid-template-columns: 1fr; }.production-section { padding: 19px 14px; }.section-title-row { flex-direction: column; }.workflow-actions { flex-direction: column; }.workflow-actions .button { width: 100%; }.production-row { min-width: 880px; }
}
