/* ONE Каталог — интерфейс в языке iPadOS 26: стекло поверх контента, SF Pro, пружинная анимация.
   Тема: светлая/тёмная по системе (html[data-theme] — ручной выбор). */

@font-face { font-family: "InterFallback"; src: url("../fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "InterFallback"; src: url("../fonts/Inter-Bold.ttf") format("truetype"); font-weight: 600 900; font-display: swap; }

:root {
  --font: -apple-system, BlinkMacSystemFont, "InterFallback", "Segoe UI", sans-serif;
  --brand: #7abd00;
  --spring: linear(0, 0.090 4.6%, 0.228 8.5%, 0.381 12.3%, 0.526 16.2%, 0.652 20%, 0.754 23.8%, 0.834 27.7%, 0.893 31.5%, 0.936 35.4%, 0.965 39.2%, 0.984 43.1%, 0.996 46.9%, 1.002 50.8%, 1.006 54.6%, 1.007 58.5%, 1.006 66.2%, 1.004 73.8%, 1.002 81.5%, 1.001 89.2%, 1);
  --spring-b: linear(0, 0.091 4.2%, 0.243 7.8%, 0.418 11.4%, 0.586 15.1%, 0.731 18.7%, 0.846 22.3%, 0.931 25.9%, 0.989 29.5%, 1.024 33.1%, 1.042 36.7%, 1.048 40.4%, 1.046 44%, 1.04 47.6%, 1.032 51.2%, 1.023 54.8%, 1.016 58.4%, 1.01 62%, 1.005 65.7%, 1.002 69.3%, 0.999 72.9%, 0.998 80.1%, 0.999 94.6%, 1);
  --ease: cubic-bezier(.25, .9, .3, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --nav-h: 56px;
  --side-w: 304px;
  --gap-side: 10px;
  --pad: 28px;
  --r-hero: 30px;
  --r-card: 18px;
  --r-sm: 12px;

  /* светлая */
  --bg: #ffffff;
  --bg-grouped: #f2f2f7;
  --bg-card: #ffffff;
  --bg-elev: #ffffff;
  --bg-sheet: #f2f2f7;
  --bg-inset: #f2f2f7;
  --sheet-list: #ffffff;
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.62);
  --label-3: rgba(60, 60, 67, 0.32);
  --sep: rgba(60, 60, 67, 0.22);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);
  --tint: #4c8c00;          /* бренд-зелёный, затемнён для текста на белом */
  --tint-fill: #7abd00;     /* заливка кнопок — чистый бренд */
  --on-tint: #000000;
  --red: #ff3b30;
  --orange: #ff9500;
  --img-line: rgba(0, 0, 0, 0.07);
  --studio: #ffffff;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05), 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.06), 0 18px 48px rgba(0, 0, 0, 0.16);
  --dim: rgba(0, 0, 0, 0.22);
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-line: rgba(255, 255, 255, 0.75);
  --glass-hi: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 26px rgba(0, 0, 0, 0.1);
  --side-bg: rgba(246, 246, 249, 0.72);
  --edge: rgba(255, 255, 255, 0.9);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-grouped: #000000; --bg-card: #1c1c1e; --bg-elev: #2c2c2e; --bg-sheet: #1c1c1e; --bg-inset: #1c1c1e; --sheet-list: #2c2c2e;
    --label: #ffffff; --label-2: rgba(235, 235, 245, 0.62); --label-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.55); --fill: rgba(118, 118, 128, 0.24); --fill-2: rgba(118, 118, 128, 0.36);
    --tint: #8ed11a; --tint-fill: #7abd00; --img-line: rgba(255, 255, 255, 0.08);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 22px rgba(0, 0, 0, 0.45);
    --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.5), 0 22px 60px rgba(0, 0, 0, 0.6);
    --dim: rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(44, 44, 48, 0.52); --glass-line: rgba(255, 255, 255, 0.13); --glass-hi: rgba(255, 255, 255, 0.28);
    --glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.5);
    --side-bg: rgba(28, 28, 31, 0.72); --edge: rgba(255, 255, 255, 0.14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-grouped: #000000; --bg-card: #1c1c1e; --bg-elev: #2c2c2e; --bg-sheet: #1c1c1e; --bg-inset: #1c1c1e; --sheet-list: #2c2c2e;
  --label: #ffffff; --label-2: rgba(235, 235, 245, 0.62); --label-3: rgba(235, 235, 245, 0.3);
  --sep: rgba(84, 84, 88, 0.55); --fill: rgba(118, 118, 128, 0.24); --fill-2: rgba(118, 118, 128, 0.36);
  --tint: #8ed11a; --tint-fill: #7abd00; --img-line: rgba(255, 255, 255, 0.08);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 22px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.5), 0 22px 60px rgba(0, 0, 0, 0.6);
  --dim: rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(44, 44, 48, 0.52); --glass-line: rgba(255, 255, 255, 0.13); --glass-hi: rgba(255, 255, 255, 0.28);
  --glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.5);
  --side-bg: rgba(28, 28, 31, 0.72); --edge: rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

/* ───────── основа: никакого «сайта» ───────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
body {
  margin: 0;
  position: fixed; inset: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--label);
  font: 400 17px/1.29 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
  text-rendering: optimizeLegibility;
}
html.apple body { letter-spacing: normal; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; -webkit-touch-callout: none; display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: default; letter-spacing: inherit; }
button:disabled { opacity: 0.4; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
.ic { width: 22px; height: 22px; flex: none; }
::selection { background: color-mix(in srgb, var(--brand) 35%, transparent); }

/* ───────── типографика (Dynamic Type, iPad) ───────── */
.t-display { font-size: 50px; line-height: 1.06; font-weight: 800; letter-spacing: -0.028em; }
.t-large { font-size: 34px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.t-title1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.018em; }
.t-title2 { font-size: 22px; line-height: 1.27; font-weight: 700; letter-spacing: -0.014em; }
.t-title3 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.012em; }
.t-headline { font-size: 17px; line-height: 1.29; font-weight: 600; }
.t-body { font-size: 17px; line-height: 1.35; }
.t-callout { font-size: 16px; line-height: 1.32; }
.t-sub { font-size: 15px; line-height: 1.33; }
.t-foot { font-size: 13px; line-height: 1.38; }
.t-cap { font-size: 12px; line-height: 1.33; }
html.apple .t-display, html.apple .t-large, html.apple .t-title1, html.apple .t-title2 { letter-spacing: -0.01em; }
.c2 { color: var(--label-2); }
.c3 { color: var(--label-3); }
.tint { color: var(--tint); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pretty { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }

/* ───────── стекло ───────── */
.glass, .glass-btn, .glass-cap {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  backdrop-filter: blur(22px) saturate(190%);
  box-shadow: inset 0 0.5px 0 var(--glass-hi), inset 0 0 0 0.5px var(--glass-line), var(--glass-shadow);
}
.glass-btn {
  position: relative;
  width: 44px; height: 44px; border-radius: 22px;
  display: inline-grid; place-items: center;
  color: var(--label);
  transition: transform 0.5s var(--spring-b), background-color 0.2s;
  flex: none;
}
.glass-btn .ic { width: 21px; height: 21px; stroke-width: 2; }
.glass-btn.pressed { transform: scale(1.14); }
.glass-btn.tinted { background: var(--tint-fill); color: var(--on-tint); box-shadow: inset 0 0.5px 0 rgba(255,255,255,.55), 0 6px 20px color-mix(in srgb, var(--brand) 40%, transparent); }
.glass-btn .badge-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 5px; background: var(--orange); box-shadow: 0 0 0 2px var(--bg); }
.glass-cap {
  height: 44px; border-radius: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; gap: 0;
}
.glass-cap > button { height: 44px; min-width: 44px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 22px; font-weight: 600; font-size: 16px; transition: transform .5s var(--spring-b); }
.glass-cap > button.pressed { transform: scale(1.1); }
.glass-cap > button .ic { width: 21px; height: 21px; stroke-width: 2; }
.glass-cap > button.on { color: var(--tint); }

