/* Jiyde PWA — минимализм и статус */

:root {
  --vh: 1vh;
  --bg-main: #f5f2ec;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --text-main: #17130f;
  --text-muted: #6f665c;
  --text-on-primary: #ffffff;
  --primary: #17130f;
  --primary-hover: #2c2620;
  --accent: #e0662a;            /* тёплый оранжевый: кнопки действия, цены, активные вкладки */
  --accent-action: #e0662a;
  --accent-action-hover: #c2541f;
  --accent-hover: #cd5c24;
  --accent-soft: rgba(224, 102, 42, 0.1);
  --accent-border: rgba(224, 102, 42, 0.26);
  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.1);
  --ok-border: rgba(16, 185, 129, 0.25);
  --ok-bright: #34d399;
  --primary-soft: rgba(23, 19, 15, 0.06);
  --border-color: #e9e3d9;
  --border-light: rgba(23, 19, 15, 0.06);
  --shadow-sm: 0 1px 3px rgba(23, 19, 15, 0.04);
  --shadow-soft: 0 2px 8px rgba(23, 19, 15, 0.05);
  --shadow-card: 0 2px 10px rgba(23, 19, 15, 0.05), 0 1px 2px rgba(23, 19, 15, 0.02);
  --shadow-qr: 0 0 0 1px rgba(224, 102, 42, 0.2), 0 4px 16px rgba(224, 102, 42, 0.15);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --nav-h: 70px;
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg-main);
  color: var(--text-main);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  flex-shrink: 0;
}

.app {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

/* ─── Карточки ─── */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: none;
}

/* ─── Шапка (navy) ─── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: var(--shadow-card);
}

.brand-letter {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-family: var(--font-main);
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.brand-copy h1,
.brand-copy p {
  margin: 0;
}

.brand-copy h1 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ─── Страница ─── */

.page {
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(var(--nav-h) + 52px + env(safe-area-inset-bottom));
  animation: pageIn 0.22s ease;
}

/* ─── Шапка главной (как в референсе) ─── */

.screen-header {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.header-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.header-icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-muted);
  box-shadow: var(--shadow-soft);
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.section-row h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-link {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
}

.section-link svg {
  width: 18px;
  height: 18px;
}

.loyalty-card {
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
}

.premium-card {
  position: relative;
  color: var(--text-on-primary);
  box-shadow: var(--shadow-card);
}

.premium-card--dark {
  /* макет loyalty-preview: navy gradient + мягкая тень */
  background: linear-gradient(158deg, #0C1C2E 0%, #0A2540 52%, #14364F 100%);
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.16);
}

.premium-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background: radial-gradient(circle at 88% 14%, rgba(196, 154, 108, 0.55), transparent 46%);
  pointer-events: none;
}

.premium-card-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 14px;
}

.premium-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.premium-label {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.loyalty-qr {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 2px solid rgba(196, 154, 108, 0.65);
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.loyalty-qr svg {
  width: 38px;
  height: 38px;
}

.loyalty-card--balance .premium-card-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.premium-amount {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

@keyframes pageIn {
  from {
    opacity: 0.7;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Hero ─── */

.hero {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.hero h2 {
  margin: 12px 0 8px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--primary);
}

.hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 32ch;
}

/* ─── Кнопки ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: var(--accent-action);  /* было #c49a6c: белый на нём = 2.6:1 */
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: var(--accent-action-hover);
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border-color);
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
  background: var(--primary-soft);
}

/* ─── Баланс ─── */

.balance-card span,

.balance-card.warn strong {
  color: var(--accent-hover);
}

/* ─── Секции ─── */

.section-head,
.page-title,
.sheet-head,
.menu-foot,
.cart-total,
.product-topline,
.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head {
  gap: 12px;
  margin: 24px 0 12px;
}

.section-head h2,
.page-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.section-head span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Story / quick cards ─── */

.dish-icon,
.settings-list span,
.round-btn {
  display: grid;
  place-items: center;
}

.dish-icon,
.settings-list span {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
}

.product-card h3,
.profile-hero h3,
.qr-card h3,
.cart-line-item h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
}

.product-card p,
.profile-hero p,
.qr-card p,
.cart-line-item p,
.page-title p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Убираем старые цветовые тона — единый стиль иконок */
.dish-icon.clay,
.dish-icon.green,
.dish-icon.blue,
.dish-icon.gold,
.dish-icon.leaf,
.dish-icon.cream {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ─── Списки ─── */

.settings-list {
  display: grid;
  gap: 10px;
}

.dish-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

/* ─── Заголовок страницы ─── */

.page-title {
  gap: 12px;
  margin-bottom: 14px;
}

.page-title p {
  margin-top: 4px;
  font-size: 13px;
}

.round-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-soft);
}

.round-btn b {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

/* ─── Карточки товаров ─── */

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 16px;
  color: var(--primary);
}

.product-topline {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  gap: 6px;
}

.product-topline span,
.product-topline b {
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}

.product-topline b {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-hover);
}

.product-icon-wrap {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.product-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.product-body {
  padding: 10px 12px 12px;
}

.product-body h3 {
  min-height: auto;
  font-size: 14px;
}

.product-body p {
  margin-top: 4px;
  min-height: auto;
  font-size: 12px;
}

.stock-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}

.menu-foot {
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
}
.menu-actions {
  min-width: 0;
  justify-content: flex-end;
}

.menu-foot strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}


/* Клик по сердечку: пульс на самой ноде (перерисовка списка срезала fav-squish) */
@keyframes fav-pop-kf {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.fav-btn.fav-pop {
  animation: fav-pop-kf 0.3s ease;
}

/* Сердечко избранного с взрывом частиц */
.fav-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #a7b0ba;
  cursor: pointer;
  position: relative;
  transform-origin: center;
  transition: transform 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.fav-btn:active {
  transform: scale(0.88);
}

.fav-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  transition: color 0.15s ease, fill 0.15s ease;
}

.fav-btn.fav-on {
  color: #ef4444 !important;
  animation: fav-squish 0.3s forwards;
}

.fav-btn.fav-on svg {
  color: #ef4444 !important;
  fill: #ef4444 !important;
}

.fav-btn.fav-on::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 24px 0 -3px #ef4444, 24px 0 0 -3px #ef4444, 0 -24px 0 -3px #ef4444,
    -24px 0 0 -3px #ef4444, -17px 17px 0 -3px #ef4444, -17px -17px 0 -3px #ef4444,
    17px -17px 0 -3px #ef4444, 17px 17px 0 -3px #ef4444;
  transform: scale(0);
  animation: fav-burst 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.15s forwards;
}

@keyframes fav-squish {
  50% { transform: scaleY(0.6); }
  100% { transform: scaleY(1); }
}

@keyframes fav-burst {
  40% { opacity: 1; }
  to { transform: scale(0.8); opacity: 0; }
}

.round-btn--fav {
  color: #ef4444;
}

.round-btn--fav.fav-on {
  color: #ef4444;
}

.round-btn--fav.fav-on svg {
  fill: #ef4444;
}

/* корзина-бар внутри шторки избранного */
.favs-list {
  max-height: 52dvh;
  overflow-y: auto;
}

.cart-sheet .cart-bar--sheet {
  position: static;
  margin-top: 12px;
  z-index: auto;
}

/* круглая компактная дружелюбная кнопка плюс */
.add-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--accent-action);
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(224, 102, 42, 0.28);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.add-btn:active {
  transform: scale(0.92);
  background: var(--accent-action-hover);
}

/* аккуратный степпер количества */
.card-qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 2px;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
}
[data-theme="dark"] .card-qty {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-qty button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.card-qty button:active {
  transform: scale(0.9);
}

.card-qty button.minus {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  font-size: 15px;
}

[data-theme="dark"] .card-qty button.minus {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.card-qty button.plus {
  background: var(--accent-action);
  color: #fff;
  font-size: 16px;
}

.card-qty b {
  min-width: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

[data-theme="dark"] .card-qty b {
  color: #ffffff;
}

/* ─── Корзина (sticky bar) ─── */

@media (prefers-reduced-motion: reduce) {
  .cart-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + 12px);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  padding: 0 18px;
  border: none;
  border-radius: 16px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(224, 102, 42, 0.35);
  font-weight: 700;
  transition: transform 0.15s ease;
}
}
.offline-badge {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 150; /* выше nav, ниже sheet */
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 24px);
  padding: 7px 14px;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(180, 83, 9, 0.35);
}
.cart-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + 12px);
  z-index: 15;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary) 88%, transparent);
  color: #fff;
  box-shadow: var(--shadow-card);
  font-weight: 600;
}

.cart-bar strong {
  font-size: 15px;
}

/* ─── Промо ─── */

.settings-list button,
.cart-line-item {
  display: grid;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-md);
}

/* ─── Профиль ─── */
.profile-login-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 0 12px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(224, 102, 42, 0.18);
}
.profile-login-cta svg { width: 17px; height: 17px; }
.profile-login-cta:active { transform: scale(0.97); }

.profile-hero {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
}

.profile-hero h3 {
  font-size: 16px;
  color: var(--text-main);
}

.profile-hero p {
  margin-top: 2px;
  color: var(--text-muted);
}

.qr-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
}

/* QR-паспорт: центрированная колонка (canvas + подпись) */
.qr-card:has(.qr-passport) {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 12px;
}

.qr-passport {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.qr-passport .qr-canvas {
  display: block;
  width: 176px;
  height: 176px;
  image-rendering: pixelated; /* чёткие модули без размытия при масштабе */
}

/* Стандартная рамка — глубокий синий (--primary) */
.standard-qr {
  border: 3px solid var(--primary);
  box-shadow: 0 4px 16px rgba(10, 37, 64, 0.12);
}

/* «Золотая рамка» верифицированного клиента — приглушённый золотой (--accent) */
.verified-qr {
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 2px rgba(196, 154, 108, 0.35), 0 4px 12px rgba(10, 37, 64, 0.12);
}

.qr-caption {
  max-width: 240px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-muted);
}

.qr-caption--active {
  color: var(--accent-hover);
  font-weight: 600;
}

/* ── Шторка «Моя карта» (Signal-стиль): паспорт-карточка с QR ── */
.qr-pass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-card);
  margin: 4px auto 10px;
  width: 100%;
  max-width: 320px;
}
.qr-pass--vip { background: linear-gradient(135deg, #0a2540, #2c3e50); }
.qr-pass--verified { background: var(--primary); }
.qr-pass--anon { background: #495057; }

.qr-pass-tier {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.qr-pass-box {
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  display: grid;
  place-items: center;
}
.qr-pass-box canvas,
.qr-pass-box .qr-canvas {
  display: block;
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
}

.qr-pass-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}
.qr-pass-copy {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
}
.qr-pass-copy svg { width: 13px; height: 13px; transform: rotate(-90deg); opacity: 0.9; }

.qr-pass-hint {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
}

.qr-pass-trust {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
  max-width: 300px;
}
.qr-pass-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}
.qr-pass-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 9px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.qr-pass-download:active { transform: translateY(1px); }
.qr-pass-download svg { width: 16px; height: 16px; }
.qr-pass-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 9px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.qr-pass-share:active { transform: translateY(1px); }
.qr-pass-share svg { width: 16px; height: 16px; }
.qr-pass-actions { gap: 8px; flex-wrap: wrap; }
.qr-pass-share,
.qr-pass-download { flex: 1 1 130px; }

.qr-box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-sm);
  border: 3px solid var(--accent);
  background: #fff;
  color: var(--accent-hover);
  box-shadow: var(--shadow-qr);
}

