:root { --font: "Inter", "Helvetica Neue", Arial, sans-serif; --line: rgba(255,255,255,.26); --glass: rgba(255,255,255,.09); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; font-family: var(--font); color: #fff; background: #6f6a63; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; }
.shade { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 40%, rgba(0,0,0,.25) 100%); pointer-events: none; }

.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 8px 30px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.12); }

/* model */
.stage { position: fixed; left: 50%; bottom: 13vh; transform: translateX(-50%); height: 76vh; aspect-ratio: 200 / 520; }
.figure { position: absolute; inset: 0; }
.figure svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wipe { position: absolute; left: -25%; right: -25%; height: 2px; top: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); box-shadow: 0 0 18px 6px rgba(255,255,255,.35); }
.floor-shadow { position: absolute; left: 12%; right: 12%; bottom: -1.2%; height: 3.5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.35), transparent); filter: blur(3px); }

/* top */
.top { position: fixed; top: 14px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; z-index: 3; }
.brand { display: flex; align-items: baseline; gap: 14px; }
.brand b { font-size: 26px; letter-spacing: .12em; font-weight: 800; }
.brand span { font-size: 10px; letter-spacing: .2em; opacity: .8; }
.tabs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; position: absolute; left: 50%; transform: translateX(-50%); }
.tabs button { background: none; border: 1px solid transparent; border-radius: 999px; padding: 7px 20px; font-size: 11px; letter-spacing: .14em; opacity: .75; }
.tabs button.on { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.1); opacity: 1; }
.icons { display: flex; gap: 8px; }
.round { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; filter: grayscale(1); }

/* left */
.left { position: fixed; left: 18px; top: 70px; width: 230px; display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.profile { display: flex; gap: 10px; align-items: center; padding: 10px; }
.avatar { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.15); flex: none; }
.avatar svg { width: 100%; height: 100%; }
.name { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.mini { background: rgba(255,255,255,.12); border: 0; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; }
.meta { font-size: 10px; opacity: .75; margin-top: 3px; }
.menu { display: flex; flex-direction: column; padding: 6px; width: 132px; }
.menu button { background: none; border: 1px solid transparent; text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 12px; opacity: .85; }
.menu button.on { border-color: var(--line); background: rgba(255,255,255,.12); opacity: 1; }
.menu button span { margin-left: 4px; }
.pill { border-radius: 10px; padding: 9px 12px; font-size: 12px; text-align: left; width: 190px; }
.realism { padding: 10px 12px; font-size: 11px; display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.realism input { grid-column: 1 / -1; width: 100%; accent-color: #fff; }
.realism .ends { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 9px; opacity: .7; }

/* bottom */
.bottom { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 3; }
.tools { display: flex; gap: 4px; padding: 4px; border-radius: 12px; }
.tools button { background: none; border: 1px solid transparent; border-radius: 9px; padding: 7px 18px; font-size: 12px; opacity: .85; }
.tools button.on { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.12); opacity: 1; }
.tools button:disabled { opacity: .35; cursor: default; }
.filters { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.filter { display: flex; flex-direction: column; font-size: 10px; gap: 3px; }
.filter select { background: rgba(255,255,255,.1); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-size: 11px; }
.filter option { color: #222; }
.faces { display: flex; gap: 6px; }
.faces button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); padding: 0; overflow: hidden; background: rgba(255,255,255,.12); }
.faces button[aria-checked="true"] { border: 2px solid #fff; }
.faces svg { width: 100%; height: 100%; }
.next { background: none; border: 0; font-size: 22px; }

/* right */
.right { position: fixed; right: 18px; top: 70px; bottom: 14px; width: min(330px, 28vw); padding: 12px; display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.rhead { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .14em; }
.rhead span { opacity: .7; letter-spacing: 0; }
.cats { display: flex; justify-content: space-between; }
.cats button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 8px; opacity: .8; }
.cats i { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: 13px; background: rgba(255,255,255,.06); }
.cats button[aria-selected="true"] { opacity: 1; } .cats button[aria-selected="true"] i { background: rgba(255,255,255,.22); border-color: #fff; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grid button { aspect-ratio: 3 / 4.4; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.14); padding: 2px; transition: transform .15s; }
.grid button:hover { transform: translateY(-2px); }
.grid button[aria-selected="true"] { border: 2px solid #fff; background: rgba(255,255,255,.26); }
.grid svg { width: 100%; height: 100%; }
.rows { display: flex; flex-direction: column; gap: 5px; overflow: auto; min-height: 0; }
.rows details { border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.05); }
.rows summary { list-style: none; padding: 8px 10px; font-size: 10px; letter-spacing: .12em; cursor: pointer; display: flex; justify-content: space-between; }
.rows summary::after { content: "⌄"; } .rows details[open] summary::after { content: "⌃"; }
.rows summary::-webkit-details-marker { display: none; }
.rows ul { margin: 0; padding: 0 10px 8px 22px; font-size: 11px; opacity: .85; }
.save { margin-top: auto; border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.12); border-radius: 10px; padding: 11px; font-size: 11px; letter-spacing: .16em; }
.toast { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); background: rgba(0,0,0,.55); padding: 8px 14px; border-radius: 999px; font-size: 12px; opacity: 0; transition: opacity .3s; z-index: 9; }
.toast.on { opacity: 1; }

@media (max-width: 900px) {
  /* tablet / phone: tabs get their own row, the left panel shrinks to one row, outfits become a bottom sheet */
  :root { --sheet: 290px; }
  .top { flex-wrap: wrap; row-gap: 8px; left: 10px; right: 10px; top: 10px; }
  .brand span { display: none; }
  .icons { gap: 6px; } .round { width: 32px; height: 32px; font-size: 12px; }
  .tabs { position: static; transform: none; order: 3; width: 100%; overflow-x: auto; justify-content: space-between; }
  .tabs button { padding: 6px 10px; font-size: 10px; flex: none; }
  .left { top: 108px; left: 10px; right: 10px; width: auto; flex-direction: row; flex-wrap: wrap; align-items: stretch; }
  .menu, .profile .meta, .realism .ends { display: none; }
  .profile { padding: 6px 10px 6px 6px; } .avatar { width: 36px; height: 36px; }
  .pill { width: auto; }
  .realism { width: 160px; padding: 6px 10px; }
  .right { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; height: var(--sheet); }
  .rows { display: none; }
  .grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84px; overflow-x: auto; padding-bottom: 4px; }
  .save { margin-top: 0; }
  .bottom { bottom: calc(var(--sheet) + 18px); }
  .stage { top: 170px; bottom: calc(var(--sheet) + 120px); height: auto; }
}
@media (max-width: 520px) {
  .filters, .realism { display: none; }
  .stage { bottom: calc(var(--sheet) + 66px); }
  .tools button { padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) { .grid button { transition: none; } }