/* стекло поверх фото — «прозрачный» вариант */
.over-photo .glass-btn, .over-photo .glass-cap {
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.45), inset 0 0 0 0.5px rgba(255, 255, 255, 0.22), 0 4px 18px rgba(0, 0, 0, 0.18);
}
.over-photo .glass-cap > button.on { color: #c6f36a; }

/* ───────── кнопки ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border-radius: 25px;
  font-size: 17px; font-weight: 600;
  background: var(--fill); color: var(--tint);
  transition: transform 0.45s var(--spring), opacity 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.btn .ic { width: 21px; height: 21px; stroke-width: 2; }
.btn.pressed { transform: scale(0.96); opacity: 0.85; }
.btn.prominent { background: var(--tint-fill); color: var(--on-tint); }
.btn.label { color: var(--label); }
.btn.on { color: var(--label); }
.btn.on .ic { color: var(--tint); }
.btn.plain { background: none; padding: 0 8px; height: 44px; }
.btn.small { height: 36px; padding: 0 15px; font-size: 15px; border-radius: 18px; gap: 6px; }
.btn.small .ic { width: 18px; height: 18px; }
.btn.big { height: 56px; border-radius: 28px; font-size: 18px; width: 100%; }
.btn.danger { color: var(--red); }
.linkbtn { color: var(--tint); font-weight: 400; font-size: 17px; display: inline-flex; align-items: center; gap: 2px; height: 44px; }
.linkbtn .ic { width: 15px; height: 15px; stroke-width: 2.4; }

/* ───────── каркас приложения ───────── */
#app { position: absolute; inset: 0; }
.app { position: absolute; inset: 0; background: var(--bg); }

.sidebar {
  position: absolute; z-index: 30;
  top: var(--gap-side); bottom: var(--gap-side); left: calc(var(--gap-side) + var(--safe-l));
  width: var(--side-w);
  border-radius: 28px;
  background: var(--side-bg);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  box-shadow: inset 0 0.5px 0 var(--glass-hi), inset 0 0 0 0.5px var(--glass-line), 0 1px 3px rgba(0,0,0,.05), 0 10px 40px rgba(0, 0, 0, 0.08);
  display: flex; flex-direction: column;
  transition: transform 0.6s var(--spring), opacity 0.3s;
  overflow: hidden;
}
.side-hidden .sidebar { transform: translateX(calc(-100% - 24px)); opacity: 0; pointer-events: none; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 4px) 12px 4px 20px; min-height: 64px; }
.wordmark { font-weight: 800; font-size: 17px; letter-spacing: 0.02em; display: inline-flex; gap: 5px; align-items: baseline; }
.wordmark b { font-weight: 800; }
.wordmark span { color: var(--tint); font-weight: 700; }
.side-head .glass-btn { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--label-2); }
.side-search {
  margin: 4px 14px 10px; height: 40px; border-radius: 20px; padding: 0 12px;
  display: flex; align-items: center; gap: 8px; color: var(--label-2);
  background: var(--fill); font-size: 17px;
}
.side-search .ic { width: 19px; height: 19px; }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 10px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.side-scroll::-webkit-scrollbar { display: none; }
.side-group { margin-top: 14px; }
.side-group h3 { font-size: 15px; font-weight: 600; color: var(--label-2); padding: 0 10px 6px; letter-spacing: -0.01em; }
.side-item {
  width: 100%; min-height: 46px; padding: 6px 10px; border-radius: 14px;
  display: flex; align-items: center; gap: 12px; text-align: left;
  font-size: 17px; color: var(--label);
  transition: background-color 0.2s, transform 0.4s var(--spring);
}
.side-item .ic { width: 22px; height: 22px; color: var(--tint); }
.side-item .art { width: 34px; height: 34px; border-radius: 9px; background: var(--fill) center/cover; flex: none; box-shadow: inset 0 0 0 0.5px var(--img-line); }
.side-item .lbl { flex: 1; min-width: 0; line-height: 1.2; }
.side-item .cnt { color: var(--label-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.side-item.on { background: var(--fill-2); font-weight: 600; }
.side-item.pressed { transform: scale(0.98); }
.side-foot { padding: 10px 12px calc(12px + var(--safe-b)); border-top: 0.5px solid var(--sep); }
.side-user { width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 14px; text-align: left; }
.avatar { width: 38px; height: 38px; border-radius: 19px; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #000; background: linear-gradient(160deg, #a6e03a, #6aa600); flex: none; box-shadow: inset 0 0.5px 0 rgba(255,255,255,.6); }
.side-user .nm { font-weight: 600; font-size: 16px; }
.side-user .sub { font-size: 13px; color: var(--label-2); display: flex; align-items: center; gap: 4px; }
.side-user .sub .ic { width: 15px; height: 15px; }
.side-user .chev { color: var(--label-3); margin-left: auto; width: 16px; height: 16px; }

.stage {
  position: absolute; top: 0; bottom: 0; right: 0;
  left: calc(var(--side-w) + var(--gap-side) * 2 + var(--safe-l));
  overflow: hidden;
  transition: left 0.6s var(--spring);
  contain: strict;
}
.side-hidden .stage { left: 0; }
.side-scrim { position: absolute; inset: 0; z-index: 25; background: var(--dim); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.edge-swipe { position: absolute; z-index: 20; left: 0; top: 0; bottom: 0; width: 22px; touch-action: none; }

/* ───────── экран (элемент стека навигации) ───────── */
.screen {
  position: absolute; inset: 0;
  background: var(--bg);
  overflow: hidden;
  will-change: transform;
}
.screen.grouped { background: var(--bg-grouped); }
.screen.inactive { visibility: hidden; pointer-events: none; }
.screen.pushed-in { box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12); }
.scroller {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  padding-bottom: calc(48px + var(--safe-b));
}
.nav-dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; }

.navbar {
  position: absolute; z-index: 10; top: 0; left: 0; right: 0;
  height: calc(var(--safe-t) + var(--nav-h) + 8px);
  padding: calc(var(--safe-t) + 8px) 18px 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  pointer-events: none;
}
.navbar > * { pointer-events: auto; }
.navbar::before {
  /* мягкий край прокрутки (scroll edge effect) */
  content: ""; position: absolute; inset: 0 0 -26px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 55%, transparent 100%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  opacity: 0; transition: opacity 0.25s;
}
.screen.grouped .navbar::before { background: linear-gradient(to bottom, var(--bg-grouped) 0%, color-mix(in srgb, var(--bg-grouped) 82%, transparent) 55%, transparent 100%); }
.screen.scrolled .navbar::before { opacity: 1; }
.nb-side { display: flex; gap: 10px; align-items: center; min-width: 44px; }
.nb-side.right { justify-content: flex-end; }
.nb-title {
  position: absolute; left: 50%; top: calc(var(--safe-t) + 8px); height: 44px; transform: translateX(-50%);
  max-width: 46%; display: flex; align-items: center;
  font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.screen.scrolled .nb-title { opacity: 1; }
.screen.hero-screen:not(.scrolled) .navbar { color: #fff; }

.lt { padding: calc(var(--safe-t) + var(--nav-h) + 14px) var(--pad) 18px; }
.lt h1 { font-size: 34px; line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; }
html.apple .lt h1 { letter-spacing: -0.008em; }
.lt .lt-sub { margin-top: 6px; font-size: 17px; color: var(--label-2); }
.wrap { padding: 0 var(--pad); }

/* ───────── главная: витрина ───────── */
.showcase { position: relative; padding-top: calc(var(--safe-t) + var(--nav-h) + 6px); }
.show-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 4px var(--pad) 16px; }
.show-head .date { font-size: 13px; font-weight: 600; color: var(--label-2); letter-spacing: 0.01em; margin-bottom: 2px; }
.show-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.carousel {
  display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad);
  padding: 0 var(--pad) 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar { display: none; }
.dcard {
  position: relative; flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always;
  height: clamp(420px, 56vh, 600px);
  border-radius: var(--r-hero); overflow: hidden;
  background: #111; color: #fff; text-align: left;
  transition: transform 0.5s var(--spring);
  isolation: isolate;
  box-shadow: var(--shadow-1);
}
.dcard.pressed { transform: scale(0.985); }
.dcard .ph { position: absolute; inset: -2% -8%; background: center/cover no-repeat; z-index: -2; }
@supports (animation-timeline: view(inline)) {
  .dcard .ph { animation: parallax linear both; animation-timeline: view(inline); }
  @keyframes parallax { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
}
.dcard::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 38%, rgba(0,0,0,0.22) 58%, rgba(0,0,0,0.72) 100%);
}
.dcard .dc-text { position: absolute; left: 36px; right: 36px; bottom: 32px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.dcard h2 { font-size: 50px; line-height: 1.04; font-weight: 800; letter-spacing: -0.03em; max-width: 13ch; text-wrap: balance; text-shadow: 0 1px 24px rgba(0,0,0,0.25); }
html.apple .dcard h2 { letter-spacing: -0.02em; }
.dcard .brands { margin-top: 12px; font-size: 17px; font-weight: 500; color: rgba(255, 255, 255, 0.86); }
.dcard .go {
  flex: none; height: 50px; padding: 0 22px; border-radius: 25px; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 17px; color: #fff;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,.55), inset 0 0 0 0.5px rgba(255,255,255,.25);
}
.dcard .go .ic { width: 17px; height: 17px; stroke-width: 2.4; }
.pager { display: flex; justify-content: center; gap: 8px; padding: 14px 0 0; }
.pager i { width: 8px; height: 8px; border-radius: 4px; background: var(--label-3); transition: width 0.45s var(--spring), background-color 0.3s; }
.pager i.on { width: 24px; background: var(--label); }

/* ───────── полки (как в App Store) ───────── */
.shelf { margin-top: 36px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--pad) 12px; gap: 16px; }
.shelf-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.014em; }
.shelf-head .sh-sub { font-size: 15px; color: var(--label-2); margin-top: 2px; }
.shelf-row {
  display: grid; grid-auto-flow: column; gap: 18px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad);
  padding: 2px var(--pad) 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row > * { scroll-snap-align: start; }
.shelf-row.cols-3 { grid-auto-columns: calc((100% - var(--pad) * 2 - 36px) / 3); }
.shelf-row.cols-4 { grid-auto-columns: calc((100% - var(--pad) * 2 - 54px) / 4); }
.shelf-row.cols-5 { grid-auto-columns: calc((100% - var(--pad) * 2 - 72px) / 5); }
.shelf-row.cols-6 { grid-auto-columns: calc((100% - var(--pad) * 2 - 90px) / 6); }

/* обложка: фото сцены — cover, студийное фото на белом — contain на белом */
.art {
  position: relative; overflow: hidden;
  background-color: var(--fill); background-position: center; background-size: cover; background-repeat: no-repeat;
  border-radius: var(--r-card);
}
.art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0.5px var(--img-line); pointer-events: none; }
.art.studio { background-color: var(--studio); background-size: contain; background-origin: content-box; padding: 7%; }
.art img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s; }
.art img.ok { opacity: 1; }
.art.studio img { object-fit: contain; }
.art .art-ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--label-3); }
.art .art-ic .ic { width: 40px; height: 40px; stroke-width: 1.4; }

