

@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-VF.woff2") format("woff2"), url("../assets/fonts/Manrope-VF.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }

:root {
  --mg-graphite: #FFFFFF;      
  --mg-graphite-2: #F3F4F6;    
  --mg-graphite-3: #FBF5C4;    
  --mg-line: #E1E4E9;          
  --mg-mist: #6E7480;          
  --mg-fog: #454A54;           
  --mg-paper: #16181D;         
  --mg-red: #F5E01E;           
  --mg-red-deep: #7A6A00;      
  --mg-on-red: #1C1C1B;        
  --overlay: rgba(17, 19, 24, .82);
  --mg-font: "Manrope", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --side: 272px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
body.dark {                    
  --mg-graphite: #111318;
  --mg-graphite-2: #1C1F26;
  --mg-graphite-3: #262A33;
  --mg-line: #2A2E37;
  --mg-mist: #A3A9B4;
  --mg-fog: #C9CDD4;
  --mg-paper: #EEF0F3;
}
body.dark { --mg-red-deep: #F5E01E; }   
body.dark .choice[aria-selected="true"] { background: #F5E01E; color: #1C1C1B; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--mg-graphite); color: var(--mg-paper); }
body { font: 400 14px/1.45 var(--mg-font); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mg-red-deep); outline-offset: 2px; }


.mod { height: 100vh; max-height: 620px; display: grid; grid-template-columns: minmax(0, 1fr) var(--side); }
.stage { position: relative; overflow: hidden; background: var(--mg-graphite-2); min-height: 0; }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.side { display: flex; flex-direction: column; gap: 14px; padding: 20px 18px 18px; border-left: 1px solid var(--mg-line); min-height: 0; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--mg-mist); font-size: 12.5px; }
.brand img { width: 18px; height: 18px; }
.side h1 { margin: 0; font-size: 21px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: var(--mg-paper); }
.hint { margin: 0; color: var(--mg-mist); font-size: 13px; }
.copy { margin: 0; color: var(--mg-fog); font-size: 13.5px; line-height: 1.45; }
.copy b { color: var(--mg-paper); font-weight: 600; }
.status { position: absolute; left: 10px; top: 10px; z-index: 5; background: #FFF4E5; color: #B4540A; border-radius: 6px; font-size: 11px; padding: 4px 7px; }
html[data-final] .status { display: none; }


.choices { display: grid; gap: 1px; align-content: start; min-height: 0; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; min-height: 34px;
  padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; color: var(--mg-fog); font-size: 14px; }
.choice:hover { background: var(--mg-graphite-3); color: var(--mg-paper); }
.choice[aria-selected="true"], .choice[aria-pressed="true"] { background: var(--mg-graphite-3); color: var(--mg-paper); font-weight: 650; }
.choice .n { font-size: 12px; color: var(--mg-mist); font-variant-numeric: tabular-nums; min-width: 1.2em; }
.choice small { display: block; color: var(--mg-mist); font-size: 12px; font-weight: 400; }
.fam { color: var(--mg-mist); font-size: 11.5px; margin: 6px 0 1px 10px; }
#look-list { overflow-y: auto; scrollbar-width: thin; }
#look-list .choice { min-height: 31px; padding: 3px 8px; }
.fam:first-child { margin-top: 0; }


.xfade img { opacity: 0; transition: opacity .4s var(--ease); }
.xfade img.on { opacity: 1; }


.look-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 5px; }
.now { position: absolute; left: 12px; bottom: 12px; z-index: 3; background: var(--overlay); color: #fff; border-radius: 8px; padding: 7px 11px; font-weight: 650; font-size: 14px; }
.now small { display: block; color: #A3A9B4; font-weight: 400; font-size: 11.5px; }


.compare { --split: 50%; touch-action: pan-y; }
.compare .after { clip-path: inset(0 0 0 var(--split)); }
.compare .divider { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.18); z-index: 3; pointer-events: none; }
.compare .knob { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; background: #fff; color: #16181D; border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.25); display: grid; place-items: center; }
.compare .knob svg { width: 18px; height: 18px; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 4; }
.compare input:focus-visible ~ .divider .knob { outline: 2px solid var(--mg-red-deep); outline-offset: 3px; }
.side-tag { position: absolute; bottom: 12px; z-index: 3; background: var(--overlay); color: #fff; border-radius: 6px; padding: 5px 9px; font-size: 12.5px; font-weight: 600; }
.side-tag.l { left: 12px; } .side-tag.r { right: 12px; }
.path { color: var(--mg-mist); font-size: 12px; }


.play { display: inline-flex; align-items: center; gap: 8px; align-self: start; min-height: 36px; padding: 6px 16px; border: 0; border-radius: 999px;
  background: var(--mg-red); color: var(--mg-on-red); cursor: pointer; font-weight: 650; }
.play:hover { background: #E9D40F; }
.play svg { width: 12px; height: 12px; fill: var(--mg-on-red); }
.layer-sw { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); display: inline-block; margin-right: 8px; vertical-align: -1px; }


.zoom img { width: auto; height: auto; inset: auto; object-fit: initial; transform-origin: 0 0; transition: transform .55s var(--ease); max-width: none; }
.ring { position: absolute; z-index: 3; border: 2px solid var(--mg-red); border-radius: 10px; box-shadow: 0 0 0 1.5px #1C1C1B, inset 0 0 0 1px #1C1C1B, 0 0 0 9999px rgba(17,19,24,var(--dim, .38));
  transition: left .55s var(--ease), top .55s var(--ease), width .55s var(--ease), height .55s var(--ease); pointer-events: none; }


.scrub { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; color: var(--mg-mist); font-size: 12.5px; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; background: transparent; margin: 0; cursor: pointer; --p: 0%; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--mg-red) var(--p), var(--mg-line) var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 2px solid var(--mg-red-deep); }
.range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--mg-line); }
.range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--mg-red); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--mg-red-deep); }
.range:focus-visible { outline: 2px solid var(--mg-red-deep); outline-offset: 4px; }


