:root {
  --bg: #09090c;
  --bg-2: #0f1016;
  --panel: rgba(28, 29, 37, 0.92);
  --panel-2: rgba(22, 23, 30, 0.84);
  --panel-soft: #181922;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f6fb;
  --muted: #8f92a0;
  --muted-2: #5f626e;
  --blue: #1697ff;
  --blue-2: #0068ff;
  --green: #2cdb65;
  --amber: #ffd36a;
  --pink: #ff6da8;
  --white: #ffffff;
  --danger: #ff5c7a;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top-gap: max(var(--safe-top), 42px);
  --tabbar-height: 92px;
  font-family: Inter, SF Pro Display, SF Pro Text, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden; }
body {
  background:
    linear-gradient(145deg, rgba(22, 151, 255, 0.18) 0%, transparent 36%),
    linear-gradient(220deg, rgba(255, 109, 168, 0.12) 0%, transparent 32%),
    linear-gradient(180deg, #0d0e12 0%, #08090d 52%, #06070a 100%);
}
button, input, select { font: inherit; }
button { border: 0; color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .72; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.app-shell {
  width: min(100%, 760px);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(var(--safe-top-gap) + 16px) 16px calc(var(--tabbar-height) + var(--safe-bottom) + 30px);
  position: relative;
}

.glass-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045) 42%, rgba(255, 255, 255, 0.08)),
    rgba(16, 17, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -18px 42px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}

.topbar {
  position: sticky;
  top: calc(var(--safe-top-gap) + 2px);
  z-index: 30;
  min-height: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: slideDown 0.55s ease both;
}

.topbar-spacer { flex: 1 1 auto; min-width: 0; }
.balance-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  min-height: 46px;
  padding: 11px 12px 11px 14px;
  border-radius: 20px;
  background: rgba(4, 104, 255, 0.18);
  color: #e8f4ff;
  font-weight: 950;
  border: 1px solid rgba(22, 151, 255, 0.28);
}
.balance-plus {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
}

main { padding-top: 16px; }
.eyebrow { display: inline-flex; color: var(--green); font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 9px; }

.hero-card {
  position: relative;
  min-height: 290px;
  margin-bottom: 26px;
  padding: 24px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 46%, rgba(255, 255, 255, 0.1)),
    radial-gradient(circle at 16% 12%, rgba(44, 219, 101, 0.26), transparent 31%),
    radial-gradient(circle at 88% 18%, rgba(22, 151, 255, 0.32), transparent 34%),
    rgba(18, 19, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -26px 58px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(28px) saturate(175%);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), transparent 28%, rgba(255, 255, 255, 0.05));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 445px;
  padding-right: 142px;
}

h1 {
  max-width: 430px;
  font-size: clamp(36px, 8vw, 52px);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 950;
}

.hero-card p {
  max-width: 330px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 780;
  line-height: 1.45;
}

.hero-action {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 3;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2cdb65, #1697ff);
  color: #ffffff;
  font-weight: 950;
  box-shadow: 0 16px 32px rgba(22, 151, 255, 0.24);
}

.duck-sticker {
  position: absolute;
  right: 78px;
  top: 22px;
  z-index: 2;
  width: 118px;
  height: 118px;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.34));
  animation: duckFloat 4.8s ease-in-out infinite;
}

.duck-sticker img,
.duck-sticker svg,
.duck-sticker canvas {
  width: 100%;
  height: 100%;
}

.hero-art {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 1;
  width: min(42%, 245px);
  min-width: 188px;
  aspect-ratio: 1.02;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.34);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.hero-art span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.48);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 950;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.page { display: none; padding-top: 26px; animation: fadeUp .32s ease both; }
.page.is-active { display: block; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head.compact { margin-top: 24px; }
.section-head h2 { font-size: 31px; font-weight: 950; }
.rules-button, .mini-chip, .stock-chip {
  border-radius: 16px; padding: 10px 14px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); font-weight: 900;
  border: 1px solid var(--line);
}
.stock-chip { color: var(--green); background: rgba(44,219,101,.12); border-color: rgba(44,219,101,.2); }

.search-box {
  height: 62px; border-radius: 24px; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}
