﻿/* Меню Mini App: тёмный liquid glass. backdrop-filter только у слоёв поверх контента (таб-бар, линза, шторка, тост, модалки). */
:root {
  --bg: #07060d;
  --ink: #ffffff;
  --dim: rgba(232, 230, 245, 0.58);
  --accent: #ff8fb3;
  --accent-deep: #ff5f9e;
  --gold: #ffd54a;
  --spring: cubic-bezier(0.34, 1.45, 0.5, 1);
  --ring: linear-gradient(140deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.12) 26%, rgba(255, 255, 255, 0) 48%,
    rgba(255, 255, 255, 0.08) 70%, rgba(255, 255, 255, 0.42));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.web .tg-only { display: none !important; }
body.still *, body.still *::before, body.still *::after { transition: none !important; }

/* ---------- фон: мягкие цветные пятна, двигается только transform ---------- */
.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(140% 90% at 50% -10%, #1d1338 0%, #0c0918 46%, #06050b 100%);
}
.bg i { position: absolute; border-radius: 50%; will-change: transform; }
.bg .b1 { width: 110vmax; height: 110vmax; left: -60vmax; top: -55vmax;
  background: radial-gradient(closest-side, rgba(255, 95, 158, 0.5), rgba(255, 95, 158, 0)); animation: drift1 24s ease-in-out infinite alternate; }
.bg .b2 { width: 100vmax; height: 100vmax; right: -60vmax; top: 2vh;
  background: radial-gradient(closest-side, rgba(112, 80, 255, 0.5), rgba(112, 80, 255, 0)); animation: drift2 28s ease-in-out infinite alternate; }
.bg .b3 { width: 95vmax; height: 95vmax; left: -40vmax; bottom: -62vmax;
  background: radial-gradient(closest-side, rgba(40, 190, 255, 0.36), rgba(40, 190, 255, 0)); animation: drift3 32s ease-in-out infinite alternate; }
.bg .b4 { width: 60vmax; height: 60vmax; right: -25vmax; bottom: -10vmax;
  background: radial-gradient(closest-side, rgba(255, 143, 179, 0.28), rgba(255, 143, 179, 0)); animation: drift2 36s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(16vw, 12vh) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-14vw, -9vh) scale(0.92); } }
@keyframes drift3 { to { transform: translate(12vw, -12vh) scale(1.06); } }
.bg .ph {
  inset: -6%; border-radius: 0; background: center / cover no-repeat;
  filter: saturate(1.25) brightness(1.25); transform: scale(1.04);
  animation: phDrift 40s ease-in-out var(--dd, 0s) infinite alternate;
}
/* смена обоев между страницами: новые растворяются поверх прошлых (.prev), без тёмного провала */
.bg .ph.dissolve { animation: phIn 0.35s ease both, phDrift 40s ease-in-out var(--dd, 0s) infinite alternate; }
/* дрейф пятен по общим часам — между страницами ничего не скачет */
.bg .b1, .bg .b2, .bg .b3, .bg .b4 { animation-delay: var(--dd, 0s) !important; }

