:root{
  --bg:#faf9f7;
  --paper:#ffffff;
  --ink:#181512;
  --ink-soft:#4a433c;
  --muted:#7c746b;
  --subtle:#9a9188;
  --line:#eae5dc;
  --line-strong:#d8d0c4;
  --accent:#181512;
  --accent-hover:#312b26;
  --accent-soft:#f3efe9;
  --terra:#b34b2f;
  --terra-soft:#fdf2ee;
  --radius:16px;
  --radius-sm:10px;
  --shadow:0 1px 2px rgba(24,20,18,.03),0 12px 32px rgba(24,20,18,.045);
  font-synthesis:none;
  color-scheme:light;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
button,input,textarea,select{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation}
a{color:var(--terra);text-decoration:none}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.45}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--terra);outline-offset:2px}
h1,h2,h3,p{margin:0}
h1{font-size:28px;font-weight:700;letter-spacing:-.03em;line-height:1.25;color:var(--ink)}
h2{font-size:17px;font-weight:650;color:var(--ink)}
h3{font-size:15px;font-weight:650;color:var(--ink)}
small,.subtle{font-size:12.5px;color:var(--muted)}
small{display:block}
p{color:var(--ink-soft)}
[hidden]{display:none!important}
.icon{width:19px;height:19px;display:inline-block;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex:none;vertical-align:middle}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;padding:0!important;border:0!important}
.skip-link{position:fixed;top:-60px;left:20px;z-index:60;background:#fff;padding:12px;border-radius:8px}.skip-link:focus{top:10px}

.app-shell{display:flex;min-height:100vh}
.sidebar{
  position:fixed;inset:0 auto 0 0;width:226px;display:flex;flex-direction:column;
  padding:16px 14px 16px;background:#ffffff;border-right:1px solid var(--line);z-index:10;
  overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none;
}
.sidebar::-webkit-scrollbar{display:none}
.brand{display:flex;align-items:center;gap:11px;color:var(--ink);font-size:17px;font-weight:750;letter-spacing:.02em;padding:6px 8px 18px;margin-bottom:6px;border-bottom:1px solid #f2eee8}
.brand small{font-size:9.5px;letter-spacing:.18em;font-weight:600;color:var(--subtle);margin-top:1px}
.brand-mark{display:grid;place-items:center;background:var(--ink);color:#fff;width:36px;height:36px;border-radius:10px;box-shadow:0 4px 12px rgba(24,21,18,.14)}
.brand-mark .icon{width:22px;height:22px;stroke-width:1.5}
.main-nav{display:grid;gap:4px;margin-top:6px}
.main-nav a,.guide-nav{display:flex;gap:10px;align-items:center;padding:10px 12px;border-radius:10px;color:#5f574f;font-size:14px;font-weight:500;transition:background .15s,color .15s}
.main-nav a:hover,.guide-nav:hover{background:#f5f2ed;color:var(--ink)}
.main-nav a[aria-current=page]{background:var(--ink);color:#fff;font-weight:600}
.main-nav a[aria-current=page] .nav-count{border-color:rgba(255,255,255,.28);color:#fff;background:rgba(255,255,255,.12)}
.nav-count{margin-left:auto;border:1px solid var(--line);background:#faf8f5;color:var(--muted);min-width:22px;padding:0 6px;text-align:center;border-radius:999px;font-size:11px;line-height:19px;font-variant-numeric:tabular-nums}
.sidebar-bottom{margin-top:auto;padding-top:16px}
.pro-card{padding:15px 14px;background:#1c1816;color:#fff;border-radius:14px;margin-bottom:10px;box-shadow:0 10px 24px rgba(24,21,18,.14)}
.pro-eyebrow{font-size:10px;letter-spacing:.12em;font-weight:700;color:#eab89e;text-transform:uppercase}
.pro-card strong{display:block;font-size:14px;font-weight:650;margin:6px 0 4px;color:#fff}
.pro-card p{font-size:12px;line-height:1.55;color:#cfc7be}
.pro-card .btn{font-size:12.5px;margin:12px 0 0;min-height:36px;padding:7px 10px;background:#fff;color:var(--ink);border-radius:8px;width:100%}
.pro-card .btn:hover:not(:disabled){background:#f5efe8}
.workspace-identity{border-top:1px solid #f0ece5;margin-top:8px;padding:12px 8px 0;display:flex;gap:9px;align-items:center;color:var(--muted);font-size:12px}
.workspace-identity small{font-size:10px;color:var(--subtle)}

.app-content{margin-left:226px;min-width:0;width:calc(100% - 226px);display:flex;flex-direction:column;min-height:100vh}
.topbar{
  position:sticky;top:0;z-index:20;height:64px;border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.92);backdrop-filter:blur(12px);
  display:flex;align-items:center;justify-content:space-between;padding:0 32px;
}
.breadcrumb{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--subtle)}
.breadcrumb .icon{width:14px;height:14px}
.breadcrumb strong{font-weight:600;color:var(--ink)}
.topbar-actions{display:flex;align-items:center;gap:10px}
.topbar-actions .btn{min-height:36px;padding:6px 14px;border-radius:999px;font-size:13px}
.wallet-badge{
  display:inline-flex;align-items:center;height:36px;padding:0 14px;border-radius:999px;
  font-size:12.5px;color:var(--terra);background:var(--terra-soft);border:1px solid #f0d6cc;
  font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums;
}
.wallet-badge strong{font-size:14px;margin-right:4px}

main{flex:1;width:100%;max-width:1440px;margin:0 auto;padding:26px 32px 32px;outline:none}
.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}
.eyebrow{font-size:10.5px;font-weight:700;letter-spacing:.16em;color:var(--terra);margin-bottom:6px;text-transform:uppercase}
.page-heading p:not(.eyebrow){font-size:14px;margin-top:6px;color:var(--muted)}
.app-footer{width:100%;max-width:1440px;margin:0 auto;padding:14px 32px 24px;display:flex;justify-content:space-between;gap:12px;color:var(--subtle);font-size:12px;border-top:1px solid #f0ece5}

.btn,button.secondary{
  display:inline-flex;justify-content:center;align-items:center;gap:7px;padding:9px 18px;min-height:42px;
  border-radius:10px;border:1px solid transparent;font-size:14px;font-weight:600;line-height:1.3;
  white-space:nowrap;text-decoration:none;cursor:pointer;transition:background .15s,border-color .15s,transform .1s,box-shadow .15s;
}
.btn:active:not(:disabled){transform:translateY(1px)}
.btn .icon{width:17px;height:17px}
.btn-primary{background:var(--ink);color:#fff;box-shadow:0 2px 8px rgba(24,21,18,.12)}
.btn-primary:hover:not(:disabled){background:var(--accent-hover);box-shadow:0 4px 14px rgba(24,21,18,.18)}
.btn-outline{background:#fff;border-color:#dcd5cb;color:var(--ink)}
.btn-outline:hover:not(:disabled){background:#f7f4ef;border-color:#bfb5a7}
.btn-quiet,button.secondary{background:transparent;color:#5f574f;border-color:transparent}
.btn-quiet:hover:not(:disabled),button.secondary:hover:not(:disabled){background:#f2eee8;color:var(--ink)}
.btn-dark{background:var(--ink);color:#fff;width:100%}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}

/* Home Hero - clean one-screen editorial showcase */
.home-hero{
  display:grid;grid-template-columns:1.05fr 1fr;gap:40px;align-items:center;
  background:linear-gradient(135deg,#ffffff 0%,#f7f2ea 100%);
  border:1px solid var(--line);border-radius:24px;padding:34px 40px;margin-bottom:20px;
  box-shadow:var(--shadow);
}
.hero-copy .eyebrow{font-size:10.5px}
.hero-copy h1{font-size:clamp(30px,3.1vw,44px);font-weight:750;line-height:1.22;letter-spacing:-.04em;margin-top:8px}
.hero-copy h1 span{color:var(--terra)}
.hero-copy>p:not(.eyebrow){font-size:15px;line-height:1.75;margin-top:16px;color:var(--ink-soft);max-width:460px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0 12px}
.hero-actions .btn{min-height:46px;padding:10px 22px;border-radius:12px}
.hero-copy>small{font-size:12.5px;color:var(--muted)}
.hero-visual{position:relative;display:flex;justify-content:flex-end}
.hero-main-photo{width:100%;max-width:440px;border-radius:18px;overflow:hidden;position:relative;box-shadow:0 18px 42px rgba(24,20,18,.12);background:#e6ddd0;aspect-ratio:4/3}
.hero-main-photo img{width:100%;height:100%;object-fit:cover;display:block}
.hero-badge{position:absolute;top:14px;right:14px;background:rgba(24,21,18,.72);color:#fff;backdrop-filter:blur(8px);border-radius:999px;font-size:11.5px;font-weight:600;padding:6px 12px}
.hero-before{
  position:absolute;left:14px;bottom:14px;width:116px;margin:0;padding:6px;
  background:rgba(255,255,255,.92);backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.8);border-radius:12px;box-shadow:0 10px 26px rgba(24,20,18,.16);
}
.hero-before img{width:100%;aspect-ratio:1;object-fit:cover;display:block;border-radius:8px}
.hero-before figcaption{text-align:center;font-size:11px;font-weight:600;padding-top:5px;color:var(--ink)}

.channel-strip{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 24px;margin-bottom:20px;background:#fff;border:1px solid var(--line);border-radius:14px;
}
.channel-strip span{font-size:12.5px;color:var(--muted)}
.channel-strip b{font-size:13.5px;color:var(--ink);font-weight:600;padding:5px 12px;border-radius:999px;background:#f7f4ef}

.home-steps{
  display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:32px;
}
.home-steps>div{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px 24px;box-shadow:var(--shadow)}
.home-steps>div>span{
  display:inline-grid;place-items:center;width:30px;height:30px;border-radius:8px;
  background:var(--ink);color:#fff;font-size:12px;font-weight:700;margin-bottom:12px;font-variant-numeric:tabular-nums;
}
.home-steps h3{font-size:16px;margin-bottom:6px}
.home-steps p{font-size:13.5px;line-height:1.65;color:var(--muted)}

.home-styles .page-heading h2{font-size:21px}
.home-style-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
.home-style-card{
  display:flex;flex-direction:column;border:1px solid var(--line);background:#fff;border-radius:14px;
  overflow:hidden;padding:0;text-align:left;color:var(--ink);transition:transform .16s,box-shadow .16s,border-color .16s;min-width:0;box-shadow:var(--shadow);
}
.home-style-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(24,20,18,.09);border-color:var(--line-strong)}
.home-style-card img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.home-style-card strong{display:block;font-size:14px;font-weight:650;padding:11px 13px 4px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-style-card>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;color:var(--muted);line-height:1.5;margin:0 13px 13px;padding:0}

/* Studio View */
.workflow-strip{
  display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-radius:12px;
  background:#fff;padding:12px 18px;margin-bottom:20px;color:var(--subtle);font-size:13px;
}
.workflow-strip span{display:flex;align-items:center;gap:7px}
.workflow-strip .is-current{color:var(--ink);font-weight:650}
.workflow-strip .is-current .icon{color:var(--terra)}
.workflow-strip .icon{width:16px;height:16px}
.workflow-strip i{width:28px;height:1px;background:var(--line-strong)}
.workflow-strip small{margin-left:auto;font-size:12px;color:var(--muted)}

.studio-grid{display:grid;grid-template-columns:minmax(360px,408px) minmax(0,1fr);gap:22px;align-items:start}
.config-panel{overflow:hidden}
.config-scroll{padding:20px;max-height:calc(100dvh - 330px);min-height:420px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d8d0c4 transparent;overscroll-behavior:contain}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.section-heading h2{display:flex;align-items:center;font-size:15px}
.step-num{display:inline-grid;place-items:center;width:21px;height:21px;border-radius:50%;background:var(--ink);color:#fff;font-size:11.5px;font-weight:700;margin-right:8px;flex:none}
.upload-zone{
  display:flex;align-items:center;gap:14px;padding:13px;border:1.5px dashed #d3c9bc;background:#faf8f5;
  border-radius:12px;position:relative;transition:background .15s,border-color .15s;min-height:102px;
}
.upload-zone:hover,.upload-zone.is-dragging{background:var(--terra-soft);border-color:var(--terra)}
.upload-zone.is-disabled{opacity:.55}
.upload-zone input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2}
.source-preview{width:74px;height:74px;flex:none;display:grid;place-items:center;background:#eee9e1;border-radius:9px;overflow:hidden}
#original{width:100%;height:100%;object-fit:contain}
.source-placeholder{color:#9a9085;text-align:center}.source-placeholder .icon{width:26px;height:26px;stroke-width:1.4}
.upload-copy{min-width:0;display:grid;gap:3px}
.upload-copy strong{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}
.upload-copy>span:not(.upload-link){color:var(--muted);font-size:12px}
.upload-link{font-size:12.5px;font-weight:600;color:var(--terra);margin-top:2px}

.style-heading{margin-top:22px}
.styles{margin:0;padding:0;border:0;display:grid;grid-template-columns:1fr 1fr;gap:10px;min-width:0}
.style-card{
  position:relative;display:flex;flex-direction:column;margin:0;padding:0;border:1.5px solid var(--line);
  border-radius:11px;overflow:hidden;cursor:pointer;transition:box-shadow .15s,border-color .15s;background:#fff;
}
.style-card:hover{border-color:#c6bbb0;box-shadow:0 4px 12px rgba(24,20,18,.06)}
.style-card:has(input:checked){border-color:var(--ink);box-shadow:0 0 0 1px var(--ink);background:#faf8f5}
.style-card input{position:absolute;right:8px;top:8px;width:15px;height:15px;accent-color:var(--ink);z-index:1;margin:0}
.style-card img{order:-1;width:100%;height:auto!important;aspect-ratio:4/3;object-fit:cover;display:block;flex:none}
.style-card>span{font-size:12.5px;font-weight:600;line-height:1.35;padding:7px 8px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.style-card>small{display:none}
.selected-style{display:flex;gap:10px;align-items:start;background:#f7f4ef;border-radius:10px;padding:12px;margin:12px 0 16px}
.selection-dot{height:7px;width:7px;border-radius:50%;background:var(--terra);margin-top:6px;flex:none}
.selected-style strong{font-size:13px;font-weight:650}
.selected-style p{font-size:12.5px;line-height:1.55;margin-top:2px;color:var(--muted)}

.composition-options{min-width:0;border:1px solid var(--line);border-radius:12px;margin:14px 0;padding:14px;background:#fcfbf9}
.composition-options legend{font-size:13px;font-weight:650;color:var(--ink);padding:0 6px}
.composition-options label{margin-top:10px}
.element-list{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}
.element-choice{display:flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;border-radius:7px;padding:6px 9px;margin:0!important;cursor:pointer;font-size:13px}
.element-choice input{accent-color:var(--ink);margin:0}
.element-choice:has(input:checked){border-color:var(--ink);background:#f3efe9;color:var(--ink);font-weight:600}
#composition-summary{font-size:12px;margin-bottom:6px;color:var(--muted)}
#composition-auto{font-size:12px;min-height:28px;padding:4px 8px}
.product-details>details{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}
.product-details summary{display:flex;align-items:center;font-size:14px;font-weight:650;color:var(--ink);cursor:pointer}
.output-options{display:grid;grid-template-columns:1.5fr 1fr;gap:10px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.output-options label{font-size:13px;margin:6px 0 5px}.output-options label span{color:var(--terra)}
.output-options>small{grid-column:1/-1;font-size:12px}
.output-options select{font-size:13px}
.model-section{margin-top:14px}

label{display:block;font-size:13px;font-weight:600;margin:12px 0 6px;color:var(--ink-soft)}
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]):not([type=range]),textarea,select{
  width:100%;border:1px solid #ddd6cc;border-radius:9px;background:#fff;color:var(--ink);
  padding:9px 12px;min-height:42px;font-size:14px;line-height:1.5;transition:border-color .15s;
}
input::placeholder,textarea::placeholder{color:#a89f95;font-size:13px}
textarea{resize:vertical}
select{
  appearance:none;padding-right:34px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e655d' stroke-width='1.7'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-size:17px;background-position:right 10px center;
}
select:disabled,input:disabled,textarea:disabled{opacity:.58}
input[type=color]{width:100%;height:40px;border:1px solid var(--line);border-radius:8px;background:#fff;padding:3px}
.invalid{color:#b33a27!important}
#scene-feedback,#ingredient-feedback,#ingredient-help,#palette-feedback{font-size:12px;margin-top:7px;overflow-wrap:anywhere}
details summary{cursor:pointer;font-size:14px;color:var(--ink-soft)}
details>p,details>small{margin:10px 0;line-height:1.65}
.palette-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;max-height:220px;overflow:auto;padding:2px;margin-top:8px}
.palette-card{margin:0;padding:6px 5px;border:1px solid var(--line);background:#fff;border-radius:8px;cursor:pointer;font-size:11px}
.palette-card input{accent-color:var(--ink);width:12px;height:12px;margin:0 3px 4px 0}
.palette-card:has(input:checked){border-color:var(--ink);background:#f5f2ed}
.palette-swatches{display:flex;height:22px;border-radius:4px;overflow:hidden}.palette-swatches span{flex:1}

.generation-dock{border-top:1px solid var(--line);background:#fcfbf9;padding:15px 20px 14px}
.estimate-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:12.5px;color:var(--muted);margin-bottom:10px}
.estimate-row strong{font-size:15px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}
.owner-cost-estimate{font-size:11px;margin-bottom:6px;color:var(--subtle)}
.generate-button{width:100%;height:46px;font-size:15px;border-radius:11px}
#status{font-size:12.5px;color:var(--muted);margin:9px 0 0;line-height:1.5;overflow-wrap:anywhere;min-height:19px}

.result-panel{overflow:hidden}
.result-heading{padding:16px 22px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}
.result-heading h2{margin-bottom:2px}
.result-heading .btn{font-size:12.5px;padding:6px 12px;min-height:34px;border-radius:999px;border-color:var(--line)}
.result-stage{
  height:clamp(340px,62dvh,720px);min-height:0;min-width:0;position:relative;
  display:flex;align-items:center;justify-content:center;overflow:hidden;background:#f3f0ea;
}
#output,#compare-original{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain;background:#f3f0ea}
#compare-original{z-index:2}
.result-placeholder{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:32px 24px;position:absolute;inset:0}
.result-placeholder h3{font-size:19px;font-weight:650;color:var(--ink);letter-spacing:-.02em;margin:12px 0 8px}
.result-placeholder p{font-size:13.5px;line-height:1.7;color:var(--muted)}
.empty-art{position:relative;width:250px;height:150px;margin-bottom:8px}
.art-frame{position:absolute;overflow:hidden;border:5px solid #fff;box-shadow:0 10px 24px rgba(24,20,18,.11);border-radius:10px;width:162px;height:120px;background:#efe9e0}
.art-frame img{width:100%;height:100%;object-fit:cover}
.art-back{left:12px;top:4px;transform:rotate(-8deg)}
.art-front{left:78px;top:24px;transform:rotate(6deg)}
.art-spark{position:absolute;top:0;right:12px;color:var(--terra)}.art-spark .icon{height:26px;width:26px}
.empty-tags{display:flex;gap:8px;margin-top:16px}
.empty-tags span{border:1px solid var(--line-strong);border-radius:999px;font-size:11.5px;color:var(--ink-soft);padding:4px 12px;background:rgba(255,255,255,.78)}

.batch-results{display:flex;gap:10px;padding:12px 22px 0;overflow-x:auto}.batch-results:empty{display:none}
.batch-results button{padding:5px;border:1px solid var(--line);background:#faf8f5;border-radius:9px;flex:none;width:82px;font-size:11.5px;color:var(--ink-soft)}
.batch-results button img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:5px;margin-bottom:4px}
.batch-results button:hover{border-color:var(--ink)}
.result-tools{padding:18px 22px}
.primary-result-actions{display:flex;gap:10px}
.primary-result-actions:has([hidden]):not(:has(:not([hidden]))){display:none}
.primary-result-actions>button{flex:1}
.primary-result-actions .download{flex:none}
.secondary-result-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap;margin-top:6px}
.secondary-result-actions .btn{font-size:12.5px;padding:6px 10px;min-height:32px}
.filter-panel{background:#faf8f5;border:1px solid var(--line);padding:14px;border-radius:12px;margin:14px 0 10px}
.filter-panel h3{font-size:13.5px;display:flex;gap:6px;align-items:center}
.filter-panel .section-heading{margin:0 0 10px}
.filter-chip-grid{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:4px}
.filter-chip{min-height:30px;padding:4px 10px;font-size:12px;border-radius:999px;gap:6px}
.filter-swatch{width:12px;height:12px;border-radius:50%;border:1px solid rgba(0,0,0,.16);flex:none}
.filter-line{display:flex;align-items:center;gap:12px;margin-top:10px;font-size:12.5px;color:var(--muted)}
.filter-line label{margin:0;font-size:12.5px}.filter-line input{flex:1;min-width:0;accent-color:var(--ink)}.filter-line span{min-width:36px;text-align:right;font-variant-numeric:tabular-nums}
.result-cost{font-size:12px;overflow-wrap:anywhere;margin-top:10px;color:var(--muted)}.result-cost:empty{display:none}
#archive-note{font-size:12px;margin-top:4px;color:var(--muted);overflow-wrap:anywhere}
.quality-note{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--subtle);font-size:12px;margin-top:12px}.quality-note .icon{width:14px;height:14px}
.import-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding:12px 22px;font-size:13px;color:var(--muted);background:#fcfbf9}
.import-bar label{font-size:13px;margin:0;padding:6px 14px;min-height:36px}
.generation-overlay{position:absolute;inset:0;z-index:3;background:rgba(250,249,247,.92);backdrop-filter:blur(6px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.generation-spinner{width:32px;height:32px;border:2.5px solid var(--line-strong);border-top-color:var(--ink);border-radius:50%;animation:spin .9s linear infinite;margin-bottom:20px}
.generation-overlay strong{font-size:17px;color:var(--ink)}
.generation-overlay p{font-size:13.5px;margin-top:8px;color:var(--muted)}
.generation-overlay span{font-size:12px;color:var(--subtle);margin-top:14px}
@keyframes spin{to{transform:rotate(360deg)}}

/* Library */
.library-toolbar{display:flex;gap:12px;align-items:center;padding:12px 14px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.search-field{display:flex;gap:8px;align-items:center;flex:1;color:var(--subtle)}.search-field input{border:0!important;padding-left:0!important;min-width:0;min-height:38px!important}.search-field .icon{margin-left:4px}
.library-filter{width:150px}
.library-summary{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;color:var(--muted);margin:18px 0 14px}
.library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px}
.work-card{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff;transition:box-shadow .16s,transform .16s;box-shadow:var(--shadow)}
.work-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(24,20,18,.08)}
.work-cover{aspect-ratio:1.1;position:relative;background:#f0ece4;overflow:hidden;display:block;width:100%;padding:0;border:0;cursor:pointer}
.work-cover img{width:100%;height:100%;object-fit:contain;display:block}
.work-kind{position:absolute;top:10px;left:10px;font-size:11px;font-weight:600;background:rgba(24,21,18,.72);color:#fff;padding:4px 9px;border-radius:999px;backdrop-filter:blur(6px)}
.work-info{padding:14px 16px;flex:1;display:flex;flex-direction:column}
.work-info h3{font-size:15px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.work-meta{display:flex;justify-content:space-between;margin-top:auto;padding-top:10px;font-size:12px;color:var(--subtle);gap:6px}
.work-actions{display:flex;border-top:1px solid #f2eee8;padding:8px 10px;gap:6px}
.work-actions .btn{flex:1;font-size:12.5px;min-height:34px;padding:6px 10px;border-radius:8px}
.empty-state{text-align:center;padding:68px 20px;background:#fff;border:1px dashed var(--line-strong);border-radius:16px;margin-top:20px}
.empty-state>.icon{width:42px;height:42px;stroke-width:1.2;color:var(--subtle);margin-bottom:14px}
.empty-state h2{font-size:19px}.empty-state p{font-size:14px;margin:10px 0 20px;color:var(--muted)}
.storage-note{margin-top:24px;border-top:1px solid var(--line);padding-top:16px;color:var(--subtle)}

/* Pricing */
.wallet-panel{
  display:flex;gap:36px;align-items:center;justify-content:space-between;
  padding:26px 30px;background:#1c1816;color:#fff;border-color:#1c1816;
}
.wallet-panel>div:first-child{min-width:210px}
.wallet-panel span{font-size:13px;color:#cfc7be}
.wallet-panel strong{display:block;font-size:34px;font-weight:750;margin:4px 0;color:#fff;font-variant-numeric:tabular-nums}
.wallet-panel small{color:#a89f96}
.wallet-panel>div:last-child{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);padding:16px 20px;border-radius:12px;max-width:440px}
.wallet-panel p{font-size:13.5px;line-height:1.65;color:#e8e2da}
.free-label{display:inline-block;padding:3px 10px;background:rgba(234,184,158,.18);border-radius:999px;color:#f4c5aa!important;font-size:11px!important;font-weight:700;margin-bottom:8px}
.payment-availability{min-height:22px;font-size:13.5px;margin:18px 0;color:var(--terra);font-weight:500}
.package-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;align-items:stretch}
.package-card{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:16px;padding:24px;background:#fff;position:relative;box-shadow:var(--shadow)}
.package-card.recommended{background:#fff;border:2px solid var(--ink);box-shadow:0 14px 34px rgba(24,20,18,.08)}
.package-eyebrow{font-size:11.5px;font-weight:700;color:var(--terra);letter-spacing:.06em}
.package-card h2{font-size:20px;margin:10px 0 14px}
.package-price{font-size:40px;font-weight:750;letter-spacing:-.04em;color:var(--ink);font-variant-numeric:tabular-nums}
.package-points{font-size:16px;font-weight:600;color:var(--ink-soft);margin:6px 0}
.package-count{font-size:13.5px;font-weight:600;color:var(--terra);border-top:1px solid #f0ece5;margin-top:16px;padding-top:14px}
.package-card small{font-size:12.5px;margin:6px 0 18px}
.package-card .btn{width:100%;margin-top:auto}
.pricing-explainer{padding:24px;margin-top:22px}.pricing-explainer h2{margin-bottom:10px}.pricing-explainer p{font-size:13.5px;line-height:1.8;margin:6px 0;color:var(--ink-soft)}
.pricing-explainer details{border-top:1px solid var(--line);padding-top:12px;margin-top:14px}
.wallet-history{margin-top:22px;padding:24px}
.wallet-ledger>div{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid #f2eee8;font-size:13.5px;color:var(--ink-soft)}
.wallet-ledger strong{color:var(--ink);font-variant-numeric:tabular-nums}
.payment-orders{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.payment-dialog{border:1px solid var(--line);border-radius:18px;max-width:420px;width:calc(100% - 32px);padding:30px;text-align:center;color:var(--ink);box-shadow:0 24px 64px rgba(24,20,18,.22)}
.payment-dialog::backdrop{background:rgba(24,20,18,.45);backdrop-filter:blur(4px)}
.payment-dialog img{display:block;background:#fff;margin:18px auto;width:230px;max-width:100%;height:230px}
.payment-dialog .payment-close{position:absolute;right:10px;top:8px;font-size:24px;padding:2px 10px}

/* Costs & Guide */
.cost-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:22px}
.stat-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px 22px;box-shadow:var(--shadow)}
.stat-card>span{font-size:13px;color:var(--muted)}
.stat-card strong{display:block;font-size:28px;letter-spacing:-.03em;font-weight:700;margin:8px 0;color:var(--ink);font-variant-numeric:tabular-nums}
.records-panel .section-heading{padding:18px 22px;margin:0}
.table-wrap{overflow:auto;min-height:100px}
table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}
th,td{padding:13px 18px;border-bottom:1px solid #f2eee8;white-space:nowrap}
th{font-size:12px;color:var(--muted);font-weight:600;background:#faf8f5}
td:nth-child(2){white-space:normal;min-width:150px;max-width:250px}
td:nth-child(6){white-space:normal;min-width:180px}
td:nth-child(4){font-weight:650;color:var(--ink);font-variant-numeric:tabular-nums}
.artifact-link{display:block;font-size:12px;margin-top:4px}
.pricing-panel{padding:20px 22px;margin-top:20px}
.rate-line{display:flex;align-items:center;gap:8px}.rate-line label{margin:0}.rate-line input{width:100px!important}
.source-links{display:flex;gap:20px;flex-wrap:wrap;font-size:12.5px}

.guide-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;align-items:stretch}
.guide-card{display:flex;flex-direction:column;padding:24px}
.guide-card>.icon{width:28px;height:28px;color:var(--terra);margin-bottom:18px}
.guide-card h2{font-size:17px;margin-bottom:10px}
.guide-card p{font-size:14px;line-height:1.75;color:var(--ink-soft)}
.guide-card small{font-size:12.5px;margin-top:auto;padding-top:16px}
.guide-faq{margin-top:20px;padding:24px}
.guide-faq h2{margin-bottom:16px}
.guide-faq details{padding:14px 0;border-top:1px solid var(--line)}
.guide-faq summary{font-weight:600;color:var(--ink)}
.guide-faq p{font-size:14px;line-height:1.75;max-width:820px;color:var(--ink-soft)}

@media(max-width:1200px){
  .sidebar{width:196px;padding-inline:12px}.app-content{margin-left:196px;width:calc(100% - 196px)}
  .topbar{padding-inline:22px}main,.app-footer{padding-inline:22px}
  .home-hero{padding:28px;gap:28px}.home-style-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .studio-grid{grid-template-columns:350px minmax(0,1fr);gap:16px}
}
@media(max-width:980px){
  .sidebar{width:72px;align-items:center;padding:16px 8px}.brand{padding:6px 0 14px;justify-content:center}.brand>span:last-child,.main-nav a>span,.sidebar-bottom,.guide-nav{display:none}
  .main-nav{margin-top:12px;width:100%}.main-nav a{justify-content:center;padding:12px}.app-content{margin-left:72px;width:calc(100% - 72px)}
  .home-hero{grid-template-columns:1fr}.home-style-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .studio-grid{grid-template-columns:320px minmax(0,1fr)}.guide-grid,.package-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .sidebar{display:none!important}.app-shell{display:block}.app-content{margin-left:0!important;width:100%!important}
  .topbar{height:58px;padding:8px 16px}.topbar .breadcrumb>span,.topbar .breadcrumb>.icon,.topbar .btn-quiet{display:none}
  main{padding:18px 16px 28px}
  .home-hero{padding:22px 18px;border-radius:18px;gap:20px}.hero-copy h1{font-size:32px}
  .channel-strip{flex-wrap:wrap;justify-content:flex-start;padding:14px 16px}.home-steps{grid-template-columns:1fr;gap:12px}
  .home-style-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .studio-grid{grid-template-columns:1fr}.config-scroll{max-height:none;min-height:0}.result-stage{height:clamp(280px,56dvh,560px)}
  .wallet-panel{flex-direction:column;align-items:stretch;gap:18px;padding:22px}
  .library-toolbar{flex-wrap:wrap}.search-field{flex-basis:100%}.library-filter{flex:1}
  .library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .cost-stats{grid-template-columns:1fr}
  .app-footer{flex-direction:column;padding-bottom:92px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition:none!important}}

/* Studio 4-Step Sidebar Mode, Chip Selectors & One-Screen Ergonomic Layout */
.studio-sidebar-flow{display:none}
.studio-back-row{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:14px}
.studio-back-link{font-size:12.5px;font-weight:600;color:#5f574f;background:#f5f2ed;padding:6px 10px;border-radius:8px;transition:background .15s,color .15s}
.studio-back-link:hover{background:#eae4db;color:var(--ink)}
.studio-flow-title{font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--subtle);margin:4px 4px 10px;text-transform:uppercase}
.studio-step-nav{display:grid;gap:8px}
.studio-step-item{
  display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:11px 12px;
  border-radius:12px;border:1px solid var(--line);background:#faf8f5;color:var(--ink);transition:all .15s;
}
.studio-step-item:hover{background:#f3efe9;border-color:#d5ccc0}
.studio-step-item .step-dot{
  width:24px;height:24px;border-radius:50%;display:grid;place-items:center;flex:none;
  background:#e6dfd5;color:#5c534b;font-size:12px;font-weight:700;transition:background .15s,color .15s;
}
.studio-step-item.is-done .step-dot{background:#3a6b48;color:#fff}
.studio-step-item.is-active{background:var(--ink);border-color:var(--ink);color:#fff;box-shadow:0 6px 16px rgba(24,21,18,.12)}
.studio-step-item.is-active .step-dot{background:#fff;color:var(--ink)}
.studio-step-item strong{display:block;font-size:13.5px;font-weight:650;line-height:1.3}
.studio-step-item small{font-size:11.5px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:136px}
.studio-step-item.is-active small{color:#d0c8be}
.studio-flow-foot{margin-top:auto;padding-top:14px;border-top:1px solid #f0ece5;display:grid;gap:10px}
.studio-flow-foot .btn{min-height:38px;font-size:13px;border-radius:10px}
.studio-flow-links{display:flex;justify-content:space-around;font-size:12px;color:var(--muted)}
.studio-flow-links a{color:var(--muted)}.studio-flow-links a:hover{color:var(--ink)}

/* Clickable Chip Selectors */
.chip-field{grid-column:1/-1}
.chip-field>label{margin:6px 0 6px}
.chip-grid{display:flex;flex-wrap:wrap;gap:7px}
.size-chip-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.count-chip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.choice-chip{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:7px 11px;min-height:36px;border-radius:9px;border:1.5px solid #e2dbd0;
  background:#fff;color:var(--ink-soft);font-size:12.5px;font-weight:550;cursor:pointer;
  transition:border-color .15s,background .15s,color .15s,box-shadow .15s;
}
.choice-chip:hover:not(:disabled){border-color:#bfb5a7;background:#faf8f5;color:var(--ink)}
.choice-chip.is-active{border-color:var(--ink);background:var(--ink);color:#fff;font-weight:650;box-shadow:0 2px 8px rgba(24,21,18,.12)}
.size-chip{flex-direction:column;gap:2px;padding:7px 4px;min-height:60px}
.size-chip strong{font-size:12px;line-height:1.1}
.size-chip small{font-size:10.5px;color:var(--muted);line-height:1.1}
.size-chip.is-active small{color:#d7cfc6}
.ratio-box{display:block;height:14px;max-width:22px;border:1.5px solid currentColor;border-radius:2px;opacity:.85}
.swatch-dot{width:13px;height:13px;border-radius:50%;border:1px solid rgba(0,0,0,.18);flex:none}
.studio-block{transition:box-shadow .25s ease,background .25s ease;border-radius:10px}
.studio-block.is-step-focus{box-shadow:0 0 0 2px var(--terra);background:#fffaf7}

@media(min-width:761px){
 body.is-studio-view .sidebar .main-nav,
 body.is-studio-view .sidebar .sidebar-bottom{display:none}
 body.is-studio-view #studio-sidebar-flow{display:flex;flex-direction:column;flex:1;padding-top:4px}
 body.is-studio-view #view-studio>.page-heading,
 body.is-studio-view #view-studio>.workflow-strip,
 body.is-studio-view .app-footer{display:none}
 body.is-studio-view main{padding:12px 22px 14px;max-width:1520px}
 body.is-studio-view .studio-grid{
  grid-template-columns:minmax(430px,500px) minmax(0,1fr);
  gap:18px;height:calc(100dvh - 88px);min-height:560px;align-items:stretch;
 }
 body.is-studio-view .config-panel,
 body.is-studio-view .result-panel{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
 body.is-studio-view .config-scroll{flex:1;max-height:none;min-height:0;padding:15px 18px}
 body.is-studio-view .section-heading{margin-bottom:9px}
 body.is-studio-view .upload-zone{min-height:66px;padding:9px 12px}
 body.is-studio-view .source-preview{width:50px;height:50px}
 body.is-studio-view .style-heading{margin-top:14px}
 body.is-studio-view .styles{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
 body.is-studio-view .style-card{border-radius:10px}
 body.is-studio-view .style-card input{right:6px;top:6px;width:14px;height:14px}
 body.is-studio-view .style-card img{width:100%;height:auto!important;aspect-ratio:4/3;object-fit:cover;flex:none;display:block}
 body.is-studio-view .style-card>span{font-size:12.5px;padding:7px 6px;text-align:center;line-height:1.25}
 body.is-studio-view .selected-style{padding:8px 11px;margin:9px 0 10px}
 body.is-studio-view .product-details>details{padding-top:10px;margin-top:10px}
 body.is-studio-view .output-options{margin-top:10px;padding-top:10px;gap:6px}
 body.is-studio-view .generation-dock{padding:12px 18px}
 body.is-studio-view .estimate-row{margin-bottom:7px}
 body.is-studio-view .generate-button{height:42px}
 body.is-studio-view .result-heading{padding:11px 18px}
 body.is-studio-view .result-stage{flex:1 1 0;height:auto;min-height:190px;max-height:none}
 body.is-studio-view .batch-results{padding:8px 18px 0}
 body.is-studio-view .result-tools{padding:10px 18px;overflow-y:auto;max-height:46%;scrollbar-width:thin;scrollbar-color:#d8d0c4 transparent}
 body.is-studio-view .primary-result-actions .btn{min-height:40px;padding:8px 14px}
 body.is-studio-view .filter-panel{padding:9px 12px;margin:8px 0 6px}
 body.is-studio-view .filter-panel .section-heading{margin-bottom:6px}
 body.is-studio-view .filter-line{margin-top:7px}
 body.is-studio-view .secondary-result-actions{margin-top:4px}
 body.is-studio-view .quality-note{margin-top:6px}
 body.is-studio-view .import-bar{padding:8px 18px}
}
@media(min-width:761px) and (max-width:1180px){
 body.is-studio-view .studio-grid{grid-template-columns:minmax(360px,420px) minmax(0,1fr)}
 body.is-studio-view .styles{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Output Click-to-Zoom & Fullscreen Lightbox */
.result-heading-actions{display:flex;align-items:center;gap:8px;flex:none}
#output.is-zoomable{cursor:zoom-in}
.stage-zoom-hint{
 position:absolute;right:12px;bottom:12px;z-index:2;pointer-events:none;
 font-size:11.5px;color:#fff;background:rgba(24,21,18,.62);backdrop-filter:blur(6px);
 padding:4px 10px;border-radius:999px;opacity:.88;transition:opacity .15s;
}
.result-stage:hover .stage-zoom-hint{opacity:1}
.lightbox-dialog{
 border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:0;margin:auto;
 width:min(1140px,95vw);max-width:95vw;max-height:94dvh;
 background:#151210;color:#fff;overflow:hidden;box-shadow:0 28px 90px rgba(0,0,0,.48);
 display:flex;flex-direction:column;
}
.lightbox-dialog:not([open]){display:none}
.lightbox-dialog::backdrop{background:rgba(15,13,11,.78);backdrop-filter:blur(6px)}
.lightbox-bar{
 display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;
 padding:12px 18px;border-bottom:1px solid rgba(255,255,255,.1);background:#1b1714;
}
.lightbox-bar strong{font-size:14px;font-weight:600;color:#f5f2ed;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lightbox-bar-actions{display:flex;align-items:center;gap:8px;flex:none}
.lightbox-bar-actions .btn{min-height:34px;padding:6px 12px;font-size:12.5px;border-radius:8px;background:rgba(255,255,255,.1);color:#fff;border-color:rgba(255,255,255,.16)}
.lightbox-bar-actions .btn:hover{background:rgba(255,255,255,.2)}
.lightbox-bar-actions .btn[aria-pressed=true]{background:#fff;color:#181512;border-color:#fff}
.lightbox-stage{
 flex:1;min-height:0;overflow:auto;display:grid;place-items:center;padding:18px;background:#0d0b09;
}
.lightbox-stage img{
 display:block;max-width:100%;max-height:calc(94dvh - 100px);width:auto;height:auto;
 object-fit:contain;border-radius:6px;cursor:zoom-in;box-shadow:0 12px 36px rgba(0,0,0,.45);
}
.lightbox-stage img.is-actual-size{max-width:none;max-height:none;cursor:zoom-out}