.search-box span { font-size: 26px; color: var(--muted); }
.search-box input { width: 100%; height: 100%; background: transparent; outline: none; border: 0; color: var(--text); font-weight: 850; font-size: 17px; }
.search-box input::placeholder { color: #676b76; }

.category-row { display: flex; gap: 10px; margin: 18px -16px 18px; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
.category-row::-webkit-scrollbar, .period-row::-webkit-scrollbar, .payment-methods::-webkit-scrollbar, .amount-grid::-webkit-scrollbar, .segmented::-webkit-scrollbar { display: none; }
.category-chip, .period-chip, .method, .amount-chip, .segmented button {
  flex: 0 0 auto; border-radius: 20px; padding: 16px 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.11), rgba(255,255,255,.05));
  color: rgba(255,255,255,.72); font-weight: 950;
  border: 1px solid rgba(255,255,255,.08); transition: transform .18s ease, background .18s ease, color .18s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.category-chip.is-active, .period-chip.is-active, .method.is-active, .amount-chip.is-active, .segmented button.is-active { background: white; color: #101116; }
.method[data-method="stars"].is-active { background: var(--amber); color: #1b1200; }

.compact-tools { display: grid; grid-template-columns: 1fr 170px; gap: 10px; margin-bottom: 18px; }
.segmented { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.segmented button { padding: 13px 16px; border-radius: 18px; }
.sort-control { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 900; }
.sort-control select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 10px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  outline: none;
  font-weight: 850;
}

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product-card {
  min-width: 0; position: relative; overflow: hidden; border-radius: 28px; padding: 10px 10px 12px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.04) 42%, rgba(255,255,255,.07)),
    rgba(18, 19, 25, 0.72);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 18px 48px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.16);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  animation: cardIn .38s ease both; animation-delay: calc(var(--i, 0) * 42ms);
}
.product-card:active { transform: scale(.985); }
.product-card:hover { border-color: rgba(22,151,255,.26); background: rgba(29,30,39,.92); }
.product-image-wrap { position: relative; overflow: hidden; border-radius: 22px; background: #101116; aspect-ratio: 16 / 10; }
.product-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-star {
  position: absolute; left: 12px; top: 12px; width: 42px; height: 42px; border-radius: 999px;
  display: grid; place-items: center; background: rgba(255,255,255,.16); color: white; font-size: 22px; backdrop-filter: blur(14px);
}
.favorite-button { border: 0; }
.favorite-button.is-active { color: #ffd86b; background: rgba(0,0,0,.34); }
.product-name { margin: 14px 6px 4px; font-size: 22px; line-height: 1.02; font-weight: 950; }
.product-meta { margin: 0 6px 14px; color: var(--muted); font-weight: 850; }
.product-description { display: none; }
.card-actions { display: grid; grid-template-columns: 1fr 58px; gap: 9px; }
.price-button, .bag-button {
  min-height: 52px; border-radius: 18px; font-weight: 950; font-size: 16px; display: grid; place-items: center;
}
.price-button { background: var(--blue); color: white; box-shadow: 0 10px 28px rgba(22,151,255,.22); }
.bag-button { background: rgba(255,255,255,.08); font-size: 23px; }

.skeleton-card {
  min-height: 240px;
  background: linear-gradient(90deg, rgba(24,25,32,.82), rgba(44,46,58,.92), rgba(24,25,32,.82));
  background-size: 220% 100%;
  animation: skeleton 1.2s ease-in-out infinite;
}

.bottom-nav {
  position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 12px); transform: translateX(-50%); z-index: 35;
  width: min(calc(100% - 28px), 732px); min-height: 82px; border-radius: 31px;
  display: flex; padding: 8px; gap: 6px;
}
.nav-item { flex: 1 1 0; min-width: 0; border-radius: 24px; background: transparent; color: #7f8490; display: grid; place-items: center; gap: 4px; font-weight: 900; transition: color .18s ease, background .18s ease, transform .18s ease; }
.nav-item svg { width: 24px; height: 24px; stroke-width: 2.5; }
.nav-item .icon-fallback { width: 24px; height: 24px; display: grid; place-items: center; font-size: 21px; line-height: 1; }
.nav-item b { font-size: 13px; }
.nav-item.is-active { color: #f7fbff; background: linear-gradient(145deg, rgba(22,151,255,.34), rgba(255,255,255,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 24px rgba(22,151,255,.18); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.58); backdrop-filter: blur(3px); animation: fadeIn .18s ease both; }
.bottom-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 105%); width: min(100%, 760px); z-index: 50;
  border-radius: 34px 34px 0 0;
  background:
    linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.055) 40%, rgba(255,255,255,.09)),
    rgba(16, 17, 22, .86);
  border: 1px solid rgba(255,255,255,.16); border-bottom: 0;
  box-shadow: 0 -26px 80px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.2);
  backdrop-filter: blur(28px) saturate(175%);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  padding: 16px 16px calc(var(--safe-bottom) + 18px);
  transition: transform .3s cubic-bezier(.2,.9,.2,1); max-height: min(88svh, 820px); overflow: auto;
}
.bottom-sheet.is-open { transform: translate(-50%, 0); }
.sheet-close { position: absolute; right: 18px; top: 18px; z-index: 2; width: 52px; height: 52px; border-radius: 999px; background: rgba(0,0,0,.42); color: white; font-size: 32px; }
.sheet-cover { width: 100%; aspect-ratio: 16 / 7.5; object-fit: cover; border-radius: 26px; background: #0b0c10; }
.sheet-content { padding-top: 20px; }
.sheet-topline { display:flex; justify-content: space-between; align-items:center; gap: 10px; margin-bottom: 12px; }
.sheet-content h2 { font-size: 34px; line-height: .98; margin-bottom: 12px; }
.sheet-content p { color: var(--muted); line-height: 1.38; font-size: 18px; font-weight: 800; }
.feature-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.feature-list span { border-radius: 16px; padding: 8px 10px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.72); font-size: 12px; font-weight: 850; }
.period-row, .payment-methods, .amount-grid { display:flex; gap: 10px; margin-top: 18px; overflow-x:auto; scrollbar-width: none; }
.period-chip { display: grid; gap: 4px; text-align: left; }
.period-chip b { font-size: 13px; }
.payment-methods { padding-bottom: 2px; }
.notice-box, .promo-result, .ton-connect-status {
  margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.72); font-weight: 800; line-height: 1.35;
}
.ton-connect-status.is-connected { color: var(--green); background: rgba(44,219,101,.12); }
.buy-button, .primary-button, .secondary-button, .sheet-secondary, .primary-link {
  width: 100%; min-height: 62px; border-radius: 22px; margin-top: 16px; font-weight: 950; font-size: 18px;
  display: grid; place-items: center; text-align: center;
}
.buy-button, .primary-button, .primary-link { background: white; color: #08090d; }
.buy-button.is-blue { background: var(--blue); color: white; }
.sheet-secondary, .secondary-button { background: rgba(255,255,255,.08); color: white; border: 1px solid var(--line); }

.promo-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 10px; margin-top: 18px; }
.promo-row input, .field-box input, .ref-link-box input {
  min-width: 0; height: 56px; border: 1px solid var(--line); border-radius: 18px; padding: 0 14px;
  background: rgba(0,0,0,.22); color: white; outline: none; font-weight: 850;
}
.promo-row .secondary-button { min-height: 56px; margin: 0; }
.price-summary, .payment-details { display: grid; gap: 10px; margin-top: 16px; }
.price-summary div, .payment-details div {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid var(--line);
}
.price-summary span, .payment-details span { color: var(--muted); font-weight: 850; }
.price-summary b, .payment-details b, .payment-details code { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-weight: 950; }
.price-summary .total { background: rgba(22,151,255,.14); border-color: rgba(22,151,255,.24); }
.price-summary .total b { color: #a7ddff; }

.topup-sheet .sheet-content { padding-top: 8px; }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
.amount-chip { text-align: center; padding: 16px 10px; }
.field-box, .ref-link-box { display:grid; gap: 8px; margin-top: 18px; color: var(--muted); font-weight: 900; }

.list-stack { display: grid; gap: 12px; }
.list-item {
  width: 100%;
  display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 22px;
  background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.1); animation: fadeUp .25s ease both; text-align: left;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.list-button { color: inherit; }
.list-item img, .payment-mark { width: 58px; height: 58px; border-radius: 18px; object-fit: cover; }
.payment-mark { display:grid; place-items:center; background: rgba(22,151,255,.15); color: var(--blue); font-size: 22px; font-weight: 950; }
.payment-mark.is-spend { color: var(--danger); background: rgba(255,92,122,.12); }
.list-title { font-size: 17px; font-weight: 950; }
.list-sub { color: var(--muted); margin-top: 4px; font-size: 13px; font-weight: 750; }
.list-price, .list-side b { font-weight: 950; color: var(--green); white-space: nowrap; }
.list-price.is-spend { color: var(--danger); }
.list-side { display: grid; justify-items: end; gap: 6px; }
.status-dot { border-radius: 999px; padding: 5px 8px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); font-size: 11px; font-weight: 900; white-space: nowrap; }
.status-paid, .status-completed { color: var(--green); background: rgba(44,219,101,.12); }
.status-pending, .status-pending_payment { color: #ffd86b; background: rgba(255,216,107,.11); }
.status-cancelled { color: var(--danger); background: rgba(255,92,122,.12); }

.empty-state, .state-panel {
  padding: 36px 24px; text-align: center; border-radius: var(--radius-xl);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.11);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.empty-state.compact { padding: 26px 20px; }
.empty-sticker {
  width: 104px;
  height: 104px;
  margin: -8px auto 12px;
  filter: drop-shadow(0 16px 24px rgba(0,0,0,.3));
  transform-origin: 50% 82%;
  animation: stickerFloat 4.6s ease-in-out infinite;
}
.empty-sticker img,
.empty-sticker svg,
.empty-sticker canvas {
  width: 100%;
  height: 100%;
  transform-origin: 50% 82%;
  animation: stickerWobble 2.9s ease-in-out infinite;
}
.empty-icon { width: 70px; height: 70px; border-radius: 24px; margin: 0 auto 18px; display: grid; place-items: center; background: rgba(22,151,255,.15); color: var(--blue); font-size: 30px; }
.empty-state h3, .state-panel h3 { font-size: 22px; }
.empty-state p, .state-panel p { margin-top: 8px; color: var(--muted); font-weight: 750; line-height: 1.35; }

.ref-card, .wallet-card {
  padding: 26px; border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.045) 42%, rgba(255,255,255,.08)),
    rgba(18,19,25,.72);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 20px 54px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.15);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.ref-icon { width: 78px; height: 78px; border-radius: 28px; background: linear-gradient(135deg, var(--blue), #7651ff); display:grid; place-items:center; font-size: 34px; box-shadow: 0 12px 34px rgba(22,151,255,.26); margin-bottom: 18px; }
.ref-card h2, .wallet-card h2 { font-size: 34px; line-height: 1; }
.ref-card p, .wallet-card p { margin-top: 12px; color: var(--muted); font-weight: 800; line-height: 1.35; }
.ref-stats { display:grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.ref-stats div { padding: 16px; border-radius: 20px; background: rgba(255,255,255,.06); }
.ref-stats span { display:block; font-size: 28px; font-weight: 950; }
.ref-stats small { color: var(--muted); font-weight: 850; }
.wallet-card h2 { font-size: 52px; }
.wallet-actions { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.wallet-actions .primary-button, .wallet-actions .secondary-button { min-height: 58px; font-size: 15px; }

.referrals-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.referral-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.referral-avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(22,151,255,.18);
  color: #bfe5ff;
  font-weight: 950;
}

.referral-row b,
.referral-row span,
.referral-row small { min-width: 0; }

.referral-row b { display: block; }
.referral-row small { color: var(--muted); font-weight: 800; }
.referral-reward { color: var(--green); font-weight: 950; white-space: nowrap; }

.admin-list { display: grid; gap: 12px; }
.admin-card {
  padding: 16px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.045) 44%, rgba(255,255,255,.08)),
    rgba(18,19,25,.78);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 42px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.admin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.admin-card h3 { font-size: 20px; line-height: 1.08; }
.admin-card p { margin-top: 5px; color: var(--muted); font-weight: 800; }
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.admin-grid div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.065);
  border: 1px solid rgba(255,255,255,.08);
}
.admin-grid span { display:block; color: var(--muted); font-size: 11px; font-weight: 900; margin-bottom: 5px; }
.admin-grid b { font-size: 14px; }
.admin-actions { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-actions .primary-button,
.admin-actions .secondary-button { min-height: 52px; margin-top: 14px; font-size: 15px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 18px); transform: translate(-50%, 30px); z-index: 80;
  min-width: 220px; max-width: calc(100% - 34px); padding: 14px 18px; border-radius: 18px; background: rgba(255,255,255,.94);
  color: #08090d; font-weight: 950; text-align: center; opacity: 0; pointer-events: none; transition: .22s ease;
}
.toast[data-type="error"] { background: #ffd7df; color: #1a090d; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.tap { transition: transform .14s ease, opacity .14s ease; }
.tap:active { transform: scale(.96); opacity: .88; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes skeleton { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@keyframes duckFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); }
  50% { transform: translate3d(0, -9px, 0) rotate(3deg); }
}
@keyframes stickerFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -7px, 0); }
}
@keyframes stickerWobble {
  0%, 100% { transform: rotate(-2deg) scale(1); }
  45% { transform: rotate(3deg) scale(1.035); }
  70% { transform: rotate(-1deg) scale(1.01); }
}
.animated-card { animation: fadeUp .42s ease both; }

