/* ============ THEME TOKENS ============ */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #eef5fb;
  --bg-grid: rgba(33, 199, 232, 0.06);
  --surface: #ffffff;
  --surface-soft: #f3f7fb;
  --surface-softer: #e9f1f8;
  --text: #1a2330;
  --text-soft: #4a5a72;
  --muted: #8a9bb2;
  --line: #e3ecf4;
  --line-strong: #d4e1ee;
  --accent: #21c7e8;
  --accent-strong: #14b3d6;
  --accent-soft: #d8f2fa;
  --accent-tint: #e9f8fc;
  --accent-grad: linear-gradient(135deg, #5de1f0 0%, #21c7e8 60%, #1aa7c8 100%);
  --shadow-card: 0 12px 32px rgba(28, 80, 120, 0.08);
  --shadow-card-strong: 0 18px 44px rgba(28, 80, 120, 0.14);
  --shadow-fab: 0 14px 28px rgba(33, 199, 232, 0.45);
  --danger-soft: #ffe1e6;
  --danger: #ff5577;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1018;
  --bg-grid: rgba(33, 199, 232, 0.05);
  --surface: #141c28;
  --surface-soft: #1b2433;
  --surface-softer: #232d3e;
  --text: #f4f8fc;
  --text-soft: #c2cdde;
  --muted: #7a8aa3;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --accent: #21c7e8;
  --accent-strong: #5de1f0;
  --accent-soft: rgba(33, 199, 232, 0.18);
  --accent-tint: rgba(33, 199, 232, 0.10);
  --accent-grad: linear-gradient(135deg, #5de1f0 0%, #21c7e8 60%, #1aa7c8 100%);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-card-strong: 0 18px 44px rgba(0, 0, 0, 0.5);
  --shadow-fab: 0 14px 28px rgba(33, 199, 232, 0.55);
  --danger-soft: rgba(255, 85, 119, 0.18);
  --danger: #ff6f88;
}

/* ============ RESET ============ */
* { box-sizing: border-box; }
html, body, #root { min-height: 100%; margin: 0; }
html, body {
  /* запрет pinch-zoom и double-tap zoom на тач-устройствах */
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  /* убираем серый тап-хайлайт iOS/Android по всему приложению */
  -webkit-tap-highlight-color: transparent;
}
* { -webkit-tap-highlight-color: transparent; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "SF Pro Display", "Inter", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
input, textarea { outline: none; }

/* ============ BAN SCREEN ============ */
.ban-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 100, 120, 0.18), transparent 40%),
    var(--bg);
}
.ban-screen__card {
  display: grid; gap: 16px; justify-items: center;
  width: 100%; max-width: 380px;
  padding: 32px 24px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card-strong);
  text-align: center;
}
.ban-screen__icon {
  width: 88px; height: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb1c0 0%, #ff6f88 100%);
  color: #fff;
  font-size: 2.6rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 28px rgba(255, 85, 119, 0.35);
}
.ban-screen__card h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
}
.ban-screen__card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  white-space: pre-wrap;
}
.ban-screen__card .primary-button { background: linear-gradient(135deg, #ff8aa0 0%, #ff5577 100%); box-shadow: 0 14px 28px rgba(255, 85, 119, 0.4); }

/* ============ APP SHELL ============ */
.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, var(--accent-tint), transparent 40%),
    repeating-linear-gradient(0deg, transparent 0 39px, var(--bg-grid) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--bg-grid) 39px 40px),
    var(--bg);
}

.app-frame {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 14px 150px;
}
.app-frame--subpage {
  padding: 0;
}

.content { display: grid; gap: 16px; }