.qr-box--lg {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
}

.qr-box svg {
  width: 48px;
  height: 48px;
}

.qr-box--lg svg {
  width: 64px;
  height: 64px;
}

.qr-card h3 {
  font-size: 15px;
}

.qr-card p {
  margin-top: 4px;
}

.settings-list {
  margin-top: 12px;
}

.settings-list button {
  grid-template-columns: 40px 1fr auto 16px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  color: var(--text-main);
  text-align: left;
}

.settings-list span {
  margin-bottom: 0;
  width: 40px;
  height: 40px;
}

.settings-list b,
.settings-list small {
  display: block;
}

.settings-list b {
  font-size: 14px;
  font-weight: 600;
}

.settings-list small {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Нижняя навигация (floating, как erago_mini_app) ─── */

.bottom-nav {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: min(calc(100% - 32px), 398px);
  height: 60px;
  padding: 0 6px;
  border-radius: 32px;
  background: var(--primary);
  box-shadow:
    0 12px 32px -12px rgba(10, 37, 64, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: translateX(-50%);
}

[data-theme="dark"] .bottom-nav {
  background: #10161f;
  box-shadow:
    0 12px 32px -12px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

/* пилюля под активным пунктом */
.nav-pill {
  position: absolute;
  top: 4px;
  left: 0;
  width: 0;
  height: 52px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  transition: transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1), width 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
  z-index: 0;
}

[data-theme="dark"] .nav-pill {
  background: rgba(70, 74, 82, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* блик за курсором */
.nav-glare {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle 80px at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.35), transparent 100%);
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 0.3s;
}

.bottom-nav:hover .nav-glare {
  opacity: 1;
}

.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
  color: var(--accent);
}

[data-theme="dark"] .nav-item.active {
  color: var(--accent);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
}

/* Бейдж количества товаров на иконке Корзины */
.nav-cart-badge {
  position: absolute;
  top: -7px;
  right: -12px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-action, #e0662a);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg, #fff);
}
.nav-icon {
  position: relative;
}

.nav-label {
  max-width: 72px;
  overflow: hidden;
  opacity: 0.72;               /* подписи видны у всех вкладок */
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.active .nav-label {
  opacity: 1;
}

/* ─── Sheet / корзина ─── */

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(10, 37, 64, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
  touch-action: none; /* сквозные свайпы на нижнюю навигацию невозможны */
}

.cart-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 191; /* слои: nav 100 < overlay 190 < sheet 191 < toast 200 */
  touch-action: pan-y;
  width: min(100%, 430px);
  max-height: 88dvh;
  overflow-y: auto;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--bg-card);
  box-shadow: 0 -8px 32px rgba(10, 37, 64, 0.12);
  transform: translate(-50%, calc(100% + 28px));
  transition: transform 0.24s ease, visibility 0s linear 0.24s;
  visibility: hidden;
}

.cart-sheet.open {
  transform: translate(-50%, 0);
  transition-delay: 0s;
  visibility: visible;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--border-color);
}

.sheet-head {
  margin-bottom: 14px;
}

/* Шапка товара под фото: название + крестик */
.product-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.product-detail-head h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.product-detail-head button {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sheet-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.sheet-head button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 22px;
  line-height: 1;
}

.cart-destination-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.cart-destination-pill .hi {
  color: var(--text-muted);
  flex-shrink: 0;
}

.cart-head-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.cart-line-item {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cart-item-media {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-media .dish-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.cart-item-info h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-sub {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

.qty-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  width: fit-content;
}

.qty-pill button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease;
}

.qty-pill button:active {
  background: var(--border-color);
}

.qty-pill b {
  min-width: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.cart-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  min-height: 64px;
}

.cart-item-price-block {
  text-align: right;
}

.cart-item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.cart-item-old-price {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
  display: block;
  margin-top: 1px;
}

.cart-item-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.cart-item-del-btn:hover,
.cart-item-del-btn:active {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* «С этим берут»: подсказка напитков и соусов в корзине */
.upsell {
  margin: 4px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.upsell-title {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.upsell-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.upsell-row::-webkit-scrollbar {
  display: none;
}

.upsell-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}

.upsell-btn span {
  font-weight: 600;
}

.upsell-btn small {
  color: var(--text-muted);
  font-size: 12px;
}

.upsell-btn .hi {
  color: var(--primary);
}

.qty {
  display: grid;
  grid-template-columns: 44px 26px 44px;
  align-items: center;
  gap: 2px;
}

.qty button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--primary);
  font-size: 20px;
}

.cart-bonus-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin: 14px 0 10px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-bonus-row:hover {
  border-color: var(--border-color-hover, var(--border-color));
}

.cart-bonus-row.is-active {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

.cart-bonus-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cart-bonus-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-bonus-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-bonus-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-main);
}

.cart-bonus-avail {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text-muted);
}

.cart-bonus-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cart-bonus-chip {
  font-size: 12px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

.cart-switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--border-color, #e2e8f0);
  position: relative;
  transition: background 0.22s ease;
  flex-shrink: 0;
}

.cart-switch.active {
  background: #059669;
}

.cart-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-switch.active .cart-switch-knob {
  transform: translateX(18px);
}

.cart-total {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
}

.cart-total strong {
  font-size: 20px;
  font-weight: 700;
}

.checkout-btn {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  margin-top: 4px;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.checkout-btn:active {
  transform: scale(0.985);
  opacity: 0.95;
}

.checkout-btn-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.checkout-btn-price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.checkout-old-price {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: line-through;
}

.checkout-final-price {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .cart-destination-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

[data-theme="dark"] .qty-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .cart-bonus-row {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .cart-bonus-row.is-active {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .cart-bonus-chip {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

[data-theme="dark"] .checkout-btn {
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .checkout-btn .checkout-btn-title,
[data-theme="dark"] .checkout-btn .checkout-final-price {
  color: #0f172a;
}

[data-theme="dark"] .checkout-btn .checkout-old-price {
  color: rgba(15, 23, 42, 0.5);
}

.empty {
  grid-column: 1 / -1;
  padding: 32px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: center;
  font-size: 14px;
}

/* ─── Toast ─── */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  z-index: 200; /* слой системных уведомлений: выше шторок (191) и навбара (100) */
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  transform: translateX(-50%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.hide {
  opacity: 0;
  transform: translate(-50%, 8px);
}

/* ─── Pull to refresh ─── */

.ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(100%, 430px);
  height: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-main);
  transform: translateX(-50%);
  transition: height 0.2s ease;
  pointer-events: none;
}

.ptr-indicator.active,
.ptr-indicator.loading {
  height: calc(48px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
}

.ptr-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
}

.ptr-indicator.loading .ptr-spinner {
  animation: ptrSpin 0.8s linear infinite;
}

@keyframes ptrSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Скрываем старые декоративные элементы, если остались в DOM */
.hero-stage,
.hero-plate,
.steam,
.product-steam,
.plate-shadow,
.plate-core,
.plate-gloss,

@media (max-width: 360px) {
  .page {
    padding-inline: 12px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .category-row {
    margin-inline: -12px;
    padding-inline: 12px;
  }
}

/* ─── Карта лояльности: Bottom Sheet (шторка) ─── */
/* Отдельный overlay, не пересекается с корзиной (#sheet-overlay/.open) */
.loyalty-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.45);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loyalty-overlay.active {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 24px rgba(10, 37, 64, 0.18);
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-sheet.active {
  transform: translateY(0);
}

.sheet-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.sheet-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
}

.sheet-content {
  padding: 24px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.sheet-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border-color);
}

.btn-close-sheet {
  width: 100%;
  padding: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
}

.btn-close-sheet:active {
  background: var(--accent-soft);
}

/* Мини-QR внутри карты лояльности на главной */

/* QR заполняет весь квадрат плитки (64×64), белая рамка плитки — тихая зона */
.loyalty-qr {
  padding: 4px;
}

.loyalty-qr .qr-canvas {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: #fff;
  image-rendering: pixelated;
  display: block;
}

.home-qr-mini--verified .qr-canvas {
  box-shadow: 0 0 0 2px var(--accent);
}

.home-view {
  animation: pageIn 0.2s ease;      /* лёгкое проявление при переключении */
}

/* ─── Главная по референсу: hero, категории-иконки, сетка блюд ─── */

.home-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 20px 18px 16px;
  margin: 0 0 16px;
  background: linear-gradient(150deg, #fdf0e6 0%, #fbe8d8 55%, #f8ddc4 100%);
  color: #2d1f16;
  isolation: isolate;
}

[data-theme="dark"] .home-hero {
  background: linear-gradient(150deg, #2a201a 0%, #241c16 55%, #1e1712 100%);
  color: #f5ebe2;
}

.home-hero-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.72) 45%, rgba(255, 255, 255, 0.12) 100%);
}

[data-theme="dark"] .home-hero::after {
  background: linear-gradient(100deg, rgba(30, 23, 18, 0.94) 0%, rgba(30, 23, 18, 0.72) 45%, rgba(30, 23, 18, 0.12) 100%);
}

.home-hero-copy {
  position: relative;
  max-width: 62%;
}

.home-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a0622d;
}

[data-theme="dark"] .home-hero-kicker {
  color: #e8a876;
}

.home-hero h2 {
  margin: 6px 0 4px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: inherit;
}

.home-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #7d6650;
}

[data-theme="dark"] .home-hero p {
  color: #c4b3a1;
}

.home-hero-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.home-search {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  box-shadow: var(--shadow-soft);
}

.home-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
}

.home-search input::placeholder {
  color: var(--text-muted);
}

.home-search-side {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-soft);
}

.home-cats {
  display: flex;
  gap: 14px;
  margin: 0 -16px 4px;
  padding: 2px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-cats::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 68px;
  padding: 0;
  border: 0;
  background: none;
}

.cat-chip-ic {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-card);
  border: 2px solid transparent;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.cat-chip-ic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cat-chip-ic svg {
  width: 24px;
  height: 24px;
}

.cat-chip.active .cat-chip-ic {
  border-color: var(--accent);
  transform: scale(1.04);
}

.cat-chip-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.cat-chip.active .cat-chip-name {
  color: var(--text-main);
}

