@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,450;0,9..144,600;1,9..144,500&family=Inter:wght@100..900&display=swap');
:root{--bg:#F6F0DE;--surface:#fff;--ink:#201C14;--muted:#726C5A;--line:#E3D9BC;--accent:#4056A1;--accent-soft:#C5CBE3;--gold:#D79922;--red:#F13C20;--safe:#3F6B49;--dark:#211C13;--radius:18px;color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--font-display:'Fraunces',Inter,serif}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);line-height:1.5}
button,input{font:inherit}
button{color:inherit}
button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid rgba(64,86,161,.35);outline-offset:3px}
h1,h2,h3,.brand{font-family:var(--font-display)}
.topbar{min-height:70px;padding:14px max(20px,calc((100vw - 1180px)/2));display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px;background:rgba(246,240,222,.94);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--ink);font-size:.9rem;font-weight:700;letter-spacing:.02em;text-decoration:none}.brand>span:last-child>span{color:var(--gold)}
.brand-mark{width:25px;height:25px;border:2px solid currentColor;border-radius:50%;display:grid;place-items:center}.brand-mark span{width:7px;height:7px;border-radius:50%;background:var(--accent)}
.privacy-pill{justify-self:center;display:flex;align-items:center;gap:8px;font-size:.78rem;font-weight:750;color:var(--safe)}.privacy-pill span{font-size:.58rem}
.instructions-btn,.text-btn{border:0;background:none;cursor:pointer;font-weight:750}.instructions-btn{justify-self:end;border:1px solid var(--ink);border-radius:999px;padding:8px 14px}.instructions-btn:hover{background:var(--ink);color:#fff}
.app-shell{width:min(1180px,calc(100% - 40px));margin:42px auto 0;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.8fr);gap:24px;align-items:start}
.camera-card,.control-panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
.camera-card{overflow:hidden}.camera-stage{background:#0E0D09;aspect-ratio:16/10;position:relative;overflow:hidden;color:#fff}.camera-stage video,.camera-stage canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.camera-stage video{opacity:0}.stage-grid{position:absolute;inset:0;background:linear-gradient(90deg,transparent calc(50% - .5px),rgba(255,255,255,.1) 50%,transparent calc(50% + .5px)),linear-gradient(transparent calc(50% - .5px),rgba(255,255,255,.1) 50%,transparent calc(50% + .5px));pointer-events:none}
.empty-state{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:32px;background:#14120C}.empty-state[hidden]{display:none}.empty-state h1{font-weight:500;font-size:clamp(2rem,5vw,4.2rem);line-height:.98;letter-spacing:-.02em;margin:10px 0 16px;max-width:700px}.empty-state h1 em{color:var(--accent-soft);font-style:italic}.empty-state>p:not(.eyebrow){max-width:530px;margin:0 0 24px;color:#C9C2AA}.empty-state small{margin-top:14px;color:#94907C}.orb{width:58px;height:58px;border:1px solid #55503F;border-radius:50%;display:grid;place-items:center}.orb:after{content:"";width:18px;height:18px;border-radius:50%;background:var(--accent-soft)}.orb i{display:none}
.eyebrow{margin:0;color:var(--accent);font-size:.69rem;font-weight:850;letter-spacing:.14em}.primary-btn,.small-btn,.sample-btn{border:0;border-radius:10px;cursor:pointer;font-weight:800}.primary-btn{display:flex;align-items:center;gap:26px;padding:12px 14px 12px 18px;background:#fff;color:var(--ink)}.primary-btn b{font-size:1.2rem}.primary-btn:hover{background:var(--accent-soft)}.small-btn{padding:9px 13px;background:var(--ink);color:#fff}.small-btn:disabled,.sample-btn:disabled,.round-control:disabled,.shutter:disabled{opacity:.4;cursor:not-allowed}.small-btn.secondary{background:#EDE6D0;color:var(--ink)}
.countdown{display:none;position:absolute;inset:0;place-items:center;background:rgba(0,0,0,.64);font-size:6rem;font-weight:900}.countdown.active{display:grid}.status-chip,.fps-chip{position:absolute;top:14px;border-radius:999px;background:rgba(20,17,10,.8);color:#fff;font-size:.72rem;padding:7px 11px;backdrop-filter:blur(7px)}.status-chip{left:14px;display:flex;gap:7px;align-items:center}.status-chip span{width:7px;height:7px;border-radius:50%}.fps-chip{right:14px}.fps-chip b{font-variant-numeric:tabular-nums}.capture-bar{min-height:84px;display:flex;align-items:center;justify-content:center;gap:28px;border-top:1px solid var(--line)}.round-control,.shutter{border:0;background:none;cursor:pointer}.round-control{width:42px;height:42px;border-radius:50%;font-size:1.25rem}.round-control:hover{background:#EFE8D3}.shutter{width:58px;height:58px;border:2px solid var(--ink);border-radius:50%;padding:5px}.shutter span{display:block;width:100%;height:100%;border-radius:50%;background:var(--red)}
.control-panel{padding:24px}.panel-heading{display:flex;justify-content:space-between;gap:14px;margin-bottom:24px}.panel-heading h2,.section-heading h2,.privacy-section h2{font-weight:500;font-size:clamp(1.6rem,3vw,2.4rem);line-height:1.08;letter-spacing:-.015em;margin:7px 0 0}.text-btn{align-self:start;color:var(--muted);padding:4px}.text-btn:hover{color:var(--ink)}
.step-card{display:grid;grid-template-columns:34px 1fr auto;gap:11px;align-items:center;padding:17px 0;border-top:1px solid var(--line)}.step-card h3{font-weight:600;margin:0 0 3px;font-size:.94rem}.step-card p{margin:0;color:var(--muted);font-size:.82rem}.step-number{font-size:.72rem;font-weight:850;color:#B0A98F}.step-card.active .step-number,.step-card.complete .step-number{color:var(--accent)}
.color-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:17px 0 12px;border-top:1px solid var(--line)}.color-swatch{width:32px;height:32px;border:3px solid var(--surface);outline:1px solid var(--line);border-radius:50%;background:var(--swatch);cursor:pointer}.color-swatch.selected{outline:3px solid var(--ink);outline-offset:2px}.sample-btn{margin-left:auto;padding:9px 12px;background:var(--accent-soft);color:var(--accent)}.sample-btn:hover{background:#B7C0E4}.sample-preview{display:flex;align-items:center;gap:11px;background:#F4EEDB;border-radius:12px;padding:11px 13px;margin-bottom:22px}.sample-color{width:38px;height:38px;border:4px solid #fff;border-radius:9px;background:var(--accent);box-shadow:0 0 0 1px var(--line)}.sample-preview>span:last-child{display:flex;flex-direction:column}.sample-preview small{color:var(--muted);font-size:.7rem}.sample-preview b{font-size:.84rem;font-variant-numeric:tabular-nums}
.adjustments{display:grid;gap:9px}.adjustments label{display:flex;justify-content:space-between;font-size:.82rem;font-weight:750}.adjustments output{color:var(--accent)}input[type=range]{width:100%;accent-color:var(--accent);margin:0 0 9px}.tip{display:flex;gap:10px;margin-top:18px;padding-top:18px;border-top:1px solid var(--line);color:var(--muted);font-size:.8rem}.tip span{color:var(--gold)}.tip p{margin:0}.tip b{color:var(--ink)}
.camera-stage.sample-mode{cursor:crosshair}.camera-stage.sample-mode:after{content:"Tap a bright area of the cloth";position:absolute;left:50%;bottom:18px;transform:translateX(-50%);background:#fff;color:var(--ink);padding:9px 13px;border-radius:999px;font-size:.75rem;font-weight:800;white-space:nowrap}
.privacy-section,.how-to{width:min(1180px,calc(100% - 40px));margin:24px auto 0;border-radius:var(--radius)}.privacy-section{background:#E5ECDF;border:1px solid #C9D6C1;padding:34px;display:grid;grid-template-columns:.85fr 1.15fr;gap:54px}.privacy-section>div>p:last-child,.section-heading>p:last-child{color:#3F5E4C;margin:14px 0 0;max-width:560px}.privacy-section .eyebrow{color:var(--safe)}.privacy-section ul{list-style:none;padding:0;margin:0;display:grid;gap:2px}.privacy-section li{background:rgba(255,255,255,.56);padding:15px 17px;display:grid;grid-template-columns:145px 1fr;gap:16px;border-radius:10px}.privacy-section li b{font-size:.86rem}.privacy-section li span{font-size:.83rem;color:#3F5E4C}
.how-to{background:var(--surface);border:1px solid var(--line);padding:42px}.section-heading{max-width:650px}.section-heading>p:last-child{color:var(--muted)}.instruction-grid{list-style:none;padding:0;margin:34px 0 0;display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);border-left:1px solid var(--line)}.instruction-grid li{padding:24px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);min-height:190px}.instruction-grid li>b{color:var(--accent);font-size:.72rem}.instruction-grid h3{font-weight:600;margin:24px 0 7px;font-size:1rem}.instruction-grid p{margin:0;color:var(--muted);font-size:.84rem}
.site-footer{margin-top:64px;background:var(--dark);color:#fff;padding:44px max(20px,calc((100vw - 1180px)/2)) 24px}.site-footer .brand{color:#fff}.footer-main{display:grid;grid-template-columns:1fr 1fr;gap:60px;padding-bottom:36px}.footer-brand p{max-width:430px;color:#ABA593;font-size:.87rem}.footer-steps{display:grid;gap:12px}.footer-steps div{display:flex;gap:14px;border-bottom:1px solid #3A342A;padding-bottom:11px;font-size:.84rem}.footer-steps b{color:var(--gold)}.footer-bottom{border-top:1px solid #3A342A;padding-top:20px;display:flex;justify-content:space-between;gap:20px;color:#ABA593;font-size:.78rem}.footer-bottom a{color:#fff;text-decoration:none}.footer-bottom a:hover{text-decoration:underline}
dialog{width:min(660px,calc(100% - 30px));max-height:calc(100vh - 30px);overflow:auto;border:0;border-radius:18px;padding:32px;color:var(--ink);box-shadow:0 24px 80px rgba(0,0,0,.26)}dialog::backdrop{background:rgba(20,17,10,.72)}dialog h2{font-weight:500;font-size:2rem;letter-spacing:-.015em;margin:8px 0 20px}.dialog-close{position:absolute;right:16px;top:14px;border:0;background:#EDE6D0;width:34px;height:34px;border-radius:50%;cursor:pointer;font-size:1.3rem}dialog ol{padding-left:22px;display:grid;gap:13px;color:var(--muted);font-size:.9rem}dialog li::marker{color:var(--accent);font-weight:800}dialog li b{color:var(--ink)}.privacy-note{margin-top:22px;background:#E6EDE1;border-radius:12px;padding:17px}.privacy-note b{color:var(--safe)}.privacy-note p{margin:5px 0 0;color:#3F5E4C;font-size:.85rem}.result-dialog img{display:block;width:100%;max-height:60vh;object-fit:contain;background:#111;border-radius:12px}.result-actions{display:flex;gap:10px;margin-top:16px}.toast{position:fixed;left:50%;bottom:24px;z-index:50;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--ink);color:#fff;border-radius:999px;padding:10px 16px;font-size:.8rem;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:850px){.app-shell{grid-template-columns:1fr}.privacy-section{grid-template-columns:1fr;gap:25px}.instruction-grid{grid-template-columns:repeat(2,1fr)}.footer-main{grid-template-columns:1fr;gap:28px}}
@media(max-width:580px){.topbar{grid-template-columns:1fr auto}.privacy-pill{display:none}.app-shell,.privacy-section,.how-to{width:min(100% - 22px,1180px)}.app-shell{margin-top:12px;gap:12px}.camera-card,.control-panel,.privacy-section,.how-to{border-radius:14px}.camera-stage{aspect-ratio:4/5}.empty-state{padding:24px 18px}.empty-state h1{font-size:2.55rem}.control-panel{padding:19px}.step-card{grid-template-columns:30px 1fr}.step-card .small-btn{grid-column:2}.sample-btn{width:100%;margin:8px 0 0}.privacy-section,.how-to{padding:25px 20px}.privacy-section li{grid-template-columns:1fr;gap:3px}.instruction-grid{grid-template-columns:1fr}.instruction-grid li{min-height:0}.footer-main{gap:24px}.footer-bottom{flex-direction:column}.site-footer{margin-top:40px}.status-chip{max-width:68%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}
/* Guided capture flow */
[hidden]{display:none!important}
.capture-bar{padding:16px;gap:18px}
.shutter{width:auto;height:auto;min-height:58px;display:flex;align-items:center;justify-content:center;gap:12px;border:0;border-radius:12px;background:var(--accent);color:#fff;padding:12px 18px}
.shutter span{width:26px;height:26px;flex:none;background:#fff;border:4px solid var(--accent-soft)}
.shutter b{font-size:.9rem}
.shutter:hover{background:#304480}
.round-control{min-width:44px;min-height:44px}
.text-btn,.small-btn,.sample-btn{min-height:44px}
button:disabled{opacity:.5;cursor:not-allowed}
.flow-tip{color:var(--muted);margin:0 0 18px}
.color-heading{margin:24px 0 12px;font-size:1rem}
.color-swatch{width:44px;height:44px}
.advanced-settings{border-top:1px solid var(--line);padding-top:12px}
.advanced-settings summary{cursor:pointer;font-weight:750;min-height:44px;align-content:center}
.advanced-settings summary:focus-visible{outline:3px solid var(--accent-soft);outline-offset:3px}
.advanced-settings p{font-size:.82rem;color:var(--muted)}
.instruction-grid{grid-template-columns:repeat(4,1fr)}
@media(max-width:850px){.instruction-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:580px){.capture-bar{gap:8px;padding:12px 8px}.shutter{flex:1;padding:12px 8px}.shutter b{font-size:.82rem}.instruction-grid{grid-template-columns:1fr}.panel-heading{margin-bottom:16px}}