/* ============ TOAST + LOADER ============ */
.success-overlay {
  position: fixed; inset: 0;
  z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 22, 18, 0.68);
  animation: success-fade 0.16s ease-out;
}
@keyframes success-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.success-card {
  position: relative;
  display: grid; gap: 14px; justify-items: center;
  padding: 32px 36px;
  border-radius: 28px;
  background: linear-gradient(160deg, #4ee293 0%, #2cb673 55%, #1d8d5b 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 34px rgba(18, 95, 62, 0.32);
  animation: success-pop 0.22s ease-out;
  min-width: 240px;
  max-width: 90vw;
  will-change: transform, opacity;
}
@keyframes success-pop {
  0%   { transform: translate3d(0, 10px, 0) scale(0.96); opacity: 0; }
  100% { transform: scale(1); }
}
.success-card::before {
  content: none;
}
.success-check {
  width: 96px; height: 96px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  animation: success-check-bounce 0.2s ease-out 0.04s both;
  will-change: transform, opacity;
}
@keyframes success-check-bounce {
  0%   { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); }
}
.success-check svg { width: 64px; height: 64px; }
.success-check__ring {
  stroke-dashoffset: 0;
}
.success-check__tick {
  animation: success-check-draw 0.34s ease-out 0.16s forwards;
}
@keyframes success-check-draw {
  to { stroke-dashoffset: 0; }
}
.success-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.success-sub {
  margin: 0 0 6px;
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}
.success-button {
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.98rem;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.success-button--primary {
  background: #fff;
  color: #1d8d5b;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.success-button--primary svg { width: 18px; height: 18px; transform: translate(-1px, 1px) rotate(-8deg); }
.success-button--primary:hover { transform: translateY(-1px); }
.success-button--ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  min-height: 42px;
  font-size: 0.92rem;
}

.success-confetti {
  position: absolute;
  width: 10px; height: 14px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  animation: confetti-fall 1.6s ease-out forwards;
}
.success-confetti--1 { left: 18%; top: 30%; background: #ffe35a; transform: rotate(20deg); animation-delay: 0.1s; }
.success-confetti--2 { left: 78%; top: 28%; background: #5eecff; transform: rotate(-15deg); animation-delay: 0.18s; }
.success-confetti--3 { left: 28%; top: 62%; background: #ff6f9c; transform: rotate(35deg); animation-delay: 0.28s; }
.success-confetti--4 { left: 70%; top: 70%; background: #a3ff75; transform: rotate(-30deg); animation-delay: 0.16s; }
.success-confetti--5 { left: 50%; top: 18%; background: #ffaa3a; transform: rotate(10deg); animation-delay: 0.22s; }
.success-confetti--6 { left: 12%; top: 75%; background: #c47bff; transform: rotate(-25deg); animation-delay: 0.34s; }
@keyframes confetti-fall {
  0%   { opacity: 0; transform: translate(0, -40px) rotate(0); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--cx, 0), 200px) rotate(540deg); }
}

.app-toast {
  position: fixed; top: 18px; left: 50%;
  transform: translateX(-50%);
  /* Должен быть выше success-overlay (z=80), sheet-backdrop (z=50/60),
     иначе при тапе в success-модалке/sheet'е юзер не видит обратной связи. */
  z-index: 100;
  max-width: min(calc(100% - 28px), 360px);
  padding: 12px 18px;
  border-radius: 16px;
  /* контрастный тёмный фон, чтобы не сливался с поверхностью */
  background: rgba(15, 20, 30, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.loading-screen {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}

/* ====== CSS-only "pulse" loader (eboye / ANPxVX, восстановлено) ====== */
.loader {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.loader > div {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.1);
  border-radius: 50%;
  opacity: 0.2;
  animation: loader-pulse 1.6s cubic-bezier(0.5, 0.05, 0.5, 0.95) infinite;
}
.loader__circle {
  width: 280px; height: 280px;
  background: var(--accent);
  opacity: 0.08;
  animation-delay: 0s;
}
.loader__circle-small {
  width: 220px; height: 220px;
  border: 4px dashed var(--accent);
  background: transparent;
  opacity: 0.5;
  animation: loader-spin 9s linear infinite;
  transform: translate(-50%, -50%);
}
.loader__circle-big {
  width: 170px; height: 170px;
  background: var(--accent);
  opacity: 0.18;
  animation-delay: 0.2s;
}
.loader__circle-inner {
  width: 120px; height: 120px;
  background: var(--accent);
  opacity: 0.3;
  animation-delay: 0.4s;
}
.loader__circle-inner-inner {
  width: 70px; height: 70px;
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 24px var(--accent);
  animation: loader-pulse 1.6s cubic-bezier(0.5, 0.05, 0.5, 0.95) infinite;
  animation-delay: 0.6s;
}
@keyframes loader-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.1); opacity: 0.2; }
  50%  { transform: translate(-50%, -50%) scale(1);   opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(0.1); opacity: 0.2; }
}
@keyframes loader-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============ HEADER CARD ============ */
.header-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.header-card__brand {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
}
.header-card__logo {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 0.78rem;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 14px rgba(33, 199, 232, 0.35);
}
.header-card__title {
  color: var(--accent);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

.header-card__row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 10px;
}

.search-field {
  display: flex; align-items: center; gap: 10px;
  height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
}
.search-field svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.search-field input {
  flex: 1; min-width: 0;
  border: 0; background: transparent;
  color: var(--text);
  font-size: 0.96rem;
}
.search-field input::placeholder { color: var(--muted); }

.filter-button {
  height: 52px; width: 52px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
}
.filter-button svg { width: 20px; height: 20px; }

/* ============ PROMO TILES ============ */
.promo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.promo-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  color: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  background: var(--accent-grad);
}
.promo-tile--alt {
  background: linear-gradient(135deg, #ff8aa8 0%, #c34b6e 100%);
}
.promo-tile--neutral {
  background: linear-gradient(180deg, #b6c3d4 0%, #6c7c91 100%);
}
.promo-tile--image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.promo-tile--image .promo-tile__title,
.promo-tile--image .promo-tile__sub { display: none; }
.promo-tile__open {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px;
  border-radius: 10px;
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.promo-tile__open svg { width: 14px; height: 14px; color: #fff; }
.promo-tile__title {
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1.05;
  text-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.promo-tile__sub {
  margin-top: 2px;
  font-size: 0.74rem;
  opacity: 0.92;
  font-weight: 600;
}

/* ============ STATS ROW ============ */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stats-card {
  border-radius: 22px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 10px;
}
.stats-card__icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.stats-card__icon svg { width: 18px; height: 18px; }
.stats-card__label {
  font-size: 0.92rem;
  color: var(--text-soft);
  font-weight: 600;
}
.stats-card__value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}
.stats-card__hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.cta-card {
  border-radius: 22px;
  padding: 18px;
  background: var(--accent-grad);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 28px rgba(33, 199, 232, 0.3);
  display: grid;
  gap: 14px;
  align-content: space-between;
  text-align: left;
  min-height: 138px;
}
.cta-card__title {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.15;
}
.cta-card__arrow {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  justify-self: start;
}
.cta-card__arrow svg { width: 16px; height: 16px; color: #fff; }

/* ============ PRIZES CARD — белая ============ */
.prizes-card {
  position: relative;
  border-radius: 22px;
  padding: 16px 16px 14px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 200, 80, 0.12), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 224px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}
.prizes-card__bokeh {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 190, 90, 0.32) 0, transparent 3.5px),
    radial-gradient(circle at 78% 16%, rgba(255, 190, 90, 0.28) 0, transparent 4px),
    radial-gradient(circle at 32% 78%, rgba(255, 190, 90, 0.22) 0, transparent 4.5px),
    radial-gradient(circle at 88% 62%, rgba(255, 190, 90, 0.3) 0, transparent 3px),
    radial-gradient(circle at 56% 8%, rgba(255, 190, 90, 0.2) 0, transparent 4px),
    radial-gradient(circle at 8% 60%, rgba(255, 190, 90, 0.25) 0, transparent 3px);
  filter: blur(0.7px);
  pointer-events: none;
  animation: prizes-bokeh-drift 16s ease-in-out infinite alternate;
}
@keyframes prizes-bokeh-drift {
  0%   { transform: translateY(0) scale(1);   opacity: 0.85; }
  100% { transform: translateY(-6px) scale(1.04); opacity: 1; }
}

.prizes-card__head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
}
.prizes-card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff5b8 0%, #ffce3a 50%, #b07810 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow:
    0 6px 16px rgba(212, 148, 22, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(0, 0, 0, 0.18);
}
.prizes-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Большая золотая цифра с переливающимся бликом */
.prizes-card__value {
  position: relative;
  z-index: 2;
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  margin: 4px 0 0 4px;
  letter-spacing: -0.02em;
  /* Золотой градиент с движущимся блик-стрипом */
  background: linear-gradient(110deg,
    #7e5310 0%,
    #b07810 18%,
    #ffce3a 38%,
    #fff8d8 50%,
    #ffce3a 62%,
    #b07810 82%,
    #7e5310 100%);
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  align-self: center;
  filter: drop-shadow(0 2px 8px rgba(255, 200, 80, 0.25));
  animation: prizes-shimmer 3.8s ease-in-out infinite;
}
@keyframes prizes-shimmer {
  0%, 100% { background-position: 200% 0; }
  50%      { background-position: -50% 0; }
}

/* Лента последних 3 призов */
.prizes-card__ribbon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.prizes-card__chip {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5fa5c2, #46568a);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 4px rgba(20, 40, 80, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
  flex-shrink: 0;
}
.prizes-card__chip--miss { background: linear-gradient(135deg, #b8b8c0, #888894); opacity: 0.85; }
.prizes-card__chip--photo {
  background: transparent;
  border: 0;
  padding: 0;
  overflow: visible;
  box-shadow: none;
  width: 34px;
  height: 34px;
}
.prizes-card__chip--photo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
.prizes-card__chip-num {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}
.prizes-card__more {
  margin-left: auto;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 800;
}
.prizes-card__hint {
  position: relative;
  z-index: 2;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* ============ ROULETTE PAGE ============ */
.page-roulette {
  position: relative;
  border-radius: 0;
  padding: 14px 14px max(22px, calc(env(safe-area-inset-bottom) + 16px));
  background:
    radial-gradient(circle at 20% 90%, rgba(160, 0, 30, 0.22), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 180, 80, 0.15), transparent 55%),
    linear-gradient(160deg, #14081a 0%, #240e30 45%, #160620 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  min-height: 100vh;
}
/* Результат уезжает вниз — толкает CTA в самый низ экрана */
.page-roulette__result { margin-top: auto; }
.page-roulette__header {
  display: grid;
  grid-template-columns: 38px 1fr 56px;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 3;
}
.page-back {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 0;
  background: rgba(255,255,255,0.10);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.page-back:active { background: rgba(255,255,255,0.18); transform: scale(0.95); }
.page-roulette__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.page-roulette__meta {
  justify-self: end;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: rgba(255,255,255,0.12);
  padding: 6px 10px;
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
}
.page-roulette__meta--btn {
  cursor: pointer;
  border: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.page-roulette__timer {
  justify-self: end;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffeec0;
  background: linear-gradient(180deg, rgba(255, 215, 90, 0.18) 0%, rgba(180, 120, 30, 0.18) 100%);
  border: 1px solid rgba(255, 220, 130, 0.32);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.page-roulette__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.page-roulette__glow {
  position: absolute;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,90,0.32) 0%, rgba(255,160,60,0.15) 35%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  animation: glow-breath 3.6s ease-in-out infinite;
}
.page-roulette__pointer-svg {
  position: absolute;
  top: -2%;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 14px rgba(255, 200, 80, 0.6));
  z-index: 3;
  /* Анкер у верхушки стрелки (она «крепится» сверху) — чтобы при щелчке
     раскачивался кончик, а не вся фигура. */
  transform-origin: 50% 8%;
}
/* Лёгкая реакция стрелки на прохождение сектора. */
@keyframes roulette-pointer-tick {
  0%   { transform: translateX(-50%) rotate(0deg); }
  48%  { transform: translateX(-50%) rotate(-1.05deg); }
  100% { transform: translateX(-50%) rotate(0deg); }
}
@keyframes roulette-pointer-final {
  0%   { transform: translateX(-50%) rotate(0deg); }
  46%  { transform: translateX(-50%) rotate(-0.9deg); }
  100% { transform: translateX(-50%) rotate(0deg); }
}
.page-roulette__pointer-svg--tick {
  animation: roulette-pointer-tick 70ms ease-out;
}
.page-roulette__pointer-svg--final {
  animation: roulette-pointer-final 210ms cubic-bezier(0.16, 0.84, 0.28, 1);
}
@media (prefers-reduced-motion: reduce) {
  .page-roulette__pointer-svg--tick,
  .page-roulette__pointer-svg--final {
    animation: none;
  }
}
.rewards-wheel-svg {
  width: 92%;
  aspect-ratio: 1 / 1;
  filter:
    drop-shadow(0 12px 22px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 22px rgba(245, 180, 70, 0.4));
}

.page-roulette__result {
  text-align: center;
  display: grid;
  gap: 4px;
  min-height: 48px;
}
.page-roulette__result-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  text-align: center;
  width: 100%;
  /* Компенсация trailing letter-spacing для оптического центрирования */
  padding-left: 0.1em;
  justify-self: center;
}
.page-roulette__result-title {
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(180deg, #fff5c2 0%, #e8be58 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-roulette__cta {
  height: 56px;
  border-radius: 18px;
  border: 0;
  background: linear-gradient(180deg, #ffd84a 0%, #d49416 100%);
  color: #2a1d05;
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 10px 22px rgba(212, 148, 22, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.1s ease;
}
.page-roulette__cta:active { transform: translateY(1px); }
.page-roulette__cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.page-roulette__cta-secondary {
  margin-top: 8px;
  height: 44px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 216, 74, 0.5);
  background: rgba(50, 35, 10, 0.4);
  color: #ffd84a;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.page-roulette__cta-secondary:active { transform: translateY(1px); }
.page-roulette__spins-info {
  margin-top: 14px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 216, 74, 0.1);
  border: 1px solid rgba(255, 216, 74, 0.25);
  text-align: center;
}
.page-roulette__spins-line {
  color: #ffe27a;
  font-weight: 700;
  font-size: 0.95rem;
  /* Flexbox + center выравнивает текст, цифру «1» и кружочек со знаком «?»
     по вертикальному центру строки — без подгонок vertical-align / translateY. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.page-roulette__spins-line strong { color: #fff; font-size: 1.1rem; margin-left: 4px; line-height: 1; }
.page-roulette__spins-help {
  margin-left: 6px;
  width: 22px; height: 22px;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.55);
  color: #ff8a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.12s ease;
}
.page-roulette__spins-help > * {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: ui-rounded, -apple-system, system-ui, sans-serif;
}
.page-roulette__spins-help:hover { background: rgba(239, 68, 68, 0.35); }
.page-roulette__spins-help:active { transform: scale(0.92); }

/* === Ticker последних выигрышей (под колесом, заменяет «Нажми Крутить») === */
.roulette-ticker {
  margin: 6px 0 10px;
  overflow: hidden;
  padding: 4px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
          mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.roulette-ticker__track {
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
  animation: roulette-ticker-scroll 45s linear infinite;
  will-change: transform;
}
@keyframes roulette-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.roulette-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 216, 74, 0.14) 0%, rgba(40, 25, 50, 0.45) 100%);
  border: 1px solid rgba(255, 216, 74, 0.22);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 230, 160, 0.85);
  flex-shrink: 0;
}
.roulette-ticker__status {
  color: rgba(255, 226, 122, 0.9);
  font-weight: 700;
}
.roulette-ticker__sep {
  color: rgba(255, 226, 122, 0.4);
  font-weight: 800;
}
.roulette-ticker__prize {
  color: #fff;
  font-weight: 800;
}

/* ============ RESULT MODAL ============ */
.result-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: result-fade-in 0.25s ease;
}
@keyframes result-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.result-modal {
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 200, 80, 0.25), transparent 55%),
    linear-gradient(160deg, #1a0d1e 0%, #2a1235 50%, #1f0820 100%);
  border: 1px solid rgba(255, 200, 80, 0.28);
  border-radius: 24px;
  padding: 28px 22px 22px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  color: #fff;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(255, 200, 80, 0.25);
  animation: result-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.result-modal--miss {
  background:
    radial-gradient(circle at 50% 0%, rgba(160, 160, 180, 0.15), transparent 55%),
    linear-gradient(160deg, #161620 0%, #1e1e2a 50%, #14141c 100%);
  border-color: rgba(255, 255, 255, 0.12);
}
@keyframes result-pop {
  0%   { opacity: 0; transform: scale(0.6) translateY(8px); }
  60%  { opacity: 1; transform: scale(1.04) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.result-modal__icon {
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff5b8 0%, #ffd84a 45%, #b07810 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow:
    0 18px 40px rgba(255, 200, 80, 0.42),
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -4px 8px rgba(0, 0, 0, 0.22);
  animation: result-icon-glow 2.4s ease-in-out infinite;
  overflow: hidden;
}
.result-modal__icon--photo {
  padding: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
  overflow: visible;
  border-radius: 0;
}
.result-modal__icon--photo img {
  width: 120%; height: 120%;
  object-fit: contain;
  display: block;
  margin: -10% auto;
  filter: drop-shadow(0 10px 18px rgba(255, 200, 80, 0.35));
}
.result-modal__icon--miss {
  background: linear-gradient(135deg, #6e6e7c, #2a2a32);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    inset 0 -4px 8px rgba(0, 0, 0, 0.4);
  animation: none;
}
@keyframes result-icon-glow {
  0%, 100% { box-shadow: 0 18px 40px rgba(255, 200, 80, 0.42), inset 0 2px 0 rgba(255,255,255,0.55), inset 0 -4px 8px rgba(0,0,0,0.22); }
  50%      { box-shadow: 0 24px 56px rgba(255, 200, 80, 0.6),  inset 0 2px 0 rgba(255,255,255,0.55), inset 0 -4px 8px rgba(0,0,0,0.22); }
}

.result-modal__bonus-num {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.result-modal__bonus-r {
  font-size: 1.4rem;
  font-weight: 800;
}

.result-modal__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}
.result-modal__title {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
  background: linear-gradient(180deg, #fff5b8 0%, #ffce3a 50%, #b07810 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.result-modal--miss .result-modal__title {
  background: none;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.9);
  color: rgba(255, 255, 255, 0.9);
}
.result-modal__subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 10px 0 4px;
  font-weight: 600;
}
.result-modal__btn {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffd84a 0%, #b07810 100%);
  border: 0;
  color: #1a0d1e;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 200, 80, 0.35);
  transition: transform 0.12s ease;
}
.result-modal__btn:active { transform: scale(0.97); }
.result-modal--miss .result-modal__btn {
  background: linear-gradient(135deg, #6e6e7c, #2a2a32);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.result-modal__btn--share {
  margin-top: 10px;
  background: linear-gradient(135deg, #5acef4 0%, #2a8ea8 100%);
  color: #0e2230;
  box-shadow: 0 6px 16px rgba(90, 206, 244, 0.3);
}

/* «1 бонус» (id=miss) — у one_money.png больше прозрачных полей вокруг монеты,
   поэтому визуально меньше других. Чуть увеличиваем чтобы выровнять с «0 бонусов». */
img[data-reward="miss"] { transform: scale(1.12); }

/* === Топ выигрышей за неделю === */
.roulette-top-week {
  margin-top: 16px;
  padding: 12px 14px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 216, 74, 0.08) 0%, rgba(20, 14, 30, 0.55) 100%);
  border: 1px solid rgba(255, 216, 74, 0.18);
}
.roulette-top-week__head {
  font-weight: 800;
  color: #ffe27a;
  font-size: 0.95rem;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.roulette-top-week__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.roulette-top-week__row {
  display: grid;
  grid-template-columns: 30px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}
.roulette-top-week__row:last-child { border-bottom: 0; }
.roulette-top-week__rank {
  color: #ffd84a;
  font-weight: 800;
  font-size: 0.8rem;
}
.roulette-top-week__name {
  color: #fff;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roulette-top-week__prize {
  color: #c8e9ff;
  font-weight: 700;
  font-size: 0.82rem;
  padding-left: 6px;
}
.roulette-top-week__date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  padding-left: 6px;
}

/* мини-список возможных наград (между колесом и кнопкой) — горизонтальный скролл */
.rewards-mini-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 4px 14px;
  margin: 0 -14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.rewards-mini-list::-webkit-scrollbar { display: none; }
.rmi { flex: 0 0 auto; }
.rmi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}
.rmi__icon--photo {
  background: transparent !important;
  padding: 0;
  overflow: visible;
  box-shadow: none !important;
  width: 30px !important;
  height: 30px !important;
}
.rmi__icon--photo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.rmi__icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(0, 0, 0, 0.35);
}
.rmi__bonus-num {
  font-size: 0.62rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}
.rmi__title { font-size: 0.74rem; }

/* ============ PRIZES PAGE ============ */
.page-prizes {
  background: var(--bg);
  padding: 14px 14px max(22px, calc(env(safe-area-inset-bottom) + 16px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  color: var(--text);
  min-height: 100vh;
}
/* prize-row не должна растягиваться вертикально, если она одна */
.page-prizes .prizes-list { align-self: stretch; }
.page-prizes .prize-row { align-self: start; }
/* шапка в призах — тема приложения */
.page-prizes .page-roulette__title { color: var(--text); }
.page-prizes .page-back {
  background: var(--surface-soft);
  color: var(--text);
}
.page-prizes .page-roulette__meta,
.page-prizes .page-roulette__meta--btn {
  background: var(--surface-soft);
  color: var(--muted);
}

.prizes-empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.prizes-empty__icon { font-size: 3rem; }

.prizes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.prize-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.prize-row--miss { opacity: 0.55; }
.prize-row__share {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  border: 1px solid rgba(33, 199, 232, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.18s ease;
}
.prize-row__share:active { transform: scale(0.94); }
.prize-row__share:hover { background: rgba(33, 199, 232, 0.22); }
.prize-row__icon--photo { padding: 0; overflow: hidden; background: var(--surface-soft); }
.prize-row__icon--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prize-row__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
}
.prize-row__title { font-weight: 700; font-size: 0.98rem; color: var(--text); }
.prize-row__date { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ============ ROULETTE CARD (preview) ============ */
.roulette-card {
  position: relative;
  border-radius: 22px;
  padding: 14px 14px 16px;
  background:
    radial-gradient(circle at 20% 90%, rgba(160, 0, 30, 0.18), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 180, 80, 0.10), transparent 55%),
    linear-gradient(160deg, #1a0d1e 0%, #2a1235 45%, #1f0820 100%);
  color: #fff;
  border: 0;
  box-shadow:
    0 18px 36px rgba(20, 8, 30, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  text-align: left;
  min-height: 224px;
  overflow: hidden;
  cursor: pointer;
}
.roulette-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 200, 80, 0.18), transparent 45%),
    radial-gradient(circle at 20% 90%, rgba(120, 80, 255, 0.22), transparent 50%);
  pointer-events: none;
}
.roulette-card__title {
  position: relative;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  z-index: 2;
}
.roulette-card__hint {
  position: relative;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  z-index: 2;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
}
.roulette-card__hint-clock { color: #ffce3a; font-size: 0.9rem; }
.roulette-card__hint-ready {
  color: #82e9b2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roulette-card__stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  min-height: 130px;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}
/* боке-частицы CSS */
.roulette-card__stage::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 220, 130, 0.45) 0, transparent 3px),
    radial-gradient(circle at 82% 14%, rgba(255, 220, 130, 0.4) 0, transparent 4px),
    radial-gradient(circle at 28% 80%, rgba(255, 220, 130, 0.35) 0, transparent 5px),
    radial-gradient(circle at 90% 56%, rgba(255, 220, 130, 0.4) 0, transparent 3.5px),
    radial-gradient(circle at 50% 8%, rgba(255, 220, 130, 0.3) 0, transparent 4px),
    radial-gradient(circle at 6% 60%, rgba(255, 220, 130, 0.35) 0, transparent 3px),
    radial-gradient(circle at 70% 88%, rgba(255, 220, 130, 0.45) 0, transparent 4px),
    radial-gradient(circle at 40% 30%, rgba(255, 220, 130, 0.25) 0, transparent 2.5px);
  pointer-events: none;
  z-index: 1;
  filter: blur(0.8px);
  animation: bokeh-drift 18s ease-in-out infinite alternate;
}
@keyframes bokeh-drift {
  0%   { transform: translateY(0) scale(1);   opacity: 0.85; }
  50%  { transform: translateY(-6px) scale(1.05); opacity: 1;    }
  100% { transform: translateY(2px) scale(0.98); opacity: 0.7;  }
}

/* свечение под колесом */
.roulette-glow {
  position: absolute;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 90, 0.35) 0%, rgba(255, 160, 60, 0.15) 35%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 1;
  animation: glow-breath 3.6s ease-in-out infinite;
}
@keyframes glow-breath {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.85; transform: scale(1.04); }
}

/* колесо: SVG + transform для вращения */
.roulette-wheel-2d {
  position: relative;
  width: 80%;
  aspect-ratio: 1 / 1;
  z-index: 2;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 0.0s linear;
  filter:
    drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 18px rgba(245, 180, 70, 0.35));
}
.roulette-wheel-2d.is-spinning {
  transition: transform 3.4s cubic-bezier(0.17, 0.67, 0.22, 1);
}
.roulette-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* указатель сверху */
.roulette-pointer {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 14px solid #fff5c2;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7));
  z-index: 3;
}

/* locked-состояние: пользователь не достиг уровня «Покупатель» */
.roulette-card--locked .roulette-card__stage {
  filter: grayscale(0.6) brightness(0.55);
}
.roulette-card--locked .roulette-card__title { opacity: 0.85; }
.roulette-card__lock {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -40%);
  font-size: 2rem;
  z-index: 3;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

/* ============ INFO ROW (empty orders, etc) ============ */
.info-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  width: 100%;
  text-align: left;
  color: inherit;
  font-family: inherit;
}
.info-row--clickable { cursor: pointer; transition: border-color 0.15s ease; }
@media (hover: hover) {
  .info-row--clickable:hover { border-color: var(--accent); }
}
.info-row__icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
}
.info-row__icon svg { width: 26px; height: 26px; }
.info-row__icon--photo { overflow: hidden; padding: 0; }
.info-row__icon--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.info-row__icon--fav {
  background: linear-gradient(135deg, #ffd1dc 0%, #ffaab8 100%);
  color: #c23052;
  font-size: 1.5rem;
}
.info-row--fav { border-color: rgba(227, 80, 101, 0.2); }

/* === Сердечко на карточке товара (раздел 6.2) === */
.product-card__fav-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(20, 26, 38, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  z-index: 2;
  user-select: none;
}
.product-card__fav-btn:active { transform: scale(0.88); }
.product-card__fav-btn--on {
  background: linear-gradient(135deg, #ff5577 0%, #e62f50 100%);
  box-shadow: 0 4px 12px rgba(255, 85, 119, 0.5);
}

/* === Распроданный товар (раздел 6.2) === */
.product-card--sold {
  opacity: 0.55;
  filter: grayscale(0.7);
  cursor: not-allowed;
  pointer-events: none;
}
.product-card--sold .product-card__img { filter: grayscale(1); }
.product-card--sold .product-card__title {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 90, 110, 0.7);
  text-decoration-thickness: 2px;
}
.product-card__sold-badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ff5577;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  pointer-events: none;
}
/* === InfoBlocks renderer (раздел 7 ТЗ) === */
.info-blocks { display: flex; flex-direction: column; gap: 14px; padding: 8px 0; }
.info-blocks__empty {
  color: var(--muted);
  text-align: center;
  padding: 32px 16px;
  font-size: 0.95rem;
}
.info-blocks__h2 {
  margin: 8px 0 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.005em;
}
.info-blocks__h3 {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-soft);
}
.info-blocks__p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.info-blocks__hr {
  border: 0;
  border-top: 1px dashed rgba(33, 199, 232, 0.3);
  margin: 6px 0;
}
.info-blocks__figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 4px 14px -8px rgba(0,0,0,0.25);
  /* iOS WebKit-баг: overflow:hidden + border-radius на figure не всегда обрезает
     img сам по себе. Принудительный стэкинг-контекст через isolation чинит. */
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.info-blocks__figure img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
  object-fit: contain;
  background: rgba(33, 199, 232, 0.04);
  /* Дублируем скругление и на сам img — иначе на iOS Telegram WebView углы
     не всегда обрезаются по figure. */
  border-radius: 16px;
}
.info-blocks__figure figcaption {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}
.info-blocks__step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(33, 199, 232, 0.08), rgba(33, 199, 232, 0.02));
  border: 1px solid rgba(33, 199, 232, 0.18);
}
.info-blocks__step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-grad, var(--accent));
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -4px rgba(33, 199, 232, 0.6);
}
.info-blocks__step-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.info-blocks__step-title { font-size: 1rem; font-weight: 800; }
.info-blocks__step-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-soft);
  white-space: pre-wrap;
}
.info-blocks__callout {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
  font-weight: 600;
  border: 1px solid transparent;
}
.info-blocks__callout--info {
  background: rgba(33, 199, 232, 0.10);
  color: var(--accent-strong);
  border-color: rgba(33, 199, 232, 0.25);
}
.info-blocks__callout--warn {
  background: rgba(255, 138, 61, 0.10);
  color: #d96a1a;
  border-color: rgba(255, 138, 61, 0.3);
}
.info-blocks__callout--success {
  background: rgba(46, 184, 114, 0.10);
  color: #1ea15c;
  border-color: rgba(46, 184, 114, 0.3);
}

