:root {
  color-scheme: light;
  --page: #f8f6f1;
  --paper: #fffdf9;
  --ink: #2d2722;
  --muted: #70655b;
  --line: #e9e2d8;
  --accent: #a44838;
  --accent-dark: #873b2e;
  --tint: #f5e8e1;
  --accent-line: #dcc5ba;
  --accent-selected: #ca8d7c;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
[data-accent="plum"] {
  --accent: #79486a;
  --accent-dark: #643952;
  --tint: #f0e6ed;
  --accent-line: #dec9d7;
  --accent-selected: #b88ba8;
}
[data-accent="olive"] {
  --accent: #58663d;
  --accent-dark: #475430;
  --tint: #eceddf;
  --accent-line: #d3d7bc;
  --accent-selected: #9da67c;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); font: 14px/1.45 var(--sans); }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, .stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.04em; line-height: 1.05; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1512px; min-height: 73px; padding: 0 43px; margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; width: max-content; font: 25px/1 var(--serif); letter-spacing: -.05em; }
.wordmark-period { color: var(--accent); }
.brand-icon { display: block; width: 36px; height: 36px; }
.nav { display: flex; gap: 32px; align-self: stretch; }
.nav a { display: grid; align-items: center; position: relative; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--accent-dark); }
.nav a[aria-current]::after { content: ""; position: absolute; height: 2px; background: var(--accent); inset: auto 0 0; }
.privacy-link { justify-self: end; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 25px; background: var(--page); color: var(--muted); padding: 7px 12px; font-size: 12px; white-space: nowrap; }
.privacy-link svg, .site-footer svg { width: 13px; height: 13px; }
.shell { width: min(100% - 88px, 1360px); margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 36px 0 28px; }
.page-heading h1 { font-size: clamp(45px, 4.45vw, 68px); }
.page-heading p { margin-top: 11px; color: var(--muted); font-size: 15px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; min-height: 42px; border: 1px solid transparent; border-radius: 8px; white-space: nowrap; font-size: 13px; font-weight: 650; }
.button svg { width: 16px; height: 16px; }
.button-outline { background: var(--paper); color: var(--accent-dark); border-color: var(--accent-line); }
.button-outline:hover { background: var(--tint); }
.button-primary { background: var(--accent); color: white; }
.button-primary:hover:not(:disabled) { background: var(--accent-dark); }
.workspace { display: grid; grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr); align-items: start; gap: 24px; }
.workspace[data-view="wardrobe"], .workspace[data-view="looks"] { display: block; }
.workspace[data-view="wardrobe"] .garment-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 169px), 1fr)); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-heading h2 { font-size: 34px; }
.panel-heading p { font-size: 13px; color: var(--muted); margin-top: 5px; }
.mirror { padding: 21px; }
.mirror-heading { padding-bottom: 17px; }
.model-status { display: inline-flex; align-items: center; gap: 6px; background: var(--page); border: 1px solid var(--line); color: var(--muted); border-radius: 20px; padding: 5px 9px; font-size: 11px; white-space: nowrap; }
.model-status::before { content: ""; border-radius: 50%; width: 6px; height: 6px; background: var(--accent); }
.stage { position: relative; height: clamp(340px, 32vw, 495px); background: #e8ded1; border-radius: 11px; overflow: hidden; display: grid; place-items: center; isolation: isolate; cursor: grab; touch-action: pan-y; }
.stage:active { cursor: grabbing; }
.photo-frame { position: relative; max-width: 100%; height: 100%; align-self: stretch; }
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.overlays { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.overlays img { position: absolute; object-fit: contain; transform: translate(-50%, -50%); }
.stage-label, .angle-mark { display: flex; align-items: center; gap: 5px; position: absolute; z-index: 2; border-radius: 20px; background: #fffdf9ee; color: var(--ink); padding: 6px 10px; font-size: 11px; line-height: 1; }
.stage-label { top: 13px; left: 13px; }
.angle-mark { bottom: 13px; right: 13px; }
.angle-mark svg { width: 13px; height: 13px; }
.icon-button { display: inline-grid; place-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 0; min-width: 36px; min-height: 36px; }
.icon-button:hover:not(:disabled) { background: var(--tint); color: var(--accent-dark); }
.stage-arrow { position: absolute; z-index: 2; border-radius: 50%; top: 50%; transform: translateY(-50%); min-width: 34px; min-height: 34px; }
.stage-arrow svg { width: 15px; height: 15px; }
.stage-prev { left: 13px; }
.stage-next { right: 13px; }
.angle-list { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; margin: 13px 0 11px; }
.angle-button { border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 6px 10px; min-height: 32px; font-size: 12px; color: var(--muted); }
.angle-button:hover, .angle-button[aria-pressed="true"] { background: var(--tint); color: var(--accent-dark); }
.mirror-options { display: flex; min-height: 34px; justify-content: space-between; align-items: center; gap: 7px; padding-top: 8px; border-top: 1px solid var(--line); }
.switch-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; cursor: pointer; }
.switch-label input { position: absolute; opacity: 0; }
.switch { width: 29px; height: 17px; display: inline-flex; align-items: center; background: #ded5c9; border-radius: 20px; padding: 2px; }
.switch::after { content: ""; width: 13px; height: 13px; background: white; border-radius: 50%; }
.switch-label input:checked + .switch { background: var(--accent); }
.switch-label input:checked + .switch::after { transform: translateX(12px); }
.switch-label input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.overlay-note { margin-top: 6px; font-size: 11px; color: var(--muted); }
.wardrobe-area { display: grid; gap: 18px; }
.wardrobe, .outfit { padding: 21px; }
.wardrobe-controls { display: flex; gap: 8px; margin: 17px 0 12px; }
.search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; color: var(--muted); }
.search input { width: 100%; height: 39px; padding: 0; border: 0; background: transparent; outline: 0; color: var(--ink); }
.search input:focus-visible { outline: 0; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search svg, .sample-control svg { width: 16px; height: 16px; }
.sample-control { min-width: 41px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filter { white-space: nowrap; padding: 6px 11px; border: 1px solid var(--line); background: var(--paper); border-radius: 20px; color: var(--muted); min-height: 30px; font-size: 12px; }
.filter:hover, .filter[aria-pressed="true"] { border-color: var(--accent-line); background: var(--tint); color: var(--accent-dark); }
.garment-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.garment { position: relative; display: grid; grid-template-rows: 1fr auto; min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.garment.is-picked { border-color: var(--accent-selected); }
.garment-select { border: 0; padding: 0; text-align: left; background: transparent; width: 100%; }
.garment-select:focus-visible { outline-offset: -3px; position: relative; z-index: 1; }
.garment-image { display: grid; place-items: center; width: 100%; aspect-ratio: 1.18; background: #f0ebe2; overflow: hidden; }
.garment-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.garment-select:hover .garment-image { filter: brightness(.97); }
.garment-image > svg { color: #9c8274; width: 28px; height: 28px; }
.garment-info { display: grid; padding: 9px 9px 10px; }
.garment-name { font-size: 12px; font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.garment-category { color: var(--muted); font-size: 11px; margin-top: 2px; }
.card-plus, .card-edit { position: absolute; width: 25px; height: 25px; top: 7px; right: 7px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid #e5ddd2; color: var(--accent-dark); }
.card-plus svg, .card-edit svg { width: 13px; height: 13px; }
.is-picked .card-plus { background: var(--accent); color: #fff; border-color: var(--accent); }
.card-edit { left: 7px; right: auto; padding: 0; }
.card-edit:hover { background: var(--tint); }
.outfit-heading h2 { font-size: 29px; }
.outfit-heading h2 span { color: var(--muted); font: 12px var(--sans); display: inline-block; vertical-align: middle; letter-spacing: 0; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; border: 0; background: transparent; color: var(--accent-dark); font-size: 12px; font-weight: 650; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.text-button svg { width: 15px; height: 15px; }
.look-items { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.look-piece { display: flex; align-items: center; gap: 7px; padding: 3px 6px 3px 3px; background: var(--page); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; max-width: 100%; }
.look-piece img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; background: #f0ebe2; }
.look-piece .icon-button { min-width: 25px; min-height: 25px; border: 0; background: transparent; }
.look-piece .icon-button svg { width: 13px; height: 13px; }
.outfit-footer { display: flex; justify-content: flex-end; margin-top: 13px; }
.empty { grid-column: 1 / -1; padding: 28px 18px; text-align: center; color: var(--muted); background: var(--page); border: 1px dashed #d9c8bb; border-radius: 10px; }
.empty h3 { margin-bottom: 6px; color: var(--ink); font-size: 24px; }
.empty .button { margin-top: 11px; }
.looks-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 15px; }
.saved-look { padding: 16px; }
.saved-look h2 { font-size: 29px; margin: 10px 0 4px; overflow-wrap: anywhere; }
.saved-look p { color: var(--muted); font-size: 12px; }
.saved-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.saved-images img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f0ebe2; border-radius: 5px; }
.saved-actions { display: flex; justify-content: space-between; margin-top: 15px; align-items: center; }
.site-footer { display: flex; align-items: center; gap: 6px; color: var(--muted); margin: 20px 0 30px; font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
dialog { width: min(600px, calc(100% - 28px)); max-height: 90dvh; padding: 0; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 70px #2d272233; }
dialog::backdrop { background: #30251e78; }
.dialog-content { padding: 22px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dialog-heading h2 { font-size: 33px; }
.dialog-heading p { margin-top: 7px; color: var(--muted); }
.dialog-heading .icon-button { flex: none; }
.dialog-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.dialog-error { color: var(--accent-dark); margin-top: 10px; }
.field { display: grid; gap: 5px; color: var(--muted); font-size: 12px; min-width: 0; }
.field input:not([type=checkbox], [type=range]), .field select { color: var(--ink); width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 7px; background: var(--page); padding: 7px; }
.upload-zone { display: grid; gap: 5px; border: 1px dashed #d9b7ab; border-radius: 8px; background: var(--page); padding: 12px; color: var(--muted); margin-bottom: 10px; }
.upload-zone strong { color: var(--ink); }
.upload-list, .upload-row .fields { display: grid; gap: 8px; }
.upload-row { display: grid; grid-template-columns: 62px 1fr 30px; gap: 10px; align-items: start; border: 1px solid var(--line); padding: 8px; border-radius: 8px; }
.upload-row .icon-button { min-width: 28px; min-height: 28px; }
.upload-row img { width: 62px; height: 62px; object-fit: contain; background: #f0ebe2; border-radius: 6px; }
.photo-inputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.photo-slot { position: relative; background: var(--page); border: 1px dashed #d9c8bb; border-radius: 8px; overflow: hidden; }
.photo-slot label { display: grid; justify-items: center; gap: 4px; text-align: center; cursor: pointer; padding: 6px; font-size: 12px; }
.photo-slot .slot-media { height: 70px; display: grid; place-items: center; width: 100%; color: var(--accent-dark); }
.photo-slot img { width: 100%; height: 70px; object-fit: contain; }
.photo-slot label:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.photo-slot button { position: absolute; right: 3px; top: 3px; min-width: 24px; min-height: 24px; }
.photo-slot button svg { width: 12px; height: 12px; }
.range-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.range-fields input { width: 100%; accent-color: var(--accent); }
.adjust-dialog { inset: auto 16px 16px auto; margin: 0; width: min(420px, calc(100% - 32px)); }
.toast { z-index: 30; position: fixed; bottom: 20px; right: 20px; max-width: calc(100% - 40px); border-radius: 9px; padding: 10px 14px; background: var(--ink); color: white; box-shadow: 0 6px 20px #2d272230; }
@media (max-width: 1100px) {
  .shell { width: calc(100% - 52px); }
  .header-inner { padding: 0 25px; }
  .workspace { gap: 16px; }
  .mirror, .wardrobe, .outfit { padding: 16px; }
  .garment-grid { gap: 7px; }
}
@media (max-width: 850px) {
  .workspace { grid-template-columns: minmax(0, .86fr) minmax(0, 1fr); }
  .garment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel-heading h2 { font-size: 28px; }
  .header-inner { gap: 10px; }
  .nav { gap: 16px; }
}
@media (max-width: 680px) {
  .header-inner { grid-template-columns: 1fr auto; gap: 0 10px; padding: 12px 16px 0; }
  .wordmark { font-size: 23px; }
  .nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; min-height: 46px; gap: 24px; }
  .privacy-link { padding: 6px 8px; }
  .shell { width: calc(100% - 28px); }
  .page-heading { padding: 25px 0 18px; align-items: start; flex-direction: column; gap: 13px; }
  .page-heading h1 { font-size: 45px; }
  .page-heading p { margin-top: 6px; font-size: 14px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .stage { height: clamp(350px, 105vw, 460px); }
}
@media (max-width: 375px) {
  .garment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sample-stage { background-image: radial-gradient(ellipse at 47% 40%, #e1d1c3, #dac7b7); }
.sample-stage #model-photo { mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent); }
.field + .field, .privacy-actions + .field { margin-top: 12px; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.accent-choices { margin: 14px 0 0; padding: 0; border: 0; }
.accent-choices legend { color: var(--muted); font-size: 12px; padding: 0 0 5px; }
.accent-choices div { display: flex; flex-wrap: wrap; gap: 6px; }
.accent-choice { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.accent-choice:has(:checked) { border-color: var(--accent-selected); background: var(--tint); }
.accent-choice input { margin: 0; accent-color: var(--accent); }
.accent-choice[data-accent="terracotta"] { --accent: #a44838; --tint: #f5e8e1; --accent-selected: #ca8d7c; }
.accent-swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.installation-steps { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.installation-steps li { display: grid; gap: 2px; }
.installation-steps span { color: var(--muted); }
.range-fields .field + .field { margin-top: 0; }
.garment-image img { object-fit: cover; }
.garment:has(.card-edit) .garment-image img { object-fit: contain; }