@media (max-width: 520px) {
  .mod { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--stage-h, 300px) minmax(0, 1fr); }
  .side { border-left: 0; border-top: 1px solid var(--mg-line); padding: 12px 14px; gap: 10px; }
  .side h1 { font-size: 17px; }
  .brand { display: none; }
  .choices.row-sm { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .choices.row-sm .fam { display: none; }
  .choices.grid-sm { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 4px; }
  .choices.grid-sm .choice { border-bottom: 0; padding: 6px 8px; font-size: 13px; min-height: 36px; }
  .choices.grid-sm .choice small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .xfade img, .zoom img, .ring { transition: none; }
}


.choice[aria-selected="true"], .choice[aria-pressed="true"] { background: var(--mg-red); color: var(--mg-on-red); }
.choice[aria-selected="true"] .n, .choice[aria-selected="true"] small,
.choice[aria-pressed="true"] .n, .choice[aria-pressed="true"] small { color: var(--mg-on-red); }


@media (max-width: 480px) {
  #layer-list.grid-sm { --cols: 2 !important; }
  #layer-list .choice { min-height: 32px; padding: 4px 8px; }
}

@media (max-width: 520px) {
  .side .choices.grid-sm { flex-shrink: 0; }
  .side { overflow-y: auto; scrollbar-width: thin; }
}

@media (max-width: 520px) {
  .choices.row-sm.two-rows { grid-auto-flow: column; grid-template-rows: auto auto; }
}


.mod.solo { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); max-height: none; }
@media (max-width: 520px) { .mod.solo { grid-template-rows: minmax(0, 1fr); } }
.parts img { object-position: 50% 50%; }
.compare.anim .after { transition: clip-path .9s var(--ease); }
.compare.anim .divider { transition: left .9s var(--ease); }
.drag-hint { position: absolute; left: var(--split); bottom: 12px; transform: translateX(-50%); z-index: 4; background: var(--mg-red); color: var(--mg-on-red);
  border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 650; pointer-events: none; transition: opacity .3s; white-space: nowrap; }
.drag-hint.gone { opacity: 0; }
@media (max-width: 520px) { .side-tag { font-size: 11.5px; padding: 4px 7px; bottom: 10px; } .side-tag.l { left: 10px; } .side-tag.r { right: 10px; } }