.sheet--info { padding-bottom: 20px; }

/* === Маркет бонусов (раздел 4.4 ТЗ) === */
.sheet--market { padding-bottom: 24px; }
.sheet__head-icon--market {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: transparent;
  overflow: hidden;
  flex-shrink: 0;
}
.sheet__head-icon--market img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Иконка-фотография «💰» в шапке истории бонусов — без чёрных углов:
   убираем фон родителя и обрезаем по скруглению. */
.sheet__head-icon--money {
  background: transparent;
  overflow: hidden;
  padding: 0;
}
.sheet__head-icon--money img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Фото-иконки для шапок: Мои заказы, Реферальная программа, Избранное,
   История экономии, Точка самовывоза. Стиль идентичен .sheet__head-icon--market. */
.sheet__head-icon--orders,
.sheet__head-icon--referral,
.sheet__head-icon--favorites,
.sheet__head-icon--savings,
.sheet__head-icon--pickup,
.sheet__head-icon--info-photo {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: transparent;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
}
.sheet__head-icon--orders img,
.sheet__head-icon--referral img,
.sheet__head-icon--favorites img,
.sheet__head-icon--savings img,
.sheet__head-icon--pickup img,
.sheet__head-icon--info-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Фото-иконка триггера «Избранное» — без фона, без обрезки до круга. */
.info-row__icon--photo {
  background: transparent;
  overflow: hidden;
  padding: 0;
}
.info-row__icon--photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Фото-иконка карточки «История экономии» — без зелёного фона, фото 1:1. */
.savings-card__icon--photo {
  background: transparent !important;
  overflow: hidden;
  padding: 0;
}
.savings-card__icon--photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Picker товара для брони (раздел 4.4 ТЗ) ===== */
.sheet--booking { max-height: 92vh; max-height: 92dvh; overflow-y: auto; padding-bottom: 12px; }
.booking-picker { padding: 4px 4px 100px; display: flex; flex-direction: column; gap: 18px; }
.booking-picker__group-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.booking-picker__lines { display: flex; flex-direction: column; gap: 6px; }
.booking-line {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.18s ease;
}
.booking-line--open { border-color: rgba(33, 199, 232, 0.55); }
.booking-line__head {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.booking-line__head:disabled { opacity: 0.42; cursor: not-allowed; }
.booking-line__title { font-weight: 700; font-size: 0.95rem; }
.booking-line__meta { font-size: 0.78rem; color: var(--muted); }
.booking-line__chev { color: var(--muted); font-size: 0.85rem; }
.booking-line__flavors {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 8px 10px;
  background: rgba(33, 199, 232, 0.04);
}
.booking-flavor {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.booking-flavor:disabled { opacity: 0.4; cursor: not-allowed; }
.booking-flavor:not(:disabled):hover { background: rgba(33, 199, 232, 0.06); }
.booking-flavor--picked {
  background: rgba(33, 199, 232, 0.14) !important;
  border-color: rgba(33, 199, 232, 0.8);
  font-weight: 700;
}
.booking-flavor__name { font-size: 0.92rem; }
.booking-flavor__stock { font-size: 0.76rem; color: var(--muted); }
.booking-picker__footer {
  position: sticky;
  bottom: 0;
  margin: 8px -4px 0;
  padding: 12px 16px 14px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 -6px 18px -10px rgba(0,0,0,0.4);
}
.booking-picker__summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.92rem;
}
.booking-picker__summary span { color: var(--muted); font-size: 0.82rem; }
.booking-picker__payment {
  display: flex;
  align-items: center;
  gap: 6px;
}
.booking-picker__payment-label { font-size: 0.85rem; color: var(--muted); margin-right: 4px; }
.booking-payment-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.booking-payment-chip--active {
  background: rgba(33, 199, 232, 0.16);
  border-color: rgba(33, 199, 232, 0.7);
  color: var(--accent-strong);
  font-weight: 700;
}
.booking-picker__confirm { margin-top: 2px; }

/* Иконка-пин в чипе «Точка самовывоза» — 3D PNG, без подложки и без
   круглой обводки (у PNG уже свой скруглённый фон).
   overflow:hidden + соответствующий border-radius клипает остатки.
   box-shadow убираем, чтобы не двоился с тенью самой иконки. */
.pickup-chip__pin--photo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  padding: 0;
  display: block;
}
.pickup-chip__pin--photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.market-balance {
  margin: 4px 0 16px;
  padding: 16px 18px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(33, 199, 232, 0.22), rgba(33, 199, 232, 0.08));
  border: 1.5px solid rgba(33, 199, 232, 0.55);
  box-shadow: 0 2px 14px -8px rgba(33, 199, 232, 0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.market-balance__label {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.72;
}
.market-balance__value {
  font-size: 2rem;
  font-weight: 900;
  color: #0fa5c2;
  letter-spacing: 0.5px;
  line-height: 1.1;
  margin: 2px 0 6px;
}
.market-balance__hint {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.35;
  font-weight: 600;
  opacity: 0.7;
  padding-top: 6px;
  border-top: 1px solid rgba(33, 199, 232, 0.18);
}

.market-section {
  margin-top: 18px;
}
.market-section__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.market-section__emoji { font-size: 1.1rem; line-height: 1; }
.market-section__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.005em;
}
.market-section__note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.market-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 460px) {
  .market-grid { grid-template-columns: 1fr 1fr; }
}

