:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #0f0f12);
  --hint: var(--tg-theme-hint-color, #8a8a8e);
  --link: var(--tg-theme-link-color, #2a7ae2);
  --accent: var(--tg-theme-button-color, #2a7ae2);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --page: var(--tg-theme-secondary-bg-color, #f2f2f7);
  --danger: var(--tg-theme-destructive-text-color, #e5484d);
  --separator: var(--tg-theme-section-separator-color, rgba(127, 127, 127, 0.16));
  --ok: #2fa66a;
  --warn: #e8930c;
  --tint: color-mix(in srgb, var(--accent) 12%, transparent);
  --tint-strong: color-mix(in srgb, var(--accent) 20%, transparent);
  --muted-fill: color-mix(in srgb, var(--hint) 14%, transparent);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
  --radius: 18px;
  --radius-sm: 12px;
  --safe-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  --tabbar-h: 60px;
}

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

html, body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font: inherit; color: inherit; }
button, label { cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
}
main.enter { animation: page-in .22s ease-out; }
main[data-view="checkout"] { padding-bottom: calc(24px + var(--safe-bottom)); }

@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; margin: 0; }
h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--hint);
  margin: 24px 4px 8px;
}
p { margin: 0 0 8px; }
code { font: 600 .95em ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.hint { color: var(--hint); font-size: 14px; }
.hint.small { font-size: 12.5px; margin: 10px 0 0; }
.center-text { text-align: center; }
.grow { flex: 1; min-width: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ----- splash and loading ---------------------------------------------------------------- */

.splash { display: grid; place-items: center; min-height: 70vh; }
.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--tint-strong);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.spinner.small { width: 16px; height: 16px; border-width: 2px; border-color: color-mix(in srgb, var(--accent-text) 35%, transparent); border-top-color: var(--accent-text); }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton-list { display: grid; gap: 10px; }
.skeleton {
  height: 76px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--card) 0%, var(--muted-fill) 50%, var(--card) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ----- page header ----------------------------------------------------------------------- */

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 16px;
}
.page-sub { color: var(--hint); font-size: 14px; margin: 4px 0 0; }

.bonus-pill {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--tint);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ----- cards and lists ------------------------------------------------------------------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
}
.card.pad { padding: 16px; }

.list .row + .row { border-top: 1px solid var(--separator); }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  transition: background-color .15s;
}
.row.selected { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.row .title { font-weight: 500; overflow-wrap: anywhere; }
.row .sub { color: var(--hint); font-size: 14px; margin-top: 1px; }
.row .price { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

.section-head { display: flex; align-items: center; gap: 8px; margin: 24px 4px 8px; }
.section-head h2 { margin: 0; }
.section-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--hint);
  background: var(--muted-fill);
  border-radius: 999px;
  padding: 1px 8px;
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ----- catalog --------------------------------------------------------------------------- */

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--hint);
}
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: var(--hint); }
.search:focus-within { box-shadow: 0 0 0 2px var(--accent); }

