:root{--nav-height:70px;--canvas-max:1440px}
body{padding-bottom:0}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent-strong);outline-offset:3px}
.topbar{height:68px;padding:0 28px;z-index:40}
.brand{width:auto;min-width:220px}
.topbar-context{margin-left:auto;display:flex;align-items:center;gap:9px;padding:8px 13px;border:1px solid var(--line);border-radius:10px;background:#fafaf8;font-size:12px}
.topbar-context span{color:var(--muted)}
.topbar-context strong{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace{padding-bottom:190px}
.content{max-width:var(--canvas-max);margin:0 auto}
.view-panel{padding:34px 30px}
.content-head{gap:24px}
.content-head h1{letter-spacing:-.7px}
.page-subtitle{margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.6}
.action-button{height:42px;padding:0 16px;gap:8px;white-space:nowrap}
.action-button svg{width:17px;height:17px}
.text-link{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;color:var(--ink);font-size:12px;font-weight:700;white-space:nowrap}
.text-link svg{width:15px}
.back-button{display:flex;align-items:center;gap:6px;margin:0 0 20px;padding:0;border:0;background:transparent;color:var(--muted);font-size:12px}
.back-button svg{width:15px}
.bottom-nav{position:fixed;z-index:50;left:50%;bottom:18px;transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,1fr);width:min(560px,calc(100vw - 32px));height:var(--nav-height);padding:7px;border:1px solid rgba(220,220,213,.95);border-radius:20px;background:rgba(255,255,255,.96);box-shadow:0 16px 45px rgba(25,25,20,.14);backdrop-filter:blur(18px)}
.bottom-tab{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;border-radius:14px;background:transparent;color:#85857e;font-size:11px;font-weight:650}
.bottom-tab svg{width:20px;height:20px;stroke-width:1.8}
.bottom-tab.active{background:#22221f;color:#fff}
.bottom-tab.active svg{color:var(--accent)}
.bottom-tab:not(.active):hover{background:#f3f3ee;color:var(--ink)}
.bottom-tab small{position:absolute;top:7px;right:calc(50% - 29px);min-width:20px;padding:1px 4px;border-radius:8px;background:#efefea;color:#6e6e67;font-size:8px;line-height:13px}
.bottom-tab.active small{background:#45453e;color:#f5d97d}
.composer{bottom:102px;z-index:35}
.settings-panel{bottom:0;padding-bottom:200px}
.mode-rail .rail-foot{bottom:112px}
.app-view:not([data-active-view="workspace"]) .mode-rail,
.app-view:not([data-active-view="workspace"]) .settings-panel,
.app-view:not([data-active-view="workspace"]) .composer{display:none}
.app-view:not([data-active-view="workspace"]) .workspace{padding-left:0;padding-right:0;padding-bottom:120px}
.app-view:not([data-active-view="workspace"]) .content{width:100%}
.app-view[data-active-view="workspace"] .bottom-nav{display:none}
.app-view[data-active-view="workspace"] .composer{bottom:18px}
.app-view[data-active-view="workspace"] .settings-panel{padding-bottom:130px}
.app-view[data-active-view="workspace"] .mode-rail .rail-foot{bottom:42px}
.home-hero{display:flex;align-items:center;justify-content:space-between;gap:28px;margin-top:34px;padding:34px 36px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(115deg,#fff 55%,#f6f0dd);box-shadow:0 12px 34px rgba(25,25,20,.05)}
.home-hero>div:first-child{min-width:0}.home-hero span{display:block;margin-bottom:7px;color:var(--muted);font-size:11px;font-weight:700}.home-hero h2{margin:0;font-family:Georgia,"Songti SC",serif;font-size:34px;font-weight:500;letter-spacing:-.8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-hero p{margin:9px 0 0;color:var(--muted);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-actions{display:flex;gap:10px;flex:0 0 auto}
.home-panels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}
.home-panel{position:relative;min-height:132px;padding:19px;border:1px solid var(--line);border-radius:15px;background:#fff;text-align:left;transition:transform .18s,border-color .18s,box-shadow .18s}
.home-panel:hover{transform:translateY(-2px);border-color:#c8c6ba;box-shadow:0 10px 25px rgba(25,25,20,.06)}
.home-panel>span{display:grid;place-items:center;width:39px;height:39px;margin-bottom:17px;border-radius:11px;background:#f2f2ed;color:#55554f}.home-panel>span svg{width:19px}.home-panel strong{display:block;font-size:14px}.home-panel small{display:block;margin-top:7px;color:var(--muted);font-size:11px;line-height:1.55}.home-panel>svg{position:absolute;right:16px;top:17px;width:16px;color:#aaa9a0}
.creation-mode-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:30px}
.creation-mode-card{position:relative;min-height:154px;padding:18px;border:1px solid var(--line);border-radius:14px;background:#fff;text-align:left;display:flex;flex-direction:column;align-items:flex-start;transition:transform .18s,border-color .18s,box-shadow .18s}
.creation-mode-card:hover{transform:translateY(-2px);border-color:#c8c6ba;box-shadow:0 10px 25px rgba(25,25,20,.06)}
.creation-mode-card.active{border-color:#2c2c28;box-shadow:0 0 0 1px #2c2c28}
.creation-mode-icon{display:grid;place-items:center;width:38px;height:38px;margin-bottom:16px;border-radius:11px;background:#f2f2ed;color:#55554f}
.creation-mode-card.active .creation-mode-icon{background:#22221f;color:var(--accent)}
.creation-mode-icon svg{width:19px}
.creation-mode-card strong{font-size:14px}
.creation-mode-card small{margin-top:6px;padding-right:8px;color:var(--muted);font-size:11px;line-height:1.55}
.creation-mode-card .card-arrow{position:absolute;right:15px;top:16px;width:16px;color:#aaa9a0}
.current-project-card{display:flex;align-items:center;gap:14px;margin-top:22px;padding:18px 20px;border:1px solid #e8e2d2;border-radius:14px;background:linear-gradient(115deg,#fffdf7,#faf8ef)}
.project-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#f4e9bd;color:#776421;flex:0 0 auto}
.project-symbol svg{width:20px}
.current-project-card>div:nth-child(2){min-width:0;display:flex;flex-direction:column}
.current-project-card span{color:var(--muted);font-size:10px}
.current-project-card strong{margin-top:2px;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.current-project-card p{margin:4px 0 0;color:#8b887c;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.current-project-card .text-link{margin-left:auto}
.create-workflow{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:28px;color:#8e8e86;font-size:11px}
.create-workflow span{display:flex;align-items:center;gap:7px}
.create-workflow b{color:#c2c1b8;font-family:Georgia,serif;font-size:13px;font-weight:500}
.create-workflow>svg{width:13px;color:#c9c8c0}
.head-actions{display:flex;gap:9px;flex:0 0 auto}
.workspace-results-section{margin-top:28px;padding:22px;border:1px solid var(--line);border-radius:16px;background:#fff;min-height:280px}
.workspace-results-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.workspace-results-head .eyebrow{margin-bottom:4px}.workspace-results-head h2{margin:0;font-size:18px}.workspace-results-head>span{padding:5px 10px;border-radius:99px;background:#f2f2ed;color:#66665f;font-size:11px;font-weight:700}
.workspace-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}.workspace-result{overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fafaf8}.workspace-result-main{position:relative;aspect-ratio:1;overflow:hidden;background:#e8e8e2}.workspace-result-main img{width:100%;height:100%;object-fit:cover;display:block}.workspace-result-main .processing-cover{position:absolute;inset:0;display:grid;place-items:center;background:rgba(255,255,255,.72)}.workspace-result-main .processing-cover svg{width:22px;color:#8b8b83}.workspace-result-body{padding:10px 11px}.workspace-result-body strong{display:block;font-size:11px;line-height:1.45;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-result-body small{display:block;margin-top:5px;color:var(--muted);font-size:9px}.workspace-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:220px;color:var(--muted);text-align:center}.workspace-empty>div{display:grid;place-items:center;width:48px;height:48px;margin-bottom:13px;border-radius:14px;background:#f1f1ec;color:#77776f}.workspace-empty svg{width:22px}.workspace-empty strong{font-size:13px;color:#6e6e67}.workspace-empty span{margin-top:6px;font-size:11px}
.projects-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:30px}
.project-card{position:relative;min-height:205px;padding:22px;border:1px solid var(--line);border-radius:16px;background:#fff;display:flex;flex-direction:column;transition:border-color .18s,box-shadow .18s,transform .18s}
.project-card:hover{transform:translateY(-2px);border-color:#c8c6ba;box-shadow:0 12px 28px rgba(25,25,20,.06)}
.project-card.active{border-color:#282824;box-shadow:0 0 0 1px #282824}
.project-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.project-card-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#f1f1eb;color:#55554e}
.project-card.active .project-card-icon{background:#22221f;color:var(--accent)}
.project-card-icon svg{width:20px}
.project-current{padding:4px 8px;border-radius:99px;background:#22221f;color:#fff;font-size:9px}
.project-default{padding:4px 8px;border-radius:99px;background:#f1f1ec;color:var(--muted);font-size:9px}
.project-card h2{margin:18px 0 7px;font-size:17px;overflow-wrap:anywhere}
.project-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.project-card-meta{display:flex;gap:16px;margin-top:auto;padding-top:20px;color:#888880;font-size:11px}
.project-card-actions{display:flex;gap:8px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.project-card-actions button{flex:1;height:36px;border:1px solid var(--line);border-radius:8px;background:#fafaf8;font-size:11px;font-weight:700}
.project-card-actions button.primary-soft{background:#22221f;color:#fff;border-color:#22221f}
.projects-empty{grid-column:1/-1;padding:70px 20px;text-align:center;color:var(--muted)}
.account-layout{display:grid;grid-template-columns:minmax(260px,360px) minmax(360px,1fr);gap:20px;margin-top:30px;max-width:1040px}
.account-profile-card,.account-settings-card{padding:24px;border:1px solid var(--line);border-radius:16px;background:#fff}
.account-profile-card .account-head{padding:0}
.account-profile-card .account-avatar{width:54px;height:54px;font-size:22px}
.account-profile-card .account-head strong{font-size:17px}
.account-profile-card .account-balance{margin:26px 0 0;padding:18px}
.account-profile-card .account-logout{width:100%;margin:22px 0 0}
.account-settings-card{padding:14px 20px 20px}
.settings-section-label{margin:5px 8px 10px;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:1px}
.account-settings-card .account-actions{padding:0}
.account-settings-card .account-actions button{height:54px;padding:0 9px;border-bottom:1px solid #efefea;border-radius:0}
.account-settings-card .account-actions button:last-child{border-bottom:0}
.account-settings-card .password-form{margin:12px 8px 4px}
.project-dialog{width:min(480px,calc(100vw - 28px));padding:0;border:0;border-radius:18px;box-shadow:0 25px 70px rgba(20,20,18,.22)}
.project-dialog form{padding:26px;display:flex;flex-direction:column;gap:17px}
.project-dialog .dialog-head{display:flex;align-items:center;justify-content:space-between}
.project-dialog .dialog-head h2{margin:0;font-size:24px}
.project-dialog .dialog-head .eyebrow{margin-bottom:5px}
.dialog-intro{margin:0;color:var(--muted);font-size:12px;line-height:1.7}
.project-dialog label{display:flex;flex-direction:column;gap:8px;font-size:12px;font-weight:700}
.project-dialog input,.project-dialog textarea{width:100%;border:1px solid var(--line);border-radius:9px;background:#fff;padding:12px;outline:0;font-size:13px}
.project-dialog textarea{resize:vertical;min-height:82px;line-height:1.6}
.project-dialog .form-error{height:auto;min-height:16px}
.batch-download.downloading{pointer-events:none;font-size:0;gap:8px}.batch-download.downloading::before{content:"";width:16px;height:16px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:batch-spin .75s linear infinite}.batch-download.downloading::after{content:"正在保存...";font-size:13px;font-weight:700}
@keyframes batch-spin{to{transform:rotate(360deg)}}
.batch-download{height:44px;padding:0 18px;border-color:#22221f!important;background:#22221f!important;color:#fff!important;font-size:13px;box-shadow:0 6px 17px rgba(20,20,18,.16)}.batch-download:hover{background:#383832!important}.batch-download svg{width:17px}.batch-download b{margin:0 2px;font-weight:850}
@media(max-width:1200px){.projects-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.creation-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.create-workflow{gap:10px}.account-layout{grid-template-columns:300px minmax(0,1fr)}}
@media(max-width:760px){
  :root{--nav-height:64px}
  .topbar{height:60px;padding:0 15px}
  .brand{min-width:0}
  .topbar-context{max-width:45vw;padding:6px 9px;gap:5px;font-size:10px}
  .topbar-context span{display:none}
  .topbar-context strong{max-width:38vw}
  .workspace,.app-view:not([data-active-view="workspace"]) .workspace{padding-top:60px;padding-bottom:100px}
  .view-panel{padding:24px 14px}
  .content-head{gap:16px}
  .content-head h1{font-size:25px}
  .page-subtitle{font-size:12px}
  .action-button{height:38px;padding:0 12px;font-size:11px}
  .head-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .workspace-results-section{margin-top:20px;padding:16px 13px;min-height:250px;border-radius:14px}
  .workspace-results{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .workspace-empty{min-height:190px}
  .home-hero{display:block;margin-top:22px;padding:24px 20px;border-radius:15px}
  .home-hero h2{font-size:25px;white-space:normal}
  .home-hero p{white-space:normal}
  .home-actions{margin-top:20px}.home-actions .action-button{flex:1}
  .home-panels{grid-template-columns:1fr;gap:10px;margin-top:12px}
  .home-panel{min-height:112px;padding:17px}.home-panel>span{margin-bottom:13px}
  .mode-rail{top:auto}
  .creation-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:22px}
  .creation-mode-card{min-height:142px;padding:15px}
  .creation-mode-icon{margin-bottom:13px}
  .creation-mode-card small{font-size:10px}
  .current-project-card{padding:15px;gap:11px}
  .current-project-card p{max-width:48vw}
  .current-project-card .text-link{font-size:0}
  .current-project-card .text-link svg{width:20px}
  .create-workflow{display:none}
  .composer{bottom:64px;padding-bottom:8px}
  .settings-panel{z-index:70;padding-bottom:45px}
  .bottom-nav{left:0;right:0;bottom:0;transform:none;width:100%;height:64px;padding:5px 8px;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:0 -5px 22px rgba(25,25,20,.06)}
  .bottom-tab{border-radius:10px}
  .bottom-tab.active{background:#f0efe9;color:var(--ink)}
  .bottom-tab.active svg{color:var(--ink)}
  .bottom-tab small{top:3px}
  .projects-grid{grid-template-columns:1fr;gap:12px;margin-top:22px}
  .project-card{min-height:190px}
  .account-layout{grid-template-columns:1fr;gap:14px;margin-top:22px}
  .account-profile-card,.account-settings-card{border-radius:14px}
  .gallery-tools{grid-template-columns:40px 40px minmax(110px,1fr)}
  .gallery-tools .batch-download{grid-column:1/-1;width:100%;order:4}
  .gallery-tools .search{grid-column:1/-1;order:5}
  .project-dialog form{padding:22px}
}
@media(max-width:390px){.creation-mode-grid{grid-template-columns:1fr}.creation-mode-card{min-height:128px}.creation-mode-icon{margin-bottom:10px}.topbar-context{display:none}.account-settings-card{padding-left:12px;padding-right:12px}}
@media(prefers-reduced-motion:reduce){.creation-mode-card,.project-card{transition:none}}