.market-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 0 0 1px rgba(33, 199, 232, 0.05);
  transition: transform 0.1s ease, box-shadow 0.18s ease;
}
.market-item:active { transform: scale(0.99); }
.market-item--disabled { opacity: 0.55; }
.market-item__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.market-item__title {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}
.market-item__sub {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}
.market-item__buy {
  border: 0;
  padding: 9px 14px;
  border-radius: 14px;
  background: var(--accent-grad, var(--accent));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  min-width: 92px;
  box-shadow: 0 6px 14px -6px rgba(33, 199, 232, 0.5);
  transition: transform 0.1s ease;
}
.market-item__buy:disabled {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}
.market-item__buy:active:not(:disabled) { transform: scale(0.96); }
.market-item__cost {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.95rem;
}
.market-item__cost-cur {
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.85;
}
/* Пакеты «бонусы за ₽» — выделены зелёным акцентом */
.market-item--topup {
  background: linear-gradient(135deg, rgba(46, 184, 114, 0.06), transparent);
  border: 1px solid rgba(46, 184, 114, 0.2);
}
.market-item__buy--topup {
  background: linear-gradient(135deg, #2eb872, #1ea15c);
  box-shadow: 0 6px 14px -6px rgba(46, 184, 114, 0.5);
  min-width: 110px;
  font-size: 0.9rem;
}
.market-item__buy--topup:disabled {
  background: var(--surface-soft);
  color: var(--muted);
  box-shadow: none;
}

/* Одна строка «Купить бонусы за ₽»: input → стрелка → бонусы → В корзину */
.topup-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(46, 184, 114, 0.08), transparent);
  border: 1px solid rgba(46, 184, 114, 0.25);
}
.topup-row__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.topup-row__input {
  width: 100%;
  min-width: 0;
  padding: 9px 24px 9px 10px;
  border-radius: 12px;
  border: 1.5px solid rgba(46, 184, 114, 0.3);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  -moz-appearance: textfield;
}
.topup-row__input::-webkit-outer-spin-button,
.topup-row__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.topup-row__input:focus { border-color: #1ea15c; outline: none; }
.topup-row__cur {
  position: absolute;
  right: 10px;
  color: var(--muted);
  font-weight: 800;
  pointer-events: none;
}
.topup-row__arrow {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}
.topup-row__bonus {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
  min-width: 0;
}
.topup-row__bonus strong {
  color: #1ea15c;
  font-size: 1.05rem;
  font-weight: 900;
}
.topup-row__bonus span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
@media (max-width: 380px) {
  .topup-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .topup-row__arrow { display: none; }
  .topup-row .market-item__buy--topup { grid-column: 1 / -1; }
}

/* Success-модалка после покупки */
.market-success-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 24, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  backdrop-filter: blur(8px);
}
.market-success {
  background: var(--surface);
  border-radius: 22px;
  padding: 28px 24px 22px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
}
.market-success__check {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2eb872, #1ea15c);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -10px rgba(46, 184, 114, 0.6);
}
.market-success h3 { margin: 8px 0 4px; font-size: 1.15rem; }
.market-success__label {
  margin: 0;
  font-weight: 700;
  color: var(--text-soft);
}
.market-success__hint {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

/* Ваучер скидки в корзине (раздел 4.4 ТЗ) */
.voucher-info-row {
  margin: 10px 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(46, 184, 114, 0.10), rgba(46, 184, 114, 0.02));
  color: #1ea15c;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  border: 1px solid rgba(46, 184, 114, 0.25);
}
.voucher-info-row strong { font-weight: 800; }
.voucher-info-row__queue {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

/* Бейдж буста статуса в профиле */
.profile-user-card__pill--boost {
  background: linear-gradient(135deg, rgba(255, 216, 107, 0.25), rgba(255, 138, 61, 0.18)) !important;
  color: #d96a1a !important;
  border-color: rgba(255, 138, 61, 0.4) !important;
}
.profile-user-card__boost-icon { font-size: 0.9em; margin-right: 2px; }
.profile-user-card__boost {
  margin-top: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #d96a1a;
}

/* Inline-предупреждение в корзине когда есть Flash Sale */
.flash-info-row {
  margin: 10px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 87, 87, 0.10);
  color: #d93a3a;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  border: 1px solid rgba(255, 87, 87, 0.2);
}

/* === Flash Sale (раздел 6.3 ТЗ) === */
.product-card--flash {
  position: relative;
  box-shadow:
    0 0 0 1.5px rgba(255, 87, 34, 0.55),
    0 8px 22px -10px rgba(255, 87, 34, 0.55);
}
.product-card--flash::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.product-card--flash > * { position: relative; z-index: 1; }
.product-card__flash-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a3d 0%, #ff5557 100%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px -4px rgba(255, 87, 34, 0.6);
  pointer-events: none;
  z-index: 2;
  animation: flash-pulse 1.8s ease-in-out infinite;
}
@keyframes flash-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
/* Flash sale: старая цена компактно сверху, новая снизу — не разъезжается даже в узких карточках. */
.price-row__value--flash {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  line-height: 1.05;
  color: #d93a3a;
}
.price-row__old {
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72em;
  opacity: 0.75;
}
.product-grid--in-sheet { padding: 4px 0 12px; }
.info-row__title { font-weight: 800; font-size: 1rem; margin: 0; }
.info-row__sub { color: var(--muted); font-size: 0.86rem; margin: 4px 0 0; }

