/* ═══════════════════════════════════════════════════════
   MADISEN — Noir & Champagne  ·  Mini App Theme

   · Editorial and quiet: near-black page, hairline dividers, an open list
     instead of boxed cards. Luxury comes from spacing and type, not effects.
   · Champagne is the only colour — prices, the selected state, the button.
   · Cormorant Garamond for the name and headings, Manrope for the UI.
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;

  --bg: #121110;
  --card: #1a1917;
  --card-2: #211f1c;
  --line: rgba(232, 220, 198, 0.1);
  --line-2: rgba(232, 220, 198, 0.18);

  --ink: #f4eee4;
  --ink-2: rgba(244, 238, 228, 0.82);
  --muted: rgba(244, 238, 228, 0.55);
  --faint: rgba(244, 238, 228, 0.32);

  /* The "green" names come from the shared stylesheet — here they are champagne. */
  --green: #d4b483;
  --green-2: #e3c99c;
  --green-soft: rgba(212, 180, 131, 0.1);
  --green-line: rgba(212, 180, 131, 0.38);
  --on-accent: #17140f;

  --gold: #e8c46a;
  --btc: #f0952a;

  --r: 14px;
  --r-sm: 10px;
  --r-full: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;

  --text-muted: var(--muted);
  --rose-deep: var(--green);

  --tg-vh: 100dvh;
}

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

html, body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--tg-vh);
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body { padding-bottom: env(safe-area-inset-bottom, 20px); }
/* Cormorant defaults to old-style figures (1 reads as I) — prices need lining ones. */
html, body { font-variant-numeric: lining-nums; }
body.no-scroll { overflow: hidden; }
button { font-family: var(--font); }

.app { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; }

.view { display: none; padding: 0 18px 28px; }
#paymentView { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
.view.active { display: block; animation: fadeIn 0.3s ease backwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Language picker ─── */
.lang-selector {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 7px 26px 7px 11px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a39d92' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 11px;
  cursor: pointer;
  outline: none;
}

/* ═══ Masthead ═══ */
.masthead { display: flex; flex-direction: column; align-items: center; padding-bottom: 6px; }
.masthead-bar { align-self: stretch; display: flex; justify-content: flex-end; padding-top: 14px; }

.brand-avatar {
  width: 92px;
  height: 92px;
  margin-top: 2px;
  border-radius: 50%;
  object-fit: cover;
  padding: 3px;
  border: 1px solid var(--green-line);
  background: var(--card);
}

.store-title {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  line-height: 1;
}

.store-presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.presence-dot { width: 6px; height: 6px; border-radius: 50%; background: #5fd696; }

/* ═══ Category tabs: plain text, green underline ═══ */
.category-tabs {
  display: flex;
  margin: 22px 0 4px;
  border-bottom: 1px solid var(--line);
}

.category-tab {
  flex: 1;
  padding: 13px 4px 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.category-tab.active { color: var(--green); border-bottom-color: var(--green); }

/* ═══ Products: one card, plain rows ═══ */
.product-grid { border-bottom: 1px solid var(--line); }

.section-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px 4px; }
.section-header h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.section-line { flex: 1; height: 1px; background: var(--line); }

.product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 2px;
  cursor: pointer;
  animation: fadeIn 0.3s ease both;
  transition: background 0.15s;
}

.product-card + .product-card { border-top: 1px solid var(--line); }
.product-card:active { background: var(--green-soft); }

.row-main { flex: 1; min-width: 0; }

.product-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.product-badge {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid var(--green-line);
  color: var(--green);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-desc {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  flex: none;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  color: var(--green);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

.row-chev { flex: none; width: 16px; height: 16px; color: var(--faint); }

/* Product icons (payment summary, orders) */
.product-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--green-soft);
}

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

/* ═══ Purchases link + footer ═══ */
.orders-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.orders-link-icon { display: grid; place-items: center; color: var(--green); }
.orders-link-icon svg { width: 20px; height: 20px; }
.orders-link-text { flex: 1; min-width: 0; }

#ordersCount {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-full);
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
}

.orders-link-arrow { flex: none; width: 16px; height: 16px; color: var(--faint); }

.store-footer { text-align: center; padding: 24px 0 12px; font-size: 12px; color: var(--muted); }
.store-footer p { display: inline-flex; align-items: center; gap: 6px; line-height: 1.5; }
.store-footer svg { width: 13px; height: 13px; flex: none; }
.safe-bottom { padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 16px); }

/* ═══ Inner views: top bar ═══ */
.view-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 8px; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border: none;
  background: none;
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.back-btn svg { width: 19px; height: 19px; }

