/* GhostX TG — «жидкое стекло»: полупрозрачные панели с размытием и бликом поверх космического фона.
   Размытие (backdrop-filter) только у закреплённых элементов: шапка, панель вкладок, выезжающая панель.
   html.lite — слабые Android и браузеры без backdrop-filter: те же панели, но плотные и без размытия. */

:root {
  --bg: #07060d;
  --text: #f6f5ff;
  --muted: #b4b0ca;
  --muted-2: #8c88a6;
  --line: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .24);
  --glass: linear-gradient(150deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .045) 55%, rgba(255, 255, 255, .07));
  --glass-solid: linear-gradient(150deg, rgba(48, 40, 82, .96), rgba(26, 22, 46, .96));
  --glass-chrome: rgba(20, 16, 38, .55);
  --shine: inset 0 1px 0 rgba(255, 255, 255, .30), inset 0 -1px 0 rgba(255, 255, 255, .05);
  --shadow: 0 12px 34px rgba(0, 0, 0, .38);
  --blur: blur(22px) saturate(170%);
  --accent: linear-gradient(135deg, #8b5cf6 0%, #5b6cff 55%, #3b82f6 100%);
  --accent-glow: 0 8px 26px rgba(99, 102, 241, .45);
  --violet: #a78bfa;
  --green: linear-gradient(135deg, #34d399, #16a34a);
  --field: rgba(8, 6, 18, .45);
  --radius: 24px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
html, body { margin: 0; color: var(--text); }
body { background: transparent; }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
img { display: block; }

/* космический фон: отдельный закреплённый слой (background-attachment: fixed на iOS не работает) */
.space {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, .8), transparent 60%),
    radial-gradient(1px 1px at 72% 12%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 44%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1px 1px at 32% 62%, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 82%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1px 1px at 8% 88%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(75% 40% at 0% 22%, rgba(124, 58, 237, .62), transparent 72%),
    radial-gradient(65% 38% at 100% 50%, rgba(59, 130, 246, .48), transparent 72%),
    radial-gradient(85% 42% at 25% 100%, rgba(168, 85, 247, .55), transparent 72%),
    radial-gradient(50% 30% at 90% 4%, rgba(236, 72, 153, .22), transparent 72%),
    radial-gradient(45% 28% at 88% 92%, rgba(34, 211, 238, .2), transparent 72%),
    linear-gradient(180deg, #0b0718, #07060d 60%, #0d0820);
}

/* стекло */
.glass, .card, .tile, .item, .chip, .stat, .amount, .kv, .rules, .search, .field, select, .balance, .icon-btn, .btn.ghost, .copy, .toast {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shine);
}
.top, .tabbar, .sheet {
  background: var(--glass-chrome);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shine), var(--shadow);
}

/* шапка */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shine);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .4px; }
.brand img { width: 34px; height: 34px; border-radius: 11px; object-fit: cover; box-shadow: 0 0 0 1px var(--line-strong), 0 4px 14px rgba(124, 58, 237, .45); }
.brand b {
  font-weight: 800; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.top-actions { display: flex; align-items: center; gap: 8px; }
.balance { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 5px 0 12px; border-radius: 20px; font-weight: 700; }
.balance svg { width: 18px; height: 18px; color: var(--muted); }
.plus {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-style: normal; font-size: 20px; line-height: 1; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 12px rgba(99, 102, 241, .5);
}
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; }

main { padding: 14px 14px calc(124px + env(safe-area-inset-bottom)); }

/* карточки */
.card { border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.card + .card, .card + .section, .section + .card { margin-top: 12px; }
.hero {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(139, 92, 246, .35), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(59, 130, 246, .22), transparent 60%),
    var(--glass);
}
.hero h1 { margin: 0; font-size: 27px; line-height: 1.12; font-weight: 800; letter-spacing: -.2px; }
.sub { margin-top: 6px; color: var(--muted); font-size: 14px; }
.hero-stats { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 14px;
  font-size: 12.5px; font-weight: 700; color: var(--text);
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }
.search { display: flex; align-items: center; gap: 10px; margin-top: 14px; height: 48px; padding: 0 14px; border-radius: 16px; color: var(--muted); background: var(--field); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); }
.search input::placeholder { color: var(--muted-2); }
.search:focus-within, .field:focus { border-color: rgba(167, 139, 250, .7); box-shadow: var(--shine), 0 0 0 3px rgba(139, 92, 246, .2); }