/* ============ SECTION HEADING ============ */
.section-heading {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 4px 8px;
}
.catalog-group {
  display: grid;
  gap: 14px;
}
.section-heading__icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.section-heading__icon svg { width: 20px; height: 20px; }
.section-heading__icon--flame {
  background: var(--surface-soft);
  font-size: 1.4rem;
  line-height: 1;
}
.section-heading__icon--cat {
  width: 36px; height: 36px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(20, 50, 80, 0.18);
  font-size: 1.25rem;
  line-height: 1;
}
.section-heading__icon--photo { overflow: hidden; padding: 0; }
.section-heading__icon--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* «Лучшие товары» — фото-иконка best.jpg */
.section-heading__icon--best { overflow: hidden; padding: 0; }
.section-heading__icon--best img { width: 100%; height: 100%; object-fit: cover; display: block; }
.emoji-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
}
.section-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  flex: 1;
}
.section-heading__pill {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
}

/* ============ CATEGORIES ============ */
.categories-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.categories-strip::-webkit-scrollbar { display: none; }
.categories-strip button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text-soft);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.categories-strip button.active {
  background: var(--accent-tint);
  color: var(--accent-strong);
  border-color: var(--accent-soft);
  box-shadow: none;
}

/* ============ PRODUCT GRID & CARD ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  text-align: left;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.product-card__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 140px;
  width: calc(100% - 16px);
  margin: 8px 8px 0;
  border-radius: 16px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-soft);
}
.product-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}
.product-card__category-chip--overlay {
  background: rgba(0, 0, 0, 0.55) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
}
.product-card__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,0.45), transparent 45%),
    radial-gradient(circle at 75% 80%, rgba(0,0,0,0.18), transparent 50%);
  pointer-events: none;
}
.product-card__photo--image {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.product-card__photo--image::before { display: none; }
.product-sheet__hero--image {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.product-card__photo-emoji {
  font-size: 3.6rem;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.28));
  z-index: 1;
  animation: float-emoji 4s ease-in-out infinite;
}
@keyframes float-emoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.product-card__category-chip {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  color: #1a2330;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.product-card__brand-tag {
  position: absolute; bottom: 8px; right: 8px;
  z-index: 2;
  background: rgba(0,0,0,0.42);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.product-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.product-card:active { transform: scale(0.985); }
.product-card__body {
  padding: 12px 14px 14px;
  display: grid;
  gap: 8px;
}
.product-card__title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  /* длинные слова без пробелов (напр. "ГРЕХ&САМОУБИЙЦА") переносим */
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  min-width: 0;
}
.product-card__sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.price-stack {
  display: grid;
  gap: 8px;
  margin-top: 0;
  padding: 0;
}
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.price-row__label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.price-row__value {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
}
.price-row--cash .price-row__label {
  color: #4dd28a;
  animation: cash-blink 1.6s ease-in-out infinite;
}
.price-row--cash .price-row__value {
  color: #4dd28a;
  text-shadow: 0 0 14px rgba(77, 210, 138, 0.45);
  animation: cash-blink 1.6s ease-in-out infinite;
}
@keyframes cash-blink {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 14px rgba(77, 210, 138, 0.5);
  }
  50% {
    opacity: 0.55;
    text-shadow: 0 0 4px rgba(77, 210, 138, 0.15);
  }
}
.price-divider { display: none; }

.empty-state {
  padding: 28px 18px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
}

/* ============ BOTTOM NAV (FLOATING + FAB) ============ */
/* === BOTTOM NAV — одна плашка с круглым вырезом под корзину (через CSS-mask) === */
.bottom-nav-wrap {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(400px, calc(100% - 20px));
  height: 80px;
  z-index: 30;
  /* тень от плашки — drop-shadow повторяет форму маски */
  filter: drop-shadow(0 16px 28px rgba(20, 50, 80, 0.16));
}

/* SVG-фон плашки: один путь со скруглёнными кончиками выреза */
.bottom-nav-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* боковые иконки */
.nav-btn {
  position: absolute;
  top: 0;
  height: 100%;
  width: 88px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}
.nav-btn:focus { outline: none; }
.fab-cart {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
}
.nav-btn svg {
  width: 28px;
  height: 28px;
  transition: width 0.15s ease, height 0.15s ease;
}
.nav-btn--left  { left: 10%; }
.nav-btn--right { right: 10%; }
.nav-btn--active { color: var(--accent); }
.nav-btn--active svg { width: 30px; height: 30px; }

/* Press-flash для кнопок нижней панели */
.nav-btn--flash svg { animation: nav-flash 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-btn--flash .nav-btn__dot { animation: nav-flash 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-btn--flash::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  animation: nav-burst 0.65s ease-out forwards;
  pointer-events: none;
  opacity: 0.45;
}
@keyframes nav-flash {
  0%   { transform: scale(1)   rotate(0); opacity: 1; }
  35%  { transform: scale(1.35) rotate(-4deg); opacity: 0.45; }
  100% { transform: scale(1)   rotate(0); opacity: 1; }
}
@keyframes nav-burst {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(8); opacity: 0; }
}

/* Press-flash для корзины */
.fab-cart--flash {
  animation: fab-press 0.65s ease-out;
}
@keyframes fab-press {
  0%   { transform: translateX(-50%) scale(1); }
  18%  { transform: translateX(-50%) scale(0.88); }
  45%  { transform: translateX(-50%) scale(1.08); }
  100% { transform: translateX(-50%) scale(1); }
}
.fab-cart--flash::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(33, 199, 232, 0.8);
  animation: fab-ring 0.7s ease-out forwards;
  pointer-events: none;
}
@keyframes fab-ring {
  0%   { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.7);  opacity: 0; }
}
.nav-btn__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

/* плавающая корзина — точно по центру выреза */
.fab-cart {
  position: absolute;
  left: 50%;
  top: -40px;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 999px;
  border: 0;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow:
    0 0 24px rgba(33, 199, 232, 0.55),         /* акцентное свечение */
    0 16px 32px rgba(20, 130, 200, 0.5),
    0 4px 12px rgba(20, 50, 80, 0.22);
  z-index: 4;
  cursor: pointer;
  animation: fab-pulse 2.4s ease-in-out infinite;
}
@keyframes fab-pulse {
  0%, 100% { box-shadow:
    0 0 24px rgba(33, 199, 232, 0.55),
    0 16px 32px rgba(20, 130, 200, 0.5),
    0 4px 12px rgba(20, 50, 80, 0.22);
  }
  50% { box-shadow:
    0 0 32px rgba(33, 199, 232, 0.85),
    0 16px 32px rgba(20, 130, 200, 0.55),
    0 4px 12px rgba(20, 50, 80, 0.22);
  }
}
.fab-cart svg { width: 34px; height: 34px; color: #fff; }
.fab-cart__badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 24px; height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--surface);
}

/* ============ PROFILE ============ */
.profile-screen { display: grid; gap: 14px; }

.profile-user-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.profile-avatar {
  position: relative;
  width: 80px; height: 80px;
}
.profile-avatar__inner {
  width: 100%; height: 100%;
  border-radius: 999px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 900;
  border: 3px solid var(--accent-soft);
  overflow: hidden;
}
.profile-avatar__inner img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar__badge {
  position: absolute;
  right: -4px; bottom: -2px;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--surface);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  z-index: 2;
}
.profile-avatar__badge svg { width: 14px; height: 14px; }
/* фото-вариант: без фона/обводки/тени, просто картинка */
.profile-avatar__badge--photo {
  overflow: visible;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  width: 38px;
  height: 38px;
  right: -6px;
  bottom: -4px;
}
.profile-avatar__badge--photo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.profile-avatar__badge--emoji {
  font-size: 1rem;
  line-height: 1;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.profile-user-card__name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-user-card__handle {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}
.profile-user-card__pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-soft);
}
.profile-user-card__pill svg { width: 14px; height: 14px; color: var(--accent); }
.profile-user-card__pill--btn {
  cursor: pointer;
  background: var(--accent-tint);
  border-color: var(--accent-soft);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.profile-user-card__pill--btn svg { transform: rotate(0deg); margin-left: 1px; }
.profile-user-card__pill--btn:hover { box-shadow: 0 0 0 3px var(--accent-soft); }
.profile-user-card__pill--btn:active { transform: scale(0.96); box-shadow: 0 0 0 3px var(--accent-soft); }
.profile-user-card__pill-spent { color: var(--accent-strong); font-weight: 800; }

.activity-modal {
  width: min(360px, 92vw);
  margin: auto;
  background: var(--surface);
  border-radius: 22px;
  padding: 18px 18px 14px;
  display: grid;
  gap: 8px;
  box-shadow: 0 30px 60px rgba(20, 50, 80, 0.35);
  animation: success-pop 0.45s cubic-bezier(0.18, 1.1, 0.4, 1.05);
}
.activity-modal__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 4px;
}
.activity-modal__head h3 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.activity-modal__head p { margin: 2px 0 0; color: var(--muted); font-size: 0.84rem; }
.activity-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  font-size: 0.92rem;
  font-weight: 600;
}
.activity-row strong { font-weight: 800; }
.activity-row--accent {
  background: var(--accent-tint);
}
.activity-row--accent strong { color: var(--accent-strong); font-size: 1.1rem; }
.profile-user-card__pill-emoji {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.bonus-card {
  border-radius: 22px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 16px;
}
.bonus-card__top {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
}
.bonus-card__top--button {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  border-radius: 14px;
  transition: background 0.15s ease;
}
.bonus-card__top--button:active { background: rgba(255, 255, 255, 0.05); }

/* === История бонусов === */
.bonus-history__stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
}
.bonus-history__stat {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.bonus-history__stat--warn {
  background: rgba(255, 140, 60, 0.12);
  color: #ff9a3a;
  border: 1px solid rgba(255, 140, 60, 0.3);
}
.bonus-history__stat--muted {
  background: rgba(120, 140, 180, 0.1);
  color: var(--muted);
}
.bonus-history__stat strong { margin-left: 4px; }
.bonus-history__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bonus-history__row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.bonus-history__row:last-child { border-bottom: 0; }
.bonus-history__icon {
  font-size: 1.2rem;
  text-align: center;
}
.bonus-history__title {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
}
.bonus-history__date {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}
.bonus-history__burn {
  color: #ff8a3d;
  font-size: 0.76rem;
  font-weight: 600;
  margin-top: 3px;
  line-height: 1.2;
}

/* === Инфо-фото баннер (раздел 7 ТЗ) === */
.info-photo-banner {
  width: 100%;
  margin: 8px 0 14px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card, rgba(255,255,255,0.05));
  box-shadow: 0 4px 14px -8px rgba(0,0,0,0.25);
}
.info-photo-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* === Точки самовывоза (раздел 6.1 ТЗ) === */
.app-header {
  display: flex;
  justify-content: center;
  padding: 6px 14px 14px;
}
.app-header__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
}
.app-header__heart { font-size: 1.15rem; line-height: 1; }

