:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f7f8fc;
  color: #223049;
  --bg: #f7f8fc;
  --panel: #ffffff;
  --line: #d9e2ef;
  --text: #223049;
  --muted: #6b7a90;
  --blue: #5b8def;
  --blue-dark: #3468d8;
  --pink: #ffdbe8;
  --mint: #dff8ec;
  --yellow: #fff0bd;
  --orange: #ffb86b;
  --green: #39c98a;
  --danger: #e5484d;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; background: var(--bg); color: var(--text); }
.guest-mode .sidebar, .guest-mode .main { display: none; }
.landing { display: none; min-height: 100vh; width: 100%; padding: 42px; background: radial-gradient(circle at 12% 18%, #dff8ec 0, transparent 28%), radial-gradient(circle at 88% 14%, #ffdbe8 0, transparent 26%), linear-gradient(135deg, #f8fbff 0%, #ffffff 52%, #fff7ed 100%); }
.landing.active { display: grid; place-items: center; }
.landing-shell { width: min(1080px, 100%); display: grid; grid-template-columns: minmax(0, 1.2fr) 360px; gap: 26px; align-items: center; }
.landing-copy h1 { margin: 10px 0 14px; font-size: 46px; line-height: 1.12; letter-spacing: 0; color: #0f172a; }
.landing-copy p { max-width: 680px; font-size: 16px; color: #475569; }
.landing-kicker { display: inline-flex; padding: 7px 11px; border-radius: 999px; background: #eef4ff; color: var(--blue-dark); font-weight: 800; }
.landing-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.landing-support { margin-top: 18px; display: inline-flex; gap: 6px; padding: 10px 13px; border-radius: 10px; background: #fffbeb; color: #92400e; box-shadow: 0 12px 28px rgba(245, 158, 11, .14); }
.landing-card { background: rgba(255,255,255,.9); border: 1px solid rgba(15,23,42,.08); border-radius: 18px; padding: 20px; box-shadow: 0 24px 70px rgba(15,23,42,.12); display: grid; gap: 12px; }
.landing-card div { padding: 13px; border-radius: 12px; background: #f8fbff; display: grid; gap: 4px; }
.landing-card div.hot { background: linear-gradient(135deg, #eff6ff, #ecfdf5); border: 1px solid rgba(37,99,235,.25); }
.landing-card b { color: #0f172a; }
.landing-card span { color: #64748b; font-size: 13px; }
@media (max-width: 860px) { .landing { padding: 18px; } .landing-shell { grid-template-columns: 1fr; } .landing-copy h1 { font-size: 34px; } }
.sidebar { width: 218px; padding: 18px 12px; background: #ffffff; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 10px; font-size: 20px; font-weight: 900; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 13px; }
.nav { height: 42px; border: 0; border-radius: 10px; background: transparent; color: #526176; text-align: left; padding: 0 12px; cursor: pointer; font: inherit; }
.nav.active, .nav:hover { background: #edf4ff; color: var(--blue-dark); }
.main { flex: 1; min-width: 0; padding: 24px; }
.topbar { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
h3 { font-size: 14px; }
p { color: var(--muted); line-height: 1.55; }
.topbar p { margin-top: 8px; }
.top-actions, .studio-actions, .modal-actions, .drawer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.status { padding: 9px 12px; border-radius: 10px; background: var(--mint); color: #16724a; font-size: 13px; white-space: nowrap; }
.billing-chip { padding: 9px 12px; border-radius: 10px; background: #eef4ff; color: var(--blue-dark); font-weight: 800; white-space: nowrap; font-size: 13px; }
.billing-chip.danger { background: #fff1f2; color: #be123c; }
.billing-hint { padding: 10px 12px; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 13px; }
button { border: 0; border-radius: 10px; background: var(--blue); color: #fff; padding: 10px 14px; cursor: pointer; font: inherit; white-space: nowrap; }
button:hover { background: var(--blue-dark); }
button.ghost { background: #eef4ff; color: var(--blue-dark); }
button.ghost:hover { background: #dfeaff; }
button.danger { background: var(--danger); }
button.small { padding: 6px 9px; font-size: 12px; border-radius: 8px; }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: #eef4ff; color: var(--blue-dark); font-size: 20px; }
.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 8px 24px rgba(53, 80, 120, .06); }
.panel-title, .modal-head, .drawer-head, .project-card-head, .shot-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
input, textarea, select { width: 100%; border: 1px solid #cbd7e8; border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff; }
textarea { resize: vertical; line-height: 1.6; }
label { display: block; font-size: 13px; color: #526176; }
label input, label textarea, label select { margin-top: 6px; }
.muted, .hint { color: var(--muted); font-size: 12px; }
.empty { color: #94a3b8; padding: 28px 0; text-align: center; }
.large-empty { min-height: 180px; display: grid; place-items: center; border: 1px dashed #cbd7e8; border-radius: 14px; background: #fff; }
.dashboard-head { margin-bottom: 14px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; box-shadow: 0 8px 24px rgba(53, 80, 120, .06); transition: transform .16s ease, box-shadow .16s ease; }
.project-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(53, 80, 120, .12); }
.project-cover { height: 128px; display: grid; place-items: center; background: linear-gradient(135deg, #dff8ec, #edf4ff 55%, #ffdbe8); }
.project-cover span { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 18px; background: rgba(255,255,255,.72); font-weight: 900; color: var(--blue-dark); }
.project-body { padding: 14px; display: grid; gap: 10px; }
.project-card h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-tags, .summary-tags, .shot-meta, .lock-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.project-tags span, .summary-tags span, .shot-meta span { padding: 5px 8px; border-radius: 999px; background: #f1f6ff; color: #4c6688; font-size: 12px; }
.progress-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid #edf1f6; color: var(--muted); font-size: 12px; }
.progress-line b { color: var(--green); }
.empty-project { width: 100%; min-height: 180px; border: 1px dashed #b9c9df; background: #fff; color: var(--blue-dark); }
.studio-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.studio-title p { margin-top: 5px; }
.studio-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.shot-board { min-width: 0; }
.board-summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.shot-rows { display: grid; gap: 12px; }
.shot-row { display: grid; grid-template-columns: minmax(300px, 1.5fr) 220px 300px 150px; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 16px; padding: 12px; }
.shot-info, .shot-locks, .shot-preview, .shot-actions { min-width: 0; }
.subtitle { margin: 8px 0; color: var(--text); }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--blue-dark); font-size: 13px; }
pre { white-space: pre-wrap; max-height: 180px; overflow: auto; background: #142033; color: #e7eef8; padding: 10px; border-radius: 10px; font-size: 12px; line-height: 1.5; }
.lock-tag { background: #f1f4f8; color: #526176; padding: 7px 9px; font-size: 12px; }
.lock-tag.locked { background: var(--mint); color: #16724a; }
.shot-locks h3 + .lock-tags, .shot-locks h3 + .muted { margin: 7px 0 12px; }
.shot-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preview-box { position: relative; min-height: 164px; padding: 0; overflow: hidden; background: #f4f7fb; border: 1px solid #dbe5f2; color: var(--text); display: grid; place-items: center; transition: transform .16s ease, box-shadow .16s ease; }
.preview-box:hover { transform: scale(1.06); z-index: 5; box-shadow: 0 14px 30px rgba(53, 80, 120, .18); }
.preview-box span { position: absolute; left: 8px; top: 8px; z-index: 2; background: rgba(255,255,255,.86); color: var(--blue-dark); padding: 4px 7px; border-radius: 999px; font-size: 12px; }
.preview-box img, .preview-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.empty-preview b { color: #93a3b8; }
.shot-actions { display: grid; gap: 8px; align-content: start; }
.project-side { position: sticky; top: 18px; display: grid; gap: 10px; }
.field-row, .param-grid, .modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid #edf1f6; padding-top: 12px; }
.quick-flow button:nth-child(3), .quick-flow button:nth-child(5) { grid-column: span 2; }
.modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(27, 39, 59, .28); display: grid; place-items: center; padding: 22px; }
.modal { width: min(820px, 96vw); max-height: 92vh; overflow: auto; background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 24px 60px rgba(27, 39, 59, .22); }
.create-modal, .settings-modal { display: grid; gap: 14px; }
.segment-title { font-weight: 800; }
.duration-pills, .settings-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pill, .tab { background: #eef4ff; color: var(--blue-dark); }
.pill.active, .tab.active { background: var(--blue); color: #fff; }
.progress-box { display: grid; gap: 7px; }
.progress-info { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.progress-track { height: 10px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.progress-track div { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--blue)); transition: width .2s ease; }
.settings-pane { display: none; }
.settings-pane.active { display: grid; gap: 12px; }
.advanced textarea { font-family: Consolas, "Microsoft YaHei", monospace; }
.drawer { position: fixed; z-index: 35; right: 0; top: 0; width: min(460px, 96vw); height: 100vh; overflow: auto; background: #fff; border-left: 1px solid var(--line); box-shadow: -18px 0 45px rgba(27, 39, 59, .16); padding: 18px; display: grid; gap: 14px; align-content: start; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; }
.resource-list { display: grid; gap: 10px; }
.resource-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: #fbfdff; }
.resource-thumb { height: 92px; border-radius: 12px; background: #f1f4f8; display: grid; place-items: center; overflow: hidden; color: #93a3b8; }
.resource-thumb img, .resource-thumb video { width: 100%; height: 100%; object-fit: cover; }
.resource-card p { font-size: 12px; margin-top: 4px; }
.preview-modal { width: min(900px, 96vw); }
.preview-body img, .preview-body video { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 14px; background: #111827; }
.list { display: grid; gap: 8px; }
.item, .prompt { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.prompt-list, .model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.model-card { display: grid; gap: 10px; }
.model-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
@media (max-width: 1280px) {
  .studio-layout { grid-template-columns: 1fr; }
  .project-side { position: static; }
  .shot-row { grid-template-columns: 1fr; }
  .shot-preview { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
  .main { padding: 14px; }
  .topbar, .studio-top, .board-summary { display: grid; grid-template-columns: 1fr; }
  .top-actions, .studio-actions { justify-content: flex-start; }
  .field-row, .param-grid, .modal-grid, .shot-preview { grid-template-columns: 1fr; }
}
