/* Layout: an edge-to-edge retail storefront in slate on white, with photographs doing the talking
   and every move on an iOS curve. One orchestrated moment: the triptych opens into a single piece. */
:root {
  --bg: #ffffff; --surface: #f3f4f4; --ink: #253746; --ink-2: #5b6872; --ink-3: #8a959d;
  --line: #dde1e4; --accent: #253746; --on-accent: #ffffff; --warn: #8f4a2e; --good: #3c6a53;
  --glass: rgba(255, 255, 255, .74); --tile: #e9eaea; --backdrop: rgba(10, 16, 21, .46); --behind: #0b1014;
  --on-photo: #ffffff; --on-photo-2: rgba(255, 255, 255, .84);
  --display: "Libre Caslon Display", "Libre Caslon Text", "Big Caslon", Georgia, serif;
  --serif: "Libre Caslon Text", "Big Caslon", Georgia, serif;
  --ui: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --ease-ios: cubic-bezier(.32, .72, 0, 1);
  --ease-apple: cubic-bezier(.28, .11, .32, 1);
  --spring: linear(0, .0186 1.1%, .0731 2.4%, .3012 5.4%, .6134 9.1%, .8846 13.2%, 1.0164 16.4%, 1.0832 19.4%, 1.1084 22.4%, 1.1052 25.4%, 1.0684 30.9%, 1.0196 38.4%, .9958 46.4%, .9916 52.4%, 1.0011 72.4%, 1);
  --bar-h: 56px; --tabs-h: 0px;
  --gl: max(clamp(16px, 3vw, 40px), env(safe-area-inset-left, 0px));
  --gr: max(clamp(16px, 3vw, 40px), env(safe-area-inset-right, 0px));
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1317; --surface: #161d22; --ink: #e8edf0; --ink-2: #a2adb5; --ink-3: #75818a;
  --line: #2a333a; --accent: #e8edf0; --on-accent: #0f151a; --warn: #d99270; --good: #86bd9f;
  --glass: rgba(14, 19, 23, .72); --tile: #1b2329; --backdrop: rgba(0, 0, 0, .6); --behind: #000000;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0e1317; --surface: #161d22; --ink: #e8edf0; --ink-2: #a2adb5; --ink-3: #75818a;
  --line: #2a333a; --accent: #e8edf0; --on-accent: #0f151a; --warn: #d99270; --good: #86bd9f;
  --glass: rgba(14, 19, 23, .72); --tile: #1b2329; --backdrop: rgba(0, 0, 0, .6); --behind: #000000;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--ui); letter-spacing: .012em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: var(--safe-top); z-index: 40; background: var(--bg); }
img { max-width: 100%; }
[hidden] { display: none !important; }
html.sheet-open { overflow: hidden; }
html.sheet-open body { background: var(--behind); }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.005em; text-wrap: balance; line-height: 1.04; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hero :focus-visible { outline-color: var(--on-photo); }
.wrap { padding-left: var(--gl); padding-right: var(--gr); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .05em; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* Page chrome */
#page { background: var(--bg); min-height: 100vh; padding-bottom: calc(var(--tabs-h) + var(--safe-bottom)); transition: transform .56s var(--ease-ios), border-radius .56s var(--ease-ios); transform-origin: 50% var(--sheet-origin, 50vh); }
html.sheet-open #page { transform: scale(.955) translateY(8px); border-radius: 14px; overflow: clip; }
.ticker { height: 28px; overflow: hidden; background: var(--surface); color: var(--ink-2); font-size: 12px; line-height: 28px; white-space: nowrap; }
.ticker-track { display: inline-flex; animation: ticker 44s linear infinite; }
.ticker-track span { padding-right: 40px; }
.ticker-track span::after { content: "•"; padding-left: 40px; }
@keyframes ticker { to { transform: translateX(-50%); } }
.bar { position: sticky; top: var(--safe-top); z-index: 30; height: var(--bar-h); display: flex; align-items: center; gap: clamp(12px, 3vw, 40px); background: var(--bg); transition: background-color .4s var(--ease-apple), box-shadow .4s var(--ease-apple); view-transition-name: wk-bar; }
.bar.scrolled { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 var(--line); }
.wordmark { font: 400 21px/1 var(--serif); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.wordmark i { font-size: .82em; padding: 0 .06em; }
.navlinks { display: flex; gap: 22px; margin-right: auto; }
.navlink { position: relative; padding: 6px 0; font-size: 14px; color: var(--ink-2); transition: color .25s ease; }
.navlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-ios); }
.navlink:hover, .navlink[aria-current="page"] { color: var(--ink); }
.navlink[aria-current="page"]::after { transform: scaleX(1); }
.addbtn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; margin-left: auto; font-size: 14px; font-weight: 600; background: var(--accent); color: var(--on-accent); transition: transform .4s var(--spring); }
.addbtn:active { transform: scale(.95); }
.addbtn svg { width: 13px; height: 13px; }
.navlinks + .addbtn { margin-left: 0; }
.iconbtn { width: 36px; height: 36px; margin-right: -8px; display: grid; place-items: center; color: var(--ink-2); transition: color .2s ease, transform .4s var(--spring); }
.iconbtn:hover { color: var(--ink); }
.iconbtn:active { transform: scale(.9); }
.iconbtn svg { width: 20px; height: 20px; }
.tabs { display: none; }
@media (max-width: 759px) {
  :root { --tabs-h: 54px; --bar-h: 50px; }
  .navlinks { display: none; }
  .navlinks + .addbtn { margin-left: auto; }
  .tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 var(--gr) var(--safe-bottom) var(--gl); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 -1px 0 var(--line); view-transition-name: wk-tabs; transition: transform .56s var(--ease-ios); }
  html.sheet-open .tabs { transform: translateY(110%); }
  .tab { height: var(--tabs-h); font-size: 14px; color: var(--ink-3); transition: color .25s ease; }
  .tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
}