.pickup-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 12px;
  border: 0;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(33, 199, 232, 0.10), rgba(33, 199, 232, 0.02)),
    var(--surface);
  box-shadow:
    0 2px 0 rgba(33, 199, 232, 0.10) inset,
    0 8px 22px -10px rgba(33, 199, 232, 0.45);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease;
  max-width: min(86vw, 360px);
}
.pickup-chip:active {
  transform: scale(0.98);
}
.pickup-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(33, 199, 232, 0.55), rgba(33, 199, 232, 0.10));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.pickup-chip__pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-grad, var(--accent));
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -4px rgba(33, 199, 232, 0.6);
}
.pickup-chip__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  min-width: 0;
}
.pickup-chip__sub {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pickup-chip__title {
  color: var(--text);
  font-weight: 800;
  font-size: 0.96rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.pickup-chip__chev {
  color: var(--accent);
  display: flex;
  align-items: center;
  margin-left: 2px;
  opacity: 0.9;
}

/* Sheet выбора точки */
.sheet--pickup .pickup-sheet__icon {
  background: var(--accent-grad, var(--accent));
  color: #fff;
}
.pickup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0 10px;
}
.pickup-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border: 1.5px solid transparent;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  font: inherit;
  color: var(--text);
}
.pickup-card:active { transform: scale(0.99); }
.pickup-card--active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(33, 199, 232, 0.10), rgba(33, 199, 232, 0.02)), var(--surface);
  box-shadow:
    0 0 0 4px rgba(33, 199, 232, 0.12),
    0 6px 18px -10px rgba(33, 199, 232, 0.5);
}
.pickup-card__pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-tint, rgba(33, 199, 232, 0.12));
  color: var(--accent);
}
.pickup-card--active .pickup-card__pin {
  background: var(--accent-grad, var(--accent));
  color: #fff;
}
.pickup-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.pickup-card__title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}
.pickup-card__addr {
  color: var(--muted);
  font-size: 0.82rem;
}
.pickup-card__empty-tag {
  margin-top: 4px;
  display: inline-block;
  align-self: flex-start;
  background: rgba(255, 138, 61, 0.14);
  color: #d96a1a;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.pickup-card__radio {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: all 0.15s;
}
.pickup-card__radio--on {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.bonus-history__delta {
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
}
.bonus-history__row--plus .bonus-history__delta { color: #2eb872; }
.bonus-history__row--minus .bonus-history__delta { color: #ff6f9c; }
.bonus-card__icon {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
}
.bonus-card__icon svg { width: 26px; height: 26px; }
.bonus-card__icon--photo {
  overflow: hidden;
  padding: 0;
  /* Когда внутри картинка-фото — рамка-подложка не нужна (картинка должна
     полностью покрыть блок). Иначе на dark-теме var(--surface-soft) даёт
     светло-голубой ореол вокруг JPG. */
  background: transparent;
}
/* Кнопка «История бонусов» под балансом — стиль pill как у статуса. */
.bonus-card__history-btn { align-self: start; }
/* Компактная ссылка-история под лейблом «Баланс» (там где раньше был сабтайтл). */
.bonus-card__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bonus-card__history-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  line-height: 1.2;
  white-space: nowrap;
}
.bonus-card__history-link svg { width: 11px; height: 11px; color: var(--accent); }
.bonus-card__history-link:active { opacity: 0.7; }
.bonus-card__icon--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bonus-card__label { font-weight: 800; font-size: 1.05rem; margin: 0; }
.bonus-card__sub { color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }
.bonus-card__value {
  text-align: right;
  display: grid;
  gap: 2px;
}
.bonus-card__value strong {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.bonus-card__value span {
  font-size: 0.78rem;
  color: var(--muted);
}
.referral-trigger {
  display: grid;
  grid-template-columns: 48px 1fr 16px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  text-align: left;
}
.referral-trigger__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--accent-grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(33, 199, 232, 0.32);
}
.referral-trigger__icon svg {
  width: 20px; height: 20px;
  transform: translate(-1px, 1px) rotate(-8deg);
}
.referral-trigger__icon--photo { overflow: hidden; background: var(--surface-soft); box-shadow: none; }
.referral-trigger__icon--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.referral-trigger__text { display: grid; gap: 2px; min-width: 0; }
.referral-trigger__text strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.referral-trigger__text span {
  font-size: 0.84rem;
  color: var(--muted);
}
.referral-trigger > svg {
  width: 16px; height: 16px;
  color: var(--muted);
}
.referral-trigger:active { transform: scale(0.99); }

/* Реферальная программа отдельной карточкой (вынесена из bonus-card).
   Без margin-top — родитель использует gap: 16px (см. .content). */
.referral-trigger--standalone {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: 22px;
  padding: 16px;
  border: 1.5px solid rgba(33, 156, 232, 0.55);
  box-shadow: 0 2px 12px -8px rgba(33, 156, 232, 0.45);
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}
.referral-trigger--standalone:hover {
  box-shadow: 0 4px 18px -8px rgba(33, 156, 232, 0.6);
}
.referral-trigger--standalone:active { transform: scale(0.995); }

/* Синий блик по контуру — по аналогии с .savings-card__shine.
   Анимация туда-и-обратно (как у savings) — плавный зацикленный пробег без
   резкого прыжка к началу. ВАЖНО: в overrides используем background-image,
   а не шорткат background — иначе шорткат сбрасывает background-size/position
   и анимация перестаёт быть видимой. */
.referral-trigger__shine {
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  pointer-events: none;
  background-image: linear-gradient(
    115deg,
    transparent 25%,
    rgba(33, 156, 232, 0.55) 42%,
    rgba(33, 156, 232, 0.92) 50%,
    rgba(33, 156, 232, 0.55) 58%,
    transparent 75%
  );
  background-size: 220% 100%;
  background-position: 200% 0;
  background-repeat: no-repeat;
  mix-blend-mode: normal;
  opacity: 0.6;
  animation: referral-shine 4.5s ease-in-out infinite;
  will-change: background-position;
}
@keyframes referral-shine {
  0%, 100% { background-position: 200% 0; }
  50%      { background-position: -120% 0; }
}
/* Тёмная тема: ярче, blend-mode screen для аккуратного переливания
   на тёмном фоне. background-image (не шорткат!) — чтобы background-size/position
   из базы сохранились и анимация была видимой. */
[data-theme="dark"] .referral-trigger__shine {
  background-image: linear-gradient(
    115deg,
    transparent 25%,
    rgba(93, 225, 240, 0.55) 42%,
    rgba(93, 225, 240, 0.95) 50%,
    rgba(93, 225, 240, 0.55) 58%,
    transparent 75%
  );
  mix-blend-mode: screen;
  opacity: 0.75;
}

/* Маркет бонусов (раздел 4.4 ТЗ — placeholder «Скоро»). */
.market-trigger {
  cursor: pointer;
  position: relative;
}
.market-trigger__icon--photo {
  background: transparent;
}
.market-trigger__icon--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.market-trigger__soon {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 138, 61, 0.16);
  color: #d96a1a;
  white-space: nowrap;
}

.referral-info {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  color: var(--text);
}
.referral-info p {
  margin: 0;
  line-height: 1.45;
  font-size: 0.92rem;
}
.referral-info p + p { margin-top: 8px; }
.referral-info strong { color: var(--accent-strong); }

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.referral-stat {
  border-radius: 14px;
  padding: 12px 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  text-align: center;
}
.referral-stat span {
  display: block;
  font-size: 0.66rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.referral-stat strong {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text);
}

.referral-row {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 10px;
  align-items: stretch;
}
.referral-row__link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  height: 64px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  text-align: left;
  color: var(--text);
  min-width: 0;
}
.referral-row__link span {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.referral-row__link strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.referral-row__link svg {
  width: 16px; height: 16px;
  color: var(--muted);
  flex: 0 0 auto;
}
.referral-row__link:active { transform: scale(0.99); }

.referral-row__share {
  display: flex; align-items: center; justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 16px;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 10px rgba(33, 199, 232, 0.28);
}
.referral-row__share svg {
  width: 24px; height: 24px;
  transform: translate(-1px, 1px) rotate(-8deg);
}
.referral-row__share:active { transform: scale(0.97); }

.bonus-card__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bonus-card__split-item {
  border-radius: 16px;
  padding: 12px;
  background: var(--surface-soft);
  text-align: center;
  border: 1px solid var(--line);
}
.bonus-card__split-item span {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.bonus-card__split-item strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.section-card {
  border-radius: 22px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 14px;
}
.section-card__head {
  display: flex; align-items: center; justify-content: space-between;
}
.section-card__head h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}
.section-card__count {
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--surface-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}
.section-card__empty {
  border-radius: 16px;
  padding: 18px;
  background: var(--surface-soft);
  text-align: center;
}
.section-card__empty strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.section-card__empty span {
  color: var(--muted);
  font-size: 0.86rem;
}

/* loyalty levels */
.loyalty-list { display: grid; gap: 12px; }
.loyalty-card {
  position: relative;
  border-radius: 22px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
}
.loyalty-card--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-card);
}
.loyalty-card__icon {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: var(--surface-soft);
  color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
}
.loyalty-card__icon svg { width: 24px; height: 24px; }
.loyalty-card__icon--emoji {
  font-size: 2.4rem;
  line-height: 1;
  background: var(--surface-soft);
}
.loyalty-card--active .loyalty-card__icon--emoji {
  background: var(--accent-tint);
}
.loyalty-card__icon--photo {
  overflow: hidden;
  padding: 0;
}
.loyalty-card__icon--photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes emoji-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.loyalty-card__title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
}
.loyalty-card__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.loyalty-card__split div {
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface-soft);
  text-align: left;
}
.loyalty-card__split span {
  display: block;
  font-size: 0.66rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.loyalty-card__split strong {
  font-size: 0.96rem;
  font-weight: 800;
}

/* === Прогресс-бар уровня (раздел 5.2) === */
.loyalty-card__body { min-width: 0; }
.loyalty-card__progress { margin-top: 10px; }
.loyalty-card__progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
  border: 1px solid var(--line);
}
.loyalty-card__progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5acef4 0%, #21c7e8 100%);
  transition: width 0.5s ease;
}
.loyalty-card--active .loyalty-card__progress-fill {
  background: linear-gradient(90deg, #ffd84a 0%, #ff9a3a 100%);
}
.loyalty-card--achieved .loyalty-card__progress-fill {
  background: linear-gradient(90deg, #2eb872 0%, #1d9c5e 100%);
}
.loyalty-card__progress-text {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.loyalty-card__progress-remain {
  color: var(--accent-strong);
  font-weight: 700;
}
.loyalty-card--achieved .loyalty-card__progress-remain { display: none; }
.loyalty-card__chip--achieved {
  background: #d6f4e3 !important;
  color: #1d6d3e !important;
}

/* === Плашка «Вы сэкономили» в профиле (раздел 5.1) === */
.savings-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(46, 184, 114, 0.12) 0%, rgba(33, 199, 232, 0.08) 100%);
  border: 1px solid rgba(46, 184, 114, 0.25);
  margin-top: 12px;
}
.savings-card__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(46, 184, 114, 0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.savings-card__text {
  display: flex; flex-direction: column; gap: 1px;
}
.savings-card__label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.savings-card__value {
  font-size: 1.3rem;
  font-weight: 900;
  color: #1d6d3e;
}
.savings-card__hint {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* === Карточка экономии — standalone, кликабельная (раздел 5.1 ТЗ) === */
.savings-card--standalone {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1.5px solid rgba(46, 184, 114, 0.55);
  box-shadow: 0 2px 12px -8px rgba(46, 184, 114, 0.35);
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}
.savings-card--standalone:active { transform: scale(0.995); }
.savings-card--standalone:hover {
  box-shadow: 0 4px 18px -8px rgba(46, 184, 114, 0.55);
}
.savings-card__icon--green {
  background: rgba(46, 184, 114, 0.14);
  color: #1ea15c;
}
.savings-card--standalone .savings-card__text {
  flex-direction: column;
}
.savings-card--standalone .savings-card__label {
  font-size: 0.86rem;
  color: var(--text);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
.savings-card--standalone .savings-card__value {
  color: #1ea15c;
  font-size: 1.35rem;
  margin-top: 1px;
}
.savings-card--standalone > svg {
  width: 16px; height: 16px;
  color: var(--muted);
}

/* Зацикленный блик по контуру: тонкий зелёный отблеск, проходит раз в ~4 сек. */
.savings-card__shine {
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(46, 184, 114, 0.45) 45%,
    rgba(46, 184, 114, 0.10) 50%,
    rgba(46, 184, 114, 0.45) 55%,
    transparent 70%
  );
  background-size: 220% 100%;
  background-position: 200% 0;
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: savings-shine 4s ease-in-out infinite;
}
@keyframes savings-shine {
  0%, 100% { background-position: 200% 0; }
  55%      { background-position: -120% 0; }
}
/* На светлой теме mix-blend-mode: screen на белом фоне даёт мутно-серое пятно.
   Переопределяем градиент на насыщенный зелёный и выключаем blend-mode —
   анимация работает в обеих темах. */
[data-theme="light"] .savings-card__shine {
  /* ВАЖНО: background-image, а НЕ шорткат background — иначе шорткат сбрасывает
     background-size/position из базы, и анимация мерцания становится статичной
     (как было в светлой теме). Аналогично сделано у .referral-trigger__shine. */
  background-image: linear-gradient(
    115deg,
    transparent 30%,
    rgba(46, 184, 114, 0.55) 45%,
    rgba(46, 184, 114, 0.85) 50%,
    rgba(46, 184, 114, 0.55) 55%,
    transparent 70%
  );
  mix-blend-mode: normal;
  opacity: 0.5;
}

/* История экономии в sheet */
.savings-history__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 4px;
}
.savings-history__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid transparent;
}
.savings-history__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.savings-history__main strong {
  font-size: 0.95rem;
  font-weight: 800;
}
.savings-history__main span {
  font-size: 0.78rem;
  color: var(--muted);
}
.savings-history__saved {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.savings-history__saved strong {
  display: block;
  color: #1ea15c;
  font-weight: 800;
  font-size: 0.98rem;
}

/* «Сэкономили» в activity-sheet */
.activity-row--saved {
  background: linear-gradient(135deg, rgba(46, 184, 114, 0.12) 0%, rgba(33, 199, 232, 0.06) 100%);
}
.activity-row--saved strong { color: #1d6d3e; }

/* === Поздравление с новым статусом (раздел 5.3) === */
.status-up-backdrop {
  position: fixed; inset: 0;
  z-index: 120;
  background: rgba(10, 22, 35, 0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fade-in 0.25s ease;
}
.status-up-card {
  position: relative;
  width: 100%; max-width: 360px;
  padding: 32px 24px 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff 0%, #fff7e0 100%);
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  animation: status-up-pop 0.5s cubic-bezier(0.18, 1.4, 0.42, 1);
}
@keyframes status-up-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.status-up-confetti {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 28px;
}
.status-up-card__emoji {
  font-size: 4rem;
  margin-bottom: 8px;
  animation: emoji-pulse 1.6s ease-in-out infinite;
}
.status-up-card__title {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 900;
  color: #2a1d05;
}
.status-up-card__sub {
  margin: 0 0 20px;
  font-size: 1rem;
  color: #444;
  line-height: 1.4;
}
.status-up-card__sub strong {
  color: #c47a00;
  font-weight: 800;
}
.status-up-card__btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, #ffd84a 0%, #b07810 100%);
  color: #1a0d1e;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 200, 80, 0.4);
}
.loyalty-card__chip {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.about-card {
  border-radius: 22px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 14px;
}
.about-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 700;
}
.about-card p {
  margin: 0;
  line-height: 1.45;
  font-size: 0.96rem;
}
.about-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}
.about-actions button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  flex: 0 1 auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-soft);
  white-space: nowrap;
}
.about-actions button svg { flex: 0 0 auto; }
.about-actions button.primary {
  background: var(--accent-tint);
  color: var(--accent-strong);
  border-color: var(--accent-soft);
}
.about-actions button svg { width: 13px; height: 13px; }

