/* ============================================================
   Фирменный стиль мобильного веб-приложения «БИГ»
   Палитра взята с баннеров: тёплая бумага, чёрная тушь, красный акцент
   ============================================================ */
:root {
  --bg-page: #ebe4d5;
  --bg-app: #f6f2e9;
  --bg-card: #fffdf8;
  --bg-soft: #eee8da;
  --ink: #141414;
  --ink-muted: #58534a;
  --ink-light: #7c7569;
  --red: #b31d1b;
  --red-dark: #8f1412;
  --red-soft: #fceded;
  --green: #1d6b41;
  --green-soft: #e6f4ec;
  --amber: #9b5c00;
  --amber-soft: #fdf2dd;
  --blue: #1858a8;
  --blue-soft: #e8f1fc;
  --border: #d9d0be;
  --border-dark: #1c1b18;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 10px;
  --shadow-card: 0 2px 10px rgba(20, 20, 20, 0.06);
  --shadow-btn: 0 4px 14px rgba(179, 29, 27, 0.24);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Центрированный мобильный контейнер (на телефоне — на весь экран) */
.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 36px rgba(20, 20, 20, 0.12);
}

@media (max-width: 480px) {
  body {
    background: var(--bg-app);
  }
  .app-shell {
    box-shadow: none;
  }
}

/* ============================================================
   ШАПКА
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 242, 233, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-align: left;
}

.brand-pill {
  background: var(--ink);
  color: var(--bg-app);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.08em;
  padding: 5px 13px;
  border-radius: 999px;
  line-height: 1;
}

.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.status-dot.off {
  background: var(--amber);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1.5px solid var(--border-dark);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.icon-pill-btn:active {
  transform: scale(0.97);
}

/* ============================================================
   ОСНОВНОЕ СОДЕРЖИМОЕ И ЭКРАНЫ
   ============================================================ */
.app-main {
  flex: 1;
  padding: 12px 14px calc(86px + env(safe-area-inset-bottom, 0px));
}

.view {
  display: none;
  animation: fadeUp 0.18s ease-out;
}

.view.active {
  display: block;
}

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

/* Баннеры */
.banner-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-dark);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}

.banner-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Карточки */
.card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.card-ink {
  border: 2px solid var(--border-dark);
}

.card-promo {
  background: linear-gradient(145deg, #fffdf8 0%, #fceeed 100%);
  border: 2px solid var(--red);
  position: relative;
  overflow: hidden;
}

.card-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card-subtitle {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-muted);
}

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

.section-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

/* Штамп подарка */
.gift-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.gift-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red-soft);
  border: 1.5px dashed var(--red);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--red-dark);
}

/* Главные плитки действий */
.action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.action-tile {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 3px 0 var(--border-dark);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.action-tile:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--border-dark);
}

.action-tile.primary-tile {
  background: var(--ink);
  color: var(--bg-app);
  border-color: var(--ink);
  box-shadow: 0 3px 0 var(--red);
}

.action-tile.primary-tile .tile-desc {
  color: #d6cfc2;
}

.tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.action-tile.primary-tile .tile-icon {
  background: var(--red);
}

.tile-body {
  flex: 1;
  min-width: 0;
}

.tile-title {
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 2px;
}

.tile-desc {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.3;
}

.tile-arrow {
  font-size: 18px;
  font-weight: 700;
  opacity: 0.55;
  flex-shrink: 0;
}

/* Мини-шаги (как работает бронь на 24ч) */
.steps-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 12px 0 14px;
}

.step-mini {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 7px;
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg-app);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.step-text {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, opacity 0.15s ease, background 0.15s ease;
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-dark {
  background: var(--ink);
  color: var(--bg-app);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--ink);
  border-color: var(--border-dark);
}

.btn-soft {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--border);
}

.btn-sm {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-row > .btn {
  flex: 1;
}

/* ============================================================
   ФОРМЫ, ЧИПСЫ И ВЫБОР КАНАЛА СВЯЗИ
   ============================================================ */
.field {
  margin-bottom: 13px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

.field-hint {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 5px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--red);
  text-decoration: underline;
  cursor: pointer;
}

.input,
.textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px; /* >= 16px, чтобы Safari на iPhone не масштабировал экран */
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #c7bea9;
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.08);
}

.textarea {
  min-height: 88px;
  resize: vertical;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

/* Чипсы-подсказки и выбор машины */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}

.chip.active {
  background: var(--ink);
  color: var(--bg-app);
  border-color: var(--ink);
}

.chip-red.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Карточки выбора (состав ТО / бюджет) */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.option-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: #fff;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
}

.option-card.active {
  border-color: var(--red);
  background: var(--red-soft);
  box-shadow: 0 0 0 1px var(--red);
}