/* ═══ Payment ═══ */
.payment-product-summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 6px;
  padding: 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--card);
}

.summary-info { flex: 1; min-width: 0; }
.summary-name { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.15; }
.summary-desc { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.summary-price-row { margin-top: 8px; }
.summary-price { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--green); }

/* Bundle add-on */
.bundle-box { margin-top: 10px; }

.bundle-teaser {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--line-2);
  background: none;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.bundle-teaser b { color: var(--ink); font-weight: 700; }
.bt-plus { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 700; }
.bt-text { flex: 1; min-width: 0; }
.bt-chev { flex: none; width: 15px; height: 15px; color: var(--faint); }

.bundle-box.open { padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.bundle-box.added { border-color: var(--green-line); background: var(--green-soft); }
.bundle-head { margin-bottom: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.bundle-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.bundle-check { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); color: var(--muted); font-weight: 700; }
.bundle-box.added .bundle-check { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.bundle-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bundle-info b { font-size: 14px; }
.bundle-info i { margin-top: 2px; font-style: normal; font-size: 12px; line-height: 1.4; color: var(--muted); }
.bundle-price { display: flex; flex-direction: column; align-items: flex-end; }
.bundle-plus { font-size: 15px; font-weight: 700; white-space: nowrap; }
.bundle-save { font-size: 11px; font-weight: 600; color: var(--green); white-space: nowrap; }
.bundle-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.45; color: var(--muted); }

/* Methods: one card, radio rows */
.payment-view-header { margin: 22px 2px 10px; }
.payment-view-header h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.payment-view-header p { margin-top: 2px; font-size: 13px; color: var(--muted); }

.payment-methods {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.payment-method-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.payment-method-card + .payment-method-card { border-top: 1px solid var(--line); }
.payment-method-card.selected { background: var(--green-soft); }

.method-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: var(--card-2);
  border: 1px solid var(--line);
}

.method-icon svg { width: 20px; height: 20px; }
.method-icon.stars { color: var(--gold); }
.method-icon.crypto { color: var(--btc); font-weight: 700; }
.method-icon.dm { color: var(--green); }

.method-info { flex: 1; min-width: 0; }
.method-name { font-size: 15px; font-weight: 600; }
.method-providers { margin-top: 2px; font-size: 12px; color: var(--muted); }
.method-providers span { white-space: nowrap; }
.method-providers span:not(:last-child)::after { content: " · "; color: var(--faint); }
.method-providers .pv-zelle { color: #b893ff; }
.method-providers .pv-paypal { color: #8fb6ff; }
.method-providers .pv-cashapp { color: #5fd696; }

.method-check {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-2);
  background: var(--card-2);
}

.method-check-inner { width: 10px; height: 10px; border-radius: 50%; background: var(--green); transform: scale(0); transition: transform 0.2s var(--ease); }
.payment-method-card.selected .method-check { border-color: var(--green); }
.payment-method-card.selected .method-check-inner { transform: scale(1); }

/* Checkout */
.checkout-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--card);
}

.payment-price-display { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.price-label { font-size: 14px; font-weight: 600; color: var(--muted); padding-bottom: 3px; }
.price-right { text-align: right; min-width: 0; }
.price-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.price-subtext { margin-top: 2px; font-size: 12px; color: var(--muted); }

.pay-next { display: flex; align-items: flex-start; gap: 8px; padding: 12px 0 14px; color: var(--muted); }
.pay-next svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.pay-next p { font-size: 12.5px; line-height: 1.45; }

.purchase-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: var(--green);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s, opacity 0.2s;
}

.purchase-btn:active { transform: scale(0.985); background: var(--green-2); }
.purchase-btn.loading { pointer-events: none; opacity: 0.8; }
.purchase-btn > span { display: inline-flex; align-items: center; gap: 8px; }
.btn-icon { font-size: 16px; }

.purchase-btn.secondary { margin-top: 8px; background: none; color: var(--green); border: 1.5px solid var(--green-line); }

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(23, 20, 15, 0.3);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  animation: spin 0.6s linear infinite;
}

/* Sticky pay bar */
.sticky-pay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--card);
  border-top: 1px solid var(--line);
  transform: translateY(115%);
  transition: transform 0.28s var(--ease);
  pointer-events: none;
}

.sticky-pay.show { transform: translateY(0); pointer-events: auto; }
.sticky-pay-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sticky-pay-label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sticky-pay-value { font-size: 17px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }

