:root{--bg:#0e1412;--panel:#151b19;--panel-soft:#1c2922;--line:#33443b;--text:#eef4f1;--muted:#afbeb5;--accent:#b5e1cc;--accent-dim:#263c31;background:var(--bg);font-family:"PingFang SC","Microsoft YaHei UI",system-ui,sans-serif}
body{font-size:15px;line-height:1.65}button,input,textarea{font-size:16px}button:disabled{cursor:not-allowed}.secondary,.danger-button{min-height:44px;font-size:13px;padding:10px 15px}.secondary{background:#203329;border-color:#405a4b}.secondary:hover{background:#2c4336;border-color:var(--accent)}.primary{min-height:48px;font-size:16px;color:#112a1b}.primary:hover{background:#cef0df;transform:none}.primary:disabled{background:#40584b;color:#ccdbd1}.panel{border-radius:14px}.brand{font-size:20px}.brand small{font-size:10px;letter-spacing:0}.nav-label{font-size:12px;letter-spacing:0}.nav-item{font-size:14px;min-height:48px}.nav-item.active{color:var(--accent);background:#243c2e}.nav-icon{font-size:21px;line-height:1;min-width:22px;text-align:center}.nav-count{font-size:11px}.topbar{height:70px;font-size:13px}.content{max-width:1540px;padding-top:32px}.page-heading h1{font-size:32px;letter-spacing:0;font-weight:600}.page-heading p{font-size:14px}.private-badge{font-size:12px}.storage-banner{background:#192920;border-color:#3f5848;padding:15px 20px}.storage-banner strong{font-size:14px}.storage-banner p{font-size:12px}.workbench{grid-template-columns:minmax(300px,370px) minmax(0,1fr);gap:22px}.controls{padding:24px}.panel-title h2,.output-heading h2{font-size:16px;font-weight:600}.small-label{font:12px inherit;letter-spacing:0}.controls textarea{min-height:180px;font-size:16px;line-height:1.85;background:#101a14;color:var(--text);border-color:#45614f;padding:14px}.prompt-meta{font-size:11px;color:var(--muted);margin-bottom:22px}.seed-label{font-size:13px;gap:8px;flex-wrap:wrap;margin-bottom:8px}.seed-label .muted{font-size:11px}.controls input[type=number]{font-size:16px;padding:12px;margin-bottom:20px;min-height:48px}.controls legend{font-size:13px;margin-bottom:10px}.ratio>span{min-height:70px;padding:10px;background:#16241b}.ratio input:checked+span{background:#263e30;color:var(--accent);border-color:var(--accent)}.ratio strong{font-size:15px}.ratio small{font-size:11px}.generation-note{font-size:12px;color:var(--muted)}.error{font-size:13px;margin-top:10px}.image-stage{min-height:340px;height:clamp(380px,52vh,650px);background-color:#111b15;background-image:radial-gradient(#3c4c412e 1px,transparent 1px);background-size:16px 16px;background-position:0 0;padding:16px}.output{scroll-margin-top:20px}.output-heading{padding:18px 22px}.output-tag{font-size:11px;padding:4px 9px;color:#c0d9c8}.result-metrics{width:100%;display:grid;grid-template-columns:1fr 1fr 1fr;gap:15px}.result-metrics span{font-size:11px}.result-metrics strong{font-size:13px}.result-caption{font-size:12px;color:var(--muted);line-height:1.7}.result-actions{padding:0 22px 18px}.save-buttons{display:flex;gap:10px;flex-wrap:wrap}.save-buttons .primary{flex:1;width:auto;min-width:140px}.save-buttons .secondary{flex:0 0 auto}.result-actions p{font-size:12px;color:var(--muted);margin:12px 0 0;line-height:1.8;overflow-wrap:anywhere}#preview-empty p{font-size:14px}.pending-panel{padding:20px 22px}.pending-panel>summary{display:flex;align-items:baseline;gap:12px;cursor:pointer;list-style:none;min-height:44px}.pending-panel>summary::before{content:'⌄';color:var(--accent)}.pending-panel:not([open])>summary::before{content:'›'}.pending-panel>summary h2{font-size:15px}.pending-panel>summary span{font-size:12px;color:var(--muted)}.pending-panel>.panel-title{margin:10px 0 0;gap:12px}.pending-panel p{font-size:12px}.job-row{font-size:14px}.job-row small{font-size:11px;overflow-wrap:anywhere}.history-card p{font-size:13px;height:44px;color:#c8d6cc}.history-meta{font-size:11px}.history-card .card-actions{flex-wrap:wrap}.history-card .card-actions button{font-size:12px;min-height:44px}.empty-state p{font-size:14px}.api-panel p{font-size:14px}.api-panel h2{font-size:18px}.api-panel pre{font-size:13px}.api-panel summary{font-size:15px;cursor:pointer;min-height:40px}.api-panel details{margin-top:25px}.storage-guide{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin:25px 0;padding:22px 0;border-block:1px solid var(--line)}.storage-guide h3{font-size:16px;margin:0 0 8px}.storage-guide p{margin:0}.login-brand{font-size:16px;color:var(--accent);margin:0 0 26px}.delete-dialog{background:#18251c;border-color:#4d6655;border-radius:18px}.delete-dialog-body{padding:30px}.delete-dialog h2{font-size:24px;font-weight:600}.delete-dialog p{font-size:14px}.account-form{gap:12px}.account-form input{font-size:16px;min-height:50px}.account-form label{font-size:14px}.auth-note{font-size:12px!important}.original-dialog{background:#101713;color:var(--text);border:1px solid var(--line);border-radius:16px;padding:0;width:min(1100px,calc(100vw - 24px));max-height:92dvh;overscroll-behavior:contain}.original-dialog::backdrop{background:#000c}.original-toolbar{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;background:#17221cf5;z-index:1}.original-toolbar h2{font-size:17px}.original-toolbar p{font-size:12px;color:var(--muted);margin:3px 0 0}#original-image{display:block;max-width:100%;width:auto;height:auto;max-height:none;margin:0 auto;-webkit-touch-callout:default;user-select:auto}.toast{z-index:100;background:var(--accent);font-size:14px;max-width:min(560px,90vw);width:max-content;overflow-wrap:anywhere}.connection{font-size:11px}.hardware{font-size:12px}.hardware small{font-size:11px}footer{font-size:11px;color:#a2b6a9}.output-bottom{padding:18px 22px}
@media(min-width:1600px){.workbench{grid-template-columns:390px minmax(0,1fr)}}
@media(min-width:761px) and (max-width:1050px){.sidebar{width:80px;padding:28px 10px}.brand{margin-bottom:40px}.brand>span:not(.brand-mark),.nav-label,.sidebar-bottom{display:none}.nav-item{flex-direction:column;gap:7px;padding:10px 3px;font-size:10px}.nav-item>span{display:block}.nav-item .nav-count{display:none}.nav-item .nav-icon{font-size:22px}main{margin-left:80px}.content{padding:25px 20px 0}.workbench{grid-template-columns:minmax(260px,.9fr) minmax(0,1fr);gap:16px}.controls{padding:18px}.save-buttons .primary{flex-basis:100%}.image-stage{height:420px}.topbar{padding:0 20px}.toast{left:calc(50% + 40px)}}
@media(max-width:760px){
 .sidebar{position:fixed;inset:auto 0 0;width:100%;height:calc(66px + env(safe-area-inset-bottom));padding:0 8px env(safe-area-inset-bottom);border-right:0;border-top:1px solid #405345;background:#142219f5;backdrop-filter:blur(16px);z-index:20;display:block}.sidebar .brand,.sidebar .nav-label,.sidebar-bottom{display:none}.sidebar nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;height:66px;align-items:center}.nav-item{width:100%;min-height:56px;padding:5px 2px;display:flex;flex-direction:column;justify-content:center;gap:3px;font-size:11px;line-height:1.4;border-radius:9px}.nav-item>span{display:block}.nav-item .nav-icon{font-size:23px;min-width:0;line-height:1.1}.nav-item .nav-count{display:none}.nav-item.active{background:#294332;color:#c9f1dd}main{margin-left:0;min-width:0}.topbar{height:60px;padding:0 18px;font-size:12px}.topbar .breadcrumb{font-size:15px;font-weight:600;color:var(--text)}.topbar .slash,.topbar #page-name{display:none}.account-badge{gap:8px}.account-badge #username{font-size:11px}.account-badge .secondary{min-height:36px;padding:6px 12px;font-size:12px}.content{padding:24px 16px calc(85px + env(safe-area-inset-bottom));max-width:640px}.page-heading{align-items:flex-start;margin-bottom:20px;gap:10px}.page-heading h1{font-size:27px;line-height:1.4}.page-heading p{font-size:13px;margin-top:6px}.page-heading .secondary{font-size:12px;min-height:42px;padding:8px 12px}.storage-banner{flex-direction:row;align-items:center;gap:12px;padding:13px 14px;margin-bottom:18px}.storage-banner strong{font-size:13px}.storage-banner p{font-size:11px;line-height:1.7}.storage-banner .secondary{font-size:11px;padding:8px 10px;min-height:42px}.workbench{grid-template-columns:minmax(0,1fr);gap:18px}.controls{padding:19px}.controls textarea{min-height:154px;max-height:340px}.prompt-meta{margin-bottom:18px}.controls fieldset{margin-bottom:18px}.controls .primary{min-height:50px}.panel{border-radius:13px}.panel-title h2,.output-heading h2{font-size:15px}.image-stage{min-height:260px;height:auto;aspect-ratio:1;padding:10px}.image-stage img{position:absolute;inset:10px;width:calc(100% - 20px);height:calc(100% - 20px)}.image-stage:has(img[hidden]){min-height:290px}.output-heading{padding:15px 17px}.output-bottom{padding:15px 17px}.result-metrics{gap:12px}.result-metrics span{font-size:10px}.result-metrics strong{font-size:12px}.result-actions{padding:0 17px 17px}.save-buttons{gap:8px;display:grid;grid-template-columns:1fr 1fr}.save-buttons .primary{grid-column:1 / -1;min-height:50px}.save-buttons .secondary{font-size:13px}.result-caption{padding:13px 17px;font-size:11px}.result-actions p{font-size:12px}.pending-panel{margin-top:18px;padding:17px}.pending-panel>summary{gap:8px;flex-wrap:wrap}.pending-panel>summary span{font-size:11px}.pending-panel>.panel-title{flex-wrap:wrap;align-items:center}.job-row{gap:10px;align-items:stretch}.job-row .secondary{align-self:flex-start}.history-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.history-card .card-info{padding:11px}.history-card p{font-size:12px;height:40px;margin-bottom:8px}.history-meta{font-size:10px}.history-card .card-actions{padding:0 10px 10px;gap:6px}.history-card .card-actions button{font-size:11px;padding:7px 9px;flex:1 1 auto}.select-image{top:7px;left:7px;padding:8px}.history-toolbar{padding:12px;gap:10px;font-size:12px}.history-toolbar .danger-button{min-height:40px;font-size:11px}.empty-state{padding:55px 18px}.api-panel{padding:20px}.api-panel p{font-size:13px}.api-panel pre{font-size:12px}.storage-guide{grid-template-columns:1fr;gap:20px;margin:20px 0}.delete-dialog{max-height:calc(100dvh - 24px);width:calc(100vw - 32px)}.delete-dialog-body{padding:25px 22px}.delete-dialog h2{font-size:22px}.original-dialog{width:100%;max-width:100%;max-height:100dvh;height:100dvh;border:0;border-radius:0;margin:0}.original-toolbar{padding:calc(14px + env(safe-area-inset-top)) 16px 14px}.original-toolbar p{font-size:11px}.original-toolbar .secondary{flex-shrink:0}.toast{left:50%;bottom:calc(83px + env(safe-area-inset-bottom));max-width:calc(100vw - 32px);font-size:13px;text-align:center}footer{padding-top:25px;font-size:10px}
}
@media(max-width:359px){.content{padding-inline:12px}.account-badge #username{display:none}.storage-banner{align-items:flex-start}.storage-banner .secondary{display:none}.controls{padding:16px}.history-grid{grid-template-columns:1fr}.page-heading h1{font-size:25px}.seed-label .muted{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}.spinner{animation:none;border-style:dotted}}