/* появление страницы: блоки чуть-чуть всплывают со своих мест, очень быстро */
@keyframes yx-pop { from { opacity: 0; scale: 0.965; } }
.lg .head, .lg .hero, .lg .tabbar { animation: yx-pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@media (prefers-reduced-motion: reduce) { .lg .head, .lg .hero, .lg .tabbar, .lg .tile, .lg .rise { animation: none; } }
.bg .ph ~ .b1, .bg .ph ~ .b2, .bg .ph ~ .b3, .bg .ph ~ .b4 { opacity: 0.18; }
.bg .veil {
  inset: 0; border-radius: 0; will-change: auto;
  background: radial-gradient(130% 90% at 50% 45%, rgba(6, 5, 11, 0) 0%, rgba(6, 5, 11, 0.2) 65%, rgba(6, 5, 11, 0.55) 100%),
    linear-gradient(180deg, rgba(6, 5, 11, 0.3), rgba(6, 5, 11, 0) 22%, rgba(6, 5, 11, 0) 75%, rgba(6, 5, 11, 0.4));
}
@keyframes phIn { from { opacity: 0; } to { opacity: 1; } }
/* видео-обои главной: поверх всего фона, без пятен и затемнений; появляются растворением, как фото */
.bg .bgv {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; pointer-events: none; background: transparent;
}
.bg .bgv.on { opacity: 1; animation: phIn 0.35s ease both; }
@keyframes phDrift { to { transform: scale(1.12) translate(-2%, 1.5%); } }
@media (prefers-reduced-motion: reduce) { .bg i { animation: none; } }

/* ---------- стекло ---------- */
.glass {
  position: relative; isolation: isolate;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.055) 40%,
    rgba(255, 255, 255, 0.025) 62%, rgba(255, 255, 255, 0.075) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.26), inset 0 -1px 1px rgba(255, 255, 255, 0.05),
    inset 0 0 22px rgba(255, 255, 255, 0.03), 0 16px 34px -16px rgba(0, 0, 0, 0.8);
  transition: transform 0.28s var(--spring), background-color 0.2s ease, box-shadow 0.25s ease;
}
.glass::before, .lg .exit-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.blur { -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); }
.press.flash, .press:active {
  transform: scale(0.95);
  background-color: rgba(255, 143, 179, 0.22);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 143, 179, 0.45),
    0 0 26px -4px rgba(255, 143, 179, 0.65);
}
.ico-mask {
  display: block; width: 100%; aspect-ratio: 1; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}

/* ---------- шапка ---------- */
.head {
  position: relative; z-index: 5; height: 44px; flex: none;
  display: flex; align-items: center; justify-content: center; margin: 0 0 18px;
}
.title {
  margin: 0; font-size: 1.02rem; font-weight: 650; line-height: 1;
  letter-spacing: 0.34em; padding-left: 0.34em; text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.28);
  white-space: nowrap; overflow: hidden; max-width: calc(100% - 120px);
}
.hbtn {
  position: absolute; top: 0; width: 44px; height: 44px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.hbtn.l { left: 0; }
.hbtn.r { right: 0; }
.hbtn .ico-mask { width: 22px; }
.hbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* кнопки, которые добавляют exit.js («?») и rate.js (звезда) */
.lg .exit-btn {
  top: 0; transform: none; width: 44px; height: 44px; border: 0; border-radius: 16px; color: #fff;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.075));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.26), 0 16px 34px -16px rgba(0, 0, 0, 0.8);
  isolation: isolate;
}
.lg .exit-btn.rules-btn, .lg .head[data-rate] .exit-btn.rate-btn { left: auto; right: 0; }
.lg .exit-btn .yx-ico { width: 22px; height: 22px; }
.lg .exit-btn:active, .lg .exit-btn.yx-hold, .lg .yx-tap:not(:disabled) {
  background: rgba(255, 143, 179, 0.32) !important; color: #fff !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 0 24px -4px rgba(255, 143, 179, 0.7) !important;
}

/* ---------- MAIN / ME ---------- */
.view {
  position: fixed; inset: 0; z-index: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(112px + env(safe-area-inset-bottom));
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, visibility 0s linear 0s;
}
.inner { max-width: 440px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; }
body[data-view="me"] .v-main, body[data-view="main"] .v-me {
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, visibility 0s linear 0.55s;
}
body[data-view="me"] .v-main { transform: translateX(-22%) scale(0.96); }
body[data-view="main"] .v-me { transform: translateX(22%) scale(0.96); }

.coin-btn {
  position: absolute; left: 0; top: 0; height: 44px; padding: 0 16px 0 7px; border-radius: 22px;
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums;
}
.coin-btn img { width: 30px; height: 30px; display: block; filter: drop-shadow(0 0 8px rgba(255, 213, 74, 0.45)); }

.hero {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding-bottom: 6vh;
}
.logo { margin: 0 0 30px; line-height: 0; animation: float 6s ease-in-out infinite; }
.logo img {
  width: min(320px, 82vw); height: auto; display: block; pointer-events: none;
  filter: drop-shadow(0 8px 22px rgba(255, 80, 190, 0.32));
}
@keyframes float { 50% { transform: translateY(-6px); } }
.cta {
  display: flex; align-items: center; justify-content: center; gap: 12px; overflow: hidden;
  font-weight: 750; letter-spacing: 0.34em; text-transform: uppercase;
}
.cta span { padding-left: 0.34em; }
.play-btn {
  width: min(270px, 74vw); height: 70px; border-radius: 35px; font-size: 1.28rem;
  background-color: rgba(255, 95, 158, 0.34);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), inset 0 -10px 22px rgba(255, 95, 158, 0.28),
    0 20px 44px -14px rgba(255, 95, 158, 0.85), 0 0 0 0.5px rgba(255, 143, 179, 0.5);
}
.play-btn svg { width: 22px; height: 22px; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6)); }
.play-btn svg .solid { fill: currentColor; }
.play-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 48%, transparent 60%) no-repeat;
  background-size: 260% 100%; animation: sheen 5s ease-in-out infinite;
}
@keyframes sheen { 0%, 55% { background-position: 130% 0; } 100% { background-position: -40% 0; } }
.rand-btn { width: min(210px, 58vw); height: 54px; border-radius: 27px; font-size: 0.86rem; }
.rand-btn .ico-mask { width: 22px; flex: none; }

