:root {
  color-scheme: light;
  --paper: #fcfbf9;
  --studio: #f4f2ee;
  --ink: #292b27;
  --muted: #70716a;
  --rule: #e4e2dc;
  --accent: #545c48;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
button, a, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
button { border: 0; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
h2 { font-size: 1rem; font-weight: 550; line-height: 1.4; }
.site-header { min-height: 68px; padding: 0 4.3%; display: flex; align-items: center; border-bottom: 1px solid var(--rule); }
.wordmark { font-size: 1.35rem; font-weight: 620; letter-spacing: -.07em; text-decoration: none; }
.wordmark-period { color: var(--accent); }
main { max-width: 1650px; margin: auto; padding: 30px 4.3% 55px; }
.eyebrow { color: var(--muted); margin-bottom: 12px; font-size: .75rem; letter-spacing: .13em; font-weight: 500; }
.workspace { display: grid; grid-template-columns: minmax(185px, .76fr) minmax(380px, 2.1fr) minmax(245px, 1fr); column-gap: 30px; align-items: start; }
.section-title { display: flex; align-items: baseline; gap: 10px; }
.step { font-size: .75rem; font-variant-numeric: tabular-nums; color: #8b8c83; }
.panel-note { color: var(--muted); margin-top: 10px; font-size: .875rem; line-height: 1.5; }
.polo-selector { display: grid; gap: 9px; margin-top: 24px; }
.polo-option { display: grid; grid-template-columns: 65px minmax(0, 1fr) 15px; gap: 13px; align-items: center; min-height: 92px; padding: 9px 10px; border: 1px solid transparent; border-radius: 15px; background: transparent; text-align: left; transition: border-color 240ms, background 240ms; }
.polo-option:hover { background: #f4f3ef; }
.polo-option[aria-pressed="true"] { border-color: #929686; background: #f2f2eb; }
.thumbnail { position: relative; width: 65px; height: 70px; display: flex; align-items: center; justify-content: center; }
.photo-crop { position: relative; display: block; overflow: hidden; flex: none; }
.thumbnail img { position: absolute; object-fit: contain; max-width: none; display: block; }
.thumbnail .image-pending { font-size: .75rem; line-height: 1.3; text-align: center; color: var(--muted); }
.polo-name { display: block; font-weight: 550; font-size: .875rem; line-height: 1.35; }
.polo-model { display: block; font-size: .75rem; color: var(--muted); margin-top: 5px; }
.selection-dot { width: 12px; height: 12px; border: 1px solid #b8bab0; border-radius: 50%; }
[aria-pressed="true"] > .selection-dot { background: var(--accent); border: 3px solid #f2f2eb; box-shadow: 0 0 0 1px var(--accent); }
.outfit-panel { min-width: 0; }
.layer-toolbar { display:flex; align-items:center; justify-content:flex-end; margin-bottom:13px; }
.layer-switch { display:flex; gap:4px; }
.layer-switch button { background:transparent; padding:8px 11px; border-radius:8px; font-size:.75rem; border:1px solid var(--rule); }
.layer-switch button[aria-pressed="true"] { background:var(--ink); border-color:var(--ink); color:var(--paper); }
.studio-toolbar { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 17px; min-height: 34px; }
.studio-toolbar h2 { font-size: .875rem; }
.view-switch { display: flex; padding: 3px; border-radius: 9px; background: #eeede8; }
.view-switch button { background: transparent; border-radius: 6px; padding: 7px 10px; font-size: .75rem; min-height: 31px; white-space: nowrap; color: #63675d; transition: background 220ms, color 220ms; }
.view-switch button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px #27291f0b; }
.outfit-figure { background: var(--studio); border-radius: 17px; overflow: hidden; }
.outfit-stage { position: relative; width: 100%; aspect-ratio: .77; isolation: isolate; }
.outfit-stage[data-render="photographic"] { height: clamp(540px, calc(100svh - 245px), 760px); aspect-ratio: auto; }
.outfit-stage[data-render="photographic"] { display: flex; justify-content: center; }
.look-composite { display: block; position: relative; height: 100%; aspect-ratio: 2 / 3; max-width: 100%; overflow: hidden; opacity: 0; transition: opacity 240ms ease; }
.look-composite[data-ready="true"] { opacity: 1; }
.look-module { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
/* Recortes transparentes no mesmo canvas 1024 × 1536: a barra superior cobre a cintura. */
.look-module-base { z-index: 1; transform: translateY(-1.05%); }
.look-module-top { z-index: 2; }
.look-composite::after { content:""; position:absolute; z-index:0; left:31%; right:31%; bottom:4.8%; height:3%; border-radius:50%; background:#35312812; filter:blur(9px); }
.outfit-figure:has([data-render="photographic"]) { background: #f0ede8; }
.outfit-stage.is-updating { animation: look-arrive 250ms ease-out; }
@keyframes look-arrive { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.garment { position: absolute; margin: 0; left: var(--x); top: var(--y); width: var(--w); height: var(--h); transform: translateX(-50%) rotate(var(--rotation)); transition: top 250ms, left 250ms, width 250ms, height 250ms, transform 250ms; pointer-events: none; }
.garment > .thumbnail { width: 100%; height: 100%; filter: drop-shadow(0 2px 2px #21211b0c); }
.garment-collar { z-index: 7; top: 5.8%; }
.garment-collar .photo-crop { clip-path: polygon(35% 0, 74% 0, 74% 10%, 63% 20%, 47% 20%, 35% 12%); }
.outfit-stage[data-incomplete="true"] .garment-collar { display: none; }
.garment[data-slot="calca"] { z-index: 1; }
.garment[data-slot="polo"] { z-index: 3; }
.garment[data-slot="camada"] { z-index: 4; }
.garment[data-slot="tenis"] { z-index: 5; }
.garment[data-pending="true"] { z-index: 8; display: flex; align-items: center; justify-content: center; transform: translateX(-50%); }
.garment .image-pending { display: none; }
.stage-placeholder { font-size: .875rem; line-height: 1.55; text-align: center; max-width: 190px; color: var(--muted); padding: 8px 14px; background: var(--studio); }
.stage-placeholder strong { display: block; color: #4d5147; font-size: .875rem; font-weight: 450; margin: 6px 0; }
.stage-placeholder .pending-label { display: block; font-size: .75rem; }
.stage-placeholder .slot-number { font-size: .75rem; font-variant-numeric: tabular-nums; letter-spacing: .08em; color: #888b80; }
.outfit-stage[data-incomplete="true"] .garment[data-slot="polo"] { z-index: 5; }
.outfit-stage[data-incomplete="true"] .garment[data-pending="true"][data-slot="camada"] { top: 0; height: 12%; width: 88%; }
.outfit-stage[data-incomplete="true"] .garment[data-slot="polo"] { top: 13%; height: 29%; width: 63%; }
.outfit-stage[data-incomplete="true"] .garment[data-slot="calca"] { top: 42%; height: 42%; }
.outfit-stage[data-incomplete="true"] .garment[data-pending="true"][data-slot="polo"] { top: 25%; height: 15%; }
.outfit-stage[data-incomplete="true"] .garment[data-pending="true"][data-slot="calca"] { top: 51%; height: 17%; }
.outfit-stage[data-incomplete="true"] .garment[data-pending="true"][data-slot="tenis"] { top: 80%; height: 17%; }
.details-panel { padding: 4px 0 0 4px; }
.score-block { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 28px 0 18px; padding-bottom: 21px; border-bottom: 1px solid var(--rule); font-size: .875rem; }
.score-block p { white-space: nowrap; }
.score-block strong { font-size: 2rem; font-weight: 400; letter-spacing: -.07em; }
.score-block p span { color: var(--muted); margin-left: 7px; font-size: .75rem; }
.justification { font-size: .9375rem; line-height: 1.8; color: #64675e; margin-bottom: 24px; }
.selected-piece { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 19px 0; text-align: left; background: transparent; border-top: 1px solid var(--rule); }
.selected-piece .piece-label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 7px; }
.selected-piece strong { display: block; font-size: .875rem; font-weight: 550; line-height: 1.4; }
.selected-piece .piece-detail { display: block; color: var(--muted); font-size: .75rem; line-height: 1.5; margin-top: 4px; }
.selected-piece .change-label { font-size: .75rem; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; align-self: center; }
button.selected-piece:hover .change-label { color: var(--ink); }
.reset-button { width: 100%; margin-top: 16px; padding: 13px 8px; background: var(--ink); color: #fff; border-radius: 10px; font-size: .8125rem; line-height: 1.5; }
.score-details { border-top: 1px solid var(--rule); padding-top: 20px; margin-top: 4px; font-size: .75rem; color: var(--muted); }
.score-details summary { cursor: pointer; padding: 5px 0; line-height: 1.5; }
.score-details p { line-height: 1.7; margin-top: 13px; }
.score-row { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; font-size: .75rem; }
.score-row span:last-child { white-space: nowrap; }
.alternatives-section { grid-column: 2 / -1; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule); }
.alternatives { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.alternative { text-align: left; padding: 20px; background: #f6f5f1; border: 1px solid transparent; border-radius: 16px; transition: border-color 240ms; }
.alternative:hover { border-color: #b5b8ab; }
.alternative[aria-pressed="true"] { border-color: var(--accent); }
.alternative-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .75rem; color: var(--muted); }
.alternative-top strong { font-size: 1.15rem; font-weight: 450; color: var(--ink); }
.alternative-pieces { display: flex; height: 124px; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 17px; }
.alternative-pieces .thumbnail { width: 25%; height: 100%; }
.alternative-pieces .thumbnail:first-child { height: 64%; }
.alternative-pieces .thumbnail:nth-child(2) { height: 63%; }
.alternative-pieces .thumbnail:last-child { height: 40%; }
.alternative-pieces.has-look { height: 295px; margin: 14px 0 18px; }
.alternative:has(.has-look) { background: #f0ede8; }
.alternative-name { font-size: .875rem; font-weight: 500; line-height: 1.5; }
.alternative-description { font-size: .75rem; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.alternative-action { display: block; margin-top: 15px; font-size: .75rem; text-decoration: underline; text-underline-offset: 4px; }
.storage-notice { margin-top: 20px; font-size: .875rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
dialog { width: min(570px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper); color: var(--ink); max-height: calc(100dvh - 40px); overflow: auto; box-shadow: 0 20px 70px #20251f1a; }
dialog::backdrop { background: #24272055; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dialog-heading h2 { font-size: 1.4rem; font-weight: 450; }
.close-button { background: transparent; width: 36px; height: 36px; font-size: 1.8rem; border-radius: 50%; }
.piece-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.piece-option { padding: 16px; background: var(--studio); border: 1px solid transparent; border-radius: 14px; text-align: left; }
.piece-option[aria-pressed="true"] { border-color: var(--accent); }
.piece-option .thumbnail { width: 100%; height: 180px; margin-bottom: 18px; }
.piece-option strong { display: block; font-size: .875rem; line-height: 1.5; }
.piece-option > span:last-child { font-size: .75rem; color: var(--muted); display: block; margin-top: 8px; }
@media (min-width: 1550px) { .outfit-stage { aspect-ratio: .86; } }
@media (max-width: 1190px) and (min-width: 901px) {
  main { padding-left: 3%; padding-right: 3%; }
  .workspace { grid-template-columns: 180px minmax(320px, 1.6fr) minmax(215px, 1fr); column-gap: 20px; }
  .polo-option { grid-template-columns: 50px 1fr 12px; padding: 8px 6px; gap: 9px; }
  .thumbnail { width: 50px; }
  .studio-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (max-width: 900px) {
  .site-header { min-height: 75px; padding: 0 5%; }
  main { padding: 33px 5% 40px; }
  .workspace { grid-template-columns: minmax(0, 1.3fr) minmax(225px, 1fr); gap: 30px 24px; }
  .polo-panel { grid-column: 1 / -1; }
  .panel-note { display: none; }
  .polo-selector { display: flex; gap: 10px; overflow-x: auto; padding: 5px 4px 12px; margin: 15px -4px 0; scroll-snap-type: x proximity; }
  .polo-option { flex: 1 0 112px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; position: relative; scroll-snap-align: start; }
  .polo-option .thumbnail { width: 100%; height: 84px; }
  .polo-option .selection-dot { position: absolute; right: 10px; top: 10px; }
  .polo-name { font-size: .8125rem; }
  .studio-toolbar { flex-wrap: wrap; }
  .outfit-stage { aspect-ratio: .67; }
  .alternatives-section { grid-column: 1 / -1; margin-top: 3px; }
}
@media (max-width: 620px) {
  .site-header { min-height: 68px; }
  .wordmark { font-size: 1.15rem; }
  main { padding-top: 28px; }
  .workspace { display: flex; flex-direction: column; gap: 27px; }
  .polo-panel, .outfit-panel, .details-panel, .alternatives-section { width: 100%; }
  .polo-option { flex-basis: 104px; }
  .studio-toolbar { justify-content: space-between; gap: 8px; margin-bottom: 13px; }
  .view-switch button { padding: 8px; font-size: .75rem; }
  .outfit-figure { border-radius: 16px; }
  .outfit-stage { aspect-ratio: .69; }
  .outfit-stage[data-render="photographic"] { aspect-ratio: 2 / 3; height: auto; min-height: 0; }
  .outfit-stage[data-render="photographic"] > .look-composite { width: 100%; height: auto; }
  .details-panel { padding: 7px 0 0; }
  .score-block { margin-top: 18px; padding-bottom: 16px; }
  .score-block strong { font-size: 2.1rem; }
  .justification { font-size: 1rem; margin-bottom: 20px; }
  .selected-piece { padding: 18px 0; }
  .selected-piece strong { font-size: .9375rem; }
  .selected-piece .piece-label, .selected-piece .piece-detail, .selected-piece .change-label { font-size: .8125rem; }
  .score-details { font-size: .8125rem; }
  .alternatives-section { padding-top: 28px; margin-top: 4px; }
  .alternatives { grid-template-columns: 1fr; gap: 13px; }
  .alternative { padding: 21px; }
  .alternative-pieces { height: 150px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
