/* Runnista feed: full-screen products, dark like Reels/TikTok. Mobile first;
   from 900px the photo and its details sit side by side. */
/* Names and the wordmark: Barlow Condensed (SIL Open Font License, fonts/OFL.txt), self-hosted */
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url(fonts/barlow-condensed-800.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: italic; font-weight: 800; font-display: swap; src: url(fonts/barlow-condensed-800-italic.woff2) format('woff2'); }

:root {
  --bg: #000;
  --panel: #0f0f11;
  --surface: #1c1c1f;
  --surface-2: #2a2a2e;
  --line: rgb(255 255 255 / .12);
  --text: #f5f5f4;
  --muted: #a1a1a8;
  --accent: #7c9fff;
  --sale: #ff6b5e;
  --heart: #ff3b5c;
  --on-light: #0b0b0c;
  --photo-bg: #f4f4f2; /* product shots are on white or light grey: their edges fade into this */
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --bar-h: calc(64px + env(safe-area-inset-bottom));
  --safe-top: env(safe-area-inset-top);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; overscroll-behavior: none; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
p { margin: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- Feed: vertical snap, one product per screen ---------- */
.feed {
  position: fixed; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100%; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }

/* Horizontal snap inside each slide: photo, then details */
.pager {
  display: flex; height: 100%;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.pager::-webkit-scrollbar { display: none; }
.pager.dragging { scroll-snap-type: none; cursor: grabbing; }
.pane { flex: 0 0 100%; height: 100%; position: relative; scroll-snap-align: start; }

/* ---------- Photos: a carousel, the main one first ---------- */
/* The background is a light tint of the product's colour (--tint, set per slide in feed.js).
   Packshots are on white: multiplied onto the tint, their white becomes the tint, so a pink shoe
   sits on pink. A photo of the product being worn (.worn, its first photo) stays as it is. */
.media { overflow: hidden; background: var(--tint, var(--photo-bg)); transition: background-color .35s ease; user-select: none; -webkit-user-select: none; }
.shots {
  position: absolute; inset: 0; /* no z-index: the photos blend with .media's background */
  display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
  touch-action: manipulation; /* double-tap is ♥, not zoom */
}
.shots::-webkit-scrollbar { display: none; }
.shots.dragging { scroll-snap-type: none; cursor: grabbing; }
.shot {
  position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; padding: calc(36px + var(--safe-top)) 0 96px;
  display: flex; align-items: center; justify-content: center; -webkit-user-drag: none;
}
.shot img { mix-blend-mode: multiply; }
.worn .shot:first-child img { mix-blend-mode: normal; }
.shot-dots {
  position: absolute; z-index: 3; top: calc(20px + var(--safe-top)); left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; padding: 4px 7px; border-radius: 999px; background: rgb(0 0 0 / .28); pointer-events: none;
}
.shot-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgb(255 255 255 / .5); transition: background .2s; }
.shot-dots i.on { background: #fff; }

/* Double-tap ♥ */
.burst { position: absolute; z-index: 5; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none; animation: burst .8s ease-out forwards; }
.burst svg { width: 100%; height: 100%; fill: #fff; stroke: none; filter: drop-shadow(0 4px 14px rgb(0 0 0 / .35)); }
@keyframes burst { 0% { transform: scale(.2); opacity: 0; } 15% { transform: scale(1.15); opacity: 1; } 30% { transform: scale(.95); } 45%, 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.1) translateY(-40px); opacity: 0; } }
.shot img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; -webkit-user-drag: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 3.5%, #000 96.5%, transparent), linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 3.5%, #000 96.5%, transparent), linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  mask-composite: intersect;
}
.shot:has(.fill) { padding: 0; }
.shot img.fill { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; -webkit-mask-image: none; mask-image: none; }
.media.no-img .shot::after { content: 'No photo'; position: absolute; inset: 0; display: grid; place-items: center; color: #777; }
.media::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgb(0 0 0 / .82), rgb(0 0 0 / .55) 50%, rgb(0 0 0 / .12) 80%, transparent);
}