/* ---------- таб-бар со стеклянной линзой ---------- */
.tabbar {
  position: fixed; z-index: 20; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  width: min(300px, calc(100vw - 64px)); height: 62px; transform: translateX(-50%); display: flex;
}
.tb-pill {
  position: absolute; inset: 0; border-radius: 31px; background: rgba(9, 8, 15, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 20px 44px -10px rgba(0, 0, 0, 0.85);
}
.lens {
  position: absolute; z-index: 1; top: -8px; bottom: -8px; left: 0; width: 50%; pointer-events: none;
  transition: transform 0.7s var(--spring);
}
body[data-view="me"] .lens { transform: translateX(100%); }
.lens i {
  position: absolute; inset: 0 2px; border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05) 28%,
    rgba(255, 255, 255, 0.02) 70%, rgba(255, 255, 255, 0.16));
  -webkit-backdrop-filter: blur(2px) saturate(180%) brightness(1.35);
  backdrop-filter: blur(2px) saturate(180%) brightness(1.35);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.55), inset 0 -2px 1px rgba(255, 255, 255, 0.3),
    inset 0 0 16px rgba(150, 190, 255, 0.22), 0 12px 26px -8px rgba(0, 0, 0, 0.7), 0 0 0 0.5px rgba(130, 175, 255, 0.45);
}
.lens i::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(180deg, rgba(160, 205, 255, 0.95), rgba(255, 255, 255, 0.1) 30%, rgba(255, 255, 255, 0) 55%,
    rgba(255, 180, 220, 0.25) 78%, rgba(160, 205, 255, 0.85));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.lens i::after {
  content: ""; position: absolute; left: 20%; right: 20%; top: 4px; height: 10px; border-radius: 10px;
  background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
}
.lens.squash i { animation: squash 0.7s cubic-bezier(0.3, 1.2, 0.5, 1); }
@keyframes squash {
  0% { transform: scale(1, 1); }
  28% { transform: scale(1.24, 0.84); }
  58% { transform: scale(0.94, 1.07); }
  80% { transform: scale(1.03, 0.98); }
  100% { transform: scale(1, 1); }
}
.tab {
  position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: rgba(255, 255, 255, 0.42);
  font-size: 0.6rem; font-weight: 750; letter-spacing: 0.2em; text-transform: uppercase;
  transition: color 0.35s ease, transform 0.5s var(--spring);
}
.tab span { padding-left: 0.2em; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-selected="true"] { color: #fff; transform: scale(1.1); text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
.tab[aria-selected="true"] svg { filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.55)); }