@media (max-width: 560px) {
  .hero-card {
    min-height: 340px;
    padding: 22px;
  }
  .hero-copy {
    max-width: none;
    padding-right: 92px;
  }
  .hero-card p {
    max-width: 250px;
    font-size: 14px;
  }
  .duck-sticker {
    right: 12px;
    top: 24px;
    width: 98px;
    height: 98px;
  }
  .hero-art {
    width: 178px;
    min-width: 0;
    right: 18px;
    bottom: 18px;
    border-radius: 24px;
  }
  .hero-action {
    left: 22px;
    bottom: 22px;
  }
}

@media (max-width: 430px) {
  :root { --tabbar-height: 84px; }
  body {
    background:
      linear-gradient(145deg, rgba(22,151,255,.22) 0%, transparent 42%),
      linear-gradient(225deg, rgba(255,109,168,.15) 0%, transparent 36%),
      linear-gradient(180deg, #101116 0%, #090a0f 100%);
  }
  .app-shell { padding: calc(var(--safe-top-gap) + 18px) 12px calc(var(--tabbar-height) + var(--safe-bottom) + 36px); }
  .topbar { min-height: 48px; gap: 8px; overflow: visible; }
  .header-back { min-width: 74px; height: 42px; border-radius: 17px; font-size: 13px; }
  .balance-pill { min-width: 74px; min-height: 44px; padding: 10px 10px 10px 12px; border-radius: 17px; }
  #balanceAmount { font-size: 13px; white-space: nowrap; }
  .balance-plus { width: 23px; height: 23px; }
  .hero-card { min-height: 316px; margin-bottom: 22px; padding: 19px; border-radius: 26px; }
  .hero-copy { padding-right: 74px; }
  .hero-card h1 { max-width: 255px; font-size: 36px; line-height: 0.98; }
  .hero-card p { max-width: 218px; margin-top: 12px; }
  .duck-sticker { width: 82px; height: 82px; right: 8px; top: 20px; }
  .hero-art { width: 154px; right: 14px; bottom: 14px; border-radius: 21px; }
  .hero-art span { left: 9px; bottom: 9px; font-size: 11px; }
  .hero-action { left: 19px; bottom: 18px; min-height: 46px; border-radius: 16px; }
  .section-head h2 { font-size: 27px; }
  .search-box { height: 56px; border-radius: 21px; background: rgba(255,255,255,.11); }
  .category-row { margin-left: -12px; margin-right: -12px; padding: 0 12px 2px; }
  .category-chip, .period-chip, .method, .amount-chip, .segmented button { padding: 14px 16px; border-radius: 18px; color: rgba(255,255,255,.82); }
  .compact-tools { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; gap: 14px; }
  .product-card { border-radius: 24px; padding: 9px; }
  .product-image-wrap { border-radius: 19px; aspect-ratio: 16 / 10; }
  .product-star { width: 38px; height: 38px; }
  .product-name { font-size: 24px; }
  .product-meta { font-size: 14px; color: rgba(255,255,255,.62); }
  .card-actions { grid-template-columns: 1fr 50px; }
  .price-button, .bag-button { min-height: 48px; border-radius: 16px; }
  .bottom-nav { left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 10px); transform: none; width: auto; min-height: 74px; border-radius: 26px; padding: 7px; gap: 4px; }
  .nav-item { border-radius: 20px; }
  .nav-item svg { width: 22px; height: 22px; }
  .nav-item b { font-size: 10px; }
  .wallet-actions { grid-template-columns: 1fr; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-row { grid-template-columns: 1fr; }
  .list-item { grid-template-columns: 58px 1fr; }
  .list-side { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: center; }
  .empty-state, .state-panel { padding: 28px 18px; }
  .empty-sticker { width: 94px; height: 94px; }
  .admin-grid { grid-template-columns: 1fr; }
  .referral-row { grid-template-columns: 42px 1fr; }
  .referral-reward { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
