/* androbuy — дизайн-система «Бенто 2».
   Цвет: один акцент (оранжевый androbuy) + смысловые (хорошо / нюанс / продан). Тёмная тема — своя палитра.
   Шрифт: Unbounded — только логотип, цены и заголовки экранов; всё остальное — Onest.
   Сетка 4 px: поля экрана 16, между блоками 12, внутри плитки 16. Скругления: плитка 22, кнопка 16, миниатюра 12.
   Движение: только прозрачность и лёгкое сжатие при нажатии; уважаем «уменьшить движение». */

:root {
  --bg: #F2F3F5;
  --surface: #FFFFFF;
  --field: #F2F3F5;
  --ink: #0D1014;
  --ink-2: #3B424C;
  --muted: #737B87;
  --line: #E7E9ED;
  --hot: #FF5B1F;
  --hot-press: #E84E14;
  --hot-soft: #FFEEE6;
  --ok: #12A06B;
  --ok-soft: #E2F5EC;
  --warn: #C97A00;
  --warn-dot: #F2A100;
  --warn-soft: #FFF3DC;
  --bad: #D93B40;
  --bad-soft: #FDECEC;
  --deep: #0D1014;
  --deep-ink: #FFFFFF;
  --deep-muted: #9AA1AB;
  --bar: rgba(13, 16, 20, .92);
  --bar-ink: #8E96A1;
  --shade: rgba(13, 16, 20, .45);
  --shadow: 0 1px 2px rgba(13, 16, 20, .04);

  --f: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fd: "Unbounded", "Onest", system-ui, sans-serif;
  --r-tile: 22px;
  --r-btn: 16px;
  --r-thumb: 12px;
  --pad: 16px;
  --gap: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
html.dark {
  --bg: #0E1013;
  --surface: #181B20;
  --field: #22262C;
  --ink: #F3F4F6;
  --ink-2: #C8CDD5;
  --muted: #8C94A0;
  --line: #262A31;
  --hot: #FF6A33;
  --hot-press: #FF8152;
  --hot-soft: #2E1B12;
  --ok: #2BC48A;
  --ok-soft: #10291D;
  --warn: #FFB547;
  --warn-dot: #FFB547;
  --warn-soft: #2C220F;
  --bad: #FF6B6F;
  --bad-soft: #2E1517;
  --deep: #23272E;
  --deep-ink: #F3F4F6;
  --deep-muted: #9AA1AB;
  --bar: rgba(30, 34, 40, .94);
  --bar-ink: #8C94A0;
  --shade: rgba(0, 0, 0, .6);
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.4 var(--f); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overscroll-behavior-y: none; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; border-radius: 10px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.s { width: 18px; height: 18px; }
.ic.xs { width: 14px; height: 14px; }
[hidden] { display: none !important; }

/* ── каркас ── */
#app { max-width: 560px; margin: 0 auto; padding: 8px var(--pad) calc(112px + var(--safe-b)); }
#app.no-tabs { padding-bottom: calc(96px + var(--safe-b)); }
.screen { display: grid; gap: var(--gap); animation: fade .16s ease both; }
.screen > * { min-width: 0; }
@keyframes fade { from { opacity: 0; } }

/* ── типографика ── */
.t-display { margin: 0; font: 800 26px/1.08 var(--fd); letter-spacing: -0.035em; text-wrap: balance; }
.t-h { margin: 0; font: 800 21px/1.12 var(--fd); letter-spacing: -0.03em; text-wrap: balance; }
.t-title { font: 600 17px/1.25 var(--f); }
.t-small { font-size: 13px; line-height: 1.35; color: var(--muted); }
.t-cap { font: 600 11px/1.2 var(--f); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.price { font: 800 26px/1 var(--fd); letter-spacing: -0.035em; color: var(--hot); }
.price-s { font: 800 16px/1.1 var(--fd); letter-spacing: -0.025em; }

/* ── плитка, строки, разделители ── */
.card { background: var(--surface); border-radius: var(--r-tile); padding: var(--pad); display: grid; gap: 12px; box-shadow: var(--shadow); min-width: 0; }
.card > * { min-width: 0; }
.card.tight { gap: 8px; }
.card.flush { padding: 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row > * { min-width: 0; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 2px; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sep { height: 1px; background: var(--line); margin: 2px 0; }
.link { color: var(--hot); font-weight: 600; }
.press { transition: transform .12s ease, opacity .12s ease; }
.press:active { transform: scale(.98); opacity: .9; }

/* ── шапка ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.wordmark { font: 800 24px/1 var(--fd); letter-spacing: -0.04em; }
.wordmark i { font-style: normal; color: var(--hot); }
.ava { width: 40px; height: 40px; border-radius: 14px; background: var(--deep); color: var(--deep-ink); display: grid; place-items: center; font: 700 15px/1 var(--f); overflow: hidden; flex: none; }
.ava img { width: 100%; height: 100%; object-fit: cover; }

/* ── кнопки ── */
.btn { height: 50px; border-radius: var(--r-btn); padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--f); background: var(--hot); color: #fff; transition: background .15s, transform .12s; white-space: nowrap; }
.btn:active { transform: scale(.98); background: var(--hot-press); }
.btn.alt { background: var(--field); color: var(--ink); }
.btn.alt:active { background: var(--line); }
.btn.deep { background: var(--deep); color: var(--deep-ink); }
.btn.full { width: 100%; }
.btn.sm { height: 40px; border-radius: 12px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ── статусы ── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font: 600 12px/1 var(--f);
  background: var(--field); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.hot { background: var(--hot-soft); color: var(--hot); }
.pill.plain::before { display: none; }

/* ── поле ссылки ── */
.field { display: flex; align-items: center; gap: 10px; background: var(--field); border-radius: var(--r-btn); padding: 5px 5px 5px 14px; min-height: 54px; }
.field .ic { color: var(--muted); }
.field input, .field textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
textarea.ta { width: 100%; border: 0; outline: 0; resize: none; background: var(--field); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.4; }

/* ── главная: плитка-вопрос ── */
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 20px; color: #fff; display: grid; gap: 14px;
  background:
    radial-gradient(120% 90% at 0% 0%, #FF8A3D 0%, rgba(255, 138, 61, 0) 55%),
    radial-gradient(90% 80% at 100% 10%, #FF2E63 0%, rgba(255, 46, 99, 0) 60%),
    radial-gradient(100% 100% at 60% 120%, #FFB347 0%, rgba(255, 179, 71, 0) 60%), #FF5B1F;
  box-shadow: 0 16px 32px -20px rgba(255, 91, 31, .9); }
.hero .t-h { color: #fff; max-width: 15em; }
.hero p { margin: 0; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, .88); max-width: 30em; }
.hero .field { background: rgba(255, 255, 255, .96); }
.hero .field input { color: #0D1014; }
.hero .field input::placeholder { color: #737B87; }
.hero .field .ic { color: #FF5B1F; }
.hero .btn { background: #0D1014; color: #fff; }
.hero.compact { padding: 14px; gap: 10px; border-radius: 22px; }

/* ── заказ на главной ── */
.order-hero { background: var(--deep); color: var(--deep-ink); border-radius: var(--r-tile); padding: var(--pad); display: grid; gap: 14px; }
.order-hero .t-cap { color: var(--deep-muted); }
.order-hero .t-h { color: var(--deep-ink); }
.order-hero .t-small { color: var(--deep-muted); }
.order-hero .thumb { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.order-hero .more { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .08); font-weight: 600; }

/* ── шкала заказа ── */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.steps i { height: 6px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--hot); }
.order-hero .steps i { background: rgba(255, 255, 255, .16); }
.order-hero .steps i.on { background: var(--hot); }
.steps-l { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: 11px; color: var(--muted); }
.steps-l span.on { color: var(--ink); font-weight: 600; }
.order-hero .steps-l { color: var(--deep-muted); }
.order-hero .steps-l span.on { color: var(--deep-ink); }

/* ── миниатюры и фото ── */
.thumb { width: 52px; height: 52px; border-radius: var(--r-thumb); object-fit: cover; background: var(--field); flex: none; }
.thumb.l { width: 64px; height: 64px; border-radius: 14px; }
.thumb.s { width: 44px; height: 44px; }
.fade-img { opacity: 0; transition: opacity .25s ease; }
.fade-img.ld { opacity: 1; }

/* ── бренды ── */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--surface);
  font: 600 14px/1 var(--f); box-shadow: var(--shadow); }
.chip b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 10px/1 var(--fd); }
.chip.on { background: var(--ink); color: var(--bg); }
.chip.plain { padding: 0 14px; }

/* ── находки ── */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lotc { background: var(--surface); border-radius: 20px; overflow: hidden; display: grid; box-shadow: var(--shadow); }
.lotc .ph { aspect-ratio: 3 / 4; background: var(--field); position: relative; }
.lotc .ph img { width: 100%; height: 100%; object-fit: cover; }
.lotc .ph .pill { position: absolute; left: 8px; bottom: 8px; height: 22px; font-size: 11px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lotc .tx { padding: 10px 12px 12px; display: grid; gap: 3px; }
.lotc .tx .t-small { font-size: 12px; }

/* ── шаги «как это работает» ── */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.how div { background: var(--surface); border-radius: 18px; padding: 12px; display: grid; gap: 8px; align-content: start; font: 600 13px/1.25 var(--f); box-shadow: var(--shadow); }
.how .ic { color: var(--hot); }

/* ── лот: галерея ── */
.gal { position: relative; margin: 0 calc(-1 * var(--pad)); aspect-ratio: 1 / 1; max-height: 62vh; width: calc(100% + 2 * var(--pad)); overflow: hidden; background: var(--field); }
.gal .track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal .track::-webkit-scrollbar { display: none; }
.gal .slide { position: relative; flex: none; width: 100%; height: 100%; scroll-snap-align: start; overflow: hidden; }
.gal .slide .bg { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; filter: blur(24px) saturate(1.1); opacity: .55; }
.gal .slide .fg { position: relative; width: 100%; height: 100%; object-fit: contain; }
.gal .cnt { position: absolute; right: 12px; bottom: 12px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff;
  display: inline-flex; align-items: center; font: 600 12px/1 var(--f); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.thumbs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad); }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button { flex: none; width: 46px; height: 58px; border-radius: 10px; overflow: hidden; opacity: .5; transition: opacity .15s, box-shadow .15s; background: var(--field); }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button.on { opacity: 1; box-shadow: 0 0 0 2px var(--hot); }

/* ── лот: состояние ── */
.seg { display: grid; gap: 3px; }
.seg i { height: 6px; border-radius: 4px; background: var(--warn-dot); }
.seg i.g { background: var(--ok); }
.cond { display: grid; gap: 2px; }
.cond div { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 4px 0; font-size: 15px; }
.cond div::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn-dot); justify-self: center; transform: translateY(-1px); }
.cond div.g::before { background: var(--ok); }
.cond small { color: var(--muted); font-size: 13px; }
.acc { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; font-weight: 600; width: 100%; text-align: left; }
.acc .ic { color: var(--muted); transition: transform .2s; }
.acc[aria-expanded="true"] .ic { transform: rotate(180deg); }
.orig { font-size: 14px; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.orig.zh { color: var(--muted); font-size: 13px; }

/* ── расчёт ── */
.bill { display: grid; gap: 10px; font-size: 14px; }
.bill .row span:first-child { color: var(--muted); }
.bill .tot { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; font-size: 15px; }
.bill .tot span:first-child { color: var(--ink); }

/* ── полоска цены при прокрутке ── */
.mini { position: fixed; top: 0; left: 0; right: 0; z-index: 8; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 10px var(--pad); display: flex; align-items: center; gap: 10px; transform: translateY(-100%); transition: transform .2s ease; }
.mini.on { transform: none; }
.mini .t-title { font-size: 15px; }

/* ── нижняя панель действий (вне Telegram и как запасной вариант) ── */
.actions { position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; padding: 10px var(--pad) calc(10px + var(--safe-b)); background: var(--bg);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; max-width: 560px; margin: 0 auto; }
.actions .add { width: 50px; padding: 0; background: var(--field); color: var(--ink); }

/* ── расчёт: прогресс ── */
.progress { height: 6px; border-radius: 4px; background: var(--field); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--hot); transition: width .6s ease; }
.pdots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 11px; color: var(--muted); }
.pdots span.on { color: var(--ink); font-weight: 600; }
.sk { background: var(--field); border-radius: 12px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* ── корзина и заказы ── */
.item-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 0; }
.item-row + .item-row { border-top: 1px solid var(--line); padding-top: 12px; }
.item-row .x { width: 32px; height: 32px; border-radius: 10px; background: var(--field); color: var(--muted); display: grid; place-items: center; }
.ord { display: grid; gap: 12px; }
.stackthumb { position: relative; width: 56px; height: 56px; flex: none; }
.stackthumb img { position: absolute; width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--field); box-shadow: 0 0 0 2px var(--surface); }
.stackthumb img:first-child { left: 0; top: 0; z-index: 2; }
.stackthumb img:nth-child(2) { right: 0; bottom: 0; }
.vsteps { display: grid; gap: 0; }
.vsteps div { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; position: relative; font-size: 14px; }
.vsteps div:last-child { padding-bottom: 0; }
.vsteps b { width: 28px; height: 28px; border-radius: 10px; background: var(--hot-soft); color: var(--hot); display: grid; place-items: center; font: 800 12px/1 var(--fd); }
.tl { display: grid; }
.tl div { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 14px; }
.tl div::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); justify-self: center; }
.tl div:first-child::before { background: var(--hot); box-shadow: 0 0 0 4px var(--hot-soft); }
.tl small { color: var(--muted); font-size: 12px; }

/* ── пустые состояния и ошибки ── */
.empty { text-align: center; justify-items: center; padding: 28px 20px; gap: 10px; }
.empty .ico { width: 56px; height: 56px; border-radius: 18px; background: var(--hot-soft); color: var(--hot); display: grid; place-items: center; }
.empty .ico .ic { width: 26px; height: 26px; }
.empty p { margin: 0; color: var(--muted); max-width: 30ch; }
.okc { width: 76px; height: 76px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; box-shadow: 0 14px 28px -14px var(--ok); }
.okc svg { width: 40px; height: 40px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ── меню профиля ── */
.menu { display: grid; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; min-height: 52px; width: 100%; text-align: left; font-weight: 500; }
.menu a + a, .menu a + button, .menu button + a { border-top: 1px solid var(--line); }
.menu .ic:first-child { color: var(--hot); }
.menu .ic:last-child { color: var(--muted); margin-left: auto; }

/* ── нижнее меню ── */
.tabs { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); width: min(528px, calc(100% - 24px));
  height: 64px; border-radius: 24px; background: var(--bar); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr; align-items: center; color: var(--bar-ink); box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .6); }
.tabs a { display: grid; justify-items: center; gap: 4px; font: 500 10px/1 var(--f); padding: 4px 0; position: relative; }
.tabs a.on { color: #fff; }
.tabs a .badge { position: absolute; top: -2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--hot); color: #fff; font: 700 10px/16px var(--f); }
.tabs .plus { justify-self: center; width: 56px; height: 56px; margin-top: -24px; border-radius: 20px; background: var(--hot); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 22px -6px rgba(255, 91, 31, .75); transition: transform .12s; }
.tabs .plus:active { transform: scale(.94); }
.tabs .plus .ic { width: 26px; height: 26px; stroke-width: 2.4; }

/* ── шторка ── */
.shade { position: fixed; inset: 0; z-index: 20; background: var(--shade); animation: fade .18s ease both; }
.sheet { position: fixed; z-index: 21; left: 50%; transform: translateX(-50%); bottom: 0; width: min(560px, 100%); background: var(--surface);
  border-radius: 26px 26px 0 0; padding: 10px 20px calc(20px + var(--safe-b)); display: grid; gap: 14px; animation: up .24s cubic-bezier(.2, .8, .2, 1) both; }
.sheet .grab { justify-self: center; width: 38px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet .field { background: var(--field); }
.sheet .hint { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font-size: 12px; color: var(--muted); }
.sheet .hint span { background: var(--field); border-radius: 12px; padding: 8px; }
.sheet .hint b { color: var(--ink); display: block; font-size: 11px; margin-bottom: 2px; }
@keyframes up { from { transform: translate(-50%, 100%); } }

/* ── просмотр фото на весь экран ── */
.viewer { position: fixed; inset: 0; z-index: 30; background: #000; display: grid; animation: fade .16s ease both; }
.viewer .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer .track::-webkit-scrollbar { display: none; }
.viewer img { flex: none; width: 100vw; height: 100vh; object-fit: contain; scroll-snap-align: center; }
.viewer .close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }

/* ── всплывающее сообщение ── */
.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); max-width: calc(100% - 32px);
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px; font: 600 14px/1.3 var(--f); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  animation: fade .18s ease both; }

@media (max-width: 360px) {
  :root { --pad: 14px; }
  .t-display { font-size: 23px; }
  .t-h { font-size: 19px; }
  .price { font-size: 23px; }
  .how { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* поле ввода по умолчанию ~20 символов шириной и распирало плитку на узких экранах */
.field input, .field textarea { width: 0; }
.hero > *, .sheet > * { min-width: 0; }
.lotc.wide { grid-template-columns: 112px minmax(0, 1fr); align-items: center; }
.lotc.wide .tx { gap: 6px; padding: 12px 14px; }

/* ничего не должно сдвигать страницу вбок (в Telegram на Android её можно «утянуть» пальцем) */
/* не hidden на html/body: так в WebView Telegram ломается прокрутка документа; clip режет вбок, не создавая прокрутки */
body { overflow-x: clip; max-width: 100%; }
#app { overflow-x: clip; }
.item-row.big { grid-template-columns: 76px minmax(0, 1fr) auto; align-items: start; }
.thumb.xl { width: 76px; height: 100px; border-radius: 14px; }

/* форма СДЭК и действия с заказом */
.dform { gap: 12px; }
.fl { display: grid; gap: 6px; min-width: 0; }
.fl > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.fl input { height: 50px; width: 100%; min-width: 0; border: 0; outline: 0; border-radius: var(--r-btn); background: var(--field); padding: 0 14px;
  font: 500 16px/1 var(--f); color: var(--ink); }
.fl input::placeholder { color: var(--muted); font-weight: 400; }
.fl input:focus { box-shadow: inset 0 0 0 2px var(--hot); }
.err { color: var(--bad); margin: 0; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.danger:active { background: var(--bad-soft); opacity: .8; }
.center { text-align: center; }
.steps-l span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 360px) { .steps-l { font-size: 10px; letter-spacing: -.01em; } }

/* ── главная: плитки с цифрами (курс, комиссия, доставка) ── */
#h-bento, #h-finds, #h-how { display: grid; gap: 10px; min-width: 0; }
#h-order:empty, #h-finds:empty, #h-how:empty { display: none; }
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--surface); border-radius: var(--r-tile); padding: 14px 16px 16px; box-shadow: var(--shadow); display: grid; gap: 4px;
  align-content: start; min-width: 0; color: var(--ink); text-decoration: none; }
.tile.tall { grid-row: span 2; align-content: stretch; grid-template-rows: auto auto auto auto 1fr; }
.tile .big { margin-top: 8px; font: 800 clamp(28px, 8.6vw, 40px)/1 var(--fd); letter-spacing: -.045em; white-space: nowrap; }
.tile .mid { margin-top: 6px; font: 800 clamp(18px, 5.6vw, 24px)/1.05 var(--fd); letter-spacing: -.035em; white-space: nowrap; }
.tile .spark { display: block; width: 100%; height: 34px; margin-top: 6px; overflow: visible; }
.tile .spark polyline { fill: none; stroke: var(--hot); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.tile .spark polygon { fill: var(--hot-soft); }
.tile .delta { font: 600 12px/1.2 var(--f); }
.tile .delta.up { color: var(--hot); }
.tile .delta.down { color: var(--ok); }
.tile .ex { align-self: end; display: grid; gap: 2px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tile .ex b { font: 800 17px/1.15 var(--fd); letter-spacing: -.03em; color: var(--hot); white-space: nowrap; }
.hero.with-badge .t-h { padding-right: 82px; }
.hero-badge { position: absolute; top: 16px; right: 14px; width: 76px; height: 76px; border-radius: 50%; background: #fff; color: #0D1014;
  display: grid; place-content: center; text-align: center; gap: 2px; transform: rotate(9deg); font: 800 15px/1 var(--fd); letter-spacing: -.03em;
  box-shadow: 0 8px 18px -10px rgba(13, 16, 20, .5); }
.hero-badge small { font: 600 10px/1 var(--f); letter-spacing: 0; color: #737B87; }
@media (max-width: 350px) { .tile { padding: 12px 12px 14px; } .hero.with-badge .t-h { padding-right: 70px; } .hero-badge { width: 64px; height: 64px; font-size: 13px; } }
@media (max-width: 400px) {
  .how { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .how div { padding: 10px; font-size: 12px; gap: 6px; }
}