.home-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ─── Избранное и корзина как табы ─── */

.favs-grid {
  margin-bottom: 16px;
}

.favs-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.favs-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.favs-summary-row b {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.favs-add-all {
  width: 100%;
}

.favs-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 220px;
  padding: 24px 20px;
  text-align: center;
}

.favs-empty .empty-menu-btn {
  justify-self: center;
  min-height: 44px;
  margin-top: 6px;
}

.favs-empty svg {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  opacity: 0.55;
}

.favs-empty b {
  font-size: 15px;
  font-weight: 600;
}

.favs-empty small {
  font-size: 13px;
  color: var(--text-muted);
}

.cart-page-list {
  display: grid;
  gap: 10px;
}

.cart-page-total {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

/* ─── Главная: лента категорий, фото блюд и единая карточка ─── */
.loyalty-card--home {
  width: 100%;
  margin: 0 0 16px;
  border-radius: 16px;
}

.loyalty-card--home .premium-card-inner {
  padding: 16px;
}

.loyalty-balance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 64px;
  align-items: end;
  gap: 10px;
}

.loyalty-balance .premium-amount {
  margin-top: 2px;
}

.loyalty-bonus {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
}

.loyalty-bonus strong {
  color: var(--accent);
  font-size: 15px;
  white-space: nowrap;
}

.loyalty-progress {
  margin-top: 14px;
}

.loyalty-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.loyalty-progress-head b {
  color: var(--accent);
  white-space: nowrap;
}

.loyalty-progress-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.loyalty-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.loyalty-progress small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

.loyalty-progress-note {
  margin: 14px 0 0;
  color: var(--accent);
  font-size: 12px;
}

.home-section-head {
  margin-bottom: 8px;
}

.home-section-head .section-link {
  display: inline-flex;
  width: auto;
  height: auto;
  gap: 2px;
  padding: 4px 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.active-order-card {
  margin: 0 0 16px;
  padding: 16px;
  border-left: 3px solid var(--accent);
}

.active-order-head,
.active-order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.active-order-head {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.active-order-head b {
  color: var(--primary);
  letter-spacing: 0;
  text-transform: none;
}

.active-order-steps {
  display: flex;
  gap: 6px;
  margin: 16px 0 12px;
}

.active-order-steps i {
  display: block;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--border-color);
}

.active-order-steps i.done {
  background: var(--accent);
}

.active-order-foot {
  color: var(--text-muted);
  font-size: 11px;
}

.active-order-foot button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
}
/* ─── Оценка блюда: баннер на главной ─── */
.rating-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 16px;
  padding: 14px 16px;
  text-align: left;
  border: none;
  transition: transform 0.15s ease;
}

.rating-banner:active {
  transform: scale(0.985);
}

.rating-banner-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.rating-banner-icon svg {
  width: 20px;
  height: 20px;
}

.rating-banner-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rating-banner-copy b {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.rating-banner-copy small {
  font-size: 12px;
  color: var(--text-muted);
}

.rating-banner-cta {
  flex-shrink: 0;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-hover);
}

/* ─── Оценка заказа: шторка (одна оценка на чек) ─── */
.rate-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Лицо: SVG-круг с глазами (моргание) и ртом-дугой; bob — лёгкое покачивание */
.rate-face-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 96px;
  margin-bottom: 6px;
}

.rate-face {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.25s ease,
    color 0.25s ease;
  user-select: none;
}

.rate-face svg {
  width: 46px;
  height: 46px;
  display: block;
  animation: rate-bob 3s ease-in-out infinite;
}

.rate-face-eyes {
  transform-box: view-box;
  transform-origin: 42px 36px;
  animation: rate-blink 4.2s infinite;
}

.rate-face-tear {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rate-face.happy {
  transform: scale(1.08);
  background: var(--ok-soft);
  color: var(--ok);
}

.rate-face.sad {
  transform: scale(0.96) rotate(-5deg);
  background: rgba(214, 69, 69, 0.08);
  color: #c03d3d;
}

.rate-face.sad .rate-face-tear {
  opacity: 1;
}

.rate-face.pop {
  animation: rate-face-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rate-face-pop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes rate-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes rate-blink {
  0%, 91%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.12); }
  97% { transform: scaleY(1); }
}

.rate-face-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text-muted);
  min-height: 18px;
  transition: color 0.2s ease;
}

.rate-face-label.filled {
  color: var(--accent-hover);
}

.rate-face-label.swap {
  animation: rate-label-in 0.28s ease;
}