/* ---------- ME ---------- */
.card { padding: 16px; margin-bottom: 14px; border-radius: 26px; }
.rise { animation: yx-pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1) backwards; animation-delay: calc(var(--i, 0) * 25ms); }
@keyframes rise { from { opacity: 0; scale: 0.965; } }
.card-h {
  display: flex; align-items: center; gap: 8px; margin: 0 2px 12px;
  font-size: 0.7rem; font-weight: 750; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim);
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  position: relative; border-radius: 20px; padding: 14px 4px 12px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.stat > svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; opacity: 0.85; }
.stat:nth-child(1) > svg { color: #8fd0ff; filter: drop-shadow(0 0 6px rgba(143, 208, 255, 0.6)); }
.stat:nth-child(2) > svg { color: #ffb36b; filter: drop-shadow(0 0 6px rgba(255, 150, 80, 0.6)); }
.stat-coin { width: 22px; height: 22px; filter: drop-shadow(0 0 6px rgba(255, 213, 74, 0.5)); }
.stat b { font-size: 1.6rem; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.stat > span { font-size: 0.58rem; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim); line-height: 1.25; }
.stat.tap { background-color: rgba(255, 143, 179, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 143, 179, 0.32); }
.stat .chev { position: absolute; top: 9px; right: 7px; width: 13px; height: 13px; fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.wallet { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 14px; }
.wallet .card-h { margin: 0; }
.wallet strong { display: flex; align-items: center; gap: 8px; font-size: 1.75rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.wallet strong img { width: 30px; height: 30px; filter: drop-shadow(0 0 8px rgba(255, 213, 74, 0.45)); }
.btn {
  width: 100%; height: 50px; border-radius: 25px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 650; font-size: 0.92rem;
}
.btn svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn .coin { width: 20px; height: 20px; }
.btn-main {
  background-color: rgba(255, 95, 158, 0.32);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -8px 18px rgba(255, 95, 158, 0.22),
    0 16px 34px -14px rgba(255, 95, 158, 0.8);
}
.btn:disabled { opacity: 0.55; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.topup { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.topup.show { grid-template-rows: 1fr; }
.topup > div { overflow: hidden; min-height: 0; }
.topup-note { margin: 16px 2px 10px; color: var(--dim); font-size: 0.8rem; }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; padding: 2px; }
.pack {
  border-radius: 18px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.25s var(--spring);
}
.pack b { display: inline-flex; align-items: center; gap: 5px; font-size: 1rem; }
.pack b img { width: 18px; height: 18px; }
.pack small { color: var(--dim); font-size: 0.74rem; }
.pack:active { transform: scale(0.95); }
.pack.on { background: rgba(255, 143, 179, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1.5px rgba(255, 143, 179, 0.75), 0 0 18px -6px rgba(255, 143, 179, 0.8); }
.topup .btn-main { box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -8px 18px rgba(255, 95, 158, 0.22); }
.pay-status { margin-top: 10px; min-height: 1.2em; text-align: center; color: var(--dim); font-size: 0.82rem; }

.badge {
  min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; letter-spacing: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 143, 179, 0.18); color: var(--accent); font-size: 0.75rem; font-variant-numeric: tabular-nums;
}
.refs { list-style: none; margin: 0; padding: 0; }
.refs li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 4px; border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.refs li:first-child { border-top: 0; }
.refs .who { min-width: 0; }
.refs .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refs .user { color: var(--dim); font-size: 0.78rem; }
.refs .earn { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 700; }
.refs .earn img { width: 16px; height: 16px; }
.refs .wait { flex: none; color: var(--dim); font-size: 0.76rem; }
.empty { padding: 18px 0 10px; text-align: center; color: var(--dim); font-size: 0.9rem; }

/* ---------- шторка заданий ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(3, 2, 8, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.sheet.show { opacity: 1; pointer-events: auto; }
.sheet-panel {
  position: relative; width: min(460px, 100%); max-height: 86vh; max-height: 86dvh;
  display: flex; flex-direction: column; border-radius: 32px 32px 0 0;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04) 30%), rgba(18, 14, 30, 0.66);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 -20px 50px -20px rgba(0, 0, 0, 0.8);
  transform: translateY(105%); transition: transform 0.55s cubic-bezier(0.2, 1.05, 0.3, 1);
}
.sheet.show .sheet-panel { transform: none; }
.grab { width: 42px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.28); margin: 0 auto 12px; flex: none; }
.sheet .head { margin-bottom: 12px; }
.wallet.mini { margin: 0 2px 12px; flex: none; }
.wallet.mini strong { font-size: 1.3rem; }
.wallet.mini strong img { width: 24px; height: 24px; }
.btn.sm { width: auto; height: 38px; padding: 0 18px; border-radius: 19px; font-size: 0.84rem; }
.tasks { overflow-y: auto; margin: 0 -4px; padding: 2px 4px 4px; }
.task {
  display: block; padding: 12px 14px; border-radius: 20px; margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: background-color 0.2s, transform 0.25s var(--spring);
}
a.task.flash, a.task:active { background: rgba(255, 143, 179, 0.18); transform: scale(0.98); }
.task-top { display: flex; align-items: center; gap: 10px; }
.task-title { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9rem; line-height: 1.25; }
.task-reward { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 750; font-size: 0.9rem; }
.task-reward img { width: 16px; height: 16px; }
.task .chev { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bar { height: 6px; margin-top: 9px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); box-shadow: 0 0 10px rgba(255, 143, 179, 0.6); }
.task.done .bar i { background: linear-gradient(90deg, #ffb84a, var(--gold)); box-shadow: 0 0 10px rgba(255, 213, 74, 0.5); }
.task-sub { margin-top: 6px; color: var(--dim); font-size: 0.74rem; }
.task.done .task-sub { color: var(--gold); }
.task-sec { justify-content: space-between; margin: 6px 4px 10px; }
.task-sec:first-child { margin-top: 0; }
.task-sec small { letter-spacing: 0.04em; text-transform: none; font-weight: 600; color: var(--accent); }

.toast {
  position: fixed; z-index: 1300; left: 50%; top: calc(14px + env(safe-area-inset-top));
  transform: translate(-50%, -160%); padding: 11px 18px; border-radius: 22px; white-space: nowrap;
  background: rgba(30, 24, 46, 0.7); font-size: 0.88rem; font-weight: 600; pointer-events: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 30px -10px rgba(0, 0, 0, 0.8);
  transition: transform 0.45s var(--spring);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- PLAY и разделы ---------- */
.page { position: relative; z-index: 1; max-width: 440px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 16px 28px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile {
  aspect-ratio: 1; min-width: 0; border-radius: 26px; padding: 12px 6px 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  animation: yx-pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1) backwards; animation-delay: calc(var(--i, 0) * 15ms);
}
.tile-ico { width: 46%; max-width: 54px; line-height: 0; filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.3)); }
.tile-ico svg {
  width: 100%; height: auto; display: block; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.tile-ico svg rect[width="5"], .tile-ico svg rect[width="9"] { fill: none; }
a.tile[href="/games/piano"] .tile-ico svg rect[width="5"] { fill: currentColor; stroke: currentColor; }
.tile-ico .ico-num, .tile-ico .ico-txt { fill: currentColor; stroke: none; font-family: "Segoe UI", system-ui, sans-serif; font-weight: 500; letter-spacing: 0.06em; }
.tile-ico .ico-num { font-size: 7px; }
.tile-ico .ico-txt { font-size: 11px; }
.tile-ico .ico-img { width: 100%; height: auto; display: block; object-fit: contain; }
/* плитка игры: витраж с видом игры почти во всю плитку, название под ним */
.tile.has-vit { padding: 7px 6px 9px; gap: 6px; }
.tile-ico.vit { width: 74%; max-width: 96px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
.tile-ico.vit img { width: 100%; height: auto; display: block; -webkit-user-drag: none; user-select: none; }
.tile-name {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.6rem; font-weight: 650; letter-spacing: 0.13em; text-transform: uppercase; line-height: 1.15;
}
.status { color: var(--dim); text-align: center; }

/* ---------- модалки правил и оценки ---------- */
.lg .yx-rules, .lg .yx-rate { background: rgba(4, 3, 10, 0.5); }
.lg .yx-rules .yx-rbox, .lg .yx-rate .yx-rtbox {
  border: 0; border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04) 40%), rgba(18, 14, 30, 0.72);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 60px -20px rgba(0, 0, 0, 0.85);
}
.lg .yx-rules p { color: rgba(232, 230, 245, 0.75); }
.lg .yx-rules .yx-rbtns button, .lg .yx-rules .yx-rlangs button, .lg .yx-rate .yx-rtbtns button {
  border: 0; border-radius: 22px; color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.lg .yx-rules .yx-rlangs button.on { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.lg .yx-rate .yx-rtbtns button.blink { animation-name: lg-blink; }
@keyframes lg-blink { 50% { background: rgba(255, 210, 63, 0.85); color: #000; } }
