/* Sebastian's Wardrobe
   Look: the open "Wardrobe" gallery (warm paper, joined uppercase tabs, black + button, cutouts that float)
   with clothes hanging on rails, and a piece page modelled on an Instagram product post:
   typewriter name top-left, angle arrows, blue "Link" bottom-left, shop name bottom-right. */

@font-face { font-family: "Instrument Sans"; src: url(../assets/fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Albertsthal Typewriter"; src: url(../assets/fonts/albertsthal-typewriter.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Typewriter2"; src: url(../assets/fonts/typewriter2.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #f1ebe6;
  --paper-glass: rgba(241, 235, 230, .82);
  --ink: #191919;
  --muted: #6b665f;
  --line: #cfc8bc;
  --line-soft: rgba(207, 200, 188, .7);
  --link: #0000ee;
  --rod: #b5afa6;
  --ui: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --type: "Albertsthal Typewriter", "Typewriter2", "Courier New", Courier, monospace;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --gut: 20px;
  --ease: cubic-bezier(.22, .8, .22, 1);
  color-scheme: light;
}
html.font-tw2 { --type: "Typewriter2", "Albertsthal Typewriter", "Courier New", Courier, monospace; }

* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.locked, html.locked body { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: transparent;
  font: 400 15px/1.4 var(--ui); -webkit-font-smoothing: antialiased; font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; touch-action: manipulation; cursor: pointer; }
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* the paper sits behind everything and never scrolls */
.paper { position: fixed; inset: 0; z-index: -1; background: var(--paper) url(../assets/paper.jpg) center / cover no-repeat; }

/* header: count, joined tabs */
.top { position: sticky; top: 0; z-index: 10; padding: calc(var(--st) + 22px) calc(var(--gut) + var(--sr)) 12px calc(var(--gut) + var(--sl)); transition: background-color 200ms ease, border-color 200ms ease; border-bottom: 1px solid transparent; }
.top.scrolled { background: var(--paper-glass); -webkit-backdrop-filter: blur(18px) saturate(1.05); backdrop-filter: blur(18px) saturate(1.05); border-bottom-color: var(--line-soft); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px; }
.count { margin: 0; font: 500 12px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.menu-btn { width: 40px; height: 28px; margin-right: -8px; border: 0; background: none; display: grid; place-items: center; }
.menu-btn svg { width: 20px; height: 4px; }
.tabs { display: flex; margin: 18px calc(-1 * (var(--gut) + var(--sr))) 0 calc(-1 * (var(--gut) + var(--sl))); padding: 0 calc(var(--gut) + var(--sr)) 0 calc(var(--gut) + var(--sl)); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); font: 520 11px/1 var(--ui); letter-spacing: .055em; text-transform: uppercase; transition: background-color 160ms ease, color 160ms ease; }
.tabs button:first-child { border-left: 1px solid var(--line); }
.tabs button + button { border-left: 1px solid var(--line); }
.tabs button:last-child { border-right: 1px solid var(--line); }
.tabs button.end { border-right: 1px solid var(--line); }
.tabs button.gap { margin-left: 10px; border-left: 1px solid var(--line); }
.tabs button.on { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.subtabs { display: flex; gap: 18px; margin: 14px calc(-1 * (var(--gut) + var(--sr))) 0 calc(-1 * (var(--gut) + var(--sl))); padding: 0 calc(var(--gut) + var(--sr)) 2px calc(var(--gut) + var(--sl)); overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: 0 0 auto; border: 0; background: none; padding: 4px 0; color: var(--muted); font: 500 12px/1 var(--ui); letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid transparent; }
.subtabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
@media (hover: hover) { .tabs button:not(.on):hover { color: var(--ink); background: rgba(25, 25, 25, .06); } }

main { padding-bottom: calc(var(--sb) + 110px); }
.view-in { animation: view-in 260ms var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* rails: clothes hanging from a rod, shoes and accessories on a shelf */
.rail-sec { margin-top: 22px; }
.rail-sec:first-child { margin-top: 10px; }
.rail-title { display: inline-flex; align-items: center; gap: 8px; margin: 0 calc(var(--gut) + var(--sr)) 0 calc(var(--gut) + var(--sl)); padding: 6px 0; border: 0; background: none; font: 600 21px/1.1 var(--ui); letter-spacing: -.012em; }
.rail-title svg { width: 8px; height: 14px; margin-top: 2px; color: var(--muted); }
.rail-title .n { font: 500 11px/1 var(--ui); letter-spacing: .1em; color: var(--muted); margin-left: 2px; }
.rail { position: relative; margin-top: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.track { position: relative; display: flex; align-items: flex-start; gap: 4px; width: max-content; min-width: 100%; padding: 0 calc(var(--gut) + var(--sr)) 6px calc(var(--gut) + var(--sl)); }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--rod); box-shadow: 0 1px 0 rgba(255, 255, 255, .55), 0 -1px 0 rgba(0, 0, 0, .04); }
.shelf .track { align-items: flex-end; padding-bottom: 0; }
.shelf .track::before { top: auto; bottom: 9px; height: 2px; }
.shelf .track::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: linear-gradient(rgba(181, 175, 166, .22), rgba(181, 175, 166, 0)); }

.hang { position: relative; flex: 0 0 auto; width: 118px; height: 206px; padding: 0; border: 0; background: none; transform-origin: 50% 10px; will-change: transform; }
.hang .hanger { position: absolute; top: 4px; left: 50%; width: 78px; height: 39px; margin-left: -39px; z-index: 0; overflow: visible; pointer-events: none; }
.hang img { position: absolute; z-index: 1; left: 4px; top: 30px; width: calc(100% - 8px); height: 172px; object-fit: contain; object-position: 50% 0; filter: drop-shadow(0 6px 8px rgba(40, 30, 20, .10)); }
.hang.pants { width: 104px; height: 232px; }
.hang.pants .hanger { z-index: 2; }
.hang.pants img { top: 34px; height: 194px; }
.sit { position: relative; flex: 0 0 auto; width: 104px; height: 124px; padding: 0; border: 0; background: none; }
.sit img { position: absolute; left: 6px; right: 6px; bottom: 11px; width: calc(100% - 12px); height: 98px; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 3px 4px rgba(40, 30, 20, .12)); }
.hang:focus-visible, .sit:focus-visible { outline-offset: -2px; }
.rail-empty { padding: 30px calc(var(--gut) + var(--sl)) 0; }

/* category grid, as in the video */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; padding: 16px calc(14px + var(--sr)) 0 calc(14px + var(--sl)); }
.tile { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: .78; padding: 6px; border: 0; background: transparent; }
.tile img { width: 100%; height: 100%; object-fit: contain; transform: scale(.94); transition: transform 220ms cubic-bezier(.2, .7, .2, 1); }
.tile:active img { transform: scale(.9); }
@media (hover: hover) { .tile { cursor: zoom-in; } .tile:hover img { transform: scale(1); } }

