/* One readable scale across the creation page, dialogs and admin screens. */
:root{--notice-height:42px;--muted:#737780;--soft:#f0f0f2;--line:#e6e6e9}
body{font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased}
body.dark{--bg:#141416;--panel:#1e1e21;--text:#f2f2f4;--muted:#a3a3ad;--line:#303034;--soft:#27272c;--accent:#e5ba58;--accent-soft:#363124;--shadow:0 12px 36px #0002}
body.dark .creation-mode-tabs{background:var(--soft)}
.site-announcement{min-height:var(--notice-height);padding:10px 44px;display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;background:#45488e;color:#fff;font-size:13px;line-height:22px;text-align:center}
.site-announcement strong{font-weight:600;letter-spacing:.3px}
#sidebar{top:var(--notice-height);width:236px;padding:26px 18px;background:var(--panel)}
#sidebar{overflow:hidden}#sidebar>.brand,#sidebar>.new-project,#sidebar>.nav-label,#sidebar>.sidebar-bottom{flex-shrink:0}#sidebar nav{min-height:0;overflow-y:auto;flex:1 1 auto;scrollbar-width:thin}
@media(max-height:850px){#sidebar .storage{display:none}#sidebar .account{margin-top:12px}}
.app-shell{margin-left:236px;min-height:calc(100vh - var(--notice-height))}
.brand{font-size:23px;letter-spacing:0;gap:12px;margin-bottom:30px}.brand small{font-size:13px;line-height:1.5;letter-spacing:.4px;margin-top:2px}
.new-project{font-size:15px;font-weight:600;min-height:48px}
body .new-project.primary{background:var(--soft);color:var(--text);box-shadow:none}.nav-tag{display:none}.nav-text{white-space:nowrap}
.nav-label{font-size:12px;letter-spacing:0;padding:25px 14px 12px}
nav a{font-size:15px;min-height:48px;padding:12px 14px;gap:14px}nav a svg{width:20px;height:20px}.nav-tag{font-size:10px;padding:2px 6px;line-height:1.4}
.storage,.storage small{font-size:12px}.account strong{font-size:14px}.account small{font-size:12px}.avatar{width:36px;height:36px;font-size:15px}
header{height:76px;padding:0 32px;border-bottom:0}.breadcrumbs{font-size:15px}.credits{font-size:14px;padding:9px 17px}.credit-icon{font-size:17px}.connection{font-size:12px}.header-actions{gap:18px}
main:has(.workspace){padding:30px 40px 24px;max-width:1520px}.workspace{max-width:1160px}
.hero{padding:20px 0 32px}.hero>.eyebrow{display:none}.hero h1{font-family:inherit;font-size:32px;font-weight:650;letter-spacing:0;margin:0 0 18px;line-height:1.4}.hero p{font-size:16px;letter-spacing:0;color:var(--muted);line-height:1.7}
.creation-mode-tabs{width:min(600px,100%);margin:0 auto 30px;padding:5px;border-radius:23px;gap:0;background:var(--soft)}
.creation-mode-tabs button{font-size:16px;font-weight:600;padding:15px 12px;border-radius:19px;gap:10px;color:var(--muted)}.creation-mode-tabs button.active{background:var(--panel);color:var(--text);box-shadow:0 2px 8px #0001}.creation-mode-tabs button svg{height:22px;width:22px}
.reference-composer{padding:26px 28px 22px;border-radius:26px;border:1px solid var(--line);box-shadow:0 8px 25px #00000008;background:var(--panel)}
.reference-composer:focus-within{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-soft)}
.reference-composer textarea{font-size:17px;line-height:1.8;min-height:108px;padding:2px 0 8px;resize:vertical;font-weight:400}.reference-composer textarea::placeholder{color:var(--muted);opacity:.86}
.reference-tray{margin:12px 0 18px}.reference-tabs{font-size:14px;gap:22px;margin-bottom:16px}.reference-tabs [data-clear-references]{font-size:13px}
.reference-tray[data-reference-count="0"] .reference-tabs{display:none}
.reference-tray[data-reference-count="0"] .reference-add{display:flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;min-height:42px;padding:8px 17px;border-radius:99px;font-size:14px}.reference-tray[data-reference-count="0"] .reference-add strong{font-size:23px;line-height:1}
.reference-filter-empty{font-size:13px;color:var(--muted);margin:0 0 12px}.reference-filter-empty button{color:var(--accent);text-decoration:underline}
.voucher-guide{padding:16px 18px;margin:0 0 20px;border-radius:12px;background:var(--soft);font-size:13px;line-height:1.8}.voucher-guide strong{font-weight:500}.voucher-guide p{color:var(--muted);margin:6px 0 0}.voucher-presets{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:18px;font-size:13px}.voucher-presets>span{color:var(--muted);margin-right:4px}.voucher-presets button{padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:var(--soft)}
.composer-sub{font-size:12px;gap:12px;color:var(--muted)}.composer-sub>span{font-size:12px}
.composer-tools{gap:9px;margin-top:20px;padding-top:0;border:0}.composer-tools .tool,.composer-tools .tool-select{font-size:13px;padding:11px 13px;border-radius:99px;background:var(--soft);border-color:transparent;min-height:44px}.model-trigger{min-width:218px}.tool-select{max-width:215px}.generate{font-size:14px;min-height:46px;min-width:140px;border-radius:99px;padding:11px 19px;font-weight:600}.generate span:last-child{font-size:20px}.estimate{font-size:13px;white-space:nowrap}.composer-meta{font-size:12px;margin:14px 0 23px;line-height:1.6}
.quick-actions{gap:14px;margin:18px 0 38px}.quick{padding:15px 12px;gap:12px;border-color:transparent;background:transparent}.quick-icon{width:39px;height:39px;border-radius:12px}.quick strong{font-size:15px}.quick small{font-size:12px;margin-top:4px;line-height:1.6}.video-model-guide .quick-icon{font-size:13px}
.section-head h2{font-size:22px;line-height:1.5}.section-head p{font-size:13px;margin-top:6px}.card-copy{padding:16px}.card-copy strong{font-size:15px}.card-copy p{font-size:13px}.card-copy .card-tag{font-size:11px;margin-top:12px}.poster-label{font-size:10px}.poster-number{font-size:11px}
footer,footer button{font-size:12px}.page-heading h1{font-size:28px;letter-spacing:0}.page-heading p{font-size:14px}.panel h2{font-size:19px}.small,dialog p{font-size:13px;line-height:1.7}.panel label,.form label{font-size:14px}.panel input,.panel select,.form input{font-size:14px}.data-table{font-size:13px}.table-sub{font-size:12px}.stat small{font-size:13px}.stat strong{font-size:28px}
dialog h2{font-size:24px}.form-switch{font-size:14px}.form-error{font-size:13px}.primary,.secondary{font-size:14px}.eyebrow{font-size:11px}.api-path{font-size:13px}.api-endpoints code,.code-example{font-size:12px}.job-top,.job-receipt{font-size:12px}.job-prompt{font-size:15px}.status{font-size:12px}.job-actions button,.job-actions a{font-size:13px}.pagination{font-size:13px}.detail-prompt{font-size:14px}
@media(max-width:1150px){:root{--notice-height:64px}.site-announcement{min-height:64px;padding:10px 22px;gap:0 8px;font-size:12px}#sidebar{width:200px;padding-left:12px;padding-right:12px}.app-shell{margin-left:200px}main:has(.workspace){padding:24px}.hero h1{font-size:29px}.hero p{font-size:15px}.reference-composer{padding:23px}.composer-tools .tool,.composer-tools .tool-select{font-size:13px;padding:10px 12px}.composer-tools .generate{margin-left:auto}.connection{display:none}}
@media(max-width:950px){#sidebar{width:72px;padding-left:10px;padding-right:10px}.app-shell{margin-left:72px}.brand{margin-left:5px;margin-right:5px}.brand>span:last-child,.account>span:not(:first-child){display:none}.new-project{padding:8px}nav a{padding:12px;min-height:47px}.account{justify-content:center}.quick strong{font-size:14px}.quick small{font-size:12px}.hero{padding-top:15px}header{padding:0 24px}.model-trigger{min-width:210px}}
@media(max-width:650px){:root{--notice-height:82px}.site-announcement{min-height:82px;padding:9px 15px;gap:0;font-size:12px;line-height:20px}.site-announcement>span{display:block;width:100%}#sidebar{width:58px;padding:20px 7px}.app-shell{margin-left:58px}.brand{margin:0 0 25px}.brand-mark{font-size:19px;width:34px;height:36px}nav a{padding:12px 7px}header{height:62px;padding:0 14px}.breadcrumbs{font-size:12px;gap:8px}.credits{font-size:12px;padding:6px 10px}.header-actions{gap:8px}main:has(.workspace){padding:19px 14px}.hero{padding:15px 0 25px}.hero h1{font-size:24px;margin-bottom:13px}.hero p{font-size:14px}.creation-mode-tabs{margin-bottom:23px;padding:4px;border-radius:18px}.creation-mode-tabs button{font-size:13px;padding:11px 6px;gap:5px;border-radius:15px}.creation-mode-tabs button svg{width:17px;height:17px}.reference-composer{padding:19px 17px;border-radius:20px}.reference-composer textarea{font-size:15px;min-height:120px}.composer-tools{gap:8px;align-items:center}.composer-tools .tool,.composer-tools .tool-select{font-size:12px;padding:9px 11px;min-height:40px}.model-trigger{min-width:0;max-width:100%}.composer-sub>span{display:block;font-size:11px}.composer-sub>span:first-child{display:none}.generate{font-size:13px;min-width:133px;min-height:43px}.estimate{font-size:12px}.reference-tabs{gap:13px;font-size:12px}.reference-tabs [data-clear-references]{font-size:12px}.quick-actions{margin-bottom:30px}.quick{padding:10px 6px}.quick small{font-size:12px}.section-head h2{font-size:20px}.section-head p{font-size:12px}.card-copy{padding:12px}.card-copy strong{font-size:13px}.card-copy .card-tag{font-size:10px}.page-heading h1{font-size:24px}.page-heading p{font-size:13px}.panel{padding:19px}.panel h2{font-size:18px}.stat small{font-size:12px}.stat strong{font-size:23px}.reference-mentions{top:98px}}

.account-status{color:var(--muted)}.account-status.is-banned{color:#e58282}.user-adjust-preview{font-size:17px;font-weight:600;padding:12px;background:var(--soft);border-radius:10px}

#managed-models .managed-provider-group{padding-top:18px}
#managed-models .managed-provider-group+.managed-provider-group{margin-top:30px;padding-top:26px;border-top:2px solid var(--line)}
#managed-models .managed-provider-heading{display:flex;align-items:center;gap:12px;margin-bottom:16px}
#managed-models .managed-provider-heading h3{margin:0;font-size:17px;color:var(--text)}
#managed-models .managed-image-price{display:block;margin:9px 0;padding:8px 12px;white-space:nowrap}
/* Keep model settings usable in the narrow management browser. */
@media(max-width:1100px){
  #managed-models .table-wrap{overflow:visible}
  #managed-models table,#managed-models tbody{display:block;width:100%;min-width:0}
  #managed-models thead{display:none}
  #managed-models tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:20px 0;border-bottom:1px solid var(--line,#343438)}
  #managed-models td{display:block;border:0;padding:0;min-width:0}
  #managed-models td:first-child{grid-column:1/-1;grid-row:1}
  #managed-models td:nth-child(2){grid-column:1;grid-row:2}
  #managed-models td:nth-child(3){grid-column:1/-1;grid-row:3}
  #managed-models td:nth-child(4){grid-column:2;grid-row:2;display:flex;align-items:center;gap:10px}
  #managed-models td:nth-child(5){grid-column:1/-1;grid-row:4}
  #managed-models td:first-child::before{content:'显示名称';display:block;font-size:12px;margin-bottom:6px;opacity:.65}
  #managed-models td:nth-child(2)::before{content:'售价（积分）';display:block;font-size:12px;margin-bottom:6px;opacity:.65}
  #managed-models td:nth-child(3)::before{content:'上游管理网址（仅管理员）';display:block;font-size:12px;margin-bottom:6px;opacity:.65}
  #managed-models td:nth-child(4)::before{content:'启用模型';font-size:12px}
  #managed-models [data-name],#managed-models [data-url]{width:100%;min-width:0!important;box-sizing:border-box}
  #managed-models [data-price]{max-width:120px}
  #managed-models [data-managed-save]{width:100%}
}

@media(max-width:950px){
  .admin-portal #sidebar{width:116px;padding-left:10px;padding-right:10px}
  .admin-portal .app-shell{margin-left:116px}
  .admin-portal #nav a{padding:12px 8px;gap:4px;font-size:13px;white-space:normal}
  .admin-portal .admin-user-count{display:none}
}

/* Native model dropdowns; unavailable models remain visible but cannot be selected. */
.model-select{min-width:240px;max-width:440px;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.model-select option:disabled,.model-select .out-of-stock{color:#85858f;background:#2b2b30}
.is-out-of-stock{color:#85858f!important;opacity:.65;cursor:not-allowed!important}
body.light .model-select option:disabled{color:#999;background:#eee}
@media(max-width:700px){.composer-tools .model-select{min-width:0;max-width:100%;width:100%}.image-model-wrap{max-width:100%;width:100%}}