@keyframes rate-label-in {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Звёзды: одна шкала на чек */
.rate-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.rate-star {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.rate-star:active {
  transform: scale(0.9);
}

.rate-star svg {
  width: 28px;
  height: 28px;
}

.rate-star.on {
  color: var(--accent);
}

.rate-star.on svg {
  fill: currentColor;
}

.rate-star.in {
  animation: rate-star-pop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: var(--i, 0s);
}

@keyframes rate-star-pop {
  0% { transform: scale(0.4) rotate(-14deg); }
  60% { transform: scale(1.2) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Красная плашка: что не понравилось (≤3★) */
.rate-bad {
  margin: 4px 0 2px;
  padding: 12px 14px;
  background: rgba(214, 69, 69, 0.06);
  border: 1px solid rgba(214, 69, 69, 0.45);
  border-radius: var(--radius-sm);
  animation: rate-bad-in 0.3s ease;
}

@keyframes rate-bad-in {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.rate-bad-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #c03d3d;
}

.rate-bad-hint {
  display: block;
  font-size: 12px;
  color: #c03d3d;
  opacity: 0.75;
  margin: 2px 0 8px;
}

.rate-bad-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rate-bad-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
  transition: background-color 0.15s ease;
}

.rate-bad-item:hover {
  background: rgba(214, 69, 69, 0.08);
}

.rate-bad-input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid #d64545;
  border-radius: 5px;
  background: var(--bg-card);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.rate-bad-input:checked {
  background: #d64545;
  border-color: #d64545;
}

.rate-bad-input:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.rate-bad-name {
  flex: 1;
}

.rate-bad-qty {
  color: var(--text-muted);
}

/* Комментарий (≤2★ — обязателен) */
.rate-comment-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 14px 0 6px;
}

.rate-comment-label.required {
  color: #c03d3d;
}

.rate-comment {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-elevated, transparent);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.rate-comment::placeholder {
  color: var(--text-muted);
}

.rate-submit:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Оценка чека в истории */
.receipt-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.receipt-rating-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rcpt-star {
  width: 15px;
  height: 15px;
  fill: none;
}

.receipt-rating-stars .rcpt-star.on {
  color: var(--accent);
  fill: currentColor;
}

.receipt-rating b {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.receipt-rating small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Тёмная тема */
[data-theme="dark"] .rate-face {
  background: rgba(196, 154, 108, 0.16);
}

[data-theme="dark"] .rate-face.happy {
  background: rgba(47, 158, 120, 0.18);
  color: var(--ok-bright);
}

[data-theme="dark"] .rate-face.sad {
  background: rgba(214, 69, 69, 0.16);
  color: #e08585;
}

[data-theme="dark"] .rate-bad {
  background: rgba(214, 69, 69, 0.1);
  border-color: rgba(214, 69, 69, 0.4);
}

[data-theme="dark"] .rate-bad-title,
[data-theme="dark"] .rate-bad-hint {
  color: #e08585;
}

[data-theme="dark"] .rate-bad-item {
  color: #f2f2f2;
}

[data-theme="dark"] .rate-bad-input {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .rate-comment {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f2f2f2;
}

[data-theme="dark"] .receipt-rating {
  background: rgba(196, 154, 108, 0.14);
}

/* ─── Бронирование кабинок ─── */
.booking-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
  box-shadow: var(--shadow-card);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.booking-card:active {
  transform: scale(0.99);
}

[data-theme="dark"] .booking-card {
  background: #1a222d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.booking-card-icon,
.booking-card-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

[data-theme="dark"] .booking-card-icon,
[data-theme="dark"] .booking-card-ic {
  background: rgba(224, 102, 42, 0.15);
  color: var(--accent);
}

.booking-card-icon svg,
.booking-card-ic svg {
  width: 20px;
  height: 20px;
}

.booking-card-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.booking-card-copy b {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

[data-theme="dark"] .booking-card-copy b {
  color: #f1f5f9;
}

.booking-card-copy small {
  font-size: 12px;
  color: var(--text-muted);
}

[data-theme="dark"] .booking-card-copy small {
  color: #94a3b8;
}

.booking-card-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
}

[data-theme="dark"] .booking-card-chevron {
  color: #64748b;
}

.booking-date-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.booking-date-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.booking-date-field input[type="date"] {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
}

/* ── Карта зала (бронирование) — перенос вида из staff ── */
.floor-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  padding: 4px;
  border-radius: var(--radius-sm);
}
.floor-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 8px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.floor-btn.active { background: var(--primary); color: #fff; }

.hall-plan { display: flex; flex-direction: column; }
.hall-floor { display: none; }
.hall-floor.active {
  display: block;
  animation: hallFade 0.2s ease;
  border-radius: 12px;
  padding: 2px;
}
@keyframes hallFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hall-namaz {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  color: var(--text-muted);
}
.hall-namaz-ic {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  background: var(--bg-main);
  display: grid; place-items: center;
}
.hall-namaz-ic svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.hall-namaz-name { font-size: 13px; font-weight: 600; }

.hall-vip { margin-bottom: 10px; }
.hall-cols { display: grid; grid-template-columns: 1fr 26px 1fr; gap: 10px; align-items: stretch; }
.hall-col { display: flex; flex-direction: column; gap: 10px; }
.hall-aisle {
  display: flex; flex-direction: column; align-items: center; justify-content: space-around;
  gap: 8px; padding: 8px 0;
  background: var(--bg-main); border: 1px dashed var(--border-color);
  border-radius: 10px; color: var(--text-muted);
}
.hall-aisle-ic { display: grid; place-items: center; opacity: 0.75; }
.hall-aisle-ic svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.hall-aisle-t { writing-mode: vertical-rl; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.65; }

.hall-card {
  display: block; width: 100%; text-align: left; font: inherit; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 10px 12px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.15s;
}
.hall-card:active { transform: scale(0.98); }
.hall-card.free { border-color: var(--ok-border); }
.hall-card.free:hover { box-shadow: 0 0 0 3px var(--ok-soft); }
.hall-card.busy { opacity: 0.7; cursor: not-allowed; background: var(--bg-main); }

/* VIP-карта: во всю ширину, горизонтально */
.hall-vip { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.hall-vip-ic {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-hover);
  display: grid; place-items: center;
}
.hall-vip-ic svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.hall-vip-name { font-weight: 700; font-size: 14.5px; color: var(--text-main); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hall-vip-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em;
  background: var(--accent-soft); color: var(--accent-hover);
  padding: 2px 7px; border-radius: 999px;
}
.hall-vip-sub { font-size: 12px; color: var(--text-muted); flex: 1; }

/* Обычные карты: столбик */
.hall-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hall-name { font-weight: 700; font-size: 14px; color: var(--text-main); }
.hall-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.hall-dot.ok { background: var(--ok); }
.hall-dot.bad { background: #d64545; }
.hall-sub { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.hall-status-bar {
  display: block; text-align: center; margin-top: 8px; padding: 5px 0;
  font-size: 11.5px; font-weight: 700; border-radius: 8px;
}
.hall-status-bar.ok { background: var(--ok-soft); color: var(--ok); }
.hall-status-bar.bad { background: rgba(214, 69, 69, 0.08); color: #c03d3d; }
.hall-status {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.hall-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hall-status.ok { background: var(--ok-soft); color: var(--ok); }
.hall-status.bad { background: rgba(214, 69, 69, 0.1); color: #c03d3d; }

.cabin-legend {
  display: flex;
  gap: 18px;
  width: 100%;
  font-size: 13px;
  color: var(--text-muted);
}

.cabin-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cabin-legend .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-free { background: #2f9e63; }
.dot-busy { background: #d64545; }

.booking-sheet .sheet-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 4px;
}

.booking-sheet .sheet-header h3 {
  /* Явно во вторую колонку: при скрытой кнопке «Назад» грид иначе отдаёт
     заголовку первую колонку 40px и он переносится на две строки. */
  grid-column: 2;
  text-align: center;
  margin: 0;
}

.booking-back {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--bg-soft, #f2f4f7);
  color: var(--text-main);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.booking-back[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.booking-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.booking-field input,

.booking-field input:focus,

.booking-confirm-btn {
  width: 100%;
  margin-top: 4px;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: var(--primary, #0A2540);
  color: var(--text-on-primary, #fff);
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.booking-confirm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.booking-confirm-btn:not(:disabled):active {
  transform: scale(0.98);
}

.booking-confirm-secondary {
  background: var(--bg-soft, #eef1f5);
  color: var(--text-main);
}

.booking-done-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border-radius: var(--radius-sm);
  background: rgba(47, 158, 99, 0.1);
  border: 1px solid rgba(47, 158, 99, 0.28);
  color: var(--text-main);
}

.booking-done-card b {
  font-size: 16px;
  color: #227048;
}

.booking-done-card p {
  margin: 0;
  font-size: 14px;
}

.booking-done-meta {
  color: var(--text-muted);
}

.booking-mine {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.booking-mine-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.booking-mine-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.booking-mine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
}

.booking-mine-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.booking-mine-info b {
  font-size: 14px;
  color: var(--text-main);
}

.booking-mine-info small {
  font-size: 12px;
  color: var(--text-muted);
}

.booking-cancel-btn {
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid rgba(214, 69, 69, 0.35);
  border-radius: 10px;
  background: rgba(214, 69, 69, 0.08);
  color: #b23434;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
}

.booking-cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* WhatsApp-вход (шторка авторизации) */
.auth-ornament {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c49a6c' stroke-width='1.3'%3E%3Cpath d='M32 4 L60 32 L32 60 L4 32 Z'/%3E%3Cpath d='M32 14 L50 32 L32 50 L14 32 Z'/%3E%3Cpath d='M32 24 L40 32 L32 40 L24 32 Z'/%3E%3Cpath d='M32 0 v6 M32 58 v6 M0 32 h6 M58 32 h6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px;
}

.auth-hint {
  margin: 4px 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary, #6b7280);
}

.auth-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}

.auth-field input {
  padding: 12px 18px;
  border: 1.5px solid var(--border-color, #e5e7eb);
  border-radius: 999px;
  font-size: 16px; /* 16px — iOS не зумит поле при фокусе */
  background: var(--bg-input, #fff);
  color: inherit;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border-radius: 999px;
  box-shadow:
    inset 0 3px 6px -4px rgba(255, 255, 255, 0.55),
    inset 0 -3px 6px -2px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s ease, transform 0.1s ease, background 0.2s;
}

.auth-wa-btn:hover {
  filter: brightness(1.05);
}

.auth-wa-btn:active {
  transform: scale(0.96);
}

/* золотая волна-орнамент под заголовком (Rauan, Noun Project, CC-BY) */
.auth-wave {
  height: 30px;
  margin: -2px 0 12px;
  background-image: url("/assets/ornament-wave.png");
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: center;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

/* польза регистрации */
.auth-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 1.5px;
  margin-bottom: 4px;
}

.auth-frame::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: conic-gradient(from 45deg, transparent 70%, var(--accent) 86%, transparent 100%);
  animation: auth-spin 4s linear infinite;
}

.auth-frame.typing::before {
  animation-duration: 1.1s;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-frame-inner {
  position: relative;
  display: grid;
  gap: 10px;
  border-radius: 20px;
  background: var(--bg-card);
  padding: 16px;
}

.auth-logo {
  justify-self: center;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* 4 клетки кода */

.otp-row.shake {
  animation: tile-shake 0.3s;
}

.auth-trust {
  margin: 12px 2px 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.auth-error {
  margin: 4px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm, 8px);
  background: #fee2e2;
  color: #b91c1c;
  font-size: 13px;
  text-align: center;
}

/* Ожидание подтверждения от бота: лоадер + текст «Тастыктоо күтүлүүдө...».
   WhatsApp могли закрыть, не отправив сообщение — поэтому под лоадером
   остаётся кнопка для повторного открытия. */
.auth-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 0 6px;
  font-size: 14px;
  color: var(--text);
  text-align: center;
}

.auth-waiting .spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--brand, #25d366);
  border-radius: 50%;
  animation: auth-spin 0.9s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-waiting .spinner { animation-duration: 2.4s; }
}

.auth-wa-again {
  width: 100%;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.18));
  color: var(--text);
}

.auth-wa-again:hover {
  background: rgba(255, 255, 255, 0.06);
}

.auth-wa-btn svg {
  width: 18px;
  height: 18px;
}

/* Садака */
.reg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  text-align: left;
}

.sadaqa-text {
  font-size: 14px;
  line-height: 1.55;
  margin: 4px 0 14px;
}

.sadaqa-recipient {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  margin-bottom: 14px;
}

.sadaqa-recipient-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sadaqa-recipient-main {
  display: grid;
  gap: 2px;
}

.sadaqa-bank {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-hover);
}

.sadaqa-phone {
  font-size: 24px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.sadaqa-name {
  font-size: 13px;
  color: var(--text-muted);
}

.sadaqa-copy-btn {
  width: 100%;
}

.sadaqa-note {
  margin: 12px 2px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Позиции «скоро» в меню */
.product-card--soon {
  opacity: 0.75;
}

.soon-line {
  margin-top: 8px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Игра «1-24» */
.game-prizes {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.game-prizes b {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-hover);
}

.game-prizes span {
  font-size: 13px;
}

.game-board {
  margin-bottom: 14px;
}

.game-board-title {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.game-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-light);
}

.game-row em {
  width: 22px;
  font-style: normal;
  font-weight: 700;
  color: var(--accent-hover);
}

.game-row b {
  flex: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.game-row span {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.game-row i {
  font-style: normal;
  font-size: 11px;
  color: var(--text-muted);
}

.game-start {
  width: 100%;
}

.game-timer {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-hover);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0 20px;
}

.game-tile {
  aspect-ratio: 1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s, background 0.15s;
}

.game-tile:active {
  transform: scale(0.93);
}

.game-tile.hit {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.06);
  transition: background 0.45s ease, color 0.45s ease, transform 0.12s ease;
}

.game-tile.shake {
  animation: tile-shake 0.25s;
}

@keyframes tile-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.game-result {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px 0;
}

.game-result b {
  font-size: 40px;
  font-variant-numeric: tabular-nums;
}

.game-pending {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 600;
}

.game-actions {
  display: flex;
  gap: 10px;
}

.game-actions .btn {
  flex: 1;
}

.game-winners {
  margin-top: 14px;
}

/* Плавающие цифры на фоне шторки игры (без библиотек) */
.game-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ga {
  position: absolute;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.1;

  animation: ga-float 9s ease-in-out infinite;
}

.ga--1 { top: 12%; left: 8%; font-size: 44px; animation-delay: 0s; }
.ga--2 { top: 30%; right: 10%; font-size: 30px; animation-delay: -2s; }
.ga--3 { top: 55%; left: 14%; font-size: 24px; animation-delay: -4s; }
.ga--4 { top: 70%; right: 18%; font-size: 38px; animation-delay: -1s; }
.ga--5 { top: 42%; left: 44%; font-size: 26px; animation-delay: -5.5s; }
.ga--6 { top: 18%; right: 30%; font-size: 20px; animation-delay: -3s; }

@keyframes ga-float {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  50% { transform: translate(6px, -14px) rotate(5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ga { animation: none; }
}

/* Полноэкранный режим игры */
.game-fs {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--bg-main);
}

.game-fs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.game-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  background: none;
  padding: 8px 8px 8px 0;
  color: var(--accent-hover);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.game-back svg {
  width: 20px;
  height: 20px;
  transform: rotate(180deg); /* chevron влево */
}

.game-next-line {
  margin: 2px 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.game-fs .game-grid {
  flex: 1;
  align-content: center;
  margin: 0;
}

.game-fs .game-tile {
  font-size: 24px;
}

.game-fs .game-cd {
  flex: 0 0 auto;
  height: 140px;
}

.game-actions--fs {
  padding: 0 0 8px;
}

.game-claim {
  margin-top: 10px;
}

/* UNO-карта результата: «СЕН» → переворот → место в рейтинге */
.uno-wrap {
  perspective: 900px;
  margin-bottom: 4px;
}

.uno-card {
  position: relative;
  width: 150px;
  height: 237px;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
  cursor: pointer;
}

.uno-card.flipped {
  transform: rotateY(180deg);
}

.uno-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.uno-front {
  background: #fffffd;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.uno-back {
  background: #191f1f;
  transform: rotateY(180deg);
}

.uno-oval {
  position: absolute;
  inset: -12%;
  background: #cb0323;
  border-radius: 100%;
  transform: scale(0.92, 0.86) skewX(-22.5deg);
}

.uno-back .uno-oval {
  background: #cb0323;
  box-shadow: inset 0 0 0 10px #fffffd;
}

.uno-word {
  position: relative;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #e4c713;
  transform: rotate(-14deg);
  text-shadow: 2px 2px 0 #191f1f, -1px -1px 0 #191f1f, 1px -1px 0 #191f1f, -1px 1px 0 #191f1f;
}

.uno-rank {
  font-size: 54px;
  transform: rotate(-10deg);
}

@media (prefers-reduced-motion: reduce) {
  .uno-card {
    transition: none;
  }
}

/* Кнопка «Кайра ойноо»: жёлтая пилюля, при наведении текст уезжает, стрелка въезжает */
.btn-again {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 10px;
  color: #fff;
  text-shadow: 1px 1px rgb(116, 116, 116);
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid #111;
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 15px;
  background: hsl(49, 98%, 60%);
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-again:active {
  transform: scale(0.94);
  transition: all 0.1s ease;
}

.btn-again .again-play {
  transition: transform 0.5s ease 0.15s;
}

.btn-again .again-now {
  position: absolute;
  left: 0;
  display: flex;
  transform: translateX(-140%);
  transition: transform 0.5s ease 0.15s;
}

.btn-again .again-now svg {
  width: 22px;
  height: 22px;
  color: #111;
}

.btn-again:hover .again-now,
.btn-again:focus-visible .again-now {
  transform: translateX(16px);
}

.btn-again:hover .again-play,
.btn-again:focus-visible .again-play {
  transform: translateX(240%);
}

/* Кнопка «Досуна жөнөт» (чистый плоский стиль по anti-slop) */
.btn-55 {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px 20px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-55 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: inherit;
}

.btn-55:active {
  opacity: 0.85;
}

.game-week {
  margin-bottom: 10px;
}

.game-week-date {
  display: block;
  margin: 6px 2px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Обратный отсчёт до розыгрыша (пт 16:00) */
.game-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
}

.game-count span {
  font-size: 12px;
  color: var(--text-muted);
}

.game-count b {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: var(--accent-hover);
}

/* Отсчёт 3-2-1 перед стартом */
.game-cd {
  display: grid;
  place-items: center;
  height: 120px;
  font-size: 72px;
  font-weight: 800;
  color: var(--accent);
}

.game-grid--ghost .game-tile {
  background: var(--primary-soft);
  border-color: transparent;
  color: transparent;
  pointer-events: none;
}

/* Подиум рейтинга */
.game-ava {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

[data-theme="dark"] .game-ava {
  color: #cfe1f5;
}

.game-row--1 {
  padding: 12px 4px;
}

.game-row--1 .game-ava {
  width: 44px;
  height: 44px;
  font-size: 18px;
  background: linear-gradient(145deg, #f6e27a, #c49a6c);
  color: #3a2a12;
}

.game-row--1 .game-ava::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(#f6e27a, #fff8d6, #c49a6c, #f6e27a);
  z-index: -1;
  animation: ava-spin 2.4s linear infinite;
}

@keyframes ava-spin {
  to { transform: rotate(360deg); }
}

.game-row--1 b {
  font-size: 17px;
}

.game-row--1 span {
  font-size: 16px;
}

.game-row--2 .game-ava {
  width: 37px;
  height: 37px;
  font-size: 15px;
  background: linear-gradient(145deg, #e8edf2, #b9c4cf);
  color: #2c3a4a;
  box-shadow: 0 0 0 2px rgba(207, 214, 221, 0.9);
}

.game-row--2 b {
  font-size: 15px;
}

.game-row--3 .game-ava {
  width: 33px;
  height: 33px;
  background: linear-gradient(145deg, #e8c39a, #b97f4e);
  color: #3d2412;
  box-shadow: 0 0 0 2px rgba(201, 141, 94, 0.8);
}

@media (prefers-reduced-motion: reduce) {
  .game-row--1 .game-ava::before {
    animation: none;
  }
}

/* Глобальная полоса загрузки (любой API-запрос > 300 мс) */
.load-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 400;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.2s;
  pointer-events: none;
}

.load-bar.on {
  opacity: 1;
}

.load-bar::before {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: load-slide 1s linear infinite;
}

@keyframes load-slide {
  from { left: -40%; }
  to { left: 100%; }
}

/* Спиннер (лоадер): старт приложения, подгрузка рейтинга */
.spinner {
  width: 56px;
  height: 56px;
  display: grid;
  border: 4px solid #0000;
  border-radius: 50%;
  border-right-color: var(--accent);
  animation: spinner-rot 1s infinite linear;
}

.spinner::before,
.spinner::after {
  content: "";
  grid-area: 1/1;
  margin: 2px;
  border: inherit;
  border-radius: 50%;
  animation: spinner-rot 2s infinite;
}

.spinner::after {
  margin: 8px;
  animation-duration: 3s;
}

@keyframes spinner-rot {
  100% { transform: rotate(1turn); }
}

.boot-loader {
  display: grid;
  place-items: center;
  min-height: 60dvh;
}

.game-loading {
  display: grid;
  place-items: center;
  padding: 18px 0;
}

.game-loading .spinner {
  width: 34px;
  height: 34px;
  border-width: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .spinner,
  .spinner::before,
  .spinner::after {
    animation-duration: 3s;
  }
}

/* Уведомления */
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg-main);
}

.header-icon-btn {
  position: relative;
}

.notif-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 10px;
  text-align: left;
}

.notif-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-hover);
  flex-shrink: 0;
}

.notif-ic svg {
  width: 19px;
  height: 19px;
}

.notif-copy {
  flex: 1;
  min-width: 0;
}

.notif-copy b {
  display: block;
  font-size: 14px;
}

.notif-copy small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Персональная карта лояльности — переворот как у физической карты */
.member-card-persp {
  margin-top: 12px;
  perspective: 1200px;
}

.member-card {
  border-radius: var(--radius-lg);
  cursor: pointer;
  touch-action: pan-y; /* вертикальный скролл страницы сохраняется, горизонт — карте */
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.member-card.dragging {
  transition: none;
}

.member-card-inner {
  position: relative;
  transform-style: preserve-3d;
}

.member-face {
  padding: 18px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.member-face-front {
  display: grid;
  gap: 12px;
}

.member-face-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
}

.member-back-qr {
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.member-back-qr canvas {
  display: block;
  width: 124px;
  height: 124px;
}

/* солнечный блик по карте каждые ~4,6 с */
.member-face-front {
  position: relative;
}

.card-shine {
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: 0;
  width: 60%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.26) 42%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.26) 58%, transparent);
  transform: translateX(-170%) skewX(-10deg);
  animation: card-shine 4.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes card-shine {
  0% { transform: translateX(-170%) skewX(-10deg); }
  16% { transform: translateX(340%) skewX(-10deg); }
  100% { transform: translateX(340%) skewX(-10deg); }
}

@media (prefers-reduced-motion: reduce) {
  .card-shine { animation: none; }
}

.card-offline-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.card-offline-note svg {
  width: 14px;
  height: 14px;
  color: var(--accent-hover);
}

.member-back-offline {
  font-size: 11px;
  opacity: 0.75;
}

.member-card-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.member-card-info {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.member-qr {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding: 4px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.member-qr canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.member-qr.verified-qr {
  box-shadow: var(--shadow-qr);
}

.member-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.member-card-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.95;
}

.member-card-number {
  font-size: 13px;
  letter-spacing: 0.22em;
  opacity: 0.45;
  font-variant-numeric: tabular-nums;
}

.member-card-stats {
  display: flex;
  gap: 36px;
}

.member-card-stats small {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
  margin-bottom: 2px;
}

.member-card-stats b {
  font-size: 21px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.member-card-stats b .cur {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.6;
  margin-left: 2px;
}

/* VIP статус карты */
.premium-card--vip {
  /* макет loyalty-preview: спокойное золото */
  background: linear-gradient(158deg, #1C150A 0%, #291E0B 48%, #3D2D0F 100%) !important;
  border: 1px solid rgba(184, 134, 11, 0.35);
  box-shadow: 0 8px 26px rgba(184, 134, 11, 0.18);
}
.premium-card--vip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 200px 150px at 85% 15%, rgba(212, 162, 78, 0.45), transparent);
  pointer-events: none;
}
/* VIP QR рамка */
.vip-qr {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-border) !important;
}

/* Виджет прогресса VIP (5 000 сом за 30 дней) */
.loyalty-progress-widget {
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.loyalty-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.loyalty-progress-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.loyalty-progress-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(138, 106, 72, 0.1);
  color: #8a6a48;
  border: 1px solid rgba(138, 106, 72, 0.24);
}
.loyalty-progress-badge.is-vip {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.loyalty-progress-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.loyalty-progress-titles b {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}
.loyalty-progress-titles small {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}
.loyalty-progress-pct {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}
.loyalty-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-high, rgba(0, 0, 0, 0.08));
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
[data-theme="dark"] .loyalty-progress-track {
  background: rgba(255, 255, 255, 0.08);
}
.loyalty-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ok) 0%, var(--ok-bright) 70%, var(--accent) 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.loyalty-progress-fill.is-vip {
  background: var(--accent);
}

.loyalty-progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.card-bonus-val {
  color: #8a6a48;
  opacity: 0.9;
}
[data-theme="dark"] .loyalty-progress-badge:not(.is-vip) {
  color: #d0aa7d;
  background: rgba(208, 170, 125, 0.12);
  border-color: rgba(208, 170, 125, 0.26);
}
[data-theme="dark"] .card-bonus-val {
  color: #d0aa7d;
}
.premium-card--vip .card-bonus-val {
  color: var(--accent);
}
.member-card-stats b.is-masked {
  color: rgba(255, 255, 255, 0.5);
}

/* Плашка в открытой шторке карты */

/* ═══════════════════════════════════════════════════════════
   EDITORIAL / APPLE-STYLE GROUPED SETTINGS (PER USER IMAGE)
   ═══════════════════════════════════════════════════════════ */

.grouped-settings {
  display: flex;
  flex-direction: column;
  margin-top: 22px;
}

.grouped-settings-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.grouped-settings-list {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 0 14px;
  box-shadow: var(--shadow-soft);
}

.grouped-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px;
  border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.05));
  text-decoration: none;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: opacity 0.15s ease;
}

.grouped-settings-item:last-child {
  border-bottom: none;
}

.grouped-settings-item:active {
  opacity: 0.7;
}

.grouped-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.grouped-item-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text-main);
}

.grouped-item-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.grouped-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.grouped-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.grouped-item-desc {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grouped-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  opacity: 0.6;
}

.chevron-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ── Clean iOS Native Toggle Switch ── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background-color: rgba(120, 120, 128, 0.25);
  border-radius: 24px;
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.18);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #2563EB;
}

[data-theme="dark"] .toggle-switch input:checked + .toggle-slider {
  background-color: #3B82F6;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ── Danger Logout Row ── */
.grouped-settings-item.danger .grouped-item-icon {
  color: #EF4444;
}

.grouped-settings-item.danger .grouped-item-title {
  color: #EF4444;
}

/* Бейдж для строки игры */
.game-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent-soft, rgba(196, 154, 108, 0.14));
  color: var(--accent-hover, #a17f58);
  border: 1px solid rgba(196, 154, 108, 0.0);
  vertical-align: middle;
}

[data-theme="dark"] .game-pill-badge {
  background: rgba(246, 226, 122, 0.12);
  color: #f6e27a;
  border-color: rgba(246, 226, 122, 0.25);
}

/* Настройки (legacy fallback) */

.ui-switch {
  /* switch */
  --switch-bg: rgb(135, 150, 165);
  --switch-width: 48px;
  --switch-height: 20px;
  /* circle */
  --circle-diameter: 32px;
  --circle-bg: rgb(0, 56, 146);
  --circle-inset: calc((var(--circle-diameter) - var(--switch-height)) / 2);
  display: inline-block;
}

.ui-switch input {
  display: none;
}

.ui-switch .slider {
  display: block;
  width: var(--switch-width);
  height: var(--switch-height);
  background: var(--switch-bg);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}

.ui-switch .slider .circle {
  top: calc(var(--circle-inset) * -1);
  left: 0;
  width: var(--circle-diameter);
  height: var(--circle-diameter);
  position: absolute;
  background: var(--circle-bg);
  border-radius: 999px;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHdpZHRoPSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj4KICAgIDxwYXRoIGZpbGw9IiNmZmYiCiAgICAgICAgZD0iTTkuMzA1IDEuNjY3VjMuNzVoMS4zODlWMS42NjdoLTEuMzl6bS00LjcwNyAxLjk1bC0uOTgyLjk4Mkw1LjA5IDYuMDcybC45ODItLjk4Mi0xLjQ3My0xLjQ3M3ptMTAuODAyIDBMMTMuOTI3IDUuMDlsLjk4Mi45ODIgMS40NzMtMS40NzMtLjk4Mi0uOTgyek0xMCA1LjEzOWE0Ljg3MiA0Ljg3MiAwIDAwLTQuODYyIDQuODZBNC44NzIgNC44NzIgMCAwMDEwIDE0Ljg2MiA0Ljg3MiA0Ljg3MiAwIDAwMTQuODYgMTAgNC44NzIgNC44NzIgMCAwMDEwIDUuMTM5em0wIDEuMzg5QTMuNDYyIDMuNDYyIDAgMDExMy40NzEgMTBhMy40NjIgMy40NjIgMCAwMS0zLjQ3MyAzLjQ3MkEzLjQ2MiAzLjQ2MiAwIDAxNi41MjcgMTAgMy40NjIgMy40NjIgMCAwMTEwIDYuNTI4ek0xLjY2NSA5LjMwNXYxLjM5aDIuMDgzdi0xLjM5SDEuNjY2em0xNC41ODMgMHYxLjM5aDIuMDg0di0xLjM5aC0yLjA4NHpNNS4wOSAxMy45MjhMMy42MTYgMTUuNGwuOTgyLjk4MiAxLjQ3My0xLjQ3My0uOTgyLS45ODJ6bTkuODIgMGwtLjk4Mi45ODIgMS40NzMgMS40NzMuOTgyLS45ODItMS40NzMtMS40NzN6TTkuMzA1IDE2LjI1djIuMDgzaDEuMzg5VjE2LjI1aC0xLjM5eiIgLz4KPC9zdmc+");
  background-repeat: no-repeat;
  background-position: center center;
  transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);
}

.ui-switch .slider .circle::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.75);
  border-radius: inherit;
  transition: all 500ms;
  opacity: 0;
}

.ui-switch input:checked + .slider .circle {
  left: calc(100% - var(--circle-diameter));
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHdpZHRoPSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj4KICAgIDxwYXRoIGZpbGw9IiNmZmYiCiAgICAgICAgZD0iTTQuMiAyLjVsLS43IDEuOC0xLjguNyAxLjguNy43IDEuOC42LTEuOEw2LjcgNWwtMS45LS43LS42LTEuOHptMTUgOC4zYTYuNyA2LjcgMCAxMS02LjYtNi42IDUuOCA1LjggMCAwMDYuNiA2LjZ6IiAvPgo8L3N2Zz4=");
}

.ui-switch input:active + .slider .circle::before {
  transition: 0s;
  opacity: 1;
  width: 0;
  height: 0;
}

/* сброс глобальных правил settings-list внутри свитча */
.settings-list .ui-switch span,
.grouped-settings-list .ui-switch span {
  width: auto;
  height: auto;
  margin: 0;
}

.settings-list .ui-switch .slider,
.grouped-settings-list .ui-switch .slider {
  width: 48px;
  height: 20px;
}

.settings-list .ui-switch .circle,
.grouped-settings-list .ui-switch .circle {
  width: 32px;
  height: 32px;
}

.switch {
  position: relative;
  display: inline-block;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch i {
  display: block;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--border-color);
  transition: background 0.2s;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.switch input:checked + i {
  background: var(--accent);
}

.switch input:checked + i::after {
  transform: translateX(18px);
}

/* Тёмная тема */
:root {
  --bg-input: #ffffff;
}

[data-theme="dark"] {
  --bg-main: #121110;
  --bg-card: #1c1a18;
  --bg-elevated: #232120;
  --text-main: #f4efe7;
  --text-muted: #a79e92;
  --primary: #f4efe7;
  --primary-hover: #ffffff;
  --primary-soft: rgba(244, 239, 231, 0.1);
  --border-color: #2e2b28;
  --border-light: rgba(255, 255, 255, 0.08);
  --bg-input: #181614;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.45);
  --accent: #e88a4e;
  --accent-action: #e88a4e;
  --accent-action-hover: #f09d63;
  --accent-hover: #f09d63;
  --accent-soft: rgba(232, 138, 78, 0.16);
  --accent-border: rgba(232, 138, 78, 0.3);
}

[data-theme="dark"] .btn.primary {
  color: #fff;
}

/* Кнопка старта игры — жёлтая пилюля с анимацией */
.game-start {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 10px;
  margin: 4px 0 12px;
  color: #fff;
  text-shadow: 2px 2px rgb(116, 116, 116);
  text-transform: uppercase;
  cursor: pointer;
  border: solid 2px #000;
  letter-spacing: 1px;
  font-weight: 600;
  font-size: 17px;
  font-family: inherit;
  background-color: hsl(49deg 98% 60%);
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
  -webkit-tap-highlight-color: transparent;
}

.game-start:active {
  transform: scale(0.9);
  transition: all 100ms ease;
}

.game-start svg {
  width: 20px;
  height: 20px;
  flex: none;
  transition: all 0.5s ease;
  z-index: 2;
}

.game-start .play {
  transition: all 0.5s ease;
  transition-delay: 300ms;
}

.game-start:hover svg {
  transform: scale(3) translate(50%);
}

.game-start .now {
  position: absolute;
  left: 14px;
  transform: translateX(-150%);
  opacity: 0;
  transition: all 0.5s ease;
  z-index: 2;
}

.game-start:hover .now {
  transform: translateX(0);
  opacity: 1;
  transition-delay: 300ms;
}

.game-start:hover .play {
  transform: translateX(200%);
  transition-delay: 300ms;
}

/* Магазин: фото-карточки товаров */
.product-card--photo {
  cursor: pointer;
}
.product-photo {
  position: relative;
  background: var(--bg-card, #ffffff);
  border-radius: 16px 16px 0 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .product-photo {
  background: #1a222d;
}
.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Описание товара скрыто на карточке меню — открывается только по клику на товар */
.product-card .product-body > p {
  display: none !important;
}
.photo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(224, 102, 42, 0.3);
}

.price-col {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-col s {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* Шторка товара */
/* Фото товара во всю ширину шторки: обёртка выносит его за боковые поля,
   ручка шторки лежит поверх фото. */
.product-hero-wrap {
  position: relative;
  margin: -12px -16px 14px;
}

.product-hero-wrap .sheet-handle {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  margin: 0;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .product-hero-wrap .sheet-handle {
  background: rgba(255, 255, 255, 0.24);
}

.product-hero {
  position: relative;
  background: #f4f3ef;
  border-radius: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin: 0;
}
.product-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.product-hero .photo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(224, 102, 42, 0.3);
}
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.product-price-row strong {
  font-size: 24px;
  font-weight: 800;
}
.product-price-row s {
  color: var(--text-muted);
  font-size: 15px;
}
.product-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 10px 0 16px;
}
.product-buy {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.card-qty--lg {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 4px;
}
.card-qty--lg button {
  width: 40px;
  height: 46px;
  border: none;
  background: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, inherit);
  cursor: pointer;
}
.card-qty--lg b {
  min-width: 24px;
  text-align: center;
  font-size: 16px;
}
.product-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(224, 102, 42, 0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}
.product-cta svg {
  width: 18px;
  height: 18px;
}
.product-cta b {
  margin-left: 4px;
}
.product-cta:active {
  transform: scale(0.97);
}
.product-cta span {
  white-space: nowrap;
}
.product-cta b {
  white-space: nowrap;
}

/* Переключатель «Порция / На вес» */
.sale-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  margin: 0 0 12px;
}

.sale-mode-btn {
  min-height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sale-mode-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Пикер веса: шаг ±50 г и быстрые пресеты */
.weight-picker {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.weight-picker-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.weight-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.weight-step {
  min-width: 64px;
  min-height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-main);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.weight-step:active {
  transform: scale(0.96);
}

.weight-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.weight-quick {
  display: flex;
  gap: 8px;
}

.weight-quick-btn {
  flex: 1;
  min-height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.weight-quick-btn:active {
  border-color: var(--accent);
  color: var(--accent);
}

/* Подпись «цена / кг» */
.per-kg {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.product-price-row .per-kg {
  display: inline-block;
  margin-left: 8px;
}

/* Заглушка вместо фото: позиция без картинки открывается так же */
.product-hero--placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--text-muted);
}

.product-hero--placeholder svg {
  width: 56px;
  height: 56px;
}

/* Весовая строка корзины */
.cart-weight-total {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  align-self: center;
}

.cart-weight-remove {
  width: 30px;
  height: 30px;
  flex: none;
  align-self: center;
  border: none;
  border-radius: 50%;
  background: var(--surface-2, var(--primary-soft));
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.cart-weight-remove:active {
  transform: scale(0.92);
}

/* Шапка: вход/приветствие + логотип/аватар */
.header-login {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 15px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(224, 102, 42, 0.2);
}
.header-login:active {
  transform: scale(0.96);
}
.header-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.header-identity small {
  font-size: 12px;
  color: var(--text-muted);
}
.header-identity b {
  font-size: 16px;
  font-weight: 800;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-avatar {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(224, 102, 42, 0.25);
}
.header-logo {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  padding: 0;
  background: none;
  cursor: pointer;
  flex: none;
  overflow: hidden;
}
.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Профиль: строка входа для гостя */

/* ─── Промо-баннер карты лояльности (до регистрации) ───────────────────── */
/* ─── From Uiverse.io by Praashoo7 (adapted for Muhsina VIP Loyalty Card) ─── */
/* ─── Ultra-Premium Mobile-First Luxury VIP Card ─────────────────────── */
.card-persp-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 6px;
  perspective: 1200px;
  width: 100%;
}

.luxury-card {
  position: relative;
  width: 100%;
  max-width: 326px;
  aspect-ratio: 1.586;
  perspective: 1000px;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.luxury-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.25, 1);
}

/* Автоматическое вращение на телефонах (демонстрация обеих сторон) */
@keyframes mobileCardShowcase {
  0%, 40% {
    transform: rotateY(0deg) rotateX(1deg);
  }
  48%, 88% {
    transform: rotateY(180deg) rotateX(1deg);
  }
  96%, 100% {
    transform: rotateY(360deg) rotateX(1deg);
  }
}

.luxury-card.auto-rotating .luxury-card-inner {
  animation: mobileCardShowcase 9.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Остановка авто-вращения при ручном тапе по карте */
.luxury-card.manual-flip .luxury-card-inner {
  animation: none !important;
}

.luxury-card.manual-flip.is-flipped .luxury-card-inner {
  transform: rotateY(180deg) !important;
}

.luxury-card.manual-flip:not(.is-flipped) .luxury-card-inner {
  transform: rotateY(0deg) !important;
}

.luxury-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Лицевая сторона: матовый обсидиан с золотым тиснением */
.luxury-card-front {
  background: radial-gradient(circle at 85% 15%, #2a2c35 0%, #17181c 45%, #0e0f12 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 14px 34px -8px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 18px;
  color: #fff;
}

/* Оборотная сторона: бархатная магнитная полоса + QR-код */
.luxury-card-back {
  background: radial-gradient(circle at 20% 85%, #22242c 0%, #121317 55%, #090a0c 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 14px 34px -8px rgba(0, 0, 0, 0.6);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 12px;
  color: #fff;
}

/* Мягкий металлический блик */
@keyframes metallicSheen {
  0% { transform: translateX(-150%) rotate(25deg); }
  35%, 100% { transform: translateX(250%) rotate(25deg); }
}

.card-metallic-glare {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(252, 232, 129, 0.16) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 100%
  );
  animation: metallicSheen 6.5s ease-in-out infinite;
  pointer-events: none;
}

/* Верхняя строка карты */
.card-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 1;
}

.card-brand-group {
  display: flex;
  flex-direction: column;
}

.card-brand-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.card-brand-sub {
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 1px;
}

.card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
}

.card-status-badge svg {
  width: 12px;
  height: 12px;
}

/* Чип EMV и антенна NFC */
.card-chip-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: -4px;
  z-index: 1;
}

.card-emv-chip {
  position: relative;
  width: 40px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fce881 0%, #d4a017 60%, #996515 100%);
  border: 1px solid #78350f;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 5px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.chip-line {
  position: absolute;
  background: rgba(120, 53, 15, 0.65);
}

.chip-line-h {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}

.chip-line-v {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.chip-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #b45309;
  opacity: 0.4;
}

.card-nfc-icon {
  display: flex;
  color: rgba(255, 255, 255, 0.55);
}

.card-nfc-icon svg {
  width: 18px;
  height: 18px;
}

/* Номер карты */
.card-number-row {
  margin-top: 2px;
  z-index: 1;
}

.card-pan {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #f9fafb;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Нижняя строка: владелец и кешбэк */
.card-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  z-index: 1;
}

.card-meta-label {
  display: block;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 2px;
}

.card-holder-val {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #e5e7eb;
  max-width: 165px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-reward-col {
  text-align: right;
}

.card-reward-val {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* ─── Оборотная сторона карты ────────────────────────────────────────── */
.mag-stripe-bar {
  width: 100%;
  height: 38px;
  background: #000000;
  border-top: 1px solid #1f2024;
  border-bottom: 1px solid #1f2024;
  margin-top: 14px;
}

.mag-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-top: 6px;
}

.mag-signature-strip {
  height: 24px;
  flex: 1;
  margin-right: 10px;
  background: #f3f4f6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.mag-sig-label {
  font-size: 7px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.5px;
}

.mag-sig-val {
  font-family: monospace;
  font-size: 10px;
  font-weight: 700;
  color: #111827;
}

.mag-security-box {
  background: #e5e7eb;
  padding: 3px 8px;
  border-radius: 4px;
}

.mag-cvv {
  font-size: 9px;
  font-weight: 800;
  color: #111827;
}

.mag-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 0 6px;
}

.mag-qr-box canvas {
  display: block;
  width: 68px !important;
  height: 68px !important;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.preview-qr-badge {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.preview-qr-icon svg {
  width: 44px;
  height: 44px;
  color: #111827;
}

.mag-qr-caption {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.4px;
}

/* Подсказка снизу карты */
.card-auto-caption {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #9ca3af);
  margin-top: 10px;
}

.card-auto-caption svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* ─── Анимация раскрытия карты после регистрации ──────────────────────── */
@keyframes cardUnlockReveal {
  0% {
    opacity: 0;
    transform: perspective(1200px) rotateX(25deg) translateY(45px) scale(0.88);
    filter: brightness(1);
  }
  60% {
    opacity: 1;
    transform: perspective(1200px) rotateX(-6deg) translateY(-8px) scale(1.03);
    filter: brightness(1);
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg) translateY(0) scale(1);
    filter: brightness(1);
  }
}

/* Glow-эффект активации карты убран по стандарту Anti-Slop:
   карточка подсвечивается обычной рамкой через .card-unlocked-banner */

/* Баннер праздничной активации */

@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Тизер карты на главной */

/* Delivery and Dine-in badges on product cards */

/* Wide dish delivery badge mini */

/* Product sheet delivery pill */
.delivery-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin: 6px 0 10px;
}
.delivery-pill svg {
  width: 16px;
  height: 16px;
}
.delivery-pill--yes {
  background: #ecfdf5;
  color: var(--ok);
  border: 1px solid #a7f3d0;
}
.delivery-pill--no {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
[data-theme="dark"] .delivery-pill--yes {
  background: var(--ok-soft);
  color: var(--ok-bright);
  border-color: var(--ok-border);
}
[data-theme="dark"] .delivery-pill--no {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

/* Cart tags and notices */
.cart-tag-dinein {
  font-size: 10px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
.cart-tag-delivery {
  font-size: 10px;
  font-weight: 600;
  color: var(--ok);
  background: #d1fae5;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
[data-theme="dark"] .cart-tag-dinein {
  background: var(--accent-soft);
  color: var(--accent);
}
[data-theme="dark"] .cart-tag-delivery {
  background: rgba(47, 158, 120, 0.18);
  color: var(--ok-bright);
}

.cart-delivery-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  line-height: 1.4;
}
.cart-delivery-warning svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.cart-delivery-info {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  line-height: 1.4;
}
.cart-delivery-info svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
[data-theme="dark"] .cart-delivery-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.25);
}
[data-theme="dark"] .cart-delivery-info {
  background: var(--ok-soft);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.25);
}

/* ─── Оформление заказа и доставка (Checkout & Delivery) ─── */
.checkout-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-card, #f3f4f6);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border-color, #e5e7eb);
}
.checkout-seg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 8px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.checkout-seg-btn.active {
  background: var(--bg-main, #ffffff);
  color: var(--text-main, #111827);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}
[data-theme="dark"] .checkout-segmented {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .checkout-seg-btn {
  color: #94a3b8;
}
[data-theme="dark"] .checkout-seg-btn.active {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.checkout-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #4b5563);
}
[data-theme="dark"] .checkout-field label {
  color: #94a3b8;
}
.checkout-input, .checkout-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  font-size: 16px; /* 16px — iOS не зумит поле при фокусе */
  background: var(--bg-main, #ffffff);
  color: var(--text-main, #111827);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}
.checkout-textarea {
  min-height: 54px;
  resize: vertical;
}
.checkout-input:focus, .checkout-textarea:focus {
  border-color: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}
[data-theme="dark"] .checkout-input, .dark .checkout-textarea {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.checkout-payment-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.checkout-pay-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color, #e5e7eb);
  background: var(--bg-card, #f9fafb);
  color: var(--text-muted, #4b5563);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}
.checkout-pay-btn.active {
  border-color: var(--ok);
  background: rgba(47, 158, 120, 0.08);
  color: var(--ok);
  font-weight: 700;
}
.checkout-pay-ico {
  display: inline-flex;
  color: inherit;
}
.checkout-pay-ico svg {
  width: 20px;
  height: 20px;
}
[data-theme="dark"] .checkout-pay-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}
[data-theme="dark"] .checkout-pay-btn.active {
  border-color: var(--ok-bright);
  background: var(--ok-soft);
  color: var(--ok-bright);
}

.checkout-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-card, #f3f4f6);
  margin: 12px 0;
  font-size: 14px;
  font-weight: 600;
}
[data-theme="dark"] .checkout-summary-bar {
  background: rgba(255, 255, 255, 0.05);
}

.checkout-submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ok) 0%, var(--ok) 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--ok-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
}
.checkout-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}
.checkout-submit-btn:active {
  transform: scale(0.98);
}
.checkout-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Экран подтверждения заказа и QR MBank */
.order-success-card {
  text-align: center;
  padding: 8px 4px;
}
.order-success-icon.pending {
  background: var(--accent-soft);
  color: var(--accent);
  animation: pulseIcon 2s infinite ease-in-out;
}
.order-success-icon.success {
  background: var(--ok-soft);
  color: var(--ok);
}
@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.guest-delivery-track {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  text-align: left;
}

.guest-delivery-track h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.guest-delivery-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.guest-track-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  color: var(--text-muted);
  font-size: 13px;
}

.guest-track-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 40px;
  bottom: -14px;
  width: 2px;
  background: var(--border-color);
}

.guest-track-step i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-card);
  color: white;
}

.guest-track-step i svg { width: 16px; height: 16px; }
.guest-track-step.done i { border-color: var(--ok); background: var(--ok); }
.guest-track-step.done::after { background: var(--ok); }
.guest-track-step.now i { border-color: var(--accent); background: var(--accent-soft); }
.guest-track-step.now { color: var(--text-main); font-weight: 700; }

.guest-delivery-track p:not(:empty) {
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text-main);
  font-size: 12px;
}

.guest-tracking-refresh { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; font-size: 11px; color: var(--text-muted); }
.guest-tracking-refresh .btn { flex: none; font-size: 12px; padding: 8px 12px; }
.order-success-card > .btn { width: 100%; }
.guest-delivery-address { overflow-wrap: anywhere; }

.mbank-qr-container {
  display: inline-block;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  margin: 12px 0;
}
.mbank-qr-container canvas {
  display: block;
  border-radius: 8px;
}
.mbank-btn-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: #22c55e;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
  margin-top: 10px;
  transition: transform 0.15s ease;
}
.mbank-btn-open:active {
  transform: scale(0.97);
}

/* ─── История: чеки + бонусы ─────────────────────────────── */

.history-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.history-chips::-webkit-scrollbar { display: none; }
.history-chip {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.history-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}

.history-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.history-summary > div {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.history-summary small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 2px;
}
.history-summary b {
  font-size: 16px;
  font-weight: 600;
}
.history-summary b.in { color: var(--ok); }
.history-summary b.out { color: var(--text-main); }
[data-theme="dark"] .history-summary b.in { color: var(--ok-bright); }

.history-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.history-search svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  flex: none;
}
.history-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}
.history-search input::placeholder { color: var(--text-muted); }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.history-group { display: flex; flex-direction: column; gap: 8px; }
.history-day {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 2px;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-align: left;
}
.history-ic {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.history-ic svg { width: 18px; height: 18px; }
.history-ic--in {
  background: var(--ok-soft);
  color: var(--ok);
}
.history-ic--out {
  background: var(--primary-soft);
  color: var(--primary);
}
[data-theme="dark"] .history-ic--in { color: var(--ok-bright); }
.history-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.history-copy b {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-copy small {
  color: var(--text-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-amount {
  flex: none;
  font-size: 14px;
  font-weight: 600;
}
.history-amount.in { color: var(--ok); }
.history-amount.out { color: var(--text-main); }
[data-theme="dark"] .history-amount.in { color: var(--ok-bright); }

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 16px;
  text-align: center;
}
.history-empty-ic svg {
  width: 32px;
  height: 32px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
}
.history-empty b { font-size: 15px; }
.history-empty small { color: var(--text-muted); font-size: 13px; }

.receipt-detail { display: flex; flex-direction: column; gap: 8px; }
.receipt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 4px 0;
}
.receipt-line span {
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.receipt-line b { flex: none; font-weight: 600; }
.receipt-line--bonus span { color: var(--text-muted); }
.receipt-line--bonus b.in { color: var(--ok); }
[data-theme="dark"] .receipt-line--bonus b.in { color: var(--ok-bright); }
.receipt-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--border-color);
  font-size: 15px;
  font-weight: 600;
}

/* Фискальный чек ККМ в деталях заказа гостя */
.receipt-fiscal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-color-soft, rgba(0,0,0,0.03));
}
.receipt-fiscal-qr { flex-shrink: 0; line-height: 0; border-radius: 8px; overflow: hidden; }
.receipt-fiscal-info { display: flex; flex-direction: column; gap: 3px; }
.receipt-fiscal-info b { font-size: 14px; }
.receipt-fiscal-info small { font-size: 12px; color: var(--text-muted, #777); line-height: 1.35; }

/* ─── Accessibility: гасим ВСЕ бесконечные анимации при reduced-motion ─── */
@media (prefers-reduced-motion: reduce) {
  .auth-frame::before,
  .card-metallic-glare,
  .card-shine,
  .load-bar,
  .luxury-card.auto-rotating .luxury-card-inner,
  .member-card,
  .ptr-spinner,
  .spinner {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Бронь: новый флоу «место → дата → время» ────────────────────────── */
.booking-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(158deg, #0C1C2E 0%, #0A2540 52%, #14364F 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(10, 37, 64, 0.22);
}
.booking-pick-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.05;
}

/* duplicate booking-card removed */
.booking-card + .booking-card { margin-top: 10px; }
.booking-card-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(10, 37, 64, 0.06);
  color: var(--fg, #0A2540);
}
.booking-card-ic svg { width: 20px; height: 20px; }
.booking-cal-chev.open svg { transform: rotate(180deg); }

/* Лента дат: 7 чисел видно, остальные скроллом */
.booking-date-strip {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-bottom: 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.booking-date-strip::-webkit-scrollbar { display: none; }
.booking-date-chip.active {
  background: linear-gradient(158deg, #0C1C2E 0%, #0A2540 100%);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.72);
}
.booking-date-chip.active .booking-date-day { color: #fff; }

/* Календарь-месяц */
.booking-cal {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-2, #F5F7FA);
}
.booking-cal-cell.empty { visibility: hidden; }
.booking-cal-cell:not(.off):not(.empty):active { background: rgba(10, 37, 64, 0.08); }
.booking-cal-cell.off { color: var(--muted, #6b7c8f); opacity: 0.4; cursor: default; }
.booking-cal-cell.active { background: #1e7a58; color: #fff; }

/* Слоты времени */
.booking-time-chip.busy {
  color: var(--muted, #6b7c8f);
  text-decoration: line-through;
  opacity: 0.5;
  cursor: not-allowed;
}
.booking-time-chip.active {
  background: linear-gradient(158deg, #0C1C2E 0%, #0A2540 100%);
  border-color: transparent;
  color: #fff;
}
.booking-time-empty {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--error, #b3261e);
}

.booking-auth-note {
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(180, 83, 9, 0.09);
  color: #92400e;
  font-size: 12.5px;
  line-height: 1.4;
}
.booking-login-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--border, rgba(10, 37, 64, 0.14));
  border-radius: 14px;
  background: transparent;
  color: var(--fg, #0A2540);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

[data-theme="dark"] .booking-date-chip.active { background: linear-gradient(158deg, #E7C77A 0%, #C9A45A 100%); color: rgba(10, 37, 64, 0.7); }
[data-theme="dark"] .booking-date-chip.active .booking-date-day,
[data-theme="dark"] .booking-cal-cell.active { color: #0A2540; }
[data-theme="dark"] .booking-cal-cell.active { background: #E7C77A; }
[data-theme="dark"] .booking-date-chip,
[data-theme="dark"] .booking-cal { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .booking-cal-nav,
[data-theme="dark"] .booking-cal-title,
[data-theme="dark"] .booking-card-value,
[data-theme="dark"] .booking-date-day,
[data-theme="dark"] .booking-time-chip,
[data-theme="dark"] .booking-time-chip.active { background: linear-gradient(158deg, #E7C77A 0%, #C9A45A 100%); color: #0A2540; }

/* ─── Форма брони по макету booking-form_1 (гость) ─────────────────────── */
.bkf-venue {
  padding: 16px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #061424 0%, #0a2540 55%, #123a5c 100%);
  box-shadow: var(--shadow-soft);
}
.bkf-venue-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e7c77a;
}
.bkf-venue h2 {
  margin: 4px 0 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}
.bkf-venue-tags {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}
.bkf-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}
.bkf-card + .bkf-card,
.bkf-card + .bkf-select,
.bkf-select + .bkf-card { margin-top: 10px; }
.bkf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bkf-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bkf-lead svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bkf-lead small { display: block; font-size: 12px; color: var(--muted, #6c757d); }
.bkf-lead b { display: block; font-size: 16px; font-weight: 600; }

.bkf-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 40px; padding: 0 12px;
  border: 1px solid var(--border, #e0e0e0); border-radius: 999px;
  background: var(--surface, #fff); color: inherit;
}
.bkf-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bkf-toggle .chev { transition: transform 0.2s; }
.bkf-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.bkf-strip {
  display: flex; gap: 8px; margin: 12px -14px 0; padding: 2px 14px 6px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
}
.bkf-strip::-webkit-scrollbar { display: none; }
.bkf-day {
  flex: 0 0 auto; width: 54px; min-height: 62px; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; border-radius: 14px;
  background: var(--surface-2, #f1f3f5); color: inherit;
}
.bkf-day small { font-size: 12px; color: var(--muted, #6c757d); text-transform: capitalize; }
.bkf-day b { font-size: 17px; font-weight: 700; }
.bkf-day[aria-pressed="true"] { background: #0a2540; color: #fff; box-shadow: 0 6px 14px rgba(10, 37, 64, 0.28); }
.bkf-day[aria-pressed="true"] small { color: rgba(255, 255, 255, 0.8); }

.bkf-cal { margin-top: 12px; padding: 12px 8px 8px; border-radius: 14px; background: var(--surface-2, #f1f3f5); }
.bkf-cal-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin-bottom: 8px; }
.bkf-cal-head b { text-align: center; font-size: 15px; }
.bkf-cal-nav { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; }
.bkf-cal-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bkf-cal-nav:disabled { opacity: 0.3; cursor: default; }
.bkf-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
.bkf-cal-dow { font-size: 11px; color: var(--muted, #6c757d); padding: 4px 0; }
.bkf-cal-cell {
  height: 38px; border: 0; border-radius: 50%;
  background: transparent; color: inherit; font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  justify-self: center; width: 38px;
}
.bkf-cal-cell.today { border: 1px solid var(--accent, #c49a6c); }
.bkf-cal-cell:disabled { color: var(--muted, #6c757d); opacity: 0.35; cursor: default; }
.bkf-cal-cell[aria-pressed="true"] { background: #0a2540; color: #fff; }

.bkf-select { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.bkf-select > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.bkf-select .chev { width: 16px; height: 16px; }
.bkf-lead-text { flex: 1; min-width: 0; display: block; }
.bkf-lead-text small { display: block; font-size: 12px; color: var(--muted, #6c757d); }
.bkf-lead-text select {
  width: 100%; border: 0; background: transparent; color: inherit;
  font-size: 16px; font-weight: 600; padding: 2px 0; outline: none;
  appearance: none; -webkit-appearance: none;
}

.bkf-stepper { display: flex; align-items: center; gap: 10px; }
.bkf-stepper button {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--surface-2, #f1f3f5); color: inherit;
  display: grid; place-items: center;
}
.bkf-stepper button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.bkf-stepper button.plus { background: var(--accent-action, #8a6a43); color: #fff; }
.bkf-stepper output { font-size: 17px; font-weight: 700; min-width: 22px; text-align: center; }

.bkf-field { display: block; margin-top: 10px; }
.bkf-field span { display: block; font-size: 12px; color: var(--muted, #6c757d); margin-bottom: 6px; }
.bkf-field textarea,
.bkf-field input {
  width: 100%; border: 0; border-radius: 14px;
  background: var(--surface, #fff); color: inherit;
  font: inherit; padding: 12px 14px; outline: none;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border, #e0e0e0);
}
.bkf-field textarea:focus,
.bkf-field input:focus { border-color: var(--accent, #c49a6c); }
.bkf-field textarea { resize: none; }
.bkf-count { display: block; font-size: 11px; color: var(--muted, #6c757d); text-align: right; margin-top: 4px; font-style: normal; }

[data-theme="dark"] .bkf-day { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .bkf-day[aria-pressed="true"] { background: var(--accent, #c49a6c); }
[data-theme="dark"] .bkf-day[aria-pressed="true"] small { color: rgba(10, 37, 64, 0.8); }
[data-theme="dark"] .bkf-day[aria-pressed="true"] b { color: #0a2540; }
[data-theme="dark"] .bkf-cal { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .bkf-cal-cell[aria-pressed="true"] { background: var(--accent, #c49a6c); color: #0a2540; }
[data-theme="dark"] .bkf-toggle { background: transparent; }
[data-theme="dark"] .bkf-stepper button { background: rgba(255, 255, 255, 0.08); }

@media (prefers-reduced-motion: reduce) {
  .bkf-toggle .chev { transition: none; }
}