/* Triptych hero */
.hero { position: relative; --stage: min(calc(100vh - var(--bar-h) - var(--tabs-h) - var(--safe-top) - var(--safe-bottom)), 920px); background: #0b0f12; }
.hero.pinned { height: calc(var(--stage) + 120vh); }
.hero-stage { position: relative; height: var(--stage); overflow: hidden; background: #0b0f12; color: var(--on-photo); }
.hero.pinned .hero-stage { position: sticky; top: calc(var(--bar-h) + var(--safe-top)); }
.panel { position: absolute; top: 0; bottom: 0; overflow: hidden; display: block; width: 33.34%; }
.panel:nth-child(1) { left: 0; }
.panel:nth-child(2) { left: 33.33%; }
.panel:nth-child(3) { left: 66.66%; }
.panels[data-n="1"] .panel { left: 0; width: 100%; }
.panels[data-n="2"] .panel { width: 50%; }
.panels[data-n="2"] .panel:nth-child(2) { left: 50%; }
.panel img { width: 100%; height: 100%; object-fit: cover; object-position: center 36%; transform-origin: center 40%; will-change: transform; transition: filter .8s var(--ease-apple); }
.hero-scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(7, 10, 13, .78), rgba(7, 10, 13, .28) 34%, rgba(7, 10, 13, 0) 58%); }
.hero-copy { position: absolute; left: 0; right: 0; bottom: 0; padding-top: 0; padding-bottom: clamp(24px, 4.5vh, 48px); pointer-events: none; display: grid; gap: 8px; justify-items: start; }
.hero-copy > * { pointer-events: auto; }
.hero-copy p { max-width: 58ch; font-size: clamp(15px, 1.25vw, 17px); font-weight: 500; color: var(--on-photo-2); }
.hero-copy h1 { font-size: clamp(42px, 6vw, 84px); color: var(--on-photo); }
.hero-copy h2 { font-size: clamp(40px, 6.4vw, 96px); color: var(--on-photo); }
.hero-copy .eyebrow { color: var(--on-photo-2); }
.hero-b { visibility: hidden; opacity: 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 10px; }
.link-photo { font-size: 15px; font-weight: 600; color: var(--on-photo); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.btn-photo { padding: 11px 22px; background: var(--on-photo); color: #1d2c38; font-weight: 600; transition: transform .4s var(--spring); }
.btn-photo:active { transform: scale(.96); }
.flag { position: absolute; top: 10px; left: 10px; padding: 2px 7px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--on-photo); background: rgba(10, 15, 19, .48); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); pointer-events: none; }
.hero-flag { top: 14px; left: var(--gl); z-index: 2; }

