/* Shared colors for the approved 清晰森绿 appearance modes. */
:root{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;
  color:var(--ink);background:var(--canvas);font-size:14px;line-height:1.6;font-synthesis:none;
  --canvas:#f1f3f4;--surface:#fff;--surface-subtle:#f5f7f6;--sidebar:#e7ece9;
  --ink:#202923;--muted:#52615a;--line:#d5ddd8;--control-border:#82938a;
  --green:#324f40;--green-hover:#253f32;--selected:#e5eee8;--accent:#324f40;
  --success:#286844;--info:#315f91;--info-soft:#edf3fb;
  --warning:#85501e;--warning-soft:#fff4e5;--warning-border:#d5b58a;
  --danger:#a43d32;--danger-soft:#fff0ed;
  --on-primary:#fff;--on-danger:#fff;
  --media-canvas:#d9d9d9;--media-ink:#4d4d4d;
  --shadow-nav:#26382f05;--shadow-tab:#273b2410;--shadow-card:#26382f08;--shadow-composer:#26382f04;
  --shadow-dialog:#172b2433;--shadow-history:#20261d30;--overlay:#172b245c;--overlay-history:#252b2359;
  color-scheme:light;
}
:root[data-theme=dark]{
  --canvas:#151a18;--surface:#1e2521;--surface-subtle:#252e28;--sidebar:#1a221d;
  --ink:#e9eeeb;--muted:#b0bdb5;--line:#3e4c43;--control-border:#718578;
  --green:#9ac9ae;--green-hover:#b4dbc4;--selected:#2b4032;--accent:#9ac9ae;
  --success:#9bd4ad;--info:#a6c9f4;--info-soft:#25364a;
  --warning:#eec494;--warning-soft:#3c3022;--warning-border:#8d7151;
  --danger:#f5aaa0;--danger-soft:#422a27;
  --on-primary:#16271d;--on-danger:#331914;
  --shadow-nav:#00000024;--shadow-tab:#00000040;--shadow-card:#00000030;--shadow-composer:#00000020;
  --shadow-dialog:#00000070;--shadow-history:#00000070;--overlay:#050b09a6;--overlay-history:#050b09a6;
  color-scheme:dark;
}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{outline-offset:3px}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}button{border:1px solid var(--line);background:var(--surface);border-radius:7px;padding:9px 13px}button:hover:not(:disabled){background:var(--surface-subtle)}a{color:var(--green);text-underline-offset:3px}input,select,textarea{border:1px solid var(--control-border);border-radius:7px;background:var(--surface);padding:10px 12px;max-width:100%}input:focus,select:focus,textarea:focus{outline:2px solid var(--green)}textarea{resize:vertical;width:100%}select{width:100%}label{display:block;margin:0 0 7px;font-size:12px;font-weight:600}h1,h2,h3,p{margin-top:0}.primary,.actions button[type=submit]{background:var(--green);border-color:var(--green);color:var(--on-primary)}.primary:hover:not(:disabled),.actions button[type=submit]:hover:not(:disabled){background:var(--green-hover)}.secondary{background:var(--surface);color:var(--muted)}.eyebrow{font-size:12px;letter-spacing:1.7px;font-weight:650;color:var(--muted)}.hint{font-size:12px;color:var(--muted);margin:7px 0 17px;line-height:1.75}.small{font-size:12px;color:var(--muted);margin-left:auto}.optional{font-weight:400;color:var(--muted);margin-left:5px}
.sidebar{position:fixed;inset:0 auto 0 0;width:204px;background:var(--sidebar);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:30px 18px;z-index:20}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font-size:23px;font-weight:650;letter-spacing:2px;padding:0 9px;margin-bottom:48px}.brand-mark{display:grid;place-items:center;width:39px;height:44px;color:var(--on-primary);background:var(--green);border-radius:11px 3px 11px 3px;font-size:20px;font-weight:400}.brand small{display:block;font-size:12px;letter-spacing:1.8px;color:var(--muted);font-weight:500}.nav-label{font-size:12px;color:var(--muted);margin:0 13px 12px}.nav-item{width:100%;display:flex;align-items:center;gap:11px;background:transparent;border:0;text-align:left;color:var(--muted);padding:12px 13px;margin-bottom:7px;border-radius:7px}.nav-item>span{font-size:18px;font-weight:400;width:20px;line-height:1}.nav-item.active{background:var(--surface);color:var(--green);font-weight:600;box-shadow:inset 3px 0 var(--green),0 2px 5px var(--shadow-nav)}.nav-item small{margin-left:auto;background:var(--surface-subtle);border-radius:5px;padding:0 6px;font-size:12px;color:var(--muted)}.sidebar-foot{margin-top:auto;border-top:1px solid var(--line);padding:20px 10px 0;font-size:12px;color:var(--muted)}.sidebar-foot small{display:block;margin-top:11px;color:var(--muted);font-size:12px;line-height:1.8}.live-dot,.local i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--success);margin-right:6px}.main-shell{margin-left:204px}.topbar{height:65px;display:flex;align-items:center;justify-content:space-between;padding:0 35px;border-bottom:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:12px}.topbar strong{font-weight:500;color:var(--ink)}.slash{margin:0 13px;color:var(--muted)}.local{font-size:12px;color:var(--muted)}.page-content{padding:32px 35px 0;max-width:1720px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.page-heading h1{font-size:30px;font-weight:600;letter-spacing:-.8px;margin:4px 0 7px;line-height:1.5}.title-dot{color:var(--accent);margin-left:4px}.page-heading p{font-size:12px;color:var(--muted);margin:0}.page-heading>.primary{padding:11px 18px;font-size:12px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:26px}.stat{padding:17px 21px;border:1px solid var(--line);border-radius:10px;background:var(--surface);display:grid;grid-template-columns:1fr auto;align-items:center}.stat>span{font-size:12px;color:var(--muted)}.stat strong{font-size:29px;line-height:1.3;grid-row:span 2;font-weight:500;font-variant-numeric:tabular-nums}.stat small{font-size:12px;color:var(--muted);margin-top:7px}.stat:last-child strong{color:var(--ink)}.library-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px;flex-wrap:wrap}.type-tabs{display:flex;padding:3px;gap:2px;background:var(--sidebar);border-radius:7px}.type-tabs button{border:0;border-radius:5px;background:transparent;font-size:12px;color:var(--muted);min-width:54px;padding:5px 12px}.type-tabs button.active{color:var(--green);background:var(--surface);box-shadow:0 1px 4px var(--shadow-tab)}.filter-controls{display:flex;gap:8px}.filter-controls input{width:205px;font-size:12px;background:var(--surface)}.filter-controls select{width:110px;font-size:12px}.library-layout{display:grid;grid-template-columns:minmax(450px,1fr) 340px;gap:20px;align-items:start}.task-list,.detail-pane{border:1px solid var(--line);border-radius:10px;background:var(--surface);overflow:hidden}.list-heading{display:flex;align-items:center;justify-content:space-between;padding:17px 19px;border-bottom:1px solid var(--line)}.list-heading strong{font-size:12px;font-weight:600}.list-heading>span{font-size:12px;color:var(--muted)}.table-scroll{overflow:auto;max-height:calc(100vh - 407px);min-height:300px}table{width:100%;border-collapse:collapse;text-align:left}th{font-weight:500;color:var(--muted);font-size:12px;background:var(--surface-subtle);padding:11px 10px;white-space:nowrap;position:sticky;top:0;z-index:1}th:first-child{padding-left:18px}td{padding:12px 10px;border-top:1px solid var(--line);font-size:12px;white-space:nowrap}td:first-child{padding-left:17px;max-width:250px}tr.selected{background:var(--selected)}tr.selected td:first-child{box-shadow:inset 3px 0 var(--green)}tr:hover{background:var(--surface-subtle)}.task-select{display:flex;align-items:center;gap:11px;text-align:left;width:100%;padding:0;border:0;background:none}.task-select:hover:not(:disabled){background:transparent}.task-select img{width:36px;height:48px;object-fit:cover;object-position:center;border-radius:5px;background:var(--media-canvas);flex-shrink:0}.task-name{min-width:0;max-width:200px}.task-name strong{display:block;font-size:12px;font-weight:550;overflow:hidden;text-overflow:ellipsis}.task-name small{display:block;font-size:12px;color:var(--muted)}.source-name{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.status-pill,.quality-pill{font-size:12px;white-space:nowrap;display:inline-block;line-height:1.8}.status-pill{padding:1px 7px;border-radius:4px}.status-pill.saved{background:var(--selected);color:var(--success)}.status-pill.active{background:var(--info-soft);color:var(--info)}.status-pill.error{background:var(--danger-soft);color:var(--danger)}.quality-pill.approved{color:var(--success)}.quality-pill.rejected{color:var(--danger)}.quality-pill.unreviewed{color:var(--warning)}.quality-pill.unavailable{color:var(--muted)}.date-cell{font-variant-numeric:tabular-nums;font-size:12px;color:var(--muted)}.pagination{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.pagination button{padding:3px 10px;margin-left:4px}.list-empty{padding:40px 24px;text-align:center;font-size:12px;color:var(--muted)}.list-empty button{display:block;margin:16px auto 0}.detail-pane{position:sticky;top:18px;max-height:calc(100vh - 390px);min-height:350px;overflow-y:auto}.detail-heading{display:flex;justify-content:space-between;align-items:center;padding:15px 19px;border-bottom:1px solid var(--line)}.detail-heading h2{font-size:13px;font-weight:550;margin:3px 0 0}.detail-heading .eyebrow{font-size:12px}.detail-hint{font-size:12px;color:var(--muted)}.job{padding:17px}.job-head{display:flex;align-items:start;justify-content:space-between;gap:8px}.job h3{font-size:13px;font-weight:600;line-height:1.5;margin:0}.badge{font-size:12px;border:1px solid var(--line);border-radius:4px;padding:1px 5px;color:var(--muted);white-space:nowrap}.job>p{font-size:12px;color:var(--muted);margin:8px 0;overflow-wrap:anywhere}.job .hint{font-size:12px}.detail-tabs{display:flex;border-bottom:1px solid var(--line);margin:18px -17px 15px;padding:0 13px}.detail-tabs button{border:0;background:transparent;font-size:12px;color:var(--muted);border-radius:0;padding:9px 8px}.detail-tabs button.active{color:var(--green);box-shadow:inset 0 -2px var(--green)}.detail-label{font-size:12px;color:var(--muted);margin:10px 0 5px}.job-assets{display:flex;gap:7px;margin-bottom:13px}.job-assets img{width:32px;height:39px;border-radius:4px;background:var(--media-canvas);object-fit:cover}.result-image,.job video{display:block;width:100%;max-height:360px;object-fit:contain;background:var(--media-canvas);border-radius:7px;margin:8px 0 12px}.job a{font-size:12px}.job .error{font-size:12px;color:var(--danger);background:var(--danger-soft);padding:10px;border-radius:5px}.job input:not([type=checkbox]){width:100%;margin:10px 0}.job button{font-size:12px}.review-state{font-size:12px;font-weight:600;color:var(--success)}.review-check{display:flex;gap:7px;align-items:start;font-size:12px;font-weight:400;line-height:1.7;margin:12px 0}.review-check input{margin-top:5px;accent-color:var(--green)}.job details textarea{font-size:12px}.job details button{margin:10px 6px 0 0}.job [data-detail-panel=review]>button{margin:8px 0;background:var(--surface-subtle)}.job pre{max-height:470px}.job details summary{font-size:12px}.job details{padding-top:12px;margin-top:12px}.job details[open]>summary{margin-bottom:12px}
.setup{background:var(--surface-subtle);color:var(--muted);font-size:12px;padding:11px 16px;border:1px solid var(--line);border-radius:7px;margin-bottom:21px}.setup a{color:inherit}.workspace{display:grid;grid-template-columns:minmax(400px,700px) minmax(190px,1fr);gap:30px;align-items:start}.composer{border:1px solid var(--line);border-radius:11px;background:var(--surface);overflow:hidden}.section-title{display:flex;align-items:center;gap:9px;padding:18px 23px;border-bottom:1px solid var(--line)}.section-title h2{font-size:14px;font-weight:550;margin:0}.step{font:12px monospace;color:var(--muted)}form{padding:24px}.upload{border:1px dashed var(--control-border);background:var(--surface-subtle);min-height:135px;border-radius:9px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;margin:18px 0 13px}.upload-icon{font-size:23px;color:var(--muted)}.upload strong{font-size:12px;font-weight:500;margin:4px}.upload>span:last-of-type{font-size:12px;color:var(--muted);font-weight:400}.upload input{font-size:12px;width:90%;border:0;background:transparent;margin:8px 0}.assets{display:flex;flex-wrap:wrap;gap:12px}.asset{width:85px;position:relative}.asset img{width:85px;height:90px;object-fit:contain;border-radius:5px;background:var(--media-canvas)}.asset>button:not(.reorder-asset){position:absolute;right:3px;top:3px;padding:0 5px;border:0;background:var(--surface)}.asset span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--muted)}.asset .reorder-asset{padding:3px 9px;font-size:12px;margin-top:5px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}#image-options>label,#motion-options label{margin-top:15px}#image-options input{width:100%}#apply-image-style{font-size:12px;padding:7px 10px;margin-bottom:5px}.specs{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0}.specs span{font-size:12px;background:var(--surface-subtle);color:var(--muted);padding:3px 7px;border-radius:4px}.cost{border-top:1px solid var(--line);padding-top:15px}.cost>div{display:flex;align-items:center;justify-content:space-between;font-size:12px}.cost strong{font-size:25px;font-weight:500;color:var(--green)}.cost p{font-size:12px;color:var(--muted);margin:5px 0 18px}.cost a{color:var(--muted)}.actions{display:flex;gap:10px}.actions button{flex:1;padding:12px;font-size:12px}#message{font-size:12px;color:var(--warning);margin:12px 0;min-height:18px}details{border-top:1px solid var(--line);padding-top:14px}summary{font-size:12px;color:var(--muted);cursor:pointer}pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font-size:12px;color:var(--muted);background:var(--surface-subtle);padding:12px;border-radius:6px;max-height:300px;overflow:auto}.creation-guide{padding:24px 12px;max-width:310px}.creation-guide h2{font-size:21px;font-weight:500;margin:11px 0 28px;color:var(--muted)}.creation-guide ol{list-style:none;counter-reset:step;padding:0}.creation-guide li{position:relative;padding:0 0 24px 37px;counter-increment:step}.creation-guide li:before{content:counter(step,decimal-leading-zero);position:absolute;left:0;font:12px monospace;color:var(--muted);padding-top:3px}.creation-guide b{font-weight:550;font-size:12px;color:var(--muted)}.creation-guide p{font-size:12px;color:var(--muted);margin:6px 0 0;line-height:1.9}.guide-note{font-size:12px;border-top:1px solid var(--line);padding-top:18px;color:var(--muted);line-height:1.9}.analysis-panel{margin:20px 0;padding:17px;background:var(--surface-subtle);border:1px solid var(--line);border-radius:8px}.analysis-panel>strong{font-size:12px}.analysis-panel button{font-size:12px;margin:5px 6px 6px 0}.analysis-panel label{margin-top:14px}.analysis-panel .hint{color:var(--muted)}.analysis-record{padding:12px 0;border-bottom:1px solid var(--line);font-size:12px;overflow-wrap:anywhere}.evidence-thumb{background:var(--media-canvas);height:56px;width:45px;object-fit:contain;vertical-align:middle;margin:5px 8px 8px 0}#analysis-facts a{font-size:12px;overflow-wrap:anywhere}#analysis-facts textarea{display:block}.comparison{border:1px solid var(--line);background:var(--surface);border-radius:10px;overflow:hidden}.compare-content{padding:8px 24px 24px}.compare-videos{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:14px 0}.compare-videos video{width:100%;max-height:60vh;background:var(--media-canvas);border-radius:8px}.compare-videos p{font-size:12px;color:var(--muted)}.compare-content>button{margin-right:10px}footer{display:flex;justify-content:space-between;padding:28px 0 20px;font-size:12px;color:var(--muted)}
@media(min-width:1600px){.library-layout{grid-template-columns:minmax(500px,1fr) 400px}.result-image,.job video{max-height:430px}.task-name{max-width:290px}}
@media(max-width:1200px){.sidebar{width:175px;padding:27px 12px}.main-shell{margin-left:175px}.page-content{padding:26px 22px 0}.topbar{padding:0 22px}.library-layout{grid-template-columns:minmax(390px,1fr) 300px;gap:14px}.filter-controls input{width:170px}.task-name{max-width:135px}.source-name{max-width:135px}.stat{padding:16px}.stat small{font-size:12px}.date-cell{font-size:12px}td,th{padding-left:7px;padding-right:7px}}
@media(max-width:1050px){.library-layout{grid-template-columns:1fr}.detail-pane{position:static;max-height:none}.detail-hint{display:none}.result-image,.job video{max-height:480px}.table-scroll{max-height:540px}.task-name{max-width:300px}.workspace{grid-template-columns:1fr}.creation-guide{display:none}}
@media(max-width:760px){.sidebar{position:static;width:auto;padding:16px 18px 10px;border-right:0;border-bottom:1px solid var(--line)}.brand{font-size:20px;margin:0 0 17px;padding:0}.brand-mark{height:32px;width:30px;font-size:16px}.brand small{font-size:12px}.sidebar nav{display:flex;gap:5px}.nav-item{margin:0;justify-content:center;gap:7px;padding:9px 8px;font-size:12px}.nav-item>span{font-size:15px;width:auto}.nav-item small{margin-left:0}.nav-label,.sidebar-foot{display:none}.main-shell{margin-left:0}.topbar{height:45px;padding:0 18px}.page-content{padding:22px 16px 0}.page-heading{align-items:start;gap:12px}.page-heading h1{font-size:26px}.page-heading p{font-size:12px;max-width:230px}.page-heading>.primary{padding:9px 12px;white-space:nowrap;font-size:12px}.stats{grid-template-columns:1fr 1fr;gap:9px;margin-bottom:20px}.stat{padding:12px 16px}.stat strong{font-size:25px}.library-toolbar{gap:12px}.filter-controls{width:100%;display:grid;grid-template-columns:1fr 95px 95px;gap:5px}.filter-controls input,.filter-controls select{width:100%;min-width:0;padding:9px 7px;font-size:12px}.task-list table{min-width:470px}.table-scroll{min-height:180px;max-height:500px}.task-name{max-width:190px}.workspace{display:block}form{padding:18px}.section-title{padding:17px}.section-title .small{font-size:12px}.compare-content{padding:5px 15px 18px}.compare-videos{gap:10px}.compare-videos p{font-size:12px}.fields{gap:10px}.comparison .section-title{flex-wrap:wrap}.comparison .small{margin-left:0}.page-heading>.secondary{font-size:12px;padding:8px;white-space:nowrap}footer{gap:15px}.date-cell{font-size:12px}}