.pcard { display: block; text-align: left; width: 100%; transition: transform 0.45s var(--spring), opacity 0.2s; }
.pcard.pressed { transform: scale(0.97); opacity: 0.9; }
.pcard .art { aspect-ratio: 4 / 3; box-shadow: var(--shadow-1); }
.pcard .pc-title { margin-top: 11px; font-size: 17px; font-weight: 600; line-height: 1.25; }
.pcard .pc-sub { margin-top: 3px; font-size: 15px; color: var(--label-2); }
.pcard .loc-pill { position: absolute; z-index: 2; top: 10px; left: 10px; }

.bcard { position: relative; display: block; width: 100%; text-align: left; transition: transform 0.45s var(--spring); }
.bcard.pressed { transform: scale(0.97); }
.bcard .art { aspect-ratio: 16 / 11; border-radius: 22px; box-shadow: var(--shadow-1); }
.bcard .art::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.62)); }
.bcard .bc-text { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 15px; color: #fff; }
.bcard .bc-name { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.bcard .bc-sub { margin-top: 3px; font-size: 15px; color: rgba(255,255,255,.85); }
.bcard .pill { position: absolute; z-index: 2; top: 12px; right: 12px; }

.pill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 13px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  background: rgba(255, 196, 0, 0.95); color: #1d1500;
}
.pill.glassy { background: rgba(0,0,0,.28); color: #fff; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.3); }
.pill.local { background: var(--tint-fill); color: #000; }
.pill.soft { background: var(--fill); color: var(--label-2); }

/* документ как книга */
.doc { display: block; text-align: left; width: 100%; transition: transform 0.45s var(--spring); }
.doc.pressed { transform: scale(0.97); }
.doc .cover {
  position: relative; aspect-ratio: 3 / 4; border-radius: 6px 10px 10px 6px; overflow: hidden;
  background: var(--fill) center/cover no-repeat;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 10px 26px rgba(0,0,0,.18);
}
.doc .cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(255,255,255,.12) 3%, transparent 6%); }
.doc .cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0.5px rgba(0,0,0,.12); }
.doc .cover .art-ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--label-3); }
.doc .d-title { margin-top: 12px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.doc .d-sub { margin-top: 2px; font-size: 13px; color: var(--label-2); }
.doc .pill { position: absolute; top: 8px; right: 8px; }

/* сетки */
.grid { display: grid; gap: 30px 20px; padding: 0 var(--pad); }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sec-h { padding: 34px var(--pad) 14px; font-size: 22px; font-weight: 700; letter-spacing: -0.014em; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-h .ct { font-size: 15px; font-weight: 400; color: var(--label-2); }

/* ───────── шапка-фото (растягивается при оттягивании) ───────── */
.hero { position: relative; height: clamp(380px, 52vh, 560px); overflow: hidden; background: #111; color: #fff; }
.hero .hero-ph { position: absolute; inset: 0; background: center/cover no-repeat; transform-origin: 50% 100%; will-change: transform; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 46%, rgba(0,0,0,.66) 100%); pointer-events: none; }
.hero .hero-text { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: 28px; }
.hero h1 { font-size: 46px; line-height: 1.05; font-weight: 800; letter-spacing: -0.028em; text-wrap: balance; max-width: 18ch; }
html.apple .hero h1 { letter-spacing: -0.018em; }
.hero .hero-sub { margin-top: 10px; font-size: 17px; color: rgba(255,255,255,.88); max-width: 60ch; }
.hero .pill { margin-left: 10px; vertical-align: middle; }

/* сегменты (выбор бренда) */
.seg-wrap { position: sticky; top: calc(var(--safe-t) + 8px); z-index: 8; display: flex; justify-content: center; padding: 18px var(--pad) 4px; pointer-events: none; }
.seg {
  pointer-events: auto;
  position: relative; display: inline-flex; padding: 3px; border-radius: 22px; gap: 2px;
  background: var(--fill);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg.glass { background: var(--glass-bg); }
.seg button {
  position: relative; z-index: 1; height: 38px; padding: 0 18px; border-radius: 19px;
  font-size: 15px; font-weight: 500; white-space: nowrap; color: var(--label);
  transition: color 0.2s, transform 0.4s var(--spring);
}
.seg button.on { font-weight: 600; }
.seg .thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; border-radius: 19px;
  background: var(--bg-elev); box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 0 0 0.5px rgba(0,0,0,.04);
  transition: left 0.5s var(--spring), width 0.5s var(--spring);
}
.seg.small button { height: 32px; padding: 0 14px; font-size: 14px; }
.seg.small .thumb { border-radius: 16px; }

/* ───────── товар ───────── */
.pgallery { position: relative; height: clamp(420px, 60vh, 640px); background: var(--bg-grouped); }
.pgallery .strip { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.pgallery .strip::-webkit-scrollbar { display: none; }
.pgallery .slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; background: center/cover no-repeat #111; position: relative; }
.pgallery .slide.studio { background-color: #fff; background-size: contain; background-origin: content-box; padding: calc(var(--safe-t) + 64px) 9% 56px; }
.pgallery .slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,0) 24%); pointer-events: none; }
.pgallery .slide.studio::after { background: none; }
.pgallery .pg-count { position: absolute; z-index: 3; right: var(--pad); bottom: 18px; }
.pgallery .dots { position: absolute; z-index: 3; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 7px; padding: 7px 10px; border-radius: 14px; background: rgba(0,0,0,.22); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.pgallery .dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.5); transition: width .45s var(--spring), background-color .3s; }
.pgallery .dots i.on { width: 20px; background: #fff; }
.pgallery.empty { height: calc(var(--safe-t) + var(--nav-h) + 10px); background: none; }

.ptitle { padding: 26px var(--pad) 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 36px; align-items: start; }
.ptitle .brand-link { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; color: var(--tint); }
.ptitle .brand-link .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.ptitle h1 { margin-top: 6px; font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
html.apple .ptitle h1 { letter-spacing: -0.008em; }
.ptitle .desc { margin-top: 12px; font-size: 19px; line-height: 1.42; color: var(--label-2); max-width: 62ch; text-wrap: pretty; }
.ptitle .pill { margin-top: 12px; }
.pact { display: flex; flex-direction: column; gap: 10px; min-width: 250px; padding-top: 30px; }
.pact .btn { width: 100%; }

.facts { margin: 28px var(--pad) 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-radius: 20px; background: var(--bg-grouped); overflow: hidden; }
.screen.grouped .facts { background: var(--bg-card); }
.fact { padding: 16px 18px; position: relative; }
.fact + .fact::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 0.5px; background: var(--sep); }
.fact .f-k { font-size: 13px; color: var(--label-2); }
.fact .f-v { margin-top: 4px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fact .f-v .ic { width: 20px; height: 20px; color: var(--tint); vertical-align: -3px; margin-right: 4px; }

.thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 0 var(--pad); }
.thumbs .art { aspect-ratio: 1; border-radius: 10px; }
.thumbs button { display: block; transition: transform .45s var(--spring); position: relative; }
.thumbs button.pressed { transform: scale(0.95); }
.thumbs .cap { position: absolute; left: 6px; right: 6px; bottom: 6px; z-index: 2; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.thumbs .pill { position: absolute; z-index: 2; top: 6px; left: 6px; height: 20px; font-size: 11px; padding: 0 7px; }

/* ───────── списки iOS (grouped inset) ───────── */
.list { margin: 0 var(--pad); border-radius: 16px; background: var(--bg-card); overflow: hidden; }
.screen:not(.grouped) .list { background: var(--bg-grouped); }
.list-h { padding: 26px calc(var(--pad) + 18px) 8px; font-size: 15px; color: var(--label-2); }
.list-f { padding: 8px calc(var(--pad) + 18px) 0; font-size: 13px; color: var(--label-2); line-height: 1.4; }
.row {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 8px 18px; width: 100%; text-align: left; font-size: 17px;
}
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 18px; height: 0.5px; background: var(--sep); }
.row.has-ic + .row::before, .row + .row.has-ic::before { left: 62px; }
.row .r-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.row .r-ic .ic { width: 19px; height: 19px; stroke-width: 2; }
.row .r-main { flex: 1; min-width: 0; }
.row .r-sub { font-size: 13px; color: var(--label-2); margin-top: 1px; }
.row .r-val { color: var(--label-2); font-variant-numeric: tabular-nums; text-align: right; }
.row .r-chev { width: 15px; height: 15px; color: var(--label-3); stroke-width: 2.4; }
.row .r-check { width: 20px; height: 20px; color: var(--tint); stroke-width: 2.6; }
.row.tap { transition: background-color 0.15s; }
.row.tap.pressed { background: var(--fill); }
.row.danger { color: var(--red); }
.row.tinted { color: var(--tint); }
.row input.input { flex: 1; background: none; border: 0; height: 36px; padding: 0; font: inherit; color: var(--label); }
.row .seg { flex: none; }
.ic-green { background: #34c759; } .ic-blue { background: #0a84ff; } .ic-orange { background: #ff9500; } .ic-gray { background: #8e8e93; }
.ic-purple { background: #af52de; } .ic-red { background: #ff3b30; } .ic-brand { background: var(--tint-fill); color: #000 !important; } .ic-indigo { background: #5e5ce6; } .ic-teal { background: #30b0c7; }

/* переключатель iOS */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--fill-2); transition: background-color 0.25s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform 0.45s var(--spring); }
.switch input:checked + i { background: #34c759; }
.switch input:checked + i::after { transform: translateX(20px); }

.input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 0;
  background: var(--fill); color: var(--label); font: 400 17px var(--font); letter-spacing: inherit;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--label-3); }