.ghost-button {
  width: 100%;
  min-height: 56px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--text);
}
.ghost-button svg { width: 18px; height: 18px; }

.app-version {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin: 24px auto 0 4px;
  padding: 2px 4px;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.app-version__role {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.55;
}
.app-version__name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.8;
}
.app-version:hover .app-version__name { color: var(--accent); opacity: 1; }

/* theme switch */
.theme-switch {
  display: flex; gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.theme-switch button {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
}
.theme-switch button svg { width: 14px; height: 14px; }
.theme-switch button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-card);
}

/* ============ CART BOTTOM SHEET ============ */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 20, 35, 0.55);
  backdrop-filter: blur(6px);
  z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in 0.2s ease;
  box-sizing: border-box;
}
/* Когда два sheet'а открыты одновременно (детали заказа поверх «Мои заказы»),
   детальный должен быть сверху. Без этого второй по JSX-порядку перекрывал первый. */
.sheet-backdrop--top { z-index: 60; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.sheet {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 14px 16px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slide-up 0.32s cubic-bezier(0.22, 0.9, 0.26, 1);
  max-height: 88vh; /* фолбэк для старых браузеров без dvh/min/visualViewport */
  max-height: 88dvh;
  overflow-y: auto;
  scroll-padding-bottom: calc(24px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  align-items: stretch;
  justify-content: flex-start;
}
.sheet--expanded {
  max-height: 95vh;
  min-height: 90vh;
}
.sheet__handle {
  width: 64px;
  height: 22px;
  margin: -4px auto 0;
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
  touch-action: none;
}
.sheet__handle::before {
  content: "";
  width: 44px; height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}
.sheet__handle:active { cursor: grabbing; }
.sheet__head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
}
.sheet__head-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.sheet__head-icon svg { width: 24px; height: 24px; }
.sheet__title { margin: 0; font-size: 1.2rem; font-weight: 800; }
.sheet__sub { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; }
.sheet__close {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--surface-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft);
}
.sheet__close svg { width: 16px; height: 16px; }

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.cart-item__media {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  overflow: hidden;
}
.cart-item__media--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item__title { margin: 0; font-weight: 800; font-size: 0.95rem; }
.cart-item__sub { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }
.cart-item__price {
  margin: 4px 0 0;
  font-weight: 800;
  color: var(--accent);
  font-size: 0.92rem;
}
.cart-item__price small { color: var(--muted); font-weight: 600; }
.cart-item__remove {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  display: flex; align-items: center; justify-content: center;
}
.cart-item__remove svg { width: 18px; height: 18px; }

.cart-item__actions {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}
.cart-item__chip {
  background: var(--accent-tint);
  color: var(--accent-strong);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.qty-control {
  display: flex; align-items: center; gap: 12px;
}
.qty-control button {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
}
.qty-control button.plus {
  background: var(--accent-tint);
  color: var(--accent-strong);
  border-color: var(--accent-soft);
}
.qty-control span {
  min-width: 14px;
  text-align: center;
  font-weight: 800;
}
.picked-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.picked-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.picked-row__dot {
  width: 14px; height: 14px;
  border-radius: 999px;
  flex-shrink: 0;
}
.picked-row__name {
  flex: 1;
  font-weight: 700;
  font-size: 0.9rem;
}

.cart-total {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.cart-total span { font-size: 1rem; color: var(--text-soft); font-weight: 600; }
.cart-total strong { font-size: 1.4rem; font-weight: 900; }
.cart-total--row {
  border-top: 0;
  padding-top: 0;
}
.cart-total--row span { font-weight: 700; }
.cart-total--row strong { font-size: 1.05rem; }
.cart-total--discount {
  border-top: 0;
  padding-top: 0;
}
.cart-total--discount span { color: var(--accent); font-weight: 700; font-size: 0.9rem; }
.cart-total--discount strong { color: var(--accent); font-size: 1.1rem; }
.cart-total--saved {
  border-top: 0;
  padding-top: 4px;
  margin-top: -2px;
}
.cart-total--saved span { color: #2ea66e; font-weight: 700; font-size: 0.9rem; }
.cart-total--saved strong { color: #2ea66e; font-size: 1.05rem; }
.cart-total__values {
  display: inline-flex; align-items: baseline; gap: 8px;
}
.cart-total__old {
  color: var(--muted);
  font-size: 1rem;
  text-decoration: line-through;
  font-weight: 600;
  opacity: 0.7;
}
.cart-total__new {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 900;
}

.primary-button {
  width: 100%;
  min-height: 56px;
  border-radius: 18px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 14px 28px rgba(33, 199, 232, 0.35);
}
.primary-button:disabled { opacity: 0.55; box-shadow: none; }

.text-button {
  width: 100%;
  padding: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

/* ============ STORY MODAL ============ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 20, 35, 0.6);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 28px;
  padding: 20px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card-strong);
}
.modal-card h3 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.modal-card p { margin: 0; color: var(--text-soft); line-height: 1.45; }

/* ============ PRODUCT SHEET ============ */
.sheet--product { padding-top: 10px; }

.product-sheet__media {
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}
.product-sheet__hero {
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-soft);
  min-height: 180px;
}
.product-sheet__hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,0.4), transparent 45%),
    radial-gradient(circle at 75% 80%, rgba(0,0,0,0.18), transparent 50%);
  pointer-events: none;
}
.product-sheet__hero-emoji {
  font-size: 5.5rem;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.32));
  z-index: 1;
}
.product-sheet__discount {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 8px 18px rgba(33, 199, 232, 0.4);
}
.product-sheet__stock {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #58d68d 0%, #2dab67 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  box-shadow: 0 8px 18px rgba(45, 171, 103, 0.4);
}

