:root {
  --deep: #03081a;
  --deep-2: #080d28;
  --panel: #0a1637;
  --panel-2: #101d49;
  --blue: #315cff;
  --cyan: #32dcff;
  --purple: #8a4dff;
  --purple-2: #c35bff;
  --pink: #ff5d9e;
  --green: #40e0b0;
  --amber: #ffbe5b;
  --text: #eef2ff;
  --muted: #8192b8;
  --line: rgba(112, 134, 214, 0.24);
}

* { box-sizing: border-box; }
html { min-width: 1440px; scroll-behavior: smooth; }
body { margin: 0; color: var(--text); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; background: radial-gradient(circle at 58% -10%, #281b62 0, #0b1740 27%, #04091c 68%); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.app-shell::before { position: fixed; z-index: 0; inset: 0; content: ""; pointer-events: none; opacity: 0.26; background-image: linear-gradient(rgba(111, 91, 213, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(111, 91, 213, 0.12) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(#000, transparent 94%); }
.app-shell::after { position: fixed; z-index: 0; top: 82px; right: 0; width: 42vw; height: 55vh; content: ""; pointer-events: none; background: radial-gradient(circle, rgba(142, 72, 255, 0.12), transparent 67%); }

.app-header { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: 82px; padding: 0 30px; display: grid; grid-template-columns: 270px 1fr auto; align-items: center; border-bottom: 1px solid var(--line); background: rgba(3, 8, 26, 0.9); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { position: relative; width: 38px; height: 38px; display: inline-block; transform: rotate(45deg); border-radius: 10px; background: linear-gradient(135deg, var(--cyan), var(--blue)); box-shadow: 0 0 24px rgba(50, 220, 255, 0.28); }
.brand-mark i { position: absolute; border-radius: 3px; background: #071332; }
.brand-mark i:first-child { top: 7px; left: 11px; width: 7px; height: 24px; }
.brand-mark i:last-child { top: 11px; left: 7px; width: 24px; height: 7px; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font-size: 20px; letter-spacing: 3px; }
.brand-copy small { margin-top: 3px; color: #7180a4; font-size: 12px; letter-spacing: 3px; }
.product-title { justify-self: center; display: flex; align-items: center; gap: 13px; }
.product-title img { width: 42px; height: 42px; border-radius: 11px; box-shadow: 0 0 20px rgba(161, 80, 255, 0.24); }
.product-title div { display: flex; flex-direction: column; }
.product-title strong { font-size: 20px; letter-spacing: 2px; }
.product-title span { margin-top: 4px; color: #7786ad; font-size: 12px; letter-spacing: 1px; }
.header-actions { display: flex; align-items: center; gap: 13px; color: #91a0c3; font-size: 12px; }
.system-status i { width: 7px; height: 7px; margin-right: 7px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.header-actions > a { padding: 10px 13px; border: 1px solid var(--line); }
.header-actions .back-button { color: #fff; border-color: rgba(164, 91, 255, 0.55); background: rgba(138, 77, 255, 0.09); }

.side-nav { position: fixed; z-index: 20; top: 82px; bottom: 0; left: 0; width: 250px; padding: 22px 16px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(12, 19, 52, 0.98), rgba(4, 10, 29, 0.98)); }
.tenant-card { padding: 17px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(88, 55, 170, 0.36), rgba(18, 46, 101, 0.32)); }
.tenant-card > span { display: block; color: #7787af; font-size: 12px; }
.tenant-card strong { display: block; margin: 9px 0 11px; font-size: 13px; }
.tenant-card small { color: #7587af; font-size: 12px; }
.tenant-card small i { width: 6px; height: 6px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.side-nav nav { margin-top: 22px; }
.side-nav nav a { position: relative; padding: 15px 13px; display: grid; grid-template-columns: 31px 1fr; color: #7182aa; border-left: 2px solid transparent; transition: 0.2s; }
.side-nav nav a:hover, .side-nav nav a.is-active { color: #fff; border-left-color: var(--purple-2); background: linear-gradient(90deg, rgba(138, 77, 255, 0.24), transparent); }
.side-nav nav a > span { grid-row: 1 / 3; color: #5e669b; font: 700 12px Arial; }
.side-nav nav strong { font-size: 13px; }
.side-nav nav small { margin-top: 5px; color: #596b94; font-size: 12px; }
.side-usage { position: absolute; left: 16px; right: 16px; bottom: 24px; padding: 16px; border: 1px solid var(--line); background: rgba(20, 27, 70, 0.54); }
.side-usage div { display: flex; justify-content: space-between; color: #7a88ac; font-size: 12px; }
.side-usage b { color: #b9c2db; font: 400 12px Arial; }
.side-usage > i { height: 5px; margin-top: 11px; display: block; background: #151d49; }
.side-usage em { height: 100%; display: block; background: linear-gradient(90deg, var(--blue), var(--purple-2)); box-shadow: 0 0 10px rgba(195, 91, 255, 0.32); }
.side-usage p { margin: 9px 0 0; color: #5d6d95; font-size: 12px; line-height: 1.6; }

main { position: relative; z-index: 2; margin-left: 250px; padding: 102px 24px 28px; }
.workspace-hero { position: relative; min-height: 148px; padding: 26px 29px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(100deg, rgba(21, 21, 67, 0.98), rgba(10, 27, 71, 0.76)), url("../assets/chengshi-space/chengshi-space-hero-v1.png") right 46% / 55% auto no-repeat; }
.workspace-hero::before { position: absolute; top: -100px; right: 18%; width: 360px; height: 360px; content: ""; border-radius: 50%; background: radial-gradient(circle, rgba(166, 74, 255, 0.25), transparent 67%); }
.workspace-hero::after { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(90deg, rgba(11, 16, 52, 0.98) 0, rgba(11, 18, 57, 0.82) 51%, rgba(11, 18, 57, 0.1)); }
.workspace-hero > div { position: relative; z-index: 1; }
.workspace-hero p { margin: 0 0 11px; display: flex; align-items: center; gap: 10px; color: #c184ff; font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.workspace-hero p span { width: 27px; height: 2px; background: var(--purple-2); box-shadow: 0 0 9px var(--purple-2); }
.workspace-hero h1 { margin: 0 0 11px; font-size: 30px; letter-spacing: 0.5px; }
.workspace-hero > div > small { max-width: 680px; display: block; color: #98a5c8; font-size: 13px; line-height: 1.75; }
.hero-metrics { display: grid; grid-template-columns: repeat(3, 128px); border: 1px solid var(--line); background: rgba(7, 13, 40, 0.76); backdrop-filter: blur(8px); }
.hero-metrics article { padding: 14px; border-right: 1px solid var(--line); }
.hero-metrics article:last-child { border: 0; }
.hero-metrics span { display: block; color: #7383aa; font-size: 12px; }
.hero-metrics strong { display: block; margin: 7px 0 6px; color: #fff; font: 700 30px Arial; }
.hero-metrics strong em { margin-left: 3px; color: #9aa4c6; font-size: 12px; font-style: normal; }
.hero-metrics small { color: #63739b; font-size: 12px; }
.hero-metrics small b { color: var(--green); }

.workflow-bar { height: 80px; margin-top: 13px; padding: 13px 25px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: rgba(11, 21, 56, 0.84); }
.workflow-bar > div { min-width: 175px; display: flex; align-items: center; gap: 11px; color: #6879a1; }
.workflow-bar > div > span { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #3c4778; border-radius: 50%; font: 700 12px Arial; }
.workflow-bar p { margin: 0; }
.workflow-bar strong { display: block; font-size: 13px; }
.workflow-bar small { display: block; margin-top: 4px; color: #53638c; font-size: 12px; }
.workflow-bar > i { width: 32px; height: 1px; margin: 0 7px; background: linear-gradient(90deg, #252e60, var(--purple), #252e60); }
.workflow-bar > div.is-active { color: #fff; }
.workflow-bar > div.is-active > span { color: #fff; border-color: var(--purple-2); background: linear-gradient(135deg, var(--purple), var(--pink)); box-shadow: 0 0 17px rgba(175, 80, 255, 0.42); }

.panel { position: relative; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(12, 23, 59, 0.97), rgba(6, 14, 40, 0.96)); box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16); }
.panel::before, .panel::after { position: absolute; z-index: 2; width: 15px; height: 15px; content: ""; pointer-events: none; }
.panel::before { top: -1px; left: -1px; border-top: 1px solid var(--purple-2); border-left: 1px solid var(--purple-2); }
.panel::after { right: -1px; bottom: -1px; border-right: 1px solid var(--blue); border-bottom: 1px solid var(--blue); }
.comic-studio { margin-top: 13px; }
.studio-head { min-height: 100px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.studio-head > div:first-child > span, .section-head > div:first-child > span { color: var(--purple-2); font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.studio-head h2, .section-head h2 { margin: 8px 0 6px; font-size: 20px; }
.studio-head small, .section-head p { color: #6f80a8; font-size: 12px; }
.studio-actions, .preview-actions { display: flex; gap: 9px; }
.button { min-height: 46px; padding: 0 17px; color: #fff; border: 1px solid var(--line); background: transparent; font-size: 13px; }
.button b { margin-left: 9px; color: #e9ceff; }
.arrow-icon { position: relative; width: 17px; height: 12px; display: inline-block; vertical-align: middle; }
.arrow-icon::before { position: absolute; top: 5px; left: 1px; width: 14px; height: 2px; content: ""; background: currentColor; }
.arrow-icon::after { position: absolute; top: 2px; right: 1px; width: 6px; height: 6px; content: ""; transform: rotate(45deg); border-top: 2px solid currentColor; border-right: 2px solid currentColor; }
.play-icon { position: relative; width: 13px; height: 14px; display: inline-block; vertical-align: middle; }
.play-icon::before { position: absolute; top: 1px; left: 2px; width: 0; height: 0; content: ""; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor; }
.button.primary { border: 0; background: linear-gradient(110deg, #6340ed, #b347e5); box-shadow: 0 10px 25px rgba(119, 56, 231, 0.3); }
.button.purple { border: 0; background: linear-gradient(110deg, #7544f1, #d14fbe); box-shadow: 0 10px 25px rgba(136, 61, 226, 0.26); }
.button.ghost { color: #9ba8ca; background: rgba(24, 37, 82, 0.5); }
.button:hover { filter: brightness(1.12); }
.button:disabled { cursor: wait; opacity: 0.58; }

.comic-grid { display: grid; grid-template-columns: 335px minmax(500px, 1fr) 315px; min-height: 955px; }
.config-column, .storyboard-column, .status-column { min-width: 0; padding: 20px; }
.config-column { border-right: 1px solid var(--line); }
.status-column { border-left: 1px solid var(--line); }
.storyboard-column { background: radial-gradient(circle at 50% 25%, rgba(93, 54, 183, 0.15), transparent 48%); }
.column-heading { min-height: 44px; display: flex; align-items: center; gap: 11px; }
.column-heading > span { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: #cb95ff; border: 1px solid rgba(195, 91, 255, 0.38); font: 700 12px Arial; }
.column-heading > div { display: flex; flex-direction: column; }
.column-heading strong { font-size: 16px; }
.column-heading small { margin-top: 4px; color: #65749c; font-size: 12px; }
.output-heading { padding-bottom: 14px; border-bottom: 1px solid rgba(112, 134, 214, 0.16); }
.run-state { margin-left: auto; color: #8290b2; font-size: 12px; font-weight: 400; }
.run-state i { width: 7px; height: 7px; margin-right: 7px; display: inline-block; border-radius: 50%; background: var(--amber); box-shadow: 0 0 7px var(--amber); }
.run-state.is-running i { background: var(--purple-2); box-shadow: 0 0 9px var(--purple-2); animation: pulse 0.9s infinite; }
.run-state.is-success { color: var(--green); }
.run-state.is-success i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.run-state.is-local { color: var(--amber); }
.run-state.is-error { color: #ff8ea7; }
.run-state.is-error i { background: #ff5b80; box-shadow: 0 0 8px #ff5b80; }
@keyframes pulse { 50% { opacity: 0.28; } }

.comic-form { margin-top: 16px; display: grid; gap: 12px; }
.comic-form label { display: grid; gap: 7px; }
.comic-form label > span, .control-group > p, .production-options label > span, .aspect-group > span { margin: 0; color: #8796b8; font-size: 12px; }
.comic-form label > span small { color: #5c6a91; font-size: 12px; }
.comic-form input, .comic-form textarea, .voice-card select { width: 100%; padding: 11px 12px; color: #e8edff; border: 1px solid rgba(112, 134, 214, 0.27); outline: none; resize: vertical; background: rgba(4, 12, 36, 0.72); font-size: 12px; line-height: 1.65; }
.comic-form input:focus, .comic-form textarea:focus, .voice-card select:focus { border-color: var(--purple-2); box-shadow: 0 0 0 2px rgba(166, 77, 255, 0.1); }
.control-group { margin-top: 16px; }
.control-group > p { margin-bottom: 9px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.choice { min-height: 46px; padding: 7px 9px; display: flex; align-items: center; color: #7c8caf; border: 1px solid var(--line); background: rgba(18, 30, 72, 0.38); font-size: 12px; }
.choice i { position: relative; width: 25px; height: 25px; margin-right: 7px; display: block; flex: 0 0 auto; color: #fff; border-radius: 7px; background: linear-gradient(135deg, #4e67ee, #934ee9); font-style: normal; }
.genre-icon::before, .genre-icon::after { position: absolute; content: ""; }
.genre-park::before { left: 6px; bottom: 5px; width: 13px; height: 12px; border: 1px solid rgba(255, 255, 255, 0.9); border-top-width: 3px; }
.genre-park::after { left: 9px; bottom: 8px; width: 2px; height: 2px; background: #fff; box-shadow: 5px 0 #fff, 0 -4px #fff, 5px -4px #fff; }
.genre-brand::before { left: 6px; top: 9px; width: 13px; height: 10px; border: 1px solid #fff; border-radius: 2px; }
.genre-brand::after { left: 12px; top: 6px; width: 2px; height: 14px; background: #fff; box-shadow: -5px 3px 0 -0.2px rgba(255, 255, 255, 0.8), 5px 3px 0 -0.2px rgba(255, 255, 255, 0.8); }
.genre-city::before { left: 6px; bottom: 5px; width: 5px; height: 13px; border: 1px solid #fff; box-shadow: 7px 4px 0 -1px transparent, 7px 4px 0 0 #fff; }
.genre-city::after { left: 8px; bottom: 8px; width: 1px; height: 1px; background: #fff; box-shadow: 0 -4px #fff, 7px 0 #fff, 7px -4px #fff; }
.genre-tech::before { top: 7px; left: 7px; width: 9px; height: 9px; border: 1px solid #fff; border-radius: 2px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16); }
.genre-tech::after { top: 5px; left: 11px; width: 2px; height: 2px; background: #fff; box-shadow: 0 13px #fff, -6px 6px #fff, 6px 6px #fff; }
.choice:hover, .choice.active { color: #fff; border-color: #9558f7; background: rgba(125, 67, 229, 0.18); box-shadow: inset 0 -2px 0 var(--purple); }
.style-list { display: flex; flex-wrap: wrap; gap: 7px; }
.style-chip { padding: 8px 10px; color: #7e8caf; border: 1px solid var(--line); background: rgba(18, 30, 72, 0.34); font-size: 12px; }
.style-chip:hover, .style-chip.active { color: #fff; border-color: rgba(195, 91, 255, 0.65); background: linear-gradient(110deg, rgba(95, 63, 224, 0.24), rgba(184, 72, 207, 0.2)); }
.character-form { margin-top: 15px; }
.reference-upload { margin-top: 14px; }
.reference-upload > input { display: none; }
.upload-zone { width: 100%; min-height: 115px; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text); border: 1px dashed rgba(167, 93, 248, 0.52); background: linear-gradient(145deg, rgba(92, 49, 174, 0.16), rgba(15, 37, 87, 0.12)); }
.upload-zone:hover { border-color: var(--purple-2); background: rgba(138, 77, 255, 0.08); }
.upload-visual { position: relative; width: 39px; height: 29px; margin-bottom: 7px; }
.upload-visual i:first-child { position: absolute; left: 6px; bottom: 0; width: 29px; height: 21px; border: 1px solid #a05cff; border-radius: 5px; }
.upload-visual i:nth-child(2) { position: absolute; top: 0; left: 14px; width: 13px; height: 13px; transform: rotate(45deg); border-top: 2px solid var(--pink); border-left: 2px solid var(--pink); }
.upload-visual i:last-child { position: absolute; top: 5px; left: 19px; width: 2px; height: 18px; background: var(--pink); box-shadow: 0 0 7px var(--pink); }
.upload-zone strong { font-size: 13px; }
.upload-zone p { margin: 5px 0; color: #7484aa; font-size: 12px; }
.upload-zone small { color: #586991; font-size: 12px; }
.file-name { margin-top: 7px; display: block; overflow: hidden; color: #6879a1; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.reference-grid { margin-top: 8px; min-height: 70px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.reference-empty { grid-column: 1 / -1; display: grid; place-items: center; color: #53648d; border: 1px solid rgba(112, 134, 214, 0.14); background: rgba(5, 13, 37, 0.45); font-size: 12px; }
.reference-item { position: relative; height: 78px; overflow: hidden; border: 1px solid rgba(166, 94, 244, 0.28); background: #080f2d; }
.reference-item.is-uploading { opacity: 0.68; }
.reference-item.is-complete { border-color: rgba(52, 211, 153, 0.72); }
.reference-item.is-failed { border-color: rgba(255, 91, 128, 0.8); }
.reference-item img { width: 100%; height: 100%; display: block; object-fit: cover; }
.reference-item span { position: absolute; right: 0; bottom: 0; left: 0; padding: 4px 5px; overflow: hidden; color: #fff; background: rgba(4, 7, 24, 0.78); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.production-options { margin-top: 16px; padding-top: 15px; border-top: 1px solid rgba(112, 134, 214, 0.17); }
.production-options label { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.production-options label strong { color: #d5b8ff; font-size: 12px; }
.production-options input[type="range"] { grid-column: 1 / -1; width: 100%; margin-top: 10px; accent-color: var(--purple); }
.aspect-group { margin-top: 15px; }
.aspect-group > div { margin-top: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.aspect { padding: 8px 5px; color: #7484aa; border: 1px solid var(--line); background: rgba(17, 28, 68, 0.4); font-size: 12px; }
.aspect:hover, .aspect.active { color: #fff; border-color: var(--purple); background: rgba(128, 70, 224, 0.2); }

.story-overview { margin-top: 15px; padding: 16px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(163, 88, 244, 0.23); background: linear-gradient(105deg, rgba(68, 38, 141, 0.28), rgba(15, 31, 77, 0.52)); }
.story-overview > div > span { color: #c78cff; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; }
.story-overview h3 { margin: 7px 0 5px; font-size: 20px; }
.story-overview p { max-width: 500px; margin: 0; color: #7f8fb1; font-size: 12px; line-height: 1.6; }
.story-overview dl { margin: 0; display: grid; grid-template-columns: repeat(3, auto); gap: 7px; }
.story-overview dl div { min-width: 74px; padding: 8px; border: 1px solid rgba(112, 134, 214, 0.17); background: rgba(5, 12, 36, 0.44); }
.story-overview dt { color: #66769d; font-size: 12px; }
.story-overview dd { margin: 5px 0 0; color: #c4cce1; font-size: 12px; }
.storyboard-toolbar { height: 51px; display: flex; align-items: center; justify-content: space-between; }
.storyboard-toolbar > div { display: flex; gap: 6px; }
.storyboard-toolbar button { padding: 7px 10px; color: #7181a6; border: 1px solid rgba(112, 134, 214, 0.15); background: rgba(14, 25, 64, 0.35); font-size: 12px; }
.storyboard-toolbar button.is-active { color: #fff; border-color: var(--purple); background: rgba(128, 70, 224, 0.2); }
.storyboard-toolbar > span { color: #5d6c92; font-size: 12px; }
.storyboard-grid { min-height: 765px; padding: 14px; overflow: auto; border: 1px solid rgba(112, 134, 214, 0.18); background: rgba(4, 10, 31, 0.63); scrollbar-color: #4f397d #0b1234; }
.storyboard-welcome { min-height: 690px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.comic-orbit { width: 112px; height: 112px; display: grid; place-items: center; border: 1px solid rgba(195, 91, 255, 0.34); border-radius: 50%; box-shadow: 0 0 0 17px rgba(126, 68, 227, 0.05), 0 0 38px rgba(173, 74, 244, 0.12); }
.comic-orbit img { width: 62px; height: 62px; border-radius: 16px; }
.storyboard-welcome h3 { margin: 26px 0 9px; font-size: 20px; }
.storyboard-welcome > p { max-width: 530px; margin: 0; color: #7181a7; font-size: 12px; line-height: 1.8; }
.storyboard-welcome > div:last-child { margin-top: 27px; display: flex; align-items: center; color: #7383a8; font-size: 12px; }
.storyboard-welcome > div:last-child i { width: 26px; height: 1px; margin: 0 8px; background: linear-gradient(90deg, #36416e, var(--purple), #36416e); }
.shot-card { position: relative; margin-bottom: 12px; padding: 13px; display: grid; grid-template-columns: 158px 1fr; gap: 15px; overflow: hidden; border: 1px solid rgba(112, 134, 214, 0.2); background: linear-gradient(135deg, rgba(22, 35, 82, 0.78), rgba(10, 18, 49, 0.8)); transition: 0.2s; }
.shot-card:last-child { margin-bottom: 0; }
.shot-card:hover, .shot-card.is-active { border-color: rgba(190, 89, 255, 0.7); box-shadow: inset 3px 0 var(--purple-2), 0 10px 25px rgba(0, 0, 0, 0.12); }
.shot-visual { position: relative; min-height: 142px; overflow: hidden; background: radial-gradient(circle at 65% 28%, var(--shot-accent, #8c54ef), #1b285c 40%, #0a1230 80%); }
.shot-visual::before { position: absolute; inset: 0; content: ""; opacity: 0.55; background-image: linear-gradient(135deg, transparent 35%, rgba(255, 255, 255, 0.08) 35% 36%, transparent 36%), linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px); background-size: 100% 100%, 100% 23px; }
.shot-visual img { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 142px; display: block; object-fit: cover; }
.shot-number { position: absolute; z-index: 2; top: 9px; left: 9px; padding: 5px 7px; color: #fff; background: rgba(5, 7, 24, 0.74); font: 700 12px Arial; }
.shot-duration { position: absolute; z-index: 2; right: 8px; bottom: 8px; padding: 4px 6px; color: #fff; background: rgba(5, 7, 24, 0.72); font-size: 12px; }
.shot-fallback { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.78); text-align: center; }
.shot-fallback.is-generating { background: rgba(7, 12, 38, 0.42); }
.shot-fallback.is-generating i { width: 24px; height: 24px; margin-bottom: 9px; border: 2px solid rgba(208, 167, 255, 0.2); border-top-color: #d0a7ff; border-radius: 50%; animation: comicSpin 0.85s linear infinite; }
.shot-fallback.is-failed { color: #ffb0c2; background: rgba(74, 15, 43, 0.38); }
@keyframes comicSpin { to { transform: rotate(360deg); } }
.shot-fallback b { font: 700 20px Arial; }
.shot-fallback span { margin-top: 7px; font-size: 12px; }
.shot-copy { min-width: 0; display: flex; flex-direction: column; }
.shot-copy > span { color: #b987ef; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.shot-copy h4 { margin: 6px 0 6px; font-size: 16px; }
.shot-copy > p { margin: 0; color: #8291b2; font-size: 12px; line-height: 1.65; }
.shot-dialogue { margin-top: 8px; padding: 8px 10px; color: #cbd3e8; border-left: 2px solid var(--purple); background: rgba(117, 67, 211, 0.1); font-size: 12px; line-height: 1.6; }
.shot-meta { margin-top: auto; padding-top: 9px; display: flex; align-items: center; gap: 7px; }
.shot-meta span { padding: 5px 7px; color: #7182a7; border: 1px solid rgba(112, 134, 214, 0.14); font-size: 12px; }
.voice-button { margin-left: auto; padding: 6px 9px; color: #d9b7ff; border: 1px solid rgba(195, 91, 255, 0.36); background: rgba(121, 61, 209, 0.13); font-size: 12px; }
.voice-button:hover { color: #fff; border-color: var(--purple-2); }
.voice-button:disabled { cursor: wait; opacity: 0.55; }

.engine-card, .task-log, .cast-card, .voice-card, .hook-card { margin-top: 15px; border: 1px solid rgba(112, 134, 214, 0.19); background: rgba(6, 14, 40, 0.63); }
.engine-card { padding: 14px; text-align: center; }
.engine-head { display: flex; align-items: center; justify-content: space-between; color: #7788ad; font-size: 12px; }
.engine-head span i { width: 6px; height: 6px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--purple-2); box-shadow: 0 0 8px var(--purple-2); }
.engine-head b { color: #aa87d7; font-size: 12px; font-weight: 400; }
.progress-ring { --progress: 0; width: 118px; height: 118px; margin: 17px auto 12px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--purple-2) calc(var(--progress) * 1%), rgba(81, 94, 151, 0.18) 0); box-shadow: 0 0 26px rgba(155, 73, 239, 0.12); }
.progress-ring::before { grid-area: 1 / 1; width: 94px; height: 94px; content: ""; border-radius: 50%; background: #091332; box-shadow: inset 0 0 18px rgba(107, 71, 186, 0.16); }
.progress-ring strong { z-index: 1; grid-area: 1 / 1; font: 700 30px Arial; }
.progress-ring small { margin-left: 2px; color: #8492b5; font-size: 12px; }
.engine-card > p { margin: 0; color: #7a8aad; font-size: 12px; }
.progress-track { height: 4px; margin-top: 13px; overflow: hidden; background: #172049; }
.progress-track i { width: 0; height: 100%; display: block; background: linear-gradient(90deg, var(--blue), var(--purple-2), var(--pink)); transition: width 0.35s; }
.task-log { padding: 5px 13px; }
.task-log p { margin: 0; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(112, 134, 214, 0.13); font-size: 12px; }
.task-log p:last-child { border: 0; }
.task-log span { color: #66779e; }
.task-log b { max-width: 170px; overflow: hidden; color: #b3bed8; font-weight: 400; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.cast-card, .voice-card, .hook-card { padding: 14px; }
.mini-heading { display: flex; align-items: baseline; justify-content: space-between; }
.mini-heading span, .hook-card > span { color: var(--purple-2); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; }
.mini-heading strong { font-size: 12px; }
.cast-list { margin-top: 10px; }
.cast-list p { margin: 0 0 7px; padding: 8px; display: flex; align-items: center; border: 1px solid rgba(112, 134, 214, 0.13); background: rgba(20, 31, 72, 0.36); }
.cast-list p:last-child { margin-bottom: 0; }
.cast-list p > i { width: 31px; height: 31px; margin-right: 8px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; border-radius: 9px; background: linear-gradient(135deg, #4f60d9, #a34be1); font-size: 12px; font-style: normal; }
.avatar-silhouette { position: relative; overflow: hidden; }
.avatar-silhouette::before { position: absolute; top: 6px; left: 11px; width: 9px; height: 9px; content: ""; border: 1.5px solid #fff; border-radius: 50%; }
.avatar-silhouette::after { position: absolute; left: 7px; bottom: 4px; width: 17px; height: 10px; content: ""; border: 1.5px solid #fff; border-radius: 10px 10px 3px 3px; background: rgba(255, 255, 255, 0.08); }
.cast-list p > span { display: flex; flex-direction: column; }
.cast-list strong { font-size: 12px; }
.cast-list small { margin-top: 3px; color: #61729a; font-size: 12px; }
.voice-card label { margin-top: 10px; display: grid; grid-template-columns: 75px 1fr; align-items: center; gap: 7px; }
.voice-card label span { color: #7181a5; font-size: 12px; }
.voice-card select { padding: 7px 8px; font-size: 12px; }
.voice-player { min-height: 42px; margin-top: 10px; padding: 9px; display: flex; align-items: center; color: #65769c; border: 1px dashed rgba(112, 134, 214, 0.2); font-size: 12px; line-height: 1.5; }
.voice-player audio { width: 100%; height: 30px; }
.hook-card { position: relative; overflow: hidden; border-color: rgba(195, 91, 255, 0.26); background: linear-gradient(135deg, rgba(77, 42, 151, 0.3), rgba(13, 25, 65, 0.56)); }
.hook-card::after { position: absolute; right: -34px; bottom: -42px; width: 100px; height: 100px; content: ""; border-radius: 50%; background: rgba(202, 78, 228, 0.08); }
.hook-card strong { margin-top: 7px; display: block; font-size: 12px; }
.hook-card p { position: relative; z-index: 1; margin: 8px 0 0; color: #8997b8; font-size: 12px; line-height: 1.7; }

.preview-section, .assets-section { margin-top: 14px; }
.section-head { min-height: 102px; padding: 18px 21px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: 20px; }
.section-head p { margin: 0; }
.preview-layout { padding: 20px; display: grid; grid-template-columns: minmax(520px, 1.15fr) minmax(460px, 0.85fr); gap: 20px; }
.preview-stage-wrap, .timeline-panel { min-width: 0; }
.preview-label { height: 38px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; color: #7788ad; border: 1px solid rgba(112, 134, 214, 0.18); border-bottom: 0; background: rgba(8, 16, 44, 0.72); font-size: 12px; }
.preview-label span i { width: 6px; height: 6px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.preview-label b { color: #c6a4ef; font-weight: 400; }
.preview-stage { position: relative; height: 440px; overflow: hidden; border: 1px solid rgba(138, 81, 226, 0.36); background: radial-gradient(circle at 68% 22%, #5a318c, #1a2b5f 42%, #080e2a 82%); }
.preview-stage.ratio-9-16 { max-width: 760px; }
.preview-stage::after { position: absolute; inset: 0; content: ""; pointer-events: none; border: 8px solid rgba(5, 8, 25, 0.3); box-shadow: inset 0 0 80px rgba(4, 7, 24, 0.6); }
.preview-grid { position: absolute; inset: 0; opacity: 0.25; background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 54px 54px; }
.preview-placeholder { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.preview-placeholder img { width: 72px; height: 72px; border-radius: 19px; box-shadow: 0 0 28px rgba(187, 81, 255, 0.25); }
.preview-placeholder strong { margin-top: 19px; font-size: 16px; }
.preview-placeholder span { margin-top: 8px; color: #8390b3; font-size: 12px; }
.preview-scene { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; background: radial-gradient(circle at 70% 25%, var(--scene-accent, #8d4ff0), #1d2c63 38%, #080e2a 80%); animation: sceneIn 0.65s ease both; }
.preview-scene.has-image { background: #080e2a; }
.preview-scene.has-image::before { position: absolute; z-index: 2; inset: 0; content: ""; background: linear-gradient(0deg, rgba(3, 6, 20, 0.96), rgba(4, 8, 28, 0.05) 72%); }
.preview-scene:not(.has-image)::before { position: absolute; inset: 0; content: ""; opacity: 0.42; background: linear-gradient(120deg, transparent 47%, rgba(255, 255, 255, 0.1) 48%, transparent 49%), radial-gradient(circle at 30% 38%, rgba(255, 255, 255, 0.15), transparent 18%); }
@keyframes sceneIn { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: scale(1); } }
.preview-image-backdrop { position: absolute; z-index: 0; inset: -8%; opacity: 0.48; background-position: center; background-repeat: no-repeat; background-size: cover; filter: blur(18px) saturate(1.15); transform: scale(1.08); }
.preview-image-layer { position: absolute; z-index: 1; inset: 0; background-position: center; background-repeat: no-repeat; background-size: contain; }
.preview-stage.is-playing .camera-motion-0 .preview-image-backdrop { animation: comicZoomIn var(--shot-duration, 4s) ease-out both; }
.preview-stage.is-playing .camera-motion-1 .preview-image-backdrop { animation: comicPanLeft var(--shot-duration, 4s) ease-in-out both; }
.preview-stage.is-playing .camera-motion-2 .preview-image-backdrop { animation: comicZoomOut var(--shot-duration, 4s) ease-in-out both; }
.preview-stage.is-playing .camera-motion-3 .preview-image-backdrop { animation: comicPanRight var(--shot-duration, 4s) ease-in-out both; }
@keyframes comicZoomIn { from { transform: scale(1.04); } to { transform: scale(1.16); } }
@keyframes comicZoomOut { from { transform: scale(1.17); } to { transform: scale(1.05); } }
@keyframes comicPanLeft { from { transform: scale(1.13) translateX(2.8%); } to { transform: scale(1.13) translateX(-2.8%); } }
@keyframes comicPanRight { from { transform: scale(1.13) translateX(-2.8%); } to { transform: scale(1.13) translateX(2.8%); } }
.preview-scene-copy { position: relative; z-index: 3; padding: 29px 32px 34px; }
.preview-scene-copy > span { color: #e0baff; font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.preview-scene-copy h3 { margin: 8px 0 7px; font-size: 30px; }
.preview-scene-copy > p { max-width: 700px; margin: 0; color: #bac5dd; font-size: 12px; line-height: 1.7; }
.preview-subtitle { margin-top: 15px; padding: 10px 14px; display: inline-block; color: #fff; background: rgba(4, 6, 20, 0.73); border-left: 3px solid var(--purple-2); font-size: 13px; }
.preview-play-progress { position: absolute; z-index: 4; right: 0; bottom: 0; left: 0; height: 3px; transform-origin: left; background: linear-gradient(90deg, #9d59f4, #5bcaf0); animation: comicPreviewProgress var(--shot-duration, 4s) linear both; }
@keyframes comicPreviewProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.preview-disclaimer { min-height: 46px; padding: 10px 12px; display: flex; align-items: center; color: #7f8eaf; border: 1px solid rgba(112, 134, 214, 0.18); border-top: 0; background: rgba(8, 16, 44, 0.72); font-size: 12px; line-height: 1.6; }
.preview-disclaimer i { width: 22px; height: 22px; margin-right: 9px; display: grid; place-items: center; flex: 0 0 auto; color: var(--amber); border: 1px solid rgba(255, 190, 91, 0.35); border-radius: 50%; font-style: normal; }
.notice-icon { position: relative; }
.notice-icon::before { position: absolute; top: 5px; left: 9px; width: 2px; height: 7px; content: ""; border-radius: 2px; background: var(--amber); }
.notice-icon::after { position: absolute; left: 9px; bottom: 4px; width: 2px; height: 2px; content: ""; border-radius: 50%; background: var(--amber); }
.timeline-panel { min-height: 524px; border: 1px solid rgba(112, 134, 214, 0.18); background: rgba(6, 14, 40, 0.62); }
.timeline-head { height: 48px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(112, 134, 214, 0.16); }
.timeline-head span { color: #b780ef; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.timeline-head strong { color: #7c8caf; font-size: 12px; font-weight: 400; }
.timeline-list { height: 382px; padding: 14px; overflow: auto; scrollbar-color: #4f397d #0b1234; }
.timeline-empty { height: 100%; display: grid; place-items: center; color: #596a91; font-size: 12px; }
.timeline-item { position: relative; min-height: 54px; padding: 8px 10px 8px 58px; cursor: pointer; border-left: 1px solid #35416f; }
.timeline-item::before { position: absolute; top: 14px; left: -5px; width: 9px; height: 9px; content: ""; border: 2px solid #151d49; border-radius: 50%; background: #6e55c7; box-shadow: 0 0 0 2px rgba(110, 85, 199, 0.18); }
.timeline-item:hover, .timeline-item.is-active { background: linear-gradient(90deg, rgba(126, 67, 223, 0.18), transparent); }
.timeline-item.is-active::before { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.timeline-item > b { position: absolute; top: 11px; left: 12px; color: #8998b8; font: 700 12px Arial; }
.timeline-item strong { display: block; font-size: 12px; }
.timeline-item span { margin-top: 4px; display: block; color: #617199; font-size: 12px; }
.timeline-insight { height: 92px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(112, 134, 214, 0.16); }
.timeline-insight div { padding: 13px; border-right: 1px solid rgba(112, 134, 214, 0.14); }
.timeline-insight div:last-child { border: 0; }
.timeline-insight span { display: block; color: #617199; font-size: 12px; }
.timeline-insight strong { margin-top: 7px; display: block; color: #d1b5ed; font-size: 12px; }

.section-head.compact { min-height: 94px; }
.asset-summary { display: flex; border: 1px solid rgba(112, 134, 214, 0.18); }
.asset-summary span { padding: 12px 14px; color: #7181a7; border-right: 1px solid rgba(112, 134, 214, 0.16); font-size: 12px; }
.asset-summary span:last-child { border: 0; }
.asset-summary b { margin-left: 5px; color: #d7b7f6; }
.asset-list { min-height: 170px; padding: 18px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 11px; }
.asset-empty { grid-column: 1 / -1; min-height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #617198; border: 1px dashed rgba(112, 134, 214, 0.2); background: rgba(6, 14, 39, 0.45); }
.asset-empty strong { font-size: 13px; }
.asset-empty span { margin-top: 7px; font-size: 12px; }
.asset-card { min-width: 0; overflow: hidden; border: 1px solid rgba(112, 134, 214, 0.18); background: rgba(7, 15, 42, 0.7); }
.asset-card .asset-visual { position: relative; height: 115px; overflow: hidden; background: radial-gradient(circle at 65% 28%, var(--asset-accent, #8d4eea), #192759 42%, #080e2a 80%); }
.asset-card img { width: 100%; height: 100%; display: block; object-fit: cover; }
.asset-card .asset-visual span { position: absolute; top: 7px; left: 7px; padding: 4px 6px; color: #fff; background: rgba(4, 7, 22, 0.72); font-size: 12px; }
.asset-card > div:last-child { padding: 9px; }
.asset-card strong { overflow: hidden; display: block; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.asset-card small { margin-top: 4px; display: block; color: #617198; font-size: 12px; }

footer { margin-top: 14px; padding: 18px 4px 4px; display: flex; align-items: center; justify-content: space-between; color: #5f6d91; font-size: 12px; }

.toast { position: fixed; z-index: 80; right: 28px; bottom: 28px; min-width: 280px; max-width: 430px; padding: 14px 17px; color: #fff; border: 1px solid rgba(195, 91, 255, 0.5); background: rgba(18, 15, 52, 0.96); box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3); font-size: 12px; line-height: 1.6; animation: toastIn 0.25s ease both; }
.toast.is-error { border-color: rgba(255, 93, 130, 0.6); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 1600px) {
  .comic-grid { grid-template-columns: 315px minmax(470px, 1fr) 300px; }
  .hero-metrics { grid-template-columns: repeat(3, 116px); }
  .workflow-bar > div { min-width: 155px; }
  .shot-card { grid-template-columns: 145px 1fr; }
  .asset-list { grid-template-columns: repeat(5, 1fr); }
}