/* outfits: photo tiles that reveal their pieces */
.ogrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 14px calc(var(--sr)) 0 calc(var(--sl)); }
.otile { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 0; padding: 0; background: transparent; }
.otile .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 280ms ease; }
.otile .lay { transition: opacity 280ms ease; }
.otile.has-photo .lay { opacity: 0; }
.otile .ocap { position: absolute; left: 10px; bottom: 9px; z-index: 3; font: 500 10px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: rgba(241, 235, 230, .78); padding: 4px 6px; }
@media (hover: hover) { .otile { cursor: zoom-in; } .otile.has-photo:hover .photo { opacity: .07; } .otile.has-photo:hover .lay { opacity: 1; } }

/* flat-lay of an outfit's pieces */
.lay { position: absolute; inset: 0; }
.lay img { position: absolute; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(40, 30, 20, .10)); }
.lay-box { position: relative; width: 100%; aspect-ratio: 4 / 5; }

/* empty states */
.empty { padding: 34px calc(var(--gut) + var(--sr)) 0 calc(var(--gut) + var(--sl)); max-width: 520px; }
.empty h2 { margin: 0; font: 400 22px/1.25 var(--type); text-transform: uppercase; letter-spacing: .02em; }
.empty p { margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.empty .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.empty-rail { position: relative; height: 118px; margin-top: 26px; overflow: hidden; }
.empty-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--rod); }
.empty-rail .hang { position: absolute; top: 0; height: 60px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: 520 12px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.quiet { border-color: var(--line); color: var(--muted); }
.btn[disabled] { opacity: .45; cursor: default; }
.fab { position: fixed; left: calc(18px + var(--sl)); bottom: calc(18px + var(--sb)); z-index: 20; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; box-shadow: 0 8px 22px rgba(25, 20, 15, .22); transition: transform 180ms var(--ease); }
.fab svg { width: 18px; height: 18px; }
.fab:active { transform: scale(.94); }

/* piece and outfit pages */
.page { position: fixed; inset: 0; z-index: 30; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--paper) url(../assets/paper.jpg) center / cover no-repeat; padding: calc(var(--st) + 16px) calc(16px + var(--sr)) calc(var(--sb) + 14px) calc(16px + var(--sl)); animation: page-in 240ms ease both; }
.page.closing { animation: page-out 200ms ease both; }
@keyframes page-in { from { opacity: 0; } }
@keyframes page-out { to { opacity: 0; } }
.p-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; z-index: 2; }
.p-name { margin: 0; padding-top: 2px; max-width: calc(100% - 84px); font: 400 17px/1.28 var(--type); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); overflow-wrap: anywhere; }
.p-name span { display: block; }
.p-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.p-edit { border: 0; background: none; padding: 8px 6px; font: 400 15px/1 var(--type); text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.round { width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 1px 6px rgba(0, 0, 0, .16); display: grid; place-items: center; color: #3b3b3b; }
.round svg { width: 14px; height: 14px; }
.p-body { position: relative; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.carousel { position: relative; min-height: 0; overflow: hidden; touch-action: none; }
.c-track { display: flex; height: 100%; will-change: transform; }
.c-track.anim { transition: transform 340ms var(--ease); }
.c-slide { flex: 0 0 100%; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; padding: 14px 6px; }
.c-slide > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.c-slide .lay-box { width: min(100%, calc((100vh - 260px) * .8)); max-height: 100%; }
.c-arrow { position: absolute; top: 50%; z-index: 2; margin-top: -19px; }
.c-arrow.prev { left: 2px; }
.c-arrow.next { right: 2px; }
.c-dots { display: flex; justify-content: center; gap: 6px; height: 18px; align-items: center; }
.c-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(25, 25, 25, .2); transition: background-color 200ms ease, transform 200ms ease; }
.c-dots i.on { background: var(--ink); transform: scale(1.1); }
.p-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding-top: 8px; min-height: 30px; position: relative; z-index: 2; }
.p-link { font: 400 18px/1.1 var(--type); color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; background: none; border: 0; padding: 4px 0; }
.p-store { font: 400 18px/1.1 var(--type); letter-spacing: .05em; text-transform: uppercase; text-align: right; overflow-wrap: anywhere; }
.p-notes { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 560px; }
.p-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 2px; }
.p-strip::-webkit-scrollbar { display: none; }
.p-strip button { flex: 0 0 64px; height: 78px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .22); padding: 4px; }
.p-strip img { width: 100%; height: 100%; object-fit: contain; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { border: 1px solid var(--line); padding: 4px 7px; font: 500 10px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fly { position: fixed; z-index: 60; margin: 0; object-fit: contain; pointer-events: none; transform-origin: 0 0; will-change: transform; }

/* sheets: add and edit */
.sheet { position: fixed; inset: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--paper) url(../assets/paper.jpg) center / cover no-repeat; animation: sheet-in 300ms var(--ease) both; }
.sheet.closing { animation: sheet-out 220ms ease both; }
@keyframes sheet-in { from { transform: translateY(28px); opacity: 0; } }
@keyframes sheet-out { to { transform: translateY(24px); opacity: 0; } }
.s-bar { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: calc(var(--st) + 8px) calc(14px + var(--sr)) 8px calc(14px + var(--sl)); background: var(--paper-glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line-soft); }
.s-bar h2 { margin: 0; font: 600 15px/1.2 var(--ui); text-align: center; }
.s-bar .l { justify-self: start; }
.s-bar .r { justify-self: end; }
.tbtn { border: 0; background: none; padding: 10px 6px; font: 500 16px/1 var(--ui); color: var(--ink); }
.tbtn.strong { font-weight: 650; }
.tbtn[disabled] { opacity: .4; }
.s-body { max-width: 640px; margin: 0 auto; padding: 8px calc(var(--gut) + var(--sr)) calc(var(--sb) + 48px) calc(var(--gut) + var(--sl)); }
.label { display: block; margin: 24px 0 10px; font: 500 11px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.field { display: block; }
.input { display: block; width: 100%; margin: 0; padding: 9px 0 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font: 400 17px/1.3 var(--ui); -webkit-appearance: none; appearance: none; }
.input::placeholder { color: rgba(107, 102, 95, .7); }
.input:focus { outline: none; border-bottom-color: var(--ink); }
.input.type { font-family: var(--type); text-transform: uppercase; letter-spacing: .02em; }
textarea.input { min-height: 74px; resize: vertical; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 520 11px/1 var(--ui); letter-spacing: .055em; text-transform: uppercase; }
.chips button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hint { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.photos { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * (var(--gut) + var(--sr))) 0 calc(-1 * (var(--gut) + var(--sl))); padding: 2px calc(var(--gut) + var(--sr)) 6px calc(var(--gut) + var(--sl)); }
.photos::-webkit-scrollbar { display: none; }
.padd { position: relative; flex: 0 0 104px; height: 130px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed rgba(25, 25, 25, .45); background: rgba(255, 255, 255, .18); color: var(--ink); font: 520 10.5px/1.2 var(--ui); letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.padd svg { width: 18px; height: 18px; }
.padd input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.pthumb { position: relative; flex: 0 0 104px; height: 130px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .2); padding: 6px; }
.pthumb img { width: 100%; height: 100%; object-fit: contain; }
.pthumb .cover { position: absolute; left: 5px; top: 5px; padding: 3px 5px; background: var(--ink); color: var(--paper); font: 600 9px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; }
.pthumb .busy { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; background: rgba(241, 235, 230, .82); font: 520 10px/1.3 var(--ui); letter-spacing: .05em; text-transform: uppercase; text-align: center; }
.pthumb .busy::before { content: ""; display: block; width: 16px; height: 16px; margin: 0 auto 6px; border: 1.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pastezone { margin-top: 10px; min-height: 48px; padding: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; outline: none; }
.danger { margin-top: 34px; }
.picks { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * (var(--gut) + var(--sr))) 0 calc(-1 * (var(--gut) + var(--sl))); padding: 2px calc(var(--gut) + var(--sr)) 4px calc(var(--gut) + var(--sl)); }
.picks::-webkit-scrollbar { display: none; }
.pick { position: relative; flex: 0 0 86px; height: 106px; padding: 6px; border: 1px solid transparent; background: rgba(255, 255, 255, .16); }
.pick img { width: 100%; height: 100%; object-fit: contain; }
.pick.on { border-color: var(--ink); background: rgba(255, 255, 255, .4); }
.pick.on::after { content: ""; position: absolute; right: 5px; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.5L12 5.4' fill='none' stroke='%23f1ebe6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.preview { width: min(100%, 300px); margin: 8px auto 0; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .14); }
.blist { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line-soft); }
.blist li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.blist .bth { width: 52px; height: 64px; object-fit: contain; }
.blist b { display: block; font: 400 15px/1.25 var(--type); text-transform: uppercase; }
.blist span { display: block; margin-top: 3px; font: 500 10.5px/1.3 var(--ui); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

/* menus, toast, install hint */
.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(25, 24, 22, .16); animation: page-in 160ms ease both; }
.pop { position: fixed; z-index: 50; min-width: 236px; max-width: calc(100vw - 32px); padding: 6px; background: #f8f4ef; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(25, 20, 15, .16); animation: pop-in 180ms var(--ease) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.pop button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 13px 12px; border: 0; background: none; text-align: left; font: 500 15px/1.2 var(--ui); color: var(--ink); }
.pop button small { color: var(--muted); font-size: 12px; font-weight: 500; }
.pop hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--line-soft); }
.pop .note { padding: 8px 12px 10px; font-size: 12px; line-height: 1.45; color: var(--muted); }
@media (hover: hover) { .pop button:hover { background: rgba(25, 25, 25, .05); } }
.toast { position: fixed; left: 50%; bottom: calc(var(--sb) + 84px); z-index: 70; transform: translateX(-50%); max-width: calc(100vw - 40px); padding: 11px 14px; background: var(--ink); color: var(--paper); font: 500 13px/1.35 var(--ui); text-align: center; box-shadow: 0 10px 26px rgba(0, 0, 0, .18); animation: pop-in 200ms var(--ease) both; }
.install { position: fixed; left: calc(78px + var(--sl)); right: calc(14px + var(--sr)); bottom: calc(18px + var(--sb)); z-index: 19; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: #f8f4ef; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(25, 20, 15, .12); font-size: 13px; line-height: 1.35; }
.install svg { flex: none; width: 16px; height: 18px; }
.install button { flex: none; margin-left: auto; width: 30px; height: 30px; border: 0; background: none; font-size: 18px; color: var(--muted); }

@media (min-width: 700px) {
  :root { --gut: 44px; }
  .top { padding-top: calc(var(--st) + 52px); }
  .tabs { margin-top: 34px; }
  .tabs button { min-height: 40px; padding: 0 18px; font-size: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 26px; padding: 34px calc(40px + var(--sr)) 0 calc(40px + var(--sl)); }
  .ogrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); padding: 30px calc(30px + var(--sr)) 0 calc(30px + var(--sl)); }
  .hang { width: 150px; height: 258px; }
  .hang .hanger { width: 98px; height: 49px; margin-left: -49px; top: 3px; }
  .hang img { top: 38px; height: 216px; }
  .hang.pants { width: 132px; height: 288px; }
  .hang.pants img { top: 42px; height: 242px; }
  .sit { width: 132px; height: 156px; }
  .sit img { height: 128px; }
  .page { padding: calc(var(--st) + 34px) calc(40px + var(--sr)) calc(var(--sb) + 30px) calc(40px + var(--sl)); }
  .p-name { font-size: 28px; }
  .p-link, .p-store { font-size: 22px; }
  .c-arrow.prev { left: 18px; }
  .c-arrow.next { right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
