@scope (.fitting-app) {
* { box-sizing:border-box; }
[hidden] { display:none !important; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
:scope { color:#191a19; background:#fff; font-family:system-ui,"Apple SD Gothic Neo",sans-serif; }
:scope { margin:0; }
a { color:inherit; }
button { font:inherit; color:inherit; cursor:pointer; }
button:disabled { cursor:default; opacity:.55; }
:focus-visible { outline:2px solid #1b1b1b; outline-offset:4px; }
.shell { width:min(100% - 64px,1344px); margin-inline:auto; }
.masthead { background:#fff; border-bottom:1px solid #e5e7e4; }
.masthead-inner { min-height:90px; display:flex; align-items:center; gap:clamp(18px,4vw,60px); }
.masthead-brand,.masthead-utility { display:flex; flex:none; align-items:center; }
.masthead-utility { margin-left:auto; gap:4px; }
.masthead-back { display:none; }
.masthead-icon,.masthead-back { width:44px; height:44px; place-items:center; color:#1b1b1b; }
.masthead-icon { display:grid; }
.masthead-icon svg,.masthead-back svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; }
.masthead img { display:block; }
.masthead nav { display:flex; gap:clamp(14px,3vw,32px); align-items:center; }
.masthead nav a { text-decoration:none; font-weight:630; font-size:.89rem; white-space:nowrap; }
.masthead nav [aria-current] { text-decoration:underline; text-underline-offset:5px; }
.crumb { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:17px 0 22px; font-size:.78rem; color:#555b56; }
.crumb a { text-underline-offset:3px; }
.product-layout { display:grid; grid-template-columns:minmax(0,1fr) clamp(278px,26vw,350px); gap:clamp(26px,4.5vw,64px); padding-bottom:54px; }
.product-details { align-self:start; }
figure { margin:0; }
.gallery-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.gallery-grid img { width:100%; height:auto; aspect-ratio:1; object-fit:contain; display:block; background:#f3f4f2; }
figcaption { color:#555b56; font-size:.79rem; line-height:1.56; }
figcaption { margin-top:8px; }
#gallery-position { display:none; }
.sku { margin:0 0 5px; color:#545a54; font-size:.8rem; font-weight:660; letter-spacing:.04em; }
#product-title { font-size:clamp(1.38rem,2.25vw,2.05rem); line-height:1.21; margin:0; letter-spacing:-.04em; word-break:keep-all; }
.product-en { margin:4px 0 0; color:#4e534e; font-size:.8rem; letter-spacing:.015em; }
.product-price { font-size:1.2rem; font-weight:740; margin:17px 0 29px; }
fieldset { border:0; border-top:1px solid #e1e4e0; padding:11px 0 17px; margin:0; min-width:0; }
legend { padding-right:10px; font-size:.85rem; font-weight:720; }
legend span { margin-left:6px; font-size:.77rem; color:#555b56; font-weight:530; }
.colors,.sizes { display:flex; flex-wrap:wrap; gap:7px; }
.colors label,.sizes label { position:relative; cursor:pointer; }
.colors input,.sizes input { position:absolute; clip-path:inset(50%); width:1px; height:1px; }
.colors label { display:grid; place-items:center; width:82px; height:82px; padding:1px; border:1px solid #dedede; }
.colors img { display:block; width:100%; height:100%; object-fit:cover; background:#f4f4f4; }
.sizes label { display:grid; place-items:center; min-height:44px; min-width:57px; padding:5px 9px; border:1px solid #dce0da; font-size:.79rem; }
.colors label:has(:checked),.sizes label:has(:checked) { border-color:#1b1b1b; box-shadow:inset 0 0 0 1px #1b1b1b; background:#f6f6f6; }
label:has(:focus-visible) { outline:2px solid #1b1b1b; outline-offset:3px; }
.try-on { display:flex; justify-content:space-between; align-items:center; text-align:left; width:100%; min-height:48px; margin-top:3px; padding:8px 14px; border:0; border-radius:4px; background:#1b1b1b; color:#fff; font-weight:720; }
.try-on:hover { background:#373737; }
.product-source { display:inline-block; margin-top:14px; text-underline-offset:4px; font-size:.8rem; font-weight:650; }
.fit-header p { margin:5px 0 0; font-size:.8rem; color:#555; }
.fit-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:11px; }
#fit-title { margin:0; font-family:Outfit,Pretendard,sans-serif; font-weight:650; line-height:1.02; font-size:clamp(1.45rem,2.8vw,2rem); letter-spacing:-.015em; }
.quiet { min-height:42px; padding:7px 10px; background:#fff; border:1px solid #d9ded8; border-radius:4px; font-size:.79rem; white-space:nowrap; }
@media(max-width:820px) {
  .shell { width:calc(100% - 40px); }
}
@media(max-width:670px) {
  .shell { width:calc(100% - 28px); }
  .masthead-inner { min-height:60px; gap:6px; }
  .masthead img { width:54px; height:29px; }
  .masthead .masthead-categories { display:none; }
  .masthead-back { display:grid; }
  .masthead-utility { gap:0; }
  .crumb { padding:13px 0 16px; gap:7px; }
  .product-layout { grid-template-columns:minmax(0,1fr); gap:20px; }
  .gallery-grid { display:flex; gap:0; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:thin; }
  .gallery-grid img { flex:0 0 100%; min-width:100%; scroll-snap-align:start; }
  #gallery figcaption { display:flex; justify-content:space-between; }
  #gallery-position { display:inline; }
}


.wear-comparison {display:grid;grid-template-columns:minmax(0,1fr) minmax(158px,.43fr);gap:clamp(12px,1.9vw,24px);}
.wear-preview {position:relative;max-width:548px;align-self:start;}
.wear-stage {position:relative;display:grid;place-items:center;overflow:hidden;background:#9ba2ad;min-height:0;aspect-ratio:3/4;}
.wear-full-length {width:100%;}
.wear-full-length canvas {display:block;width:100%;height:auto;}
.wear-preview figcaption {display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;}
.wear-preview figcaption span {color:#222426;font-weight:660;}
.wear-specs {align-self:start;padding-top:10px;border-top:1px solid #dedede;}
.wear-specs h3 {font-size:.94rem;margin:0 0 4px;}
.wear-specs h3 small {font-size:.74rem;color:#555;font-weight:500;}
.wear-specs > p {margin:0 0 10px;font-size:.82rem;font-weight:650;}
.wear-specs dl {margin:0 0 8px;font-size:.8rem;}
.wear-specs dl div {display:flex;justify-content:space-between;gap:5px;padding:6px 0;border-bottom:1px solid #e9e9e9;}
.wear-specs dt {display:flex;align-items:center;gap:6px;}
.wear-measure-icon {width:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.wear-measure-icon path:first-child {opacity:.35;}
.wear-specs dd {margin:0;font-variant-numeric:tabular-nums;font-weight:650;}
.wear-specs > a {font-size:.76rem;text-underline-offset:3px;}
.wear-reference {margin-top:18px;padding-top:12px;border-top:1px solid #dedede;}
.wear-reference h4 {font-size:.88rem;margin:0 0 12px;}
.wear-reference .wear-method {margin:0 0 10px;}
.wear-reference .wear-people {display:grid;grid-template-columns:repeat(2,minmax(44px,1fr));gap:6px;border:0;margin:0 0 12px;padding:0;}
.wear-people legend {margin:0 0 5px;padding:0;font-size:.77rem;font-weight:600;}
.wear-people label {min-height:48px;display:grid;justify-items:center;align-content:center;gap:2px;padding:3px;cursor:pointer;border:1px solid #dedede;border-radius:4px;font-size:.76rem;}
.wear-people label:has(:checked) {border-color:#222;background:#ededed;}
.wear-people label:has(:focus-visible) {outline:2px solid #1b1b1b;outline-offset:3px;}
.wear-people svg {width:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;}
.wear-reference .wear-build {grid-template-columns:repeat(3,minmax(44px,1fr));gap:4px;margin-top:12px;margin-bottom:8px;}
.wear-ease {margin:10px 0 0;}
.wear-ease h5 {color:#222;font-weight:650;font-size:.76rem;margin:0 0 6px;}
.wear-fit-values span {display:block;color:#343436;font-variant-numeric:tabular-nums;}
.wear-height {display:grid;gap:5px;font-size:.77rem;font-weight:600;}
.wear-height:has(:focus-visible) {outline:none;}
.wear-height-field {display:flex;align-items:center;gap:6px;font-weight:400;}
.wear-height input {min-width:0;width:100%;min-height:44px;padding:5px 7px;border:1px solid #dedede;border-radius:4px;font:inherit;background:#fff;}
.wear-photo-actions {position:absolute;z-index:1;inset:7px 7px auto auto;display:flex;gap:4px;}
.wear-photo-button {min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 6px;border:1px solid #d7d7d7;border-radius:5px;background:#fff;color:#232323;font:inherit;font-size:.72rem;white-space:nowrap;cursor:pointer;}
.wear-photo-button:hover {background:#f0f0f0;}
.wear-photo-button:focus-visible {outline:2px solid #232323;outline-offset:2px;}
.wear-photo-button svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}

.wear-photo-reference {margin-top:7px;}
.wear-photo-reference-actions {display:flex;flex-wrap:wrap;gap:4px;}
.wear-note {font-size:.76rem;color:#555;line-height:1.5;margin:6px 0 0;}
.wear-note:empty {display:none;}

#wear-reset {margin-top:6px;min-height:44px;width:100%;display:flex;align-items:center;justify-content:center;gap:6px;}
#wear-reset svg {width:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.wear-photo {display:flex;align-items:center;gap:8px;margin-top:6px;padding:6px;background:#f5f5f5;}
.wear-photo img {width:56px;height:56px;object-fit:contain;display:block;}
.wear-photo p {margin:0;font-size:.72rem;}
@media(max-width:720px) {
 .wear-comparison {grid-template-columns:minmax(0,1fr) minmax(140px,.58fr);gap:12px;}
 .wear-preview {position:sticky;top:10px;}
 .wear-photo-actions {position:static;justify-content:flex-end;margin-bottom:6px;}
 .wear-specs dl div {padding:4px 0;}
 .wear-measure-icon {width:18px;}
}
@media(max-width:350px) {
 .wear-comparison {grid-template-columns:1fr;}
 .wear-preview {position:static;}
}
/* Local photo review: one entry, explicit manual head selection, no sample identity. */
#photo-layer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;object-fit:contain;}
.wear-photo-actions{z-index:2;flex-wrap:wrap;max-width:100%;}
#photo-placement{padding:12px 0;border-top:1px solid #ddd;}
.photo-placement-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 16px;}
.photo-placement-grid label{font-size:12px;display:grid;gap:2px;min-width:0;}
.photo-placement-grid input{width:100%;min-width:0;height:44px;accent-color:#222;}
.photo-inline-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;}
.photo-inline-actions button{min-height:44px;}
#photo-dialog,#photo-original-dialog{width:min(680px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:0;border-radius:12px;padding:20px;color:#222;background:#fff;}
dialog::backdrop{background:#0009;}
dialog header{display:flex;justify-content:space-between;align-items:center;gap:16px;}
dialog h2{font-size:22px;letter-spacing:-.02em;margin:4px 0 12px;}
dialog p{font-size:13px;line-height:1.6;}
.photo-step{font-size:11px;margin:0;color:#666;}
#photo-crop{display:block;width:100%;height:auto;background:#e8e8e8;touch-action:manipulation;cursor:crosshair;}
#crop-status{min-height:22px;margin:8px 0;}
#photo-original-image{display:block;max-width:100%;max-height:72dvh;object-fit:contain;margin:auto;}
@media(max-width:670px){#photo-dialog,#photo-original-dialog{padding:14px;}dialog h2{font-size:19px;} .wear-photo-actions{position:static;margin-bottom:8px;} }

#photo-position-dialog{width:min(560px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:0;border-radius:12px;padding:20px;color:#222;background:#fff;}
#photo-zoom{display:block;width:min(100%,380px);height:auto;max-height:40dvh;object-fit:contain;margin:0 auto 12px;background:#e8e8e8;}
#photo-position-dialog #photo-placement{border:0;padding:0;}
@media(max-width:670px){#photo-position-dialog{padding:14px;}#photo-position-dialog .wear-note{font-size:12px;}}

}

@scope (.fitting-app) {
 .product-media{grid-column:1;grid-row:1}.product-details{grid-column:2;grid-row:1}
 @media(max-width:670px){.product-media,.product-details{grid-column:auto;grid-row:auto}.product-media{margin-top:10px}.wear-comparison{grid-template-columns:1fr;gap:28px}.wear-preview{position:static}.wear-specs{padding-top:20px}.wear-specs dl{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.wear-specs dl div{padding:9px 0}.wear-photo-actions{min-height:44px}.wear-reference{margin-top:22px}}
}