select.input { background-image: none; }

/* ───────── поиск ───────── */
.sfield-wrap { padding: 4px var(--pad) 8px; position: sticky; top: calc(var(--safe-t) + 4px); z-index: 9; }
.sfield {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 26px;
  color: var(--label-2);
}
.sfield .ic { width: 21px; height: 21px; }
.sfield input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: 400 19px var(--font); color: var(--label); letter-spacing: inherit; }
.sfield input::placeholder { color: var(--label-2); }
.sfield input::-webkit-search-cancel-button { display: none; }
.sfield .clear { width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: var(--label-3); color: var(--bg); }
.sfield .clear .ic { width: 14px; height: 14px; stroke-width: 3; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 var(--pad); }
.chip { height: 40px; padding: 0 16px; border-radius: 20px; background: var(--fill); display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; transition: transform .45s var(--spring); }
.chip.pressed { transform: scale(0.95); }
.chip .ic { width: 18px; height: 18px; color: var(--label-2); }
.tophit { margin: 0 var(--pad); display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: center; padding: 16px; border-radius: 24px; background: var(--bg-grouped); text-align: left; width: calc(100% - var(--pad) * 2); transition: transform .45s var(--spring); }
.tophit.pressed { transform: scale(0.985); }
.tophit .art { aspect-ratio: 4/3; }
.tophit .th-k { font-size: 13px; font-weight: 600; color: var(--tint); }
.tophit .th-t { margin-top: 4px; font-size: 28px; font-weight: 700; letter-spacing: -0.018em; line-height: 1.15; }
.tophit .th-d { margin-top: 8px; font-size: 16px; color: var(--label-2); }
.hits { margin: 0 var(--pad); border-radius: 16px; background: var(--bg-grouped); overflow: hidden; }
.hit { display: flex; gap: 16px; padding: 14px 18px; width: 100%; text-align: left; position: relative; align-items: flex-start; }
.hit + .hit::before { content: ""; position: absolute; top: 0; right: 0; left: 98px; height: 0.5px; background: var(--sep); }
.hit .h-cov { width: 64px; flex: none; aspect-ratio: 3/4; border-radius: 4px 6px 6px 4px; background: var(--fill) center/cover; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.12); }
.hit .h-t { font-weight: 600; font-size: 16px; }
.hit .h-p { color: var(--tint); font-weight: 600; font-size: 14px; margin-top: 2px; }
.hit .h-s { margin-top: 5px; font-size: 15px; color: var(--label-2); line-height: 1.4; }
.hit mark { background: color-mix(in srgb, var(--brand) 32%, transparent); color: var(--label); border-radius: 3px; padding: 0 1px; }
.hit.pressed { background: var(--fill); }
.empty-state { padding: 80px var(--pad); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-state .es-ic { width: 72px; height: 72px; border-radius: 36px; display: grid; place-items: center; background: var(--fill); color: var(--label-2); margin-bottom: 8px; }
.empty-state .es-ic .ic { width: 34px; height: 34px; stroke-width: 1.6; }
.empty-state h2 { font-size: 22px; font-weight: 700; }
.empty-state p { font-size: 17px; color: var(--label-2); max-width: 46ch; text-wrap: pretty; }
.empty-state .btn { margin-top: 14px; }

/* подборки: мозаика как альбомы в «Фото» */
.fcard { display: block; width: 100%; text-align: left; transition: transform .45s var(--spring); position: relative; }
.fcard.pressed { transform: scale(0.97); }
.mosaic { aspect-ratio: 1; border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; background: var(--fill); box-shadow: var(--shadow-1); position: relative; }
.mosaic > div { background: var(--fill) center/cover no-repeat; }
.mosaic.m1 > div:first-child { grid-column: 1 / 3; grid-row: 1 / 3; }
.mosaic.m2 > div { grid-row: 1 / 3; }
.mosaic.m3 > div:first-child { grid-row: 1 / 3; }
.mosaic .art-ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--label-3); }
.mosaic .art-ic .ic { width: 44px; height: 44px; stroke-width: 1.3; }
.fcard .f-name { margin-top: 11px; font-weight: 600; font-size: 17px; }
.fcard .f-sub { margin-top: 2px; font-size: 15px; color: var(--label-2); }
.fcard .rm { position: absolute; z-index: 3; top: -8px; left: -8px; width: 30px; height: 30px; border-radius: 15px; background: var(--bg-elev); color: var(--red); display: grid; place-items: center; box-shadow: var(--shadow-1); animation: pop .5s var(--spring-b); }
.fcard .rm .ic { width: 16px; height: 16px; stroke-width: 3; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.editing .fcard > :not(.rm) { animation: jiggle .32s ease-in-out infinite alternate; }
.editing .fcard:nth-child(2n) > :not(.rm) { animation-delay: -.16s; }
@keyframes jiggle { from { transform: rotate(-0.7deg); } to { transform: rotate(0.7deg); } }
.new-card { aspect-ratio: 1; border-radius: 20px; display: grid; place-items: center; align-content: center; gap: 10px; width: 100%; color: var(--tint); font-weight: 600; border: 1.5px dashed color-mix(in srgb, var(--tint) 55%, transparent); transition: transform .45s var(--spring); }
.new-card.pressed { transform: scale(0.97); }
.new-card .ic { width: 34px; height: 34px; stroke-width: 1.8; }
.pcard .new-card { aspect-ratio: 4/3; }

.contact { margin: 44px var(--pad) 0; padding: 22px 24px; border-radius: 24px; background: var(--bg-grouped); display: flex; align-items: center; gap: 20px; }
.contact .c-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--tint-fill); color: #000; flex: none; }
.contact .c-ic .ic { width: 26px; height: 26px; stroke-width: 1.9; }
.contact .c-t { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.contact .c-s { color: var(--label-2); font-size: 15px; margin-top: 3px; }
.contact .c-phone { margin-left: auto; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ───────── всплывающие слои ───────── */
.layer { position: fixed; inset: 0; z-index: 100; }
.scrim { position: absolute; inset: 0; background: var(--dim); opacity: 0; }
.fsheet {
  position: absolute; left: 50%; top: 50%;
  width: min(640px, calc(100vw - 48px)); max-height: min(calc(100dvh - 80px - var(--safe-t)), 860px);
  transform: translate(-50%, -50%);
  border-radius: 34px; overflow: hidden;
  background: var(--bg-sheet);
  box-shadow: var(--shadow-2), inset 0 0 0 0.5px var(--glass-line);
  display: flex; flex-direction: column;
}
.fsheet.wide { width: min(780px, calc(100vw - 48px)); }
.fsheet.tall { height: min(calc(100dvh - 80px - var(--safe-t)), 860px); }
.fs-bar { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 8px; min-height: 72px; }
.fs-bar h2 { position: absolute; left: 72px; right: 72px; text-align: center; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.fs-bar .glass-btn { background: var(--fill); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.fs-bar .glass-btn.tinted { background: var(--tint-fill); }
.fs-bar .grabber { position: absolute; top: 6px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--label-3); opacity: .7; }
.fs-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 28px; overscroll-behavior: contain; }
.fs-body .list { margin: 0 20px; }
.fs-body .list-h { padding-left: 38px; padding-right: 38px; }
.fs-body .list-f { padding-left: 38px; padding-right: 38px; }
.fs-body .pad { padding: 0 20px; }

.popover {
  position: absolute; z-index: 2; width: 340px; max-height: 60vh; overflow-y: auto;
  border-radius: 24px; padding: 6px 0;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%);
  box-shadow: inset 0 0.5px 0 var(--glass-hi), inset 0 0 0 0.5px var(--glass-line), var(--shadow-2);
  transform-origin: var(--ox, 50%) var(--oy, 0%);
}
.popover .pop-h { padding: 10px 18px 6px; font-size: 13px; color: var(--label-2); font-weight: 600; }
.popover .row { min-height: 48px; padding: 8px 18px; }
.popover .row + .row::before { left: 18px; }
.popover .row.pressed { background: var(--fill); }

.alert {
  position: absolute; left: 50%; top: 50%; width: 300px; transform: translate(-50%, -50%);
  border-radius: 26px; overflow: hidden; text-align: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%);
  box-shadow: inset 0 0.5px 0 var(--glass-hi), inset 0 0 0 0.5px var(--glass-line), var(--shadow-2);
}
.alert .a-body { padding: 22px 20px 18px; }
.alert .a-t { font-size: 17px; font-weight: 600; line-height: 1.3; }
.alert .a-m { margin-top: 6px; font-size: 14px; color: var(--label-2); line-height: 1.35; }
.alert .input { margin-top: 14px; height: 40px; border-radius: 10px; font-size: 16px; background: var(--fill); }
.alert .a-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 14px; }
.alert .a-btns .btn { height: 46px; border-radius: 23px; font-size: 17px; }
.alert .a-btns .btn.label { color: var(--label); }
.alert .a-btns .btn.danger { background: var(--red); color: #fff; }

.hud {
  position: fixed; z-index: 200; left: 50%; top: calc(var(--safe-t) + 10px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 8px 22px 8px 12px; border-radius: 24px; max-width: min(560px, 90vw);
  font-size: 15px; font-weight: 600;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(30px) saturate(200%); backdrop-filter: blur(30px) saturate(200%);
  box-shadow: inset 0 0.5px 0 var(--glass-hi), inset 0 0 0 0.5px var(--glass-line), var(--shadow-2);
  pointer-events: none;
}
.hud .h-ic { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; background: var(--tint-fill); color: #000; flex: none; }
.hud .h-ic .ic { width: 18px; height: 18px; stroke-width: 2.4; }

.status {
  position: absolute; z-index: 40; left: 50%; bottom: calc(18px + var(--safe-b));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 8px 0 18px; border-radius: 28px; max-width: min(620px, 92%);
  font-size: 15px; font-weight: 600;
}
.status .s-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status .btn { height: 40px; border-radius: 20px; padding: 0 16px; font-size: 15px; }
.status .x { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; color: var(--label-2); }
.status .x .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.ring { width: 28px; height: 28px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .bg { stroke: var(--fill-2); }
.ring .fg { stroke: var(--tint-fill); stroke-linecap: round; transition: stroke-dashoffset .3s; }

/* ───────── вход, загрузка, замок ───────── */
.gate { position: fixed; inset: 0; z-index: 300; background: #000; color: #fff; display: grid; place-items: center; overflow: hidden; }
.gate .g-bg { position: absolute; inset: -40px; background: center/cover no-repeat; filter: blur(40px) saturate(140%) brightness(0.5); transform: scale(1.1); }
.gate .g-bg.plain { filter: none; background: radial-gradient(120% 80% at 50% 0%, #1f3300 0%, #0a1100 38%, #000 70%); transform: none; }
.gate-card { position: relative; width: min(520px, calc(100vw - 48px)); text-align: center; }
.app-icon { width: 108px; height: 108px; border-radius: 26px; margin: 0 auto; background: center/cover url("../icons/icon-512.png"); box-shadow: 0 12px 40px rgba(0,0,0,.45), inset 0 0 0 0.5px rgba(255,255,255,.15); }
.gate h1 { margin-top: 26px; font-size: 38px; font-weight: 800; letter-spacing: -0.026em; line-height: 1.1; text-wrap: balance; }
html.apple .gate h1 { letter-spacing: -0.012em; }
.gate .g-sub { margin-top: 10px; font-size: 17px; color: rgba(235,235,245,.66); text-wrap: pretty; }
.features { margin: 34px auto 0; text-align: left; display: grid; gap: 22px; max-width: 440px; }
.feature { display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: start; }
.feature .ic { width: 34px; height: 34px; color: var(--brand); stroke-width: 1.6; }
.feature b { display: block; font-size: 17px; font-weight: 600; }
.feature span { display: block; font-size: 15px; color: rgba(235,235,245,.62); margin-top: 2px; line-height: 1.35; }
.gate .g-form { margin: 30px auto 0; max-width: 440px; display: grid; gap: 12px; text-align: left; }
.gate .g-list { border-radius: 16px; overflow: hidden; background: rgba(118,118,128,.24); }
.gate .g-list .row { color: #fff; }
.gate .g-list .row + .row::before { background: rgba(84,84,88,.6); }
.gate .g-list label { width: 130px; flex: none; color: rgba(235,235,245,.62); font-size: 17px; }
.gate .g-list .input { color: #fff; }
.gate .g-list .input::placeholder { color: rgba(235,235,245,.3); }
.gate .btn.prominent { margin-top: 10px; }
.gate .g-err { min-height: 22px; color: #ff6961; font-size: 15px; text-align: center; }
.gate .g-foot { margin-top: 26px; display: flex; justify-content: center; }
.gate .seg { background: rgba(118,118,128,.24); }
.gate .seg button { color: #fff; }
.gate .seg .thumb { background: #636366; }
.gate .btn.ghost { background: none; color: rgba(235,235,245,.7); }

.dl-ring { width: 150px; height: 150px; margin: 34px auto 0; position: relative; }
.dl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dl-ring circle { fill: none; stroke-width: 8; }
.dl-ring .bg { stroke: rgba(118,118,128,.32); }
.dl-ring .fg { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .4s var(--ease); }
.dl-ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.gate .g-line { margin-top: 18px; font-size: 15px; color: rgba(235,235,245,.62); font-variant-numeric: tabular-nums; }

.lock-card { width: 380px; }
.lock-card .l-ic { width: 26px; height: 26px; margin: 0 auto 14px; color: #fff; }
.lock-card h1 { margin-top: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.dots { display: flex; justify-content: center; gap: 20px; margin: 22px 0 6px; min-height: 16px; }
.dots i { width: 14px; height: 14px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px #fff; transition: background-color .12s; }
.dots i.on { background: #fff; }
.dots.shake { animation: shake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(5px); } 30%, 50%, 70% { transform: translateX(-11px); } 40%, 60% { transform: translateX(11px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 82px); gap: 18px 28px; justify-content: center; margin-top: 30px; }
.key {
  width: 82px; height: 82px; border-radius: 41px;
  display: grid; place-items: center;
  font-size: 36px; font-weight: 400; color: #fff; font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,.35), inset 0 0 0 0.5px rgba(255,255,255,.12);
  transition: background-color .35s, transform .35s var(--spring);
}
.key.pressed { background: rgba(255,255,255,.45); transition: none; }
.key.plain { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; font-size: 17px; font-weight: 500; }
.key.plain .ic { width: 30px; height: 30px; stroke-width: 1.6; }
.key.plain.pressed { background: none; opacity: .5; }
.lock-err { min-height: 20px; margin-top: 8px; font-size: 15px; color: #ff6961; }

/* ───────── «Добавить» ───────── */
.src-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 20px; }
.src {
  position: relative; height: 112px; border-radius: 22px; background: var(--bg-card);
  display: grid; place-items: center; align-content: center; gap: 10px;
  font-weight: 600; font-size: 16px; overflow: hidden;
  transition: transform .45s var(--spring);
}
.src.pressed { transform: scale(0.96); }
.src .ic { width: 34px; height: 34px; color: var(--tint); stroke-width: 1.7; }
.src input { position: absolute; inset: 0; opacity: 0; }
.prev-row { display: flex; gap: 10px; padding: 14px 20px 0; overflow-x: auto; scrollbar-width: none; }
.prev-row::-webkit-scrollbar { display: none; }
.prev { position: relative; flex: none; width: 108px; height: 108px; border-radius: 16px; background: var(--fill) center/cover; animation: pop .45s var(--spring-b); }
.prev.doc { display: grid; place-items: center; background: var(--bg-card); color: var(--tint); }
.prev .x { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 13px; background: var(--bg-elev); color: var(--label); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.prev .x .ic { width: 13px; height: 13px; stroke-width: 3; }
.add-seg { display: flex; justify-content: center; padding: 22px 20px 0; }
.fsheet .seg .thumb { background: var(--bg-elev); }

/* ───────── галерея (PhotoSwipe) ───────── */
.pswp { --pswp-bg: #000; --pswp-placeholder-bg: #111; font-family: var(--font); }
.pswp__top-bar { height: calc(var(--safe-t) + 70px); padding: calc(var(--safe-t) + 12px) 16px 0; align-items: flex-start; gap: 10px; }
.pswp__button { width: 44px !important; height: 44px !important; margin: 0 !important; border-radius: 22px; display: grid !important; place-items: center; color: #fff; opacity: 1 !important;
  background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,.4), inset 0 0 0 0.5px rgba(255,255,255,.14); transition: transform .45s var(--spring-b); }
.pswp__button .pswp__icn { display: none; }
.pswp__button .ic { width: 21px; height: 21px; stroke-width: 2; }
.pswp__button.pressed { transform: scale(1.14); }
.pswp__button--zoom, .pswp__button--arrow { display: none !important; }
.pswp__counter { order: 2; margin: 0 auto 0 0 !important; height: 44px !important; line-height: 44px !important; padding: 0 16px; border-radius: 22px; font-size: 15px !important; font-weight: 600; opacity: 1 !important; color: #fff;
  background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font-variant-numeric: tabular-nums; }
.pswp__button--close { order: 1; }
.pswp__okt-caption { position: absolute; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); max-width: 80vw; padding: 10px 18px; border-radius: 20px;
  color: #fff; font-size: 15px; font-weight: 500; background: rgba(255,255,255,.12); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); text-align: center; }
.pswp__okt-caption:empty { display: none; }
.pswp-fav.on { color: #c6f36a; }

/* ───────── PDF ───────── */
.pdfv { position: fixed; inset: 0; z-index: 150; background: #2c2c2e; display: flex; flex-direction: column; }
:root:not([data-theme="dark"]) .pdfv { background: #e9e9ee; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pdfv { background: #1c1c1e; } }
:root[data-theme="dark"] .pdfv { background: #1c1c1e; }
.pdfv-bar { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 16px 0; pointer-events: none; }
.pdfv-bar > * { pointer-events: auto; }
.pdfv-title { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 10px); height: 44px; display: flex; align-items: center; padding: 0 20px; border-radius: 22px; max-width: 44%; font-size: 15px; font-weight: 600; pointer-events: none; }
.pdfv-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfv-bar .sp { flex: 1; }
.pdfv-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: calc(var(--safe-t) + 74px) 12px 80px; overscroll-behavior: contain; }
.pdfv-pages { margin: 0 auto; display: flex; flex-direction: column; transform-origin: 0 0; }
.pdfv-p { background: #fff; position: relative; margin: 0 auto; box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 6px 22px rgba(0,0,0,.12); border-radius: 2px; }
.pdfv-p canvas { width: 100%; height: 100%; display: block; }
.pdfv-loading { display: grid; place-items: center; height: 60vh; color: var(--label-2); font-size: 17px; }
.pdfv-page { position: absolute; z-index: 3; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); height: 40px; padding: 0 18px; border-radius: 20px; display: flex; align-items: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ───────── спиннер ───────── */
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fill-2); border-top-color: var(--label-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── портрет и узкие окна ───────── */
@media (max-width: 1099px) {
  :root { --pad: 24px; }
  .stage { left: 0; }
  .sidebar { box-shadow: inset 0 0.5px 0 var(--glass-hi), inset 0 0 0 0.5px var(--glass-line), var(--shadow-2); }
  .side-open .side-scrim { opacity: 1; pointer-events: auto; }
  .shelf-row.cols-4 { grid-auto-columns: calc((100% - var(--pad) * 2 - 36px) / 3); }
  .shelf-row.cols-5 { grid-auto-columns: calc((100% - var(--pad) * 2 - 54px) / 4); }
  .shelf-row.cols-6 { grid-auto-columns: calc((100% - var(--pad) * 2 - 72px) / 5); }
  .grid.g4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.g5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.g6 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .dcard h2 { font-size: 44px; }
}
@media (max-width: 760px) {
  :root { --pad: 16px; }
  .grid.g3, .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.g5, .grid.g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shelf-row.cols-3, .shelf-row.cols-4 { grid-auto-columns: 72%; }
  .shelf-row.cols-5, .shelf-row.cols-6 { grid-auto-columns: 42%; }
  .ptitle { grid-template-columns: 1fr; }
  .pact { padding-top: 0; }
  .dcard h2, .hero h1 { font-size: 34px; }
  .tophit { grid-template-columns: 1fr; }
  .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contact { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@media (hover: hover) and (pointer: fine) {
  .pcard:hover .art, .bcard:hover .art, .doc:hover .cover { filter: brightness(1.04); }
  .side-item:hover:not(.on) { background: var(--fill); }
}

/* служебное для панели навигации */
.nb-sidebtn { display: none !important; }
.side-hidden .nb-sidebtn { display: inline-grid !important; }
.is-root .nb-back { display: none !important; }
.seg-wrap { z-index: 11; padding: 18px 84px 4px; }
.sfield-wrap { top: calc(var(--safe-t) + var(--nav-h) + 6px); }
.over-photo .glass-btn, .over-photo .glass-cap { background: rgba(0, 0, 0, 0.24); }
.pgallery .slide { display: block; border: 0; padding: 0; }
.pgallery .slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.pgallery .slide img.ok { opacity: 1; }
.pgallery .slide.studio img { object-fit: contain; }
.fcard > .rm { cursor: default; }
.layer { z-index: 200000; }
.hud { z-index: 200100; }
.pswp__button--okt-share, .pswp__button--okt-fav { order: 3; }
.pswp__top-bar .pswp__button--close { order: 1; }
.pswp__counter { order: 2; }
.pdfv-bar .glass-cap > button.on { color: var(--tint); }
/* правки после просмотра */
input:focus, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
.popover { background: color-mix(in srgb, var(--bg-elev) 88%, transparent); }
.alert { background: color-mix(in srgb, var(--bg-elev) 90%, transparent); }
.pswp__preloader { order: 3; margin-right: auto; width: 44px; }
.pswp__counter { margin: 0 !important; }
.pswp__top-bar { justify-content: flex-start; }
.side-search.on { background: var(--fill-2); color: var(--label); }
.sfield { background: var(--fill); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.screen.scrolled .sfield { background: var(--glass-bg); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%); box-shadow: inset 0 0.5px 0 var(--glass-hi), inset 0 0 0 0.5px var(--glass-line), var(--glass-shadow); }
/* кнопки-карточки: содержимое сверху (button по умолчанию центрирует) */
.pcard, .bcard, .doc, .fcard > .pcard { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
.grid, .shelf-row { align-items: start; }
.facts, .tophit, .hits, .contact, .screen:not(.grouped) .list { background: var(--bg-inset); }
.fsheet .list, .fsheet .src { background: var(--sheet-list); }
.fsheet .chip { background: var(--sheet-list); }
.side-open .sidebar { background: color-mix(in srgb, var(--bg-elev) 90%, transparent); }
.art.fit img, .pgallery .slide.fit img { object-fit: contain; }
.pgallery .slide.fit::after { background: none; }
.sfield-wrap { top: calc(var(--safe-t) + 8px); transition: padding .45s var(--spring); }
.screen.scrolled .sfield-wrap { padding-left: calc(var(--pad) + 62px); padding-right: calc(var(--pad) + 4px); }
.app:not(.side-hidden) .screen.is-root.scrolled .sfield-wrap { padding-left: var(--pad); }
.sfield-wrap .sfield { height: 44px; border-radius: 22px; }
.screen:not(.scrolled) .sfield-wrap .sfield { height: 52px; border-radius: 26px; }
.sfield-wrap { z-index: 11; pointer-events: none; }
.sfield-wrap .sfield { pointer-events: auto; }
