:root{--paper:#f6f2ed;--ink:#40352e;--line:#e5dcd1;--soft:#76695e;--brown:#654d3d;--white:#fffdf9}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Malgun Gothic",sans-serif}button,input,select{font:inherit;color:inherit;border:1px solid var(--line);background:#fff;border-radius:9px;padding:11px 12px;min-height:44px;min-width:0}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #95795e;outline-offset:2px}.primary{background:var(--brown);color:white;border-color:var(--brown);font-weight:650}.wide{width:100%}input[type=search]{width:100%}input[type=checkbox]{accent-color:var(--brown);min-height:0;width:18px;height:18px}header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:18px max(16px,calc((100% - 1120px)/2));background:var(--white);border-bottom:1px solid var(--line)}.wordmark{font:24px Georgia,serif;letter-spacing:1px}.wordmark span{display:block;font:10px system-ui;letter-spacing:3px;margin-top:3px;color:var(--soft)}main{max-width:1120px;margin:auto;padding:16px}.intro{padding:22px 6px 30px}.eyebrow{letter-spacing:3px;font-size:11px;color:var(--soft)}h1{font:600 clamp(34px,5vw,56px)/1.18 Georgia,"Malgun Gothic",serif;letter-spacing:-1px;margin:12px 0}h2{font-size:20px;margin:0}h3{margin:0;font-size:17px}p{margin:8px 0}.panel,.look{background:var(--white);border:1px solid var(--line);border-radius:15px;padding:16px;margin-bottom:16px}.sectionhead{display:flex;gap:10px;align-items:center;margin-bottom:14px}.sectionhead>span{font:18px Georgia,serif;color:#937a64}.controls{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin:10px 0}.controls label:not(.check){display:flex;flex-direction:column;gap:5px;font-size:13px}.grow{flex:1 1 130px}.muted,#status{font-size:13px;color:var(--soft);overflow-wrap:anywhere}.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px;margin:12px 0}.item{padding:7px;text-align:left;display:flex;flex-direction:column;gap:4px;min-width:0;overflow:hidden}.item img,.gallery img{width:100%;aspect-ratio:1;object-fit:contain;background:#f1ede7;border-radius:6px}.item strong,.item small{overflow-wrap:anywhere}.item small,.line small{font-size:11px;color:var(--soft)}.selected{border:2px solid var(--brown)}.anchor{display:flex;align-items:center;gap:12px;min-height:50px}.anchor img{width:76px;height:76px;object-fit:contain;background:#f1ede7}.check{display:flex;align-items:center;gap:5px;font-size:14px}.lookhead{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px}.lookbody{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}.board{background:#f2ece3;padding:13px;display:flex;flex-direction:column;gap:10px;min-width:0}.boardbrand{font:18px Georgia,serif;text-align:center;letter-spacing:2px}.boardtitle{font:25px Georgia,serif;text-align:center}.boardgrid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.tile{background:#fff;padding:6px;min-width:0}.tile:first-child{grid-column:1/-1}.tile img{width:100%;aspect-ratio:1.25;object-fit:contain;display:block;background:#fff}.tile:first-child img{aspect-ratio:1.7}.tile small,.tile strong{display:block;font-size:11px;overflow-wrap:anywhere}.tile small{color:var(--soft)}.swatches{display:flex;gap:4px;margin-top:8px}.swatches i{height:8px;flex:1;border-radius:2px;border:1px solid #0001}.line{display:grid;grid-template-columns:60px minmax(0,1fr);gap:8px;border-bottom:1px solid var(--line);padding:10px 0;align-items:center}.line img{width:60px;height:70px;object-fit:contain;background:#f1ede7}.line strong{display:block;overflow-wrap:anywhere}.line .actions{grid-column:2;display:flex;gap:5px;flex-wrap:wrap}.line .actions button{font-size:12px;padding:7px;min-height:40px}.warn{font-size:12px;color:#8a4f28}.look .controls button{flex:1 1 140px}.gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.gallery button{padding:6px;font-size:12px;overflow:hidden}.dialoghead{display:flex;justify-content:space-between;align-items:center;gap:12px;position:sticky;top:0;background:var(--white);padding:6px 0;z-index:1}dialog{border:1px solid var(--line);border-radius:14px;width:min(94vw,740px);max-height:90dvh;overflow:auto;color:var(--ink);background:var(--white);padding:14px}dialog::backdrop{background:#30251e99}#previewbody img{width:100%;max-height:65vh;object-fit:contain}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#40352e;color:white;padding:10px 15px;border-radius:10px;z-index:5;max-width:92vw;display:none}footer{text-align:center;font-size:12px;color:var(--soft);padding:24px} [hidden]{display:none!important}@media(max-width:650px){header{padding:12px}.wordmark{font-size:19px}header button{font-size:12px}main{padding:10px}.panel,.look{padding:12px}.products{grid-template-columns:repeat(2,minmax(0,1fr))}.lookbody{grid-template-columns:minmax(0,1fr)}.controls>*{max-width:100%}.board{padding:10px}.intro{padding:20px 5px}.tile img{aspect-ratio:1.2}.line{grid-template-columns:62px minmax(0,1fr)} }@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.boardgrid[data-count="4"] .tile:first-child{grid-column:auto}.boardgrid[data-count="4"] .tile:first-child img{aspect-ratio:1.25}.boardgrid[data-count="2"] .tile{grid-column:1/-1}.boardgrid[data-count="2"] .tile img{aspect-ratio:1.7}#previewbody a{display:inline-block;text-decoration:none;background:var(--brown);color:white;border-radius:9px;padding:12px 16px}
.flatboard{min-width:0;background:#f2ece3;padding:10px;border-radius:8px}.flatview{min-height:200px;aspect-ratio:4/5;background:#fbfaf7;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;overflow:hidden;gap:10px;padding:8px}.flatview:has(canvas){padding:0;min-height:0;aspect-ratio:auto}.flatview canvas{width:100%;height:auto;display:block}.flatview p{white-space:pre-line;overflow-wrap:anywhere;max-width:100%}.cropstage{position:relative;width:fit-content;max-width:100%;margin:10px auto;line-height:0;overflow:hidden}.cropstage canvas{display:block;max-width:100%;max-height:55vh;width:auto;height:auto;touch-action:none}.cropmark{display:none;position:absolute;pointer-events:none;border:2px solid #bd6636;background:#ff9b2520;box-shadow:0 0 0 1000px #0004}.cutresult{padding:10px;background:#efebe5;border-radius:8px;margin:12px 0}.cutresult img{display:block;margin:auto;width:100%;max-height:40vh;object-fit:contain;background:repeating-conic-gradient(#fff 0% 25%,#eee 0% 50%) 50% / 20px 20px}.download{display:inline-block;padding:12px 16px;text-decoration:none;border-radius:8px;background:var(--brown);color:white}.gallery{margin-top:12px}#detailbody input[type=file],#previewbody input[type=file]{display:block;width:100%;margin:8px 0}.flatboard .muted{white-space:pre-line} @media(max-width:650px){.flatview{min-height:160px}.look .controls button{flex:1 1 42%}.lookbody{gap:10px}.cropstage canvas{max-height:46vh}}

.gallery .photo-selected{outline:3px solid #79583e;outline-offset:-3px;background:#f0e3d4}.gallery button span{display:block;padding:5px 0}.gallery .photo-selected span{font-weight:700;color:#65422a}.selection-status{scroll-margin-top:70px;white-space:pre-wrap;overflow-wrap:anywhere;min-height:1.5em}.cropstage .rawpreview{display:block;max-width:100%;max-height:50vh;object-fit:contain}.cropstage{line-height:normal}

.applybar{position:sticky;bottom:0;background:var(--white);padding:10px 0 2px;border-top:1px solid var(--line);z-index:2;margin-top:12px}.applybar button{width:100%;min-height:48px}.cutresult:empty{display:none}.selection-status{font-size:14px}.applybar{position:sticky;bottom:0}