.sticky-pay-btn {
  flex: 1;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  background: var(--green);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══ Invite & Earn (reachable from the bot's link) ═══ */
.earn-hero { margin: 6px 0 16px; text-align: center; }
.earn-hero h2 { font-family: var(--serif); font-size: 30px; font-weight: 600; }
.earn-hero .emo { font-size: 20px; }
.earn-hero p { margin-top: 4px; font-size: 14px; color: var(--muted); }

.earn-balance-card { padding: 16px; border-radius: var(--r); border: 1px solid var(--green-line); background: var(--green-soft); }
.earn-balance-main { display: flex; align-items: center; gap: 16px; }
.earn-balance-value { position: relative; display: flex; align-items: center; gap: 6px; font-size: 38px; font-weight: 700; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.earn-gem { font-size: 24px; }
.earn-balance-meta { min-width: 0; }
.earn-balance-label { font-size: 14px; font-weight: 700; }
.earn-ratio-caption { margin-top: 2px; font-size: 12.5px; color: var(--green); }

.earn-next { margin-top: 14px; padding: 12px; border-radius: var(--r-sm); background: var(--card-2); }
.earn-next-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.earn-next-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.earn-next-left { font-size: 12px; color: var(--muted); white-space: nowrap; }

.earn-next-bar, .earn-reward-bar { height: 6px; margin-top: 8px; border-radius: var(--r-full); background: var(--line); overflow: hidden; }
.earn-reward-bar { height: 4px; margin-top: 10px; }
.earn-next-bar span, .earn-reward-bar span { display: block; height: 100%; border-radius: inherit; background: var(--green-2); transition: width 0.6s var(--ease); }

.earn-balance-split { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--green-line); }
.earn-stat { text-align: center; }
.earn-stat + .earn-stat { border-left: 1px solid var(--green-line); }
.earn-stat b { display: block; font-size: 18px; font-weight: 700; }
.earn-stat i { font-style: normal; font-size: 11.5px; color: var(--muted); }

.earn-how { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.earn-how-step { display: flex; align-items: center; gap: 12px; }
.earn-how-num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.earn-how-step p { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }

.earn-link-label { margin: 20px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.earn-link-box { padding: 13px 14px; border-radius: var(--r-sm); border: 1px dashed var(--line-2); background: var(--card); color: var(--ink-2); font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; word-break: break-all; cursor: pointer; user-select: text; }
.earn-link-box.copied { border-color: var(--green); background: var(--green-soft); }
.earn-link-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }

.earn-btn { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.earn-btn svg { width: 16px; height: 16px; }
.earn-btn.primary { border-color: var(--green); background: var(--green); color: var(--on-accent); }

.earn-section-title { margin: 24px 2px 10px; font-size: 17px; font-weight: 700; }
.earn-rewards { display: flex; flex-direction: column; gap: 8px; }
.earn-reward { padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.earn-reward.ready { border-color: var(--green-line); background: var(--green-soft); }
.earn-reward-top { display: flex; align-items: center; gap: 12px; }
.earn-reward-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--card-2); font-size: 19px; }
.earn-reward-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.earn-reward-info b { font-size: 14px; }
.earn-reward-info i { margin-top: 1px; font-style: normal; font-size: 12px; color: var(--muted); }
.earn-reward-btn { flex: none; padding: 8px 14px; border: none; border-radius: var(--r-full); background: var(--green); color: var(--on-accent); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.earn-reward-btn:disabled { background: var(--line); color: var(--muted); cursor: default; }

.earn-activity-hint { margin: -4px 2px 10px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.earn-activity { border-radius: var(--r); border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.earn-activity-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 13.5px; }
.earn-activity-row + .earn-activity-row { border-top: 1px solid var(--line); }
.earn-activity-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.earn-activity-status { font-size: 12px; color: var(--muted); white-space: nowrap; }

.earn-empty, .orders-empty { padding: 26px 16px; text-align: center; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

.earn-balance-value.bumped { animation: creditBump 0.7s var(--ease); }
@keyframes creditBump { 35% { transform: scale(1.12); color: var(--green); } }
.credit-gain { position: absolute; left: 50%; top: 0; font-size: 15px; font-weight: 700; color: var(--green); white-space: nowrap; pointer-events: none; animation: creditFloat 1.8s var(--ease) forwards; }
@keyframes creditFloat { 0% { opacity: 0; transform: translate(-50%, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -34px); } }

/* ═══ Orders ═══ */
.orders-hero { margin: 6px 2px 16px; }
.orders-hero h2 { font-family: var(--serif); font-size: 30px; font-weight: 600; }
.orders-hero p { margin-top: 4px; font-size: 14px; color: var(--muted); }

.orders-list { display: flex; flex-direction: column; gap: 8px; }
.orders-empty { border-radius: var(--r); border: 1px dashed var(--line-2); }

.order-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 42px 13px 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--card);
  transition: opacity 0.22s, transform 0.22s var(--ease);
}

.order-card .product-icon { width: 42px; height: 42px; }
.order-card .product-icon svg { width: 24px; height: 24px; }
.order-card.resumable { border-color: var(--green-line); cursor: pointer; }
.order-card.resuming { opacity: 0.55; pointer-events: none; }
.order-card.removing { opacity: 0; transform: translateX(16px); }

.order-remove { position: absolute; top: 50%; right: 8px; width: 28px; height: 28px; margin-top: -14px; border: none; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--faint); cursor: pointer; }
.order-remove svg { width: 14px; height: 14px; }

.order-info { flex: 1; min-width: 0; }
.order-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.order-meta span { white-space: nowrap; }
.order-status { padding: 2px 8px; border-radius: var(--r-full); font-size: 11px; font-weight: 600; }
.order-status.ok { background: var(--green-soft); color: var(--green); }
.order-status.wait { background: rgba(232, 196, 106, 0.14); color: #f0d48a; }
.order-status.off { background: var(--line); color: var(--muted); }
.order-resume { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--green); }
.order-amount { font-size: 14.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }

/* ═══ Success ═══ */
.success-view { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 48px; }
.success-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--on-accent); }
.success-icon svg { width: 32px; height: 32px; }
.success-icon.pending { background: var(--gold); }
.success-title { margin-top: 20px; font-family: var(--serif); font-size: 30px; font-weight: 600; }
.success-subtitle { max-width: 320px; margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }

.success-order-card { width: 100%; margin: 24px 0 18px; padding: 2px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.success-order-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 14px; }
.success-order-row + .success-order-row { border-top: 1px solid var(--line); }
.success-order-label { color: var(--muted); white-space: nowrap; }
.success-order-value { font-weight: 600; text-align: right; word-break: break-word; user-select: text; }

.success-btn { width: 100%; padding: 15px; border: none; border-radius: 14px; background: var(--green); color: var(--on-accent); font-size: 15.5px; font-weight: 600; cursor: pointer; }
.success-btn.secondary { margin-top: 8px; background: none; color: var(--ink-2); border: 1px solid var(--line-2); }

.cross-sell { width: 100%; margin: 0 0 18px; }
.cross-title { margin-bottom: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.cross-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cross-card { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; }
.cross-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.cross-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cross-price { font-size: 14px; font-weight: 700; color: var(--green); }
.cross-add { padding: 3px 8px; border-radius: var(--r-full); background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 600; }

/* ═══ Loading ═══ */
.loading-screen { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg); transition: opacity 0.4s ease; }
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.loader-ring { width: 36px; height: 36px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--green); animation: spin 0.8s linear infinite; }
.loader-wordmark { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); }

