@import url('../../fonts.css');
:root{--paper:#f6f4f0;--panel:#fff;--ink:#1c1a24;--muted:#696473;--line:#e6e1d9;--accent:#ff6b35;--accent-ink:#b03d0c;--soft:#fff1e9;--ok:#177245;--ok-bg:#e5f5ec;--bad:#b42318;--bad-bg:#fdeceb;--font:'Manrope',Arial,sans-serif}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.6 var(--font);-webkit-font-smoothing:antialiased}
h1,h2,h3,p{margin:0}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--accent-ink);outline-offset:3px}
.skip{position:fixed;top:-100px;left:16px;z-index:50;background:var(--ink);color:#fff;padding:12px 18px;border-radius:10px;text-decoration:none}
.skip:focus{top:12px}

/* top bar */
.topbar{display:flex;align-items:center;gap:24px;padding:18px 4%;border-bottom:1px solid var(--line);background:#faf8f5}
.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font-size:25px;font-weight:800;letter-spacing:-1.2px;line-height:1}
.brand img{display:block;border-radius:12px}
.brand small{display:block;font-size:8px;letter-spacing:1.6px;font-weight:700;color:var(--muted);margin-top:5px}
.top-links{display:flex;gap:22px;margin-left:auto;font-size:13px;font-weight:600}
.top-links a{text-decoration:none;color:#4d4857}
.top-links a:hover{color:var(--accent-ink)}
.demo-tag{font-size:10px;font-weight:700;letter-spacing:1px;padding:7px 10px;border:1px solid #e3d6cb;border-radius:7px;color:#7d5a47;background:var(--soft)}

main{max-width:1440px;margin:auto;padding:0 4% 40px}
.eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:10px;font-weight:800;letter-spacing:1.4px;color:var(--accent-ink)}
.eyebrow i{width:8px;height:8px;border-radius:50%;background:var(--accent);display:inline-block}

/* hero */
.hero{display:grid;grid-template-columns:1.4fr 1fr;gap:48px;align-items:end;padding:48px 0 34px}
.hero h1{font-size:clamp(34px,4.4vw,64px);line-height:1.05;letter-spacing:-2.6px;font-weight:700;margin:16px 0 18px}
.hero h1 em{font-style:normal;color:var(--accent-ink)}
.hero>div>p{max-width:640px;color:#55505e;font-size:15px;line-height:1.75}
.hero-note{background:var(--ink);color:#efe9f5;border-radius:18px;padding:22px 24px;display:grid;gap:12px}
.hero-note p{font-size:13px;line-height:1.7;color:#cfc8d8}
.hero-note strong{color:#ffb595}

/* layout */
.studio{display:grid;grid-template-columns:minmax(300px,370px) minmax(0,1fr);gap:24px;align-items:start}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:22px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.panel-head h2{font-size:20px;letter-spacing:-.6px}
.text-button{background:none;border:0;padding:6px 0;font-size:12px;font-weight:700;color:var(--accent-ink);border-bottom:1px solid #f0c6b2}

/* form */
.brief{position:sticky;top:16px}
.field{display:block;border:0;margin:0;padding:0;margin-top:15px;min-width:0}
.field>span,.field>legend,.field-label{display:block;font-size:12px;font-weight:700;margin-bottom:7px;padding:0}
.field>span em{font-style:normal;font-weight:600;color:var(--muted)}
.field>span em.bad{color:var(--bad)}
.field small{display:block;font-size:11px;color:var(--muted);margin-top:6px;line-height:1.5}
input:not([type]),input[type=text],select,textarea{width:100%;min-width:0;border:1px solid #ddd6cc;background:#fcfbf9;border-radius:10px;padding:11px 12px;font-size:14px;line-height:1.45}
textarea{resize:vertical}
input:focus,select:focus,textarea:focus{border-color:#e9a07f;background:#fff}
textarea[aria-invalid=true]{border-color:#e9a5a0}
.field-row{display:grid;grid-template-columns:1fr 1.2fr;gap:12px}
.color-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
input[type=color]{width:46px;height:40px;border:1px solid #ddd6cc;border-radius:10px;padding:3px;background:#fff;cursor:pointer}
.swatches{display:flex;gap:7px;flex-wrap:wrap}
.swatch{width:30px;height:30px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #d9d2c8}
.swatch[aria-pressed=true]{box-shadow:0 0 0 2px var(--ink)}
.templates{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.template-option{position:relative;display:flex;flex-direction:column;gap:8px;padding:9px;border:1px solid #e3ddd4;border-radius:12px;cursor:pointer;background:#fcfbf9}
.template-option input{position:absolute;opacity:0;pointer-events:none}
.template-option:has(input:checked){border-color:var(--ink);box-shadow:0 0 0 1px var(--ink);background:#fff}
.template-option:has(input:focus-visible){outline:3px solid var(--accent-ink);outline-offset:2px}
.template-text strong{display:block;font-size:12px}
.template-text small{display:block;font-size:10px;color:var(--muted);line-height:1.35}
.template-art{position:relative;display:block;height:46px;border-radius:7px;overflow:hidden}
.template-art i{position:absolute;display:block;border-radius:3px}
.template-art i:nth-child(1){left:9px;top:9px;width:46%;height:7px}
.template-art i:nth-child(2){left:9px;top:21px;width:32%;height:5px}
.template-art i:nth-child(3){left:9px;top:31px;width:22%;height:7px;border-radius:5px}
.t-studio{background:linear-gradient(135deg,#fff6f0,#ffd9c6)}.t-studio i{background:#2a2633}.t-studio i:nth-child(3){background:var(--accent)}
.t-bold{background:linear-gradient(135deg,#25140d,#46261a)}.t-bold i{background:#fff}.t-bold i:nth-child(3){background:#ff9a6c}
.t-photo{background:linear-gradient(180deg,#f3d9c9,#a0705a)}.t-photo:before{content:'';position:absolute;left:4px;top:4px;bottom:4px;width:64%;background:#fff;border-radius:5px}.t-photo i{background:#2a2633;z-index:1}.t-photo i:nth-child(3){background:var(--accent)}
.t-minimal{background:#f8f6f1;border-left:5px solid var(--accent)}.t-minimal i{background:#2a2633}.t-minimal i:nth-child(3){background:var(--accent)}
.switch-row{display:flex;align-items:flex-start;gap:11px;margin-top:18px;padding-top:16px;border-top:1px solid #eee9e2;cursor:pointer;position:relative;font-size:13px;font-weight:700}
.switch-row input{position:absolute;opacity:0;width:36px;height:22px;margin:0}
.switch-row small{display:block;font-weight:500;font-size:11px;color:var(--muted);line-height:1.5;margin-top:3px}
.switch{flex:none;width:36px;height:22px;border-radius:20px;background:#ddd6cc;position:relative;transition:background .15s}
.switch:after{content:'';position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;transition:transform .15s}
.switch-row input:checked+.switch{background:var(--ok)}
.switch-row input:checked+.switch:after{transform:translateX(14px)}
.switch-row input:focus-visible+.switch{outline:3px solid var(--accent-ink);outline-offset:3px}
.warnings{font-size:12px;color:#8a4b12;margin-top:12px;line-height:1.5}
.warnings:empty{display:none}

/* stage */
.stage{min-width:0}
.stage-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:14px;flex-wrap:wrap}
.stage-head h2{font-size:24px;letter-spacing:-.8px;margin-top:6px}
.stage-actions{display:flex;align-items:center;gap:12px}
.seed{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:11px 18px;border-radius:11px;border:1px solid transparent;font-size:13px;font-weight:700;text-decoration:none;line-height:1.3}
.button:disabled{opacity:.55;cursor:progress}
.primary{background:var(--ink);color:#fff}
.primary:hover{background:#34303f}
.accent{background:var(--accent);color:var(--ink)}
.accent:hover{background:#ff8457}
.outline{background:#fff;border-color:#d8d0c5}
.outline:hover{border-color:var(--ink)}
.preview-card{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:14px}
.preview-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.segmented{display:inline-flex;background:#f1ede7;border-radius:11px;padding:3px}
.segmented button{border:0;background:none;padding:8px 12px;border-radius:9px;font-size:12px;font-weight:700;color:#5c5666}
.segmented button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:0 1px 4px #0001}
.pager{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.icon-button{width:36px;height:36px;border-radius:10px;border:1px solid #ddd6cc;background:#fff;font-size:16px;line-height:1}
.icon-button:hover{border-color:var(--ink)}
.canvas-wrap{position:relative;border-radius:12px;overflow:hidden;background:#eeeae4}
#preview{display:block;width:100%;height:auto;aspect-ratio:4/3}
.loading{position:absolute;inset:0;display:grid;place-items:center;font-size:13px;color:var(--muted)}
.download-row{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
.hint{font-size:12px;color:var(--muted);line-height:1.5}
.thumbs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:14px}
.thumb{padding:0;border:1px solid var(--line);background:#fff;border-radius:11px;overflow:hidden;text-align:left;transition:transform .15s,border-color .15s}
.thumb:hover{transform:translateY(-2px);border-color:#cfc6ba}
.thumb[aria-pressed=true]{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink)}
.thumb canvas{display:block;width:100%;height:auto;aspect-ratio:4/3}
.thumb-meta{display:flex;align-items:center;gap:6px;padding:7px 8px;font-size:11px;min-width:0}
.thumb-meta b{font-size:10px;color:var(--muted)}
.thumb-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.thumb-status{width:9px;height:9px;border-radius:50%;flex:none;background:#ccc}
.thumb-status.ok{background:#2f9e66}
.thumb-status.bad{background:#d92d20}

/* quality */
.quality,.layer,.batch{margin-top:24px}
.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
.section-head h2{font-size:24px;letter-spacing:-.8px;margin-top:6px}
.section-intro{font-size:13px;color:var(--muted);max-width:820px;margin:10px 0 16px;line-height:1.7}
.qa-summary{font-size:13px;font-weight:700;padding:9px 14px;border-radius:10px}
.qa-summary.ok{background:var(--ok-bg);color:var(--ok)}
.qa-summary.bad{background:var(--bad-bg);color:var(--bad)}
.qa-list{display:grid;gap:6px}
.qa-row{display:grid;grid-template-columns:190px minmax(0,1fr);align-items:center;gap:14px;padding:10px 12px;border:1px solid #efeae3;border-radius:12px;background:#fcfbf9;text-align:left}
.qa-row:hover{border-color:#d8d0c5;background:#fff}
.qa-name{display:flex;gap:10px;align-items:baseline;font-size:13px;font-weight:700}
.qa-name b{font-size:11px;color:var(--muted)}
.qa-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.chip{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 6px;padding:6px 9px;border-radius:8px;font-size:12px;font-weight:700;line-height:1.35}
.chip i{font-style:normal}
.chip small{width:100%;font-weight:500;font-size:10px;opacity:.85}
.chip.ok{background:var(--ok-bg);color:var(--ok)}
.chip.bad{background:var(--bad-bg);color:var(--bad)}

/* text layer */
.layer summary{cursor:pointer;font-weight:700;font-size:14px}
.layer details p{font-size:12px;color:var(--muted);margin:10px 0}
.layer pre{margin:0;max-height:340px;overflow:auto;background:#1c1a24;color:#f1ecf6;border-radius:12px;padding:16px;font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}

/* batch */
.batch-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:24px;margin-top:16px}
.field-label code{font-size:12px;background:var(--soft);padding:2px 6px;border-radius:5px;color:#7c3510;font-weight:600}
#batch-input{font-size:13px;font-family:ui-monospace,Consolas,monospace}
.batch-actions{display:flex;align-items:center;gap:18px;margin:12px 0 8px;flex-wrap:wrap}
.batch-out{background:#faf8f5;border:1px solid #efeae3;border-radius:14px;padding:16px;min-width:0}
.progress{height:6px;border-radius:6px;background:#ebe5dd;overflow:hidden;margin-bottom:10px}
.progress span{display:block;height:100%;width:0;background:var(--accent);transition:width .2s}
#batch-status{font-size:13px;line-height:1.55}
.batch-results{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:8px}
.batch-results li{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid #efeae3;border-radius:11px;padding:8px}
.batch-results canvas{width:88px;height:66px;border-radius:7px;flex:none}
.batch-results div{display:grid;gap:2px;min-width:0;font-size:12px}
.batch-results strong{font-size:13px;overflow-wrap:anywhere}
.batch-results span{color:var(--muted)}
.batch-results .ok{color:var(--ok);font-weight:700}
.batch-results .bad{color:var(--bad);font-weight:700}

/* how */
.how{padding:44px 0 10px}
.how h2{font-size:clamp(24px,2.6vw,34px);letter-spacing:-1px;margin:8px 0 20px}
.pipeline{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.pipeline li{border:1px solid var(--line);border-radius:14px;padding:16px;background:#fff}
.pipeline span{font-size:11px;font-weight:800;color:var(--accent-ink)}
.pipeline strong{display:block;margin:6px 0 4px;font-size:14px}
.pipeline p{font-size:12px;color:var(--muted);line-height:1.55}
.foot{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:34px;padding-top:20px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}
.foot span:first-child{letter-spacing:1px;font-weight:700}
.foot a{color:var(--accent-ink);font-weight:700}
.toast{position:fixed;z-index:60;left:50%;bottom:22px;transform:translateX(-50%);max-width:calc(100% - 32px);background:var(--ink);color:#fff;padding:12px 18px;border-radius:12px;font-size:13px;box-shadow:0 10px 30px #0002;text-align:center}

@media(max-width:1180px){.qa-chips{grid-template-columns:repeat(2,minmax(0,1fr))}.pipeline{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:980px){.hero{grid-template-columns:1fr;gap:22px;padding-top:34px}.studio{grid-template-columns:1fr}.brief{position:static}.templates{grid-template-columns:repeat(4,minmax(0,1fr))}.batch-grid{grid-template-columns:1fr}.qa-row{grid-template-columns:1fr;gap:8px}}
@media(max-width:700px){.thumbs{grid-template-columns:repeat(3,minmax(0,1fr))}.templates{grid-template-columns:1fr 1fr}.pipeline{grid-template-columns:1fr 1fr}.top-links{display:none}.demo-tag{margin-left:auto}}
@media(max-width:480px){main{padding:0 16px 32px}.topbar{padding:14px 16px;gap:12px}.brand{font-size:21px}.brand img{width:34px;height:34px}.demo-tag{font-size:8px;padding:6px 7px}.hero h1{letter-spacing:-1.5px}.hero>div>p{font-size:14px}.panel{padding:16px;border-radius:15px}.preview-card{padding:10px}.thumbs{grid-template-columns:1fr 1fr}.field-row{grid-template-columns:1fr}.qa-chips{grid-template-columns:1fr 1fr}.chip{font-size:11px}.segmented{width:100%}.segmented button{flex:1;padding:8px 6px;font-size:11px}.pager{width:100%;justify-content:space-between}.download-row .button,.stage-actions .button{flex:1}.stage-actions{width:100%}.pipeline{grid-template-columns:1fr}input:not([type]),select,textarea{font-size:16px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
