:root {
  color-scheme: light;
  --paper: #f4f3ed;
  --panel: #fffefa;
  --line: #e5e5d9;
  --ink: #222b24;
  --muted: #59655a;
  --rail: #202e26;
  --rail-muted: #b8c4b6;
  --accent: #d0df8d;
  --button: #2f5039;
  --soft: #e8eddd;
  --danger: #a13427;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
a, button, select, input[type=checkbox] { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .53; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #779049; outline-offset: 3px; }
[hidden] { display: none !important; }
.layout { min-height: 100dvh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 42px; padding: 30px 18px 22px; background: var(--rail); color: #f7faef; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; padding: 0 4px; }
.brand-mark { flex: none; width: 44px; height: 44px; background: var(--accent); color: #283427; border-radius: 13px; display: inline-grid; place-items: center; font-size: 22px; font-weight: 800; }
.brand strong { display: block; font-size: 18px; line-height: 1.3; letter-spacing: .03em; }
.brand small { color: var(--rail-muted); font-size: 12px; }
.steps { display: grid; gap: 9px; }
.steps button { display: flex; align-items: center; gap: 12px; border: 1px solid transparent; text-align: left; border-radius: 10px; padding: 11px 12px; background: transparent; color: var(--rail-muted); font-weight: 600; }
.steps button span { display: grid; place-items: center; font-size: 12px; width: 24px; height: 24px; border: 1px solid #607263; border-radius: 50%; font-variant-numeric: tabular-nums; }
.steps button:hover, .rail-bottom button:hover, .rail-bottom a:hover { color: white; }
.steps button[aria-current=step] { background: #3b4c3e; color: #f7faef; border-color: #4b5a4d; }
.steps button[aria-current=step] span { background: var(--accent); color: #202e26; border-color: var(--accent); }
.rail-bottom { padding-top: 14px; border-top: 1px solid #49584a; margin-top: auto; display: grid; gap: 14px; }
.rail-bottom a, .rail-bottom button { color: var(--rail-muted); border: 0; background: none; padding: 4px; text-decoration: none; text-align: left; font-size: 13px; }
.rail-bottom span { margin-left: 4px; }
.main { min-width: 0; }
.top { height: 66px; padding-inline: clamp(18px, 4vw, 58px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: var(--panel); gap: 8px; }
.top > span { color: var(--muted); font-size: 14px; font-weight: 600; }
.top > div { display: flex; gap: 8px; }
.content { padding: clamp(24px, 4vw, 54px) clamp(18px, 4vw, 58px) 54px; max-width: 1430px; margin-inline: auto; }
.page-heading { margin-bottom: 28px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 3vw, 39px); line-height: 1.18; font-weight: 750; letter-spacing: -.042em; }
.page-heading p { color: var(--muted); margin-top: 12px; line-height: 1.6; }
h2 { font-size: 18px; font-weight: 740; }
h3 { font-size: 17px; line-height: 1.35; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 330px); align-items: start; gap: 20px; }
.side-stack { display: grid; gap: 16px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 22px; min-width: 0; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.count, .pill { font-size: 12px; padding: 5px 9px; border-radius: 100px; background: var(--soft); color: #3d513d; font-variant-numeric: tabular-nums; flex: none; }
.drop { display: grid; justify-items: center; align-content: center; text-align: center; gap: 9px; padding: 24px; min-height: 252px; background: #f8f9f1; border: 1px dashed #a4af94; border-radius: 13px; }
.drop.drag { background: #edf2d8; border-color: var(--button); }
.drop strong { font-size: 17px; }
.drop p, .form-note { color: var(--muted); font-size: 13px; line-height: 1.65; }
.drop .button { margin-top: 6px; }
.upload-mark { background: var(--soft); color: var(--button); border: 1px solid #dbe4c9; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; font-size: 26px; margin-bottom: 4px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 5px; min-height: 40px; border: 1px solid transparent; border-radius: 8px; padding: 7px 13px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 13px; }
.button.primary { background: var(--button); color: #fff; border-color: var(--button); }
.button.primary:hover:not(:disabled) { background: #253f2c; }
.button.secondary { background: var(--soft); border-color: #d8e2d1; color: #26452f; }
.button.quiet { background: transparent; border-color: var(--line); }
.button.secondary:hover:not(:disabled), .button.quiet:hover:not(:disabled) { background: #eef0e6; }
.wide { width: 100%; margin-top: 12px; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; color: var(--ink); background: #fcfcf6; border: 1px solid #dce0d4; border-radius: 8px; padding: 9px 11px; }
textarea { line-height: 1.60; resize: vertical; }
textarea::placeholder { color: #657064; }
.asset-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 11px 0; }
.asset-row:first-of-type { padding-top: 0; }
.asset-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.asset-row strong { font-size: 14px; }
.asset-icon { width: 36px; height: 36px; display: grid; place-items: center; background: var(--soft); color: var(--button); border-radius: 9px; font-weight: 700; }
.asset-icon.voice { background: #f0e9d2; color: #6a5027; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 13px; }
input[type=checkbox] { accent-color: var(--button); width: 17px; height: 17px; margin: 0; flex: none; }
.form-note { margin-top: 7px; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); gap: 12px; }
.product { position: relative; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; min-width: 0; }
.product img { width: 100%; height: 145px; object-fit: contain; background: #edf0e6; display: block; }
.product-fields { display: grid; gap: 8px; padding: 10px; }
.product-fields label, .field { display: grid; gap: 6px; font-size: 13px; font-weight: 650; }
.product-fields input, .product-fields select { padding: 6px 8px; }
.product-fields details { color: var(--muted); font-size: 12px; }
.product-fields details textarea { margin-top: 5px; }
.remove { position: absolute; top: 6px; right: 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); min-width: 32px; height: 32px; font-size: 18px; color: var(--ink); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.product-actions { margin: 0 0 14px; }
.mobile-only { display: none; }
.field { margin-bottom: 12px; }
.estimate { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.estimate strong { font-size: 25px; color: var(--button); font-variant-numeric: tabular-nums; }
.scene-title { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.scene-products { display: flex; gap: 7px; flex-wrap: wrap; margin: 8px 0 14px; }
.scene-products span { padding: 4px 7px; border-radius: 5px; font-size: 12px; background: #f2f2e8; }
.scene textarea { font-weight: 400; font-size: 14px; }
.scene .field:last-of-type { margin-bottom: 0; }
.notice { padding: 10px 14px; background: var(--soft); border-left: 3px solid var(--button); margin-bottom: 16px; border-radius: 5px; overflow-wrap: anywhere; }
.notice.fail { background: #f7ece9; border-color: var(--danger); color: var(--danger); }
.error, .flag { color: var(--danger); font-size: 13px; line-height: 1.55; }
.flag { margin-top: 8px; overflow-wrap: anywhere; }
.progress { width: 100%; accent-color: var(--button); margin-bottom: 10px; }
#exports:not(:empty) { margin-bottom: 16px; }
.video-wrap { display: grid; grid-template-columns: minmax(140px, 225px) minmax(0, 1fr); gap: 18px; align-items: start; }
video { width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; display: block; background: #202822; }
.clip-details { display: grid; gap: 10px; }
.clip-details .check { margin-top: 0; }
.cues { display: grid; gap: 6px; margin-top: 10px; }
.cue { display: grid; grid-template-columns: 57px 57px 1fr; gap: 5px; }
.cue input:not([type=checkbox]) { padding: 6px; }
.finish-bar { position: sticky; bottom: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; margin-top: 16px; background: var(--panel); border: 1px solid #d9e1d1; border-radius: 11px; }
.finish-bar .check { margin-top: 0; }
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 0; max-width: min(430px, calc(100% - 30px)); width: 100%; color: var(--ink); box-shadow: 0 24px 80px #18271e33; }
dialog::backdrop { background: #1c2a23a8; backdrop-filter: blur(5px); }
.dialog-content { padding: 25px; display: grid; gap: 10px; }
.dialog-content h1 { font-size: 28px; }
.dialog-content p { color: var(--muted); line-height: 1.6; }
.dialog-content .error { color: var(--danger); }
.dialog-content .wide { margin-top: 0; }
.dialog-content .actions { justify-content: flex-end; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 1000px) {
  .layout { grid-template-columns: 184px minmax(0, 1fr); }
  .rail { padding-inline: 12px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .material-card + .side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .layout { display: block; }
  .rail { position: sticky; top: 0; z-index: 2; height: auto; padding: 10px 14px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; font-size: 18px; border-radius: 9px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .steps button { justify-content: center; padding: 7px 4px; font-size: 12px; white-space: nowrap; gap: 4px; min-height: 35px; }
  .steps button span { width: 18px; height: 18px; font-size: 10px; }
  .rail-bottom { position: absolute; right: 13px; top: 13px; display: flex; gap: 6px; margin: 0; padding: 0; border: 0; }
  .rail-bottom a, .rail-bottom button { font-size: 11px; }
  .top { height: 49px; padding-inline: 14px; }
  .top .button { min-height: 33px; padding: 5px 8px; font-size: 12px; }
  .content { padding: 21px 14px 27px; }
  .page-heading { margin-bottom: 19px; }
  .page-heading p { font-size: 13px; margin-top: 8px; }
  .card { padding: 15px; border-radius: 12px; }
  .material-card + .side-stack, .video-wrap { grid-template-columns: 1fr; }
  .drop { min-height: 204px; padding: 16px; }
  .drop strong { font-size: 15px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product img { height: 110px; }
  video { max-width: 220px; }
  .finish-bar .button { width: 100%; }
  .mobile-only { display: inline-flex; }
  #brief { scroll-margin-top: 125px; }
}