/* ═══ Confetti ═══ */
.confetti-container { position: fixed; inset: 0; z-index: 9998; pointer-events: none; overflow: hidden; }
.confetti-particle { position: absolute; animation-name: confettiFall; animation-timing-function: cubic-bezier(0.15, 0.45, 0.55, 1); animation-fill-mode: forwards; }
.confetti-particle i { display: block; width: 100%; height: 100%; border-radius: 1px; animation-name: confettiFlip; animation-timing-function: linear; animation-iteration-count: infinite; }
.confetti-particle.round i { border-radius: 50%; }
@keyframes confettiFall { 0% { transform: translate3d(0, -6vh, 0); opacity: 1; } 92% { opacity: 1; } 100% { transform: translate3d(var(--drift, 0px), 106vh, 0); opacity: 0; } }
@keyframes confettiFlip { 100% { transform: rotateX(720deg) rotateZ(360deg); } }
.confetti-burst { position: absolute; left: 50%; top: 42%; animation-name: confettiBurst; animation-timing-function: cubic-bezier(0.12, 0.7, 0.3, 1); animation-fill-mode: forwards; }
@keyframes confettiBurst { 0% { transform: scale(0.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate3d(var(--bx, 0px), var(--by, 0px), 0) scale(1); opacity: 0; } }

@media (max-width: 400px) {
  .view { padding-left: 14px; padding-right: 14px; }
}

@media (max-width: 350px) {
  .category-tab { font-size: 13.5px; }
  .product-name { font-size: 18px; }
  .product-price { font-size: 16px; }
  .brand-avatar { width: 80px; height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .view.active, .product-card { animation: none; }
  .confetti-container { display: none; }
}
