@font-face {
  font-family: Onest;
  src: url("../fonts/onest-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Onest;
  src: url("../fonts/onest-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Onest;
  src: url("../fonts/onest-cyrillic-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Onest;
  src: url("../fonts/onest-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Onest;
  src: url("../fonts/onest-cyrillic-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Onest;
  src: url("../fonts/onest-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Onest;
  src: url("../fonts/onest-cyrillic-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Onest;
  src: url("../fonts/onest-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Onest;
  src: url("../fonts/onest-cyrillic-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Onest;
  src: url("../fonts/onest-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #161a4e;
  --blue: #2d88ff;
  --blue-press: #1667db;
  --paper: #f3f5f9;
  --white: #ffffff;
  --lime: #aedc0c;
  --muted: #555a7a;
  --line: rgba(22, 26, 78, 0.12);
  --bezel: #10122a;
  --screen: 58px;
  --section: 36px;
  --card: 24px;
  --button: 24px;
  --caption: 18px;
  --r-card: 28px;
  --r-control: 16px;
  --pad: 40px;
  --font: Onest, "Segoe UI", sans-serif;
  color: var(--ink);
  font-family: var(--font);
  background: var(--paper);
  color-scheme: only light;
}

* { box-sizing: border-box; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
p, h1, h2 { margin: 0; }

.screen-type { font-size: var(--screen); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.section-type { font-size: var(--section); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.card-type { font-size: var(--card); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.button-type { font-size: var(--button); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.caption-type { font-size: var(--caption); font-weight: 500; line-height: 1.35; color: var(--muted); }

.logo {
  margin: 0;
  font-weight: 500;
  font-size: var(--section);
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
}
.logo span { color: var(--blue); }

.topbar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 8cqw;
  min-height: 72px;
  padding: 0 var(--pad);
  flex-shrink: 0;
}
.topbar.is-gear {
  height: auto;
  align-items: flex-start;
  padding-top: 1.4cqw;
  padding-bottom: 0.4cqw;
}
.top-side {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55cqw;
}
.clock {
  font-size: var(--caption);
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.gear {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(22, 26, 78, 0.08);
}
.gear svg { width: 24px; height: 24px; }
.gear-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 7;
  width: min(68cqw, 340px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(22, 26, 78, 0.14);
}
.gear-pop[hidden] { display: none; }
.gear-full {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: var(--button);
  font-weight: 700;
}
.gear-vol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  font-size: var(--caption);
  font-weight: 700;
}
.gear-range {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gear-range input {
  flex: 1;
  height: 28px;
  accent-color: var(--blue);
}
.gear-range output {
  min-width: 3.2em;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.idle {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0 0 1.4cqw;
  border: 0;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
}
.ad-stage {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 7cqw;
  padding: 0 var(--pad);
}
.tap-slot {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad {
  position: relative;
  width: min(90cqw, calc(100cqh - 36cqw));
  aspect-ratio: 1;
  max-height: 100%;
  border-radius: clamp(18px, 2.4cqw, 32px);
  overflow: hidden;
  background: #fff;
  border: 0;
  box-shadow: 0 18px 40px rgba(22, 26, 78, 0.07);
}
.offer-side {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
  padding: 7% 6% 14% 7%;
  background: none;
  color: #161A4E;
  font-family: Onest, "Segoe UI", Arial, sans-serif;
  pointer-events: none;
}
.ad-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #e9f6ff;
}
.ad-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.ad-slide.is-on { opacity: 1; }
.ad-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
  background: #fff;
  transform: translate(5%, 6%) scale(1.12);
  transform-origin: center;
}
.ad-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(236, 255, 186, 0.55) 18%,
    rgba(174, 220, 12, 0.42) 40%,
    rgba(90, 214, 214, 0.32) 62%,
    rgba(45, 136, 255, 0.12) 82%,
    rgba(45, 136, 255, 0) 100%);
}
.offer-text {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 1cqw;
  width: 74%;
  margin: 0;
  padding: 0;
  color: #161A4E;
}
.offer-text.is-on { display: flex; }
.offer-logo { margin: 0; font-size: clamp(26px, 4cqw, 52px); color: #161A4E; }
.offer-kicker {
  margin: 0;
  max-width: none;
  font-size: clamp(12px, 1.35cqw, 20px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  color: #2D88FF;
}
.offer-side.tone-lime .offer-kicker,
.offer-text.tone-lime .offer-kicker { color: #161A4E; }
.offer-title {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(20px, 3.2cqw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #161A4E;
}
.offer-mark {
  padding: 0 0.14em;
  border-radius: 0.22em;
  background: #AEDC0C;
  color: #161A4E;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.offer-text.tone-lime .offer-mark { background: #161A4E; color: #AEDC0C; }
.offer-note {
  max-width: 36ch;
  margin: 1.4cqw 0 0;
  font-size: clamp(14px, 1.7cqw, 24px);
  line-height: 1.35;
  color: #161A4E;
  display: block;
}
.ad-chips { display: none; }
.ad-chip {
  padding: 0.55cqw 1.1cqw;
  border-radius: 999px;
  border: 1px solid rgba(22, 26, 78, 0.14);
  background: #fff;
  font-size: var(--caption);
  font-weight: 600;
}
.tone-lime .ad-chip {
  background: rgba(11, 13, 38, 0.08);
  border-color: rgba(11, 13, 38, 0.18);
}
.ad-badge { display: none; }
.ad-dots {
  position: absolute;
  left: 8%;
  bottom: 5%;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  gap: 0.7cqw;
}
.ad-dot {
  width: 2.2cqw;
  height: 0.45cqw;
  border-radius: 99px;
  background: var(--ink);
  opacity: 0.28;
  transition: width 0.45s ease, opacity 0.45s ease;
}
.ad-dot.is-on { width: 3.6cqw; opacity: 1; }
.ad-progress,
.ad-progress-fill { display: none; }
.brandrow, .reel {
  position: relative;
  flex: 0 0 auto;
  margin-top: 0.7cqw;
  overflow: hidden;
}
.brandrow { margin-top: 0.2cqw; }
.brandtrack, .reeltrack {
  display: flex;
  width: max-content;
  align-items: center;
}
.brandtrack { gap: 4.2cqw; animation: marquee 34s linear infinite; padding-left: 2cqw; }
.reeltrack { gap: 2.8cqw; animation: reel var(--reel-time, 96s) linear infinite; padding-left: 1.4cqw; }
.brand {
  font-size: clamp(18px, 2.8cqw, 34px);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(22, 26, 78, 0.46);
  white-space: nowrap;
}
.reel-card {
  flex: 0 0 auto;
  width: 24cqw;
  border-radius: clamp(14px, 1.8cqw, 22px);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(22, 26, 78, 0.08);
}
.reel-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 40%;
}
.brandrow::before, .brandrow::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7cqw;
  z-index: 1;
  pointer-events: none;
}
.brandrow::before { left: 0; background: linear-gradient(90deg, var(--paper), transparent); }
.brandrow::after { right: 0; background: linear-gradient(270deg, var(--paper), transparent); }
.idle-banner {
  margin: 0 var(--pad);
  padding: 3.2cqw 3.4cqw 2.8cqw;
  background: var(--lime);
  color: var(--ink);
  border-radius: var(--r-card);
}
.idle-banner .caption-type { color: var(--ink); }
.idle-banner .screen-type { margin-top: 0.6cqw; }
.idle-banner .idle-note { margin-top: 1cqw; max-width: 28ch; }

.head {
  padding: 0.4cqw 0 1.8cqw;
}
.head .caption-type { margin-top: 0.8cqw; }

.tiles {
  --tile-cols: 2;
  --tile-rows: 3;
  --tile-gap: 1.2cqw;
  container-type: size;
  container-name: tiles;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  gap: var(--tile-gap);
  align-content: center;
  justify-items: center;
}
.tile {
  width: calc((100cqw - (var(--tile-cols) - 1) * var(--tile-gap)) / var(--tile-cols));
  max-height: 100%;
  aspect-ratio: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  padding: 8% 8% 0;
  border: 0;
  border-radius: clamp(18px, 2.4cqw, 32px);
  background: var(--white);
  text-align: left;
  overflow: hidden;
  box-shadow: 0 8.8px 15.4px rgba(22, 26, 78, 0.066);
  animation: tile-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(70ms + var(--i) * 75ms);
}
.tile-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35cqw;
  max-width: 94%;
  margin-right: auto;
  transform: translateZ(0);
}
.tile-copy .card-type,
.tile-copy .caption-type {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  opacity: 1 !important;
}
.tile-copy .card-type {
  -webkit-line-clamp: 3;
  line-height: 1.15;
  color: #161A4E !important;
  -webkit-text-fill-color: #161A4E !important;
}
.tile-copy .caption-type {
  -webkit-line-clamp: 2;
  color: #555A7A !important;
  -webkit-text-fill-color: #555A7A !important;
}
.tile-visual {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 78%;
  height: 58%;
  margin: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
}
.tile-img,
.tile-img.contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  background: transparent;
}
.tile.is-scene {
  padding: 0;
}
.tile.is-scene .tile-copy {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  max-width: none;
  margin: 0;
  padding: 7% 8% 0;
  align-items: flex-start;
  text-align: left;
}
.tile.is-scene .tile-copy .card-type,
.tile.is-scene .tile-copy .caption-type {
  display: block;
  overflow: visible;
  white-space: normal;
  -webkit-line-clamp: unset;
}
.tile.is-scene .tile-visual {
  inset: 0;
  width: 100%;
  height: 100%;
}
.tile.is-scene .tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  transform: none;
}
.tile-mark {
  width: 70%;
  height: 70%;
  border-radius: var(--r-control);
}
.tile:active { transform: scale(0.985); }
.view-home { display: flex; flex-direction: column; }
.view-home > .head { flex-shrink: 0; text-align: center; margin-top: -1.4cqw; }
.view-menu .head { text-align: center; }
.view-home > .tiles { flex: 1 1 auto; min-height: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7cqw;
  min-height: 6.4cqw;
  padding: 1.15cqw 2.8cqw;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
  color: var(--ink);
  font-size: var(--button);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pill svg { width: 1.15em; height: 1.15em; flex: 0 0 auto; }
.pill-back { align-self: center; margin: 0; }
.pill-tap,
.pill-finish {
  align-self: center;
  min-height: 10.6cqw;
  min-width: 42cqw;
  margin: 0;
  padding: 1.35cqw 6.8cqw;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  backdrop-filter: none;
  font-size: clamp(18px, 2.6cqw, 32px);
  box-shadow: 0 8px 18px rgba(22, 26, 78, 0.07);
}
.pill-tap {
  pointer-events: none;
  animation: tap-glow 2.6s ease-in-out infinite;
}
.pill-finish {
  font-size: var(--button);
  font-weight: 700;
  background: #f6d0d0;
  color: var(--ink);
}
.pill:active { transform: scale(0.985); }

.menu {
  display: flex;
  flex-direction: column;
  gap: 1.3cqw;
}
.menu-fill { flex: 1 0 auto; }
.menu-fill .menu-row { flex: 1; }
.menu-row,
.partner-row {
  display: grid;
  grid-template-columns: max(64px, 11cqw) 1fr auto;
  gap: 1.8cqw;
  align-items: center;
  width: 100%;
  min-height: 11cqw;
  padding: 1.5cqw 2cqw 1.5cqw 1.4cqw;
  border: 0;
  border-radius: var(--r-card);
  background: var(--white);
  text-align: left;
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
}
.menu-row:active,
.partner-row:active,
.car-card:active,
.btn:active { transform: scale(0.985); }
.thumb,
.mark {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-control);
  object-fit: cover;
  background: var(--paper);
}
.mark {
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: var(--caption);
  color: var(--ink);
  background: #e7ebf4;
}
.row-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35cqw;
  min-width: 0;
}
.row-copy .card-type,
.row-copy .caption-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thumb.contain { object-fit: contain; background: #fff; }
.chev {
  width: 1.4cqw;
  height: 1.4cqw;
  min-width: 14px;
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(-45deg);
  margin-right: 0.8cqw;
  opacity: 0.45;
}

.menu-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2cqw;
}
.menu-tiles .tile { width: 100%; }
.menu-tiles .tile:has(.tile-img) { padding: 0; }
.menu-tiles .tile:has(.tile-img) .tile-visual {
  inset: 0;
  width: 100%;
  height: 100%;
}
.menu-tiles .tile:has(.tile-img) .tile-img,
.menu-tiles .tile:has(.tile-img) .tile-img.contain {
  object-fit: cover;
  object-position: center;
}
.menu-tiles .tile:has(.tile-img) .tile-copy {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  max-width: none;
  margin: 0;
  padding: 7% 8% 22%;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.94) 46%, rgba(255, 255, 255, 0) 100%);
}
.menu-tiles .tile-copy .card-type,
.menu-tiles .tile-copy .caption-type {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-height: 1.25;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: max(44px, 6.2cqw);
  padding: 0.7cqw 1.8cqw;
  border: 0;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
  font: inherit;
  font-size: var(--caption);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.chip.is-on {
  background: var(--ink);
  color: #fff;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2cqw;
  margin-bottom: 1.6cqw;
  position: relative;
  z-index: 4;
}
.drop { position: relative; min-width: 0; }
.drop-btn {
  width: 100%;
  min-height: 10cqw;
  padding: 2.3cqw 2.9cqw;
  border: 0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45cqw;
  text-align: left;
}
.drop-value {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--caption);
  font-weight: 700;
}
.drop-menu {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: calc(100% + 0.6cqw);
  max-height: 46cqh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35cqw;
  padding: 0.7cqw;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 14px 28px rgba(22, 26, 78, 0.1);
  scrollbar-width: none;
}
.drop-menu[hidden] { display: none; }
.drop-menu::-webkit-scrollbar { display: none; }
.drop-opt {
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  min-height: 6.6cqw;
  padding: 0.9cqw 1.2cqw;
  text-align: left;
  font: inherit;
  font-size: var(--caption);
  font-weight: 600;
  line-height: 1.25;
}
.drop-opt.is-on { background: var(--ink); color: #fff; }

.feed-load {
  display: flex;
  flex-direction: column;
  gap: 2cqw;
  padding-top: 1cqw;
}
.feed-ghosts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5cqw;
}
.feed-ghosts span {
  aspect-ratio: 3 / 4;
  border-radius: var(--r-card);
  background: linear-gradient(100deg, #fff 20%, #e7ebf4 45%, #fff 70%);
  background-size: 220% 100%;
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.05);
  animation: shimmer 1.35s ease-in-out infinite;
}
.feed-ghosts span:nth-child(2) { animation-delay: 0.12s; }
.feed-ghosts span:nth-child(3) { animation-delay: 0.24s; }
.feed-ghosts span:nth-child(4) { animation-delay: 0.36s; }
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.cars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5cqw;
  padding-bottom: 1cqw;
}
.car-card[hidden] { display: none; }
.car-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  border-radius: var(--r-card);
  background: var(--white);
  text-align: left;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
  animation: tile-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.car-card img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  object-position: center;
  background: #e7ebf4;
}
.car-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25cqw;
  padding: 1.8cqw 2cqw 2cqw;
  min-width: 0;
}
.car-meta .card-type,
.car-meta .caption-type {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.car-meta .price {
  font-size: var(--card);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.photo-frame {
  width: 100%;
  margin: 0.2cqw auto 1.3cqw;
  border-radius: 18px;
  overflow: hidden;
  background: #e7ebf4;
  box-shadow: 0 10px 22px rgba(22, 26, 78, 0.08);
  touch-action: pan-y;
}
.detail-photo {
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 10;
  max-height: 42cqh;
  object-fit: cover;
  object-position: center;
  background: #e7ebf4;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}
.detail-photo.is-swap { opacity: 0.45; }
.shots {
  display: flex;
  gap: 1cqw;
  overflow-x: auto;
  margin: 0 0 1.6cqw;
  padding: 0.3cqw 0.2cqw 0.6cqw;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shot {
  flex: 0 0 18cqw;
  min-width: 72px;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #e7ebf4;
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
}
.shot.is-on { box-shadow: 0 8px 16px rgba(45, 136, 255, 0.28); }
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.detail-price {
  margin-top: 0.4cqw;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1cqw;
  margin: 1.8cqw 0;
}
.fact {
  padding: 2.5cqw 2.4cqw;
  border-radius: 14px;
  background: var(--white);
  border: 0;
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
}
.fact .caption-type { line-height: 1.25; }
.fact b {
  display: block;
  margin-top: 0.35cqw;
  font-size: var(--card);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.qr-panel {
  display: grid;
  grid-template-columns: min(42%, 28cqw) 1fr;
  gap: 2.4cqw;
  align-items: center;
  padding: 2.2cqw;
  border-radius: var(--r-card);
  background: var(--white);
  border: 0;
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
}
.qr-panel img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-control);
  background: #fff;
}
.view-partner .qr-panel {
  margin-top: auto;
  margin-bottom: auto;
  grid-template-columns: min(52%, 40cqw) 1fr;
}
.qr-panel .card-type { color: var(--ink); }
.qr-panel .caption-type { margin-top: 0.6cqw; }
.credit-open {
  width: 100%;
  margin: 1.5cqw 0 0;
  min-height: 8.8cqw;
  padding: 1.5cqw 2.4cqw;
  border: 0;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  font-size: var(--button);
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(45, 136, 255, 0.2);
}
.credit-open:active { background: var(--blue-press); }
.credit {
  display: none;
  flex-direction: column;
  gap: 1.3cqw;
  margin-top: 1.2cqw;
  padding: 2.2cqw;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
}
.credit.is-on { display: flex; animation: rise 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.credit-pay { margin-top: 0.2cqw; }
.credit-field {
  display: flex;
  flex-direction: column;
  gap: 0.7cqw;
}
.credit-field b { color: var(--ink); font-weight: 700; }
.credit input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: max(28px, 4.4cqw);
  margin: 0;
  background: transparent;
  border: 0;
  outline: none;
  box-shadow: none;
}
.credit input[type="range"]:focus,
.credit input[type="range"]:focus-visible {
  outline: none;
  box-shadow: none;
}
.credit input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue) var(--fill, 0%), #e4e8f2 var(--fill, 0%));
}
.credit input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: max(22px, 3.4cqw);
  height: max(22px, 3.4cqw);
  margin-top: calc((6px - max(22px, 3.4cqw)) / 2);
  border: 0;
  outline: none;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: none;
}
.credit input[type="range"]::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: #e4e8f2;
}
.credit input[type="range"]::-moz-range-progress {
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: var(--blue);
}
.credit input[type="range"]::-moz-range-thumb {
  border: 0;
  width: max(22px, 3.4cqw);
  height: max(22px, 3.4cqw);
  border-radius: 50%;
  background: var(--blue);
}
.view-credit .head { text-align: center; padding-bottom: 2.4cqw; }
.view-credit .credit {
  gap: 2.6cqw;
  margin-top: 0.4cqw;
  padding: 3.6cqw 3.2cqw 3.2cqw;
}
.sum-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55cqw;
  width: 100%;
  margin: 0;
  padding: 1.8cqw 2cqw;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  text-align: left;
  box-shadow: inset 0 0 0 1.5px transparent;
}
.sum-field.is-on { box-shadow: inset 0 0 0 2px var(--blue); }
.sum-value {
  display: inline-flex;
  align-items: center;
  min-height: 1.1em;
  font-size: var(--section);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.sum-field.is-empty .sum-text {
  color: var(--muted);
  font-weight: 700;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 0.92em;
  margin-left: 2px;
  border-radius: 1px;
  background: var(--blue);
  animation: caret-blink 1.05s steps(1, end) infinite;
}
.sum-field:not(.is-on) .caret { display: none; }
@keyframes caret-blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}
.filters .sum-field {
  background: var(--white);
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
  min-height: 10cqw;
}
.filters .sum-field.is-on { box-shadow: inset 0 0 0 2px var(--blue); }
.filters .sum-value { font-size: var(--card); }
.loan-car {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.8cqw;
  margin-top: 1.2cqw;
}
.loan-car .caption-type { margin-top: 0; }
.view-credit .drop-btn {
  background: var(--paper);
  box-shadow: none;
  min-height: 0;
  padding: 1.8cqw 2cqw;
}
.view-credit .drop-value {
  font-size: var(--section);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  margin: 4.2cqw 0 0;
}
.pick-head .screen-type { text-align: left; }
.pick-all {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  min-height: 0;
  padding: 0.4cqw 0.2cqw;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--button);
  font-weight: 700;
  box-shadow: none;
}
.pick-all.is-on { color: var(--blue); }
.bank-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6cqw;
  margin-top: 2.2cqw;
}
.bank-tile {
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: clamp(12px, 1.8cqw, 20px);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 8.8px 15.4px rgba(22, 26, 78, 0.066);
}
.bank-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bank-name {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.8cqw;
  color: #fff;
  font-size: clamp(12px, 2.3cqw, 18px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-align: center;
}
.bank-tile { transition: filter 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.bank-tile.is-off { filter: grayscale(1); }
.view-credit .credit-open { margin-top: 3.2cqw; }
.keypad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  padding: 1.8cqw var(--pad) 2cqw;
  background: var(--paper);
  box-shadow: 0 -12px 28px rgba(22, 26, 78, 0.08);
  transform: translateY(108%);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  pointer-events: none;
}
.keypad.is-on {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1cqw;
}
.key {
  min-height: 9.2cqw;
  border: 0;
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: var(--section);
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(22, 26, 78, 0.06);
}
.key:active { background: #e7ebf4; }
.key-ok {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 16px rgba(45, 136, 255, 0.2);
}
.key-ok:active { background: var(--blue-press); }
.feature-row { display: flex; flex-wrap: wrap; gap: 0.8cqw; margin-top: 1.4cqw; }

.view {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.is-enter { animation: screen-in 0.82s cubic-bezier(0.16, 1, 0.3, 1); }
.is-back { animation: screen-back 0.74s cubic-bezier(0.16, 1, 0.3, 1); }
.is-replace { animation: screen-fade 0.4s ease; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes screen-back {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: none; }
}
@keyframes screen-fade {
  from { opacity: 0.35; }
  to { opacity: 1; }
}
@keyframes tile-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes ken {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
@keyframes tap-glow {
  0%, 100% { box-shadow: 0 8px 18px rgba(22, 26, 78, 0.07), 0 0 0 0 rgba(45, 136, 255, 0); }
  50% { box-shadow: 0 8px 22px rgba(45, 136, 255, 0.16), 0 0 26px 7px rgba(45, 136, 255, 0.28); }
}
@keyframes ad-fill { to { width: 100%; } }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes reel {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.view-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad) 18cqw;
  scrollbar-width: none;
}
.view-body::-webkit-scrollbar { display: none; }
.view-body > * { flex-shrink: 0; }

.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4cqw;
  padding: 5.5cqw var(--pad) 1.6cqw;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(243, 245, 249, 0) 0%, rgba(243, 245, 249, 0.55) 38%, rgba(243, 245, 249, 0.94) 68%, var(--paper) 100%);
  border: 0;
}
.dock .pill { pointer-events: auto; }
.dock.is-split { justify-content: space-between; }
.dock.is-split .pill-back,
.dock.is-split .pill-finish {
  flex: 1 1 0;
  min-width: 0;
  min-height: 10.6cqw;
  padding: 1.15cqw 1.4cqw;
}
.btn {
  min-height: 7.4cqw;
  border-radius: var(--r-control);
  border: 0;
  font-size: var(--button);
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 14px rgba(22, 26, 78, 0.06);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:active { background: var(--blue-press); }
.btn-ghost {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}
.btn-quiet {
  background: transparent;
  color: var(--ink);
}
.btn:focus-visible,
.menu-row:focus-visible,
.partner-row:focus-visible,
.car-card:focus-visible,
.chip:focus-visible,
.idle:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.empty {
  padding: 3cqw 0 2cqw;
  font-size: var(--card);
  font-weight: 600;
}

body.kiosk {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--bezel);
  overflow: hidden;
  user-select: none;
}
.stage {
  width: min(100vw, calc(100dvh * 9 / 16));
  height: min(100dvh, calc(100vw * 16 / 9));
  background: var(--paper);
  container-type: size;
  container-name: stage;
  overflow: hidden;
  --screen: clamp(26px, 5.37cqw, 68px);
  --section: clamp(18px, 3.33cqw, 44px);
  --card: clamp(15px, 2.22cqw, 28px);
  --button: clamp(15px, 2.22cqw, 28px);
  --caption: clamp(13px, 1.67cqw, 20px);
  --r-card: clamp(16px, 2.59cqw, 32px);
  --r-control: clamp(10px, 1.48cqw, 18px);
  --pad: clamp(16px, 4.07cqw, 48px);
}

/* Уже и выше, чем 9:16 (телефон): на весь экран, строки меню забирают лишнюю высоту */
@media (max-aspect-ratio: 9/16) {
  .stage {
    width: 100vw;
    height: 100dvh;
  }
}

@container stage (max-width: 460px) {
  .cars { grid-template-columns: 1fr; }
  .car-card img { aspect-ratio: 16 / 10; }
}

@container stage (min-width: 1400px) {
  .cars { grid-template-columns: repeat(3, 1fr); }
}

/* Альбомный телефон и низкое окно: колонка 9:16 стала бы слишком узкой */
@media (max-height: 560px) {
  .stage {
    width: 100vw;
    height: 100dvh;
    --screen: 26px;
    --section: 18px;
    --card: 15px;
    --button: 15px;
    --caption: 13px;
    --pad: 14px;
    --r-card: 16px;
    --r-control: 12px;
  }
  .topbar { height: auto; min-height: 44px; }
  .idle {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-rows: auto auto auto auto;
    align-content: center;
    padding-bottom: 8px;
  }
  .idle .topbar,
  .tap-slot { grid-column: 1 / -1; }
  .reel { grid-column: 1; align-self: center; }
  .ad-stage { grid-column: 2; grid-row: 3; padding: 8px; }
  .ad { width: min(42cqh, 36cqw); }
  .reel-card { width: 16cqw; }
  .pill-tap { min-height: 44px; margin: 8px 0; }
  .menu, .menu-fill {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .tiles {
    --tile-cols: 3;
    --tile-rows: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
  }
  .menu-row, .partner-row { min-height: 64px; }
  .cars { grid-template-columns: repeat(3, 1fr); }
  .detail-photo {
    max-height: 42cqh;
    aspect-ratio: 16 / 9;
  }
  .qr-panel { grid-template-columns: 120px 1fr; }
  .dock { padding: 8px var(--pad) 10px; }
  .btn { min-height: 44px; }
}
#app { height: 100%; }

@media (prefers-reduced-motion: reduce) {
  .is-enter, .is-back, .is-replace, .tile, .car-card, .feed-ghosts span, .credit.is-on,
  .ad-slide .offer-logo, .ad-slide .offer-kicker, .ad-slide .offer-title, .ad-slide .offer-note, .ad-slide .ad-chips,
  .ad-photo, .brandtrack, .reeltrack, .ad-progress-fill, .pill-tap { animation: none; }
  .ad-slide.is-on .offer-logo,
  .ad-slide.is-on .offer-kicker,
  .ad-slide.is-on .offer-title,
  .ad-slide.is-on .offer-note,
  .ad-slide.is-on .ad-chips { opacity: 1; transform: none; }
  .ad-progress-fill.is-run { width: 40%; }
  .menu-row:active,
  .partner-row:active,
  .car-card:active,
  .tile:active,
  .pill:active,
  .btn:active { transform: none; }
}