.wordmark {
  position: absolute; z-index: 3; top: calc(12px + var(--safe-top)); left: 12px;
  padding: 2px 12px 3px; border-radius: 999px; font: italic 800 19px/1.2 var(--display); letter-spacing: -.01em;
  background: rgb(0 0 0 / .4); color: #fff; text-decoration: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* Pull tab on the right edge: tap or drag for details */
.peek {
  position: absolute; z-index: 3; right: 0; top: 50%; transform: translateY(-50%);
  width: 30px; height: 76px; padding: 0; border: 0; border-radius: 16px 0 0 16px;
  display: grid; place-items: center; cursor: pointer;
  background: rgb(0 0 0 / .38); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.peek svg { width: 20px; height: 20px; }

/* First visit: nudge the photo so the details peek in */
.coach {
  position: absolute; z-index: 3; right: 40px; top: 50%; transform: translateY(-50%);
  padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: #fff; color: var(--on-light); box-shadow: 0 6px 24px rgb(0 0 0 / .3);
  animation: coach 6s ease forwards; pointer-events: none;
}
.slide:not(.hint) .coach { display: none; }
.slide.hint .pane { animation: nudge 1.6s cubic-bezier(.4, 0, .2, 1) 1s 2; }
@keyframes nudge { 0%, 100% { transform: none; } 45%, 60% { transform: translateX(-64px); } }
@keyframes coach { 0% { opacity: 0; } 8%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* Caption over the photo */
.caption {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: var(--bar-h);
  padding: 0 72px 10px 16px; color: #fff; pointer-events: none;
  text-shadow: 0 1px 3px rgb(0 0 0 / .45);
  display: flex; flex-direction: column; gap: 4px;
}
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; opacity: .95; }
.store-tag {
  padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  background: rgb(255 255 255 / .2); text-shadow: none;
}
.title { margin: 0; font: 800 29px/1 var(--display); letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-size: 17px; font-weight: 750; }
.price.sale { color: #ff8a7f; }
.price-row s { opacity: .7; font-size: 14px; }
.off { padding: 1px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--sale); color: #fff; text-shadow: none; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 13px; min-width: 0; }
.meta .stock { opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.meta .stock b { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.match { color: #c9d7ff; white-space: nowrap; }
.meta .colour { white-space: nowrap; font-weight: 600; }
.for::before { content: '·'; margin-right: 8px; opacity: .8; }

/* Shop now, on the photo */
.buy {
  align-self: flex-start; margin-top: 6px; pointer-events: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--on-light); text-decoration: none; text-shadow: none;
  font-size: 15px; font-weight: 750; box-shadow: 0 4px 16px rgb(0 0 0 / .25);
}
.buy svg { width: 17px; height: 17px; }
.buy:active { transform: scale(.97); }

.dots { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / .8); flex: none; }
.dot.hit { box-shadow: 0 0 0 2px var(--accent); }
.dots .more { font-size: 12px; opacity: .8; }

/* ---------- Footer = navigation ---------- */
.bar {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: var(--bar-h);
  padding: 8px 8px env(safe-area-inset-bottom);
  display: flex; align-items: center; gap: 4px;
  border-top: 1px solid rgb(255 255 255 / .14);
  background: rgb(0 0 0 / .42); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.menu {
  width: 42px; height: 46px; flex: none; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 12px; background: transparent; color: #fff; cursor: pointer;
}
.menu svg { width: 26px; height: 26px; }
.menu:active, .pill:active { transform: scale(.96); }
.pill {
  flex: 1 1 auto; min-width: 0; height: 38px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid rgb(255 255 255 / .22); border-radius: 999px; cursor: pointer;
  background: rgb(255 255 255 / .1); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: -.005em;
}
.pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.on { background: #fff; color: var(--on-light); border-color: #fff; }
.pill .strip { display: inline-flex; width: 14px; height: 14px; border-radius: 50%; overflow: hidden; flex: none; }
.pill .strip i { flex: 1; }
/* ♥ before Colours: saved products, with a count */
.saved-btn {
  position: relative; width: 42px; height: 46px; flex: none; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 12px; background: transparent; color: #fff; cursor: pointer;
}
.saved-btn .heart { width: 25px; height: 25px; }
.saved-btn.on .heart { fill: var(--heart); stroke: var(--heart); }
.saved-btn .count {
  position: absolute; top: 4px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #fff; color: var(--on-light); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.saved-btn:active { transform: scale(.96); }

/* ♥ on the photo and in the details */
.save {
  position: absolute; z-index: 4; right: 10px; bottom: calc(var(--bar-h) + 12px);
  width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgb(0 0 0 / .32); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.save .heart { width: 28px; height: 28px; transition: transform .2s ease; }
.save[aria-pressed=true] .heart { fill: var(--heart); stroke: var(--heart); animation: pop .3s ease; }
.save.small { position: static; width: 40px; height: 40px; background: var(--surface); backdrop-filter: none; }
.save.small .heart { width: 22px; height: 22px; }
@keyframes pop { 50% { transform: scale(1.25); } }

/* Share, above the ♥ */
.share {
  position: absolute; z-index: 4; right: 10px; bottom: calc(var(--bar-h) + 72px);
  width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgb(0 0 0 / .32); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.share svg { width: 24px; height: 24px; }
.toast {
  position: fixed; z-index: 20; left: 50%; top: calc(16px + var(--safe-top)); transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: #fff; color: var(--on-light); box-shadow: 0 6px 24px rgb(0 0 0 / .3);
}

/* ---------- Details ---------- */
.info {
  background: var(--panel); overflow-y: auto; overscroll-behavior: contain;
  padding: calc(10px + var(--safe-top)) 18px calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px;
}
.info-top { display: flex; justify-content: space-between; align-items: center; margin: 0 -6px 4px; }
.back {
  display: inline-flex; align-items: center; gap: 2px; padding: 8px 12px 8px 6px;
  border: 0; border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 600;
}
.back svg { width: 18px; height: 18px; }
.info .who { color: var(--muted); }
.info .store-tag { background: var(--surface-2); color: var(--text); }
.info-title { margin: 0; font: 800 32px/1 var(--display); }
.price-row.big .price { font-size: 22px; }
.price-row.big .price.sale { color: var(--sale); }
.price-row.big s { color: var(--muted); opacity: 1; }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1px solid transparent;
  background: #fff; color: var(--on-light); font-weight: 750; text-decoration: none; text-align: center; cursor: pointer;
}
.cta svg { width: 18px; height: 18px; }
.cta.ghost { background: var(--surface); color: var(--text); border-color: var(--line); font-weight: 650; }
.cta[aria-disabled=true] { opacity: .55; cursor: default; }
.info section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.info h3 { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.colour-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.note { font-size: 12.5px; color: var(--muted); }
.vote { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.vote span { margin-right: auto; color: var(--muted); }
.vote button { width: 46px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; filter: grayscale(1); opacity: .7; }
.vote button[aria-pressed=true] { filter: none; opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size {
  min-width: 48px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-size: 14px; text-align: center;
}
button.size { cursor: pointer; }
.size.out, .size[disabled] { opacity: .4; text-decoration: line-through; cursor: default; }
.size.mine { border-color: var(--accent); }
.size[aria-pressed=true] { background: #fff; color: var(--on-light); border-color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 10px; border-radius: 999px; background: var(--surface); font-size: 13px; }
.details { display: contents; }
.materials { font-size: 14px; }
.desc { white-space: pre-line; font-size: 14.5px; line-height: 1.55; color: #dcdcdf; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos a { aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: #fff; -webkit-user-drag: none; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.history { font-size: 13px; color: var(--muted); }
.history svg { width: 100%; height: 60px; display: block; margin-bottom: 4px; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.links .cta { min-height: 46px; font-size: 14px; white-space: nowrap; padding: 10px; }
.next {
  margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600;
}

/* ---------- End / empty ---------- */
.slide.end { display: grid; place-items: center; padding: 24px 20px; background: radial-gradient(circle at 50% 30%, #1d2233, #000 70%); }
.end-card { display: flex; flex-direction: column; gap: 12px; width: min(360px, 100%); text-align: center; }
.end-card .big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--text); margin: 0; }
.end-card p { color: var(--muted); margin-bottom: 8px; }
.classic { color: var(--muted); font-size: 14px; text-align: center; margin-top: 4px; }

/* ---------- Loading ---------- */
.loading { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
/* The build's pre-rendered first products (data-pre) stand in for the spinner, unless you have
   your own filters (html.custom, set in index.html): then they're the wrong products. */
html:not(.custom) .feed:has(> [data-pre]) ~ .loading, .custom [data-pre] { display: none; }
html:not(.no-intro) .feed:has(> .intro) ~ .loading, .no-intro .intro { display: none; }

/* ---------- Opening card (before the first product, until you've swiped past it) ---------- */
.slide.intro {
  display: grid; place-items: center; overflow-y: auto;
  padding: calc(20px + var(--safe-top)) 20px calc(20px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 70% at 15% 0%, #ff3b5c55, transparent 60%), radial-gradient(110% 70% at 100% 100%, #7c9fff55, transparent 60%), #000;
}
.intro-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 22px; }
.intro-mark { margin: 0; font: italic 800 26px/1 var(--display); }
.intro-head { margin: 0; font: 800 clamp(44px, 13vw, 60px)/.95 var(--display); text-transform: uppercase; }
.intro-head > span { display: block; }
.intro-q { display: flex; flex-direction: column; gap: 10px; }
.intro-q h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.intro-q .muted { text-transform: none; letter-spacing: 0; }
.intro .seg { display: flex; }
.intro .seg button { flex: 1; padding: 11px 8px; font-size: 15px; color: var(--text); }
.intro-seasons { display: flex; flex-direction: column; gap: 6px; }
.intro-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.intro-season {
  display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; border: 1.5px solid transparent; border-radius: 12px;
  background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 600; text-align: left; cursor: pointer;
}
.intro-season .strip { display: flex; height: 16px; border-radius: 6px; overflow: hidden; }
.intro-season .strip i { flex: 1; }
.intro-season[aria-pressed=true] { border-color: #fff; background: var(--surface-2); }
.intro-link { color: var(--muted); font-size: 13px; text-underline-offset: 3px; }
.intro-go {
  align-self: center; display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 18px; border: 0; background: none; color: var(--text); font-size: 15px; font-weight: 700; cursor: pointer;
}
.intro-go svg { width: 26px; height: 26px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .intro-go svg { animation: none; } }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons, chips ---------- */
.btn { min-height: 48px; padding: 0 18px; border: 0; border-radius: 14px; font-weight: 700; cursor: pointer; }
.btn.primary { background: #fff; color: var(--on-light); }
.btn.ghost { background: var(--surface); color: var(--text); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-align: left; }
.icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--surface); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px;
}
.chip .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed=true] { background: #fff; color: var(--on-light); border-color: #fff; }
.chip[aria-pressed=true] .n { color: rgb(0 0 0 / .55); }
.chip .dot { width: 14px; height: 14px; border-color: rgb(255 255 255 / .35); }
.chip.ex[aria-pressed=true] { background: var(--surface); color: var(--muted); border-color: var(--sale); text-decoration: line-through; text-decoration-color: var(--sale); }
/* Store chips are checkboxes, all on by default: a tick when on, struck through when off. */
.chip.check[aria-pressed=true]::before { content: '✓'; font-weight: 700; }
.chip.check[aria-pressed=false] { color: var(--muted); text-decoration: line-through; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.group-head .link { font-size: 13.5px; }
.chip.ex[aria-pressed=true] .dot { opacity: .45; }
.sizes-pick .chip { min-width: 54px; justify-content: center; padding: 0 10px; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface); }
.seg button { padding: 8px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg button[aria-pressed=true] { background: #fff; color: var(--on-light); }

/* ---------- Navigation layer (bottom sheet) ---------- */
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; padding: 0;
  width: 100%; max-width: 640px; height: min(88dvh, 820px); max-height: none;
  border: 0; border-radius: 22px 22px 0 0; background: var(--panel); color: var(--text);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 -10px 40px rgb(0 0 0 / .5);
  transition: transform .22s ease;
}
.sheet:not([open]) { display: none; }
.sheet[open] { animation: sheet-up .32s cubic-bezier(.2, .9, .25, 1); }
.sheet[open]::backdrop { background: rgb(0 0 0 / .55); animation: fade .3s ease; }
.sheet.dragging { transition: none; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-grab { display: grid; place-items: center; height: 22px; flex: none; touch-action: none; cursor: grab; }
.sheet-grab i { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-2); }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 0 14px 12px; flex: none; touch-action: none; }
.tabs { flex: 1; display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface); }
.tabs button { flex: 1; min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 650; cursor: pointer; }
.tabs button[aria-selected=true] { background: #fff; color: var(--on-light); }
.tabs #tab-saved { flex: 0 0 48px; display: grid; place-items: center; }
.tabs #tab-saved svg { width: 20px; height: 20px; }
.tabs #tab-saved[aria-selected=true] svg { fill: var(--heart); stroke: var(--heart); }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 24px; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.sheet-foot .primary { flex: 1; }

.group { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.group:last-of-type { border-bottom: 0; }
.group h3 { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.hint { font-size: 13.5px; color: var(--muted); }
.family { display: flex; flex-direction: column; gap: 6px; }
.family-name { font-size: 13px; font-weight: 650; }
.seasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.season { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; }
.season .strip { display: flex; height: 34px; }
.season .strip i { flex: 1; }
.season .name { padding: 6px 4px; font-size: 12.5px; text-align: center; }
.season[aria-pressed=true] { border-color: #fff; box-shadow: 0 0 0 2px #fff; }
.season[aria-pressed=true] .name { font-weight: 750; }
.options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.toggle input { width: 20px; height: 20px; accent-color: #fff; }
.dept { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.dept h4 { margin: 0; font-size: 14px; font-weight: 700; }
.feedback { font-size: 14px; gap: 6px; }
.sheet-body > .classic { display: block; margin-top: 14px; }
.sheet-foot [hidden] { display: none; }

/* Saved tab */
.saved-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.saved-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.saved-row:last-child { border-bottom: 0; }
.saved-link { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.saved-link img { width: 64px; height: 80px; flex: none; border-radius: 10px; object-fit: cover; background: var(--photo-bg); }
.saved-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.saved-text .who { color: var(--muted); font-size: 12px; }
.saved-text .store-tag { background: var(--surface-2); color: var(--text); font-size: 10px; }
.saved-title { font-weight: 650; font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.saved-price { font-size: 14px; font-weight: 700; }
.saved-price.sale { color: var(--sale); }
.saved-price s { color: var(--muted); font-weight: 400; font-size: 13px; }
.saved-price em { color: var(--muted); font-style: normal; font-weight: 500; }
.saved-row.gone img { opacity: .5; }
.saved-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.saved-actions .link { font-size: 12.5px; }
.empty-saved { align-items: center; text-align: center; padding-top: 40px; }
.big-heart svg { width: 44px; height: 44px; color: var(--muted); }
/* Sign in to sync ♥ and votes (sync.js) */
.sign-in { display: flex; flex-wrap: wrap; gap: 8px; }
.sign-in input {
  flex: 1 1 200px; min-width: 0; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.sign-in input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sign-in .btn { flex: 1 0 auto; }
.sign-in .btn:disabled { opacity: .6; cursor: default; }
.account .link { align-self: flex-start; font-size: 14px; }
.hint.error { color: var(--sale); }

/* ---------- Wide screens: photo left, details right ---------- */
@media (min-width: 900px) {
  .slide { display: flex; justify-content: center; }
  .pager { width: 100%; max-width: 1240px; overflow: hidden; scroll-snap-type: none; }
  .pane { scroll-snap-align: none; }
  .media { flex: 0 0 57%; }
  .info { flex: 1 1 auto; padding: 28px 32px 40px; border-left: 1px solid var(--line); }
  .peek, .back, .coach, .caption, .media::after { display: none; }
  .info-top .save { display: none; } /* the photo's ♥ is right beside it */
  .shot { padding-bottom: var(--bar-h); }
  .info-top { justify-content: flex-end; }
  .title { font-size: 34px; }
  .sheet { border-radius: 22px 22px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