.ui-mod { position: relative; height: 100vh; max-height: 620px; overflow: hidden; background: var(--mg-graphite-2); }
.ui-mod .stage { position: absolute; inset: 0; }
.ui-mod .stage img { object-position: 0% 50%; }
.sidebar { position: absolute; z-index: 4; top: 12px; right: 12px; max-height: calc(100% - 24px); width: var(--panel-w, 330px); overflow-y: auto; overflow-x: hidden;
  border-radius: 10px; background: #3D3D3D; box-shadow: 0 12px 36px rgba(17,19,24,.35), 0 0 0 1px rgba(0,0,0,.35); scrollbar-width: thin; scrollbar-color: #5a5a5a #3D3D3D; }
.sidebar .pane { position: relative; display: none; }
.sidebar .pane.on { display: block; }
.sidebar .pane > img { position: static; display: block; width: 100%; height: auto; }
.hot { position: absolute; z-index: 2; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; border-radius: 6px; }
.hot:hover { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1.5px rgba(245,224,30,.85); }
.hot:focus-visible { outline: 2px solid var(--mg-red); outline-offset: 1px; }
.hot.pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 8px; border: 2px solid var(--mg-red); animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 0% { opacity: .95; transform: scale(.96); } 70% { opacity: 0; transform: scale(1.12); } 100% { opacity: 0; } }
.ui-hint { position: absolute; z-index: 3; left: 12px; top: 12px; max-width: calc(100% - var(--panel-w, 330px) - 48px); background: var(--overlay); color: #fff;
  border-radius: 8px; padding: 8px 11px; font-size: 13px; line-height: 1.35; }
.ui-hint b { color: var(--mg-red); font-weight: 650; }
.ui-now { position: absolute; z-index: 3; left: 12px; bottom: 12px; background: #fff; color: var(--mg-paper); border-radius: 8px; padding: 7px 11px;
  font-size: 13.5px; font-weight: 650; box-shadow: 0 2px 10px rgba(0,0,0,.18); max-width: calc(100% - var(--panel-w, 330px) - 48px); }
.ui-now small { display: block; color: var(--mg-mist); font-weight: 500; font-size: 11.5px; }
@media (max-width: 520px) {
  .ui-mod .stage { bottom: auto; height: var(--stage-h, 250px); }
  .ui-mod .stage img { object-position: 30% 50%; }
  .sidebar { top: calc(var(--stage-h, 250px) + 10px); left: 50%; right: auto; transform: translateX(-50%); width: min(330px, calc(100% - 20px)); max-height: calc(100% - var(--stage-h, 250px) - 20px); }
  .ui-hint { max-width: calc(100% - 24px); font-size: 12px; padding: 6px 9px; top: 8px; left: 8px; }
  .ui-now { max-width: calc(100% - 24px); left: 8px; bottom: auto; top: calc(var(--stage-h, 250px) - 44px); font-size: 12.5px; padding: 5px 9px; }
  .ui-now small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hot.pulse::after { animation: none; } }
.compare.anim .drag-hint { transition: left .9s var(--ease), opacity .3s; }
@media (max-width: 520px) { .drag-hint { bottom: auto; top: 12px; } }


.hot { box-shadow: inset 0 0 0 1.5px rgba(245,224,30,.7); }
.hot:hover { background: rgba(245,224,30,.16); box-shadow: inset 0 0 0 2px #F5E01E; }

.ui-hint b { color: #F5E01E; }


@media (min-width: 521px) and (max-width: 900px) {
  .mod { max-height: none; }
  .mod:not(.solo) { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr) auto; row-gap: 10px; column-gap: 12px; }
  .mod:not(.solo) > .side { display: contents; }
  .mod:not(.solo) .stage { grid-column: 1 / -1; grid-row: 3; border-radius: 10px; }
  .side h1 { grid-column: 1; grid-row: 1; align-self: center; font-size: 19px; }
  .side .choices { grid-column: 1 / -1; grid-row: 2; gap: 4px; }
  .side .copy { grid-column: 1 / -1; grid-row: 4; }
}