.option-title {
  font-size: 14.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.option-desc {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.badge-hit {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  padding: 2px 6px;
  border-radius: 5px;
}

.budget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.budget-btn {
  padding: 11px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.budget-btn.active {
  background: var(--ink);
  color: var(--bg-app);
  border-color: var(--ink);
}

/* Загрузка фото (СТС / канистра) */
.photo-drop {
  border: 1.5px dashed #9d937e;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.photo-drop:active {
  background: #e5decb;
}

.photo-drop input[type="file"] {
  display: none;
}

.photo-preview-box {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--green);
  background: var(--green-soft);
  margin-top: 8px;
}

.photo-preview-box img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.photo-preview-info {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}

.photo-remove-btn {
  background: #fff;
  border: 1px solid #c6d8cd;
  color: var(--red);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* Блок контактов и выбора мессенджера (MAX / Telegram / ВК / Позвонить) */
.contact-box {
  background: #faf6ec;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.contact-box-title {
  margin: 0 0 4px;
  font-size: 15.5px;
  font-weight: 800;
}

.contact-box-sub {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.channel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
}

.channel-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 2px 8px rgba(20, 20, 20, 0.18);
}

.channel-btn[data-channel="max"].active {
  background: #4e2a84;
  border-color: #4e2a84;
}

.channel-btn[data-channel="telegram"].active {
  background: #1d74b8;
  border-color: #1d74b8;
}

.channel-btn[data-channel="vk"].active {
  background: #0077ff;
  border-color: #0077ff;
}

.channel-btn[data-channel="call"].active {
  background: var(--green);
  border-color: var(--green);
}

/* ============================================================
   ГАРАЖ И ЗАКАЗЫ
   ============================================================ */
.car-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}

.car-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.car-name {
  font-size: 16px;
  font-weight: 800;
}

.car-vin {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-top: 3px;
  word-break: break-all;
}

.car-delete-btn {
  background: var(--red-soft);
  border: 1px solid #ecc6c5;
  color: var(--red);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.order-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 11px;
  box-shadow: var(--shadow-card);
}

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

.order-num {
  font-size: 14px;
  font-weight: 800;
}

.order-time {
  font-size: 12px;
  color: var(--ink-light);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 9px;
}

.status-new {
  background: var(--amber-soft);
  color: var(--amber);
}
.status-answered {
  background: var(--blue-soft);
  color: var(--blue);
}
.status-in_progress,
.status-ready,
.status-completed {
  background: var(--green-soft);
  color: var(--green);
}
.status-cancelled {
  background: var(--red-soft);
  color: var(--red);
}

.order-desc {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.order-meta {
  font-size: 12.5px;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.offer-reply-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  border-left: 3.5px solid var(--green);
  font-size: 13.5px;
  color: var(--ink);
  white-space: pre-wrap;
}

.thumb-row {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.thumb-btn {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  padding: 0;
  background: #fff;
  cursor: pointer;
}

.thumb-btn img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
}

/* О магазине */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
}

.info-ico {
  font-size: 18px;
  line-height: 1.3;
  flex-shrink: 0;
}

.pwa-banner {
  background: var(--ink);
  color: var(--bg-app);
  border-radius: var(--radius-lg);
  padding: 13px 14px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pwa-banner-text {
  font-size: 13px;
  line-height: 1.35;
}

.pwa-banner-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

/* ============================================================
   НИЖНЯЯ НАВИГАЦИЯ (ПОД БОЛЬШОЙ ПАЛЕЦ)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 40;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1.5px solid var(--border-dark);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 2px;
  border: none;
  background: none;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.nav-badge {
  position: absolute;
  top: 1px;
  right: 14%;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
}

.nav-badge.visible {
  display: inline-flex;
}

/* ============================================================
   МОДАЛКИ И TOAST
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 20, 20, 0.62);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-backdrop.open {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--bg-app);
  border-top: 2px solid var(--border-dark);
  border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  animation: slideSheet 0.2s ease-out;
}

@keyframes slideSheet {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border-dark);
  background: var(--bg-card);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

.sticker-wrap {
  text-align: center;
  padding: 6px 0 10px;
}

.sticker-wrap img {
  width: 155px;
  height: 155px;
  object-fit: contain;
}

.lightbox-img {
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid var(--border-dark);
  display: block;
}

.toast {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 80;
  max-width: 440px;
  width: calc(100% - 28px);
  background: var(--ink);
  color: var(--bg-app);
  padding: 12px 15px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--red);
  color: #fff;
}

.hidden {
  display: none !important;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.muted-note {
  font-size: 12.5px;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 8px;
}

/* ============================================================
   БЛОК РОЗЫГРЫША НА ГЛАВНОЙ И БИЛЕТЫ В «МОИХ ЗАКАЗАХ»
   ============================================================ */
.raffle-card {
  background: linear-gradient(180deg, #fffdf8 0%, #f6efe0 100%);
  border: 2px solid var(--border-dark);
  border-top: 5px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 13px 13px 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.raffle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.raffle-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.raffle-badge {
  flex-shrink: 0;
  background: var(--ink);
  color: var(--bg-app);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 7px;
  white-space: nowrap;
}

.raffle-prizes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 10px;
}

.raffle-prize-mini {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 5px 7px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.raffle-prize-mini img {
  height: 70px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(20, 20, 20, 0.16));
}

.raffle-prize-caption {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.raffle-ladder {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 253, 248, 0.8);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.3;
}

.raffle-ladder-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.raffle-ladder-date {
  font-weight: 800;
  color: var(--red-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

.raffle-ladder-prize {
  color: var(--ink);
  font-weight: 600;
}

.raffle-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.raffle-foot-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.25;
}

.raffle-modal-prizes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.raffle-modal-prize {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  padding: 10px 6px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.raffle-modal-prize img {
  height: 92px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 7px rgba(20, 20, 20, 0.18));
}

.raffle-modal-prize strong {
  font-size: 11.5px;
  line-height: 1.2;
}

.raffle-modal-prize span {
  font-size: 10.5px;
  color: var(--red-dark);
  font-weight: 700;
}

.ticket-banner {
  background: linear-gradient(135deg, #1b1a18 0%, #2d2924 100%);
  color: var(--bg-app);
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 13px 14px;
  margin-bottom: 12px;
}

.ticket-banner-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 7px;
}

.ticket-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 13.5px;
  padding: 5px 10px;
  border-radius: 8px;
  letter-spacing: 0.03em;
}

.order-ticket-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding: 6px 11px;
  border-radius: 9px;
  background: var(--red-soft);
  border: 1.5px dashed var(--red);
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 800;
}
