:root {
  --blue: #2f6ef6;
  --ink: #17181c;
  --muted: #8b8b92;
  --soft: #f2f3f5;
  --line: #eceef2;
  --nav: #1c1c1e;
  --shadow: 0 10px 28px rgba(22, 24, 32, 0.07);
  --pad: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100dvh;
  background: #fff;
  color: var(--ink);
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, textarea { font: inherit; color: inherit; }

button { cursor: pointer; touch-action: manipulation; }

img { max-width: 100%; display: block; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.stage:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

::selection { background: #d6e2ff; }

.app { min-height: 100dvh; background: #fff; }

.pad { padding: 18px var(--pad) calc(118px + env(safe-area-inset-bottom)); }

.brand {
  display: none;
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.top, .bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top h1, .bar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.bar { margin-bottom: 14px; }

.bar h1 {
  flex: 1;
  text-align: center;
  font-size: 17px;
}

.top-actions { margin-left: auto; display: flex; gap: 8px; }

.avatar, .avatar-lg {
  border-radius: 50%;
  object-fit: cover;
}

.avatar { width: 46px; height: 46px; }

.avatar-lg { width: 84px; height: 84px; }

.icon-btn, .add, .search-go {
  border: 0;
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
}

.icon-btn, .spacer {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.icon-btn { background: var(--soft); }

.icon-btn .i, .tabbar .i { width: 22px; height: 22px; }

.add .i, .search-go .i { width: 18px; height: 18px; }

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  display: grid;
  place-items: center;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  margin: 16px 0 8px;
  padding: 0 14px 0 6px;
  background: var(--soft);
  border-radius: 27px;
}

.search-go {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  outline: none;
}

.search input::placeholder { color: #a0a0a6; }

.cats {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 2px 12px;
  scrollbar-width: none;
}

.cats::-webkit-scrollbar { display: none; }

.cat {
  width: 68px;
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 0;
  text-align: center;
}

.cat img {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
  box-shadow: 0 6px 16px rgba(20, 24, 40, 0.08);
}

.cat span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #3a3a40;
}

.cat.on img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 0 12px;
}

.section-head h2, .buy-col h2, .empty h2, .profile h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.section-head button, .text-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
}

.text-link { color: var(--blue); font-weight: 700; padding: 8px; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card {
  background: #fff;
  border: 1px solid #f1f2f5;
  border-radius: 22px;
  padding: 8px 8px 12px;
  box-shadow: var(--shadow);
}

.shot-wrap { position: relative; }

.shot {
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  border-radius: 16px;
  background: #f6f7f8;
  overflow: hidden;
}

.shot img { width: 100%; height: 100%; object-fit: contain; }

.mini360 {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  border: 0;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  border-radius: 999px;
  padding: 5px 8px;
  box-shadow: 0 4px 12px rgba(16, 18, 24, 0.12);
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 6px 0;
}

.name-btn {
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
}

.name {
  display: block;
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.price, .money { font-variant-numeric: tabular-nums; }

.price {
  display: block;
  margin-top: 3px;
  color: #6f6f76;
  font-size: 13.5px;
}

.add {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--nav);
  color: #fff;
}

.add:active, .btn:active, .icon-btn:active { transform: scale(0.97); }

.news-teaser {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  border: 0;
  background: none;
  padding: 0;
  color: #5d6b86;
  font-size: 14px;
  text-align: left;
}

.faces { display: flex; flex: 0 0 auto; }

.face {
  width: 34px;
  height: 34px;
  margin-left: -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: #d9e4fb;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.faces .face:first-child { margin-left: 0; }

.face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.only-desk { display: none; }

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.eyebrow.dark { color: var(--muted); margin-bottom: 4px; }

.title-row, .price-row, .summary div, .menu-row, .stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.title-row { margin: 4px 0 8px; min-width: 0; }

.title-row h2 { min-width: 0; }

.title-row h2 { font-size: 26px; }

.blurb, .prose { line-height: 1.5; }

.blurb { margin: 0 0 16px; color: #3e3e44; overflow-wrap: anywhere; }

.sizes {
  display: flex;
  gap: 6px;
  width: 100%;
  min-width: 0;
  margin: 4px 0 16px;
}

.size {
  flex: 1 1 0;
  width: auto;
  max-width: 48px;
  height: 44px;
  min-width: 0;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  font-size: 12px;
  font-weight: 750;
  padding: 0;
}

.size.on { background: var(--nav); color: #fff; }

.cta-row { display: flex; gap: 10px; }

.btn {
  height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 750;
}

.cta-row .btn { flex: 1; }

.btn.buy { background: var(--blue); color: #fff; }

.btn.ghost { background: rgba(255, 255, 255, 0.38); color: #fff; }

.btn.ghost.dark { background: #eceef2; color: var(--ink); }

.extra-links { display: flex; gap: 8px; margin-top: 8px; }

.hero-shot {
  position: relative;
  border-radius: 24px;
  background: #f6f7f8;
  overflow: hidden;
  margin-bottom: 16px;
}

.hero-shot img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.heart.on { color: #e23b4a; }

.heart.on .i { fill: currentColor; }

.look {
  position: relative;
  min-height: 100dvh;
  background: #c8c9ce;
  overflow: hidden;
}

.look-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 18%;
}

.look::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(transparent, rgba(24, 28, 36, 0.38));
  pointer-events: none;
}

.overlay-top {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 0;
  color: #fff;
}

.overlay-top h1 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.look .icon-btn {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(16, 18, 24, 0.12);
}

.look-panel {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  padding: 16px 14px 14px;
  border-radius: 24px;
  color: #fff;
  text-align: center;
  background: rgba(132, 142, 156, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.look-panel h2 {
  margin: 2px 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.look-panel .price-row { margin-bottom: 12px; font-size: 14px; }

.look-panel .price-row b { font-size: 22px; }

.look-panel .size {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.look-panel .size.on { background: #fff; color: var(--ink); }

.spin {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(8px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  background: #fff;
}

.spin .bar { width: 100%; }

.stage {
  width: min(100%, 520px);
  height: min(56dvh, 620px);
  display: grid;
  place-items: center;
  perspective: 900px;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.stage:active { cursor: grabbing; }

.stage img {
  max-width: 92%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

.mark360 {
  position: relative;
  width: 132px;
  height: 132px;
  margin-top: 4px;
  color: var(--blue);
  display: grid;
  place-items: center;
}

.mark360 svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mark360 strong {
  position: relative;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.drag-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.drag-hint.gone { visibility: hidden; }

.spin-buy { width: min(220px, 70%); margin-top: 8px; }

.line {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.line .shot { width: 84px; aspect-ratio: auto; }

.line img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: var(--soft);
  border-radius: 16px;
}

.line > div:last-child { display: grid; justify-items: end; gap: 8px; }

.line h3 { margin: 0 0 4px; font-size: 15px; }

.muted, .line p, .profile .role { color: var(--muted); }

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
}

.remove {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 0;
  font-size: 13px;
}

.summary { display: grid; gap: 8px; margin: 16px 0; }

.summary .total { font-size: 18px; font-weight: 800; }

.stack { display: grid; gap: 12px; }

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input[type="text"], input[type="email"], textarea {
  width: 100%;
  border: 0;
  background: var(--soft);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--ink);
}

textarea { min-height: 96px; resize: vertical; }

.note { margin: 0; font-size: 13px; }

.profile { text-align: center; }

.profile .avatar-lg { margin: 8px auto 12px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.stat {
  flex-direction: column;
  gap: 2px;
  background: var(--soft);
  border-radius: 16px;
  padding: 12px 8px;
  border: 0;
}

.stat b { font-size: 18px; }

.stat span, .order li span { color: var(--muted); font-size: 12px; }

.menu { display: grid; text-align: left; }

.menu-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: 16px 2px;
  font-weight: 700;
}

.orders { list-style: none; margin: 8px 0 0; padding: 0; text-align: left; }

.orders li {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.news-list { display: grid; }

.news-row {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: 14px 0;
}

.news-row .face { width: 48px; height: 48px; margin: 0; }

.news-row h3 { margin: 0 0 4px; font-size: 16px; }

.kicker { margin: 0 0 8px; color: var(--muted); font-size: 13px; }

.related {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: left;
}

.related img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--soft);
  border-radius: 12px;
}

.empty {
  text-align: center;
  padding: 32px 12px;
}

.empty p { color: var(--muted); }

.empty .btn { min-width: 160px; }

.success-mark {
  width: 72px;
  height: 72px;
  margin: 12px auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-size: 32px;
}

.sheet-back {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 24, 0.4);
  z-index: 60;
}

.sheet {
  position: fixed;
  z-index: 61;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100%);
  max-height: min(80dvh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
}

.grab {
  width: 42px;
  height: 4px;
  margin: 4px auto 14px;
  border-radius: 99px;
  background: #dddfe4;
}

.sheet-head {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.sheet-head img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--soft);
  border-radius: 14px;
}

.sheet h2 { margin: 0; font-size: 18px; }

body.sheet-open { overflow: hidden; }

.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(108px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  background: var(--nav);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.tabbar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(280px, calc(100% - 48px));
  height: 64px;
  padding: 0 10px;
  border-radius: 32px;
  background: var(--nav);
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.tabbar button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
}

.tabbar button.on { background: var(--blue); }

.screen { animation: rise 0.35s ease; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.mark360 svg { animation: turn 8s linear infinite; }

@keyframes turn { to { transform: rotate(360deg); } }

@media (hover: hover) {
  .card { transition: transform 0.2s ease; }
  .card:hover { transform: translateY(-2px); }
}

@media (max-width: 360px) {
  :root { --pad: 14px; }
  .size { width: 38px; height: 38px; font-size: 11px; }
  .top h1 { font-size: 20px; }
}

@media (min-width: 960px) {
  body {
    padding: 24px;
    background-color: #e4e6eb;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
    background-size: 56px 56px;
  }

  .app {
    max-width: 1120px;
    margin: 0 auto;
    min-height: calc(100dvh - 48px);
    border-radius: 32px;
    overflow: clip;
    box-shadow: 0 24px 70px rgba(20, 24, 40, 0.12);
  }

  .app { position: relative; }

  .pad { padding: 96px 32px 48px; }

  .tabbar {
    position: absolute;
    top: 22px;
    right: 24px;
    bottom: auto;
    left: auto;
    transform: none;
    width: auto;
    height: 56px;
    z-index: 6;
  }

  .brand { display: block; }

  .top h1 { font-size: 28px; }

  .cat { width: 76px; }

  .cat img { width: 72px; height: 72px; }

  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.78fr);
    gap: 22px;
    align-items: start;
  }

  .only-desk { display: block; }

  .desktop-look { position: sticky; top: 24px; }

  .look-frame {
    position: relative;
    height: min(640px, calc(100dvh - 360px));
    min-height: 460px;
    border-radius: 28px;
    overflow: hidden;
    background: #c8c9ce;
    box-shadow: var(--shadow);
  }

  .look-frame .look-bg { position: absolute; }

  .look-frame::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48%;
    background: linear-gradient(transparent, rgba(24, 28, 36, 0.38));
    pointer-events: none;
  }

  .spin-strip {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
    padding: 8px 18px 8px 8px;
    background: var(--soft);
    border-radius: 24px;
  }

  .spin-strip .stage { height: 250px; }

  .grid.wide { grid-template-columns: repeat(3, 1fr); }

  .product {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    column-gap: 36px;
    align-items: start;
  }

  .product .bar { grid-column: 1 / -1; }

  .buy-col { position: sticky; top: 24px; }

  .narrow { max-width: 720px; margin: 0 auto; }

  .buy-col, .pad, .product { min-width: 0; max-width: 100%; }

  .app.route-look, .app.route-spin {
    background: transparent;
    box-shadow: none;
    overflow: visible;
    min-height: 0;
    display: flex;
    justify-content: center;
  }

  .app.route-look .look,
  .app.route-spin .spin {
    width: min(420px, 100%);
    min-height: calc(100dvh - 48px);
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(20, 24, 40, 0.16);
  }
}

@media (min-width: 1200px) {
  .grid.wide { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .screen, .mark360 svg, .card { animation: none; transition: none; }
}