.chips { display: flex; gap: 8px; margin: 6px -14px -8px; padding: 8px 14px 14px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 16px; border-radius: 18px; font-weight: 650; }
.chip.active { background: var(--accent); border-color: rgba(255, 255, 255, .3); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), var(--accent-glow); }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin: 8px 2px 12px; color: var(--muted); font-weight: 600; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort svg { width: 18px; height: 18px; }
select {
  height: 40px; padding: 0 34px 0 14px; border-radius: 13px; appearance: none; -webkit-appearance: none; outline: 0; color: var(--text);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f6f5ff' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 13px center, var(--glass);
}
select option { background: #1b1630; color: var(--text); }

.label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.range { display: flex; gap: 10px; margin-top: 10px; }
.field { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 14px; outline: 0; color: var(--text); background: var(--field); }
.field::placeholder { color: var(--muted-2); }

/* страны: сетка стеклянных плиток */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0;
  min-height: 150px; padding: 13px; border-radius: 22px; text-align: left; overflow: hidden;
  transition: transform .12s ease;
}
.tile::before {
  /* мягкое свечение в углу — «жидкий» блик */
  content: ""; position: absolute; top: -40%; right: -30%; width: 90%; height: 90%; border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, .22), transparent 65%); pointer-events: none;
}
.tile:active { transform: scale(.97); }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.tile-name { margin-top: 12px; font-weight: 750; font-size: 15.5px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile-meta { margin-top: 3px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.tile-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.tile-price { font-weight: 850; font-size: 18px; letter-spacing: -.2px; }
.go {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 12px rgba(99, 102, 241, .45);
}
.go svg { width: 16px; height: 16px; stroke-width: 2.2; }
.badges { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.badge-top {
  padding: 3px 8px; border-radius: 9px; font-size: 11px; font-weight: 800; letter-spacing: .3px; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.badge-stock { padding: 3px 8px; border-radius: 9px; font-size: 11px; font-weight: 700; color: #a7f3d0; background: rgba(52, 211, 153, .14); border: 1px solid rgba(52, 211, 153, .25); }

/* флаг: круглая «линза» с бликом */
.flag-ball {
  position: relative; display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%;
  overflow: hidden; background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .35), 0 6px 16px rgba(0, 0, 0, .35);
}
.flag-ball img { width: 100%; height: 100%; object-fit: cover; }
.flag-ball::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 45%),
              linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .18));
}
.flag-emoji { font-size: 26px; line-height: 1; }
.flag-ball.big { width: 88px; height: 88px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .45), 0 12px 30px rgba(0, 0, 0, .45); }
.flag-ball.big .flag-emoji { font-size: 50px; }
.flag-ball.small { width: 40px; height: 40px; }

.list { display: grid; gap: 10px; margin-top: 12px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; text-align: left; }
.item:active { transform: scale(.99); }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.item-side { text-align: right; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }

/* кнопки */
.btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px;
  border-radius: 18px; color: #fff; font-weight: 750; font-size: 16px; overflow: hidden;
  background: var(--accent); border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), var(--accent-glow);
}
.btn::after { content: ""; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255, 255, 255, .18), transparent); pointer-events: none; }
.btn:active { filter: brightness(.92); transform: scale(.99); }
.btn.green { background: var(--green); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 24px rgba(22, 163, 74, .4); }
.btn.ghost { color: var(--text); }
.btn.ghost::after { display: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn + .btn { margin-top: 10px; }
.btn svg { width: 20px; height: 20px; }

/* пополнение и профиль */
.banner { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.section { margin-top: 18px; }
.section > h2 { margin: 0 0 10px 2px; font-size: 19px; font-weight: 800; }
.big { font-size: 32px; font-weight: 850; margin-top: 4px; letter-spacing: -.3px; }
.gradient-text { background: linear-gradient(135deg, #fff, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.amount { position: relative; height: 60px; border-radius: 17px; font-weight: 800; font-size: 16px; }
.amount.active { border-color: rgba(167, 139, 250, .8); background: linear-gradient(150deg, rgba(139, 92, 246, .45), rgba(59, 130, 246, .25)); box-shadow: var(--shine), 0 6px 20px rgba(124, 58, 237, .35); }
.badge {
  position: absolute; top: -8px; right: -4px; padding: 2px 7px; border-radius: 9px;
  background: var(--green); color: #fff; font-size: 11px; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.summary { display: grid; gap: 8px; margin-top: 14px; }
.summary div { display: flex; justify-content: space-between; color: var(--muted); }
.summary b { color: var(--text); }
.note { color: var(--muted); font-size: 13px; margin-top: 10px; }

.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent); font-size: 24px; font-weight: 800; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 8px 22px rgba(124, 58, 237, .45);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.name { font-size: 19px; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.stat { border-radius: 16px; padding: 12px; }
.stat b { display: block; font-size: 16px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { color: var(--muted); font-size: 12px; }

.status { display: inline-block; padding: 3px 9px; border-radius: 9px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .08); color: var(--muted); }
.status.done { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.status.waiting, .status.pending { background: rgba(139, 92, 246, .2); color: #c4b5fd; }
.status.review { background: rgba(250, 204, 21, .15); color: #fde047; }
.status.failed, .status.expired { background: rgba(255, 77, 94, .15); color: #fda4af; }

/* нижняя панель: стеклянная капсула, активная вкладка — «капля» */
.tabbar {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 6px; border-radius: 28px; border: 1px solid var(--line-strong);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 88px; height: 58px; border-radius: 22px; color: var(--muted); font-size: 12px; font-weight: 650;
  transition: background .2s, color .2s;
}
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button { position: relative; z-index: 1; }
.tabbar button.active { color: #fff; }
.tab-pill { position: absolute; left: 0; top: 6px; z-index: 0; width: 88px; height: 58px; border-radius: 22px; pointer-events: none;
  transition: transform .5s cubic-bezier(.34, 1.3, .5, 1), width .3s ease; }
.tab-pill i {
  position: absolute; inset: 0; border-radius: inherit; background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), var(--accent-glow);
}
.tab-pill.no-anim { transition: none; }
.tab-pill.squish i { animation: squish .5s cubic-bezier(.3, .7, .4, 1); }
@keyframes squish { 35% { transform: scale(1.14, .88); } 70% { transform: scale(.97, 1.04); } }

/* выезжающая панель */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(4, 2, 12, .55); opacity: 0; pointer-events: none; transition: opacity .32s ease; }
.backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 90vh; overflow-y: auto;
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
  background: rgba(24, 18, 44, .72); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 30px 30px 0 0;
  transform: translateY(105%); transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}
.sheet.open { transform: translateY(0); }
.grip { width: 40px; height: 5px; margin: 4px auto 14px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.sheet h3 { margin: 0; font-size: 22px; font-weight: 800; }
.sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }

/* карточка страны */
.country-hero { position: relative; margin: -8px -18px 0; padding: 18px 18px 6px; text-align: center; overflow: hidden; }
.country-hero .glow {
  position: absolute; left: 50%; top: -30px; width: 340px; height: 220px; transform: translateX(-50%);
  object-fit: cover; filter: blur(42px) saturate(160%); opacity: .55; border-radius: 50%; pointer-events: none;
  /* мягкие края: маска применяется после размытия */
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 68%);
  mask-image: radial-gradient(ellipse at center, #000 25%, transparent 68%);
}
.country-hero .flag-ball { margin: 0 auto; }
.country-hero h3 { position: relative; margin-top: 12px; font-size: 25px; }
.country-hero .sub { position: relative; }
.price-box { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 14px; padding: 16px; border-radius: 20px; }
.price-box .big { margin: 0; line-height: 1; }
.features { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.features li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.features .tick {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(52, 211, 153, .18); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, .3);
}
.features .tick svg { width: 14px; height: 14px; stroke-width: 2.6; }
.rules { margin: 12px 0 16px; padding: 14px; border-radius: 18px; font-size: 14px; }
.rules p { margin: 0; }
.rules p + p, .rules p + ul { margin-top: 10px; }
.rules .warn { color: #fca5a5; font-weight: 800; font-size: 13px; letter-spacing: .2px; }
.notice { margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(250, 204, 21, .12); border: 1px solid rgba(250, 204, 21, .25); color: #fde68a; font-size: 14px; }

.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-top: 10px; border-radius: 16px; }
.kv span { color: var(--muted); font-size: 13px; }
.kv code { font: 700 19px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .6px; word-break: break-all; }
.copy { flex: none; padding: 8px 12px; border-radius: 11px; font-size: 13px; font-weight: 700; }
.steps { margin: 14px 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps li + li { margin-top: 6px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 16px; text-align: left; font-weight: 650; }
.menu-item + .menu-item { margin-top: 4px; }
.menu-item:active { background: rgba(255, 255, 255, .08); }
.menu-item svg { color: var(--violet); }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(98px + env(safe-area-inset-bottom)); z-index: 60;
  padding: 13px 16px; border-radius: 16px; color: var(--text); text-align: center; font-weight: 600;
  background: rgba(36, 28, 64, .95); box-shadow: var(--shine), var(--shadow);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s;
}
.toast.show { opacity: 1; transform: none; }

.loader { display: grid; place-items: center; min-height: 50vh; }
.loader span { width: 32px; height: 32px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--violet); animation: spin .8s linear infinite; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.gate { text-align: center; padding: 40px 10px; }
.gate img { width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 18px; box-shadow: 0 0 0 1px var(--line-strong), 0 10px 30px rgba(124, 58, 237, .5); }
.gate h1 { margin: 0 0 8px; font-size: 22px; }
.gate p { color: var(--muted); margin: 0 0 20px; }

/* облегчённый режим: без размытия, плотные панели, фон прокручивается вместе со страницей */
html.lite .glass, html.lite .card, html.lite .tile, html.lite .item, html.lite .chip:not(.active), html.lite .stat,
html.lite .amount:not(.active), html.lite .kv, html.lite .rules, html.lite .balance, html.lite .icon-btn,
html.lite .btn.ghost, html.lite .copy, html.lite select { background-color: #1d1834; background-image: var(--glass-solid); }
html.lite .hero { background: radial-gradient(120% 90% at 100% 0%, rgba(139, 92, 246, .35), transparent 60%), var(--glass-solid); }
html.lite .top, html.lite .tabbar, html.lite .sheet { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.lite .top { background: rgba(14, 11, 28, .97); }
html.lite .tabbar { background: rgba(26, 21, 48, .98); }
html.lite .sheet { background: #19142e; }
html.lite .space { position: absolute; min-height: 100%; }
html.lite body { position: relative; }
html.lite .country-hero .glow { display: none; }
html.lite .tile::before { display: none; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top { background: rgba(14, 11, 28, .97); }
  .tabbar { background: rgba(26, 21, 48, .98); }
  .sheet { background: #19142e; }
}

/* плавные переходы: только opacity и transform — дёшево и на слабых телефонах */
@keyframes inRight { from { opacity: 0; transform: translate3d(32px, 0, 0); } }
@keyframes inLeft { from { opacity: 0; transform: translate3d(-32px, 0, 0); } }
@keyframes inFade { from { opacity: 0; transform: translate3d(0, 12px, 0); } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.985); } }
@keyframes tileIn { from { opacity: 0; transform: translate3d(0, 20px, 0) scale(.95); } }
@keyframes flagPop { from { opacity: 0; transform: scale(.55) rotate(-12deg); } }
@keyframes glowIn { from { opacity: 0; } }
.view-in.from-right > * { animation: inRight .4s cubic-bezier(.22, 1, .36, 1) backwards; }
.view-in.from-left > * { animation: inLeft .4s cubic-bezier(.22, 1, .36, 1) backwards; }
.view-in.from-fade > * { animation: inFade .4s cubic-bezier(.22, 1, .36, 1) backwards; }
.view-in > *:nth-child(2) { animation-delay: .04s; }
.view-in > *:nth-child(3) { animation-delay: .08s; }
.view-in > *:nth-child(4) { animation-delay: .12s; }
.view-in > *:nth-child(5) { animation-delay: .16s; }
.view-in > *:nth-child(n+6) { animation-delay: .2s; }
.tile.pop { animation: tileIn .45s cubic-bezier(.22, 1, .36, 1) backwards; }
#sheetBody.sheet-in > * { animation: rise .45s cubic-bezier(.22, 1, .36, 1) backwards; }
#sheetBody.sheet-in > *:nth-child(2) { animation-delay: .05s; }
#sheetBody.sheet-in > *:nth-child(3) { animation-delay: .1s; }
#sheetBody.sheet-in > *:nth-child(4) { animation-delay: .15s; }
#sheetBody.sheet-in > *:nth-child(5) { animation-delay: .2s; }
#sheetBody.sheet-in > *:nth-child(n+6) { animation-delay: .24s; }
#sheetBody.sheet-in .country-hero .flag-ball { animation: flagPop .6s cubic-bezier(.34, 1.56, .64, 1) .08s backwards; }
#sheetBody.sheet-in .country-hero .glow { animation: glowIn .9s ease .1s backwards; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .view-in > *, .tile.pop, #sheetBody.sheet-in > *, #sheetBody.sheet-in .flag-ball, #sheetBody.sheet-in .glow, .tab-pill i { animation: none !important; }
}

.grid > .loader, .grid > .empty { grid-column: 1 / -1; }