.chips {
  display: flex;
  gap: 8px;
  margin: 14px -16px 4px;
  padding: 0 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  transition: background-color .15s, color .15s, transform .1s;
}
.chip:active { transform: scale(.96); }
.chip.active { background: var(--accent); color: var(--accent-text); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.grid > .empty-state { grid-column: 1 / -1; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.product {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
  text-align: left;
  transition: transform .12s ease;
}
.product:active { transform: scale(.97); }
.product-media { position: relative; padding: 6px 6px 0; }
.product-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  background: var(--page);
}
.placeholder {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  background: linear-gradient(135deg, var(--tint), var(--tint-strong));
}
.in-cart {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.in-cart .icon { width: 13px; height: 13px; stroke-width: 2.5; }
.product-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 14px; flex: 1; }
.product-name { font-weight: 600; font-size: 15.5px; line-height: 1.25; }
.product-meta { color: var(--hint); font-size: 13px; }
.product-price { margin-top: auto; padding-top: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ----- product page ---------------------------------------------------------------------- */

.hero {
  margin: 0 -16px;
  padding: 0 16px;
}
.hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  max-height: 46vh;
  object-fit: cover;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.hero-photo.placeholder { font-size: 56px; }
.hero-info { padding: 18px 4px 0; }
.hero-title { margin: 4px 0 6px; }
.hero-price { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-desc { color: var(--hint); font-size: 15px; margin: 10px 0 0; }

/* ----- steppers and buttons -------------------------------------------------------------- */

.add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--tint);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  transition: transform .1s;
}
.add-btn:active { transform: scale(.92); }
.add-btn .icon { width: 18px; height: 18px; stroke-width: 2.5; }

.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  padding: 2px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  animation: pop .18s ease-out;
}
.stepper button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
}
.stepper button:active { background: rgba(255, 255, 255, .18); }
.stepper .icon { width: 17px; height: 17px; stroke-width: 2.5; }
.stepper .qty { min-width: 20px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes pop { from { transform: scale(.85); } to { transform: none; } }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 15px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.1;
  text-align: center;
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn .icon { width: 19px; height: 19px; }
.btn.secondary { background: var(--tint); color: var(--accent); }
.btn.ghost { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
.btn.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn.disabled { opacity: .6; pointer-events: none; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

/* ----- cart ------------------------------------------------------------------------------ */

.cart-row { align-items: center; }
.cart-thumb {
  width: 60px;
  height: 60px;
  flex: none;
  border-radius: 12px;
  object-fit: cover;
  background: var(--page);
  font-size: 18px;
}
.line-price { font-weight: 700; font-size: 15px; margin-top: 4px; font-variant-numeric: tabular-nums; }

.summary { padding: 6px 16px; }
.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-variant-numeric: tabular-nums;
}
.sum-row span:first-child { color: var(--hint); }
.sum-row.plus span:last-child { color: var(--ok); font-weight: 600; }
.sum-row.total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--separator);
  font-size: 18px;
  font-weight: 700;
}
.sum-row.total span:first-child { color: var(--text); }

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--hint);
}
.notice .icon { color: var(--ok); margin-top: 1px; }
.notice.warn { background: color-mix(in srgb, var(--warn) 14%, var(--card)); color: var(--text); }
.notice.info { background: var(--tint); color: var(--text); }
.notice.privacy { font-size: 13px; }

/* ----- checkout -------------------------------------------------------------------------- */

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow), inset 0 0 0 2px transparent;
  transition: box-shadow .15s, background-color .15s;
}
.option.active { background: color-mix(in srgb, var(--accent) 7%, var(--card)); box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); }
.option.active::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
}
.option-icon { font-size: 26px; margin-bottom: 6px; }
.option-title { font-weight: 600; }
.option-sub { color: var(--hint); font-size: 13px; }

.form { padding: 4px 0; }
.field { padding: 10px 16px; }
.field + .field { border-top: 1px solid var(--separator); }
.field label { display: block; font-size: 13px; color: var(--hint); margin-bottom: 4px; }
.field-box { display: flex; align-items: flex-start; gap: 8px; }
.field-box .icon { color: var(--hint); margin-top: 6px; width: 18px; height: 18px; }
.field input, .field textarea {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 4px 0;
  background: none;
  color: var(--text);
  font: inherit;
  resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--hint) 70%, transparent); }
.field .error { color: var(--danger); font-size: 13px; margin-top: 4px; }
.field.invalid label { color: var(--danger); }
.field.invalid { background: color-mix(in srgb, var(--danger) 6%, transparent); }

.bonus-actions { display: flex; gap: 8px; padding: 2px 16px 10px; }
.bonus-actions .chip { box-shadow: none; background: var(--tint); color: var(--accent); }
.bonus-actions .chip.active { background: var(--accent); color: var(--accent-text); }
.form #bonus-left { padding: 0 16px 10px; margin: 0; font-size: 13px; }

/* ----- orders ---------------------------------------------------------------------------- */

.order-list { display: grid; gap: 10px; }
.order-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 0;
  text-align: left;
  transition: transform .12s;
}
.order-card:active { transform: scale(.98); }
.order-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  font-size: 22px;
}
.order-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.order-card .sub { color: var(--hint); font-size: 13.5px; }
.order-total { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tone-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.tone-info { background: var(--tint); color: var(--accent); }
.tone-accent { background: var(--tint-strong); color: var(--accent); }
.tone-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.tone-muted { background: var(--muted-fill); color: var(--hint); }

.status-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 12px;
  padding: 18px;
  border-radius: 22px;
}
.status-hero .status-emoji {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 18px;
  background: var(--card);
  font-size: 28px;
  box-shadow: var(--shadow);
}
.status-code { font-size: 13px; color: var(--hint); }
.status-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--text); margin-top: 2px; }