.product-sheet__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.product-sheet__tag {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}
.product-sheet__tag--accent {
  background: var(--accent-tint);
  border-color: var(--accent-soft);
  color: var(--accent-strong);
}

.product-sheet__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}
.product-sheet__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.product-sheet__manufacturer {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.product-sheet__desc {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
  font-size: 0.94rem;
}

.price-stack--sheet {
  margin: 0;
  padding: 14px 18px;
  background: var(--surface-soft);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  gap: 6px;
}
.price-stack--sheet .price-row__value { font-size: 1.25rem; }
.price-stack--sheet .price-row__label { font-size: 0.78rem; }

.product-sheet__variants-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

.variant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.variant-chip {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 10px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  text-align: center;
  color: var(--text);
  min-width: 0;
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.variant-chip__dot {
  width: 12px; height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.12);
}
.variant-chip__name {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
  width: 100%;
}
.variant-chip__price {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-strong);
  white-space: nowrap;
  align-self: flex-end;
  margin-top: 1px;
}
.picked-row__price {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-strong);
  white-space: nowrap;
  margin-right: 6px;
}
.variant-chip__badge {
  position: absolute;
  top: -8px; right: -6px;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(33, 199, 232, 0.4);
}
.variant-chip--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  background: var(--surface);
}
/* достигнут лимит остатка — снимаем активную подсветку, но вкус остаётся в списке */
.variant-chip--maxed {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
  opacity: 0.85;
}
.variant-chip--maxed .variant-chip__badge {
  background: var(--line);
  color: var(--muted);
}

.product-sheet__cta {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  margin-top: 4px;
}
.product-sheet__cta svg { width: 22px; height: 22px; color: #fff; }

.payment-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.payment-segmented__btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  text-align: left;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.payment-segmented__btn > div { display: grid; gap: 2px; }
.payment-segmented__icon { font-size: 1.6rem; line-height: 1; }
.payment-segmented__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.payment-segmented__btn strong {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
}
.payment-segmented__btn--cash-active {
  border-color: #4dd28a;
  box-shadow: 0 0 0 2px rgba(77, 210, 138, 0.22);
  background: rgba(77, 210, 138, 0.08);
}
.payment-segmented__btn--cash-active strong { color: #2eb872; }
.payment-segmented__btn--card-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  background: var(--accent-tint);
}
.payment-segmented__btn--card-active strong { color: var(--accent-strong); }

.cart-payment-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cart-payment-chip--cash {
  background: rgba(77, 210, 138, 0.16);
  color: #2eb872;
}
.cart-payment-chip--card {
  background: var(--accent-tint);
  color: var(--accent-strong);
}
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.spec-grid > div {
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 10px 12px;
}
.spec-grid dt {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin: 0;
}
.spec-grid dd {
  margin: 4px 0 0;
  font-weight: 700;
}

/* form fields used in checkout */
.field-label {
  display: grid; gap: 6px;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 700;
}
.field-input,
.field-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
}
.field-textarea { min-height: 90px; resize: vertical; }
.field-input::placeholder,
.field-textarea::placeholder { color: var(--muted); }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.segmented button {
  height: 40px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted);
}
.segmented button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-card);
}

/* === Bonus row in cart === */
.bonus-row {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface-soft), rgba(33, 199, 232, 0.08));
  border: 1px solid var(--line);
  display: grid; gap: 10px;
}
.bonus-row__head { display: flex; justify-content: space-between; align-items: center; }
.bonus-row__title { font-weight: 800; font-size: 0.92rem; }
.bonus-row__balance { color: var(--muted); font-size: 0.82rem; }
.bonus-row__controls { display: grid; gap: 8px; }
.bonus-row__slider {
  width: 100%;
  accent-color: var(--accent);
}
.bonus-row__values {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.bonus-row__values strong { font-size: 1.1rem; color: var(--accent-strong); font-weight: 800; }
.bonus-row__chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.bonus-row__chip:disabled { opacity: 0.4; cursor: default; }
.bonus-row__chip:not(:disabled):hover { border-color: var(--accent); color: var(--accent-strong); }
.bonus-row__hint { color: var(--muted); font-size: 0.75rem; }
.bonus-apply-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.bonus-apply-btn:hover { filter: brightness(1.05); }
.bonus-apply-btn--active {
  background: transparent;
  color: var(--accent-strong);
}

/* === Order history cards in profile === */
.orders-history { display: grid; gap: 8px; padding: 10px; }
.order-history-card {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid; gap: 6px;
  transition: border-color 120ms ease, transform 120ms ease;
  cursor: pointer;
}
@media (hover: hover) {
  .order-history-card:hover { border-color: var(--accent); transform: translateY(-1px); }
}
.order-history-card--done { opacity: 0.85; }
.order-history-card__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.order-history-card__sub { color: var(--muted); font-size: 0.82rem; }
.order-history-card__total { color: var(--accent-strong); font-size: 1.05rem; }
.order-history-card__chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.order-history-card__chip--new {
  background: rgba(255, 176, 32, 0.16); color: #d68a17;
  animation: chip-pulse 3.2s ease-in-out infinite;
}
.order-history-card__chip--accepted { background: var(--accent-soft); color: var(--accent-strong); }
.order-history-card__chip--done {
  background: rgba(46, 184, 114, 0.16); color: #2eb872;
  animation: chip-pulse 3.2s ease-in-out infinite;
}
@keyframes chip-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* === History items list inside sheet === */
.history-items { display: grid; gap: 6px; padding: 6px 0; }
.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
}
.history-item__main { display: grid; gap: 2px; min-width: 0; }
.history-item__main strong { font-size: 0.95rem; }
.history-item__main span { color: var(--muted); font-size: 0.82rem; }
.history-item__right { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.history-item__pay { font-size: 1rem; }

/* === Referral history list === */
.referral-list { display: grid; gap: 8px; padding: 4px 0; }
.referral-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.referral-item--active { border-color: var(--accent); background: var(--accent-tint); }
.referral-item__main { display: grid; gap: 3px; min-width: 0; }
.referral-item__main strong { font-size: 0.95rem; }
.referral-item__main span { color: var(--muted); font-size: 0.82rem; }
.referral-item__earned { display: grid; gap: 2px; text-align: right; }
.referral-item__earned strong { color: var(--accent); font-size: 1rem; font-weight: 800; }
.referral-item__earned span { color: var(--muted); font-size: 0.74rem; }

/* Product sheet hero image — квадратный контейнер 1:1, картинка вписывается полностью */
.product-sheet__hero {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  background: var(--surface-soft);
}
.product-sheet__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;        /* квадратное фото = заполняет без полей */
  object-position: center;
  display: block;
  z-index: 1;
}

/* Шторку делаем ниже, чтобы её листать */
.sheet--product { max-height: 78vh; max-height: 78dvh; }

/* Reviews placeholder in product sheet */
.reviews-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.reviews-row__icon { font-size: 1.4rem; }
.reviews-row__text { display: grid; gap: 2px; min-width: 0; }
.reviews-row__text strong { font-weight: 800; font-size: 0.95rem; }
.reviews-row__text span { color: var(--muted); font-size: 0.8rem; }

/* Крепость — на карточке (над ценой) и в шторке товара */
.product-card__strength {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #e0364a;
}
.product-sheet__strength {
  margin: 4px 0 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #e0364a;
}

/* ============ RATING CHIP ON PRODUCT CARD ============ */
.product-card__rating-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 800;
}
.product-card__rating-star { color: #ffb13a; }

/* ============ REVIEWS ============ */
.star-picker { display: inline-flex; gap: 4px; }
.star-picker__btn {
  background: none; border: 0; padding: 0;
  color: var(--muted); line-height: 1; cursor: pointer;
  font-size: inherit; opacity: 0.55;
  transition: color 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}
.star-picker__btn.is-on { color: #ffb13a; opacity: 1; }
.star-picker__btn:active { transform: scale(0.9); }

.stars-row { display: inline-flex; gap: 2px; line-height: 1; }
.stars-row__s { color: var(--muted); opacity: 0.45; }
.stars-row__s.is-on { color: #ffb13a; opacity: 1; }

/* Reviews modal */
.sheet--reviews {
  max-height: 86vh;
  display: flex; flex-direction: column;
}
.reviews-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 6px;
}
.reviews-modal__head h3 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.reviews-modal__sub {
  margin: 0 4px 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}
.reviews-modal__scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px 12px;
  padding: 6px 12px;
  background: rgba(33, 199, 232, 0.12);
  color: var(--accent);
  border: 1px solid rgba(33, 199, 232, 0.28);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  width: fit-content;
  animation: scroll-hint-bob 1.6s ease-in-out infinite;
}
@keyframes scroll-hint-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(2px); }
}
.reviews-modal__list { display: grid; gap: 12px; overflow-y: auto; padding: 4px; }
.reviews-modal__skip {
  margin-top: 14px;
  background: transparent;
  border: 0;
  color: #e0364a;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 10px;
  cursor: pointer;
}
.reviews-modal__skip:active { color: #c91e34; }

.review-row {
  display: grid; gap: 10px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.review-row__title {
  font-weight: 800; font-size: 1rem; line-height: 1.2;
  overflow-wrap: anywhere; word-break: break-word;
}
.review-row__comment {
  width: 100%;
  background: var(--bg-soft, rgba(0,0,0,0.04));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--text);
}
.review-row__send {
  justify-self: end;
  background: var(--accent);
  color: #fff;
  border: 0; border-radius: 12px;
  padding: 8px 18px;
  font-weight: 700; font-size: 0.92rem;
  cursor: pointer;
}
.review-row__send:disabled { opacity: 0.6; cursor: default; }
.review-row__error { color: #e35065; font-size: 0.82rem; }
.review-row__sent { color: #2faa5a; font-weight: 700; font-size: 0.95rem; }
.review-row--sent { opacity: 0.7; }

/* Reviews block inside ProductSheet */
.product-reviews {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: grid; gap: 10px;
}
.product-reviews__head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 0.98rem;
}
.product-reviews__avg { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); font-size: 0.9rem; }
.product-reviews__empty { color: var(--muted); font-size: 0.88rem; }
.product-reviews__list { display: grid; gap: 10px; }

.review-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid; gap: 6px;
}
.review-card__user {
  display: flex; align-items: center; gap: 10px;
  /* пользователь не кликабелен */
  pointer-events: none;
  user-select: none;
}
.review-card__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #c5a8ff, #7c4ed4);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0;
}
.review-card__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-card__user-meta { display: grid; gap: 2px; line-height: 1.1; }
.review-card__name { font-weight: 700; font-size: 0.92rem; }
.review-card__comment {
  font-size: 0.92rem; line-height: 1.35; color: var(--text);
  overflow-wrap: anywhere; word-break: break-word;
}
