:root{color-scheme:light;--bg:#f4f4f4;--panel:#fff;--text:#202020;--muted:#737373;--line:#d8d8d8;--strong:#999;--soft:#f7f7f7}html[data-theme=dark],html[data-theme=mono]{color-scheme:dark;--bg:#141414;--panel:#202020;--text:#f4f4f4;--muted:#aaa;--line:#3d3d3d;--strong:#777;--soft:#272727}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.65 'Segoe UI','Microsoft YaHei',sans-serif}button,input,select,textarea{font:inherit;color:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 14px;border:1px solid var(--strong);border-radius:8px;background:var(--panel);color:var(--text);cursor:pointer;text-decoration:none}button:hover,.button:hover{background:var(--soft)}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:var(--text);color:var(--panel);border-color:var(--text)}.primary:hover{opacity:.85;background:var(--text)}input,select,textarea{width:100%;min-height:40px;padding:9px 12px;background:var(--panel);border:1px solid var(--strong);border-radius:8px}textarea{min-height:90px;resize:vertical}label{display:grid;gap:7px;font-size:13px}input[type=checkbox]{width:16px;min-height:16px;margin:0}.check{display:flex;align-items:center;gap:8px}h1,h2,h3,p{margin:0}h1{font-size:25px}h2{font-size:18px}h3{font-size:15px}p,small{color:var(--muted)}a{color:inherit}.site-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 32px;background:var(--panel);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none}.brand img{width:70px;height:60px;object-fit:contain}.brand strong{display:block;font-size:18px}.brand small{display:block;font-size:11px}.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.site-shell{max-width:1450px;margin:auto;display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;padding:30px}.site-sidebar{display:flex;flex-direction:column;gap:10px;align-self:start;position:sticky;top:24px}.site-sidebar button{justify-content:flex-start;text-align:left;gap:10px;width:100%;padding:13px}.site-sidebar button[aria-current=page]{background:var(--text);color:var(--panel)}.site-sidebar small{padding:4px 0}.site-content{min-width:0;display:grid;gap:22px;align-content:start}.panel{padding:24px;background:var(--panel);border:1px solid var(--line);border-radius:12px}.panel>header,.section-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.panel>p{margin-bottom:18px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.wide{grid-column:1/-1}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.metric{padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.metric span,.metric small{display:block;font-size:12px}.metric strong{display:block;font-size:28px;margin:6px 0}.notice{padding:13px 16px;border:1px solid var(--line);border-radius:8px;background:var(--soft);line-height:1.8;font-size:13px}.status{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text);font-size:13px}.status:empty{display:none}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}th,td{padding:12px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle;white-space:nowrap}th{font-weight:500;color:var(--muted)}td input{width:110px}td input[type=checkbox]{width:16px}.empty{padding:30px;text-align:center;color:var(--muted)}details{border-top:1px solid var(--line);padding-top:15px;margin-top:18px}summary{cursor:pointer;font-weight:600}details>div{padding-top:16px}.section-form{display:grid;gap:16px}.customer-main{max-width:1280px;padding:30px;margin:auto}.customer-main>.section-title{margin-bottom:26px}.customer-auth{max-width:460px;margin:55px auto}.customer-auth h2{margin-bottom:20px}.customer-workspace{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:24px;align-items:start}.customer-workspace .panel{min-width:0}.segmented{display:flex;gap:8px;margin-bottom:20px}.segmented [aria-pressed=true]{background:var(--text);color:var(--panel)}.generation-form{display:grid;gap:16px}.generation-form textarea{min-height:180px}.task-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}.task-card{padding:14px;border:1px solid var(--line);border-radius:10px;min-width:0}.task-card video,.task-card img{display:block;width:100%;height:210px;object-fit:contain;background:var(--soft);border-radius:8px;margin-bottom:10px}.task-card p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;margin:8px 0}.task-card strong{font-size:13px}.site-announcement{margin-bottom:24px}.payment-qr svg{width:220px;max-width:100%;background:white}dialog{width:min(600px,calc(100% - 32px));max-height:85vh;overflow:auto;border:1px solid var(--strong);border-radius:14px;background:var(--panel);color:var(--text);padding:24px}dialog::backdrop{background:#0008}dialog header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}dialog form{display:grid;gap:16px}.price-note{font-size:13px}.subsite-demo{padding:9px 24px;background:var(--text);color:var(--panel);text-align:center;font-size:12px}[hidden]{display:none!important}.supply-low{border-color:var(--text);font-weight:600}.form-note{font-size:12px;color:var(--muted)}.site-link{overflow-wrap:anywhere;word-break:break-all}.payments-fields{display:grid;gap:12px}.payments-fields textarea{font-family:monospace;font-size:12px}.logo-preview{width:90px;height:80px;object-fit:contain}.customer-name{font-size:12px}.site-row-title{font-size:12px;padding:12px 4px;color:var(--muted)}
input:disabled{opacity:.5;cursor:not-allowed;background:var(--soft)}.price-pending{color:var(--muted);font-size:12px}#priceSetupNotice{white-space:normal}
@media(max-width:1000px){.site-shell{grid-template-columns:170px minmax(0,1fr);gap:18px;padding:20px}.metrics{grid-template-columns:1fr}.customer-workspace{grid-template-columns:300px minmax(0,1fr)}.panel{padding:18px}}
@media(max-width:700px){.site-header{padding:14px 18px;flex-wrap:wrap}.site-shell{display:block;padding:16px}.site-sidebar{position:static;margin-bottom:20px}.site-sidebar button{width:auto}.site-content{gap:16px}.grid,.customer-workspace{grid-template-columns:1fr}.customer-main{padding:18px}.brand img{width:54px;height:48px}.section-title{align-items:flex-start;flex-wrap:wrap}.customer-auth{margin:20px auto}h1{font-size:21px}}

/* The public subsite has one video workspace, with no application sidebar. */
.customer-main{max-width:1600px;padding:20px 24px}.customer-main .section-title{margin-bottom:16px}.customer-main h1{font-size:16px}.video-only-workspace{grid-template-columns:minmax(350px,.9fr) minmax(0,1.1fr);gap:16px}.video-editor,.video-results{border-color:var(--strong);border-radius:15px;padding:18px;min-height:calc(100vh - 195px)}.video-editor h2{margin-bottom:12px}.video-editor .generation-form{gap:12px}.video-editor textarea{min-height:260px;height:32vh}.prompt-heading{display:flex;justify-content:space-between;align-items:center}.prompt-heading button{min-height:30px;padding:3px 10px;font-size:12px}.reference-tools{gap:6px}.reference-tools button{font-size:12px;padding:6px 12px;min-height:34px}.reference-drop{border:1px dashed var(--strong);border-radius:10px;padding:12px;cursor:pointer;display:grid;gap:8px}.reference-drop span,.reference-drop small{text-align:center}.reference-drop small{font-size:11px}.reference-list{display:flex;flex-wrap:wrap;gap:6px}.reference-list:empty{display:none}.reference-list button{max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:12px;min-height:28px;padding:3px 8px}.video-options{display:grid;grid-template-columns:1.7fr 1fr 1fr 1fr;gap:9px}.video-options label{min-width:0;font-size:12px}.video-options select{min-width:0;padding:7px;font-size:12px}.video-results header{align-items:flex-start}.video-results header p{font-size:12px}.video-results header small{font-size:13px;border:1px solid var(--strong);padding:1px 6px;border-radius:6px}.task-filters{margin-bottom:12px}.task-filters button{min-height:30px;padding:3px 12px;font-size:12px}.video-task-list{display:grid;grid-template-columns:1fr;gap:12px}.video-task-list .task-card{display:flex;gap:14px;align-items:flex-start;border-color:var(--strong)}.task-copy{flex:1;min-width:0}.task-copy>small{display:block;font-size:11px}.task-copy .actions{margin-top:10px}.task-copy button,.task-media .button{min-height:30px;font-size:12px;padding:3px 10px}.task-media{flex:0 0 108px;display:grid;gap:8px}.task-media video{width:108px;height:108px;aspect-ratio:1;object-fit:contain;margin:0;border:1px solid var(--strong)}.task-prompt{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.video-editor .primary{min-height:42px;border-radius:12px}.video-task-list .empty{padding:100px 16px}#loadMore{margin-top:16px}
@media(max-width:1100px){.video-options{grid-template-columns:repeat(2,minmax(0,1fr))}.video-only-workspace{grid-template-columns:minmax(300px,.95fr) minmax(0,1.05fr)}.task-media{flex-basis:90px}.task-media video{width:90px;height:90px}.video-results header{flex-wrap:wrap}}
@media(max-width:760px){.video-only-workspace{grid-template-columns:1fr}.customer-main{padding:14px}.video-editor,.video-results{min-height:0}.video-editor textarea{min-height:230px}.customer-main .section-title .actions{gap:6px}.customer-main .section-title button{font-size:12px;padding:5px 9px}.task-card{padding:12px}}

/* Match the main video workspace: .9/1.1 columns, 13px editor,
   32px model controls, 40px generate button and 88px square previews. */
.subsite-customer{font-size:12px;line-height:1.55;min-height:100dvh;height:100dvh;display:flex;flex-direction:column}
.subsite-customer .site-header{padding:8px 20px;flex-shrink:0}
.subsite-customer .brand img{width:64px;height:52px}
.subsite-customer .brand strong{font-size:18px}
.subsite-customer .brand small,.subsite-customer .customer-name{font-size:11px}
.subsite-customer .customer-main{width:100%;max-width:none;padding:0 16px 16px;flex:1;min-height:0;display:flex;flex-direction:column}
.subsite-customer #workspace{flex:1;min-height:0;display:flex;flex-direction:column}
.subsite-customer .section-title{min-height:53px;margin-bottom:0;flex-shrink:0;padding:6px 5px}
.subsite-customer h1{font-size:13px}
.subsite-customer h2{font-size:18px}
.subsite-customer .video-only-workspace{grid-template-columns:minmax(360px,.9fr) minmax(360px,1.1fr);gap:14px;align-items:stretch;flex:1;min-height:520px}
.subsite-customer .video-editor{padding:12px 18px;display:flex;flex-direction:column;border-radius:14px;min-height:0;overflow:auto}
.subsite-customer .video-editor>header{margin-bottom:8px;flex-shrink:0}
.subsite-customer .video-editor h2{margin-bottom:0}
.subsite-customer .generation-form{display:flex;flex-direction:column;flex:1;min-height:0;gap:8px}
.subsite-customer .generation-form>label{display:flex;flex-direction:column;flex:1;min-height:138px;gap:6px}
.subsite-customer label{font-size:12px}
.subsite-customer button,.subsite-customer .button{font-size:12px;min-height:32px;padding:5px 10px}
.subsite-customer .video-editor textarea{min-height:100px;height:auto;max-height:none;flex:1;padding:12px;font-size:13px;line-height:1.8;border-radius:10px}
.subsite-customer .reference-tools{gap:5px}
.subsite-customer .reference-tools button{font-size:13px;min-height:32px;padding:6px 9px}
.subsite-customer .reference-drop{padding:8px;gap:4px;min-height:72px;flex-shrink:0}
.subsite-customer .reference-drop small{font-size:11px}
.subsite-customer .reference-drop:has(+.reference-list:not(:empty)){min-height:0;display:flex;flex-wrap:wrap;align-items:center;gap:2px 10px;padding:6px 8px}
.subsite-customer .reference-list{max-height:240px;overflow:auto;flex-shrink:0;flex-wrap:nowrap;gap:10px;padding:2px;align-items:flex-start}
.subsite-customer .reference-card{width:144px;max-width:100%;flex-shrink:0;min-width:0;padding:8px;border:1px solid var(--strong);border-radius:10px;background:var(--soft)}
.subsite-customer .reference-card[data-reference-type=reference_voice]{width:240px}
.reference-card-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.reference-card-heading strong{font-size:12px}
.subsite-customer .reference-card .reference-remove{width:28px;height:28px;min-height:28px;padding:0;flex-shrink:0;font-size:18px;line-height:1;border-radius:6px}
.subsite-customer .reference-card .reference-card-preview{display:flex;align-items:center;justify-content:center;width:100%;height:96px;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:var(--panel)}
.reference-card-preview img,.reference-card-preview video{display:block;width:100%;height:100%;object-fit:contain}
.reference-card-preview audio{display:block;width:100%;min-width:0;height:54px}
.reference-file-name{font-size:12px;line-height:1.5;margin-top:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reference-preview-error{font-size:12px;line-height:1.5;margin-top:7px;overflow-wrap:anywhere;color:var(--text)}
.reference-preview-dialog{width:min(1000px,calc(100% - 32px))}
.reference-preview-dialog header{gap:16px}.reference-preview-dialog h2{min-width:0;overflow-wrap:anywhere}.reference-preview-dialog header button{flex-shrink:0}
.reference-preview-dialog img{display:block;width:100%;max-height:65vh;object-fit:contain;background:var(--soft)}
.subsite-customer .video-options{grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr));gap:8px;flex-shrink:0}
.subsite-customer .video-options label{font-size:11px;gap:5px}
.subsite-customer .video-options select{font-size:12px;height:32px;min-height:32px;padding:0 7px;max-width:100%;border-radius:11px}
.subsite-customer .price-note{font-size:11px}
.subsite-customer .generation-feedback{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border:1px solid var(--strong);border-radius:8px;background:var(--soft);flex-shrink:0}
.subsite-customer .generation-feedback p{font-size:13px;line-height:1.6;color:var(--text);overflow-wrap:anywhere}
.subsite-customer .generation-feedback button{flex-shrink:0;font-weight:600}
.subsite-customer .notice,.subsite-customer .status{font-size:12px}
.subsite-customer .site-announcement{padding:8px 12px;margin:8px 0 0}
.subsite-customer .video-editor .primary{min-height:40px;height:40px;font-size:12px;padding:6px 10px;border-radius:16px;flex-shrink:0}
.subsite-customer .video-results{padding:12px;border-radius:14px;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.subsite-customer .video-results header{margin-bottom:8px}
.subsite-customer .video-results h2{font-size:15px}
.subsite-customer .video-results header p{font-size:11px}
.subsite-customer .task-filters{margin-bottom:8px}
.subsite-customer .task-filters button{font-size:11px;min-height:26px;padding:3px 8px}
.subsite-customer .video-task-list{flex:1;min-height:0;overflow:auto;align-content:start;gap:8px}
.subsite-customer .task-card{padding:8px;border-radius:8px;gap:8px}
.subsite-customer .task-card strong{font-size:13px}
.subsite-customer .task-card p{font-size:12px}
.subsite-customer .task-copy>small{font-size:10px}
.subsite-customer .task-media{flex-basis:88px}
.subsite-customer .task-media video{width:88px;height:88px}
.subsite-customer .task-media .button{min-height:32px;padding:5px 8px}
.subsite-customer .video-task-list .empty{padding:100px 16px;font-size:12px}
.subsite-customer .site-header .brand{min-width:0}
.subsite-customer .brand span{overflow-wrap:anywhere;min-width:0}
/* Auth is a full-size form even inside the compact video workspace shell. */
.subsite-customer .customer-auth{width:100%;max-width:460px;flex-shrink:0;align-self:center;margin:clamp(28px,7vh,64px) auto;padding:32px;font-size:16px;border-radius:16px}
.subsite-customer .customer-auth h2{font-size:26px;line-height:1.4;margin-bottom:24px}
.subsite-customer .customer-auth .segmented{gap:10px;margin-bottom:24px}
.subsite-customer .customer-auth .segmented button{flex:1}
.subsite-customer .customer-auth .section-form{gap:20px}
.subsite-customer .customer-auth label{font-size:15px;gap:8px}
.subsite-customer .customer-auth input{min-width:0;min-height:48px;font-size:16px;padding:11px 14px}
.subsite-customer .customer-auth button{min-height:44px;font-size:16px;padding:9px 16px}
.subsite-customer .customer-auth .primary{min-height:48px;font-weight:600}
.subsite-customer .customer-auth p{font-size:13px;line-height:1.7}
@media(max-width:480px){.subsite-customer .customer-auth{padding:24px;margin:28px auto}.subsite-customer .customer-auth h2{font-size:24px}}
@media(max-width:959px){.subsite-customer{height:auto;min-height:100dvh}.subsite-customer .video-only-workspace{grid-template-columns:1fr;min-height:0}.subsite-customer .video-editor textarea{min-height:180px}.subsite-customer .video-results{min-height:360px;max-height:650px}.subsite-customer .section-title{flex-wrap:wrap}}
@media(max-width:480px){.subsite-customer .customer-main{padding:0 12px 12px}.subsite-customer .site-header{padding:8px 12px}.subsite-customer .video-editor{padding:12px}.subsite-customer .video-options{grid-template-columns:repeat(2,minmax(0,1fr))}.subsite-customer .video-options>label:first-child{grid-column:1/-1}.subsite-customer .video-task-list .task-card{flex-direction:column}.subsite-customer .task-media{flex-basis:auto}}

#siteList [data-id]{display:flex;flex-direction:column;align-items:flex-start;gap:2px}#siteList [data-id] small{color:inherit;opacity:.7;overflow-wrap:anywhere;white-space:normal}.supply-admin .metrics{grid-template-columns:1fr}.supply-admin #permissionPanel{margin:0;padding:14px 20px}.supply-admin #brandForm[hidden]{display:none}details.panel{border:1px solid var(--line)}

.site-overview{display:contents}.supply-admin .site-overview{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr);gap:16px}.supply-admin .site-overview>.panel{margin-top:0!important}.supply-admin .site-overview header{margin-bottom:0}.supply-admin .site-overview .metric{padding:18px}.supply-admin .site-overview .metric strong{font-size:26px;margin:3px 0}@media(max-width:700px){.supply-admin .site-overview{grid-template-columns:1fr}}

#customerSearch,#taskSearch{margin-bottom:16px}#customerSearch input,#taskSearch input{flex:1;min-width:160px;width:auto}.pager{margin-top:16px;justify-content:flex-end}.manager-task-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px}.manager-task-card{padding:16px;border:1px solid var(--strong);border-radius:10px;min-width:0}.manager-task-card header{display:flex;justify-content:space-between;gap:12px}.manager-task-card p{white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:12px 0}.manager-task-card>.actions{margin-top:12px}.manager-task-dialog{width:min(900px,calc(100% - 32px))}.manager-task-dialog video{width:100%;max-height:55vh;background:#000;margin:16px 0}.task-full-prompt{white-space:pre-wrap;overflow-wrap:anywhere;margin:16px 0}#creditHistory{overflow:auto}#creditStatus{white-space:pre-wrap}

[data-price-status]{display:block;white-space:normal;max-width:260px;margin-top:6px;line-height:1.5}
.supply-ledger-title{margin-top:24px}.ledger-note{min-width:220px;max-width:360px;white-space:normal;overflow-wrap:anywhere}.ledger-note small{display:block;margin-top:4px;font-size:11px}#customerLedgerStatus{margin-bottom:10px}

/* Superadmin: one collapsed row per agent, with controls beneath the selected row. */
.supply-admin .site-shell{display:block;max-width:1450px;padding:24px 30px}
.supply-admin .site-sidebar{position:static;display:block;margin-bottom:14px}
.supply-admin #siteListTitle{display:none}
.supply-admin .site-content{gap:14px}
.supply-admin #siteList{display:grid;gap:12px;min-width:0}
.supply-admin .agent-accordion-item{min-width:0;border:1px solid var(--strong);border-radius:12px;background:var(--panel);overflow:hidden}
.supply-admin #siteList [data-id]{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,160px) 70px 20px;align-items:center;gap:16px;width:100%;padding:16px 20px;border:0;border-radius:0;background:var(--panel);color:var(--text);text-align:left}
.supply-admin #siteList [data-id]:hover,.supply-admin #siteList [data-id][aria-expanded=true]{background:var(--soft)}
.agent-summary-name,.agent-summary-balance{display:flex;flex-direction:column;min-width:0}
.agent-summary-name strong{font-size:16px}.agent-summary-name small{overflow-wrap:anywhere}
.agent-summary-balance strong{font-size:20px}.agent-summary-balance small{font-size:11px}
.agent-chevron{transition:transform .15s;text-align:center;font-size:20px}
[aria-expanded=true]>.agent-chevron{transform:rotate(180deg)}
.supply-admin #siteDetail{padding:18px 20px 20px;border-top:1px solid var(--line)}
.supply-admin #siteDetail>#visitSite{margin-bottom:14px}
.supply-admin #siteDetail .panel{padding:18px}
.supply-admin .site-content>.section-title{margin-bottom:0}
@media(max-width:700px){.supply-admin .site-shell{padding:16px}.supply-admin #siteList [data-id]{grid-template-columns:minmax(0,1fr) auto 16px;gap:10px;padding:14px}.supply-admin [data-site-state]{grid-column:1;grid-row:2;font-size:12px}.supply-admin .agent-chevron{grid-column:3;grid-row:1}.supply-admin #siteDetail{padding:14px}.agent-summary-balance strong{font-size:18px}}

/* Main workspace dialog language: paper/ink, strong controls, consistent return. */
dialog.workspace-dialog{width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:28px;border-radius:18px;border:1px solid var(--strong);box-shadow:0 24px 80px #0006}
dialog.workspace-dialog::backdrop{background:#0008;backdrop-filter:blur(4px)}
dialog.workspace-dialog>header{gap:18px;align-items:flex-start;margin-bottom:24px}
dialog.workspace-dialog h2{font-size:22px;line-height:1.4;overflow-wrap:anywhere}
dialog.workspace-dialog header button{flex-shrink:0;min-height:36px;border-radius:10px}
dialog.workspace-dialog input,dialog.workspace-dialog select,dialog.workspace-dialog button.primary{min-height:44px;font-size:14px;border-radius:10px}
dialog.workspace-dialog form{gap:18px}dialog.workspace-dialog p[role=status]:not(:empty){padding:12px 14px;margin-top:16px;border:1px solid var(--line);border-radius:10px;background:var(--soft);white-space:pre-wrap;overflow-wrap:anywhere}
dialog.workspace-dialog.reference-preview-dialog{width:min(1000px,calc(100vw - 32px))}
#billingDialog.workspace-dialog,#taskDialog.workspace-dialog{width:min(780px,calc(100vw - 32px))}
#paymentHistory{display:grid;gap:8px}#paymentHistory button{justify-content:flex-start;text-align:left;white-space:normal}
#paymentQr{display:flex;justify-content:center;margin-top:16px}#checkPayment{margin-top:16px;width:100%}
.workspace-return{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:108px;min-height:36px;padding:0 12px;border:1px solid var(--strong);border-radius:8px;background:var(--panel);color:var(--text);font-size:13px;font-weight:600;text-decoration:none}
.creative-tabs{display:flex;gap:8px}.creative-tabs [aria-pressed=true]{background:var(--text);color:var(--panel)}
.creative-home{padding:clamp(24px,5vw,80px);max-width:1000px;margin:0 auto;width:100%}.subsite-customer .creative-home h1{font-size:clamp(26px,4vw,40px);margin:8px 0 14px}.creative-home-tools{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:32px}.creative-home-tools button{display:grid;text-align:left;justify-content:stretch;gap:16px;padding:28px;min-height:180px;border-radius:16px}.creative-home-tools strong{display:flex;justify-content:space-between;font-size:22px}.creative-home-tools button>span{color:var(--muted);font-size:14px;line-height:1.8}
.panel-heading{display:flex;align-items:center;gap:10px}.step{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--strong);border-radius:9px;font-weight:600;flex-shrink:0}
.image-options{grid-template-columns:repeat(3,minmax(0,1fr))}.image-reference-card{display:flex;align-items:center;gap:12px;padding:8px;border:1px solid var(--line);border-radius:10px;margin-top:8px}.image-reference-card img{width:64px;height:64px;object-fit:contain;border-radius:8px}.image-reference-card span{flex:1;min-width:0;overflow-wrap:anywhere}
.image-results{display:grid;gap:14px;overflow:auto}.image-job>small{display:block;margin-top:5px}.image-job .actions{margin-top:12px}.image-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.image-result-grid>div{min-width:0;display:grid;gap:8px}.subsite-customer .image-result-preview{width:100%;padding:0;aspect-ratio:1;overflow:hidden;border-radius:10px}.image-result-preview img{width:100%;height:100%;object-fit:contain;margin:0;border-radius:0}.task-error{border:1px solid var(--line);padding:10px;border-radius:8px;background:var(--soft)}
#imageWorkspace .video-results{overflow:auto}#imageModelName{margin-bottom:10px;overflow-wrap:anywhere}#imageFeedback p{white-space:pre-wrap;overflow-wrap:anywhere}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[role=button]:focus-visible{outline:2px solid var(--text);outline-offset:3px}
@media(max-width:760px){.creative-home{padding:24px 6px}.creative-home-tools{grid-template-columns:1fr}.subsite-customer .site-header>.actions{width:100%;gap:8px}.image-options{grid-template-columns:repeat(2,minmax(0,1fr))}dialog.workspace-dialog{padding:20px}.image-result-grid{gap:8px}}
@media(prefers-reduced-motion:reduce){dialog{animation:none!important;scroll-behavior:auto}}

.subsite-home-navigation{display:flex;align-items:center;height:56px;min-height:56px;padding:0 20px;background:var(--bg)}#customerTaskKind{width:130px}#taskImages img{width:100%;aspect-ratio:1;object-fit:contain;border:1px solid var(--line);border-radius:10px}#taskImages>div{display:grid;gap:8px}

.subsite-customer .generation-actions{position:sticky;bottom:0;z-index:2;display:grid;gap:8px;flex-shrink:0;margin-top:auto;padding:8px 0 0;border-top:1px solid var(--line);background:var(--panel)}.generation-actions .generation-feedback{max-height:160px;overflow:auto}.generation-actions>.primary{width:100%}

/* Video editor follows the main site's named-reference and fixed-content flow. */
.subsite-customer .prompt-field{display:flex;flex-direction:column;position:relative;flex:1;min-height:170px;gap:8px}
.subsite-customer .editor{flex:1;min-height:120px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;font-size:13px;line-height:1.8;border:1px solid var(--strong);border-radius:10px;background:var(--soft);color:var(--text);outline-offset:2px}
.subsite-customer .editor:empty:before{content:attr(data-placeholder);color:var(--muted);pointer-events:none}
.subsite-customer .ref-tag{display:inline-flex;align-items:center;gap:5px;max-width:100%;border:1px solid var(--strong);border-radius:6px;padding:0 5px;margin:1px 2px;background:var(--panel);vertical-align:middle;white-space:normal}
.subsite-customer .ref-tag button{padding:0 2px;min-height:22px;border:0;background:transparent;color:inherit}
.subsite-customer .subsite-mentions{position:fixed;z-index:100;width:230px;max-height:200px;overflow:auto;display:grid;background:var(--panel);border:1px solid var(--strong);border-radius:14px;padding:6px;box-shadow:0 8px 24px #0005}
.subsite-customer .subsite-mentions button{display:flex;align-items:center;gap:8px;width:100%;min-width:0;min-height:36px;padding:6px;border:0;border-radius:10px;background:transparent;color:var(--text);font-size:12px;line-height:24px;text-align:left;justify-content:flex-start;white-space:nowrap}
.subsite-customer .subsite-mentions button:hover,.subsite-customer .subsite-mentions [aria-selected=true]{background:var(--soft);color:var(--text)}.subsite-mentions p{padding:10px;font-size:13px}
.subsite-customer .reference-mention-visual{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:0 0 24px;border-radius:6px;object-fit:cover;background:var(--soft);font-size:16px;line-height:1}
.subsite-customer .reference-mention-name{min-width:0;overflow:hidden;text-overflow:ellipsis}
.subsite-customer .ref-tag .reference-mention-visual{width:22px;height:22px;flex-basis:22px}
.subsite-customer .reference-file-name{width:100%;min-width:0;font-size:12px;padding:5px;margin:8px 0 4px;min-height:30px}
.subsite-customer .reference-insert{width:100%;border-color:var(--strong)}
.subsite-customer .fixed-prompt-wrap{margin:0;padding:6px 0;flex-shrink:0}.fixed-prompt-wrap summary small{margin-left:10px;color:var(--muted);font-weight:400}
.subsite-customer .fixed-prompt-wrap textarea{width:100%;min-height:72px;margin-top:8px;resize:vertical;max-height:160px}
.subsite-customer .video-batch-options{grid-template-columns:minmax(90px,140px) 1fr;align-items:end}.video-batch-options p{padding-bottom:7px}
.subsite-customer .task-toolbar{margin:0 0 10px;flex-wrap:wrap}.subsite-customer .task-selection{display:flex;align-items:center;gap:5px}.subsite-customer .task-selection input{width:16px;min-height:16px}
.subsite-customer #videoTaskPreview{width:100%;max-height:55vh;margin-top:16px;background:#000}.subsite-customer .task-full-prompt{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere}
.subsite-customer .brand img{width:70px;height:58px;object-fit:contain}
.subsite-customer .reference-list{max-height:180px}.subsite-customer .reference-card .reference-card-preview{height:64px;min-height:64px}.subsite-customer .reference-card-preview img,.subsite-customer .reference-card-preview video{height:64px}.subsite-customer .reference-original-name{display:none}.subsite-customer .reference-card-heading{margin-bottom:4px}
.subsite-customer .generation-actions .video-options{flex-shrink:0}.subsite-customer #generateForm{min-height:0;overflow:hidden}.subsite-customer #generateForm .generation-actions{position:static;margin-top:0}.subsite-customer #generateForm .prompt-field{min-height:150px}
.subsite-editor-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto;gap:8px;padding-right:2px}.subsite-editor-content>.reference-tools{flex-shrink:0}
@media(max-width:959px){.subsite-customer .prompt-field{min-height:240px}.subsite-customer .editor{max-height:360px}.subsite-customer .generation-form{min-height:0;flex:none}.subsite-customer .video-only-workspace{min-height:0}.subsite-customer .generation-actions{position:static}}

/* Compact reference shelf leaves the prompt room to breathe. */
.subsite-customer .reference-list{max-height:130px;gap:8px;padding:2px 2px 6px}
.subsite-customer .reference-card{position:relative;display:grid;grid-template-columns:48px minmax(0,1fr);gap:6px;width:184px;padding:8px}
.subsite-customer .reference-card-heading{grid-column:1/-1;margin:0;height:20px}
.subsite-customer .reference-card-heading strong{font-size:11px;color:var(--muted);font-weight:400}
.subsite-customer .reference-card .reference-remove{width:22px;height:22px;min-height:22px}
.subsite-customer .reference-card .reference-card-preview{grid-row:2/4;width:48px;height:48px;min-height:48px;align-self:center}
.subsite-customer .reference-card-preview img,.subsite-customer .reference-card-preview video{height:100%;object-fit:contain}
.subsite-customer .reference-file-name{margin:0;min-height:24px;height:24px;padding:2px 5px}
.subsite-customer .reference-insert{min-height:24px;height:24px;padding:1px 5px}
.subsite-customer .reference-preview-error{grid-column:1/-1}
.subsite-customer .reference-card[data-reference-type=reference_voice],.subsite-customer .reference-card[data-reference-type=reference_video]{width:240px;grid-template-columns:1fr 1fr}
.subsite-customer .reference-card[data-reference-type=reference_voice] .reference-card-preview,.subsite-customer .reference-card[data-reference-type=reference_video] .reference-card-preview{grid-column:1/-1;grid-row:auto;width:100%;height:54px}
.subsite-customer .generation-price{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 18px;padding:10px 14px;background:var(--soft);border:1px solid var(--line);border-radius:10px}
.subsite-customer .generation-price .price-note{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;font-size:13px}
.subsite-customer .generation-price .price-note strong{font-size:24px;line-height:1.2;letter-spacing:-.5px;color:var(--text);font-variant-numeric:tabular-nums}
.subsite-customer .generation-price .price-note small,.subsite-customer .cost-balance{font-size:12px;color:var(--muted)}
.subsite-customer .wallet-summary{display:flex;align-items:center;gap:10px;padding:6px 12px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}
.subsite-customer .wallet-summary small{font-size:12px}.subsite-customer #balance{font-size:22px;line-height:1.3;font-variant-numeric:tabular-nums}.subsite-customer .customer-name{font-size:13px}

/* Long order identifiers and report columns scroll inside their panel. */
.site-content>#siteDetail,.site-content>.site-overview,#reportPanel{min-width:0;max-width:100%}#reportRows{width:100%;min-width:0;max-width:100%;overflow:auto}#reportForm{margin:16px 0;align-items:end}#reportForm>input{flex:1 1 180px;width:auto;min-width:0}#reportForm label{flex:0 1 180px;min-width:0}#reportTotals{overflow-wrap:anywhere}.task-next-step{font-size:12px;line-height:1.7;color:var(--muted,#888);margin:6px 0}