.eta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.eta > .icon { color: var(--accent); width: 24px; height: 24px; }
.eta .title { font-weight: 600; }
.eta .sub { color: var(--hint); font-size: 14px; margin-top: 2px; }

.steps { padding: 8px 16px; }
.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  color: var(--hint);
}
.step + .step::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -10px;
  height: 20px;
  width: 2px;
  background: var(--separator);
}
.step.done + .step::before { background: var(--accent); }
.step .dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--separator);
  background: var(--card);
}
.step.done { color: var(--text); }
.step.done .dot { background: var(--accent); border-color: var(--accent); }
.step.current { color: var(--text); font-weight: 600; }
.step.current .dot {
  border-color: var(--accent);
  border-width: 4px;
  box-shadow: 0 0 0 5px var(--tint);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }

.qty-tag {
  flex: none;
  min-width: 34px;
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}

/* ----- payment --------------------------------------------------------------------------- */

.pay { padding: 18px 16px; }
.pay p { margin: 8px 0 0; }
.countdown {
  display: table;
  margin: 0 auto 14px !important;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--warn);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.qr {
  display: block;
  width: min(220px, 66%);
  aspect-ratio: 1;
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px var(--separator);
}
.amount-label { text-align: center; color: var(--hint); font-size: 13px; }
.amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: none;
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.amount .icon { color: var(--accent); width: 20px; height: 20px; }
.pay-step { display: flex; gap: 12px; align-items: flex-start; }
.pay-step p { margin: 0; }
.step-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

/* ----- bonuses --------------------------------------------------------------------------- */

.balance-card {
  position: relative;
  overflow: hidden;
  padding: 22px 20px;
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent-text) 22%, transparent), transparent 55%),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 65%, #000));
  color: var(--accent-text);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent);
}
.balance-label { font-size: 14px; opacity: .85; font-weight: 500; }
.balance-value { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.balance-text { font-size: 14px; opacity: .9; margin: 0; max-width: 80%; }
.balance-deco {
  position: absolute;
  right: -8px;
  bottom: -14px;
  font-size: 84px;
  opacity: .22;
  transform: rotate(-12deg);
  pointer-events: none;
}

.invite { display: flex; gap: 12px; align-items: flex-start; }
.invite-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  background: var(--tint);
  font-size: 22px;
}
.invite p { margin: 0; font-size: 15px; }
.ref-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  text-align: left;
}
.ref-link code { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-link .icon { color: var(--accent); width: 18px; height: 18px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--hint); font-size: 13px; }

.row-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--muted-fill);
  color: var(--hint);
  font-weight: 700;
}
.row-icon.plus { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.amount-tag { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount-tag.plus { color: var(--ok); }

/* ----- empty states and full-screen messages --------------------------------------------- */

.empty-state { text-align: center; padding: 48px 24px 24px; }
.empty-emoji {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 42px;
}
.empty-title { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.empty-state .btn { max-width: 280px; margin: 20px auto 0; }

.center { text-align: center; padding: 15vh 16px 32px; }
.center .big { font-size: 56px; margin-bottom: 12px; }
.center h1 { font-size: 24px; margin-bottom: 8px; }
.gate .btn { max-width: 320px; margin-left: auto; margin-right: auto; }

/* ----- tab bar --------------------------------------------------------------------------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--separator);
}
.tabbar[hidden], body.typing .tabbar { display: none; }
.tab {
  flex: 1;
  max-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: calc(var(--tabbar-h) - 12px);
  justify-content: center;
  border: 0;
  background: none;
  color: var(--hint);
  font-size: 11px;
  font-weight: 600;
  transition: color .15s;
}
.tab-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  transition: background-color .2s;
}
.tab-icon .icon { width: 22px; height: 22px; }
.tab.active { color: var(--accent); }
.tab.active .tab-icon { background: var(--tint); }
.tab.active .icon { stroke-width: 2.3; }
.tab:active .tab-icon { transform: scale(.92); }
.badge {
  position: absolute;
  top: -4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--card);
}
.badge.bump { animation: bump .35s cubic-bezier(.3, 1.6, .6, 1); }
@keyframes bump { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: none; } }

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