/* ============================================================
   Что купить? — стиль Foodie / Delivery
   Томатный красный · зелень базилика · кремово-бежевый
   Мягкие градиенты, тёплый свет, карточки, радостная атмосфера
   ============================================================ */
:root {
  --bg: #faf3e7;
  --bg-soft: #f6ecdb;
  --surface: #fffdf8;
  --ink: #3b2e25;
  --ink-soft: #9a8a78;
  --line: #f0e4d0;

  --tomato: #e8402a;
  --tomato-soft: #ff6b4a;
  --tomato-pale: #fdeae4;
  --basil: #3e9b4f;
  --basil-dark: #2e7d3e;
  --basil-pale: #e3f2e4;
  --butter: #ffd166;
  --butter-pale: #fff3d6;

  --grad-tomato: linear-gradient(135deg, #ff7a52 0%, #e8402a 100%);
  --grad-basil: linear-gradient(135deg, #58b96a 0%, #2e7d3e 100%);
  --grad-hero: linear-gradient(160deg, #fdf6ea 0%, #fbe9d6 55%, #fdeae4 100%);

  --shadow-sm: 0 2px 8px rgba(158, 108, 60, .10);
  --shadow-md: 0 8px 24px rgba(158, 108, 60, .14), 0 2px 6px rgba(158, 108, 60, .08);
  --shadow-lg: 0 18px 48px rgba(120, 75, 35, .18);

  --radius: 20px;
  --radius-sm: 14px;
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.hidden { display: none !important; }
.spacer { flex: 1; }
::selection { background: var(--butter); }

/* ---------- шапка ---------- */
/* В мессенджерах (Telegram/MAX) логотип скрыт — там своя шапка клиента */
html.in-messenger .brand { display: none; }
html.in-messenger .topbar__inner { padding: 10px 20px; }

.topbar {
  background: rgba(255, 253, 248, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar__inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  font-size: 19px;
}
.brand__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: block;
  box-shadow: 0 6px 14px rgba(158, 108, 60, .25);
  transition: transform .25s;
}
.brand:hover .brand__icon { transform: rotate(-8deg) scale(1.06); }
.brand__q { color: var(--tomato); }

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  min-width: 0;
  margin-left: auto;
}
.crumbs__link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.crumbs__link:hover { color: var(--tomato); background: var(--tomato-pale); }
.crumbs__sep { color: var(--line); font-weight: 800; }
.crumbs__current {
  color: var(--tomato);
  font-weight: 800;
  padding: 7px 16px;
  background: var(--tomato-pale);
  border-radius: 999px;
  max-width: 38vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Кнопки-ссылки на ботов в мессенджерах — только в браузерной версии
   (внутри Telegram/MAX скрыты, у клиента есть своя шапка) */
.topbar__apps {
  display: flex;
  align-items: center;
  gap: 8px;
}
html.in-messenger .topbar__apps { display: none; }
.topbar-app {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 13.5px;
  white-space: nowrap;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.topbar-app:hover {
  border-color: var(--tomato-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.topbar-app:active { transform: translateY(0) scale(.97); }
.topbar-app__icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.topbar-app__icon--tg { background: linear-gradient(135deg, #54a9eb, #2a7fc9); }
.topbar-app__icon--max { background: linear-gradient(135deg, #7c5cff, #5a3ee8); }
.topbar-app__icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* ---------- каркас ---------- */
.page {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 24px 20px 90px;
  flex: 1;
}
.footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  padding: 24px;
}

/* ---------- герой (главная) ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 48px 0 20px;
  background: var(--grad-hero);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto -60px -120px -60px;
  height: 220px;
  background: radial-gradient(closest-side, rgba(255, 122, 82, .16), transparent);
  pointer-events: none;
}
.hero__title {
  font-size: clamp(30px, 5vw, 46px);
  margin: 0 0 14px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -.5px;
}
.hero__title .hl { color: var(--tomato); }
.hero__subtitle {
  color: #7d6a58;
  margin: 0 auto 28px;
  font-size: 16.5px;
  font-weight: 600;
  max-width: 520px;
  line-height: 1.55;
}
.create-form {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 999px;
  padding: 8px;
  box-shadow: var(--shadow-md);
}
.create-form .input {
  flex: 1;
  border: none;
  background: transparent;
  font-weight: 700;
  padding: 12px 18px;
}
.create-form .input:focus { box-shadow: none; transform: none; }

/* плавающие эмодзи-еды */
.float {
  position: absolute;
  font-size: 34px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  animation: floaty 5.5s ease-in-out infinite;
}
.float--1 { left: 5%; top: 22px; animation-delay: 0s; }
.float--2 { right: 6%; top: 44px; animation-delay: .9s; }
.float--3 { left: 11%; bottom: 16px; animation-delay: 1.7s; font-size: 29px; }
.float--4 { right: 11%; bottom: 8px; animation-delay: 2.5s; font-size: 28px; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(4deg); }
}
@media (max-width: 900px) { .float { display: none; } }

/* ---------- кнопки и поля ---------- */
.input {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--tomato-soft); box-shadow: 0 0 0 4px rgba(255, 107, 74, .15); }
textarea.input { resize: vertical; width: 100%; }

.btn {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  background: var(--grad-tomato);
  box-shadow: 0 6px 16px rgba(232, 64, 42, .3);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(232, 64, 42, .38); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--basil { background: var(--grad-basil); box-shadow: 0 6px 16px rgba(62, 155, 79, .3); }
.btn--basil:hover { box-shadow: 0 10px 22px rgba(62, 155, 79, .38); }
.btn--soft {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--line);
}
.btn--soft:hover { border-color: var(--tomato-soft); color: var(--tomato); box-shadow: var(--shadow-md); }
.btn--danger {
  background: var(--surface);
  color: var(--tomato);
  border: 1.5px solid #f5cfc5;
  box-shadow: none;
}
.btn--danger:hover { background: var(--tomato-pale); box-shadow: none; }

/* ---------- мои списки ---------- */
.lists { margin-top: 46px; }
.lists__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.lists__title { font-size: 23px; margin: 0; font-weight: 900; }
.lists__count {
  color: var(--basil-dark);
  font-size: 13.5px;
  font-weight: 800;
  background: var(--basil-pale);
  border-radius: 999px;
  padding: 4px 13px;
}
.lists__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.list-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 18px 16px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform .18s, box-shadow .18s;
  overflow: hidden;
}
.list-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--accent, var(--grad-tomato));
}
.list-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.list-card__top { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.list-card__icon {
  font-size: 24px;
  width: 50px; height: 50px;
  border-radius: 16px;
  background: var(--accent-soft, var(--butter-pale));
  display: flex; align-items: center; justify-content: center;
}
.list-card__arrow {
  color: var(--ink-soft);
  font-weight: 900;
  font-size: 18px;
  transition: transform .15s, color .15s;
}
.list-card:hover .list-card__arrow { transform: translateX(5px); color: var(--tomato); }
.list-card__name { font-weight: 800; font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-card__meta { color: var(--ink-soft); font-size: 13px; font-weight: 700; }

.accent-1 { --accent: var(--grad-tomato); --accent-soft: var(--tomato-pale); }
.accent-2 { --accent: var(--grad-basil);  --accent-soft: var(--basil-pale); }
.accent-3 { --accent: linear-gradient(135deg, #ffce54, #f5a623); --accent-soft: var(--butter-pale); }
.accent-4 { --accent: linear-gradient(135deg, #64b5f6, #1e88e5); --accent-soft: #e3effa; }
.accent-5 { --accent: linear-gradient(135deg, #ba68c8, #8e24aa); --accent-soft: #f3e6f5; }

/* ---------- «как это работает» ---------- */
.how {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.how__card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-md);
  transition: transform .18s;
}
.how__card:hover { transform: translateY(-4px); }
.how__icon {
  font-size: 24px;
  width: 54px; height: 54px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 13px;
  box-shadow: var(--shadow-sm);
}
.how__card:nth-child(1) .how__icon { background: var(--tomato-pale); }
.how__card:nth-child(2) .how__icon { background: var(--basil-pale); }
.how__card:nth-child(3) .how__icon { background: var(--butter-pale); }
.how__card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 900; }
.how__card p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.6; font-weight: 600; }

/* ---------- страница списка ---------- */
.list-head { margin-bottom: 16px; }
.list-head__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.list-head__title {
  font-size: clamp(24px, 4.5vw, 34px);
  margin: 0;
  font-weight: 900;
  letter-spacing: -.5px;
  overflow-wrap: anywhere;
}
.badge {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
}
.badge--owner { background: var(--butter-pale); color: #a06b00; }
.list-head__actions {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; flex-wrap: wrap;
}
.online {
  font-size: 13px;
  font-weight: 800;
  color: var(--basil-dark);
  background: var(--basil-pale);
  border-radius: 999px;
  padding: 8px 15px;
}
.online .dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--basil);
  margin-right: 6px;
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: .7; } }

/* прогресс */
.progress-wrap {
  display: flex; align-items: center; gap: 14px;
  margin: 10px 0 26px;
}
.progress-bar {
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(158, 108, 60, .15);
}
.progress-bar__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad-basil);
  transition: width .5s cubic-bezier(.22, 1.2, .36, 1);
  position: relative;
}
.progress-bar__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: sheen 2.2s linear infinite;
}
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress-text { font-size: 14px; color: var(--ink-soft); font-weight: 800; white-space: nowrap; }

/* ---------- карточки товаров ---------- */
.items__list {
  list-style: none;
  margin: 0; padding: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.item {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
}
.item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.item--pop { animation: pop-in .45s cubic-bezier(.22, 1.4, .36, 1); }
@keyframes pop-in {
  0% { transform: scale(.88) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* фото товара */
.item__photo {
  position: relative;
  height: 150px;
  background: linear-gradient(160deg, #fff4e2, #ffe4d1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.item__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.item:hover .item__photo img { transform: scale(1.06); }
.item__photo-emoji { font-size: 56px; filter: drop-shadow(0 6px 10px rgba(158, 108, 60, .25)); }
.item--checked .item__photo { filter: grayscale(.75) opacity(.8); }

/* крупная галочка */
.item__check {
  position: absolute;
  top: 12px; right: 12px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 253, 248, .95);
  box-shadow: 0 4px 12px rgba(120, 75, 35, .25);
  cursor: pointer;
  color: #e2d9c8;
  font-size: 22px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s, transform .15s;
  z-index: 2;
  padding: 0;
}
.item__check:hover { transform: scale(1.1); }
.item__check:active { transform: scale(.9); }
.item--checked .item__check {
  background: var(--grad-basil);
  color: #fff;
  animation: check-pop .45s cubic-bezier(.22, 1.6, .36, 1);
  box-shadow: 0 6px 16px rgba(62, 155, 79, .45);
}
@keyframes check-pop {
  0% { transform: scale(.55); }
  55% { transform: scale(1.28) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

/* тело карточки */
.item__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.item__name {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  padding-right: 26px;
}
.item--checked .item__name { text-decoration: line-through; color: var(--ink-soft); }
.item__detail-hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ползунок количества */
.item__qty {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 7px 12px;
}
.qbtn {
  width: 26px; height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--tomato);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, color .12s;
  padding: 0;
  line-height: 1;
}
.qbtn:hover { transform: scale(1.15); color: var(--tomato-soft); }
.qbtn:active { transform: scale(.9); }

input[type="range"].qty-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--tomato-soft) var(--fill, 50%), #eadbc4 var(--fill, 50%));
  outline: none;
  cursor: pointer;
  min-width: 40px;
}
input[type="range"].qty-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--tomato);
  box-shadow: 0 2px 6px rgba(232, 64, 42, .4);
  cursor: grab;
  transition: transform .12s;
}
input[type="range"].qty-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"].qty-slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--tomato);
  box-shadow: 0 2px 6px rgba(232, 64, 42, .4);
  cursor: grab;
}
.qty-val {
  font-size: 13px;
  font-weight: 900;
  color: var(--tomato);
  min-width: 52px;
  text-align: center;
  white-space: nowrap;
}
.item--checked .qty-val { color: var(--ink-soft); }

/* метка «куплено» */
.item__done {
  position: absolute;
  left: 14px; top: 14px;
  background: var(--grad-basil);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(62, 155, 79, .4);
  z-index: 2;
  animation: pop-in .35s cubic-bezier(.22, 1.5, .36, 1);
}

/* замок покупки — под галочкой */
.item__lock {
  position: absolute;
  right: 12px;
  top: 66px;
  font-size: 15px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 253, 248, .95);
  box-shadow: 0 4px 12px rgba(120, 75, 35, .3);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  cursor: help;
  animation: pop-in .35s cubic-bezier(.22, 1.5, .36, 1);
}
.item__lock--open { opacity: .85; }

/* заблокированная карточка: приглушаем, но оставляем читаемой */
.item--locked { cursor: default; }
.item--locked:hover { transform: none; box-shadow: var(--shadow-md); }
.item--locked .qty-slider { opacity: .55; cursor: not-allowed; }
.item--locked .qty-slider::-webkit-slider-thumb { cursor: not-allowed; }
.item--locked .qbtn { opacity: .4; cursor: not-allowed; pointer-events: none; }
.item--locked .item__check { cursor: not-allowed; }
.item--locked .item__check:hover { transform: none; }

/* уведомление о замке в модалке */
.modal__locked {
  margin: 0;
  color: #8a6d1a;
  background: var(--butter-pale);
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
}

.items__footer { margin-top: 22px; display: flex; justify-content: center; }

/* ---------- окно «Поделиться» ---------- */
.share-link-row { display: flex; gap: 8px; }
.share-link-row .input {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  background: var(--bg-soft);
}
.share-link-row .btn { padding: 10px 14px; }

.share-apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.share-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 8px 12px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.share-app:hover {
  border-color: var(--tomato-soft);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.share-app:active { transform: translateY(0) scale(.97); }
.share-app__icon {
  font-size: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.share-app__icon--tg { background: linear-gradient(135deg, #54a9eb, #2a7fc9); }
.share-app__icon--max { background: linear-gradient(135deg, #7c5cff, #5a3ee8); }
.share-app__icon--more { background: linear-gradient(135deg, #b0a89a, #8a8172); }
/* SVG-иконки мессенджеров (telegram.svg / max.svg) внутри круглой кнопки */
.share-app__svg {
  width: 60%;
  height: 60%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.share-app__name { font-size: 13px; font-weight: 800; color: var(--ink); }

/* ---------- герой компактный (внутренние страницы) ---------- */
.hero--compact { padding: 34px 0 22px; }
.hero__title--small { font-size: clamp(24px, 4vw, 34px); }

/* ---------- страница /bots ---------- */
.bots {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.bot-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.bot-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.bot-card__icon {
  font-size: 24px;
  width: 56px; height: 56px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex: 0 0 56px;
  box-shadow: var(--shadow-sm);
}
.bot-card__icon--tg { background: linear-gradient(135deg, #54a9eb, #2a7fc9); }
.bot-card__icon--max { background: linear-gradient(135deg, #7c5cff, #5a3ee8); }
.bot-card__head h2 { margin: 0 0 3px; font-size: 18px; font-weight: 900; }
.bot-card__head p { margin: 0; color: var(--ink-soft); font-size: 13.5px; font-weight: 600; }
.bot-card__steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
}
.bot-card__steps a { color: var(--tomato); font-weight: 800; }
.bot-card__note {
  margin: 16px 0 0;
  background: var(--butter-pale);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: #7a5c10;
}
.bot-card__note code, .bot-card__steps code {
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12.5px;
  font-weight: 800;
}
.bots-note {
  margin-top: 22px;
  background: var(--basil-pale);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.bots-note h3 { margin: 0 0 8px; font-size: 16px; font-weight: 900; }
.bots-note p { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.6; color: #2c5e37; }

.footer__link { color: var(--tomato); font-weight: 800; text-decoration: none; }
.footer__link:hover { text-decoration: underline; }

/* блокировка добавления (кнопка владельца) */
.btn--locked { background: var(--butter-pale); color: #8a6d1a; border: 1.5px solid #ecd9a0; }

/* ---------- пустые состояния ---------- */
.empty { text-align: center; padding: 46px 16px; color: var(--ink-soft); }
.empty__icon {
  font-size: 52px;
  margin-bottom: 10px;
  display: inline-block;
  animation: floaty 4.5s ease-in-out infinite;
}
.empty__text { line-height: 1.65; margin: 0 0 18px; font-weight: 700; }

/* ---------- модальные окна ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(59, 46, 37, .45);
  backdrop-filter: blur(4px);
}
.modal__window {
  position: relative;
  margin: auto;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  animation: modal-in .3s cubic-bezier(.22, 1.3, .36, 1);
  padding: 26px;
}
.modal__window--wide { width: min(680px, calc(100vw - 32px)); }
@keyframes modal-in {
  0% { transform: translateY(28px) scale(.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  z-index: 2;
  transition: background .15s, color .15s, transform .15s;
}
.modal__close:hover { background: var(--tomato-pale); color: var(--tomato); transform: rotate(90deg); }
.modal__title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 900;
  padding-right: 40px;
}
.modal__body {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
}
.modal__photo { display: flex; flex-direction: column; gap: 12px; }
.modal__photo-wrap { position: relative; }
.modal__photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  display: block;
}
.modal__photo-empty {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  background: linear-gradient(160deg, #fff4e2, #ffe4d1);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 44px;
  font-weight: 800;
}
.modal__photo-empty small { font-size: 13px; }
.modal__photo-btn { justify-content: center; cursor: pointer; font-size: 14px; padding: 10px 14px; }
.modal__photo-btn.loading { opacity: .55; pointer-events: none; }

/* индикатор загрузки фото */
.modal__photo-loader {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: rgba(59, 46, 37, .55);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  z-index: 3;
}
.modal__photo-loader small { font-size: 13px; }
.spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.modal__info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.modal__name { font-size: 17px; font-weight: 800; width: 100%; }
.modal__label {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 12.5px; font-weight: 900;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.modal__qty-controls { display: flex; gap: 10px; align-items: center; }
.modal__qty-controls .qty-slider { flex: 1; }
.modal__qty-controls .input { width: 92px; }
.modal__qty-val {
  font-size: 15px;
  font-weight: 900;
  color: var(--tomato);
  min-width: 64px;
  text-align: center;
}
.modal__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.modal__hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 600;
}
.modal__checked {
  margin: 0;
  color: var(--basil-dark);
  background: var(--basil-pale);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

/* ---------- плавающая кнопка ---------- */
.fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  height: 60px;
  padding: 0 24px 0 20px;
  border-radius: 999px;
  border: none;
  background: var(--grad-tomato);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 28px rgba(232, 64, 42, .45);
  transition: transform .18s, box-shadow .18s;
}
.fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 34px rgba(232, 64, 42, .5); }
.fab:active { transform: scale(.96); }
.fab__plus {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  font-weight: 900;
}

/* ---------- тосты ---------- */
.toast-host {
  position: fixed;
  bottom: 100px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  gap: 10px; z-index: 200;
  align-items: center;
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(12px) scale(.95);
  transition: all .3s cubic-bezier(.22, 1.3, .36, 1);
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
}
.toast--show { opacity: 1; transform: translateY(0) scale(1); }
.toast--success { background: var(--basil-dark); }
.toast--error { background: var(--tomato); }

/* ---------- баннер cookie (только браузерная версия) ---------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 150;
  background: var(--surface);
  border-top: 2px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: cookie-banner-in .35s cubic-bezier(.22, 1.2, .36, 1);
}
.cookie-banner--closing { opacity: 0; transition: opacity .3s; }
.cookie-banner__inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.cookie-banner__text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  max-width: 640px;
}
.cookie-banner__btn { white-space: nowrap; }
@keyframes cookie-banner-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
/* в мессенджерах баннер скрыт всегда (на случай позднего детекта SDK) */
html.in-messenger .cookie-banner { display: none; }
@media (max-width: 640px) {
  .cookie-banner__inner { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .cookie-banner__text { text-align: center; font-size: 13px; }
  .cookie-banner__btn { width: 100%; }
}

/* ---------- конфетти ---------- */
.confetti-piece {
  position: fixed;
  top: -16px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  z-index: 300;
  pointer-events: none;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: .5; }
}

/* ---------- адаптивность ---------- */
@media (max-width: 640px) {
  .create-form { flex-direction: column; border-radius: 24px; }
  .create-form .btn { justify-content: center; }
  .items__list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .item__photo { height: 110px; }
  .item__photo-emoji { font-size: 40px; }
  .modal__body { grid-template-columns: 1fr; }
  .modal__photo { max-width: 220px; }
  .crumbs { margin-left: 0; width: 100%; }
  .topbar__apps { margin-left: auto; }
  .topbar-app { padding: 5px; }
  .topbar-app__name { display: none; }
  .fab { right: 16px; bottom: 16px; height: 54px; padding: 0 20px 0 16px; font-size: 15px; }
  .qty-val { min-width: 44px; font-size: 12px; }
  .share-apps { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .share-app__icon { width: 38px; height: 38px; font-size: 17px; }
  .share-app__name { font-size: 11.5px; }
}

/* ---------- RTL: арабский, персидский ----------
   Атрибут dir="rtl" ставит i18n.js на <html>; здесь — мелкие правки,
   чтобы зеркальные элементы (шапка, плавающая кнопка) смотрелись ровно */
html[dir="rtl"] .crumbs { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .fab { right: auto; left: 16px; }
html[dir="rtl"] .topbar-app { padding: 5px 5px 5px 14px; }
html[dir="rtl"] .item__qty { direction: ltr; }
html[dir="rtl"] .modal__qty-controls { direction: ltr; }
html[dir="rtl"] .share-link-row { direction: ltr; }

/* уважаем prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