/* Today sections */
.section { padding-block: clamp(56px, 9vw, 120px); }
.look { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.look-head { display: grid; gap: 14px; position: sticky; top: calc(var(--bar-h) + var(--safe-top) + 28px); }
.look-head h2 { font-size: clamp(38px, 4.4vw, 62px); }
.look-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 8px; }
.look-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
.look-grid[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.look-grid[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.look-grid[data-n="5"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ask { display: flex; gap: 10px; align-items: end; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.ask label { flex: 1; min-width: 0; }
.field { display: grid; gap: 3px; font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; padding: 6px 0 7px; font-size: 16px; font-weight: 400; letter-spacing: .01em; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; outline: 0; transition: border-color .3s ease; appearance: none; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { resize: vertical; min-height: 92px; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; font-size: 15px; font-weight: 600; background: var(--accent); color: var(--on-accent); transition: transform .4s var(--spring), background-color .3s ease, color .3s ease, opacity .2s ease; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.done { background: var(--good); color: #fff; }
:root[data-theme="dark"] .btn.done { color: #0d1612; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.textlink { font-size: 15px; font-weight: 600; color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 1px; text-decoration: none; transition: opacity .2s ease; }
.textlink:hover { opacity: .65; }
.textlink.quiet { font-weight: 500; color: var(--ink-2); }
.textlink.warn { color: var(--warn); font-weight: 500; }
.rail-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.rail-head h2 { font-size: clamp(32px, 3.8vw, 52px); }
.rail-arrows { display: flex; gap: 6px; flex: none; }
.arrow { width: 40px; height: 40px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); transition: transform .4s var(--spring), box-shadow .3s ease; }
.arrow:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.arrow:active { transform: scale(.92); }
.arrow svg { width: 14px; height: 14px; }
.rail { position: relative; display: flex; gap: 3px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-left: var(--gl); padding-right: var(--gr); scroll-padding-left: var(--gl); }
.rail::-webkit-scrollbar { display: none; }
.rail-card { flex: 0 0 clamp(230px, 27vw, 420px); scroll-snap-align: start; }
.rail-card .tile-img img { transform: scale(1.1); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: clamp(22px, 3vw, 36px) 0; display: grid; gap: 6px; align-content: start; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: clamp(16px, 3vw, 36px); }
.stat:not(:last-child) { padding-right: clamp(16px, 3vw, 36px); }
.stat strong { font: 400 clamp(48px, 7vw, 104px)/1 var(--display); letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.stat p { max-width: 30ch; color: var(--ink-2); }
.foot { padding-block: 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.install { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; padding: 12px 16px; background: var(--surface); font-size: 14px; }
@media (max-width: 759px) {
  .look { grid-template-columns: minmax(0, 1fr); }
  .look-head { position: static; }
  .look-grid[data-n] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .look-grid[data-n="3"] > :first-child, .look-grid[data-n="5"] > :first-child { grid-column: 1 / -1; }
  .look-grid[data-n="3"] > :first-child .tile-img, .look-grid[data-n="5"] > :first-child .tile-img { aspect-ratio: 3 / 2.6; }
  .look-grid[data-n="3"] > :first-child img, .look-grid[data-n="5"] > :first-child img { object-position: center 30%; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .rail-arrows { display: none; }
  .rail-card { flex-basis: 66vw; }
}

/* Closet grid */
.page-head { padding-top: clamp(28px, 4vw, 52px); padding-bottom: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.page-head h1 { font-size: clamp(42px, 5.2vw, 72px); }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 14px; padding: 12px 16px; background: var(--surface); font-size: 14px; }
.controls { position: sticky; top: calc(var(--bar-h) + var(--safe-top)); z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px; background: var(--bg); border-bottom: 1px solid var(--line); margin-top: 18px; }
.filters { position: relative; display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; padding: 8px 0; font-size: 14px; color: var(--ink-2); transition: color .25s ease; }
.filter[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.filter-mark { position: absolute; left: 0; bottom: 4px; height: 1px; width: 10px; background: var(--ink); transform-origin: left; transition: transform .55s var(--ease-ios); pointer-events: none; }
.sort { flex: none; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.sort select { padding: 6px 20px 6px 2px; color: var(--ink); background-color: transparent; border: 0; appearance: none; font-size: 14px; font-weight: 600; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 30px) 3px; padding-block: 3px clamp(40px, 6vw, 80px); }
.vt-on .tile { view-transition-name: var(--vt); }
.tile { position: relative; min-width: 0; }
.tile-img { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: var(--tile); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-apple); }
@media (hover: hover) { .tile:hover .tile-img img { transform: scale(1.035); } .rail-card:hover .tile-img img { transform: scale(1.1); } }
.tile-img:active img { transform: scale(.985); transition-duration: .3s; }
.tile-cap { display: grid; gap: 1px; padding: 10px 44px 0 2px; font-size: 14px; line-height: 1.32; }
.tile-cap .brand { font-size: 12px; color: var(--ink-2); }
.tile-cap .name { font-weight: 500; }
.tile-cap .idle { font-size: 13px; color: var(--ink-2); }
.tile-cap .idle.long { color: var(--warn); }
.tick { position: absolute; right: 0; bottom: 0; width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink-2); transition: transform .45s var(--spring), color .2s ease; }
.tick svg { width: 20px; height: 20px; }
.tick:hover { color: var(--ink); }
.tick:active { transform: scale(.82); }
.tick.done { color: var(--good); }
.empty { padding-block: clamp(50px, 9vw, 110px); display: grid; gap: 14px; justify-items: start; max-width: 54ch; }
.empty h2 { font-size: clamp(32px, 4vw, 48px); }
@media (max-width: 1099px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 759px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sort span { display: none; } .tile-cap { padding-left: 6px; } }

/* Piece detail */
.detail { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: clamp(28px, 4vw, 72px); align-items: start; padding-bottom: clamp(50px, 7vw, 90px); }
.detail-photo { position: sticky; top: calc(var(--bar-h) + var(--safe-top)); background: var(--tile); aspect-ratio: 3 / 4; max-height: calc(100vh - var(--bar-h) - var(--safe-top)); width: 100%; overflow: hidden; }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.back-float { display: none; }
.detail-info { padding-top: clamp(16px, 2.4vw, 32px); padding-right: var(--gr); display: grid; gap: 22px; min-width: 0; }
.back { justify-self: start; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); transition: gap .35s var(--ease-ios), color .2s ease; }
.back:hover { gap: 11px; color: var(--ink); }
.back svg { width: 13px; height: 13px; }
.title-block { display: grid; gap: 6px; }
.title-block h1 { font-size: clamp(38px, 4.4vw, 62px); }
.idle-line.long { color: var(--warn); }
.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-block: 14px; border-block: 1px solid var(--line); }
.triple div { display: grid; gap: 1px; min-width: 0; }
.triple strong { font: 400 clamp(26px, 2.6vw, 34px)/1.1 var(--display); font-variant-numeric: lining-nums; }
.triple span { font-size: 13px; color: var(--ink-2); }
.block { display: grid; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.block > h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .05em; color: var(--ink-2); }
.spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 22px; }
.spec dt { color: var(--ink-2); }
.spec dd { min-width: 0; overflow-wrap: anywhere; }
.spec .missing { color: var(--ink-3); }
.tagline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.tag-thumb { position: relative; width: 62px; aspect-ratio: 3 / 4; overflow: hidden; background: var(--tile); flex: none; }
.tag-thumb img { width: 100%; height: 100%; object-fit: cover; }
.care { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 14px 8px; }
.care li { display: grid; gap: 4px; justify-items: center; text-align: center; font-size: 12px; line-height: 1.2; color: var(--ink-2); }
.care svg { width: 42px; height: 42px; color: var(--ink); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.care svg text { fill: currentColor; stroke: none; font: 600 12px var(--ui); text-anchor: middle; }
.care svg .solid { fill: currentColor; stroke: none; }
.keepfit { padding: 12px 14px; background: var(--surface); font-size: 15px; line-height: 1.42; }
.seg { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); padding: 2px; }
.seg-thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / 5); background: var(--bg); box-shadow: 0 1px 4px rgba(16, 26, 34, .16); transform: translateX(calc(var(--pos, 0) * 100%)); transition: transform .55s var(--spring), opacity .25s ease; }
.seg[data-empty="1"] .seg-thumb { opacity: 0; }
.seg button { position: relative; z-index: 1; padding: 9px 2px; font-size: 13px; color: var(--ink-2); transition: color .25s ease; }
.seg button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.mini-look { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 3px; }
.row-end { display: flex; flex-wrap: wrap; gap: 16px 22px; align-items: center; }
@media (max-width: 759px) {
  .detail { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .detail-photo { position: relative; top: 0; max-height: none; }
  .detail-photo .flag { left: auto; right: var(--gr); top: 16px; }
  .back-float { position: absolute; z-index: 2; top: 12px; left: var(--gl); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(10, 15, 19, .42); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); transition: transform .4s var(--spring); }
  .back-float:active { transform: scale(.9); }
  .back-float svg { width: 15px; height: 15px; }
  .detail-info { padding-left: var(--gl); }
}

/* Fit */
.fit-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(30px, 5vw, 80px); padding-block: clamp(20px, 3vw, 36px) clamp(40px, 6vw, 80px); align-items: start; }
.fit-grid h2, .fit-check h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 8px; }
.measures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin-top: 18px; }
.unit { display: inline-flex; margin-top: 12px; background: var(--surface); padding: 2px; }
.unit button { padding: 5px 13px; font-size: 13px; color: var(--ink-2); transition: background-color .3s ease, color .3s ease; }
.unit button[aria-pressed="true"] { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(16, 26, 34, .14); }
.brand-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding-block: 13px; border-bottom: 1px solid var(--line); }
.brand-row:first-child { border-top: 1px solid var(--line); margin-top: 14px; }
.brand-row strong { font-weight: 600; }
.brand-row .verdict { font-weight: 600; text-align: right; }
.brand-row .pieces { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.fit-check { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(30px, 5vw, 80px); padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.fc-form { display: grid; gap: 16px; }
.fc-out { display: grid; gap: 6px; padding: 18px; background: var(--surface); }
.fc-out strong { font: 400 clamp(36px, 4vw, 56px)/1.05 var(--display); }
@media (max-width: 759px) { .fit-grid, .fit-check { grid-template-columns: minmax(0, 1fr); } }

/* Sheet */
.sheet-root { position: fixed; inset: 0; z-index: 50; visibility: hidden; transition: visibility 0s linear .56s; }
.sheet-root.open { visibility: visible; transition-delay: 0s; }
.sheet-veil { position: absolute; inset: 0; background: var(--backdrop); opacity: 0; transition: opacity .56s var(--ease-ios); }
.sheet-root.open .sheet-veil { opacity: 1; }
.sheet { position: absolute; left: 50%; bottom: 0; width: min(760px, 100%); max-height: calc(100% - var(--safe-top) - 28px); display: flex; flex-direction: column; background: var(--bg); box-shadow: 0 -18px 60px rgba(6, 11, 15, .32); transform: translate(-50%, 104%); transition: transform .58s var(--ease-ios); will-change: transform; }
.sheet-root.open .sheet { transform: translate(-50%, 0); }
.sheet.dragging { transition: none; }
.grabber { flex: none; padding: 9px 0 6px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.grabber::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--line); }
.sheet-head { flex: none; display: flex; align-items: start; justify-content: space-between; gap: 18px; padding-bottom: 12px; }
.sheet-head h2 { font-size: clamp(30px, 4vw, 42px); }
.close { flex: none; width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface); transition: transform .4s var(--spring); }
.close:active { transform: scale(.9); }
.close svg { width: 13px; height: 13px; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: calc(22px + var(--safe-bottom)); display: grid; gap: 18px; align-content: start; }
.drop { position: relative; display: grid; gap: 10px; justify-items: center; text-align: center; padding: clamp(28px, 6vw, 52px) 18px; background: var(--surface); transition: background-color .3s ease, transform .5s var(--ease-ios); }
.drop.over { transform: scale(.985); background: var(--line); }
.drop h3 { margin: 0; font: 400 clamp(23px, 3vw, 30px)/1.15 var(--display); text-wrap: balance; }
.drop p { max-width: 46ch; color: var(--ink-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; }
label.btn { cursor: pointer; }
.tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; font-size: 14px; color: var(--ink-2); }
.tips strong { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 559px) { .tips { grid-template-columns: minmax(0, 1fr); } }
.reader { display: grid; gap: 14px; justify-items: center; text-align: center; padding-block: 6px 8px; }
.scan { position: relative; overflow: hidden; background: var(--tile); }
.scan img { width: 100%; height: 100%; object-fit: cover; }
.scan::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .42) 49.5%, #ffffff 50%, rgba(255, 255, 255, 0) 50.6%); background-size: 100% 42%; background-repeat: no-repeat; animation: sweep 2s var(--ease-apple) infinite alternate; }
@keyframes sweep { from { background-position: 0 -40%; } to { background-position: 0 140%; } }
.reader-shot { width: min(248px, 60vw); aspect-ratio: 3 / 4; }
.reader-shot img { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.reader-shot img.on { opacity: 1; }
.reader h3 { margin: 0; font: 400 clamp(25px, 3vw, 32px)/1.1 var(--display); }
.drafts { display: grid; gap: 16px; }
.draft { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.draft-shots { display: grid; gap: 3px; align-content: start; }
.draft-shot { aspect-ratio: 3 / 4; background: var(--tile); overflow: hidden; }
.draft-shot img { width: 100%; height: 100%; object-fit: cover; }
.draft-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; min-width: 0; }
.draft-fields .wide { grid-column: 1 / -1; }
.draft-care { grid-column: 1 / -1; }
.draft-care .care { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.draft-care .care svg { width: 32px; height: 32px; }
.unread { color: var(--warn); font-size: 13px; }
.sheet-foot { position: sticky; bottom: calc(-22px - var(--safe-bottom)); margin-bottom: calc(-22px - var(--safe-bottom)); padding-block: 12px calc(12px + var(--safe-bottom)); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; z-index: 3; }
.msg { font-size: 14px; color: var(--warn); }
.ok { font-size: 14px; color: var(--good); }
@media (max-width: 559px) { .draft { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; } .draft-fields { grid-template-columns: minmax(0, 1fr); } }

/* Settings */
.set-block { display: grid; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.set-block:last-child { border-bottom: 0; }
.set-block h3 { margin: 0; font: 400 clamp(22px, 2.6vw, 28px)/1.15 var(--display); }
.set-block p { max-width: 60ch; color: var(--ink-2); font-size: 14px; }
.set-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.set-row .field { flex: 1 1 240px; min-width: 0; }
.status-line { font-size: 14px; }

/* Toast */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-bottom) + 18px); padding: 10px 18px; font-size: 14px; font-weight: 500; background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 34px rgba(6, 11, 15, .26); transform: translate(-50%, 22px) scale(.96); opacity: 0; pointer-events: none; transition: transform .55s var(--spring), opacity .25s ease; max-width: calc(100vw - 32px); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* View transitions */
::view-transition-group(wk-piece) { z-index: 6; animation-duration: .62s; animation-timing-function: var(--ease-ios); overflow: clip; }
::view-transition-old(wk-piece), ::view-transition-new(wk-piece) { height: 100%; width: 100%; object-fit: cover; animation-duration: .3s; }
::view-transition-group(wk-bar), ::view-transition-group(wk-tabs) { z-index: 8; }
html[data-vt="route"]::view-transition-old(root) { animation: vt-out .24s ease both; }
html[data-vt="route"]::view-transition-new(root) { animation: vt-in .6s var(--ease-ios) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }
html[data-vt="grid"]::view-transition-old(root), html[data-vt="grid"]::view-transition-new(root) { animation: none; }
html[data-vt="grid"]::view-transition-group(*) { animation-duration: .58s; animation-timing-function: var(--ease-ios); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .scan::before { display: none; }
}