.workspace-message{font-size:12px;color:var(--danger);background:var(--danger-soft);border:1px solid var(--line);padding:11px 15px;border-radius:7px;margin:0 0 18px}

/* Preparation workflow: one purpose per expandable section. */
.workflow-nav{display:flex;border-bottom:1px solid var(--line);padding:10px 18px;gap:8px;background:var(--surface-subtle)}
.workflow-nav button{flex:1;background:transparent;border:0;text-align:left;font-size:12px;color:var(--muted);padding:9px 5px}
.workflow-nav button:hover{background:var(--selected)}
.workflow-stage{margin:0 0 16px;border:1px solid var(--line);border-radius:9px;padding:0;scroll-margin-top:20px}
.workflow-stage>summary{padding:17px 16px;font-size:13px;font-weight:600;color:var(--ink);list-style:none;display:flex;align-items:center;gap:9px;flex-wrap:wrap;background:var(--surface-subtle);border-radius:9px}
.workflow-stage>summary:after{content:'＋';margin-left:auto;font-size:15px;color:var(--muted)}
.workflow-stage[open]>summary:after{content:'−'}
.workflow-stage>summary>span{font:12px monospace;color:var(--muted)}
.workflow-stage>summary>small{font-size:12px;font-weight:400;color:var(--muted)}
.workflow-stage[open]>summary{border-bottom:1px solid var(--line);border-radius:9px 9px 0 0}
.stage-body{padding:18px 16px}
.stage-body>.upload{margin-top:16px}
.prep-heading{display:flex;align-items:start;justify-content:space-between;gap:12px}
.prep-heading strong{font-size:13px;font-weight:600;color:var(--ink)}
.prep-heading p{margin-bottom:12px}
.free-label{font-size:12px;white-space:nowrap;padding:4px 7px;border-radius:4px;background:var(--surface-subtle);color:var(--muted)}
.reference-panel{border:1px solid var(--line);background:var(--surface-subtle);border-radius:7px;padding:13px;margin:8px 0 16px}
.reference-panel>summary{color:var(--muted);font-size:12px}
.reference-panel input[type=file]{max-width:100%;font-size:12px}
.reference-actions{display:flex;gap:8px;margin-top:10px}
.reference-panel button{font-size:12px;padding:7px 9px}
#reference-result:empty{display:none}
#reference-result{margin-top:15px;font-size:12px;overflow-wrap:anywhere}
#reference-result video{display:block;width:100%;max-height:280px;background:var(--media-canvas);border-radius:6px}
#reference-result img{background:var(--media-canvas);width:100%;border-radius:6px;margin:12px 0 5px}
#reference-result a{font-size:12px}
#reference-history button{display:block;width:100%;text-align:left;white-space:normal;margin-top:7px}
.preparation-observations{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:13px 0}
.observation-group{border:1px solid var(--line);border-radius:6px;padding:12px;background:var(--surface);min-width:0;align-self:start}
.observation-group>summary{font-size:12px;font-weight:550;color:var(--muted)}
.observation-group .hint{font-size:12px;margin-top:10px}
.observation-group textarea{font-size:12px;resize:vertical}
.prep-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.prep-actions button{font-size:12px;padding:9px 12px}
.prep-actions button:first-child{background:var(--selected);border-color:var(--line);color:var(--muted)}
.prep-status{font-size:12px;line-height:1.8;color:var(--warning);margin:12px 0}
.delivery-note{background:var(--surface-subtle);border-left:3px solid var(--green);padding:11px 13px;margin:12px 0;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.delivery-note strong{font-size:12px}
.delivery-note p{margin:6px 0}
.preparation-history{margin:13px 0 20px}
.preparation-record{padding:13px 0;border-bottom:1px solid var(--line)}
.preparation-record strong{font-size:12px;font-weight:550;color:var(--muted);overflow-wrap:anywhere}
.preparation-record button{font-size:12px;padding:6px 10px}
#analysis-editor>summary{font-size:12px;margin:6px 0}
#analysis-editor[open]>summary{margin-bottom:14px}
#analysis-facts{padding-top:1px}
.history-delete{color:var(--danger)!important;border-color:var(--danger)!important;background:transparent!important;margin-left:8px}
.history-delete:hover{background:var(--danger-soft)!important;border-color:var(--danger)!important}
.job-head .history-delete{margin-left:auto;flex-shrink:0;font-size:12px;padding:6px 10px}
.reference-record{display:flex;gap:8px;align-items:flex-start;padding:8px 0;border-bottom:1px solid var(--line)}
.reference-record>button:first-child{text-align:left;overflow-wrap:anywhere;flex:1;min-width:0}
#reference-history .history-delete{margin-left:0;flex-shrink:0;width:auto}
.history-delete-dialog{width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 40px);box-sizing:border-box;margin:auto;border:1px solid var(--line);border-radius:16px;padding:24px;background:var(--surface);color:var(--ink);box-shadow:0 24px 80px var(--shadow-history);overflow:auto}
.history-delete-dialog::backdrop{background:var(--overlay-history);backdrop-filter:blur(2px)}
.history-delete-heading h2{font-size:21px;line-height:1.4;margin:8px 0}
#history-delete-label{font-size:12px;line-height:1.8;color:var(--muted);overflow-wrap:anywhere;margin-bottom:15px}
.history-delete-dialog .hint{font-size:12px;line-height:1.8}
.history-delete-dialog details{font-size:12px;margin:12px 0}
.history-delete-dialog summary{cursor:pointer}
.history-delete-dialog ul{padding-left:20px;font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.history-delete-summary{padding:14px;border:1px solid var(--line);border-radius:9px;margin:15px 0;background:var(--surface-subtle);font-size:13px;line-height:1.7}
.history-delete-summary p{margin:5px 0 0;color:var(--muted)}
.history-delete-blockers{padding:14px;border:1px solid var(--warning-border);border-radius:9px;background:var(--warning-soft);font-size:13px;color:var(--warning)}
.history-delete-blockers ul{margin-bottom:0}
.history-delete-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;flex-wrap:wrap}
.history-delete-actions button{font-size:12px;padding:9px 15px;margin:0}
.danger-button{background:var(--danger)!important;color:var(--on-danger)!important;border-color:var(--danger)!important}
.danger-button:disabled{opacity:.45;cursor:not-allowed}
.edit-guide{padding:15px 18px;background:var(--surface-subtle);border:1px solid var(--line);border-radius:10px;font-size:12px;line-height:1.8;color:var(--muted);margin:0 0 24px}
.edits-layout{grid-template-columns:minmax(0,1fr) minmax(320px,1fr);align-items:start}
#edit-list{max-height:650px;overflow:auto}
.edit-row{display:flex;width:100%;flex-direction:column;align-items:flex-start;text-align:left;gap:8px;padding:20px 24px;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:var(--surface);color:var(--ink);overflow-wrap:anywhere}
.edit-row.selected{background:var(--selected);box-shadow:inset 3px 0 var(--green)}
.edit-row small{color:var(--muted);font-size:12px}.edit-row strong{font-size:14px;line-height:1.7}.edit-row span{font-size:12px;color:var(--muted)}
#edit-detail{padding:20px;min-width:0}#edit-detail .job-head{align-items:flex-start;line-height:1.8}#edit-detail .job-head>strong{min-width:0;overflow-wrap:anywhere}
#edit-detail video{display:block;width:100%;max-height:430px;background:var(--media-canvas);border-radius:9px;object-fit:contain}#edit-detail h3{font-size:13px;margin:24px 0 12px}
.edit-download{display:inline-block;font-size:12px;color:var(--green);margin:12px 0}
.edit-sources{display:flex;flex-direction:column;gap:8px}.edit-sources button{text-align:left;font-size:12px;padding:10px;margin:0;white-space:normal;overflow-wrap:anywhere}
.dependency-link{display:block;font-size:12px;padding:6px 10px;margin:7px 0 12px;color:var(--green)!important;white-space:normal;overflow-wrap:anywhere}
@media(max-width:1000px){.edits-layout{grid-template-columns:1fr}.edits-layout .detail-pane{max-height:none}#edit-list{max-height:360px}}
@media(max-width:760px){.workflow-nav{padding:8px 10px;gap:3px}.workflow-nav button{font-size:12px}.workflow-stage>summary{padding:13px 11px;font-size:12px}.workflow-stage>summary>small{display:none}.stage-body{padding:14px 11px}.preparation-observations{grid-template-columns:1fr}.prep-heading{gap:6px}.free-label{font-size:12px}.prep-actions button{width:100%}}

/* YiFlick brand signature. */
.brand-mark{display:block;flex-shrink:0;width:44px;height:44px;object-fit:cover}
.brand small.brand-english{font-size:11px;letter-spacing:1.6px;line-height:1.5;font-weight:600}
.page-heading p.brand-tagline{font-size:14px;color:var(--muted);letter-spacing:.5px;max-width:none}
footer{flex-wrap:wrap;align-items:center;gap:10px 24px}
.footer-brand{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 16px;color:var(--muted);font-size:12px}
.footer-brand strong{font-weight:600;letter-spacing:.5px;color:var(--muted)}
.icp-footer{justify-content:center;width:100%;padding:16px 0 0}
.icp-link{color:var(--muted);font-size:12px;line-height:1.8;text-underline-offset:3px;overflow-wrap:anywhere}
.icp-link:hover{color:var(--green)}
.icp-link:focus-visible{outline:2px solid var(--green);outline-offset:4px;border-radius:2px}
@media(max-width:760px){
  .brand-mark{width:32px;height:32px}
  .brand small.brand-english{font-size:10px;letter-spacing:1.2px}
  .page-heading p.brand-tagline{font-size:12px;letter-spacing:0}
}

/* 2026-11-05: guided creation, with the original request controls preserved. */
#create-view .workspace{grid-template-columns:minmax(0,800px) minmax(240px,300px);gap:24px;justify-content:center}
#create-view .composer{box-shadow:0 8px 30px var(--shadow-composer)}
#create-view #form{padding:0}
#create-view .workflow-nav{padding:18px 22px;gap:14px;background:var(--surface)}
#create-view .workflow-nav button{display:flex;align-items:center;gap:10px;line-height:1.4;font-size:13px;color:var(--muted);padding:8px 0}
#create-view .workflow-nav b{display:grid;place-items:center;flex-shrink:0;width:29px;height:29px;border-radius:50%;background:var(--surface);border:1px solid var(--control-border);font-size:12px}
#create-view .workflow-nav button[aria-current=step]{color:var(--green);font-weight:650}
#create-view .workflow-nav button[aria-current=step] b{background:var(--green);border-color:var(--green);color:var(--on-primary)}
#create-view .workflow-stage{margin:0;border:0;border-radius:0}
#create-view .workflow-stage:not([open])>summary{display:none}
#create-view .workflow-stage[open]>summary{padding:18px 28px;background:var(--surface-subtle);border:0;border-radius:0;font-size:13px}
#create-view .stage-body{padding:28px}
#create-view .step-question{font-size:21px;font-weight:600;letter-spacing:-.4px;margin:0 0 20px}
.creation-goals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 22px}
.creation-goals button{position:relative;text-align:left;padding:17px 14px;border-radius:10px;min-height:138px;background:var(--surface);border-color:var(--control-border)}
.creation-goals button[aria-pressed=true]{background:var(--selected);border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}
.creation-goals button[aria-pressed=true]:after{content:'✓';position:absolute;right:13px;top:13px;color:var(--green);font-size:15px}
.creation-goals .goal-symbol{display:block;font-size:12px;font-weight:600;letter-spacing:1px;color:var(--muted);margin-bottom:12px}
.creation-goals strong{display:block;font-size:15px;line-height:1.5;margin-bottom:7px}
.creation-goals small{display:block;font-size:12px;line-height:1.7;color:var(--muted)}
#create-view .hint{font-size:12px;line-height:1.8;color:var(--muted)}
#create-view label{font-size:13px}
#create-view input,#create-view select,#create-view textarea{font-size:14px}
#create-view .advanced-options{border:1px solid var(--line);border-radius:8px;padding:14px 16px;background:var(--surface);margin:16px 0}
#create-view .advanced-options>summary{font-size:13px;color:var(--muted);line-height:1.6}
#create-view .advanced-options[open]>summary{margin-bottom:18px}
#create-view .advanced-options>summary small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:3px}
#create-view .advanced-options label{margin-top:16px}
#create-view #other-creation-methods{background:var(--surface-subtle);margin-top:0}
#create-view #profile-note{margin-bottom:26px}
.material-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px}
.material-heading h3{font-size:16px;font-weight:600;margin:0}
#asset-count{font-size:12px;color:var(--muted);white-space:nowrap}
#create-view .upload{min-height:148px;border-color:var(--control-border);background:var(--canvas)}
#create-view .upload strong{font-size:14px;font-weight:550;color:var(--green)}
#create-view .upload>span:last-of-type{font-size:12px;color:var(--muted)}
#create-view .upload input{font-size:12px;width:auto;max-width:100%;text-align:center}
#create-view .assets{gap:12px;margin:18px 0}
#create-view .asset{width:calc((100% - 24px)/3);min-width:0;border:1px solid var(--line);border-radius:8px;padding:10px;background:var(--surface)}
#create-view .asset-role{display:block;font-size:12px;line-height:1.5;color:var(--ink);margin-bottom:8px;padding-right:13px;min-height:18px}
#create-view .asset img{width:100%;height:128px;background:var(--media-canvas)}
#create-view .asset span{font-size:12px;color:var(--muted);margin-top:7px}
#create-view .asset>button:not(.reorder-asset){right:6px;top:6px;font-size:16px;min-width:24px}
#create-view .asset .reorder-asset{font-size:12px}
#create-view .analysis-panel{margin-top:24px;padding:18px;background:var(--surface-subtle)}
#create-view .analysis-panel>strong{font-size:14px}
#create-view .analysis-panel button{font-size:13px}
#create-view #analysis-editor>summary{font-size:13px}
#create-view .stage-navigation{display:flex;justify-content:space-between;align-items:center;gap:16px;border-top:1px solid var(--line);margin-top:28px;padding-top:20px}
#create-view .stage-navigation>span{font-size:12px;color:var(--muted);max-width:55%}
#create-view .stage-navigation button{font-size:13px;padding:11px 16px;flex-shrink:0}
#create-view .stage-navigation button:not(.secondary){background:var(--green);border-color:var(--green);color:var(--on-primary)}
.settings-summary{background:var(--surface-subtle);border:1px solid var(--line);padding:20px;border-radius:10px;margin-bottom:24px}
.settings-summary>strong{font-size:15px;display:block;margin-bottom:12px}
.settings-summary p{margin:7px 0;font-size:14px;color:var(--muted);line-height:1.8}
.source-picker{padding:18px;background:var(--surface-subtle);border-radius:8px;border:1px dashed var(--control-border);font-size:13px;line-height:1.8}
.source-picker p{margin-bottom:12px}
#create-view .creation-guide{display:block;max-width:none;padding:23px;border:1px solid var(--line);border-top:3px solid var(--green);border-radius:12px;background:var(--surface);position:sticky;top:24px}
#create-view .creation-guide h2{font-size:20px;margin:10px 0 13px;color:var(--ink)}
#create-view .creation-guide p{font-size:13px;line-height:1.8;color:var(--muted)}
#create-view #creation-next-action{width:100%;font-size:13px;padding:12px;margin:18px 0 23px}
.creation-summary{border-top:1px solid var(--line);padding-top:18px;font-size:12px}
.creation-summary>strong{font-size:13px;display:block;margin-bottom:14px}
.creation-summary>div{display:flex;justify-content:space-between;gap:15px;margin:10px 0}
.creation-summary span{color:var(--muted);flex-shrink:0}
.creation-summary b{font-weight:500;text-align:right;overflow-wrap:anywhere}
.creation-reuse{margin-top:23px;border-top:1px solid var(--line);padding-top:18px}
.creation-reuse>strong{display:block;font-size:13px}
.creation-reuse button{width:100%;margin-top:12px;font-size:12px}
#create-view .creation-reuse p{font-size:12px;margin:8px 0 18px}
#create-view .guide-note{font-size:12px;line-height:1.8;color:var(--muted)}
.generation-inputs{border:1px solid var(--line);border-radius:10px;padding:18px;background:var(--surface-subtle);font-size:14px;margin-bottom:20px}
.generation-inputs>.hint:last-child{margin-bottom:0}
.input-evidence-grid{display:flex;gap:12px;margin:16px 0;flex-wrap:wrap}
.input-evidence{width:calc((100% - 24px)/3);min-width:0}
.input-evidence img{width:100%;height:125px;object-fit:contain;border-radius:7px;background:var(--media-canvas)}
.input-evidence strong{display:block;font-size:12px;margin-top:5px}
.input-evidence span{display:block;overflow-wrap:anywhere;font-size:12px;color:var(--muted)}
.input-unknown{padding:12px;background:var(--warning-soft);border-radius:6px;font-size:12px;color:var(--warning);line-height:1.8;margin:10px 0}
#create-view #preparation-extra{background:var(--surface)}
#create-view #preparation-panel{padding-top:7px}
#create-view .observation-group>summary{font-size:12px}
#create-view .specs span{font-size:12px;color:var(--muted)}
#create-view .cost>div{font-size:14px}
#create-view .cost p{font-size:12px;line-height:1.8;color:var(--muted)}
#create-view .cost strong{font-size:28px}
#create-view .actions button{font-size:14px}
#create-view pre{font-size:12px;color:var(--muted)}
.comparison-change{white-space:pre-wrap;font-size:12px;line-height:1.8;color:var(--muted)}
@media(max-width:1100px){#create-view .workspace{grid-template-columns:minmax(0,1fr) 240px;gap:18px}#create-view .stage-body{padding:22px}.creation-goals{gap:8px}.creation-goals button{padding:15px 10px}.creation-goals strong{font-size:14px}#create-view .creation-guide{padding:18px}}
@media(max-width:950px){#create-view .workspace{display:flex;flex-direction:column}#create-view .composer{width:100%}#create-view .creation-guide{position:static;width:100%;display:grid;grid-template-columns:1fr 1fr;gap:0 24px}#create-view .creation-guide>.eyebrow,#create-view .creation-guide>h2,#creation-next-copy,#creation-next-action{grid-column:1}#create-view .creation-summary{grid-column:2;grid-row:1/5;border-top:0;padding-top:0}#create-view .creation-reuse{grid-column:1/3;margin-top:0}#create-view .guide-note{grid-column:1/3}}
@media(max-width:560px){#create-view .workflow-nav{padding:12px;gap:8px}#create-view .workflow-nav button{flex-direction:column;gap:6px;font-size:12px;text-align:center}#create-view .workflow-nav b{width:25px;height:25px}#create-view .workflow-stage[open]>summary{padding:14px 16px}#create-view .stage-body{padding:20px 16px}#create-view .step-question{font-size:19px}.creation-goals{grid-template-columns:1fr;gap:9px;margin-bottom:18px}.creation-goals button{min-height:0;padding:13px 37px 13px 47px}.creation-goals .goal-symbol{position:absolute;left:15px;top:17px;margin:0}.creation-goals strong{font-size:15px;margin-bottom:3px}.creation-goals small{font-size:12px}.creation-goals button[aria-pressed=true]:after{top:16px}#create-view .creation-guide{display:block;padding:20px}#create-view .creation-summary{border-top:1px solid var(--line);padding-top:18px}#create-view .creation-reuse{margin-top:18px}#create-view .stage-navigation{gap:8px;flex-wrap:wrap}#create-view .stage-navigation>span{max-width:100%;order:2}#create-view .stage-navigation button{padding:10px 11px;font-size:12px}#create-view .asset{padding:7px}#create-view .asset img{height:95px}#create-view .asset-role{font-size:12px;min-height:34px}#create-view .assets{gap:8px}#create-view .asset{width:calc((100% - 16px)/3)}#create-view .actions{flex-direction:column}#create-view .actions button{flex:none;width:100%}.input-evidence img{height:95px}#create-view .advanced-options{padding:13px}#create-view .page-heading{flex-wrap:wrap}}

/* Keep all four navigation labels readable on narrow phones. */
@media(max-width:560px){
  .sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .nav-item{min-width:0;justify-content:flex-start;white-space:nowrap;padding:10px 12px}
  .nav-item small{margin-left:auto}
}
/* Actual clothing conditions stay visible outside optional preparation fields. */
.tryon-description{padding:22px;margin:18px 0;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.tryon-description h3{font-size:16px;margin:0 0 10px}
.clothing-description-row{margin:14px 0;font-size:13px;overflow-wrap:anywhere}
.clothing-description-row strong{font-size:12px;color:var(--muted)}
.clothing-description-row p{margin:5px 0;line-height:1.8;white-space:pre-wrap}
.tryon-description pre{max-height:280px;white-space:pre-wrap;overflow:auto;font-size:12px}
.unused-description{padding:16px;margin-top:18px;border:1px solid var(--warning-border);border-radius:9px;background:var(--warning-soft)}
.unused-description>strong{color:var(--warning);font-size:14px}
.unused-description>p{font-size:13px;margin:7px 0}
.preparation-choice-dialog{width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:28px;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--ink);overflow:auto;box-shadow:0 24px 80px var(--shadow-dialog)}
.preparation-choice-dialog::backdrop{background:var(--overlay);backdrop-filter:blur(3px)}
.choice-heading h2{margin:8px 0;font-size:23px;line-height:1.4}
.choice-heading p,#preparation-choice-status{font-size:13px;line-height:1.8;color:var(--muted)}
#preparation-choice-content{max-height:38vh;overflow:auto;padding:4px 16px;border:1px solid var(--line);border-radius:9px;background:var(--surface-subtle)}
.choice-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.choice-actions button{font-size:13px;min-height:42px;white-space:normal;text-align:left}
@media(max-width:560px){.tryon-description,.preparation-choice-dialog{padding:18px}.choice-actions{flex-direction:column}.choice-actions button{width:100%;text-align:center}}

/* Appearance controls share one preference and never alter media pixels. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.appearance-control{display:flex;align-items:center;gap:10px;min-inline-size:0;flex-shrink:0;margin:0;padding:0;border:0;font-size:12px}
.appearance-label{color:var(--muted);font-weight:500;white-space:nowrap}
.appearance-options{display:flex;gap:2px;padding:3px;background:var(--sidebar);border:1px solid var(--line);border-radius:10px}
.appearance-options label{position:relative;display:block;margin:0;font-size:12px;font-weight:500;cursor:pointer}
.appearance-options input{position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.appearance-options label>span{display:block;min-height:30px;padding:5px 9px;line-height:20px;white-space:nowrap;border-radius:7px;color:var(--muted)}
.appearance-options label:hover input:not(:disabled)+span{color:var(--ink)}
:root:not([data-theme-preference]) .appearance-options input:checked+span,
:root[data-theme-preference=light] .appearance-options input[value=light]+span,
:root[data-theme-preference=dark] .appearance-options input[value=dark]+span,
:root[data-theme-preference=system] .appearance-options input[value=system]+span{background:var(--surface);color:var(--ink);box-shadow:0 1px 4px var(--shadow-tab);font-weight:650}
.appearance-options input:focus-visible+span{outline:2px solid var(--green);outline-offset:2px}
.appearance-control:disabled label{cursor:default}
.local-appearance{display:flex;align-items:center;gap:16px}
.topbar:has(.local-appearance){height:auto;min-height:65px;flex-wrap:wrap;gap:10px 20px;padding-top:12px;padding-bottom:12px}
@media(max-width:760px){
  .topbar:has(.local-appearance){min-height:45px}
  .local-appearance{flex-wrap:wrap;gap:10px}
}
@media(forced-colors:active){
  .appearance-options input:checked+span{outline:2px solid Highlight;outline-offset:-2px}
}

/* Independent creation entries share the existing form and theme tokens. */
.sidebar{overflow-y:auto}
.sidebar .brand{margin-bottom:24px}
.sidebar .nav-label{margin:18px 12px 8px;font-size:12px}
.sidebar .nav-item{font-size:13px;line-height:1.5;padding:10px;margin-bottom:3px;overflow-wrap:anywhere}
.sidebar .nav-item>span{flex-shrink:0}
#workspace-nav-toggle{display:none}
.function-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;max-width:1240px}
.function-card{display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-width:0;padding:26px;border:1px solid var(--control-border);border-radius:14px;background:var(--surface);color:var(--ink);transition:border-color .15s,box-shadow .15s}
.function-card:hover:not(:disabled){background:var(--surface);border-color:var(--green);box-shadow:0 6px 22px var(--shadow-composer)}
.function-kind{color:var(--green);font-size:12px;margin-bottom:22px}
.function-card strong{font-size:21px;font-weight:600;line-height:1.5;margin-bottom:10px}
.function-description{font-size:13px;color:var(--muted);line-height:1.8;margin-bottom:24px}
.function-materials{font-size:12px;line-height:1.7;color:var(--muted);margin-top:auto}
.function-enter{display:flex;justify-content:space-between;width:100%;border-top:1px solid var(--line);padding-top:16px;margin-top:18px;font-size:13px;color:var(--green);font-weight:600}
.function-footnote{max-width:900px;margin:22px 0;font-size:12px;line-height:1.9;color:var(--muted)}
.function-back{padding:0 0 10px;background:transparent;border:0;color:var(--muted);font-size:12px}
.function-back:hover:not(:disabled){background:transparent;color:var(--green)}
@media(max-width:1200px){.function-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.function-card{padding:22px}}
@media(max-width:760px){
  .sidebar{position:relative;overflow:visible;padding:16px 18px}
  .sidebar .brand{margin-bottom:0;max-width:60%}
  #workspace-nav-toggle{display:block;position:absolute;right:18px;top:20px;padding:8px 12px;font-size:12px}
  .sidebar #workspace-nav{display:none;margin-top:18px}
  .sidebar #workspace-nav.expanded{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  .sidebar .nav-label{display:block;grid-column:1/-1;margin:12px 8px 4px}
  .sidebar .nav-item{white-space:normal;justify-content:flex-start;min-height:42px}
  .function-card strong{font-size:19px}.function-card{padding:20px}
  #create-view .page-heading p{max-width:none}
}
@media(max-width:480px){.function-grid{grid-template-columns:1fr;gap:12px}.function-kind{margin-bottom:12px}.function-description{margin-bottom:14px}.function-card strong{font-size:20px}}

.current-description-editor{margin-top:22px;padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--surface-subtle)}
.current-description-editor h3{margin:0 0 8px;font-size:16px}
.current-description-editor .preparation-observations{margin-top:16px}
.current-description-editor textarea{background:var(--surface)}
.analysis-source textarea[readonly],.analysis-source input[readonly]{background:var(--surface-subtle);color:var(--muted)}
