/* Onest (variable, weights 400-800) served from our own server, latin + cyrillic subsets only. */
@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #09090b;
  --card: #131316;
  --card-2: #1b1b20;
  --card-3: #24242a;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #f5f4f2;
  --muted: #9b9aa2;
  --faint: #6c6b73;
  --accent: #ff4d2e;
  --accent-2: #ff8a3d;
  --grad: linear-gradient(135deg, #ff5a36 0%, #ff3d6e 100%);
  --me: linear-gradient(135deg, #ff5a36 0%, #f2386a 100%);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --app-h: 100vh;
  --vv-top: 0px;
  --full-w: 100vw;
  --full-h: 100vh;
  --sheet: #121215;
  --toast: rgba(30, 30, 35, .95);
  --hot: #ff8b73;
  --ok: #7ee2a8;
  --ctl: #8fd3ff;
  --home-glow: rgba(255, 77, 46, .16);
  color-scheme: dark;
  /* Emoji and symbol fonts after the text fonts: nicks with flags, decorative letters (𝓐, ꧁, ★)
     and other symbols fall back to a system font that has them instead of empty boxes. */
  --font-ui: Onest, -apple-system, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Noto Sans Symbols", "Noto Sans Symbols 2", "Noto Sans Math", "Cambria Math", "Apple Symbols", sans-serif;
  font-family: var(--font-ui);
}
:root[data-theme="light"] {
  --bg: #f5f2f0;
  --card: #ffffff;
  --card-2: #f0ebe8;
  --card-3: #e5dfdb;
  --line: rgba(40, 20, 20, .07);
  --line-2: rgba(40, 20, 20, .12);
  --text: #1a1416;
  --muted: #6f666a;
  --faint: #a2989c;
  --sheet: #ffffff;
  --toast: rgba(255, 255, 255, .96);
  --hot: #e5482a;
  --ok: #1f9d5a;
  --ctl: #1f86c9;
  --home-glow: rgba(255, 90, 54, .14);
  color-scheme: light;
}
:root[data-theme="light"] .home .ava.me-ava { box-shadow: 0 0 0 2px rgba(0, 0, 0, .06); }
:root[data-theme="light"] .hero { box-shadow: 0 20px 44px rgba(60, 20, 20, .22); }
:root[data-theme="light"] .lobby-card { box-shadow: 0 6px 18px rgba(60, 20, 20, .06), inset 0 0 0 1px var(--line); }
:root[data-theme="light"] .join { box-shadow: 0 6px 18px rgba(60, 20, 20, .06), inset 0 0 0 1px var(--line); }
:root[data-theme="light"] .sheet-card { box-shadow: 0 -10px 40px rgba(0, 0, 0, .15); }
:root[data-theme="light"] .toast { box-shadow: 0 12px 30px rgba(0, 0, 0, .15), inset 0 0 0 1px var(--line-2); }
:root[data-theme="light"] .stage { box-shadow: 0 14px 34px rgba(0, 0, 0, .22); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  /* Scroll only: no pinch or double-tap zoom of the page (blockPageZoom() covers iOS). */
  touch-action: pan-x pan-y;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input { -webkit-appearance: none; appearance: none; }
img { display: block; max-width: 100%; }
svg { display: block; }

#app {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--vv-top);
  height: var(--app-h);
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
}

.screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ic {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--card-2);
  color: var(--text);
  transition: transform .15s ease, background .2s ease;
}
.ic svg { width: 22px; height: 22px; }
.ic:active { transform: scale(.92); }
.ic.accent { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(255, 77, 46, .35); }
.ic.ghost { background: transparent; width: 38px; height: 38px; }

.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  width: 100%;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .1px;
  box-shadow: 0 10px 28px rgba(255, 64, 64, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s ease, filter .2s ease;
}
.primary svg { width: 20px; height: 20px; }
.primary:active { transform: scale(.97); filter: brightness(.95); }
.primary:disabled { opacity: .6; }

.ava {
  --h: 20;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 40) 70% 42%));
}
.ava img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- home ---------- */

.home {
  overflow-y: auto;
  overflow-x: hidden;
  padding: calc(10px + var(--safe-t)) 16px calc(28px + var(--safe-b));
  gap: 14px;
  scrollbar-width: none;
  background:
    radial-gradient(120% 50% at 50% -10%, var(--home-glow), transparent 60%),
    var(--bg);
}
.home::-webkit-scrollbar { display: none; }
.home > * { flex: 0 0 auto; }

.me-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 14px 12px 14px 16px;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  text-align: left;
  color: #fff;
  background: #121216;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: transform .15s ease;
}
.me-card:active { transform: scale(.98); }
.me-row { display: flex; gap: 8px; }
.me-row .me-card { flex: 1; min-width: 0; }
.me-side { flex: 0 0 52px; display: flex; flex-direction: column; gap: 6px; }
.me-gear {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--muted);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .15s ease;
}
.me-gear svg { width: 21px; height: 21px; }
.me-gear:active { transform: scale(.94); }
.me-shop {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(80% 80% at 50% 70%, rgba(255, 150, 60, .28), transparent 70%),
    var(--card);
  box-shadow: inset 0 0 0 1px rgba(255, 170, 80, .22);
}
.me-shop img { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45)); animation: shop-bob 3.2s ease-in-out infinite; }
@keyframes shop-bob { 50% { transform: translateY(-2px) rotate(-5deg); } }
.me-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
}
.me-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(8, 8, 12, .72) 0%, rgba(8, 8, 12, .42) 60%, rgba(8, 8, 12, .2) 100%);
}
.me-card .framed { margin: 2px; }
.daily {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 10px 12px 10px 8px;
  border: 1.5px solid transparent;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  text-align: left;
  color: #fff;
  background:
    linear-gradient(115deg, #2a1552, #1a0f33 55%, #2b1a0a) padding-box,
    linear-gradient(115deg, #ffe27a, #ff9f2e 40%, #b04dff 75%, #ffe27a) border-box;
  background-size: 100% 100%, 300% 100%;
  box-shadow: 0 10px 28px rgba(140, 60, 255, .22), 0 4px 14px rgba(255, 160, 40, .16);
  animation: daily-border 6s linear infinite;
  transition: transform .12s ease;
}
@keyframes daily-border { to { background-position: 0 0, 300% 0; } }
.daily[hidden] { display: none; }
.daily:active { transform: scale(.97); }
.daily-glow {
  position: absolute;
  left: -10px;
  top: 50%;
  z-index: -1;
  width: 110px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 70, .45), transparent 65%);
  transform: translateY(-50%);
  animation: daily-glow 2.6s ease-in-out infinite alternate;
}
@keyframes daily-glow { to { opacity: .55; transform: translateY(-50%) scale(1.2); } }
.daily-gift { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); animation: gift-wiggle 3.2s ease-in-out infinite; }
@keyframes gift-wiggle {
  0%, 70%, 100% { transform: rotate(0) translateY(0); }
  76% { transform: rotate(-8deg) translateY(-3px); }
  82% { transform: rotate(7deg) translateY(-3px); }
  88% { transform: rotate(-4deg) translateY(0); }
}
.daily-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.daily-text b { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.daily-text small { font-size: 13px; font-weight: 600; color: #ffd666; }
.bonus-row { display: flex; gap: 10px; }
.bonus-row[hidden] { display: none; }
.bonus-row .daily { flex: 1 1 0; min-width: 0; min-height: 66px; gap: 8px; padding: 8px 10px 8px 6px; border-radius: 18px; }
.bonus-row .daily-glow { width: 84px; }
.bonus-row .daily-gift { flex: 0 0 auto; width: 46px; height: 46px; }
.bonus-row .daily-text b { font-size: 14.5px; line-height: 1.15; }
.bonus-row .daily-text small { font-size: 12.5px; line-height: 1.2; }
.spin-icon { animation: spin-idle 8s linear infinite; }
@keyframes spin-idle { to { transform: rotate(360deg); } }
.bonus-btn:not(:disabled)::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: skewX(-20deg);
  animation: btn-shine 2.8s ease-in-out infinite;
}
@keyframes btn-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.me-ava { width: 54px; height: 54px; font-size: 20px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 6px 16px rgba(0, 0, 0, .4); }
.me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.me-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.me-name { font-size: 18px; font-weight: 700; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.me-stats { display: flex; gap: 14px; font-size: 12.5px; color: rgba(255, 255, 255, .72); white-space: nowrap; }
.me-stats b { font-size: 15px; font-weight: 800; color: #fff; }
.me-stats small { font-size: 12px; }
.me-chev { width: 20px; height: 20px; flex: 0 0 auto; color: rgba(255, 255, 255, .6); }

.vip-tag {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  height: 17px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1;
  vertical-align: 2px;
  color: #3a2300;
  -webkit-text-fill-color: #3a2300;
  background: linear-gradient(135deg, #fff1b8, #f5c542 50%, #d8901a);
  box-shadow: 0 2px 8px rgba(245, 180, 40, .35);
  text-shadow: none;
}
.me-line .vip-tag { margin-left: 0; }
.shimmer, .nick {
  background-image: var(--nick);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
.shimmer {
  --nick: linear-gradient(100deg, #ffd66b 0%, #fff6d8 18%, #ff9ec4 36%, #b58cff 54%, #8fd3ff 72%, #ffd66b 100%);
  background-size: 250% 100%;
  animation: vip-shimmer 4s linear infinite;
}
:root[data-theme="light"] .shimmer {
  --nick: linear-gradient(100deg, #c07a00 0%, #e0a100 18%, #d6336c 36%, #7048e8 54%, #1c7ed6 72%, #c07a00 100%);
}
.shimmer .vip-tag, .nick .vip-tag { -webkit-text-fill-color: #3a2300; }
@keyframes vip-shimmer { to { background-position: -166.667% 0; } }
.nick {
  --nick: var(--nick-d);
  background-size: 250% 100%;
  animation: vip-shimmer var(--nick-speed, 4s) linear infinite;
}
:root[data-theme="light"] .nick { --nick: var(--nick-l, var(--nick-d)); }
.nick-shine {
  background-image: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .95) 50%, transparent 60%), var(--nick);
  background-size: 300% 100%, 100% 100%;
  background-repeat: no-repeat;
  animation: nick-shine 2.8s ease-in-out infinite;
}
.shimmer.nick-shine, .nick.nick-shine { background-size: 300% 100%, 250% 100%; background-repeat: no-repeat, repeat; animation: nick-shine-flow var(--nick-speed, 4s) linear infinite; }
.nick-glow { filter: drop-shadow(0 0 5px var(--glow, #ffd66b)) drop-shadow(0 0 1px var(--glow, #ffd66b)); }

/* Animated nick effects (fix17): own slot on top of the colour, plain nick or VIP shimmer. Only
   filter/opacity and an ::after glyph, so they work on inline names and on gradient (background-clip)
   text. The glyph stays inline and untransformed: an animated inline-block/transformed glyph inside
   gradient (background-clip) text gets a stray copy painted at the start in Chromium.
   The base rule is the still look; «Экономно» / reduced motion keep only that. */
.nfx { --fx-anim: none; animation: var(--fx-anim); }
.shimmer.nfx { animation: vip-shimmer 4s linear infinite, var(--fx-anim); }
.nick.nfx { animation: vip-shimmer var(--nick-speed, 4s) linear infinite, var(--fx-anim); }
.nfx-neon {
  --fx-anim: nfx-neon 1.9s ease-in-out infinite;
  filter: drop-shadow(0 0 3px var(--glow, #ff4fd8)) drop-shadow(0 0 1px var(--glow, #ff4fd8));
}
@keyframes nfx-neon {
  0%, 100% { filter: drop-shadow(0 0 2px var(--glow, #ff4fd8)) drop-shadow(0 0 1px var(--glow, #ff4fd8)); }
  50% { filter: drop-shadow(0 0 8px var(--glow, #ff4fd8)) drop-shadow(0 0 2px var(--glow, #ff4fd8)) brightness(1.18); }
}
.nfx-sparkle { --fx-anim: nfx-glint 2.6s ease-in-out infinite; filter: drop-shadow(0 0 2px rgba(255, 236, 160, .55)); }
@keyframes nfx-glint { 0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 236, 160, .55)); } 45% { filter: drop-shadow(0 0 5px rgba(255, 244, 200, .95)) brightness(1.2); } }
.nfx-hearts { filter: drop-shadow(0 0 3px rgba(255, 95, 143, .55)); }
.nfx-ice {
  --fx-anim: nfx-ice 3.2s ease-in-out infinite;
  filter: drop-shadow(0 0 1px #e6fbff) drop-shadow(0 0 4px #6fd3ff);
}
@keyframes nfx-ice {
  0%, 100% { filter: drop-shadow(0 0 1px #e6fbff) drop-shadow(0 0 4px #6fd3ff); }
  50% { filter: drop-shadow(0 0 1px #ffffff) drop-shadow(0 0 7px #9fe6ff) brightness(1.12) saturate(.8); }
}
.nfx-fire {
  --fx-anim: nfx-fire .9s steps(6) infinite;
  filter: drop-shadow(0 -1px 2px #ffd34d) drop-shadow(0 -3px 4px #ff7a00) drop-shadow(0 -4px 7px rgba(255, 45, 0, .8));
}
@keyframes nfx-fire {
  0%, 100% { filter: drop-shadow(0 -1px 2px #ffd34d) drop-shadow(0 -3px 4px #ff7a00) drop-shadow(0 -4px 7px rgba(255, 45, 0, .8)); }
  25% { filter: drop-shadow(1px -2px 2px #ffe066) drop-shadow(-1px -4px 5px #ff8a00) drop-shadow(0 -6px 9px rgba(255, 60, 0, .85)); }
  50% { filter: drop-shadow(0 -1px 2px #ffc400) drop-shadow(1px -3px 4px #ff5a00) drop-shadow(0 -5px 6px rgba(255, 30, 0, .75)); }
  75% { filter: drop-shadow(-1px -2px 2px #ffd34d) drop-shadow(0 -4px 5px #ff7a00) drop-shadow(1px -7px 10px rgba(255, 70, 0, .8)); }
}
.nfx-glitch {
  --fx-anim: nfx-glitch 2.4s steps(1) infinite;
  filter: drop-shadow(1px 0 0 rgba(255, 43, 214, .75)) drop-shadow(-1px 0 0 rgba(43, 243, 255, .75));
}
@keyframes nfx-glitch {
  0%, 100% { filter: drop-shadow(1px 0 0 rgba(255, 43, 214, .75)) drop-shadow(-1px 0 0 rgba(43, 243, 255, .75)); }
  8% { filter: drop-shadow(2px 0 0 #ff2bd6) drop-shadow(-2px 1px 0 #2bf3ff) contrast(1.3); }
  11% { filter: drop-shadow(-1.5px 0 0 #ff2bd6) drop-shadow(1.5px -1px 0 #2bf3ff); }
  14% { filter: drop-shadow(1px 0 0 rgba(255, 43, 214, .75)) drop-shadow(-1px 0 0 rgba(43, 243, 255, .75)); }
  62% { filter: drop-shadow(2.5px 0 0 #ff2bd6) drop-shadow(-2.5px 0 0 #2bf3ff) hue-rotate(40deg); }
  65% { filter: drop-shadow(1px 0 0 rgba(255, 43, 214, .75)) drop-shadow(-1px 0 0 rgba(43, 243, 255, .75)); }
}
.nfx-electric {
  --fx-anim: nfx-electric 2.2s linear infinite;
  filter: drop-shadow(0 0 2px #7aa8ff) drop-shadow(0 0 1px #c9d8ff);
}
@keyframes nfx-electric {
  0%, 100% { filter: drop-shadow(0 0 2px #7aa8ff) drop-shadow(0 0 1px #c9d8ff); }
  40% { filter: drop-shadow(0 0 3px #7aa8ff) drop-shadow(0 0 1px #c9d8ff); }
  42% { filter: drop-shadow(0 0 9px #a9c4ff) drop-shadow(0 0 2px #ffffff) brightness(1.45); }
  45% { filter: drop-shadow(0 0 2px #7aa8ff) drop-shadow(0 0 1px #c9d8ff); }
  48% { filter: drop-shadow(0 0 7px #a9c4ff) drop-shadow(0 0 2px #ffffff) brightness(1.3); }
  52% { filter: drop-shadow(0 0 2px #7aa8ff) drop-shadow(0 0 1px #c9d8ff); }
}
.nfx-rainbow { --fx-anim: nfx-hue 3.5s linear infinite; filter: drop-shadow(0 0 3px rgba(255, 255, 255, .25)); }
@keyframes nfx-hue { from { filter: hue-rotate(0deg) drop-shadow(0 0 3px rgba(255, 255, 255, .25)); } to { filter: hue-rotate(360deg) drop-shadow(0 0 3px rgba(255, 255, 255, .25)); } }
/* Letter effects (Капель, Голо-развёртка): app.js splitNick puts each letter in a .ch span; every
   letter paints its own slice of the nick gradient (--n letters, letter --i, ~.6em each), so no
   transformed glyph sits inside a background-clip parent. The parent only drives the gradient flow
   (--nfx-shift, one full gradient tile per loop, like vip-shimmer). */
@property --nfx-shift { syntax: "<length>"; inherits: true; initial-value: 0px; }
.nfx-split .ch { display: inline-block; white-space: pre; }
.nick.nfx-split, .shimmer.nfx-split { background-image: none; animation: nfx-flow var(--nick-speed, 4s) linear infinite; }
@keyframes nfx-flow { to { --nfx-shift: calc(var(--n, 1) * 1.5em); } }
.nick.nfx-split .ch, .shimmer.nfx-split .ch {
  background-image: var(--nick);
  background-size: calc(var(--n, 1) * 1.5em) 100%;
  background-position: calc(var(--nfx-shift) - var(--i, 0) * .6em) 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Капель: letters drop in one by one, hold, fade, again. */
.nfx-drop.nfx-split .ch { animation: nfx-drop 4.2s cubic-bezier(.3, 1.4, .5, 1) infinite backwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes nfx-drop {
  0% { transform: translateY(-.75em); opacity: 0; }
  10% { transform: translateY(0); opacity: 1; }
  78% { transform: translateY(0); opacity: 1; }
  90%, 100% { transform: translateY(.12em); opacity: 0; }
}
.nfx-drop:not(.nfx-split) { --fx-anim: nfx-drop-whole 4.2s ease infinite; }
@keyframes nfx-drop-whole { 0% { opacity: 0; } 10%, 78% { opacity: 1; } 90%, 100% { opacity: 0; } }
/* Голо-развёртка: fine scanlines and a bright band rolling down; letters ripple as it passes. */
.nfx-holo.nfx-split .ch {
  background-image:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .28) 0 1px, rgba(255, 255, 255, 0) 1px 3px),
    linear-gradient(180deg, transparent 35%, rgba(200, 255, 255, .9) 48%, rgba(255, 200, 255, .7) 52%, transparent 65%),
    var(--nick, linear-gradient(currentColor, currentColor));
  background-size: 100% 6px, 100% 300%, calc(var(--n, 1) * 1.5em) 100%;
  background-position: 0 0, 0 0, calc(var(--nfx-shift) - var(--i, 0) * .6em) 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nfx-holo-band 2.6s linear infinite, nfx-holo-wave 2.6s ease-in-out infinite;
  animation-delay: 0s, calc(var(--i, 0) * 60ms);
}
@keyframes nfx-holo-band {
  from { background-position: 0 0, 0 110%, calc(var(--nfx-shift) - var(--i, 0) * .6em) 0; }
  to { background-position: 0 6px, 0 -10%, calc(var(--nfx-shift) - var(--i, 0) * .6em) 0; }
}
@keyframes nfx-holo-wave {
  0%, 40%, 100% { transform: none; filter: none; }
  48% { transform: translateX(1.5px) skewX(-8deg); filter: hue-rotate(40deg) brightness(1.25); }
  56% { transform: translateX(-1px) skewX(4deg); filter: hue-rotate(-20deg); }
}
.nfx-holo:not(.nfx-split) { --fx-anim: nfx-hue 3.5s linear infinite; }
.nfx-split > .ch.emo { background-image: none !important; -webkit-text-fill-color: #fff; }
/* Four collection effects move individual letters, keeping the name readable and its gradient intact. */
.nfx-raintrail { filter: drop-shadow(0 1px 2px #6ae8ff); }
.nfx-raintrail.nfx-split .ch:not(.emo) { animation: nfx-raintrail 3.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes nfx-raintrail {
  0%, 16%, 100% { transform: translateY(0); filter: drop-shadow(0 0 0 transparent); }
  26% { transform: translateY(-2px); filter: drop-shadow(0 3px 2px #56d9ff); }
  38% { transform: translateY(0); filter: drop-shadow(0 5px 3px rgba(70, 190, 255, .65)); }
}
.nfx-timepulse { filter: drop-shadow(0 0 2px #ffbe70); }
.nfx-timepulse.nfx-split .ch:not(.emo) { animation: nfx-timepulse 3.6s steps(1) infinite; animation-delay: calc(var(--i, 0) * 130ms); }
@keyframes nfx-timepulse {
  0%, 12%, 100% { transform: none; filter: none; }
  13%, 18% { transform: translateY(-2px); filter: drop-shadow(0 0 5px #ffd381) brightness(1.35); }
  19% { transform: none; filter: none; }
}
.nfx-starbubble { filter: drop-shadow(0 0 2px #a4c8ff); }
.nfx-starbubble.nfx-split .ch:not(.emo) { animation: nfx-starbubble 3.8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 95ms); }
@keyframes nfx-starbubble {
  0%, 28%, 100% { transform: translateY(0) scale(1); filter: none; }
  38% { transform: translateY(-3px) scale(1.07); filter: drop-shadow(0 0 5px #d6c7ff); }
  52% { transform: translateY(0) scale(1); filter: none; }
}
.nfx-honeylight { filter: drop-shadow(0 0 2px #ffc863); }
.nfx-honeylight.nfx-split .ch:not(.emo) { animation: nfx-honeylight 4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 100ms); }
@keyframes nfx-honeylight {
  0%, 20%, 100% { filter: none; }
  34% { filter: drop-shadow(0 0 4px #ffe499) drop-shadow(0 0 7px #ffc55c) brightness(1.22); }
  52% { filter: none; }
}
/* Туман: a soft blurred copy of the name drifts off to the right and dissolves. */
/* The name clips its own box (ellipsis), so the drifting copy gets room inside it: padding around
   the text, taken back by negative margins — the text, its centring and its ellipsis stay where they
   were. The wider box lets taps through to what is under it (the row, the badge…). */
.nfx-mist { position: relative; padding: 4px 24px; margin: -4px -24px; pointer-events: none; }
.seat-nick.nfx-mist { position: absolute; margin: -4px 0 0; max-width: calc(58px + 48px); }
.nick-sample.nfx-mist { max-width: calc(100% + 48px); }
.nfx-mist::after {
  content: attr(data-nfx);
  position: absolute;
  left: 24px;
  top: 4px;
  pointer-events: none;
  white-space: pre;
  background-image: var(--nick, linear-gradient(currentColor, currentColor));
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: blur(3px);
  opacity: 0;
  animation: nfx-mist 3.6s ease-out infinite;
}
@keyframes nfx-mist {
  0% { transform: translate(0, 0) scale(1); opacity: 0; filter: blur(1px); }
  15% { opacity: .75; }
  100% { transform: translate(18px, -3px) scale(1.06); opacity: 0; filter: blur(6px); }
}
/* Печать: the name is typed letter by letter (each one strikes in with a flash of ink), holds, and is
   erased in the same order. */
.nfx-print.nfx-split .ch { animation: nfx-print 4.8s cubic-bezier(.2, .9, .3, 1.2) infinite backwards; animation-delay: calc(var(--i, 0) * 85ms); }
@keyframes nfx-print {
  0% { opacity: 0; transform: translateY(-.08em) scale(1.7); filter: blur(2px); }
  3% { opacity: 1; transform: scale(.88); filter: blur(0) drop-shadow(0 0 5px var(--glow, #fff)) brightness(1.6); }
  6% { transform: none; filter: none; }
  76% { opacity: 1; transform: none; }
  80%, 100% { opacity: 0; transform: translateY(.06em) scale(.94); }
}
.nfx-print:not(.nfx-split) { --fx-anim: nfx-drop-whole 4.8s ease infinite; }
/* Искра по контуру: a thin outline of the name with a bright spark running round it (top edge left
   to right, bottom edge back). The outline is a copy of the name (data-nfx) laid over it. */
@property --nfx-sx { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --nfx-sy { syntax: "<percentage>"; inherits: false; initial-value: 15%; }
.nfx-contour { position: relative; filter: drop-shadow(0 0 2px rgba(255, 214, 120, .35)); }
.nfx-contour::after {
  content: attr(data-nfx);
  position: absolute;
  inset: 0;
  padding: inherit;
  white-space: pre;
  pointer-events: none;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .09em #fffbe8;
  -webkit-mask-image: radial-gradient(circle .75em at var(--nfx-sx) var(--nfx-sy), #000 0, #000 45%, transparent 100%), linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .3));
  mask-image: radial-gradient(circle .75em at var(--nfx-sx) var(--nfx-sy), #000 0, #000 45%, transparent 100%), linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .3));
  filter: drop-shadow(0 0 2px #ffe08a) drop-shadow(0 0 6px rgba(255, 160, 30, .95));
  animation: nfx-contour 2.8s linear infinite;
}
@keyframes nfx-contour {
  0% { --nfx-sx: -5%; --nfx-sy: 22%; }
  45% { --nfx-sx: 105%; --nfx-sy: 22%; }
  50% { --nfx-sx: 105%; --nfx-sy: 80%; }
  95% { --nfx-sx: -5%; --nfx-sy: 80%; }
  100% { --nfx-sx: -5%; --nfx-sy: 22%; }
}
/* Отражение: the name stands on glass — a fading mirrored copy below it, rippling, with a glint
   sliding along. The box gets room below (taken back by the negative margin). */
.nfx-mirror { position: relative; padding-bottom: .8em; margin-bottom: -.8em; pointer-events: none; }
.nfx-mirror::after {
  content: attr(data-nfx);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: inherit;
  padding-bottom: 0;
  white-space: pre;
  pointer-events: none;
  background-image: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .9) 50%, transparent 60%), var(--nick, linear-gradient(currentColor, currentColor));
  background-size: 300% 100%, 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transform-origin: 50% 88%;
  transform: scaleY(-.8);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .6) 15%, transparent 80%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, .6) 15%, transparent 80%);
  animation: nfx-mirror 3.4s ease-in-out infinite;
}
@keyframes nfx-mirror {
  0%, 100% { transform: scaleY(-.8) skewX(0); background-position: 120% 0, 0 0; filter: blur(0); }
  30% { transform: scaleY(-.84) skewX(-6deg); filter: blur(.4px); }
  60% { transform: scaleY(-.78) skewX(5deg); background-position: -20% 0, 0 0; filter: blur(.2px); }
}
@keyframes nick-shine { 0% { background-position: 120% 0, 0 0; } 60%, 100% { background-position: -20% 0, 0 0; } }
@keyframes nick-shine-flow {
  0% { background-position: 120% 0, 0 0; }
  60% { background-position: -20% 0, -100% 0; }
  100% { background-position: -20% 0, -166.667% 0; }
}

.aura {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 150%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--aura);
  -webkit-mask: radial-gradient(closest-side, transparent 58%, #000 70%, rgba(0, 0, 0, .5) 84%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 58%, #000 70%, rgba(0, 0, 0, .5) 84%, transparent 100%);
  filter: blur(2px);
  pointer-events: none;
  animation: aura-spin 5s linear infinite;
}
.aura::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  box-shadow: 0 0 12px 3px var(--a1);
  opacity: .55;
  animation: aura-pulse 2.4s ease-in-out infinite;
}
@keyframes aura-spin { to { rotate: 360deg; } }
@keyframes aura-pulse { 50% { opacity: .15; scale: 1.06; } }
.seat > .aura {
  left: calc(50% + var(--ax, 0px));
  top: var(--ac);
  z-index: 1;
  width: calc(var(--as, 28px) + 14px);
  filter: none;
  -webkit-mask: radial-gradient(closest-side, transparent 62%, #000 72%, #000 82%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 62%, #000 72%, #000 82%, transparent 100%);
}

.framed { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; isolation: isolate; }
.framed::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  width: calc(100% * var(--fs, 1.35));
  aspect-ratio: 1;
  transform: translate(-50%, calc(var(--fy, 50) * -1%));
  background: center / contain no-repeat;
  pointer-events: none;
}
.framed[data-frame]::after { display: block; }
.framed[data-frame="s1"] { --fs:1.7; }
.framed[data-frame="s1"]::after { background-image:url('/static/img/profile/frame-s1.svg?v=134'); }
.framed[data-frame="fire"] { --fs: 2.28; }
.framed[data-frame="ice"] { --fs: 1.84; }
.framed[data-frame="gold"] { --fs: 1.42; }
.framed[data-frame="electric"] { --fs: 1.46; }
.framed[data-frame="roses"] { --fs: 1.77; }
.framed[data-frame="cosmos"] { --fs: 1.57; }
.framed[data-frame="lava"] { --fs: 2.03; }
.framed[data-frame="hearts"] { --fs: 1.72; }
.framed[data-frame="smoke"] { --fs: 2.55; }
.framed[data-frame="crystal"] { --fs: 1.95; }
.framed[data-frame="fire"]::after { background-image: url("/static/img/profile/frame-fire.webp?v=61"); }
.framed[data-frame="ice"]::after { background-image: url("/static/img/profile/frame-ice.webp?v=61"); }
.framed[data-frame="gold"]::after { background-image: url("/static/img/profile/frame-gold.webp?v=61"); }
.framed[data-frame="electric"]::after { background-image: url("/static/img/profile/frame-electric.webp?v=61"); }
.framed[data-frame="roses"]::after { background-image: url("/static/img/profile/frame-roses.webp?v=61"); }
.framed[data-frame="cosmos"]::after { background-image: url("/static/img/profile/frame-cosmos.webp?v=61"); }
.framed[data-frame="lava"]::after { background-image: url("/static/img/profile/frame-lava.webp?v=61"); }
.framed[data-frame="hearts"]::after { background-image: url("/static/img/profile/frame-hearts.webp?v=61"); }
.framed[data-frame="smoke"]::after { background-image: url("/static/img/profile/frame-smoke.webp?v=61"); }
.framed[data-frame="crystal"]::after { background-image: url("/static/img/profile/frame-crystal.webp?v=61"); }
.framed[data-frame="vines"] { --fs: 1.37; }
.framed[data-frame="candy"] { --fs: 1.44; }
.framed[data-frame="pearl"] { --fs: 1.29; }
.framed[data-frame="neon"] { --fs: 1.43; }
.framed[data-frame="dragon"] { --fs: 1.56; }
.framed[data-frame="wings"] { --fs: 2.13; }
.framed[data-frame="vines"]::after { background-image: url("/static/img/profile/frame-vines.webp?v=61"); }
.framed[data-frame="candy"]::after { background-image: url("/static/img/profile/frame-candy.webp?v=61"); }
.framed[data-frame="pearl"]::after { background-image: url("/static/img/profile/frame-pearl.webp?v=61"); }
.framed[data-frame="neon"]::after { background-image: url("/static/img/profile/frame-neon.webp?v=61"); }
.framed[data-frame="dragon"]::after { background-image: url("/static/img/profile/frame-dragon.webp?v=61"); }
.framed[data-frame="wings"]::after { background-image: url("/static/img/profile/frame-wings.webp?v=61"); }
.framed[data-frame="web"] { --fs: 1.56; }
.framed[data-frame="bond"] { --fs: 1.31; }
.framed[data-frame="web"]::after { background-image: url("/static/img/profile/frame-web.webp?v=61"); }
.framed[data-frame="bond"]::after { background-image: url("/static/img/profile/frame-bond.webp?v=61"); }
.framed[data-frame="moon"] { --fs: 1.37; }
.framed[data-frame="peacock"] { --fs: 1.89; }
.framed[data-frame="gears"] { --fs: 1.70; }
.framed[data-frame="crown"] { --fs: 2.38; }
.framed[data-frame="moon"]::after { background-image: url("/static/img/profile/frame-moon.webp?v=1"); }
.framed[data-frame="peacock"]::after { background-image: url("/static/img/profile/frame-peacock.webp?v=1"); }
.framed[data-frame="gears"]::after { background-image: url("/static/img/profile/frame-gears.webp?v=1"); }
.framed[data-frame="crown"]::after { background-image: url("/static/img/profile/frame-crown.webp?v=1"); }
.framed.has-live::after { display: none; }
.me-info, .pf-line, .pf-sub, .person-name, .msg .bubble { position: relative; z-index: 1; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.frame-live {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% * var(--fs, 1.35));
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.frame-live > i { position: absolute; inset: 0; background: center / contain no-repeat; }
.fl-warp { will-change: filter; }
.framed[data-frame="electric"] .fl-warp { animation: zap 1.3s steps(1) infinite; }
.framed[data-frame="lava"] .fl-warp { animation: lava-pulse 2.6s ease-in-out infinite; }
.framed[data-frame="fire"] .fl-warp { animation: fire-flicker 1.8s ease-in-out infinite; }
.fl-spin .fl-main { animation: portal-spin 40s linear infinite; }
.fl-beat .fl-main { animation: heartbeat 1.6s ease-in-out infinite; }
.fl-flicker .fl-main { animation: neon-flicker 3.2s linear infinite; }
.frame-live > .fl-cog { inset: auto; border-radius: 50%; background-repeat: no-repeat; animation: cog-turn 9s linear infinite; }
@keyframes cog-turn { to { transform: rotate(360deg); } }
.fl-glow { filter: sepia(.5) saturate(1.8) brightness(1.4) drop-shadow(0 0 3px #fff3c0) drop-shadow(0 0 8px rgba(255, 205, 90, .9)); animation: moon-glow 2.8s ease-in-out infinite; }
@keyframes moon-glow {
  0%, 100% { filter: sepia(.45) saturate(1.7) brightness(1.3) drop-shadow(0 0 3px #fff3c0) drop-shadow(0 0 7px rgba(255, 205, 90, .8)); }
  50% { filter: sepia(.6) saturate(2) brightness(1.7) drop-shadow(0 0 4px #fffbe6) drop-shadow(0 0 12px rgba(255, 195, 70, 1)) drop-shadow(0 0 22px rgba(255, 170, 60, .7)); }
}
@keyframes neon-flicker {
  0%, 18%, 22%, 60%, 64%, 100% { opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 80, 220, .7)) drop-shadow(0 0 8px rgba(60, 200, 255, .5)); }
  20%, 62% { opacity: .55; filter: none; }
}
/* fix38: the masked glare band leaked a 1px white line on the box edge (Chromium, fractional
   sizes). Only the glare is clipped 1.5px inside the box; the frame art itself isn't. */
.fl-shine { clip-path: inset(1.5px); }
.fl-shine svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.fl-band { animation: frame-shine 3.4s ease-in-out infinite; }
.fl-p {
  position: absolute;
  width: 11%;
  height: auto;
  translate: -50% -50%;
  opacity: 0;
  animation: fl-twinkle 2.6s ease-in-out infinite;
}
.fl-p.fall { width: 9%; animation-name: fl-fall; }
.fl-beat .fl-p { animation-name: fl-rise; }
@keyframes zap { 0%, 100% { opacity: 1; } 30% { opacity: .55; } 34% { opacity: 1; } 62% { opacity: .75; } 66% { opacity: 1; } }
@keyframes lava-pulse { 0%, 100% { filter: url(#warp-lava) brightness(.9); } 50% { filter: url(#warp-lava) brightness(1.35) saturate(1.2); } }
@keyframes fire-flicker { 0%, 100% { opacity: 1; } 40% { opacity: .88; } 70% { opacity: .96; } }
@keyframes heartbeat { 0%, 40%, 100% { scale: 1; } 12% { scale: 1.05; } 24% { scale: .99; } 32% { scale: 1.03; } }
@keyframes frame-shine { 0% { transform: translateX(0); } 60%, 100% { transform: translateX(165px); } }
@keyframes fl-twinkle { 0%, 100% { opacity: 0; scale: .3; } 50% { opacity: 1; scale: 1; } }
@keyframes fl-fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(12px, 620%) rotate(200deg); }
}
@keyframes fl-rise {
  0% { opacity: 0; transform: translateY(0) scale(.5); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-360%) scale(1); }
}

.hero {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: #0b0708;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06);
  isolation: isolate;
}
.hero-scene {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity .9s ease, transform 1.6s cubic-bezier(.2, .7, .2, 1);
}
.hero-art.ready {
  opacity: 1;
  transform: scale(1.04);
  animation: drift 16s ease-in-out 1.6s infinite alternate;
}
.hero-scene::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 38%;
  width: 62%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 70, 50, .38), rgba(255, 61, 110, .12) 45%, transparent 70%);
  mix-blend-mode: screen;
  animation: glow 4.5s ease-in-out infinite;
  pointer-events: none;
}
.spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffd9c7;
  box-shadow: 0 0 8px 2px rgba(255, 120, 80, .7);
  opacity: 0;
  animation: spark 6s ease-in-out var(--d) infinite;
}
.hero-body {
  position: relative;
  z-index: 1;
  margin-top: -84px;
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1.6px;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .6);
}
.shine { position: relative; overflow: hidden; }
.shine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-18deg);
  animation: sweep 5s ease-in-out 1.2s infinite;
}
@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-2%, -1.5%, 0); }
}
@keyframes glow {
  0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}
@keyframes spark {
  0% { opacity: 0; transform: translate3d(0, 10px, 0) scale(.6); }
  20% { opacity: .9; }
  70% { opacity: .5; }
  100% { opacity: 0; transform: translate3d(14px, -46px, 0) scale(1); }
}
@keyframes sweep {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}

.join {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.join > small { padding: 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.join-row { display: flex; gap: 8px; }
.cells {
  position: relative;
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  cursor: text;
}
.cells input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  opacity: 0;
  font-size: 16px;
  color: transparent;
  caret-color: transparent;
  background: transparent;
}
.cell {
  position: relative;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 22px;
  font-weight: 800;
  transition: box-shadow .2s ease, background .2s ease;
}
.cell.fill { box-shadow: inset 0 0 0 1.5px rgba(255, 90, 54, .45); animation: cell .22s ease; }
.join.focus .cell.cur { box-shadow: inset 0 0 0 2px var(--accent); }
.join.focus .cell.cur::after {
  content: "";
  width: 2px;
  height: 22px;
  border-radius: 1px;
  background: var(--accent);
  animation: caret 1s steps(1) infinite;
}
.join-row button {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--card-3);
  color: var(--muted);
  transition: background .25s ease, color .25s ease, transform .15s ease, box-shadow .25s ease;
}
.join-row button:active { transform: scale(.92); }
.join-row button svg { width: 22px; height: 22px; }
.join.ready .join-row button { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(255, 64, 64, .35); }
.join.bad { animation: shake .45s ease; }
.join.bad .cell { box-shadow: inset 0 0 0 1.5px #ff4d4d; }
@keyframes cell { from { transform: scale(.86); } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.block { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.home-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-top: 4px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.home-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  transition: background .2s ease, color .2s ease;
}
.home-tabs button.on { background: var(--card-3); color: var(--text); }
.tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  font-weight: 800;
}
#tab-rooms, #tab-friends { display: flex; flex-direction: column; gap: 18px; }
#tab-rooms[hidden], #tab-friends[hidden] { display: none; }
.fr-list { display: flex; flex-direction: column; gap: 6px; }
.fr-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 800; color: var(--muted); background: var(--card-2); }
.fr-count:empty { display: none; }
#fr-in-block .fr-count { color: #fff; background: var(--grad); }
.fr-tools { display: flex; flex-direction: column; gap: 8px; }
.fr-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 15px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.fr-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.fr-search svg { flex: 0 0 auto; width: 18px; height: 18px; }
.fr-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 15px; }
.fr-search input::-webkit-search-cancel-button { filter: grayscale(1); }
.fr-sort button { height: 34px; font-size: 13.5px; }
.fr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 8px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.fr-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.fr-who .ava { width: 44px; height: 44px; font-size: 17px; }
/* A framed avatar gets a fixed slot and a smaller face, so big frames stay inside the row instead of spilling out and being clipped. */
.fr-who > .framed[data-frame] {
  --fa: clamp(28px, calc(58px / var(--fs, 1.4)), 40px);
  width: var(--fa);
  height: var(--fa);
  margin: calc((44px - var(--fa)) / 2) calc((56px - var(--fa)) / 2);
}
.fr-who > .framed[data-frame] .ava { width: 100%; height: 100%; font-size: 15px; }
.fr-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fr-text b { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-text small { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-text small.on { color: var(--ok); }
.fr-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fr-who .aura { width: 130%; }
.fr-bond { flex: 0 0 auto; padding: 1px 7px; border-radius: 8px; background: var(--card-2); color: var(--muted); font-size: 11.5px; font-style: normal; font-weight: 700; vertical-align: 1px; }
.fr-bond.on { background: linear-gradient(135deg, rgba(255, 92, 168, .25), rgba(124, 92, 255, .25)); color: #ffb3dc; }
:root[data-theme="light"] .fr-bond.on { background: linear-gradient(135deg, rgba(255, 92, 168, .16), rgba(124, 92, 255, .16)); color: #c2255c; }
.fr-bond:has(img) { display: inline-flex; align-items: center; gap: 3px; padding-left: 4px; }
.fr-bond img { width: 19px; height: 19px; margin: -3px 0; padding: 1px; border-radius: 50%; object-fit: contain; background: radial-gradient(circle at 50% 40%, #2c2344, #120e1e 72%); }
.fr-act {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--card-2);
  font-size: 13px;
  font-weight: 700;
}
.fr-act.accent { background: var(--grad); color: #fff; }
.pf-known { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; height: 24px; padding: 0 8px 0 3px; border-radius: 12px; color: var(--text); background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px var(--line); }
.pf-known img { width: 20px; height: 20px; padding: 1px; border-radius: 50%; object-fit: contain; background: radial-gradient(circle at 50% 40%, #2c2344, #120e1e 72%); }
.pf-known b { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pf-known.dim img, .kc-ic.dim { opacity: .4; filter: grayscale(.8); }
.pf-known.dim b { color: var(--muted); }
:root[data-theme="light"] .pf-known { background: rgba(0, 0, 0, .06); }
.pf-acts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; width: min(100%, 380px); margin-top: 10px; }
.pf-acts[hidden] { display: none; }
.pf-act {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 66px;
  padding: 9px 6px 8px;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 80, 60, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  overflow: hidden;
  transition: transform .14s ease, filter .14s ease;
}
.pf-act:active { transform: scale(.95); filter: brightness(1.1); }
.pf-act::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%) 160% 0 / 250% 100% no-repeat;
  animation: pa-sheen 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pa-sheen { 0%, 55% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
.pf-act.ghost::after { display: none; }
.pf-act.ghost {
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 8px 22px rgba(0, 0, 0, .25);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}
.pf-act.done .pa-ic { color: #7dffb2; }
.pf-act.bonded {
  background: linear-gradient(135deg, rgba(255, 92, 168, .5), rgba(124, 92, 255, .5));
  box-shadow: inset 0 0 0 1px rgba(255, 160, 220, .35), 0 8px 24px rgba(200, 80, 255, .3);
}
.pf-act.bonded .pa-ic svg { fill: currentColor; }
.pa-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.pa-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pa-label { max-width: 100%; font-size: 12.5px; font-weight: 700; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
:root[data-theme="light"] .pf-act.ghost { background: rgba(255, 255, 255, .55); color: #1d1d22; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 8px 22px rgba(0, 0, 0, .1); }
:root[data-theme="light"] .pf-act.ghost .pa-ic { background: rgba(0, 0, 0, .06); }
:root[data-theme="light"] .pf-act.done .pa-ic { color: #12b886; }
.block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.block h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(255, 77, 46, .5);
}

.empty-state {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 0 20px;
  border-radius: 24px;
  overflow: hidden;
  background: #0a0809;
  color: rgba(255, 255, 255, .7);
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line);
}
.empty-state img {
  width: min(78%, 300px);
  aspect-ratio: 1;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 45%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 45%, #000 45%, transparent 72%);
  animation: hover 6s ease-in-out infinite;
}
@keyframes hover { 50% { transform: translateY(-6px); } }

.home.enter > * { animation: enter .6s cubic-bezier(.2, .8, .2, 1) backwards; }
.home.enter > :nth-child(2) { animation-delay: .06s; }
.home.enter > :nth-child(3) { animation-delay: .14s; }
.home.enter > :nth-child(4) { animation-delay: .22s; }
.home.enter > :nth-child(5) { animation-delay: .3s; }
.new { animation: enter .5s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }

.lobby { display: flex; flex-direction: column; gap: 10px; }
.lobby.swipe {
  flex-direction: row;
  margin: -6px -16px;
  padding: 6px 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
}
.lobby.swipe::-webkit-scrollbar { display: none; }
.lobby.swipe > .lobby-card { flex: 0 0 86%; min-width: 0; scroll-snap-align: start; }
.lobby.swipe > .lobby-card:only-child { flex-basis: 100%; }
.lobby-card {
  display: flex;
  gap: 14px;
  padding: 10px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
  transition: transform .15s ease, background .2s ease;
}
.lobby-card:active { transform: scale(.98); background: var(--card-2); }
.lobby-art {
  position: relative;
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-2) center / cover no-repeat;
}
.lobby-art.empty { background-image: url("/static/img/mark.jpg?v=61"); }
.lobby-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 45%, rgba(0, 0, 0, .6));
}
.lobby-art .ava {
  position: absolute;
  z-index: 1;
  left: 7px;
  bottom: 7px;
  width: 30px;
  height: 30px;
  font-size: 13px;
  box-shadow: 0 0 0 2px var(--card), 0 4px 12px rgba(0, 0, 0, .5);
}
.lobby-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 3px 2px 2px 0;
}
.lobby-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lobby-room {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lobby-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.lobby-host {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-card .viewers { display: none; }
.live-go {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 77, 46, .3);
}
.viewers {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  background: var(--card-3);
  font-weight: 600;
  font-size: 12.5px;
}
.viewers svg { width: 14px; height: 14px; }
.viewers:has(.lobby-faces) { padding-left: 3px; }
.lobby-faces { display: flex; }
.lobby-faces .ava { width: 19px; height: 19px; font-size: 8.5px; box-shadow: 0 0 0 1.5px var(--card); }
.lobby-faces .ava + .ava { margin-left: -7px; }
.viewers.live { background: rgba(255, 77, 46, .16); color: var(--hot); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.viewers.live .dot { background: #ff4d2e; box-shadow: 0 0 0 3px rgba(255, 77, 46, .25); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255, 77, 46, 0); } }

/* ---------- room ---------- */

.room {
  touch-action: pan-x pan-y;
  padding-top: var(--safe-t);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.room::-webkit-scrollbar { display: none; }
.room > .panel { flex: 1 0 auto; min-height: 260px; height: 0; }

.top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  flex: 0 0 auto;
}
.net-bar {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-t) + 60px);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 6px 6px 6px 14px;
  border-radius: 20px;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  background: rgba(30, 24, 34, .92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: net-in .25s ease both;
}
.net-bar:has(#net-retry[hidden]) { padding-right: 14px; }
.net-bar button { height: 30px; padding: 0 12px; border-radius: 15px; color: #fff; font-weight: 800; background: var(--grad); }
@keyframes net-in { from { opacity: 0; transform: translate(-50%, -8px); } }
.room-head {
  flex: 1;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  padding: 0 4px;
}
.room-head b { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-head small { font-size: 12px; color: var(--muted); letter-spacing: 1.5px; font-weight: 600; }

.people-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px 0 5px;
  border-radius: 14px;
  background: var(--card-2);
  font-weight: 700;
  font-size: 14px;
  transition: opacity .2s ease;
}
.people-pill.off { opacity: .45; }
.video-btn { position: relative; display: none; }
:root:not(.split) .video-btn { display: grid; }
:root:not(.split) .room .tabs { display: none; }
.video-btn.on { background: color-mix(in srgb, var(--accent) 18%, var(--card-2)); color: var(--accent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.video-badge { position: absolute; top: -5px; right: -5px; margin: 0; box-shadow: 0 0 0 2px var(--bg); }
.stack { display: flex; }
.stack .ava { width: 28px; height: 28px; font-size: 12px; box-shadow: 0 0 0 2px var(--card-2); }
.stack .ava + .ava { margin-left: -10px; }
:root:not(.split) .room .top { gap: 6px; padding-left: 10px; padding-right: 10px; }
:root:not(.split) .room .top .ic { width: 38px; height: 38px; border-radius: 13px; }
:root:not(.split) .room .top .ic svg { width: 21px; height: 21px; }
:root:not(.split) .room .people-pill { height: 38px; gap: 5px; padding: 0 10px 0 5px; border-radius: 13px; }
:root:not(.split) .room .stack .ava:nth-child(n + 3) { display: none; }
:root:not(.split) .room-head { padding: 0 2px; }
:root:not(.split) .room-head b { font-size: 15px; }
:root:not(.split) .room-head small { letter-spacing: 1px; }

.stage-slot { padding: 0 12px; flex: 0 0 auto; }
.stage {
  --card: #131316;
  --card-2: #1b1b20;
  --card-3: #24242a;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #f5f4f2;
  --muted: #9b9aa2;
  --faint: #6c6b73;
  --sheet: #121215;
  --hot: #ff8b73;
  --ok: #7ee2a8;
  --ctl: #8fd3ff;
  color: var(--text);
  color-scheme: dark;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: #000 url("/static/img/stage.jpg?v=61") center / cover no-repeat;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line);
  isolation: isolate;
  transition: none;
}
.stage.has-video { background: #000; }
.player {
  position: absolute;
  left: var(--box-x, 0px);
  top: var(--box-y, 0px);
  width: var(--box-w, 100%);
  height: var(--box-h, 100%);
  overflow: hidden;
  background: #000;
  z-index: 0;
  border-radius: inherit;
}
.player:empty { background: transparent; }
.ambient {
  --x1: var(--box-x, 0px);
  --y1: var(--box-y, 0px);
  --x2: calc(var(--box-x, 0px) + var(--box-w, 100%));
  --y2: calc(var(--box-y, 0px) + var(--box-h, 100%));
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  /* iOS/Android WebViews don't clip a blurred (composited) child to the parent's radius; a mask
     makes this layer clip itself, so no square corner of the glow shows outside the frame. */
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
  background: #000;
  pointer-events: none;
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, var(--x1) var(--y1), var(--x2) var(--y1), var(--x2) var(--y2), var(--x1) var(--y2), var(--x1) var(--y1));
}
.ambient img, .ambient canvas {
  position: absolute;
  left: -12%;
  top: -12%;
  width: 124%;
  height: 124%;
  max-width: none;
  object-fit: cover;
  filter: blur(40px) saturate(1.4) brightness(.6);
}
/* The 32×18 frame is stretched with smooth filtering; that already reads as a heavy blur. */
.ambient canvas { image-rendering: auto; }
.player iframe {
  position: absolute;
  left: 0;
  top: -64px;
  width: 100%;
  height: calc(100% + 128px);
  border: 0;
  pointer-events: none;
}
/* fix38: the iframe keeps its offset in «tap» too, so the YouTube/VK title bar stays hidden. */
.stage.tap .player iframe { pointer-events: auto; }

.cover {
  position: absolute;
  left: var(--box-x, 0px);
  top: var(--box-y, 0px);
  width: var(--box-w, 100%);
  height: var(--box-h, 100%);
  z-index: 1;
  background: #000 center / cover no-repeat;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .25), rgba(0, 0, 0, .7));
}
.shield { position: absolute; inset: 0; z-index: 2; }
.yt-blocked {
  position: absolute;
  left: var(--box-x, 0px);
  top: var(--box-y, 0px);
  width: var(--box-w, 100%);
  height: var(--box-h, 100%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  background: #08080c;
  color: rgba(255, 255, 255, .86);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.yt-blocked[hidden] { display: none; }
.stage.tap .shield { pointer-events: none; }
.stage.tap .cover { display: none; }

.stage-pick {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.stage-pick svg { width: 28px; height: 28px; }

.controls {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility 0s linear .22s;
}
.controls.show { opacity: 1; visibility: visible; transition: opacity .22s ease; }
.controls.fading { will-change: opacity; }
.controls.show > *, .controls.show .c-row > *, .controls.show .seek { pointer-events: auto; }
.controls::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, transparent 28%, transparent 55%, rgba(0, 0, 0, .75) 100%);
  pointer-events: none;
}
.stage.tap .controls { display: none; }

.c-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
}
.c-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}
.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, .38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  transition: transform .15s ease;
}
.big-play svg { width: 28px; height: 28px; }
.big-play:active { transform: scale(.9); }
.big-play:disabled, .ic:disabled, .seek:disabled { opacity: .45; }

.i-pause, .i-muted, .i-shrink { display: none !important; }
.stage.playing .i-play { display: none !important; }
.stage.playing .i-pause { display: block !important; }
.stage.muted .i-sound { display: none !important; }
.stage.muted .i-muted { display: block !important; }
.stage.full .i-expand { display: none !important; }
.stage.full .i-shrink { display: block !important; }

.stage.viewer .big-play, .stage.viewer #pp { display: none !important; }
.stage.viewer .seek { pointer-events: none; }
.stage.viewer .seek::-webkit-slider-thumb { opacity: 0; }
.stage.viewer .seek::-moz-range-thumb { opacity: 0; }
.stage.viewer .seek:disabled { opacity: 1; }
.tabs.single { grid-template-columns: 1fr; }
.tabs.single .tab-ink { width: calc(100% - 8px); transform: none; }

.c-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 6px 4px;
}
.c-row { display: flex; align-items: center; gap: 0; height: 40px; min-width: 0; }
.c-row .ic svg { width: 21px; height: 21px; }
.c-row .ic.ghost { flex: 0 1 38px; min-width: 30px; }
.c-row .time { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.time { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 6px; white-space: nowrap; }
.dim { color: rgba(255, 255, 255, .6); }
.grow { flex: 1; }
.only-full { display: none !important; }

.seek {
  --p: 0%;
  display: block;
  width: calc(100% - 16px);
  margin: 0 8px;
  height: 18px;
  background: transparent;
  cursor: pointer;
}
.seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, .28) var(--p));
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 77, 46, .35);
}
.seek::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.seek::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--accent); }
.seek::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }

.menu {
  position: absolute;
  right: 10px;
  bottom: 62px;
  width: 230px;
  max-height: calc(100% - 76px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 18px;
  background: rgba(22, 22, 26, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), inset 0 0 0 1px var(--line-2);
  pointer-events: auto;
  animation: pop .16s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.menu button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
}
.menu button:active { background: rgba(255, 255, 255, .07); }
.menu .val { margin-left: auto; color: var(--muted); font-weight: 500; }
.menu .on { color: #ff8b73; font-weight: 700; }
.menu .on::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.menu .back { color: var(--muted); font-weight: 600; }
.menu .back svg { width: 18px; height: 18px; }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 4px 6px; }

.feed {
  position: absolute;
  z-index: 3;
  left: 14px;
  bottom: 70px;
  width: min(46%, 340px);
  display: none;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.feed-item {
  align-self: flex-start;
  max-width: 100%;
  padding: 7px 11px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13.5px;
  line-height: 1.3;
  animation: feed 7s ease forwards;
  word-break: break-word;
}
.feed-item b { margin-right: 6px; font-weight: 700; }
.stage.chatting .feed, .stage.chatting .controls { display: none; }
.stage.full .shield { touch-action: none; }
.fs-chat {
  position: absolute;
  z-index: 6;
  left: calc(12px + var(--in-l, 0px));
  right: calc(12px + var(--in-r, 0px));
  bottom: calc(10px + var(--in-b, 0px));
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  animation: pop .18s ease;
}
.fs-list { display: flex; flex-direction: column; gap: 6px; }
.fs-list .feed-item { animation: none; background: rgba(0, 0, 0, .6); backdrop-filter: none; -webkit-backdrop-filter: none; }
.fs-composer { display: flex; gap: 8px; pointer-events: auto; }
.fs-composer input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 21px;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  color: #fff;
  font: inherit;
  font-size: 15px;
  outline: none;
}
.fs-composer input::placeholder { color: rgba(255, 255, 255, .6); }
.fs-composer button {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
}
.fs-composer button svg { width: 20px; height: 20px; }
.catchup {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: calc(var(--box-y, 0px) + 12px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 12px 8px;
  border-radius: 13px;
  background: rgba(0, 0, 0, .62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -6px) scale(.96);
  transition: opacity .28s ease, transform .35s cubic-bezier(.2, .8, .3, 1);
}
.catchup.on { opacity: 1; transform: translate(-50%, 0); }
.cu-line { display: flex; align-items: center; gap: 6px; }
.cu-line svg { width: 14px; height: 14px; color: #7fd8ff; animation: cu-run 1s ease-in-out infinite; }
@keyframes cu-run { 50% { transform: translateX(2px); opacity: .7; } }
.cu-bar { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.cu-bar b { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #4fc3ff, #9b7bff); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .4s linear; }
.catchup.wait .cu-bar b { width: 40%; transform: none; transition: none; animation: cu-wait 1.1s ease-in-out infinite; }
@keyframes cu-wait { from { translate: -100% 0; } to { translate: 250% 0; } }
@keyframes feed {
  0% { opacity: 0; transform: translateY(8px); }
  6%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

.float { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.floater {
  position: absolute;
  bottom: 12%;
  font-size: 32px;
  animation: rise 1.5s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes rise {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  15% { opacity: 1; transform: translateY(-10px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-140px) scale(1); }
}
.stage.full .floater { bottom: 10%; font-size: 46px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); animation: rise-fs 2.6s cubic-bezier(.25, .6, .35, 1) forwards; }
@keyframes rise-fs {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  12% { opacity: 1; transform: translate(0, -20px) scale(1.15); }
  40% { transform: translate(calc(var(--sway, 18px) * -1), -38vh) scale(1); }
  70% { opacity: .9; transform: translate(var(--sway, 18px), -58vh) scale(.95); }
  100% { opacity: 0; transform: translate(0, -74vh) scale(.9); }
}
.fs-react {
  position: absolute;
  right: 10px;
  bottom: 62px;
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 26px;
  background: rgba(22, 22, 26, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), inset 0 0 0 1px var(--line-2);
  pointer-events: auto;
  animation: pop .16s ease;
}
.fs-react[hidden] { display: none; }
.fs-react button { width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; transition: transform .1s ease; }
.fs-react button:active { transform: scale(.82); }

/* fullscreen player */
.room.fs::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 59;
  background: #000;
}
.stage.full {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--full-w, 100vw);
  height: var(--full-h, 100vh);
  aspect-ratio: auto;
  border-radius: 0;
  z-index: 60;
  box-shadow: none;
  background: #000;
  transition: none;
}
.stage.full.rot {
  width: var(--full-h, 100vh);
  height: var(--full-w, 100vw);
  transform-origin: top left;
  transform: rotate(90deg) translateY(-100%);
}
.stage.full {
  --fs-t: max(var(--in-t, 0px), env(safe-area-inset-top, 0px));
  --fs-r: max(var(--in-r, 0px), env(safe-area-inset-right, 0px));
  --fs-b: max(var(--in-b, 0px), env(safe-area-inset-bottom, 0px));
  --fs-l: max(var(--in-l, 0px), env(safe-area-inset-left, 0px));
}
.stage.full.rot {
  --fs-t: max(var(--in-t, 0px), env(safe-area-inset-right, 0px));
  --fs-r: max(var(--in-r, 0px), env(safe-area-inset-bottom, 0px));
  --fs-b: max(var(--in-b, 0px), env(safe-area-inset-left, 0px));
  --fs-l: max(var(--in-l, 0px), env(safe-area-inset-top, 0px));
}
.stage.full .controls { inset: var(--fs-t) var(--fs-r) var(--fs-b) var(--fs-l); }
.stage.full .controls::before { inset: calc(-1 * var(--fs-t)) calc(-1 * var(--fs-r)) calc(-1 * var(--fs-b)) calc(-1 * var(--fs-l)); }
.stage.full .c-top { display: flex; padding: 10px 14px; }
:root:not(.split) .stage:not(.full) .c-top { display: flex; padding: 10px 14px; }
:root:not(.split) .stage:not(.full) #c-exit { display: none; }
:root:not(.split) .stage:not(.full) .c-title { font-size: 14px; }
/* «Открыть в браузере» in the player's top-right corner; in the split layout the top row is
   otherwise hidden, so there it shows with this button only. */
.c-web { flex: 0 0 auto; margin-left: auto; }
:root.split .stage.can-web:not(.full) .c-top { display: flex; padding: 10px 14px; }
:root.split .stage.can-web:not(.full) .c-top > :not(.c-web) { visibility: hidden; }
:root:not(.split) .below .title { display: none; }
.stage.full .c-bottom { padding: 0 12px 10px; }
.stage.full .only-full { display: grid !important; }
.stage.full .feed { display: flex; }
.stage.full .big-play { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.stage.full .player iframe { top: -80px; height: calc(100% + 160px); }
.stage.refit .player, .stage.refit .cover { transition: left .32s cubic-bezier(.3, .7, .3, 1), top .32s cubic-bezier(.3, .7, .3, 1), width .32s cubic-bezier(.3, .7, .3, 1), height .32s cubic-bezier(.3, .7, .3, 1); }
.c-row .ic.on { color: var(--accent); }
.c-row .ic:disabled { opacity: .35; cursor: default; }
.c-row .ic.gone { display: none !important; }
.c-row .ic.on:disabled { color: inherit; }
.only-desk-full { display: none !important; }
.stage.desk-seats .only-desk-full { display: grid !important; }
.fs-seats { display: none; }
.stage.desk-seats .fs-seats {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(var(--in-b, 0px) + 84px);
  display: flex;
  max-width: calc(100% - 48px);
  padding: 2px 12px;
  border-radius: 22px;
  background: rgba(10, 10, 14, .42);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity .24s ease, transform .24s ease, bottom .3s cubic-bezier(.3, .7, .3, 1), visibility 0s .24s;
}
.stage.desk-seats.seats-pin .fs-seats,
.stage.desk-seats .fs-seats.peek {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity .24s ease, transform .24s ease, bottom .3s cubic-bezier(.3, .7, .3, 1);
}
.stage.desk-seats .controls:not(.show) ~ .fs-seats { bottom: calc(var(--in-b, 0px) + 16px); }
.stage.desk-seats.chatting .fs-seats:not(.peek) { opacity: 0; visibility: hidden; }
.fs-seats .hall { margin: 0; padding: 6px 0 2px; }
@media (hover: hover) and (pointer: fine) {
  .stage.full:has(.controls:not(.show)) { cursor: none; }
  .stage.full:has(.controls:not(.show)) * { cursor: none !important; }
}

/* below stage */
.below { flex: 0 0 auto; padding: 12px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.now { display: flex; flex-direction: column; gap: 10px; }
.title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.title:empty { display: none; }
.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 42px;
  padding: 4px;
  border-radius: 15px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tabs button {
  position: relative;
  z-index: 1;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--muted);
  transition: color .2s ease;
}
.tabs button.on { color: var(--text); }
.tab-ink {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 11px;
  background: var(--card-3);
  transition: transform .25s cubic-bezier(.3, .7, .3, 1);
}
.tabs.second .tab-ink { transform: translateX(100%); }
.vid-tabs { flex: 0 0 auto; height: 40px; margin: 12px 16px 0; }
.vid-tabs button { font-size: 14px; }
#panel-search.on-queue .search-form, #panel-search.on-queue .platforms, #panel-search.on-queue .results,
#panel-search:not(.on-queue) .queue { display: none; }

.panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.chat {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
}
.chat::-webkit-scrollbar { display: none; }
.chat > :first-child { margin-top: auto; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.msg + .msg:not(.cont) { margin-top: 10px; }
.msg > .framed .ava { width: 30px; height: 30px; font-size: 12px; }
/* The full frame, under the bubbles (they sit at z-index 1), never clipped to a circle. */
.msg > .framed { z-index: 0; }
.chat.typers-on { padding-bottom: 22px; }
.msg.cont > .framed { visibility: hidden; }
.msg.cont .name { display: none; }
.bubble {
  padding: 8px 12px 7px;
  border-radius: 18px 18px 18px 6px;
  background: var(--card-2);
  min-width: 0;
}
.msg.cont .bubble { border-top-left-radius: 8px; }
.name { font-size: 12.5px; font-weight: 700; margin-bottom: 2px; }
.name .vip-tag { height: 14px; margin-left: 5px; padding: 0 4px; border-radius: 5px; font-size: 8.5px; vertical-align: 1px; }
.body { font-size: 15px; line-height: 1.35; word-break: break-word; white-space: pre-wrap; }
.stamp { float: right; margin: 6px 0 -2px 10px; font-size: 11px; color: var(--faint); }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: var(--me); border-radius: 18px 18px 6px 18px; color: #fff; }
.msg.me.cont .bubble { border-top-right-radius: 8px; }
.msg.me .stamp { color: rgba(255, 255, 255, .7); }
.msg.me > .framed, .msg.me .name { display: none; }

.composer {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 8px 12px calc(10px + var(--safe-b));
  background: var(--bg);
}
.composer input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  border-radius: 23px;
  background: var(--card-2);
  font-size: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.composer input::placeholder { color: var(--faint); }
.composer button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
  flex: 0 0 auto;
  transition: transform .12s ease;
}
.composer button:active { transform: scale(.9); }
.composer button svg { width: 22px; height: 22px; }

.search-form {
  margin: 12px 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.search-form svg { width: 20px; height: 20px; color: var(--faint); flex: 0 0 auto; }
.search-form input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; }
.search-form input::placeholder { color: var(--faint); }
.platforms { display: flex; gap: 6px; padding: 10px 16px 4px; }
.platforms button {
  height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.platforms button.on { background: var(--text); color: var(--bg); box-shadow: none; }
/* A live stream has no timeline: no seek bar, time or ±10 s. */
.stage.live .seek, .stage.live .time, .stage.live .skip { visibility: hidden; }
.results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 16px calc(16px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
}
.results::-webkit-scrollbar { display: none; }
.result { display: flex; gap: 12px; padding: 6px; border-radius: 16px; text-align: left; }
.result:active { background: var(--card); }
.result .art { position: relative; width: 136px; flex: 0 0 auto; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--card-2); }
.result .art img { width: 100%; height: 100%; object-fit: cover; }
.result .len {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .75);
  font-size: 11.5px;
  font-weight: 600;
}
.result .meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.result b { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skel { height: 88px; border-radius: 16px; background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.status { padding: 30px 0; text-align: center; color: var(--muted); font-size: 14px; }

/* keyboard open */
.room.compose .below { display: none; }
.room.compose .poll-slot { display: none; }
.room.compose > .panel { min-height: 140px; }
.room.typing .composer { padding-bottom: 8px; }
.room.typing .results { padding-bottom: 12px; }

/* ---------- sheets ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet-card {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  /* The card is the end of the scroll chain: a swipe that starts on it (even one that first drifts
     down while the card is at its top) latches here and scrolls it, instead of latching to the
     page behind, which never scrolls (in Telegram on Android the card stayed stuck). */
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 16px calc(18px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background: var(--sheet);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .5), inset 0 1px 0 var(--line-2);
  animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
/* Centered modals (confirm, daily bonus, roulette, recap, pair XP): same card, no grip. */
.sheet.modal { align-items: center; padding: 16px 16px calc(16px + var(--safe-b)); }
.sheet.modal > .sheet-card { max-width: 400px; max-height: 88vh; padding: 14px 16px 18px; border-radius: 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55), inset 0 1px 0 var(--line-2); animation: modal-in .24s cubic-bezier(.2, .8, .2, 1); }
:root[data-theme="light"] .sheet.modal > .sheet-card { box-shadow: 0 16px 48px rgba(0, 0, 0, .18); }
.sheet.modal .grip { display: none; }
.sheet.modal .bonus-top { top: -14px; margin-top: -14px; padding-top: 14px; border-radius: 26px 26px 0 0; }
@keyframes modal-in { from { transform: scale(.94); opacity: 0; } }
#known-sheet { z-index: 83; }
#gotgift-sheet, #giftinfo-sheet { z-index: 90; }
.giftinfo-card { max-height: min(640px, calc(var(--app-h, 100vh) - 40px)); }
.gi-art { width: 170px; height: 150px; }
.gi-art .gi-treat { width: 120px; height: 120px; }
.gi-count { margin-top: -6px; font-size: 15px; font-weight: 800; color: var(--muted); }
.gi-list { align-self: stretch; display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; text-align: left; }
.gi-list .ss-pal { flex-shrink: 0; }
.gotgift-card { max-width: 320px !important; align-items: center; gap: 10px; padding: 20px 20px 18px !important; text-align: center; background: radial-gradient(90% 60% at 50% 30%, rgba(255, 120, 170, .22), transparent 70%), var(--sheet, var(--card)); }
.gg-top { font-size: 12.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #ff7ab8; }
.gg-art { position: relative; display: grid; place-items: center; width: 190px; height: 170px; animation: gg-pop .7s cubic-bezier(.2, 1.5, .4, 1) both; }
.gg-art::before { content: ""; position: absolute; inset: -10%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 120, .45), rgba(255, 120, 170, .15) 45%, transparent 70%); animation: sg-breathe 3s ease-in-out infinite; }
.gg-art > * { position: relative; }
.gg-art .skin-stage, .gg-art .buy-throw { width: 160px; height: 160px; }
.gg-art .buy-bg { width: 190px; height: 120px; border-radius: 16px; background-size: cover; background-position: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.gg-art .buy-frame { transform: scale(1.5); }
.gg-name { font-size: 20px; font-weight: 800; }
.gg-from { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.gg-from .ava { width: 24px; height: 24px; font-size: 11px; }
.gg-from b { color: var(--text); font-weight: 700; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-art .gg-treat { width: 130px; height: 130px; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .35)); }
.gg-more { margin-top: -2px; font-size: 13.5px; font-weight: 700; color: #ff7ab8; }
.gotgift-card .primary { align-self: stretch; margin-top: 4px; }
/* fix40: several new gifts/treats — one window with a scrolling list instead of a chain of windows. */
.gotgift-card.list .gg-art, .gotgift-card.list .gg-name, .gotgift-card.list .gg-from { display: none; }
.gg-list { align-self: stretch; display: flex; flex-direction: column; gap: 8px; max-height: min(52vh, 360px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; text-align: left; }
.gg-list[hidden] { display: none; }
.gg-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line-2, rgba(255, 255, 255, .08)); flex-shrink: 0; }
:root[data-theme="light"] .gg-row { background: rgba(0, 0, 0, .04); }
.gg-ico { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; }
.gg-ico .skin-stage, .gg-ico .buy-throw { width: 46px; height: 46px; }
.gg-ico .buy-bg { width: 48px; height: 34px; border-radius: 8px; background-size: cover; background-position: center; }
.gg-ico .buy-frame { transform: scale(.36); }
.gg-ico .big { transform: scale(.45); }
.gg-ico .gg-ico-treat { width: 42px; height: 42px; }
.gg-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gg-txt b { font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-txt small { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.gg-txt small span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-txt small .ava { flex: 0 0 18px; width: 18px; height: 18px; font-size: 9px; }
.gg-xp { flex: 0 0 auto; font-style: normal; font-size: 13px; font-weight: 800; color: #ff7ab8; }
@keyframes gg-pop { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.08) rotate(3deg); opacity: 1; } }
.known-card { max-width: 300px !important; align-items: center; gap: 8px; padding: 18px 20px 20px !important; }
.kc-sig { width: 76px; height: 76px; }
.kc-title { font-size: 16px; font-weight: 700; text-align: center; }
.kc-bar { position: relative; align-self: stretch; height: 6px; border-radius: 3px; overflow: hidden; background: var(--card-3); }
.kc-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #ff7ab8, #ff3d6e); }
.kc-num { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.grip { width: 38px; height: 5px; border-radius: 3px; background: var(--card-3); margin: 2px auto 8px; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; padding: 0 2px 4px; }
.pill { height: 24px; padding: 0 9px; border-radius: 12px; background: var(--card-2); font-size: 13px; display: grid; place-items: center; color: var(--muted); }

.invite-code { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 10px; }
.invite-code small { color: var(--muted); font-size: 13px; font-weight: 500; }
.invite-code button {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 8px;
  padding: 6px 12px 6px 20px;
  border-radius: 16px;
  transition: background .2s ease;
}
.invite-code button.ok { background: rgba(80, 220, 140, .12); color: var(--ok); }

.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
  transition: background .2s ease;
}
.link-row .k { font-size: 14px; font-weight: 600; }
.link-row .v { grid-row: 2; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row svg { grid-row: 1 / 3; grid-column: 2; width: 20px; height: 20px; color: var(--muted); }
.link-row.ok { background: rgba(80, 220, 140, .1); }
.link-row.ok svg { color: var(--ok); }

.people { display: flex; flex-direction: column; gap: 4px; }
.person { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 4px; border-radius: 14px; text-align: left; }
.person .ava { width: 42px; height: 42px; font-size: 16px; }
.person-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-name b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-name small { font-size: 12.5px; color: var(--muted); }
.person-name small.host { color: var(--hot); font-weight: 600; }
.kick {
  height: 34px;
  padding: 0 12px;
  border-radius: 11px;
  background: rgba(255, 77, 77, .12);
  color: #ff7a7a;
  font-size: 13px;
  font-weight: 600;
}

.settings { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field small { color: var(--muted); font-size: 13px; font-weight: 500; padding: 0 2px; }
.field input {
  height: 50px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  border-radius: 15px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 16px;
}
.field input:focus { box-shadow: inset 0 0 0 1.5px rgba(255, 90, 54, .6); }
.row-card { display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 14px; border-radius: 15px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; font-weight: 500; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--card-3); transition: background .2s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .22s cubic-bezier(.3, .7, .3, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 15px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.choice button { height: 42px; border-radius: 11px; font-weight: 600; font-size: 14.5px; color: var(--muted); }
.choice button.on { background: var(--card-3); color: var(--text); }

.choice.four { grid-template-columns: repeat(4, 1fr); }
.choice.four button { font-size: 13.5px; }
.field-hint { margin-top: 6px; font-size: 12px; line-height: 1.35; color: var(--faint); }
.field-hint:empty { display: none; }
.choice.three { grid-template-columns: repeat(3, 1fr); }
/* «Кнопка в приглашениях»: a colour dot before each name (the «Войти» colour under my inline invites). */
.invite-btn-pick button { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 2px; font-size: 13px; }
.invite-btn-pick button i { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.invite-btn-pick [data-invite-btn="primary"] i { background: #3a8ee6; }
.invite-btn-pick [data-invite-btn="success"] i { background: #2fb36a; }
.invite-btn-pick [data-invite-btn="danger"] i { background: #ec4a4a; }
/* Viewer limit: −/number/+ for any value from 2 to the cap, plus five quick picks (VIP ones badged while locked). */
.limit-pick { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.limit-step { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 15px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 24px; font-weight: 600; line-height: 1; color: var(--text); }
.limit-step:active { transform: scale(.94); }
.limit-step:disabled { opacity: .35; }
.limit-field { flex: 1; min-width: 0; height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 15px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); cursor: text; }
.limit-field:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent, #ff5c5c); }
.limit-field input { width: 3.6ch; min-width: 0; padding: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 20px; font-weight: 700; text-align: right; -moz-appearance: textfield; appearance: textfield; }
.limit-field input::-webkit-outer-spin-button, .limit-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.limit-field small { font-size: 14px; color: var(--muted); }
.choice.limit-presets { grid-template-columns: repeat(5, 1fr); }
.choice.limit-presets button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 46px; font-size: 14.5px; }
.choice.limit-presets button.locked { color: var(--faint); }
.choice.limit-presets button .lock-mini { position: static; padding: 0 5px; border-radius: 6px; font-size: 9.5px; line-height: 14px; font-weight: 800; letter-spacing: .3px; color: #1b1300; background: linear-gradient(135deg, #ffd66b, #ffb020); }
.choice.three button { font-size: 13.5px; }
.person.tappable { cursor: pointer; }
.person.tappable:active { background: var(--card); }
.person .chev { width: 18px; height: 18px; color: var(--faint); }
.badges { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.person-name .badges small { font-size: 12px; }
.person-name small.ctl { color: var(--ctl); }
.person-name small.mut { color: #ff9d7a; }
.unban {
  height: 34px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--card-2);
  font-size: 13px;
  font-weight: 600;
}
.danger-soft {
  height: 50px;
  margin-top: 4px;
  border-radius: 15px;
  background: rgba(255, 77, 77, .1);
  color: #ff7a7a;
  font-weight: 700;
  font-size: 15px;
}
.actions { display: flex; flex-direction: column; gap: 6px; }
.action {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  border-radius: 15px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}
.action svg { width: 21px; height: 21px; color: var(--muted); }
.action:active { background: var(--card-2); }
.action.bad { color: #ff7a7a; }
.action.bad svg { color: #ff7a7a; }
.msg.pressing .bubble { transform: scale(.97); transition: transform .3s ease; }
.composer input:disabled { opacity: .55; }
.composer button:disabled { opacity: .4; }
.confirm-who { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 10px; font-size: 17px; font-weight: 700; text-align: center; }
.confirm-who .ava { width: 64px; height: 64px; font-size: 24px; }
.confirm-note { margin-top: -4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.delete-ask span { color: var(--muted); font-size: 15px; font-weight: 500; line-height: 1.35; }
.delete-ask b { font-size: 16px; line-height: 1.35; }
#delete-yes:disabled { opacity: .4; }
.danger { height: 52px; border-radius: 16px; background: #ff4d4d; color: #fff; font-weight: 700; font-size: 15.5px; }
.plain { height: 48px; border-radius: 16px; background: var(--card); font-weight: 600; font-size: 15px; }

.invite-friends { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.invite-label { padding: 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.invite-list { max-height: 38vh; min-height: 0; overflow-y: auto; padding: 2px 2px 4px; }
/* Keep the sheet's buttons at full height: when the content is taller than the sheet, the card scrolls instead of squashing them. */
.sheet-card > .grip, .sheet-card > .invite-code, .sheet-card > .primary, .sheet-card > .link-row, .sheet-card > .invite-friends { flex-shrink: 0; }
.invite-note {
  position: fixed;
  z-index: 91;
  left: 50%;
  top: calc(var(--safe-t) + 12px);
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(460px, calc(100% - 24px));
  padding: 8px 8px 8px 14px;
  border-radius: 18px;
  background: var(--toast);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line-2);
  transform: translateX(-50%);
  animation: drop .25s ease;
}
.invite-note[hidden] { display: none; }
.invite-note-text { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.invite-no { width: 32px; height: 32px; flex: 0 0 auto; }
.invite-no svg { width: 16px; height: 16px; }
.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  top: calc(var(--safe-t) + 14px);
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 16px;
  background: var(--toast);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line-2);
  font-size: 14px;
  font-weight: 600;
  animation: drop .25s ease;
}
@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px); } }
.toast.short {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  background: linear-gradient(135deg, rgba(70, 30, 12, .92), rgba(46, 20, 10, .92));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 170, 60, .35), 0 0 24px rgba(255, 140, 40, .18);
  color: #ffd9a0;
  animation: drop .25s ease, short-shake .42s .1s ease;
}
.toast.short img.coin { width: 22px; height: 22px; filter: drop-shadow(0 2px 6px rgba(255, 170, 40, .45)) saturate(.7); }
:root[data-theme="light"] .toast.short { background: linear-gradient(135deg, #fff4e3, #ffe6c4); color: #8a4300; box-shadow: 0 12px 30px rgba(120, 60, 0, .18), inset 0 0 0 1px rgba(230, 140, 30, .4); }
@keyframes short-shake {
  20% { transform: translateX(calc(-50% - 6px)); }
  40% { transform: translateX(calc(-50% + 5px)); }
  60% { transform: translateX(calc(-50% - 3px)); }
  80% { transform: translateX(calc(-50% + 2px)); }
}

.keep-awake {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  pointer-events: none;
  z-index: -1;
}

/* ---------- native video ---------- */

.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  pointer-events: none;
}
.stage.tap.native .shield { pointer-events: auto; }
.stage.tap.native .cover { display: block; }

/* ---------- drawing ---------- */

.ink {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.stage.inking .ink { pointer-events: auto; touch-action: none; cursor: crosshair; }
.stage.inking .controls, .stage.inking .stage-poll { display: none; }
/* While drawing, the "embed blocked" card must not swallow strokes. */
.stage.inking .yt-blocked { pointer-events: none; }
.ink-bar {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}
.ink-modes {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ink-modes[hidden] { display: none; }
.ink-mode { width: 52px; height: 32px; padding: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); transition: background .15s ease, box-shadow .15s ease; }
.ink-mode canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.ink-mode.on { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1.5px #fff; }
.ink-bar .ic.ghost { width: 40px; height: 40px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.stage.full .ink-bar { top: 14px; right: 14px; }

/* ---------- countdown ---------- */

.countdown {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, rgba(20, 6, 8, .55), rgba(0, 0, 0, .85));
  pointer-events: none;
}
.countdown span {
  font-size: clamp(72px, 22vw, 150px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -4px;
  background: linear-gradient(180deg, #fff 0%, #ffb199 55%, #ff4d2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 40px rgba(255, 77, 46, .55));
  animation: tick 1s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes tick {
  0% { opacity: 0; transform: scale(1.8); }
  18% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; transform: scale(.94); }
  100% { opacity: 0; transform: scale(.7); }
}

/* ---------- hall ---------- */

.hall {
  display: flex;
  gap: 2px;
  margin: 0 -16px;
  padding: 8px 16px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.hall::-webkit-scrollbar { display: none; }
.hall:empty { display: none; }
.seat {
  --h: 350;
  --s: 60%;
  --l: 0%;
  --o: 170;
  --ac: calc(var(--sit, 8px) + var(--as, 28px) / 2);
  position: relative;
  flex: 0 0 58px;
  height: 64px;
  user-select: none;
  -webkit-user-select: none;
  transition: filter .25s ease, opacity .25s ease;
}
.seat-img {
  position: absolute;
  inset: -4px -3px 0;
  width: calc(100% + 6px);
  height: calc(100% + 4px);
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .4));
  transition: transform .2s ease, filter .2s ease;
  pointer-events: none;
}
.seat.twin .seat-img {
  filter: drop-shadow(1.6px 0 0 hsl(var(--o) 95% 62%)) drop-shadow(-1.6px 0 0 hsl(var(--o) 95% 62%)) drop-shadow(0 1.6px 0 hsl(var(--o) 95% 62%)) drop-shadow(0 -1.6px 0 hsl(var(--o) 95% 62%)) drop-shadow(0 5px 8px rgba(0, 0, 0, .4));
}
.seat.me .seat-img { filter: drop-shadow(0 0 8px hsl(var(--h) 95% 55% / .5)) drop-shadow(0 5px 8px rgba(0, 0, 0, .4)); }
.seat.me.twin .seat-img {
  filter: drop-shadow(1.6px 0 0 hsl(var(--o) 95% 62%)) drop-shadow(-1.6px 0 0 hsl(var(--o) 95% 62%)) drop-shadow(0 1.6px 0 hsl(var(--o) 95% 62%)) drop-shadow(0 -1.6px 0 hsl(var(--o) 95% 62%)) drop-shadow(0 0 8px hsl(var(--h) 95% 55% / .5));
}
.seat.aim .seat-img { filter: brightness(1.25) drop-shadow(0 5px 8px rgba(0, 0, 0, .4)); transform: scale(1.06); }
.seat-part, .seat-glow, .seat-led, .seat-fx { position: absolute; pointer-events: none; }
.seat-part { object-fit: contain; }
.back-portal {
  left: 50%;
  top: 38%;
  width: 96%;
  aspect-ratio: 1;
  translate: -50% -50%;
  opacity: .95;
  animation: portal-spin 6s linear infinite;
}
.seat-part.side { bottom: 14%; height: 62%; width: auto; transform-origin: 50% 100%; }
.seat-part.tentacle { bottom: 26%; height: 56%; -webkit-mask-image: linear-gradient(0deg, transparent, #000 28%); mask-image: linear-gradient(0deg, transparent, #000 28%); }
.seat-part.tentacle.left { left: -5%; animation: tentacle 2.8s ease-in-out infinite; }
.seat-part.tentacle.right { right: -5%; animation: tentacle 2.8s ease-in-out -1.4s infinite reverse; }
.seat-part.wing { top: 2%; bottom: auto; height: 64%; }
.seat-part.wing.left { right: 56%; transform-origin: 100% 60%; animation: wing 2.6s ease-in-out infinite; }
.seat-part.wing.right { left: 56%; transform-origin: 0% 60%; animation: wing-r 2.6s ease-in-out infinite; }
.seat-glow {
  left: 8%;
  right: 8%;
  top: 14%;
  bottom: 0;
  border-radius: 40%;
  background: radial-gradient(closest-side, rgba(255, 110, 20, .75), rgba(255, 60, 0, .25) 60%, transparent);
  filter: blur(4px);
  animation: lava-glow 2.2s ease-in-out infinite;
}
.seat-led {
  inset: -4px -3px 0;
  -webkit-mask: var(--m) 50% 100% / contain no-repeat;
  mask: var(--m) 50% 100% / contain no-repeat;
  background: linear-gradient(90deg, #ff2d55, #ffcc00, #34ff7a, #00d4ff, #7a5cff, #ff2df5, #ff2d55) 0 0 / 300% 100%;
  animation: led 2.4s linear infinite;
}
.skin-stage .seat-led { inset: 0; }
.seat-fx { inset: -10px -6px 0; overflow: visible; z-index: 2; }
:root[data-seatfx-off] .seat-fx { display: none; }
.seat-fx i {
  position: absolute;
  width: 11px;
  height: 11px;
  background: center / contain no-repeat;
  opacity: 0;
  animation: fx-rise 3s ease-in-out infinite;
}
.seat-fx.rise i { bottom: 12%; }
.seat-fx.fall i { top: 0; animation-name: fx-fall; }
.skin-stage .seat-fx i { width: 15px; height: 15px; }
.move-bob { animation: seat-bob 2.4s ease-in-out infinite; }
.move-rock { transform-origin: 50% 100%; animation: seat-rock 2.2s ease-in-out infinite; }
.move-squish { transform-origin: 50% 100%; animation: seat-squish 2.6s ease-in-out infinite; }
@keyframes portal-spin { to { rotate: 360deg; } }
@keyframes tentacle { 0%, 100% { rotate: -8deg; } 50% { rotate: 10deg; } }
@keyframes wing { 0%, 100% { rotate: 0deg; } 50% { rotate: 14deg; } }
@keyframes wing-r { 0%, 100% { rotate: 0deg; } 50% { rotate: -14deg; } }
@keyframes lava-glow { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes led { to { background-position: 300% 0; } }
@keyframes fx-rise {
  0% { opacity: 0; transform: translateY(0) scale(.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-42px) scale(1); }
}
@keyframes fx-fall {
  0% { opacity: 0; transform: translateY(0) rotate(0deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(46px) rotate(160deg); }
}
@keyframes seat-bob { 50% { translate: 0 -3px; } }
@keyframes seat-rock { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
@keyframes seat-squish { 0%, 100% { scale: 1 1; } 50% { scale: 1.05 .94; } }
.seat .ava {
  position: absolute;
  z-index: 1;
  left: calc(50% + var(--ax, 0px));
  top: var(--sit, 8px);
  width: var(--as, 28px);
  height: var(--as, 28px);
  margin-left: calc(var(--as, 28px) / -2);
  font-size: 13px;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8), 0 5px 12px rgba(0, 0, 0, .45);
  transition: transform .2s ease, filter .35s ease;
}
.framed.tap { cursor: pointer; }
.seat.me { touch-action: none; cursor: grab; }
:root:not(.split) .hall > .seat { transition: filter .25s ease; }
:root:not(.split) .hall > .seat.me { position: sticky; left: 0; right: 0; z-index: 3; }
.hall > .seat.passing { pointer-events: none; }
.seat.me .ava { box-shadow: 0 0 0 1.5px #fff, 0 0 12px rgba(255, 255, 255, .45), 0 5px 12px rgba(0, 0, 0, .45); }
.seat.aim .ava { transform: scale(1.1); }
.seat.hit { animation: hit .5s ease; }
.seat.hit .ava { animation: bounce .5s ease; }
.seat.away { filter: grayscale(1) brightness(.7); opacity: .6; }
.seat.buffer .ava { filter: saturate(.35) brightness(.7); }
.seat.buffer::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: calc(50% + var(--ax, 0px));
  top: calc(var(--sit, 8px) - 3px);
  width: calc(var(--as, 28px) + 6px);
  height: calc(var(--as, 28px) + 6px);
  margin-left: calc(var(--as, 28px) / -2 - 3px);
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(255, 255, 255, .15) 70%, #fff 96%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent calc(var(--as, 28px) / 2 + .5px), #000 calc(var(--as, 28px) / 2 + 1px));
  mask: radial-gradient(circle, transparent calc(var(--as, 28px) / 2 + .5px), #000 calc(var(--as, 28px) / 2 + 1px));
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .5));
  animation: spin 1.1s linear infinite, fade .3s ease;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes hit { 25% { transform: rotate(-6deg); } 50% { transform: rotate(5deg); } 75% { transform: rotate(-3deg); } }
@keyframes bounce { 30% { transform: translateY(-7px) scale(1.08); } }
.fx .pop {
  position: absolute;
  font-size: 28px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4));
  animation: seat-pop 1.6s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes seat-pop {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.5); }
  14% { opacity: 1; transform: translate(-50%, -6px) scale(1.2); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -48px) scale(1); }
}

.picker {
  position: fixed;
  z-index: 86;
  display: flex;
  gap: 2px;
  padding: 6px;
  border-radius: 22px;
  background: var(--sheet);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line-2);
  animation: pop .18s ease;
}
.picker button {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  font-size: 25px;
  transition: transform .12s ease;
}
.picker button:active { transform: scale(.82); background: var(--card-2); }

.fx { position: fixed; inset: 0; z-index: 88; pointer-events: none; overflow: hidden; }
.enter-fx { position: absolute; width: 0; height: 0; pointer-events: none; }
.enter-beam {
  position: absolute;
  left: -26px;
  bottom: -14px;
  width: 52px;
  height: calc(var(--y) + 14px);
  border-radius: 26px 26px 50% 50%;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--c1) 55%, transparent) 55%, var(--c2) 100%);
  filter: blur(7px);
  transform-origin: 50% 100%;
  animation: enter-beam 1.5s ease-out both;
}
@keyframes enter-beam { 0% { opacity: 0; transform: scaleX(.15); } 22% { opacity: .9; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(.5); } }
.enter-ring {
  position: absolute;
  left: -30px;
  top: -30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--c1);
  box-shadow: 0 0 18px var(--c2), inset 0 0 12px var(--c2);
  animation: enter-ring 1s ease-out .3s both;
}
.enter-ring.late { border-color: var(--c3); animation-delay: .5s; }
@keyframes enter-ring { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(2.6); } }
.enter-bit {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  max-width: none;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px var(--c1));
  animation: enter-bit 1.4s cubic-bezier(.3, .6, .4, 1) var(--d) both;
}
@keyframes enter-bit {
  from { opacity: 0; transform: translate(calc(var(--dx) * .3), calc(var(--y) * -1)) rotate(0); }
  15% { opacity: 1; }
  80% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
}
.seat.entering .seat-img { animation: seat-enter 1.5s ease; }
@keyframes seat-enter { 25% { transform: translateY(-4px) scale(1.08); filter: brightness(1.5) drop-shadow(0 0 14px rgba(255, 255, 255, .7)); } }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.kernel {
  position: absolute;
  left: 0;
  top: 0;
  width: 13px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 48% 52% 45% 55%;
  background: radial-gradient(circle at 35% 30%, #fffdf2 0%, #ffe7a8 55%, #efb24a 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
  will-change: transform;
}
.kernel.gold {
  background: radial-gradient(circle at 35% 30%, #fffbe0 0%, #ffd84a 45%, #b9790c 100%);
  box-shadow: 0 0 6px rgba(255, 200, 60, .8);
}
.bucket {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  margin: -30px 0 0 -24px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5));
  will-change: transform;
}
.throwing {
  position: absolute;
  left: 0;
  top: 0;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
  will-change: transform;
}
.bit {
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  will-change: transform;
}
.bit.juice, .bit.cola, .bit.cream { width: 8px; height: 9px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.bit.snow { width: 5px; height: 5px; box-shadow: 0 0 4px rgba(255, 255, 255, .9); }
.bit.drop { width: 5px; height: 7px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.bit.petal { width: 9px; height: 6px; border-radius: 80% 10% 80% 10%; }
.bit.spark { width: 3px; height: 11px; border-radius: 2px; box-shadow: 0 0 6px #ffcf5a; }
.bit.ember { width: 6px; height: 6px; box-shadow: 0 0 8px #ff9a3c; }
.bit.confetti { width: 6px; height: 10px; border-radius: 2px; }
.bit.heart { width: auto; height: auto; margin: -9px 0 0 -7px; font-size: 16px; line-height: 1; background: none; border-radius: 0; text-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.splat {
  position: absolute;
  z-index: 2;
  left: calc(50% + var(--ax, 0px));
  top: calc(var(--ac) - 22px);
  width: 44px;
  height: 44px;
  margin-left: -22px;
  object-fit: contain;
  pointer-events: none;
  animation: splat var(--d, 2400ms) cubic-bezier(.2, .8, .3, 1) forwards;
}
.kiss-mark {
  position: absolute;
  z-index: 2;
  left: calc(50% + var(--ax, 0px) + var(--x));
  top: calc(var(--ac) + var(--y) - 17px);
  width: 24px;
  height: 24px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(120, 0, 30, .35));
  transform: translate(-50%, -50%) rotate(var(--r));
  animation: kiss-stick var(--d, 2600ms) ease-out forwards;
}
@keyframes kiss-stick {
  0% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1.75); }
  5% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1.2, .8); }
  10% { transform: translate(-50%, -50%) rotate(var(--r)) scale(.92, 1.08); }
  15% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) translateY(4px) scale(.94); }
}
.splat.peel { width: 34px; height: 34px; margin-left: -17px; top: calc(var(--ac) + 4px); }
.splat.soot { width: 52px; height: 52px; margin-left: -26px; top: calc(var(--ac) - 26px); opacity: .92; }
.splat.crown { z-index: 3; width: 30px; height: 26px; margin-left: -15px; top: calc(var(--sit, 8px) - 19px); animation-name: crown-on; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .4)); }
@keyframes crown-on {
  0% { opacity: 1; transform: translateY(-3px) scale(1.18, .8); }
  6% { transform: translateY(1px) scale(.92, 1.1); }
  12% { transform: translateY(0) scale(1.04, .97); }
  18% { transform: none; }
  85% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-8px); }
}
.bit.yolk, .bit.paint { width: 8px; height: 9px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.bit.shell { width: 7px; height: 5px; border-radius: 1px 5px 2px 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.hall.quake { animation: quake .45s ease; }
@keyframes quake {
  15% { transform: translate(-4px, 2px); }
  30% { transform: translate(4px, -2px); }
  45% { transform: translate(-3px, -1px); }
  60% { transform: translate(2px, 1px); }
  80% { transform: translate(-1px, 0); }
}
.sprite {
  position: absolute;
  left: 0;
  top: 0;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3));
  will-change: transform;
}
.flash-fx { position: absolute; inset: 0; opacity: 0; animation: flash-fx .5s ease-out forwards; }
.flash-fx.bolt { background: radial-gradient(circle at 50% 40%, rgba(220, 235, 255, .75), rgba(140, 170, 255, .25) 60%, transparent); }
.flash-fx.blast { background: radial-gradient(circle at 50% 50%, rgba(255, 200, 120, .5), rgba(255, 90, 30, .15) 60%, transparent); }
@keyframes flash-fx { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.boom {
  position: absolute;
  width: 90px;
  height: 90px;
  margin: -45px 0 0 -45px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7d6 0%, #ffd23f 25%, #ff7a1a 50%, rgba(255, 60, 20, .5) 68%, transparent 72%);
  animation: boom .6s ease-out forwards;
}
.boom.firework {
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  background: radial-gradient(circle, #ffffff 0%, rgba(255, 240, 200, .8) 22%, rgba(255, 200, 120, .25) 50%, transparent 70%);
  mix-blend-mode: screen;
}
@keyframes boom {
  0% { opacity: 1; transform: scale(.2); }
  60% { opacity: .9; }
  100% { opacity: 0; transform: scale(1.5); }
}
@keyframes splat {
  0% { opacity: 0; transform: rotate(var(--r)) scale(.2); }
  8% { opacity: 1; transform: rotate(var(--r)) scale(1.18); }
  16% { transform: rotate(var(--r)) scale(1); }
  75% { opacity: 1; transform: rotate(var(--r)) translateY(3px) scale(1); }
  100% { opacity: 0; transform: rotate(var(--r)) translateY(10px) scale(.96); }
}
.residue { position: absolute; z-index: 2; left: calc(50% + var(--ax, 0px)); pointer-events: none; }
.splat.slide { transform-origin: 50% 0; animation-name: splat-slide; }
@keyframes splat-slide {
  0% { opacity: 0; transform: rotate(var(--r)) scale(.2); }
  6% { opacity: 1; transform: rotate(var(--r)) scale(1.3, .8); }
  12% { transform: rotate(var(--r)) scale(.92, 1.08); }
  18% { transform: rotate(var(--r)) scale(1); }
  45% { transform: translateY(4px) rotate(var(--r)) scale(1, 1.06); }
  82% { opacity: 1; transform: translateY(13px) rotate(var(--r)) scale(.97, 1.18); }
  100% { opacity: 0; transform: translateY(20px) rotate(var(--r)) scale(.94, 1.24); }
}
.toss { position: absolute; left: 0; top: 0; perspective: 420px; will-change: transform, opacity; }
.toss-body { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.toss-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; }
.toss-layer:last-child { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.toss.lite .toss-layer:last-child { filter: none; }
.toss-body.tin .toss-layer { clip-path: inset(56% 0 0 0); }
.toss-body.shiny > .toss-layer:nth-last-child(2) { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.toss.lite .toss-body.shiny > .toss-layer:nth-last-child(2) { filter: none; }
.toss-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
  background-size: 320% 100%;
  animation: toss-shine .75s linear infinite;
}
.toss-shine.gem { background-image: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, .95) 47%, rgba(190, 236, 255, .7) 51%, transparent 62%); }
.toss-shine.disco {
  background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .85) 40%, rgba(255, 150, 230, .55) 46%, rgba(140, 220, 255, .55) 52%, transparent 62%);
  animation-duration: .5s;
}
@keyframes toss-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.toss-shadow {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .42), transparent);
  will-change: transform, opacity;
}
.seat.slap { animation: slap .7s ease; }
.seat.slap .ava { animation: slap-ava .7s ease; }
@keyframes slap {
  15% { transform: translateX(7px) rotate(8deg); }
  35% { transform: translateX(-6px) rotate(-7deg); }
  55% { transform: translateX(4px) rotate(4deg); }
  75% { transform: translateX(-2px) rotate(-2deg); }
}
@keyframes slap-ava { 20% { transform: scale(.86) rotate(-10deg); } 50% { transform: scale(1.06); } }
.fs-hit {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(46vw, 260px);
  margin-left: calc(min(46vw, 260px) / -2);
  opacity: 0;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .5));
  animation: fs-hit 1.5s cubic-bezier(.2, .8, .3, 1) forwards;
}
@keyframes fs-hit {
  0% { opacity: 0; transform: translateY(-50%) scale(.3) rotate(-12deg); }
  14% { opacity: 1; transform: translateY(-50%) scale(1.1) rotate(4deg); }
  24% { transform: translateY(-50%) scale(1) rotate(0); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-40%) scale(.98); }
}
.throws {
  position: fixed;
  z-index: 86;
  display: grid;
  grid-template-columns: repeat(7, 46px);
  gap: 2px;
  padding: 6px;
  border-radius: 22px;
  touch-action: none;
  background: var(--sheet);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line-2);
  animation: pop .18s ease;
  transition: opacity .15s ease;
}
.throws.dragging { opacity: .12; }
.throw-item {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  transition: transform .12s ease, background .12s ease;
  -webkit-touch-callout: none;
}
.throw-item img { width: 34px; height: 34px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)); }
.throw-item.on { background: var(--card-2); box-shadow: inset 0 0 0 2px var(--accent); }
.throw-item.lift { transform: scale(.86); opacity: .5; }
.throw-item:active { transform: scale(.88); }
.throw-item.vip::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe28a, #f0a91f);
  box-shadow: 0 0 5px rgba(255, 196, 60, .8);
}
.throw-item.locked img { filter: grayscale(.85) brightness(.75); opacity: .6; }
.throw-item.locked::before {
  content: "";
  position: absolute;
  z-index: 1;
  right: 3px;
  bottom: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .7) center / 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffd666' d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h1Zm2 0h6V7a3 3 0 0 0-6 0v3Z'/%3E%3C/svg%3E");
}
.confetti {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  will-change: transform;
}

/* ---------- session ---------- */

.session {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 4px 0 12px;
  border-radius: 13px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  font-weight: 600;
}
.session > svg { width: 18px; height: 18px; color: var(--hot); flex: 0 0 auto; }
.session span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell {
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  transition: background .2s ease, color .2s ease;
}
.bell svg { width: 19px; height: 19px; }
.bell.on { background: rgba(255, 77, 46, .16); color: var(--hot); }
.when { display: flex; gap: 8px; align-items: center; }
.when input { flex: 1; min-width: 0; }
.lobby-when { color: var(--hot); font-weight: 600; }

/* ---------- queue ---------- */

.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}
.queue {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 16px calc(16px + var(--safe-b));
  scrollbar-width: none;
}
.queue::-webkit-scrollbar { display: none; }
.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
}
.queue-next {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--card-2);
  font-size: 13px;
  font-weight: 600;
}
.queue-next svg { width: 16px; height: 16px; }
.queue-list { display: flex; flex-direction: column; gap: 8px; }
.q-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.q-item.top { box-shadow: inset 0 0 0 1.5px rgba(255, 90, 54, .45); }
.q-art {
  position: relative;
  width: 92px;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-2) url("/static/img/stage.jpg?v=61") center / cover no-repeat;
}
.q-art img { width: 100%; height: 100%; object-fit: cover; }
.q-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, .45);
}
.q-progress::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p);
  background: var(--hot);
}
.history { margin-top: 18px; }
.history .q-by { font-variant-numeric: tabular-nums; }
.q-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.q-meta b { font-size: 13.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-by { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); min-width: 0; }
.q-by .ava { width: 16px; height: 16px; font-size: 9px; }
.q-by span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-acts { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.q-like {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 9px;
  border-radius: 11px;
  background: var(--card-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: background .2s ease, color .2s ease, transform .12s ease;
}
.q-like svg { width: 16px; height: 16px; }
.q-like.on { background: rgba(255, 77, 46, .16); color: var(--hot); }
.q-like.on svg path { fill: currentColor; }
.q-like:active { transform: scale(.9); }
.q-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); }
.q-btn svg { width: 18px; height: 18px; }
.q-btn.play { color: var(--hot); }
.q-empty { padding: 26px 0; text-align: center; color: var(--faint); font-size: 13.5px; }
.result { align-items: center; }
.result .meta { flex: 1; }
.result .add {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--card-2);
  color: var(--text);
}
.result .add svg { width: 18px; height: 18px; }
.result .add.done { background: rgba(80, 220, 140, .14); color: var(--ok); }

/* ---------- poll ---------- */

.poll-slot { padding: 10px 16px 0; flex: 0 0 auto; }
.poll-slot:empty { display: none; }
.poll-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  animation: enter .35s cubic-bezier(.2, .8, .2, 1);
}
.poll-top { display: flex; align-items: flex-start; gap: 8px; }
.poll-q { flex: 1; font-size: 15px; font-weight: 700; line-height: 1.3; }
.poll-x { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); flex: 0 0 auto; }
.poll-x svg { width: 16px; height: 16px; }
.poll-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
  color: var(--text);
  animation: enter .25s cubic-bezier(.2, .8, .2, 1);
}
.poll-bar .poll-ic { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent); }
.poll-bar .poll-q { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-bar small { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.poll-bar small.win { color: var(--ok); }
.poll-bar .poll-chev { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.poll-bar:active { transform: scale(.98); }
.stage-poll .poll-bar { background: rgba(12, 12, 14, .8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: #fff; }
.stage-poll .poll-bar small { color: rgba(255, 255, 255, .65); }
.poll-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--card-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  overflow: hidden;
}
.poll-opt > * { position: relative; }
.poll-opt .bar { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0%); background: rgba(255, 77, 46, .16); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.poll-opt .label { flex: 1; min-width: 0; }
.poll-opt .n { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.poll-opt .faces { display: flex; }
.poll-opt .faces .ava { width: 20px; height: 20px; font-size: 9px; box-shadow: 0 0 0 1.5px var(--card-2); }
.poll-opt .faces .ava + .ava { margin-left: -6px; }
.poll-opt.mine { box-shadow: inset 0 0 0 1.5px var(--accent); }
.poll-opt.right { box-shadow: inset 0 0 0 1.5px var(--ok); }
.poll-opt.right .bar { background: rgba(80, 220, 140, .2); }
.poll-opt.pick { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.poll-opt:disabled { cursor: default; }
.poll-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; min-height: 22px; }
.poll-foot .win { color: var(--ok); }
.poll-act { height: 28px; padding: 0 10px; border-radius: 9px; background: var(--card-3); color: var(--text); font-size: 12.5px; font-weight: 700; }
.stage-poll { position: absolute; z-index: 5; left: 14px; top: 58px; width: min(46%, 320px); display: none; }
.stage.full .stage-poll { display: block; }
.room.compose .stage.full .stage-poll { display: none; }
.up-next {
  position: absolute;
  z-index: 5;
  right: 10px;
  top: 10px;
  width: min(62%, 280px);
  padding: 8px;
  border-radius: 16px;
  color: #fff;
  background: rgba(12, 12, 14, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 30px rgba(0, 0, 0, .4);
  animation: pop .2s ease;
}
.up-next[hidden] { display: none; }
.stage.full .up-next { top: calc(var(--in-t, 0px) + 58px); right: calc(var(--in-r, 0px) + 14px); width: min(40%, 320px); }
.un-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px 4px; }
.un-head b { font-size: 13.5px; font-weight: 800; }
.un-close { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: rgba(255, 255, 255, .7); }
.un-close svg { width: 16px; height: 16px; }
.un-list { display: flex; flex-direction: column; gap: 5px; }
.un-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px;
  border-radius: 12px;
  text-align: left;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  transition: transform .12s ease, background .12s ease;
}
.un-item:active { transform: scale(.97); }
.un-item.top { background: rgba(255, 255, 255, .14); }
.un-item.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.un-art { flex: 0 0 auto; width: 52px; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.un-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.un-name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.un-votes { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .8); }
.un-votes svg { width: 15px; height: 15px; }
.un-item.on .un-votes { color: var(--accent); }
.un-item.on .un-votes svg path { fill: currentColor; }
.stage-poll .poll-card { background: rgba(12, 12, 14, .8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: #fff; }
.stage-poll .poll-opt { background: rgba(255, 255, 255, .1); min-height: 36px; }
.stage-poll .poll-foot, .stage-poll .poll-opt .n { color: rgba(255, 255, 255, .65); }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opts input {
  height: 48px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 16px;
}
.opts input:focus { box-shadow: inset 0 0 0 1.5px rgba(255, 90, 54, .6); }

/* ---------- chat timecodes ---------- */

.tc {
  display: inline;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(255, 77, 46, .16);
  color: var(--hot);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tc:disabled { cursor: default; }
.msg.me .tc { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- recap ---------- */

.recap-card { align-items: stretch; }
.recap-img {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 4 / 5;
  margin: 0 auto 6px;
  border-radius: 22px;
  object-fit: cover;
  background: var(--card-2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
  animation: enter .5s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- chat extras ---------- */

.feed-item b:empty { display: none; }
.msg { touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bubble { position: relative; transition: transform .18s ease, box-shadow .2s ease; }
.msg.swiping .bubble { transition: none; }
.msg.swiping .bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 14px);
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border-radius: 50%;
  background: var(--card-3) center / 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 7 5 12l5 5M5.5 12H14a5 5 0 0 1 5 5v1' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: .5;
  transform: scale(.8);
  transition: opacity .15s ease, transform .15s ease;
}
.msg.armed .bubble::after { opacity: 1; transform: scale(1); }
.msg.picked .bubble { transform: scale(1.02); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.msg.hl .bubble { box-shadow: inset 0 0 0 1.5px var(--accent); }
.msg.flash .bubble { animation: flash 1.3s ease; }
@keyframes flash { 0%, 45% { box-shadow: 0 0 0 3px rgba(255, 77, 46, .55); } }
@media (hover: hover) {
  .msg:not(.me) .bubble:hover { background: var(--card-3); }
}
.msg-tools {
  align-self: center;
  display: flex;
  gap: 2px;
  flex: 0 0 auto;
  opacity: 0;
  transition: opacity .12s ease;
}
.msg:hover .msg-tools, .msg.picked .msg-tools { opacity: 1; }
.msg-tools button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
}
.msg-tools button:hover { background: var(--card-3); color: var(--text); }
.msg-tools svg { width: 18px; height: 18px; }
.msg:not([data-id]) .msg-tools { visibility: hidden; }

.new-sep { align-self: stretch; display: flex; align-items: center; gap: 10px; margin: 10px 4px; color: var(--accent, #ff5c8a); font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.new-sep::before, .new-sep::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor 50%, transparent); opacity: .6; }

.sys {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 92%;
  margin: 8px 0;
  padding: 3px 11px 3px 3px;
  border-radius: 14px;
  background: var(--card);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}
.sys .ava { width: 20px; height: 20px; font-size: 9px; flex: 0 0 auto; }
.sys > span:not(.ava) { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sys + .msg { margin-top: 0; }
.sys.hint { width: min(92%, 420px); padding: 8px 12px; border-radius: 16px; color: var(--text); text-align: center; background: linear-gradient(135deg, rgba(90, 160, 255, .18), rgba(140, 110, 255, .12)); }
.sys.hint > span { display: block; overflow: visible; -webkit-line-clamp: unset; font-size: 13px; line-height: 1.4; }
.sys.announce {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: min(92%, 420px);
  padding: 9px 12px 10px;
  border-radius: 16px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 90, 54, .2), rgba(255, 61, 110, .14));
  box-shadow: inset 0 0 0 1px rgba(255, 110, 80, .3);
}
.sys.announce > span.announce-head { display: flex; align-items: center; gap: 6px; overflow: visible; -webkit-line-clamp: unset; }
.announce-head img { width: 20px; height: 20px; }
.announce-head b { font-size: 13px; font-weight: 800; }
.announce-head small { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); }
.sys.announce > span.announce-text { display: block; overflow: visible; -webkit-line-clamp: unset; font-size: 14px; font-weight: 550; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }

.quote {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 2px 0 6px;
  padding: 4px 9px 5px;
  border-radius: 8px;
  border-left: 3px solid hsl(var(--h) 75% 65%);
  background: rgba(255, 255, 255, .06);
  text-align: left;
}
[data-theme="light"] .quote { background: rgba(40, 20, 20, .05); }
.quote b { font-size: 12.5px; font-weight: 700; color: hsl(var(--h) 75% 65%); }
.quote span { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.me .quote { background: rgba(255, 255, 255, .16); border-left-color: #fff; }
.msg.me .quote b { color: #fff; }
.msg.me .quote span { color: rgba(255, 255, 255, .8); }

.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; clear: both; }
.react {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px 0 6px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .08);
  font-size: 14px;
  animation: pop .18s ease;
}
[data-theme="light"] .react { background: rgba(40, 20, 20, .06); }
.react.on { background: rgba(255, 77, 46, .16); box-shadow: inset 0 0 0 1.5px var(--accent); }
.react b { font-size: 12.5px; font-weight: 700; }
.react .faces { display: flex; }
.react .faces .ava { width: 18px; height: 18px; font-size: 8px; box-shadow: 0 0 0 1.5px var(--card-2); }
.react .faces .ava + .ava { margin-left: -6px; }
.msg.me .react { background: rgba(255, 255, 255, .2); color: #fff; }
.msg.me .react.on { background: rgba(255, 255, 255, .36); box-shadow: none; }
.msg.me .react .faces .ava { box-shadow: 0 0 0 1.5px #f2386a; }

.at { font-weight: 700; color: var(--hot); }
.msg.me .at { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.msg-menu {
  position: fixed;
  z-index: 87;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  animation: pop .16s ease;
}
.msg-reacts {
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 22px;
  background: var(--sheet);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line-2);
}
.msg-reacts button { width: 42px; height: 42px; border-radius: 16px; font-size: 24px; transition: transform .12s ease; }
.msg-reacts button.on { background: var(--card-3); }
.msg-reacts button:active { transform: scale(.82); }
.msg-acts {
  min-width: 200px;
  padding: 5px;
  border-radius: 18px;
  background: var(--sheet);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line-2);
}
.msg-acts button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}
.msg-acts button svg { width: 20px; height: 20px; flex: 0 0 auto; }
.msg-acts button:active, .msg-acts button:hover { background: var(--card-2); }
.msg-acts button.bad { color: #ff5a5f; }

.heart-pop {
  position: absolute;
  font-size: 40px;
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: heart .9s cubic-bezier(.2, .8, .3, 1) forwards;
  filter: drop-shadow(0 6px 14px rgba(242, 56, 106, .5));
}
@keyframes heart {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  25% { opacity: 1; transform: translate(-50%, -60%) scale(1.25); }
  60% { opacity: 1; transform: translate(-50%, -80%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -140%) scale(.9); }
}

.chat-foot { position: relative; flex: 0 0 auto; }
.composer { position: relative; }
.typers {
  position: absolute;
  left: 26px;
  bottom: calc(100% - 10px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 10px 0 3px;
  border-radius: 11px;
  background: var(--sheet);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3), inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  pointer-events: none;
  animation: pop .18s ease;
}
.typing-faces { display: flex; }
.typing-faces .ava { width: 17px; height: 17px; font-size: 8px; box-shadow: 0 0 0 1.5px var(--sheet); }
.typing-faces .ava + .ava { margin-left: -10px; }
.typing-word { display: flex; }
.typing-word span { display: inline-block; animation: hop 1.1s ease-in-out infinite; }
@keyframes hop { 0%, 55%, 100% { transform: none; } 25% { transform: translateY(-3px); } }
.chat-foot:has(.mention-list:not([hidden])) .typers { display: none; }

.mention-list {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(100% + 4px);
  z-index: 3;
  padding: 5px;
  border-radius: 18px;
  background: var(--sheet);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--line-2);
  animation: pop .16s ease;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 10px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}
.mention-item .ava { width: 30px; height: 30px; font-size: 12px; }
.mention-item > span:not(.ava) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-item:active, .mention-item:hover { background: var(--card-2); }

.reply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 12px 0;
  padding: 4px 4px 4px 12px;
  border-radius: 14px;
  background: var(--card);
  animation: pop .16s ease;
}
.reply-bar > svg { width: 20px; height: 20px; color: var(--hot); flex: 0 0 auto; }
.reply-line { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 2px solid var(--accent); padding-left: 9px; }
.reply-line b { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-line span { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar .ic { width: 34px; height: 34px; }
.reply-bar .ic svg { width: 18px; height: 18px; }
.reply-bar + .composer { padding-top: 6px; }

.poll-voters { display: flex; margin-left: auto; margin-right: 8px; }
.poll-voters .ava { width: 20px; height: 20px; font-size: 9px; box-shadow: 0 0 0 1.5px var(--card); animation: pop .2s ease; }
.poll-voters .ava + .ava { margin-left: -7px; }
.stage-poll .poll-voters .ava { box-shadow: 0 0 0 1.5px rgba(12, 12, 14, .9); }

/* ---------- seek taps ---------- */

.skip {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: 38%;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.skip.l { left: 0; border-radius: 0 999px 999px 0; background: radial-gradient(90% 70% at 0% 50%, rgba(255, 255, 255, .16), transparent 70%); }
.skip.r { right: 0; border-radius: 999px 0 0 999px; background: radial-gradient(90% 70% at 100% 50%, rgba(255, 255, 255, .16), transparent 70%); }
.skip span {
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.skip.go { animation: skip .8s ease forwards; }
.skip.go span { animation: skip-num .8s ease; }
@keyframes skip { 0% { opacity: 0; } 12%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes skip-num { 0% { transform: scale(.7); } 20% { transform: scale(1.08); } 40% { transform: none; } }

/* ---------- fullscreen under telegram buttons ---------- */

.stage.full .ink-bar { top: calc(14px + var(--in-t, 0px)); right: calc(14px + var(--in-r, 0px)); }
.stage.full .stage-poll { top: calc(58px + var(--in-t, 0px)); left: calc(14px + var(--in-l, 0px)); }
.stage.full .feed { left: calc(14px + var(--in-l, 0px)); bottom: calc(70px + var(--in-b, 0px)); }

/* ---------- desktop ---------- */

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  #app { top: 0; bottom: 0; height: auto; }
}
:root.split #app { max-width: 1480px; }
:root.split .home { width: 100%; max-width: 560px; margin: 0 auto; }
:root.split .room {
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas: "top tabs" "stage side" "now side";
}
:root.split .room > .top { grid-area: top; padding: 12px 20px 12px; }
:root.split .room > .stage-slot { grid-area: stage; padding: 0 20px; }
:root.split .room .stage { max-width: max(400px, calc((var(--app-h) - var(--split-reserve, 270px)) * 16 / 9)); }
:root.split .room .below { display: contents; }
:root.split .room .now { grid-area: now; min-height: 0; overflow-y: auto; padding: 14px 20px 20px; scrollbar-width: none; }
:root.split .room .now::-webkit-scrollbar { display: none; }
:root.split .room .now .title { font-size: 19px; }
:root.split .room .tabs { grid-area: tabs; align-self: center; margin: 12px 20px 12px 0; }
:root.split .room > .panel {
  grid-area: side;
  height: auto;
  min-height: 0;
  margin: 0 20px 20px 0;
  border-radius: 22px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
:root.split .room .composer { background: transparent; padding-bottom: 12px; }
:root.split .room .reply-bar { background: var(--card-2); }
:root.split .room .msg { max-width: 92%; }
:root.split .room .results, :root.split .room .queue { padding-bottom: 16px; }
/* One row of seats that never scrolls vertically (only sideways when there are many). */
:root.split .hall { margin: 0 -8px; padding-left: 8px; padding-right: 8px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
:root.split.tablet .room .stage { max-width: min(100%, max(360px, calc((var(--app-h) - var(--split-reserve, 270px)) * 16 / 9))); }
:root.split .room .stage.full { max-width: none; }
/* Browser version on a desktop: the player takes all the free width/height on the left,
   the chat panel is 380 px wide on the right (396 px column minus its 16 px margin); the title is already in the top bar. */
:root.web.split #app { max-width: none; }
:root.web.split .room { grid-template-columns: minmax(0, 1fr) 396px; }
:root.web.split .room > .top { padding: 8px 16px; }
:root.web.split .room > .stage-slot { padding: 0 12px 0 16px; }
:root.web.split .room .stage:not(.full) { max-width: min(100%, calc((var(--app-h) - 200px) * 16 / 9)); border-radius: 14px; }
:root.web.split .room .now { padding: 8px 16px 10px; }
:root.web.split .room .now .title { display: none; }
/* Desktop Telegram (mouse, not tablet): the title is already in the top bar; fitSplit() gives its height to the screen. */
:root.split:not(.tablet) .room .now .title { display: none; }
:root.web.split .room .tabs { margin: 8px 16px 8px 0; }
:root.web.split .room > .panel { margin: 0 16px 16px 0; }
@media (max-width: 1100px) {
  :root.split.tablet .room { grid-template-columns: minmax(0, 1fr) 320px; }
  :root.split.tablet .room > .top { padding: 10px 14px; }
  :root.split.tablet .room > .stage-slot { padding: 0 14px; }
  :root.split.tablet .room .now { padding: 12px 14px 16px; }
  :root.split.tablet .room .tabs { margin: 10px 14px 10px 0; }
  :root.split.tablet .room > .panel { margin: 0 14px 14px 0; }
}

/* ---------- profile ---------- */

#confirm, #delete-sheet, #report-sheet { z-index: 84; }
.profile {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--vv-top);
  height: var(--app-h);
  z-index: 82;
  background: var(--bg);
}
.profile.in { animation: pf-in .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes pf-in { from { opacity: 0; transform: translateX(32px); } }
.pf-scroll {
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding-bottom: calc(28px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pf-scroll::-webkit-scrollbar { display: none; }
.pf-scroll > * { flex: 0 0 auto; }
.pf-head {
  position: relative;
  min-height: calc(250px + var(--safe-t));
  padding: calc(var(--safe-t) + 10px) 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #0d0d12;
}
.pf-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: pf-bg 18s ease-in-out infinite alternate;
}
@keyframes pf-bg { to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); } }
.bgfx { pointer-events: none; overflow: hidden; }
.pf-bg.bgfx, .pf-bg.bg-live { animation: none; }
.bgfx-l {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  mix-blend-mode: screen;
}
.bgfx-l.lava {
  -webkit-mask-image: var(--stripe45), var(--stripe45);
  mask-image: var(--stripe45), var(--stripe45);
  -webkit-mask-size: 170px 170px, 270px 270px;
  mask-size: 170px 170px, 270px 270px;
  animation: bgfx-lava 9s linear infinite, bgfx-breathe 2.6s ease-in-out infinite alternate;
}
.bgfx-l.lava { --stripe45: linear-gradient(45deg, rgba(0, 0, 0, .3) 0%, #000 12.5%, rgba(0, 0, 0, .3) 25%, rgba(0, 0, 0, .3) 50%, #000 62.5%, rgba(0, 0, 0, .3) 75%, rgba(0, 0, 0, .3) 100%); }
@keyframes bgfx-lava { to { -webkit-mask-position: 340px 0, 270px 0; mask-position: 340px 0, 270px 0; } }
@keyframes bgfx-breathe { from { opacity: .7; } to { opacity: 1; } }
.bgfx-l.aurora {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .25), #000 25%, rgba(0, 0, 0, .25) 50%, rgba(0, 0, 0, .25)), linear-gradient(90deg, rgba(0, 0, 0, .15), #000 30%, rgba(0, 0, 0, .15) 60%, rgba(0, 0, 0, .15));
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .25), #000 25%, rgba(0, 0, 0, .25) 50%, rgba(0, 0, 0, .25)), linear-gradient(90deg, rgba(0, 0, 0, .15), #000 30%, rgba(0, 0, 0, .15) 60%, rgba(0, 0, 0, .15));
  -webkit-mask-size: 120px 100%, 190px 100%;
  mask-size: 120px 100%, 190px 100%;
  animation: bgfx-aurora 12s linear infinite, bgfx-breathe 4.5s ease-in-out infinite alternate;
}
@keyframes bgfx-aurora { to { -webkit-mask-position: 240px 0, -190px 0; mask-position: 240px 0, -190px 0; } }
.bgfx-l.crystal {
  -webkit-mask-image: radial-gradient(closest-side, #000, rgba(0, 0, 0, .35) 65%, transparent), radial-gradient(closest-side, #000, rgba(0, 0, 0, .35) 65%, transparent), linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .25));
  mask-image: radial-gradient(closest-side, #000, rgba(0, 0, 0, .35) 65%, transparent), radial-gradient(closest-side, #000, rgba(0, 0, 0, .35) 65%, transparent), linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .25));
  -webkit-mask-size: 85% 55%, 75% 50%, 100% 100%;
  mask-size: 85% 55%, 75% 50%, 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: bgfx-crystal 10s ease-in-out infinite alternate;
}
@keyframes bgfx-crystal {
  0% { -webkit-mask-position: 0% 15%, 100% 100%, 0 0; mask-position: 0% 15%, 100% 100%, 0 0; }
  50% { -webkit-mask-position: 100% 0%, 0% 65%, 0 0; mask-position: 100% 0%, 0% 65%, 0 0; }
  100% { -webkit-mask-position: 20% 90%, 95% 5%, 0 0; mask-position: 20% 90%, 95% 5%, 0 0; }
}
.bgfx-l.glint {
  -webkit-mask-image: linear-gradient(110deg, transparent 38%, #000 50%, transparent 62%);
  mask-image: linear-gradient(110deg, transparent 38%, #000 50%, transparent 62%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: bgfx-glint 7s ease-in-out infinite;
}
@keyframes bgfx-glint {
  0% { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  55%, 100% { -webkit-mask-position: 0% 0; mask-position: 0% 0; }
}
.bgfx-l.front, .bgfx-l.back, .bgfx-l.under {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .3), #000 20%, rgba(0, 0, 0, .3) 40%, rgba(0, 0, 0, .3)), linear-gradient(90deg, rgba(0, 0, 0, .2), #000 35%, rgba(0, 0, 0, .2) 55%, rgba(0, 0, 0, .2));
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .3), #000 20%, rgba(0, 0, 0, .3) 40%, rgba(0, 0, 0, .3)), linear-gradient(90deg, rgba(0, 0, 0, .2), #000 35%, rgba(0, 0, 0, .2) 55%, rgba(0, 0, 0, .2));
  -webkit-mask-size: 90px 100%, 150px 100%;
  mask-size: 90px 100%, 150px 100%;
  animation: bgfx-spin-r 3s linear infinite;
}
.bgfx-l.back { animation-name: bgfx-spin-l; animation-duration: 4.5s; }
.bgfx-l.under { animation-duration: 4.5s; }
@keyframes bgfx-spin-r { to { -webkit-mask-position: 180px 0, 150px 0; mask-position: 180px 0, 150px 0; } }
@keyframes bgfx-spin-l { to { -webkit-mask-position: -180px 0, -150px 0; mask-position: -180px 0, -150px 0; } }
.bgfx-l.ring { animation: bgfx-ring 3.2s ease-in-out infinite; }
@keyframes bgfx-ring { 0%, 100% { opacity: .2; } 50% { opacity: .95; } }
/* Light legendary backgrounds (skypalace, floating): the picture itself moves. On light art screen()
   does nothing, so these layers blend normally: soft-edged copies of the clouds drift, the gold trim
   catches a slow warm sheen, the waterfalls stream, the rainbows breathe. The still under perf-low /
   reduced-motion is just bg-<key>.webp, a finished picture on its own. */
.bgfx-l.mist, .bgfx-l.mist2, .bgfx-l.sheen, .bgfx-l.falls, .bgfx-l.rainbow { mix-blend-mode: normal; }
.bgfx-l.mist { animation: bgfx-drift 17s ease-in-out infinite alternate; will-change: transform; }
.bgfx-l.mist2 { animation: bgfx-drift2 11s ease-in-out infinite alternate; will-change: transform; }
@keyframes bgfx-drift { from { transform: translate3d(-3%, 0, 0); } to { transform: translate3d(3%, -.6%, 0); } }
@keyframes bgfx-drift2 { from { transform: translate3d(4%, .4%, 0); } to { transform: translate3d(-4%, 0, 0); } }
.bgfx-l.sheen {
  -webkit-mask-image: linear-gradient(105deg, rgba(0, 0, 0, .12) 32%, #000 50%, rgba(0, 0, 0, .12) 68%);
  mask-image: linear-gradient(105deg, rgba(0, 0, 0, .12) 32%, #000 50%, rgba(0, 0, 0, .12) 68%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: bgfx-sheen 9s ease-in-out infinite;
}
@keyframes bgfx-sheen {
  0% { -webkit-mask-position: 100% 0; mask-position: 100% 0; opacity: .55; }
  50% { opacity: 1; }
  70%, 100% { -webkit-mask-position: 0% 0; mask-position: 0% 0; opacity: .55; }
}
.bgfx-l.falls {
  -webkit-mask-image: repeating-linear-gradient(180deg, rgba(0, 0, 0, .25) 0, #000 14px, rgba(0, 0, 0, .25) 26px), repeating-linear-gradient(180deg, rgba(0, 0, 0, .4) 0, #000 22px, rgba(0, 0, 0, .4) 40px);
  mask-image: repeating-linear-gradient(180deg, rgba(0, 0, 0, .25) 0, #000 14px, rgba(0, 0, 0, .25) 26px), repeating-linear-gradient(180deg, rgba(0, 0, 0, .4) 0, #000 22px, rgba(0, 0, 0, .4) 40px);
  -webkit-mask-size: 100% 26px, 100% 40px;
  mask-size: 100% 26px, 100% 40px;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  animation: bgfx-falls 1.3s linear infinite;
}
@keyframes bgfx-falls { to { -webkit-mask-position: 0 52px, 0 40px; mask-position: 0 52px, 0 40px; } }
.bgfx-l.rainbow {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .35) 30%, #000 50%, rgba(0, 0, 0, .35) 70%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .35) 30%, #000 50%, rgba(0, 0, 0, .35) 70%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: bgfx-rainbow 7s ease-in-out infinite alternate, bgfx-glow 3.4s ease-in-out infinite alternate;
}
@keyframes bgfx-rainbow { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0% 0; mask-position: 0% 0; } }
@keyframes bgfx-glow { from { opacity: .35; } to { opacity: 1; } }
/* Light profile backgrounds (catalog.js light: true -> .profile.bg-light): white nick, @username and
   stat captions sit on bright art, so the scrim gets a little denser where the text is and the small
   grey captions turn into shadowed white. Dark theme only; the light theme already uses dark text. */
:root:not([data-theme="light"]) .profile.bg-light .pf-head::after { background: linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .12) 35%, rgba(0, 0, 0, .3) 70%, var(--bg) 100%); }
:root:not([data-theme="light"]) .profile.bg-light .pf-name { text-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 3px 16px rgba(0, 0, 0, .55); }
:root:not([data-theme="light"]) .profile.bg-light .pf-sub,
:root:not([data-theme="light"]) .profile.bg-light .pf-stat small { color: rgba(255, 255, 255, .86); text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 10px rgba(0, 0, 0, .4); }
:root:not([data-theme="light"]) .profile.bg-light .pf-stat b { text-shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 2px 12px rgba(0, 0, 0, .35); }
@media (max-width: 700px) {
  :root:not([data-theme="light"]) .profile.bg-light .pf-head::after { background: linear-gradient(180deg, rgba(0, 0, 0, .24) 0%, rgba(0, 0, 0, .1) 22%, rgba(0, 0, 0, .3) 42%, rgba(0, 0, 0, .52) 62%, var(--bg) 100%); }
}
.pf-back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  --travel: var(--app-h);
  background:
    radial-gradient(90% 55% at 10% 100%, hsl(var(--h) var(--sat) 45% / .38), transparent 70%),
    radial-gradient(80% 45% at 95% 72%, hsl(calc(var(--h) + 34) var(--sat) 50% / .22), transparent 70%),
    linear-gradient(180deg, transparent 18%, hsl(var(--h) calc(var(--sat) * .6) 30% / .22) 100%);
}
.pf-back::before, .pf-back::after {
  content: "";
  position: absolute;
  width: min(80vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--h) var(--sat) 55% / .26), transparent 66%);
  animation: sb-drift 11s ease-in-out infinite alternate;
}
.pf-back::before { left: -18%; bottom: -12%; }
.pf-back::after { right: -22%; top: 38%; background: radial-gradient(circle, hsl(calc(var(--h) + 30) var(--sat) 60% / .18), transparent 66%); animation-duration: 14s; animation-direction: alternate-reverse; }
.pf-scroll { position: relative; }
.sb-p {
  position: absolute;
  bottom: -30px;
  height: auto;
  opacity: 0;
  animation: sb-rise 12s linear infinite;
}
.sb-p.fall { top: -30px; bottom: auto; animation-name: sb-fall; }
:root[data-seatfx-off] .sb-p { display: none; }
.me-back {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  --travel: 120px;
}
.me-back .sb-p { bottom: -22px; }
.me-back .sb-p.fall { top: -22px; bottom: auto; }
@keyframes sb-drift { to { transform: translate3d(18%, -12%, 0) scale(1.15); } }
@keyframes sb-rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.6); }
  15% { opacity: .9; }
  50% { transform: translate3d(12px, calc(var(--travel) * -.5), 0) scale(1); }
  100% { opacity: 0; transform: translate3d(-8px, calc(var(--travel) * -1), 0) scale(.8); }
}
@keyframes sb-fall {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
  15% { opacity: .9; }
  50% { transform: translate3d(-14px, calc(var(--travel) * .5), 0) rotate(120deg); }
  100% { opacity: 0; transform: translate3d(10px, var(--travel), 0) rotate(240deg); }
}
@media (max-width: 700px) {
  .profile .pf-scroll { overflow-x: hidden; }
  .profile .pf-head { overflow: visible; }
  .profile .pf-bg, .profile .pf-head::after { bottom: auto; height: auto; aspect-ratio: 3 / 4; -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent); mask-image: linear-gradient(180deg, #000 62%, transparent); }
  .profile .pf-bg { animation: none; }
  .profile .pf-head::after { background: linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .04) 30%, rgba(0, 0, 0, .3) 62%, var(--bg) 100%); }
  .pf-stats, .pf-chips, .pf-block, .pf-vip { position: relative; z-index: 1; }
}
.pf-head::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .05) 40%, var(--bg) 100%);
}
.pf-close {
  position: absolute;
  left: 12px;
  top: calc(var(--safe-t) + 10px);
  color: #fff;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pf-gear {
  position: absolute;
  right: 12px;
  top: calc(var(--safe-t) + 10px);
  color: #fff;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pf-who { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pf-who .framed { margin-bottom: 6px; }
.pf-who .ava { width: 96px; height: 96px; font-size: 36px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .16), 0 12px 30px rgba(0, 0, 0, .5); }
/* Name in the middle column, so the badge before it / the VIP tag after it never move it off-centre. */
.pf-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 8px; width: 100%; max-width: 100%; }
.pf-line > .pf-known { grid-column: 1; grid-row: 1; justify-self: end; }
.pf-line > .pf-name { grid-column: 2; grid-row: 1; min-width: 0; }
.pf-line > .vip-tag { grid-column: 3; grid-row: 1; justify-self: start; }
.pf-line .vip-tag { margin-left: 0; height: 20px; font-size: 11px; }
.pf-name { font-size: 24px; font-weight: 800; letter-spacing: -.4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 3px 16px rgba(0, 0, 0, .55); color: var(--text); }
.pf-sub { font-size: 13.5px; color: var(--muted); min-height: 1px; }
.pf-sub:empty { display: none; }
.pf-stats {
  display: flex;
  justify-content: center;
  margin-top: -6px;
  padding: 0 16px;
}
.pf-stat {
  position: relative;
  flex: 1 1 0;
  max-width: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
}
.pf-stat + .pf-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: var(--line-2);
}
.pf-stat b { font-size: 26px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pf-stat small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.bond-card {
  --bc: 255, 110, 170;
  position: relative;
  margin: 0 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 24px;
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(var(--bc), .22), transparent 70%),
    radial-gradient(60% 80% at 100% 100%, rgba(124, 92, 255, .14), transparent 70%),
    var(--card);
  box-shadow: inset 0 0 0 1px rgba(var(--bc), .25);
}
.bond-card[data-kind="friend"] { --bc: 110, 200, 255; }
.bond-card[data-kind="girl"] { --bc: 255, 140, 200; }
.bond-card[data-kind="bro"] { --bc: 255, 140, 60; }
.bond-card[data-kind="close"] { --bc: 180, 130, 255; }
.bond-card[data-kind="love"] { --bc: 255, 80, 110; }
.pop-card {
  --pc: 255, 196, 70;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px;
  padding: 12px 14px;
  border-radius: 22px;
  background:
    radial-gradient(70% 100% at 0% 50%, rgba(var(--pc), .2), transparent 70%),
    radial-gradient(60% 80% at 100% 100%, rgba(255, 110, 170, .1), transparent 70%),
    var(--card);
  box-shadow: inset 0 0 0 1px rgba(var(--pc), .22);
}
/* Living badge (bond / popularity): emblem + light layers gated by level classes s2…s7. */
.sigil { --c: 255, 200, 90; position: relative; flex: 0 0 auto; width: 64px; height: 64px; display: grid; place-items: center; isolation: isolate; }
.sigil[hidden] { display: none; }
.sigil > * { grid-area: 1 / 1; }
.sg-img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 5px rgba(var(--c), .5)); }
.sigil::before { content: ""; position: absolute; inset: 9%; z-index: 0; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #2e2548, #150f24 62%, #0c0916); box-shadow: inset 0 0 10px rgba(var(--c), .45), 0 0 0 1.5px rgba(var(--c), .5), 0 4px 12px rgba(0, 0, 0, .25); }
.sg-aura { position: absolute; inset: 4%; z-index: 0; border-radius: 50%; background: radial-gradient(circle, rgba(var(--c), .5) 0%, rgba(var(--c), .16) 42%, transparent 70%); opacity: .3; }
.sg-rays, .sg-shine, .sg-sparks { display: none; pointer-events: none; }
.sigil.s2 .sg-aura { opacity: .45; animation: sg-breathe 4s ease-in-out infinite; }
.sigil.s3 .sg-aura { opacity: .6; }
.sigil.s4 .sg-img { animation: sg-float 3.2s ease-in-out infinite; filter: drop-shadow(0 0 7px rgba(var(--c), .7)); }
.sigil.s4 .sg-aura { opacity: .8; animation: sg-pulse 2.6s ease-in-out infinite; }
.sigil.s4 .sg-sparks { display: block; position: absolute; inset: -4%; z-index: 3; border-radius: 50%; animation: spin 9s linear infinite; }
.sg-sparks::before, .sg-sparks::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px rgba(var(--c), .9); animation: sg-twinkle 1.8s ease-in-out infinite; }
.sg-sparks::before { top: 4%; left: 50%; }
.sg-sparks::after { bottom: 14%; left: 10%; animation-delay: -.9s; }
.sigil.s6 .sg-sparks::before { box-shadow: 0 0 6px 2px rgba(var(--c), .9), 22px 34px 0 -1px #fff, 22px 34px 6px 1px rgba(var(--c), .8); }
.sigil.s5 .sg-shine {
  display: block; position: relative; z-index: 3; width: 100%; height: 100%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .9) 50%, transparent 62%) no-repeat;
  background-size: 300% 100%;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
  mix-blend-mode: plus-lighter; animation: sg-sweep 3.6s ease-in-out infinite;
}
.sigil.s4 .sg-shine { transform-origin: center; }
.sigil.s5 .sg-shine { animation: sg-sweep 3.6s ease-in-out infinite, sg-float 3.2s ease-in-out infinite; }
.sigil.s6 .sg-rays {
  display: block; position: absolute; inset: -22%; z-index: 1; border-radius: 50%;
  background: repeating-conic-gradient(rgba(var(--c), 0) 0deg 9deg, rgba(var(--c), .38) 13deg, rgba(var(--c), 0) 17deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%);
  animation: spin 16s linear infinite;
}
.sigil.s7 .sg-rays { background: repeating-conic-gradient(rgba(var(--c), 0) 0deg 6deg, rgba(255, 255, 255, .5) 9deg, rgba(var(--c), .45) 11deg, rgba(var(--c), 0) 15deg 22.5deg); animation-duration: 11s; }
.sigil.s7 .sg-aura { opacity: 1; background: radial-gradient(circle, rgba(255, 255, 255, .35) 0%, rgba(var(--c), .6) 22%, rgba(var(--c), .18) 48%, transparent 72%); animation: sg-flare 2.2s ease-in-out infinite; }
.sigil.s7 .sg-img { filter: drop-shadow(0 0 9px rgba(var(--c), .9)) brightness(1.08); }
@keyframes sg-breathe { 50% { transform: scale(1.08); opacity: .62; } }
@keyframes sg-pulse { 50% { transform: scale(1.18); opacity: 1; } }
@keyframes sg-flare { 50% { transform: scale(1.26); filter: brightness(1.35); } }
@keyframes sg-float { 50% { transform: translateY(-3px); } }
@keyframes sg-twinkle { 50% { transform: scale(.3); opacity: .3; } }
@keyframes sg-sweep { 0%, 35% { background-position: 100% 0; } 85%, 100% { background-position: 0 0; } }
.pp-art { width: 60px; height: 60px; }
.pp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pp-top b { font-size: 15.5px; font-weight: 800; }
.pp-level { flex: 0 0 auto; padding: 2px 9px; border-radius: 10px; background: rgba(var(--pc), .18); color: rgb(var(--pc)); font-size: 12.5px; font-weight: 800; }
.pp-bar { position: relative; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.pp-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, #ffb347, #ffd76a, #fff1b8); box-shadow: 0 0 10px rgba(var(--pc), .6); transition: width .7s cubic-bezier(.2, .9, .3, 1); }
.pp-num { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pop-card.grow .pp-ic { animation: pp-grow .6s cubic-bezier(.2, 1.6, .4, 1); }
.pop-card.grow .pp-bar i { animation: pp-shine .8s ease-out; }
.pop-card.evolve .pp-ic { animation: pp-evolve 1.1s cubic-bezier(.2, 1.4, .4, 1); }
.pop-card.evolve .sg-aura { animation: pp-burst 1.1s ease-out; }
.pop-card.evolve .pp-level { animation: pp-grow .6s .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pp-grow { 40% { transform: scale(1.22); filter: brightness(1.35) drop-shadow(0 0 14px rgba(var(--pc), .9)); } }
@keyframes pp-shine { 0% { filter: brightness(1.8); } }
@keyframes pp-evolve {
  0% { transform: scale(1); filter: brightness(1); }
  30% { transform: scale(.7) rotate(-10deg); filter: brightness(3) saturate(0); }
  60% { transform: scale(1.35) rotate(6deg); filter: brightness(1.6) drop-shadow(0 0 22px rgba(var(--pc), 1)); }
}
@keyframes pp-burst { 0% { opacity: .4; transform: scale(.6); } 40% { opacity: 1; transform: scale(1.8); } 100% { opacity: .5; transform: scale(1); } }
@keyframes pp-halo { 50% { transform: scale(1.15); opacity: .7; } }
:root[data-theme="light"] .pp-level { color: #a35a00; }
:root[data-theme="light"] .pp-bar { background: rgba(0, 0, 0, .07); }
.bc-head { display: flex; align-items: center; gap: 12px; }
.bc-tier { width: 68px; height: 68px; }
.bc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 800; }
.bc-level { flex: 0 0 auto; padding: 2px 9px; border-radius: 10px; background: rgba(var(--bc), .18); color: rgb(var(--bc)); font-size: 12.5px; font-weight: 800; }
.bc-since { font-size: 12.5px; color: var(--muted); }
.bc-bar { position: relative; height: 8px; margin-top: 4px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.bc-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, rgba(var(--bc), .7), rgb(var(--bc))); box-shadow: 0 0 10px rgba(var(--bc), .6); transition: width .5s ease; }
.bc-xp { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bc-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bc-facts .pf-stat { max-width: none; padding: 9px 4px; border-radius: 16px; background: rgba(0, 0, 0, .18); }
.bc-facts .pf-stat b { font-size: 17px; letter-spacing: -.2px; }
.bc-facts .pf-stat small { font-size: 11.5px; }
.bc-facts .pf-stat.today { background: rgba(var(--bc), .2); box-shadow: inset 0 0 0 1px rgba(var(--bc), .45); }
.bc-facts .pf-stat.today b { color: rgb(var(--bc)); }
:root[data-theme="light"] .bc-facts .pf-stat { background: rgba(0, 0, 0, .04); }
.week-box { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.week-stats { margin: 0; padding: 0; }
.week-stats .pf-stat b { font-size: 22px; }
.week-top { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: var(--card-2); text-align: left; }
.week-top .ava { width: 36px; height: 36px; font-size: 14px; }
.week-top > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.week-top small { font-size: 12px; color: var(--muted); }
.week-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.week-time { font-size: 13px; font-weight: 700; color: var(--muted); }
.pf-block { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.pf-block h3 { margin: 6px 2px 0; font-size: 17px; font-weight: 700; }
.pane-off { display: none !important; }
.look-tabs { display: flex; gap: 6px; margin: 0 -16px; padding: 2px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.look-tabs::-webkit-scrollbar { display: none; }
.look-tab { flex: 0 0 auto; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--card); color: var(--muted); font-size: 13.5px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); transition: background .15s ease, color .15s ease, transform .12s ease; }
.look-tab:active { transform: scale(.95); }
.look-tab.on { color: var(--text); background: var(--card-3); box-shadow: inset 0 0 0 1.5px var(--accent-2); }
.look-group { display: flex; flex-direction: column; gap: 10px; }
.pf-tabs {
  position: sticky;
  top: calc(var(--safe-t) + 6px);
  z-index: 5;
  display: flex;
  gap: 4px;
  margin: -4px 16px 0;
  padding: 4px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), 0 8px 20px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.pf-tab {
  flex: 1 1 0;
  height: 36px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.pf-tab:active { transform: scale(.96); }
.pf-tab.on { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 16px rgba(255, 77, 46, .3); }
.pf-sep { display: flex; align-items: center; gap: 10px; margin: 2px 34px; color: var(--accent-2); }
.pf-sep::before, .pf-sep::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.pf-sep::after { background: linear-gradient(270deg, transparent, var(--line-2)); }
.pf-sep i { position: relative; width: 6px; height: 6px; transform: rotate(45deg); border-radius: 1px; background: currentColor; box-shadow: 0 0 10px currentColor; opacity: .85; }
.pf-sep i::before, .pf-sep i::after { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; }
.pf-sep i::before { left: -9px; top: 9px; }
.pf-sep i::after { left: 12px; top: -6px; }
.pf-empty { margin: 18px 16px; text-align: center; font-size: 14px; color: var(--muted); }
.gift-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.gift-shelf-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 8px 6px 8px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
button.gift-shelf-item:active { transform: scale(.97); }
.gs-art { display: flex; align-items: center; justify-content: center; width: 100%; height: 72px; overflow: hidden; }
.gs-art > * { flex-shrink: 0; }
.gs-art .skin-stage, .gs-art .buy-throw { width: 68px; height: 68px; }
.gs-art .buy-bg { width: 100%; height: 60px; border-radius: 10px; background-size: cover; background-position: center; }
.gs-art .buy-frame { transform: scale(.54); }
.gs-art .big { transform: scale(.7); }
.gift-shelf-item > b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 700; }
.gift-shelf-item > small { display: flex; align-items: center; gap: 4px; max-width: 100%; font-size: 11.5px; color: var(--muted); }
.gift-shelf-item > small .ava { flex-shrink: 0; width: 16px; height: 16px; font-size: 9px; }
.gift-shelf-item > small span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-label { margin: 4px 2px 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.pf-colors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pf-color {
  --h: 350;
  --s: 60%;
  --l: 0%;
  position: relative;
  aspect-ratio: 1;
  padding: 9px 10px 7px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .12s ease;
}
.pf-color img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.pf-color.on { box-shadow: inset 0 0 0 2px hsl(var(--h) 90% 60%); background: var(--card-2); }
.pf-color:active, .pf-skin:active, .pf-bg-opt:active, .pf-frame-opt:active { transform: scale(.94); }
.pf-skins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pf-skin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 8px;
  border-radius: 18px;
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(255, 200, 90, .14), transparent 70%),
    var(--card);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 110, .18);
  overflow: hidden;
  transition: transform .12s ease;
}
.skin-stage { position: relative; display: block; width: 86px; max-width: 100%; height: 86px; }
.skin-stage.idle, .skin-stage.idle *,
:root[data-cover] #home, :root[data-cover] #home *, :root[data-cover] #home *::before, :root[data-cover] #home *::after,
:root[data-cover] #room *, :root[data-cover] #room *::before, :root[data-cover] #room *::after { animation-play-state: paused !important; }
.skin-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.pf-skin small { font-size: 12.5px; font-weight: 600; }
.pf-skin.on { box-shadow: inset 0 0 0 2px #f5c542, 0 0 18px rgba(245, 197, 66, .25); }
.pf-skin.locked .skin-img { filter: grayscale(.5) brightness(.7) drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.pf-skin.locked .seat-part { filter: grayscale(.5) brightness(.7); }
.pf-skin.locked .seat-fx { opacity: .7; }
.pf-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
img.coin { width: 16px; height: 16px; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px 0 6px;
  border-radius: 12px;
  background: rgba(255, 200, 70, .12);
  color: #ffd666;
  font-size: 12.5px;
  font-weight: 700;
}
.pf-skin.paid {
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(120, 200, 255, .12), transparent 70%),
    var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pf-skin.paid.owned { box-shadow: inset 0 0 0 1px rgba(126, 226, 168, .35); }
.pf-skin.paid.on { box-shadow: inset 0 0 0 2px #7ee2a8, 0 0 18px rgba(126, 226, 168, .22); }
.pf-skin .price, .pf-bg-opt .price, .pf-frame-opt .price, .throw-item .price {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px 0 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .6);
  color: #ffd666;
  font-size: 11.5px;
  font-weight: 800;
}
.price img.coin { width: 13px; height: 13px; }
.price.short { color: rgba(255, 255, 255, .55); }
.pf-frame-opt .price { top: 4px; right: 4px; height: 18px; font-size: 10.5px; padding: 0 5px 0 3px; }
.throw-item .price { top: auto; bottom: 1px; left: 50%; right: auto; transform: translateX(-50%); height: 13px; gap: 1px; padding: 0 3px 0 2px; border-radius: 7px; font-size: 8.5px; }
.throw-item .price img.coin { width: 8px; height: 8px; }
.throw-item.sale img { opacity: .8; }
.confirm-who .buy-stage { width: 120px; height: 120px; }
.buy-throw { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .4)); }
.buy-bg { position: relative; overflow: hidden; width: 200px; height: 111px; border-radius: 16px; background: center / cover no-repeat; box-shadow: inset 0 0 0 1px var(--line); }
.buy-bg > .bgfx { position: absolute; inset: 0; border-radius: inherit; }
.buy-frame { display: grid; place-items: center; width: 130px; height: 130px; }
.buy-frame .framed .ava { width: calc(118px / var(--fs, 1.8)); height: calc(118px / var(--fs, 1.8)); font-size: 20px; }
.buy { height: 52px; border-radius: 16px; background: linear-gradient(135deg, #ffcf4a, #ff9f1a); color: #2a1600; font-weight: 800; font-size: 15.5px; box-shadow: 0 8px 22px rgba(255, 170, 30, .3); }
#confirm.buying .confirm-who { gap: 6px; padding: 2px 0 12px; }
.buy-hero {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 168px;
  margin-bottom: 8px;
  border-radius: 22px;
  background:
    radial-gradient(60% 70% at 50% 45%, rgba(255, 200, 80, .22), transparent 70%),
    radial-gradient(90% 90% at 50% 100%, rgba(255, 120, 60, .12), transparent 70%),
    var(--card);
  box-shadow: inset 0 0 0 1px rgba(255, 200, 90, .18);
  overflow: hidden;
}
.buy-hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 20%, rgba(255, 220, 120, .1) 25%, transparent 30% 70%, rgba(255, 220, 120, .1) 75%, transparent 80%);
  animation: buy-rays 14s linear infinite;
}
.buy-hero > * { position: relative; }
@keyframes buy-rays { to { transform: rotate(360deg); } }
.buy-name { font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.buy-sub { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.buy-price { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; height: 32px; padding: 0 14px 0 9px; border-radius: 16px; background: rgba(255, 200, 70, .14); color: #ffd666; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.buy-price img.coin { width: 20px; height: 20px; }
:root[data-theme="light"] .buy-hero { background: radial-gradient(60% 70% at 50% 45%, rgba(255, 190, 60, .28), transparent 70%), #fff8ec; box-shadow: inset 0 0 0 1px rgba(230, 160, 40, .25); }
:root[data-theme="light"] .buy-price { background: rgba(255, 170, 30, .16); color: #a35a00; }

#me-sheet { z-index: 83; }
#gift-sheet { z-index: 83; }
#bond-sheet { z-index: 83; }
.gift-coins { display: inline-flex; align-items: center; gap: 4px; color: #ffd666; font-weight: 800; }
.gift-coins img.coin { width: 14px; height: 14px; }
.gift-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 60vh; overflow-y: auto; padding-bottom: 4px; }
.gift-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 118px;
  padding: 26px 6px 8px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  transition: transform .12s ease;
}
.gift-item:active { transform: scale(.95); }
.gift-item small { font-size: 12px; font-weight: 600; text-align: center; }
.gift-item .price { position: absolute; top: 5px; right: 5px; display: inline-flex; align-items: center; gap: 3px; height: 19px; padding: 0 6px 0 3px; border-radius: 10px; background: rgba(0, 0, 0, .6); color: #ffd666; font-size: 11px; font-weight: 800; }
.gift-item .skin-stage.buy-stage { width: 64px; height: 64px; }
.gift-item .buy-throw { width: 52px; height: 52px; }
.gift-item .buy-bg { width: 100%; height: 56px; border-radius: 10px; }
.gift-item .buy-frame { width: 64px; height: 64px; }
.gift-item .buy-frame .framed .ava { width: calc(58px / var(--fs, 1.8)); height: calc(58px / var(--fs, 1.8)); font-size: 12px; }
.gift-empty { margin: 8px 0 4px; text-align: center; color: var(--muted); }

.bond-line { font-size: 13px; font-weight: 600; color: var(--muted); }
.bond-kinds { grid-template-columns: repeat(6, 1fr); margin-bottom: 12px; }
.bond-kinds button { grid-column: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 92px; padding: 6px 4px; }
.bond-kinds button:nth-child(4) { grid-column: 2 / span 2; }
.bond-kinds button:nth-child(5) { grid-column: 4 / span 2; }
.bond-kinds button img { width: 40px; height: 40px; margin-bottom: 3px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); transition: transform .2s cubic-bezier(.2, 1.6, .4, 1); }
.bond-kinds button.on img { transform: scale(1.15); }
.bond-kinds button b { font-size: 13.5px; font-weight: 700; line-height: 1.15; text-align: center; }
.bond-kinds button small { font-size: 11.5px; font-weight: 600; color: var(--faint); }
.bond-kinds button:disabled { opacity: .4; }

.bonus-card { max-height: 90vh; }
.bonus-top { position: sticky; top: -8px; z-index: 5; flex: 0 0 auto; margin: -8px -16px 0; padding: 8px 16px 6px; border-radius: 28px 28px 0 0; background: var(--sheet); }
.bonus-top .sheet-head { padding-bottom: 0; }
.bonus-x { margin-left: auto; width: 36px; height: 36px; color: var(--text); background: var(--card-2); }
.bonus-x svg { width: 18px; height: 18px; }
.bonus-head { margin-top: 6px; }
.bonus-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bonus-note { margin:10px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.bonus-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 4px 10px;
  border-radius: 16px;
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.bonus-day small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.bonus-day img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .3)); }
.bonus-day b { font-size: 14px; font-weight: 800; color: #f5b82e; font-variant-numeric: tabular-nums; }
:root[data-theme="light"] .bonus-day b { color: #c07a00; }
.bonus-day.last { grid-column: span 2; flex-direction: row; justify-content: center; gap: 10px; }
.bonus-day.last img { width: 58px; height: 58px; order: -1; }
.bonus-day.last small { position: absolute; top: 8px; left: 12px; }
.bonus-day.last b { font-size: 17px; }
.bonus-day.done { opacity: .5; }
.bonus-day.done img { filter: grayscale(.4); }
.bonus-day.now {
  background:
    linear-gradient(180deg, rgba(255, 200, 70, .22), rgba(255, 160, 40, .06)) padding-box,
    linear-gradient(var(--card-2), var(--card-2)) padding-box,
    linear-gradient(150deg, #ffe27a, #ff9f2e) border-box;
  border: 2px solid transparent;
  padding: 7px 2px 8px;
  box-shadow: 0 0 22px rgba(255, 180, 50, .35);
  animation: day-now 1.8s ease-in-out infinite;
}
.bonus-day.now small { color: var(--text); }
.bonus-day.now img { animation: bob 2.2s ease-in-out infinite; }
@keyframes day-now { 50% { box-shadow: 0 0 34px rgba(255, 180, 50, .55); } }
.bonus-day.pop { animation: day-pop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes day-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.1); } }
.bonus-check {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2fbf71;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.bonus-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3.5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.bonus-btn {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: 100%;
  height: 52px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  color: #2a1600;
  background: linear-gradient(180deg, #ffe27a, #ffae2e);
  box-shadow: 0 8px 22px rgba(255, 170, 40, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .12s ease;
}
.bonus-btn:active { transform: scale(.97); }
.bonus-btn:disabled { cursor: default; }
.bonus-btn.wait { color: var(--muted); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.wheel-box { position: relative; flex: 0 0 auto; width: min(300px, 76vw); aspect-ratio: 1; margin: 10px auto 4px; }
.wheel { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; contain: layout paint; box-shadow: 0 12px 24px rgba(40, 10, 90, .45); }
.wheel svg { display: block; width: 100%; height: 100%; will-change: transform; }
.wheel-label text { fill: #fff; font: 800 24px Onest, sans-serif; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 3px; }
.wheel-label.top text { fill: #3a1d00; stroke: rgba(255, 240, 180, .6); }
.wheel-crown { fill: #ffd24a; stroke: #8a5200; stroke-width: 1.5px; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(255, 210, 74, .8)); }
.wheel-label.vip text.wheel-vip { font-size: 22px; fill: #fff6d6; stroke: rgba(80, 0, 40, .45); }
.wheel-label.vip text.wheel-days { font-size: 13px; font-weight: 700; fill: #ffe7b8; stroke: rgba(80, 0, 40, .4); stroke-width: 2px; }
.wheel-line { stroke: rgba(255, 220, 140, .35); stroke-width: 1.5; }
.wheel-seg.won { stroke: #fff; stroke-width: 4; animation: seg-won .5s ease-in-out 4 alternate; }
@keyframes seg-won { to { stroke-opacity: .2; } }
.wheel-bulb { fill: #fff6c8; animation: bulb 1s steps(1) infinite; }
.wheel-bulb.b1 { animation-delay: .5s; }
@keyframes bulb { 50% { fill: #b36b00; } }
.wheel-pin {
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 2;
  width: 32px;
  height: 42px;
  margin-left: -16px;
  background: linear-gradient(180deg, #fff3b0, #f2b630 55%, #9a5a00);
  clip-path: polygon(50% 100%, 4% 34%, 14% 8%, 50% 0, 86% 8%, 96% 34%);
  transform-origin: 50% 20%;
}
.wheel-pin.tick { animation: pin-tick .14s ease-out; }
@keyframes pin-tick { 40% { transform: rotate(-16deg); } }
.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #fff6c8, #f2b630 55%, #9a5a00);
  box-shadow: 0 0 0 4px rgba(30, 10, 60, .6), 0 6px 18px rgba(0, 0, 0, .45), inset 0 -3px 6px rgba(0, 0, 0, .25);
}
.wheel-hub img { width: 62%; height: 62%; object-fit: contain; }
.wheel-hub:disabled { cursor: default; }
.wheel-hub.ready { animation: hub-pulse 1.4s ease-in-out infinite; }
@keyframes hub-pulse { 50% { transform: translate(-50%, -50%) scale(1.08); } }
.wallet {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 14px;
  padding: 16px 18px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(70% 140% at 0% 50%, rgba(255, 190, 60, .28), transparent 65%),
    radial-gradient(60% 120% at 100% 0%, rgba(255, 120, 40, .16), transparent 70%),
    linear-gradient(135deg, #2c2110, #1a140b);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 110, .22), 0 10px 28px -14px rgba(255, 170, 40, .45);
}
.wallet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 236, 170, .12) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: wallet-shine 5s ease-in-out infinite;
}
@keyframes wallet-shine { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
.wallet-coin { grid-row: span 2; position: relative; display: grid; place-items: center; width: 54px; height: 54px; }
.wallet-coin::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 70, .45), transparent 68%); }
.wallet img.coin { position: relative; width: 50px; height: 50px; filter: drop-shadow(0 4px 8px rgba(120, 60, 0, .5)); animation: wallet-coin 4s ease-in-out infinite; }
@keyframes wallet-coin { 50% { transform: translateY(-2px) rotate(-6deg); } }
.wallet-sum { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.wallet-sum b { font-size: 30px; font-weight: 800; letter-spacing: -.6px; line-height: 1; color: #ffd666; font-variant-numeric: tabular-nums; text-shadow: 0 2px 14px rgba(255, 190, 60, .35); }
.wallet-sum small { font-size: 15px; font-weight: 700; color: rgba(255, 214, 102, .75); }
.wallet-day { display: flex; flex-direction: column; gap: 6px; }
.wallet-day small { font-size: 12px; font-weight: 600; color: rgba(255, 230, 180, .6); white-space: nowrap; }
.wallet-bar { height: 7px; border-radius: 4px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(255, 214, 110, .1); overflow: hidden; }
.wallet-bar i { display: block; height: 100%; width: 0; min-width: 7px; border-radius: inherit; background: linear-gradient(90deg, #ffcf4a, #ff9f1a); box-shadow: 0 0 10px rgba(255, 180, 40, .7); transition: width .4s ease; }
.st-vip {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 200, 90, .14), transparent 70%),
    linear-gradient(180deg, rgba(255, 214, 110, .05), rgba(255, 214, 110, .01));
  box-shadow: inset 0 0 0 1px rgba(255, 214, 110, .22);
}
.st-vip .st-list { background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(255, 214, 110, .12); }
#me-sheet .sheet-card { max-height: 90vh; }
#me-sheet .settings { gap: 18px; }
.st-group { display: flex; flex-direction: column; gap: 8px; }
.st-group > h3 { margin: 0; padding: 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
.st-sub { padding: 0 6px; font-size: 13px; color: var(--muted); }
#st-privacy { margin-bottom: 4px; }
.st-list { display: flex; flex-direction: column; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.st-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px 0 12px; font-size: 15px; font-weight: 500; transition: background .15s ease; }
.st-row:has(.switch):active { background: var(--card-2); }
.st-row + .st-row::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--line); }
.st-row[hidden] + .st-row::before { display: none; }
.st-row > span { flex: 1; min-width: 0; line-height: 1.25; }
.st-row .switch { flex-shrink: 0; }
.st-two { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; }
.st-two small { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.st-ic {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, var(--ic-a), var(--ic-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 10px -4px var(--ic-b);
}
.st-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-ic.red { --ic-a: #ff6a4d; --ic-b: #f2304f; }
.st-ic.blue { --ic-a: #5aa8ff; --ic-b: #3a6cf4; }
.st-ic.violet { --ic-a: #b48cff; --ic-b: #7a4ff0; }
.st-ic.orange { --ic-a: #ffb04d; --ic-b: #ff7a1a; }
.st-ic.pink { --ic-a: #ff7ab8; --ic-b: #e8408a; }
.st-ic.green { --ic-a: #4fdc8a; --ic-b: #17b26a; }
.st-ic.amber { --ic-a: #ffd25a; --ic-b: #f29a12; }
.st-ic.gold { --ic-a: #ffe08a; --ic-b: #e09a1a; color: #4a2c00; }
.st-alias { cursor: text; }
.st-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 8px 0; }
.st-field small { font-size: 12px; font-weight: 600; color: var(--muted); }
.st-field input { width: 100%; height: 24px; padding: 0; border: 0; outline: 0; background: none; font-size: 16px; font-weight: 600; color: var(--text); }
.st-field input::placeholder { color: var(--muted); font-weight: 500; }
.st-alias:focus-within { box-shadow: inset 0 0 0 1.5px rgba(255, 190, 60, .55); border-radius: 18px 18px 0 0; }
.st-ava-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 18px; background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(255, 214, 110, .12); }
.st-ava-box > small { padding: 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
:root[data-theme="light"] .wallet {
  background:
    radial-gradient(70% 140% at 0% 50%, rgba(255, 200, 80, .45), transparent 65%),
    radial-gradient(60% 120% at 100% 0%, rgba(255, 150, 60, .2), transparent 70%),
    linear-gradient(135deg, #fff6dc, #ffe9b8);
  box-shadow: inset 0 0 0 1px rgba(220, 150, 30, .28), 0 10px 26px -14px rgba(220, 140, 20, .5);
}
:root[data-theme="light"] .wallet::after { background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%); }
:root[data-theme="light"] .wallet-sum b { color: #a35a00; text-shadow: none; }
:root[data-theme="light"] .wallet-sum small { color: rgba(163, 90, 0, .7); }
:root[data-theme="light"] .wallet-day small { color: rgba(120, 70, 0, .65); }
:root[data-theme="light"] .wallet-bar { background: rgba(160, 100, 0, .14); box-shadow: none; }
:root[data-theme="light"] .st-vip {
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 200, 90, .3), transparent 70%),
    linear-gradient(180deg, #fffaf0, #fff);
  box-shadow: inset 0 0 0 1px rgba(220, 150, 30, .3);
}
:root[data-theme="light"] .st-vip .st-list,
:root[data-theme="light"] .st-ava-box { background: #fff; box-shadow: inset 0 0 0 1px rgba(220, 150, 30, .2); }
:root[data-theme="light"] .st-crown { color: #c47a00; }

.st-stats { gap: 10px; }
.ss-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.ss-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; }
.ss-card-head small { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ss-chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; height: 120px; }
.ss-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; height: 100%; padding: 0; }
.ss-col i {
  display: block;
  width: 100%;
  max-width: 18px;
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #ff8a5c, #ff4d6d);
  box-shadow: 0 0 12px rgba(255, 90, 80, .25);
  transform-origin: bottom;
  animation: ss-grow .6s cubic-bezier(.2, .8, .2, 1) both;
  transition: filter .15s ease, transform .15s ease;
}
.ss-col.empty i { background: var(--card-3); box-shadow: none; }
.ss-col.today i { background: linear-gradient(180deg, #ffd666, #ff9f1a); box-shadow: 0 0 14px rgba(255, 190, 60, .4); }
.ss-col.pick i { filter: brightness(1.25); transform: scaleX(1.12); }
.ss-col small { font-size: 9.5px; font-weight: 600; color: var(--muted); }
.ss-col.today small, .ss-col.pick small { color: var(--text); }
@keyframes ss-grow { from { transform: scaleY(0); } }
.ss-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ss-facts span { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--card-2); }
.ss-facts small { font-size: 11px; color: var(--muted); }
.ss-facts b { font-size: 14px; font-weight: 700; white-space: nowrap; }
.ss-plat-bar { display: flex; gap: 3px; height: 12px; border-radius: 6px; overflow: hidden; }
.ss-plat-bar i { display: block; min-width: 6px; height: 100%; }
.ss-plat-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.ss-plat-list > span { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ss-plat-list > span > i { width: 8px; height: 8px; border-radius: 50%; }
.ss-plat-list b { font-weight: 700; color: var(--muted); }
.ss-pals { display: flex; flex-direction: column; gap: 4px; }
.ss-pal { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 12px; text-align: left; }
.ss-pal:active { background: var(--card-2); }
.ss-rank { flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; color: var(--muted); background: var(--card-2); }
.ss-pal.r1 .ss-rank { color: #3a2500; background: linear-gradient(135deg, #ffe08a, #ffb020); }
.ss-pal.r2 .ss-rank { color: #222; background: linear-gradient(135deg, #f1f3f6, #aab2bd); }
.ss-pal.r3 .ss-rank { color: #2a1206; background: linear-gradient(135deg, #f0b98a, #c06a32); }
.ss-pal .framed { flex-shrink: 0; width: 38px; height: 38px; }
.ss-pal .framed .ava { width: 38px; height: 38px; font-size: 15px; }
.ss-pal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ss-pal-body b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-track { height: 6px; border-radius: 3px; background: var(--card-3); overflow: hidden; }
.ss-track i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff4d6d, #ff8a5c); animation: ss-fill .7s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.ss-pal.r1 .ss-track i { background: linear-gradient(90deg, #ffb020, #ffe08a); }
@keyframes ss-fill { from { transform: scaleX(0); } }
.ss-pal > small { flex-shrink: 0; min-width: 46px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0 16px; }
.pf-chip {
  height: 28px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
}
.st-vip-head { display: flex; align-items: center; gap: 8px; padding: 0 2px; }
.st-vip-head .vip-tag { margin-left: 0; }
.st-crown { display: grid; place-items: center; color: #ffcf4a; filter: drop-shadow(0 0 8px rgba(255, 190, 60, .55)); }
.st-crown svg { width: 20px; height: 20px; fill: currentColor; }
.st-vip.locked > :not(.st-vip-head):not(.lock) { opacity: .45; }
.st-vip .lock { top: 14px; right: 14px; }
.st-avatars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.st-ava { position: relative; aspect-ratio: 1; border-radius: 50%; padding: 2px; transition: transform .12s ease; }
.st-ava .ava { width: 100%; height: 100%; font-size: 16px; }
.st-ava.on { box-shadow: 0 0 0 2px var(--accent); }
.st-ava:active { transform: scale(.92); }
.st-ava.busy { animation: pulse-soft 1s ease-in-out infinite; }
@keyframes pulse-soft { 50% { opacity: .45; } }
.st-upload { background: var(--card-2); color: var(--muted); }
.st-upload svg { width: 45%; height: 45%; }
.pf-throws { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pf-throws .throw-item { width: 100%; min-width: 0; aspect-ratio: 1; height: auto; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.pf-throws .throw-item img { width: 72%; height: auto; aspect-ratio: 1; }
.pf-throws .throw-item.on { background: var(--card-2); box-shadow: inset 0 0 0 2px var(--accent); }
.pf-bgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-bg-opt {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: var(--card) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .12s ease;
}
.pf-bg-opt.on { box-shadow: inset 0 0 0 2px var(--text), 0 0 0 2px var(--bg); }
.pf-bg-opt.locked { filter: saturate(.6) brightness(.75); }
.pf-frames { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pf-nicks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-nicks + .pf-nicks { margin-top: 8px; }
.pf-nick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  height: 70px;
  padding: 14px 6px 0;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .12s ease;
}
.pf-nick:active { transform: scale(.94); }
.pf-nick.on { box-shadow: inset 0 0 0 2px var(--text); }
.pf-nick small { font-size: 11px; font-weight: 600; color: var(--faint); }
.pf-nick.locked .nick-sample { opacity: .55; }
.pf-nick .price { position: absolute; top: 4px; right: 4px; display: inline-flex; align-items: center; gap: 3px; height: 17px; padding: 0 5px 0 3px; border-radius: 9px; background: rgba(0, 0, 0, .6); color: #ffd666; font-size: 10px; font-weight: 800; }
.pf-nick .price .coin { width: 11px; height: 11px; }
.nick-sample { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 800; }
.nick-sample.big { font-size: 28px; padding: 6px 4px; }
.pf-frame-opt .aura { width: 135%; }
.pf-seatfx { margin-top: 14px; }
.pf-frame-opt {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .12s ease;
}
.pf-frame-opt .ava { width: calc(62px / var(--fs, 1.8)); height: calc(62px / var(--fs, 1.8)); font-size: 12px; }
.pf-frame-opt.on { box-shadow: inset 0 0 0 2px var(--text); }
.pf-frame-opt.locked .framed { filter: grayscale(.4) brightness(.75); }
.lock {
  position: absolute;
  z-index: 2;
  right: 6px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .65) center / 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffd666' d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h1Zm2 0h6V7a3 3 0 0 0-6 0v3Z'/%3E%3C/svg%3E");
}
.pf-vip {
  position: relative;
  margin: 6px 16px 0;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 26px;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 196, 70, .32), transparent 60%),
    radial-gradient(80% 80% at 100% 100%, rgba(181, 140, 255, .28), transparent 60%),
    linear-gradient(160deg, #221626, #120f18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 214, 110, .25);
}
.pf-vip.pulse { animation: vip-pulse .9s ease; }
@keyframes vip-pulse { 30% { transform: scale(1.03); box-shadow: 0 0 0 4px rgba(245, 197, 66, .45), 0 16px 40px rgba(0, 0, 0, .35); } }
.pf-vip-art { display: flex; align-items: flex-end; justify-content: center; height: 96px; margin-bottom: 2px; }
.pf-vip-art img { height: 72px; width: auto; margin: 0 -6px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
.pf-vip-art img:nth-child(2), .pf-vip-art img:nth-child(4) { height: 82px; }
.pf-vip-art img:nth-child(3) { position: relative; z-index: 1; height: 96px; }
.vip-perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 10px; }
.vip-perk {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 8px 11px;
  border-radius: 18px;
  background:
    radial-gradient(90% 60% at 50% 20%, rgba(255, 200, 90, .16), transparent 70%),
    rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 110, .16);
}
.vip-perk.wide { grid-column: 1 / -1; flex-direction: row; gap: 12px; padding: 10px 14px; text-align: left; }
.perk-art { position: relative; display: grid; place-items: center; width: 100%; height: 70px; }
.vip-perk.wide .perk-art { flex: 0 0 auto; width: 112px; }
.perk-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perk-text b { font-size: 14px; font-weight: 800; color: #ffe6a3; }
.perk-text small { font-size: 11.5px; line-height: 1.3; color: rgba(255, 255, 255, .62); text-wrap: balance; }
.pf-vip.active .vip-perk::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd66b, #f0a92a);
  box-shadow: 0 2px 6px rgba(240, 169, 42, .45);
}
.pf-vip.active .vip-perk::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 5px;
  border: solid #3a2300;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
}
.perk-seats, .perk-throws, .perk-bgs, .perk-crowd, .perk-forever { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.perk-seats img { height: 52px; width: auto; margin: 0 -9px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.perk-seats img:nth-child(2) { position: relative; z-index: 1; height: 64px; }
.perk-throws { align-items: center; gap: 2px; }
.perk-throws img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); animation: bob 3s ease-in-out infinite; }
.perk-throws img:nth-child(2) { width: 46px; height: 46px; animation-delay: -1s; }
.perk-throws img:nth-child(3) { animation-delay: -2s; }
.perk-art .framed .ava { width: calc(72px / var(--fs, 1.5)); height: calc(72px / var(--fs, 1.5)); font-size: 16px; }
.perk-bgs { align-items: center; }
.perk-bgs img { width: 62px; height: 44px; object-fit: cover; border-radius: 10px; box-shadow: 0 6px 12px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .1); }
.perk-bgs img:first-child { transform: rotate(-7deg) translateX(6px); }
.perk-bgs img:last-child { position: relative; transform: rotate(6deg) translate(-6px, 6px); }
:root[data-theme="light"] .pf-vip .nick { --nick: var(--nick-d); }
.perk-art .nick-sample { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; padding: 0 4px; }
.perk-coin { position: relative; display: flex; align-items: center; gap: 2px; }
.perk-coin img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(255, 170, 40, .45)); animation: bob 3s ease-in-out infinite; }
.perk-coin b, .perk-crowd b {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff1b8, #f5c542 50%, #ffb03a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.perk-crowd { align-items: center; }
.perk-crowd img { width: 34px; height: 34px; border-radius: 50%; margin-right: -10px; box-shadow: 0 0 0 2px #1c1420; }
.perk-crowd b { margin-left: 16px; font-size: 22px; }
.perk-alias { position: relative; display: block; width: 52px; height: 52px; }
.perk-alias img { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 214, 110, .6), 0 6px 14px rgba(0, 0, 0, .4); }
.perk-alias i { position: absolute; right: -4px; bottom: -2px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #ffd66b, #f0a92a); }
.perk-alias svg { width: 12px; height: 12px; fill: none; stroke: #3a2300; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.perk-badge .vip-tag { transform: scale(1.7); }
.perk-forever { align-items: center; gap: 2px; }
.perk-forever img { height: 62px; width: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.perk-forever .framed .ava { width: calc(56px / var(--fs, 1.5)); height: calc(56px / var(--fs, 1.5)); font-size: 13px; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-4deg); } }
.pf-vip-title {
  margin-top: 4px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff1b8, #f5c542 50%, #ffb03a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pf-vip-sub { font-size: 14px; color: rgba(255, 255, 255, .75); }
.pf-vip.active .pf-vip-sub { color: #ffd66b; font-weight: 700; font-size: 15px; }
.vip-buy {
  margin-top: 8px;
  color: #3a2300;
  background: linear-gradient(135deg, #fff1b8, #f5c542 50%, #e59a1f);
  box-shadow: 0 10px 26px rgba(245, 180, 40, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.pf-mod { padding: 4px 16px 0; }
.pf-look-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.pf-look-head h3 { margin: 0 2px; }
.pf-shop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 6px 0 8px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 150, 60, .2), rgba(255, 80, 120, .14));
  box-shadow: inset 0 0 0 1px rgba(255, 170, 80, .3);
  transition: transform .12s ease;
}
.pf-shop:active { transform: scale(.95); }
.pf-shop img { width: 24px; height: 24px; object-fit: contain; }
.pf-enters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pf-enter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px 9px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .12s ease;
}
.pf-enter small { font-size: 12px; font-weight: 600; }
.pf-enter.on { box-shadow: inset 0 0 0 2px var(--text); }
.pf-enter:active { transform: scale(.95); }
.enter-art {
  position: relative;
  display: block;
  width: 100%;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 50% 110%, var(--c2, #555), transparent 70%),
    radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--c1, #777) 40%, transparent), transparent 70%),
    #0c0b12;
}
.enter-art.none { background: var(--card-2); }
.enter-art.none::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 2px; border-radius: 1px; background: var(--faint); transform: translate(-50%, -50%) rotate(-45deg); }
.enter-art img {
  position: absolute;
  top: -20%;
  left: calc(8% + var(--i) * 15%);
  width: 16px;
  height: 16px;
  object-fit: contain;
  animation: enter-fall 2.4s linear infinite;
  animation-delay: calc(var(--i) * -.41s);
  filter: drop-shadow(0 0 4px var(--c1, #fff));
}
@keyframes enter-fall { from { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(80px) rotate(160deg); opacity: 0; } }
.enter-art.big { width: 200px; height: 110px; border-radius: 18px; }
.enter-art.big img { width: 26px; height: 26px; animation-name: enter-fall-big; }
@keyframes enter-fall-big { from { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(150px) rotate(160deg); opacity: 0; } }

/* ---------- shop ---------- */

.shop {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--vv-top);
  height: var(--app-h);
  z-index: 83;
  background:
    radial-gradient(120% 50% at 50% -10%, rgba(255, 120, 50, .16), transparent 60%),
    radial-gradient(80% 40% at 100% 30%, rgba(140, 80, 255, .1), transparent 70%),
    var(--bg);
}
.shop.in { animation: pf-in .32s cubic-bezier(.2, .8, .2, 1); }
.shop-scroll {
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding-bottom: calc(28px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.shop-scroll::-webkit-scrollbar { display: none; }
.shop-scroll > * { flex-shrink: 0; }
.shop-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-t) + 10px) 16px 0;
}
.shop-title {
  flex: 1;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .2px;
  background: linear-gradient(135deg, #fff6e0, #ffc46b 55%, #ff8a3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.shop-coins { height: 32px; padding: 0 12px 0 8px; border-radius: 16px; font-size: 14px; box-shadow: inset 0 0 0 1px rgba(255, 200, 70, .25); }
.shop-coins img.coin { width: 20px; height: 20px; }
.shop-season {
  position: relative;
  margin: 0 16px;
  min-height: 168px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #140a06;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 150, 60, .3);
}
.shop-season-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.shop-season::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 4, 2, .2) 0%, rgba(10, 4, 2, .75) 100%),
    radial-gradient(60% 80% at 0% 0%, rgba(255, 120, 30, .35), transparent 70%);
}
.shop-season-text { display: flex; flex-direction: column; gap: 4px; }
.shop-season-text b {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: .5px;
  background: linear-gradient(135deg, #ffe7a8, #ff9a3c 50%, #ff5a1f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255, 110, 30, .5));
}
.shop-season-text small {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .45);
  font-size: 12.5px;
  font-weight: 700;
  color: #ffd29a;
}
.shop-season-items { display: flex; gap: 8px; }
.season-item {
  position: relative;
  flex: 1;
  max-width: 76px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(0, 0, 0, .4);
  box-shadow: inset 0 0 0 1px rgba(255, 170, 80, .35);
  transition: transform .12s ease;
}
.season-item img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.season-item:active { transform: scale(.93); }
.season-item.owned { opacity: .45; }
.season-item.owned::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3ecf7a center / 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.shop-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}
.shop-tabs::-webkit-scrollbar { display: none; }
.shop-tab {
  flex: 1 0 auto;
  height: 36px;
  padding: 0 9px;
  border-radius: 18px;
  background: var(--card);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.shop-tab:active { transform: scale(.95); }
.shop-tab.on { color: #1b0f00; background: linear-gradient(135deg, #ffd66b, #ff9f3a); box-shadow: 0 6px 16px rgba(255, 160, 50, .3); }
.shop-tab.vip { color: #ffd66b; }
.shop-tab.vip.on { color: #3a2300; background: linear-gradient(135deg, #fff1b8, #f5c542 50%, #e59a1f); }
.shop-body { display: flex; flex-direction: column; gap: 18px; padding: 0 16px; }
.vip-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px;
  padding: 10px 12px 10px 8px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(70% 120% at 0% 50%, rgba(255, 196, 70, .3), transparent 65%),
    radial-gradient(60% 120% at 100% 100%, rgba(181, 140, 255, .24), transparent 60%),
    linear-gradient(160deg, #221626, #120f18);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(255, 214, 110, .25);
}
.vip-mini[hidden] { display: none; }
.vip-mini-art { flex: 0 0 auto; display: flex; align-items: flex-end; height: 52px; }
.vip-mini-art img { height: 44px; width: auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.vip-mini-art img + img { position: relative; z-index: 1; height: 52px; margin-left: -14px; }
.vip-mini-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.vip-mini .pf-vip-title { margin: 0; font-size: 22px; line-height: 1.1; }
.vip-mini small { font-size: 13px; color: rgba(255, 255, 255, .75); }
.vip-mini.active small { color: #ffd66b; font-weight: 700; }
.vip-more {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  color: #3a2300;
  background: linear-gradient(135deg, #fff1b8, #f5c542 50%, #e59a1f);
  box-shadow: 0 6px 14px rgba(240, 169, 42, .3);
  transition: transform .12s ease;
}
.vip-more:active { transform: scale(.95); }
#vip-sheet { z-index: 90; }
.vip-sheet-card { padding: 8px 12px calc(14px + var(--safe-b)); max-height: min(88vh, calc(var(--app-h, 100vh) - 24px)); }
.vip-sheet-card .pf-vip { flex-shrink: 0; margin: 0; overflow: visible; }
.vip-sheet-card .vip-buy { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -10px 24px rgba(18, 15, 24, .9), 0 8px 20px rgba(240, 169, 42, .35); }
.shop-group { display: flex; flex-direction: column; gap: 10px; }
.shop-group h3 { margin: 0 2px; font-size: 16px; font-weight: 700; }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shop-grid:has(> .k-throw), .shop-grid:has(> .k-aura), .shop-grid:has(> .k-frame) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shop-card {
  --tint: 120, 190, 255;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 8px 8px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  background:
    radial-gradient(90% 60% at 50% 25%, rgba(var(--tint), .22), transparent 70%),
    linear-gradient(180deg, rgba(var(--tint), .08), rgba(0, 0, 0, 0) 60%),
    var(--card);
  box-shadow: inset 0 0 0 1px rgba(var(--tint), .28), 0 8px 20px rgba(0, 0, 0, .25);
  transition: transform .12s ease;
}
.shop-card:active { transform: scale(.96); }
.shop-card::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: rgba(var(--tint), .9);
  box-shadow: 0 0 12px rgba(var(--tint), .9);
}
/* Rarity: common grey / rare blue / epic purple / legendary gold — the card's background and rim. */
.rar-common { --tint: 160, 168, 185; }
.rar-rare { --tint: 80, 160, 255; }
.rar-epic { --tint: 175, 110, 255; }
.rar-legendary { --tint: 255, 190, 70; }
.shop-card[class*="rar-"] {
  background:
    radial-gradient(85% 62% at 50% 30%, rgba(var(--tint), .34), transparent 72%),
    linear-gradient(180deg, rgba(var(--tint), .14), rgba(var(--tint), .04) 70%),
    var(--card);
  box-shadow: inset 0 0 0 1px rgba(var(--tint), .4), 0 8px 20px rgba(0, 0, 0, .25);
}
.shop-card.rar-common { box-shadow: inset 0 0 0 1px rgba(var(--tint), .24), 0 8px 20px rgba(0, 0, 0, .25); }
.shop-card.rar-legendary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 230, 160, .14) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
  animation: shop-shine 4.5s ease-in-out infinite;
}
@keyframes shop-shine { 60%, 100% { background-position: 150% 0; } }
.shop-card.bond { --tint: 255, 110, 170; }
.shop-card.vip { --tint: 245, 197, 66; }
.shop-art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1.15; }
.shop-card.k-throw .shop-art, .shop-card.k-frame .shop-art, .shop-card.k-aura .shop-art { aspect-ratio: 1; }
.shop-card.k-nick .shop-art, .shop-card.k-nickfx .shop-art { aspect-ratio: auto; height: 44px; }
.shop-card.k-bg .shop-art, .shop-card.k-enter .shop-art { aspect-ratio: 1.6; }
.shop-art .skin-stage { width: 100%; height: 100%; max-width: 140px; }
.shop-throw { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.shop-bg, .shop-art .enter-art { width: 100%; height: 100%; border-radius: 14px; background-position: center; background-size: cover; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.shop-art .buy-frame { width: 100%; height: 100%; }
.shop-art .buy-frame .framed .ava { width: calc(64px / var(--fs, 1.8)); height: calc(64px / var(--fs, 1.8)); font-size: 12px; }
.shop-art .nick-sample { font-size: 18px; padding: 0 4px; }
.shop-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 700; }
.shop-foot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 30px;
  border-radius: 12px;
  background: rgba(var(--tint), .14);
  color: rgb(var(--tint));
  font-size: 12.5px;
  font-weight: 800;
}
.shop-foot.price-btn { color: #2a1600; background: linear-gradient(135deg, #ffd66b, #ff9f1a); box-shadow: 0 4px 12px rgba(255, 160, 30, .25); }
.shop-foot.price-btn.short { color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .08); box-shadow: none; }
:root[data-theme="light"] .shop-foot.price-btn.short { color: #7d6a58; background: rgba(60, 30, 0, .06); }
.shop-foot img.coin { width: 15px; height: 15px; }
.shop-foot.vip-price { position: relative; gap: 3px; padding: 0 34px 0 4px; }
.shop-grid:has(> .k-throw) .vip-price, .shop-grid:has(> .k-aura) .vip-price, .shop-grid:has(> .k-frame) .vip-price { padding: 0 33px 0 2px; font-size: 11px; }
.shop-grid:has(> .k-throw) .vip-price img.coin, .shop-grid:has(> .k-aura) .vip-price img.coin, .shop-grid:has(> .k-frame) .vip-price img.coin { width: 12px; height: 12px; }
.shop-grid:has(> .k-throw) .vip-need, .shop-grid:has(> .k-aura) .vip-need, .shop-grid:has(> .k-frame) .vip-need { right: 3px; padding: 2px 4px; font-size: 8.5px; }
.vip-need { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 2px 5px; border-radius: 7px; background: linear-gradient(135deg, #ffd66b, #f0a92a); color: #2a1600; font-size: 9.5px; font-style: normal; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.shop-card.locked .shop-art > * { filter: saturate(.75) brightness(.85); }
.shop-ribbon {
  position: absolute;
  z-index: 3;
  left: 8px;
  top: 8px;
  padding: 3px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff9a3c, #ff5a1f);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(255, 90, 30, .4);
}
.shop-empty { margin: 30px 0; text-align: center; font-size: 14.5px; color: var(--muted); }
:root[data-theme="light"] .shop-card { box-shadow: inset 0 0 0 1px rgba(var(--tint), .4), 0 8px 20px rgba(60, 20, 20, .08); }
:root[data-theme="light"] .pf-head::after { background: linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, 0) 30%, var(--bg) 64%); }
:root[data-theme="light"] .pf-name { text-shadow: 0 2px 12px rgba(255, 255, 255, .6); }
:root[data-theme="light"] .pf-name.shimmer, :root[data-theme="light"] .pf-name.nick { text-shadow: none; }
.person .framed .ava { width: 42px; height: 42px; font-size: 16px; }
.person-name b .vip-tag { height: 15px; font-size: 9px; padding: 0 5px; }

/* The admin panel's styles live in admin.css (loaded with admin.js). */

.composer .stk-btn {
  position: absolute;
  right: 66px;
  top: 8px;
  width: 46px;
  height: 46px;
  background: none;
  color: var(--faint);
  z-index: 1;
}
.composer .stk-btn[hidden] { display: none; }
.composer .stk-btn svg { width: 25px; height: 25px; }
.composer .stk-btn .i-keys, .composer .stk-btn[aria-pressed="true"] .i-smile { display: none; }
.composer .stk-btn[aria-pressed="true"] .i-keys { display: block; }
.composer .stk-btn[aria-pressed="true"] { color: var(--accent); }
.composer:has(.stk-btn:not([hidden])) input { padding-right: 46px; }
.reply-bar:not([hidden]) + .composer .stk-btn { top: 6px; }
.room.stickering .composer { padding-bottom: 8px; }
.stickers {
  display: flex;
  flex-direction: column;
  height: min(300px, 42vh);
  padding-bottom: var(--safe-b);
  background: var(--sheet);
  border-top: 1px solid var(--line);
}
.stickers[hidden] { display: none; }
.stk-packs {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.stk-packs::-webkit-scrollbar { display: none; }
.stk-packs button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.stk-packs button.on { background: var(--card-2); color: var(--text); }
.stk-packs img { width: 30px; height: 30px; object-fit: contain; }
.stk-packs svg { width: 22px; height: 22px; }
.stk-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  grid-auto-rows: 72px;
  gap: 4px;
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.stk-grid button {
  border-radius: 12px;
  display: grid;
  place-items: center;
  transition: transform .12s ease, background .12s ease;
}
.stk-grid button:active { transform: scale(.9); background: var(--card-2); }
.stk-grid img { width: 62px; height: 62px; object-fit: contain; }
.stk-packs .stk-add { color: var(--accent); }
.stk-grid.catalog { display: flex; flex-direction: column; gap: 8px; }
.stk-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--card-2);
}
.stk-info { display: flex; flex-direction: column; min-width: 0; }
.stk-info b { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk-info small { font-size: 12.5px; color: var(--muted); }
.stk-strip { grid-column: 1 / -1; display: flex; gap: 6px; overflow: hidden; }
.stk-strip img { width: 48px; height: 48px; flex: 0 0 auto; object-fit: contain; }
.stk-grid .stk-toggle {
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  background: var(--grad);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
}
.stk-grid .stk-toggle.added { background: var(--card-3, var(--card)); color: var(--text); }
.stk-grid .stk-toggle:disabled { opacity: .5; }
.msg.stk .bubble, .msg.stk.me .bubble, .msg.stk:not(.me) .bubble:hover { padding: 0; background: none; }
.msg.stk .name { padding-left: 2px; }
.msg.stk .quote { margin-bottom: 4px; background: var(--card-2); }
.msg.stk.me .quote { background: var(--me); }
.msg.stk .body { position: relative; }
.stk-img { width: 136px; height: 136px; }
.stk-img img, .stk-img svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.msg.stk .stamp {
  position: absolute;
  right: 4px;
  bottom: 4px;
  float: none;
  margin: 0;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
}
.feed-stk { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; }

.blocked {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
}
.blocked-card { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 300px; padding: 0 24px; text-align: center; }
.blocked-card small { color: var(--faint); font-size: 14px; font-weight: 500; line-height: 1.4; white-space: pre-line; }
.blocked-card small:empty { display: none; }
.maint-ic { width: 44px; height: 44px; margin-bottom: 4px; color: var(--muted); }
.report-who small { color: var(--muted); font-size: 14px; font-weight: 500; line-height: 1.35; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.report-who small:empty { display: none; }
.report-reasons { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.report-reasons button { height: 38px; padding: 0 14px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 14px; font-weight: 600; }
.report-reasons button.on { background: var(--card-3); box-shadow: inset 0 0 0 1.5px rgba(255, 90, 54, .6); color: var(--text); }
.field textarea { min-height: 64px; padding: 12px 14px; border: 0; outline: 0; border-radius: 15px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: inherit; font-size: 16px; resize: none; }
.field textarea:focus { box-shadow: inset 0 0 0 1.5px rgba(255, 90, 54, .6); }

@media (prefers-reduced-motion: reduce) {
  .hero-art.ready, .hero-scene::after, .spark, .shine::after, .empty-state img, .home.enter > *, .new, .shimmer, .nick, .nick-shine, .pf-act::after, .buy-hero::before, .toast.short, .wallet::after, .wallet img.coin, .toss-shine, .aura, .aura::after, .pf-bg, .perk-throws img, .perk-coin img, .framed::after { animation: none; }
  .frame-live > *, .seat-part, .seat-glow, .seat-led, .move-bob, .move-rock, .move-squish { animation: none !important; }
  .pf-back::before, .pf-back::after { animation: none; }
  .bgfx { display: none; }
  .pp-ic, .pp-level, .pp-bar i, .sigil > *, .sg-sparks::before, .sg-sparks::after { animation: none !important; }
  .daily, .daily-glow, .daily-gift, .bonus-btn::after, .bonus-day.now, .bonus-day.now img, .wheel-bulb, .wheel-hub.ready { animation: none !important; }
  .nfx, .nfx .ch { animation: none !important; }
  .nfx-mist::after { display: none; }
  .nfx-contour::after, .nfx-mirror::after { animation: none; }
  .sb-p { display: none; }
  .fl-warp { filter: none !important; }
  .seat-fx, .fl-p, .fl-shine { display: none; }
}

/* ---------- graphics mode (Настройки → Графика) ----------
   perf-high / perf-low name the tier; the perf-no* classes are the individual switches, so
   «Экономно», «Авто» on a weak phone and «Своё» all go through the same rules. */
:root.perf-noblur *, :root.perf-noblur *::before, :root.perf-noblur *::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
/* Without the blur, the layers over the video get a denser tint to stay readable. */
:root.perf-noblur .big-play { background: rgba(0, 0, 0, .55); }
:root.perf-noblur .stage-pick { background: rgba(0, 0, 0, .45); }
:root.perf-noblur .feed-item { background: rgba(0, 0, 0, .7); }
:root.perf-noblur .fs-composer input, :root.perf-noblur .ink-modes, :root.perf-noblur .ink-bar .ic.ghost { background: rgba(0, 0, 0, .64); }
:root.perf-noblur .stage.desk-seats .fs-seats { background: rgba(10, 10, 14, .72); }
:root.perf-noblur .stage-poll .poll-bar, :root.perf-noblur .stage-poll .poll-card, :root.perf-noblur .up-next { background: rgba(12, 12, 14, .93); }
:root.perf-noblur .sheet { background: rgba(0, 0, 0, .66); }
:root.perf-noblur .pf-close, :root.perf-noblur .pf-gear { background: rgba(0, 0, 0, .5); }

/* Nick shimmer and animated frames: background-position/filter animations repaint every frame. */
:root.perf-noshimmer .shimmer, :root.perf-noshimmer .nick, :root.perf-noshimmer .nick-shine, :root.perf-noshimmer .framed::after { animation: none; }
:root.perf-noshimmer .frame-live > * { animation: none !important; }
:root.perf-noshimmer .bgfx, :root.perf-low .bgfx { display: none; }
:root.perf-noshimmer .sg-shine { display: none !important; }
:root.perf-low .sigil > *, :root.perf-low .sg-sparks::before, :root.perf-low .sg-sparks::after { animation: none !important; }
:root.perf-noshimmer .nfx, :root.perf-noshimmer .nfx .ch { animation: none !important; }
:root.perf-noshimmer .nfx-mist::after { display: none; }
:root.perf-noshimmer .nfx-contour::after, :root.perf-noshimmer .nfx-mirror::after { animation: none; }
:root.perf-noshimmer .fl-warp { filter: none !important; animation: none !important; }
:root.perf-noshimmer .fl-p, :root.perf-noshimmer .fl-shine { display: none; }

/* Seat LEDs, tentacles, glow, rocking and auras. */
:root.perf-noseat .seat-part, :root.perf-noseat .seat-glow, :root.perf-noseat .seat-led,
:root.perf-noseat .move-bob, :root.perf-noseat .move-rock, :root.perf-noseat .move-squish,
:root.perf-noseat .aura, :root.perf-noseat .aura::after { animation: none !important; }
:root.perf-noseat .sb-p { display: none; }

/* Live ambient: a 32×18 canvas, already blurred and tinted when it's drawn, upscaled by the GPU.
   The 40px CSS blur no longer re-runs on every new frame. */
.ambient canvas.baked { filter: none; }
.ambient canvas { filter: saturate(1.4) brightness(.6); }
:root.perf-noblur .ambient img { filter: blur(24px) saturate(1.4) brightness(.6); }

/* Chat rows off screen skip layout and paint. Rows with a decorative frame are left alone: paint
   containment would clip the frame where it sticks out of the row. */
.msg:not(:has(> .framed[data-frame])):not(.picked) { content-visibility: auto; contain-intrinsic-size: auto 52px; }

/* Settings → Графика */
.perf-choice { margin: 0; }
.perf-note { padding: 0 6px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.perf-custom[hidden] { display: none; }

/* 3D throws: one shared WebGL canvas (Красиво) and turntable sprite sheets (Экономно). */
.fx-gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.toss.toss-proxy { visibility: hidden; will-change: auto; }
.toss.toss-sprite { perspective: none; }
.toss-sprite .toss-body { transform-style: flat; }
.toss-sheet { right: auto; bottom: auto; background-repeat: no-repeat; }

/* ---------- visual pass: nicks, audience row, welcome, loading, empty states, springs ---------- */

/* Nicks stay on one line with an ellipsis everywhere. */
.name { display: flex; align-items: center; min-width: 0; max-width: 100%; }
.name > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name .vip-tag { flex: 0 0 auto; }
.quote b { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-item span:not(.ava) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item b { display: inline-block; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.sys > span.sys-line { display: flex; min-width: 0; -webkit-line-clamp: unset; white-space: nowrap; }
.sys-nick { flex: 0 100 auto; min-width: 2.5em; overflow: hidden; text-overflow: ellipsis; font-weight: inherit; }
.sys-rest { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: pre; }
.sys-rest.fixed { flex-shrink: 0; }

/* Room header: name, then what's on and how many are watching; the code lives in «Пригласить». */
:root .room-head small.room-now { display: flex; align-items: center; gap: 5px; min-width: 0; letter-spacing: 0; font-weight: 600; }
.rn-ic { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.room-now[data-state="play"] .rn-ic { background: #ff4d2e; box-shadow: 0 0 0 2.5px rgba(255, 77, 46, .22); }
.room-now[data-state="pause"] .rn-ic { width: 7px; height: 8px; border-radius: 1px; background: linear-gradient(90deg, var(--muted) 0 35%, transparent 35% 65%, var(--muted) 65%); }
.rn-what { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-now[data-state="play"] .rn-what { color: var(--text); }
.rn-dot, .rn-watch { flex: 0 0 auto; }
.room-now[data-state="none"] .rn-what, .room-now[data-state="none"] .rn-dot { display: none; }
.inv-text { display: none; }
:root.split .invite-btn { width: auto; padding: 0 14px 0 10px; display: flex; align-items: center; gap: 8px; }
:root.split .inv-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.inv-text b { font-size: 13.5px; font-weight: 700; }
.inv-text small { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; opacity: .8; }
.inv-text small:empty { display: none; }

/* Audience row: centred under the screen, bigger seats with the nick under each. The size is a
   `scale` (with margins making room for it), so seat art, avatars and badges keep their geometry
   and getBoundingClientRect (throws, reactions) stays exact. */
.hall {
  gap: 6px;
  padding: 10px 16px 2px;
  background: radial-gradient(60% 42% at 50% 58%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 100%);
}
.hall::before, .hall::after { content: ""; flex: 1 0 0px; }
.hall > .seat {
  --seat-k: 1.16;
  scale: calc(var(--seat-k) * var(--fade, 1));
  transform-origin: 50% 100%;
  margin: calc(64px * (var(--seat-k) - 1)) calc(29px * (var(--seat-k) - 1)) calc(17px * var(--seat-k));
}
@media (min-width: 380px) { .hall > .seat { --seat-k: 1.24; } }
:root.split .hall { gap: 10px 12px; padding-top: 14px; border-radius: 0 0 24px 24px; }
:root.split .hall > .seat { --seat-k: 1.42; }
.fs-seats .hall { background: none; }
.fs-seats .hall::before, .fs-seats .hall::after, .fs-seats .seat-nick { display: none; }
.fs-seats .hall > .seat { --seat-k: 1; margin: 0; }
/* fix39: on desktop the room is .split, and the `:root.split .hall` rules (seat-k 1.42, padding,
   margin) outranked the fullscreen ones above: the scaled seats were cut by the bar's top. */
:root.split .fs-seats .hall { margin: 0; padding: 6px 0 2px; gap: 6px; border-radius: 0; }
:root.split .fs-seats .hall > .seat { --seat-k: 1; }
.seat-nick {
  position: absolute;
  left: 50%;
  top: calc(100% + 1px);
  max-width: 58px;
  transform: translateX(-50%);
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.seat-nick:empty { display: none; }
.seat.me .seat-nick { color: var(--text); }
/* «Пишет в чат»: a crisp ring around the avatar plus a soft glow, in the chair's own colour.
   The ice seat (#8fd3ff ring, rgba(120,200,255) glow) is the reference look and is unchanged;
   makeSeat sets --speak / --speak-a / --speak-b for each skin (catalog `ring` / `halo`). */
.seat { --speak: hsl(var(--h) 92% 66%); --speak-a: hsl(var(--h) 92% 66% / .7); --speak-b: hsl(var(--h) 92% 66% / .35); }
.seat.typing .ava { box-shadow: 0 0 0 2.5px var(--speak), 0 0 16px 6px var(--speak-a), 0 5px 12px rgba(0, 0, 0, .45); }
.seat.reacting .ava { box-shadow: 0 0 0 2.5px #ffd36b, 0 0 18px 7px rgba(255, 186, 74, .75), 0 5px 12px rgba(0, 0, 0, .45); }
.seat.typing .seat-nick, .seat.reacting .seat-nick { color: var(--text); }

/* Empty chat: a faint note in the background of the chat area, behind the feed. Not a message:
   absolute in .chat-area (which ends above the composer), no pointer events, fades out once the
   chat has a few messages. */
.chat-area { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-area > .chat { position: relative; z-index: 1; }
.chat-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 16px 28px;
  overflow: hidden;
  text-align: center;
  color: var(--text);
  opacity: var(--wm-opacity, .34);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity .2s ease;
}
:root[data-theme="light"] .chat-bg { --wm-opacity: .42; }
.chat-bg.gone, .room.compose .chat-bg { opacity: 0; }
.cw-art { width: 92px; height: 55px; margin-bottom: 6px; opacity: .5; }
.cw-title { font-size: 16px; font-weight: 700; }
.cw-text { font-size: 13px; }
.cw-hint { margin-top: 6px; font-size: 12px; opacity: .8; }
@media (max-height: 720px) { .cw-art { display: none; } }
.cw-btn { height: 38px; padding: 0 16px; border-radius: 13px; background: var(--card-3); color: var(--text); font-size: 14px; font-weight: 700; }
.cw-btn.main { background: var(--grad, var(--accent)); color: #fff; }
.cw-btn:active { transform: scale(.95); }

/* ?debug=1: how throws are drawn on this device. */
.throw-debug {
  position: fixed;
  top: calc(6px + var(--safe-t, 0px));
  right: 6px;
  z-index: 9999;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .72);
  color: #9f9;
  font: 10px/1.35 ui-monospace, Menlo, monospace;
  white-space: pre;
  pointer-events: none;
}

/* Loading / buffering over the stage instead of black. */
.stage-load {
  position: absolute;
  left: var(--box-x, 0px);
  top: var(--box-y, 0px);
  width: var(--box-w, 100%);
  height: var(--box-h, 100%);
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}
.stage-load[hidden] { display: none; }
.stage-load[data-mode="start"] { background: #0c0c10 var(--poster, none) center / cover no-repeat; }
.stage-load[data-mode="start"]::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 8, 12, .45), rgba(8, 8, 12, .7)); }
.stage-load.bare[data-mode="start"] { background: linear-gradient(135deg, #16161b, #23232a); }
.stage-load[data-mode="stall"] { background: rgba(0, 0, 0, .22); }
.sl-sheen { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .09) 50%, transparent 70%) 0 0 / 220% 100% no-repeat; animation: sl-sheen 1.5s linear infinite; }
.stage-load[data-mode="stall"] .sl-sheen { display: none; }
.sl-spin { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .22); border-top-color: #fff; animation: sl-spin .8s linear infinite; }
@keyframes sl-sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes sl-spin { to { transform: rotate(360deg); } }
:root.perf-low .sl-sheen, :root.perf-noshimmer .sl-sheen { animation: none; opacity: .5; }
/* The spinner sits where the big play button is; the button steps aside until the video is ready. */
.stage.loading .big-play { opacity: 0; pointer-events: none; }

/* Empty states with an illustration and a hint. */
.e-note { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; text-align: center; color: var(--muted); }
.e-note svg { width: 96px; height: 64px; margin-bottom: 6px; color: var(--text); }
.e-note b { font-size: 14.5px; color: var(--text); }
.e-note small { max-width: 290px; font-size: 12.5px; line-height: 1.35; color: var(--faint); }
.e-note .cw-btn { margin-top: 10px; }
.empty-hint { max-width: 270px; padding: 0 16px; font-size: 12.5px; font-weight: 500; line-height: 1.35; text-align: center; color: rgba(255, 255, 255, .5); }

/* Springs (150–250 ms): sent messages, buttons on release, people sitting down.
   Off in «Экономно» and with prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  :root:not(.perf-low) .msg.sent { animation: spring-sent .24s cubic-bezier(.3, 1.45, .55, 1) both; }
  :root:not(.perf-low) .sprung { animation: spring-press .22s cubic-bezier(.3, 1.7, .5, 1); }
  :root:not(.perf-low) .hall > .seat.arrive { animation: spring-arrive .25s cubic-bezier(.3, 1.5, .5, 1) both; }
  :root:not(.perf-low) .seat.typing .ava { animation: seat-typing 1.4s ease-in-out infinite; }
  :root:not(.perf-low) .room-now[data-state="play"] .rn-ic { animation: pulse 1.6s ease-in-out infinite; }
}
@keyframes spring-sent { from { opacity: .3; translate: 0 12px; scale: .92; } }
@keyframes spring-press { from { scale: .95; } 55% { scale: 1.04; } to { scale: 1; } }
@keyframes spring-arrive { from { opacity: 0; translate: 0 14px; } }
@keyframes seat-typing { 50% { box-shadow: 0 0 0 2.5px var(--speak), 0 0 7px 2px var(--speak-b), 0 5px 12px rgba(0, 0, 0, .45); } }
@media (prefers-reduced-motion: reduce) {
  .sl-sheen { animation: none; opacity: .5; }
  .sl-spin { animation-duration: 1.6s; }
}

/* ---------- scenes: picture backdrops for the room (host's choice) and the home screen (personal) ---------- */
/* One layer behind everything. The picture is a CSS variable used only by the visible layer, so only
   the selected scene is downloaded: a portrait cut on phones, the full landscape frame on wide screens,
   with an 18x32 blurred placeholder (inline) under it while it loads. A readability wash sits on top;
   «Красиво» adds a very slow drift, «Экономно» and reduced motion keep it still. */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
  background: #050407;
}
.scene::before, .scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.scene::before {
  background: var(--sc-img, none) 50% 40% / cover no-repeat, var(--sc-tiny, none) 50% 40% / cover no-repeat;
  transform-origin: 50% 42%;
}
@media (min-aspect-ratio: 4/5) {
  .scene::before { background-image: var(--sc-img-l, none), var(--sc-tiny, none); background-position: 50% 50%; }
  /* Wide screens: the player and the chat panel cover most of it, so the wash stays lighter. */
  :root:not([data-theme="light"]) .scene::after {
    background:
      radial-gradient(130% 90% at 50% 45%, transparent 60%, rgba(0, 0, 0, .35)),
      linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .04) 35%, rgba(0, 0, 0, .12) 70%, rgba(0, 0, 0, .35));
  }
}
/* Readability: a touch darker under the header, the seats band left clear, the chat end darker; soft vignette. */
.scene::after {
  background:
    radial-gradient(120% 80% at 50% 45%, transparent 55%, rgba(0, 0, 0, .45)),
    linear-gradient(180deg, rgba(0, 0, 0, .32), rgba(0, 0, 0, .06) 30%, rgba(0, 0, 0, .1) 55%, rgba(0, 0, 0, .5) 82%, rgba(0, 0, 0, .62));
}
:root[data-theme="light"] .scene::after {
  background: linear-gradient(180deg, rgba(245, 242, 240, .72), rgba(245, 242, 240, .5) 30%, rgba(245, 242, 240, .58) 55%, rgba(245, 242, 240, .82));
}
:root.perf-high .scene::before { animation: sc-drift 70s ease-in-out infinite alternate; will-change: transform; }
:root.perf-low .scene::before { animation: none; }
@media (prefers-reduced-motion: reduce) { .scene::before { animation: none !important; } }
@keyframes sc-drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.08) translate3d(-1.2%, -1%, 0); } }
:root:not([data-scene]) .scene, :root[data-scene=""] .scene { display: none; }
:root[data-scene]:not([data-scene=""]) .home,
:root[data-scene]:not([data-scene=""]) .room { background: transparent; }

[data-scene="cinema"] { --sc-img: url("/static/img/scenes/cinema-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/cinema-l.webp?v=1"); --sc-tile: url("/static/img/scenes/cinema-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRmYAAABXRUJQVlA4IFoAAADwAwCdASoSACAAPu1kqU2ppaQjMAgBMB2JZwCw7B6RBnJdbDxBRQDoAP7ytLqQEXalo/M5SeQ9wCLEWj/gN4n2ydI4/kGllZq5FWkaQzqRsi8XmFs3xboSAAA="); }
[data-scene="night"] { --sc-img: url("/static/img/scenes/night-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/night-l.webp?v=1"); --sc-tile: url("/static/img/scenes/night-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRloAAABXRUJQVlA4IE4AAABwAwCdASoSACAAPulgpE2pJaMiMAwBIB0JZwDGfDCovns11/gA/vBcx+6olvG51S5bLLh5FYu1hHmId7dKHZcfi8wa+/3f2MLodhfUAAA="); }
[data-scene="sunset"] { --sc-img: url("/static/img/scenes/sunset-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/sunset-l.webp?v=1"); --sc-tile: url("/static/img/scenes/sunset-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRmoAAABXRUJQVlA4IF4AAADwAwCdASoSACAAPu1aqE2ppKOmN/VYATAdiWIAuwANgA26Wfczrxw6AP4iyUQiqSBU5Kt7sKoEqCI+TyBJa/yTO/dC1KJiWDM3GEiR2sMo2yAjbVV/xTDG8LVvAAAA"); }
[data-scene="ocean"] { --sc-img: url("/static/img/scenes/ocean-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/ocean-l.webp?v=1"); --sc-tile: url("/static/img/scenes/ocean-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRm4AAABXRUJQVlA4IGIAAABwBACdASoSACAAPu1orE+ppiQmsBgIATAdiUWYAFSACTEOYW/MdSg2YsdQKAD+o3xmvGqCFufb4nnlHx/0m72ZDUutMPKj12vq/vwoyBaSxtEbPZZUyw55/4dC97ZYk9AAAA=="); }
[data-scene="forest"] { --sc-img: url("/static/img/scenes/forest-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/forest-l.webp?v=1"); --sc-tile: url("/static/img/scenes/forest-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRnIAAABXRUJQVlA4IGYAAADQAwCdASoSACAAPulep02pJSOiN/VYASAdCWcAyywPIbFAnBIvyQAA/u7eoqO5OMqeK1Pyx8SDyJuOMx4krr4QPXKq7vBukQxRUSU0G7V9/vyuUfx0XKQWgo8gGbPJAvsNDzgAAAA="); }
[data-scene="sakura"] { --sc-img: url("/static/img/scenes/sakura-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/sakura-l.webp?v=1"); --sc-tile: url("/static/img/scenes/sakura-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRnIAAABXRUJQVlA4IGYAAAAwBACdASoSACAAPu1or1AppaQiqAqpMB2JYwDDNBEW7Wx69wwVbOxvffQA/u7TwrFMHTYSt2dEzjE1p1Wdnj8CuU2gQO2u5L/8JW2WIoF0V54TlSBnBAM3mtaV9mQ4gpdZKeWeAAA="); }
[data-scene="neon"] { --sc-img: url("/static/img/scenes/neon-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/neon-l.webp?v=1"); --sc-tile: url("/static/img/scenes/neon-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRmYAAABXRUJQVlA4IFoAAACwAwCdASoSACAAPu1krE4ppaSiKA1RMB2JZQC7ABcqm5HDw2IYAAD+8ECw6f/dWOLzh01GpTQg4uj8geB3/WNLib+rSD83Q+RrWdOMq+Xm2O7RkGFrZoYAAAA="); }
[data-scene="aurora"] { --sc-img: url("/static/img/scenes/aurora-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/aurora-l.webp?v=1"); --sc-tile: url("/static/img/scenes/aurora-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRnIAAABXRUJQVlA4IGYAAADQBACdASoSACAAPu1orE8ppiQiMBgIATAdiWcAxNg0b+PiuDjzGQ2xDuNsfaG0AAD+9E12R+Ql5EUHAgxaQbjo+ngw4U6QFAoYZL25sN3QWlchmd4tLMMT8jQsP9zyHITaaAKyUAA="); }
[data-scene="cosmos"] { --sc-img: url("/static/img/scenes/cosmos-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/cosmos-l.webp?v=1"); --sc-tile: url("/static/img/scenes/cosmos-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRl4AAABXRUJQVlA4IFIAAADQAwCdASoSACAAPu1mqk2ppaQmMAgBMB2JYwDKACHw1GfTfEw5UYAA/vLWQhpag/j05Q93WFhxC70hqXiL2gFs0Px0L8Sb2bQ3sGPwKlcmIwAA"); }
[data-scene="gold"] { --sc-img: url("/static/img/scenes/gold-p.webp?v=1"); --sc-img-l: url("/static/img/scenes/gold-l.webp?v=1"); --sc-tile: url("/static/img/scenes/gold-t.webp?v=1"); --sc-tiny: url("data:image/webp;base64,UklGRmwAAABXRUJQVlA4IGAAAADQAwCdASoSACAAPuFeqE2opSQiMAwBEBwJQBfnBYTleQhbx3TvolAA/vCNAZ6sD92ZxryrFo91t9lR+B09/9ZmNvbgg/vWJcjU5zQWzGrJE9TBW4vkTFQV9S0dZiq/gAA="); }

/* Scene picker tiles (settings): the same layers, small. */
.scenes { display: flex; gap: 8px; margin: 0 -16px; padding: 3px 16px 4px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.scenes::-webkit-scrollbar { display: none; }
.scenes > .scene-tile { flex: 0 0 82px; scroll-snap-align: start; }
.scene-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 3 / 4;
  padding: 6px;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(0deg, rgba(0, 0, 0, .55), transparent 55%), var(--sc-tile, none) 50% 50% / cover no-repeat, #111;
  box-shadow: inset 0 0 0 1px var(--line);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
  transition: transform .12s ease, box-shadow .2s ease;
}
.scene-tile[data-scene=""] { background: radial-gradient(120% 50% at 50% -10%, var(--home-glow), transparent 60%), var(--card-2); color: var(--text); }
.scene-tile span { text-shadow: 0 1px 3px rgba(0, 0, 0, .6); line-height: 1.15; }
.scene-tile[data-scene=""] span { text-shadow: none; }
.scene-tile.on { box-shadow: 0 0 0 2px var(--accent), inset 0 0 0 1px rgba(255, 255, 255, .2); }
.scene-tile:active { transform: scale(.95); }
.scene-tile .lock-mini { position: absolute; top: 5px; right: 5px; padding: 1px 5px; border-radius: 6px; font-size: 9.5px; font-weight: 800; color: #3a2300; background: linear-gradient(135deg, #fff1b8, #f5c542 50%, #d8901a); }
.scene-tile.locked { opacity: .78; }
.scene-tile.locked::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(0, 0, 0, .28); pointer-events: none; }
.scene-tile .lock-mini { z-index: 1; }
.scene-tile .lock-mini.price { display: inline-flex; align-items: center; gap: 2px; color: #fff; background: rgba(0, 0, 0, .62); box-shadow: inset 0 0 0 1px rgba(255, 214, 107, .5); }
.scene-tile .lock-mini.price .coin { width: 10px; height: 10px; }
.scene-tile span { position: relative; z-index: 1; }
.shop-note { margin: -6px 2px 0; font-size: 13px; line-height: 1.35; color: var(--muted); }

/* ---------- settings: links, hints, ban list ---------- */
.st-link { width: 100%; text-align: left; color: var(--text); }
.st-link:active { background: var(--card-2); }
.st-chev { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-ic img { width: 22px; height: 22px; }
.st-two small.st-hint { color: var(--faint); font-weight: 500; }
.st-group > h3 { display: flex; align-items: center; gap: 8px; }
.st-host-tag, .st-count { padding: 2px 7px; border-radius: 7px; font-size: 10.5px; letter-spacing: .2px; text-transform: none; color: var(--accent-2, #ff8a3d); background: rgba(255, 110, 60, .13); }
.st-count { color: var(--muted); background: var(--card-2); }
#settings-sheet .settings, #host-settings { gap: 18px; }
#settings-sheet .st-group { gap: 8px; }
#settings-sheet .field-hint { margin-top: 0; padding: 0 6px; }
#room-fof-row { margin-top: 2px; }
.ban-list .ban-row { gap: 10px; padding-right: 10px; }
.ban-row + .ban-row::before { left: 62px; }
.ban-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; color: var(--text); }
.ban-who .ava { width: 38px; height: 38px; flex: 0 0 auto; filter: grayscale(.6); opacity: .85; }
.ban-who .st-two b { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ban-row .unban { flex: 0 0 auto; height: 34px; padding: 0 14px; border-radius: 11px; font-size: 13.5px; font-weight: 700; color: var(--text); background: var(--card-3); }
.ban-row .unban:active { transform: scale(.96); }
.ban-row .unban:disabled { opacity: .5; }

/* ---------- promo codes ---------- */
.promo-sheet { z-index: 85; }
.promo-form, .promo-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 4px 6px; text-align: center; }
.promo-art { width: 84px; height: 84px; filter: drop-shadow(0 10px 22px rgba(255, 80, 120, .35)); animation: promo-float 3s ease-in-out infinite; }
.promo-art.pop { animation: promo-pop .6s cubic-bezier(.2, 1.6, .4, 1) both, promo-float 3s ease-in-out .6s infinite; }
@keyframes promo-float { 50% { transform: translateY(-5px) rotate(-4deg); } }
@keyframes promo-pop { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.promo-title { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.promo-sub { font-size: 13.5px; color: var(--muted); }
.promo-sub b { color: var(--text); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .05em; }
.promo-input {
  width: 100%;
  height: 58px;
  margin-top: 8px;
  border: 0;
  outline: 0;
  border-radius: 18px;
  background: var(--card-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--text);
  text-align: center;
  font: 800 22px ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.promo-input::placeholder { color: var(--faint); font-size: 16px; letter-spacing: .1em; }
.promo-input:focus { box-shadow: inset 0 0 0 2px rgba(255, 90, 54, .7); }
.promo-error { min-height: 18px; font-size: 13px; font-weight: 600; color: #ff7a6a; }
.promo-go { width: 100%; height: 52px; border-radius: 16px; font-size: 16px; }
.promo-prizes { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 6px 0 4px; }
.promo-prize { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card-2); text-align: left; animation: promo-row .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.promo-prize:nth-child(2) { animation-delay: .08s; }
.promo-prize:nth-child(3) { animation-delay: .16s; }
.promo-prize img { width: 38px; height: 38px; flex: 0 0 auto; object-fit: contain; }
.promo-prize span { display: flex; flex-direction: column; min-width: 0; }
.promo-prize b { font-size: 16px; font-weight: 800; }
.promo-prize small { font-size: 12.5px; color: var(--muted); }
@keyframes promo-row { from { transform: translateY(10px) scale(.96); opacity: 0; } }
.shop-promo { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px 0 6px; margin-left: auto; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 700; color: var(--text); }
.shop-promo img { width: 24px; height: 24px; }
.shop-promo + .shop-coins { margin-left: 0; }
:root.perf-low .promo-art { animation: none; }

/* ---------- treats («Угостить») ---------- */
.treat-act .pa-ic img { width: 22px; height: 22px; }
.treat-sheet { z-index: 85; }
.treat-head { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 0 2px; }
.treat-ava { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; }
.treat-ava .ava { width: 48px; height: 48px; font-size: 18px; box-shadow: 0 0 0 2px rgba(255, 110, 170, .5); }
.treat-ava.treat-hit { animation: treat-hit .5s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes treat-hit { 30% { transform: scale(1.22) rotate(-6deg); } 60% { transform: scale(.95) rotate(3deg); } }
.treat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.treat-title b { font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.treat-title small { font-size: 12.5px; color: var(--muted); }
.treat-grid { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.treat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px 7px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease;
}
.treat-tile[class*="rar-"] {
  background:
    radial-gradient(80% 56% at 50% 28%, rgba(var(--tint), .36), transparent 72%),
    linear-gradient(180deg, rgba(var(--tint), .12), rgba(var(--tint), .03) 75%),
    var(--card);
  box-shadow: inset 0 0 0 1px rgba(var(--tint), .38);
}
.treat-tile[class*="rar-"]::before {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: rgba(var(--tint), .9);
  box-shadow: 0 0 10px rgba(var(--tint), .8);
}
.treat-tile .treat-ic { width: 50px; height: 50px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.treat-tile b { max-width: 100%; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.treat-tile .price { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; }
.treat-tile .price img.coin { width: 13px; height: 13px; }
.treat-tile-xp { font-size: 11px; font-weight: 700; color: #ff7ab8; }
.treat-tile.on { background: linear-gradient(160deg, rgba(255, 90, 150, .22), rgba(255, 61, 110, .1)); box-shadow: inset 0 0 0 2px rgba(255, 100, 150, .75); }
.treat-tile.on .treat-ic { transform: scale(1.12) rotate(-6deg); }
.treat-tile:active { transform: scale(.95); }
.treat-tile.short { opacity: .55; }
.treat-note { position: sticky; bottom: calc(-18px - var(--safe-b)); z-index: 2; display: flex; align-items: center; justify-content: center; min-height: 52px; flex: 0 0 auto; margin: 0 -16px calc(-18px - var(--safe-b)); padding: 8px 16px calc(14px + var(--safe-b)); text-align: center; font-size: 13px; color: var(--muted); background: linear-gradient(transparent, var(--sheet) 24%); }
.treat-go { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 52px; border-radius: 16px; font-size: 15.5px; }
.treat-go img.coin { width: 18px; height: 18px; }
.treat-fly { position: fixed; z-index: 96; pointer-events: none; filter: drop-shadow(0 0 10px rgba(255, 190, 120, .75)) drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); will-change: transform; }
.treat-fly.ghost { z-index: 95; filter: blur(1px); }
.treat-ring { position: fixed; z-index: 96; width: 30px; height: 30px; pointer-events: none; border-radius: 50%; border: 3px solid rgba(255, 170, 200, .9); box-shadow: 0 0 18px rgba(255, 122, 184, .8), inset 0 0 12px rgba(255, 210, 120, .6); }
.treat-spark { position: fixed; z-index: 96; width: 12px; height: 12px; pointer-events: none; background: radial-gradient(circle, #fff 0 20%, #ff7ab8 45%, transparent 70%); border-radius: 50%; }
.treat-xp-pop { position: fixed; z-index: 97; pointer-events: none; padding: 4px 11px; border-radius: 11px; font-size: 16px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #ff7ab8, #ff3d6e); box-shadow: 0 6px 16px rgba(255, 61, 110, .4); white-space: nowrap; }
.seat.treat-hit .ava { animation: treat-hit .5s cubic-bezier(.2, 1.8, .4, 1); }
.pf-treats h3 { display: flex; align-items: center; gap: 8px; }
.pf-treats-count { padding: 1px 7px; border-radius: 7px; font-size: 11.5px; color: #ff7ab8; background: rgba(255, 110, 170, .14); }
.pf-treats-count:empty { display: none; }
.treat-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.treat-shelf-item, .treat-shelf-add { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.treat-shelf-item img { width: 40px; height: 40px; }
.treat-shelf-item b { font-size: 12px; font-weight: 800; color: var(--muted); }
.treat-shelf-add { justify-content: center; color: #ff7ab8; background: rgba(255, 110, 170, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 110, 170, .35); border-style: dashed; }
.treat-shelf-add svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.treat-shelf-add small { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.15; }
.treat-shelf-add:active { transform: scale(.95); }
.ink-bar .ic.ghost:disabled { opacity: .38; }

/* fix18: treat stock (shop «Угощения» + counts in «Угостить») and the «Начать связь» explainer. */
.treat-have {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 26px;
  padding: 2px 6px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.25;
  color: #2a1600;
  background: linear-gradient(135deg, #ffe08a, #ffb02e);
  box-shadow: 0 3px 8px rgba(255, 160, 30, .3);
}
.treat-tile.stocked { box-shadow: inset 0 0 0 1.5px rgba(255, 190, 70, .55); }
.treat-tile.stocked .price { opacity: .45; }
.shop-card.k-treat .shop-art { aspect-ratio: auto; height: 78px; }
.shop-treat { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .35)); }
.shop-card.k-treat .treat-tile-xp { margin-top: -4px; }
.treat-packs { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 4px; width: 100%; }
.treat-packs .shop-foot { padding: 0 4px; font-size: 12px; }
/* «Набор угощений» (Stars): one full-width card at the end of «Угощения», ×10 badge on each treat's corner. */
.shop-card.k-pack { grid-column: 1 / -1; height: auto; }
.shop-card.k-pack .shop-art { flex: none; aspect-ratio: auto; height: auto; display: grid; grid-template-columns: repeat(5, 40px); justify-content: center; gap: 4px 14px; padding: 2px 0; }
.pack-cell { position: relative; display: block; width: 40px; height: 40px; }
.pack-x { position: absolute; right: -4px; bottom: -3px; z-index: 1; font-size: 11px; font-weight: 900; line-height: 1; color: #fff; pointer-events: none;
  text-shadow: 1px 1px 0 #2a0a18, -1px -1px 0 #2a0a18, 1px -1px 0 #2a0a18, -1px 1px 0 #2a0a18, 0 1px 3px rgba(0, 0, 0, .8); }
.pack-treat { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .35)); }
.shop-card.k-pack .shop-foot { max-width: 220px; }
@media (max-width: 340px) { .shop-card.k-pack .shop-art { gap: 4px 8px; } }
/* Telegram Stars icon in place of the ⭐ emoji (treat pack, support window); sized like the emoji. */
img.xtr { display: inline-block; flex: none; width: 1.2em; height: 1.2em; vertical-align: -0.22em; object-fit: contain; }
.buy-treat { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .4)); }
.bond-need { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 14px; }
.bond-step { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.bond-step > i {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--line);
}
.bond-step.done > i { background: linear-gradient(135deg, #5ee7a0, #18b26b); box-shadow: none; }
.bond-step > span { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.bond-step b { font-size: 14.5px; font-weight: 700; }
.bond-step small { font-size: 12.5px; color: var(--muted); }
.bond-track { display: block; height: 6px; margin-top: 6px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bond-track > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff7ab8, #ff3d7f); }
:root[data-theme="light"] .bond-track { background: rgba(0, 0, 0, .07); }
.pf-act.asks { animation: bond-asks 1.6s ease-in-out infinite; }
@keyframes bond-asks { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 150, .0); } 50% { box-shadow: 0 0 0 6px rgba(255, 90, 150, .28); } }
@media (prefers-reduced-motion: reduce) { .pf-act.asks { animation: none; } }
:root.perf-low .pf-act.asks { animation: none; }

/* fix36: giveaway / promotion banners on the main screen and sale prices in the shop */
.live-banners { display: flex; flex-direction: column; gap: 8px; }
.live-banners[hidden] { display: none; }
.live-banner { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 16px; text-align: left; color: var(--text); font-size: 13.5px; background: linear-gradient(90deg, rgba(246, 195, 74, .18), rgba(255, 61, 110, .18)); box-shadow: inset 0 0 0 1px rgba(246, 195, 74, .3); }
.live-banner.k-boost { background: linear-gradient(90deg, rgba(95, 214, 139, .16), rgba(246, 195, 74, .16)); box-shadow: inset 0 0 0 1px rgba(95, 214, 139, .32); }
.live-banner.k-sale:active, .live-banner.tap:active { transform: scale(.985); }
.live-banner.tap { cursor: pointer; }
.live-e { flex: 0 0 auto; font-size: 22px; line-height: 1; }
.live-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.live-t b { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-t small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-join { flex: 0 0 auto; height: 34px; padding: 0 13px; border-radius: 11px; font-size: 13px; font-weight: 800; color: #fff; background: var(--grad); }
.live-join.on { color: var(--text); background: var(--card-2); }
.live-join:active { transform: scale(.96); }
.sale-tag { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 2px 7px; border-radius: 8px; font-size: 11px; font-weight: 800; color: #fff; background: #ff3d6e; pointer-events: none; }
.sale-old { margin-right: 4px; font-size: .85em; font-weight: 600; opacity: .6; }
.shop-card.season .sale-tag { top: 32px; }
/* «Новое» (admin «Выпуск», app/items.py): top right; the lock / stock count move under it. */
.shop-new { position: absolute; z-index: 3; top: 8px; right: 8px; padding: 3px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 800; line-height: 1.2; color: #fff; background: linear-gradient(135deg, #22c58b, #0fa3a3); box-shadow: 0 3px 10px rgba(16, 180, 150, .45); pointer-events: none; }
.shop-card.is-new .lock { top: 32px; }
.shop-card.is-new .treat-have { top: 28px; }

/* Browser version opened in Telegram's in-app browser: how to get to the external one (app.js inAppGuide). */
.iab { position: fixed; inset: 0; z-index: 1000; overflow-y: auto; background: radial-gradient(120% 45% at 50% 0%, var(--home-glow), transparent 70%), var(--bg); }
.iab-in { min-height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(30px + var(--safe-t)) 16px calc(24px + var(--safe-b)); }
.iab-title { margin: 0 0 24px; font-size: 24px; font-weight: 800; letter-spacing: -.2px; line-height: 1.2; text-align: center; }
.iab-steps { display: flex; flex-direction: column; gap: 12px; }
.iab-step { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.iab-ill { position: relative; flex: 0 0 auto; width: 150px; height: 100px; border-radius: 16px; overflow: hidden; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); }
.iab-txt { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 15.5px; font-weight: 700; line-height: 1.25; }
.iab-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 4px 12px rgba(255, 64, 64, .4); }
.iab-nw { white-space: nowrap; }
.iab-bar { position: absolute; left: 0; right: 0; top: 0; height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 6px 0 9px; background: var(--card-2); border-bottom: 1px solid var(--line); }
.iab-x { color: var(--faint); }
.iab-x svg { width: 10px; height: 10px; }
.iab-lines { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.iab-lines i { display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--card-3); }
.iab-lines i:first-child { width: 38px; background: var(--line-2); }
.iab-dots { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: rgba(255, 77, 46, .2); box-shadow: 0 0 0 1.5px var(--accent), 0 0 14px rgba(255, 77, 46, .6); }
.iab-dots svg { width: 13px; height: 13px; }
.iab-page { position: absolute; left: 10px; right: 10px; top: 40px; display: flex; flex-direction: column; gap: 6px; }
.iab-page i { display: block; height: 6px; border-radius: 3px; background: var(--card-2); }
.iab-page i:nth-child(2) { width: 70%; }
.iab-page-l { top: 12px; right: 60px; }
.iab-page-t { top: 10px; }
.iab-menu { position: absolute; right: 8px; top: 12px; width: 112px; padding: 4px; display: flex; flex-direction: column; gap: 2px; border-radius: 10px; background: var(--card-2); box-shadow: 0 8px 20px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line-2); }
.iab-mrow { height: 20px; display: flex; align-items: center; gap: 6px; padding: 0 6px; border-radius: 6px; white-space: nowrap; }
.iab-mrow i { display: block; width: 9px; height: 9px; border-radius: 3px; background: var(--card-3); }
.iab-mrow b { display: block; width: 48px; height: 4px; border-radius: 2px; background: var(--card-3); }
.iab-mrow.on { font-size: 10px; font-weight: 700; color: var(--text); background: rgba(255, 77, 46, .18); box-shadow: inset 0 0 0 1.2px var(--accent); }
.iab-mrow.on svg { width: 10px; height: 10px; color: var(--accent); }
.iab-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); }
.iab-pick { position: absolute; left: 0; right: 0; bottom: 0; height: 62px; padding: 7px 10px 0; border-radius: 14px 14px 0 0; background: var(--card-2); box-shadow: inset 0 1px 0 var(--line-2); }
.iab-grip { width: 20px; height: 3px; margin: 0 auto 8px; border-radius: 2px; background: var(--card-3); }
.iab-apps { display: flex; justify-content: space-between; }
.iab-app { position: relative; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--card-3); }
.iab-app svg { width: 15px; height: 15px; }
.iab-app.on { color: var(--text); box-shadow: 0 0 0 1.5px var(--accent), 0 0 12px rgba(255, 77, 46, .5); }
.iab-ck { position: absolute; right: -5px; bottom: -5px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad); }
.iab-ck svg { width: 8px; height: 8px; }
.iab-alt { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.iab-btns { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.iab-copy.ok { background: linear-gradient(135deg, #2fbf71 0%, #1f9d5a 100%); box-shadow: 0 10px 28px rgba(40, 190, 110, .3); }
.iab-stay { height: 48px; width: 100%; border-radius: 16px; font-weight: 600; font-size: 15px; color: var(--muted); }
.iab-stay:active { background: var(--card); }

/* Chupapi stays in existing headers; its visibility is controlled in Settings. */
.hero-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ob-help { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; padding:6px; border:0; border-radius:50%; background:var(--card-2); color:var(--text); cursor:pointer; }
.ob-help[hidden] { display:none; }
.ob-help img { width:19px; height:24px; object-fit:contain; }
.ob-help.ob-out img { opacity:.35; }
.hero-heading .ob-help { background:rgba(255,255,255,.12); }
.room.fs .ob-help { display:none; }
/* Phone in Telegram fullscreen: Telegram's Закрыть / ⌄ ⋯ buttons take a strip above the app;
   Чупапи's help button goes up into its free part, left of «⌄», off the room title (app.js: tg-bar). */
html.tg-bar #home > #home-help, html.tg-bar #ob-help { position:fixed; z-index:7; top:calc(var(--tg-bar-t, 0px) + (var(--tg-bar-h, 46px) - 36px) / 2); right:104px; margin:0; }
.context-help { position:static; margin-left:auto; }
#profile .context-help { position:absolute; top:16px; right:62px; }
#sheet .sheet-card { position:relative; }
#sheet .context-help { position:absolute; top:12px; right:12px; }
#me-sheet .sheet-head, #settings-sheet .sheet-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#st-coach-visibility .st-two { flex:1; }
.stage-pick { width:auto; min-width:170px; height:52px; margin:0; transform:translate(-50%,-50%); display:flex; gap:10px; padding:0 18px; border-radius:18px; font:600 14px Onest,sans-serif; background:rgba(15,15,20,.72); }
.stage-pick svg { width:23px; height:23px; order:-1; flex-shrink:0; }
/* Catalogs render static by default; only an explicitly focused/hovered card animates. */
#shop .shop-card *, #shop .shop-card::before, #shop .shop-card::after,
#shop .shop-card *::before, #shop .shop-card *::after,
#shop .perk-art *, #vip-sheet .perk-art * { animation-play-state:paused!important; }
#shop .shop-card:not(:hover):not(:focus-visible) .nick-sample { filter:none!important; }
@media(hover:hover) and (prefers-reduced-motion:no-preference) {
 :root:not(.perf-noshopmotion) #shop .shop-card:hover *, :root:not(.perf-noshopmotion) #shop .shop-card:hover *::before, :root:not(.perf-noshopmotion) #shop .shop-card:hover *::after { animation-play-state:running!important; }
}
@media(prefers-reduced-motion:no-preference) {
 :root:not(.perf-noshopmotion) #shop .shop-card:focus-visible *, :root:not(.perf-noshopmotion) #shop .shop-card:focus-visible *::after { animation-play-state:running!important; }
}
#shop .shop-card { content-visibility:auto; contain-intrinsic-size:auto 210px; }
#shop .shop-card .fl-warp { filter:none!important; }
:root.perf-noscenemotion .scene::before { animation:none!important; will-change:auto; }
@media(prefers-reduced-motion:no-preference) {
 :root:not(.perf-noscenemotion) .scene::before { animation:sc-drift 70s ease-in-out infinite alternate; will-change:transform; }
}
/* Nick previews use exactly the profile name’s text, emoji and symbol fallbacks. */
.nick-sample { font-family:var(--font-ui); }
.st-fold > summary { list-style:none; display:flex; justify-content:space-between; align-items:center; padding:14px 6px; cursor:pointer; font-size:14px; font-weight:650; }
.st-fold > summary::-webkit-details-marker { display:none; }
.st-fold > summary::after { content:'+'; color:var(--muted); font-size:20px; }
.st-fold[open] > summary::after { content:'−'; }
.st-fold { border-top:1px solid var(--line,#ffffff15); }
.st-fold:not([open]) { gap:0; }
.perf-custom .st-two { min-width:0; flex:1; }
.st-fold .perf-note, .st-fold > .field-hint { display:block; margin:8px 6px; }
.perf-custom .st-two small { display:block; font-size:11px; color:var(--muted); line-height:1.35; }
.vip-gift-button { width:100%; padding:16px; margin:6px 0 14px; border:1px solid #ddbc7855; border-radius:16px; background:linear-gradient(110deg,#ad8d3c22,#c99e5810); text-align:left; color:var(--text); }
.vip-gift-button strong,.vip-gift-button small { display:block; }
.vip-gift-button small { color:var(--muted); font-size:12px; margin-top:4px; }

.vip-categories { display:flex; gap:6px; overflow-x:auto; padding:6px 0 14px; }
.vip-categories button { flex-shrink:0; border:1px solid var(--line,#ffffff20); border-radius:20px; padding:10px 14px; background:var(--surface,#ffffff08); color:var(--muted); font-size:12px; }
.vip-categories [aria-pressed="true"] { color:#d8b97b; border-color:#d8b97b66; background:#ac8e4617; }

/* ---------- drawing bar on narrow stages (phones): markers row + actions row ---------- */

.stage { container-type: inline-size; }
@container (max-width: 400px) {
  .ink-bar { flex-wrap: wrap; justify-content: flex-end; width: 184px; row-gap: 8px; }
  .ink-modes { flex: 0 0 auto; }
  .ink-mode { height: 40px; }
}
@supports not (container-type: inline-size) { @media (max-width: 423px) {
  .ink-bar { flex-wrap: wrap; justify-content: flex-end; width: 184px; row-gap: 8px; }
  .ink-modes { flex: 0 0 auto; }
  .ink-mode { height: 40px; }
} }

/* ---------- drawing bar: seat pen tabs, fold, host «Стереть чужое» ---------- */
.ink-tabs { display: flex; gap: 4px; padding: 3px; max-width: 220px; border-radius: 12px; overflow-x: auto; scrollbar-width: none; background: rgba(0, 0, 0, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ink-tabs::-webkit-scrollbar { display: none; }
.ink-tabs[hidden], .ink-fold[hidden] { display: none; }
.ink-tab { flex: 0 0 auto; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .06); color: #fff; }
.ink-tab img { width: 30px; height: 30px; object-fit: contain; pointer-events: none; }
.ink-tab svg { width: 18px; height: 18px; }
.ink-tab.on { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1.5px #fff; }
.ink-mode.pen { width: 40px; }
.ink-fold { flex: 0 0 auto; width: 28px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 12px; color: #fff; background: rgba(0, 0, 0, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ink-fold svg { width: 18px; height: 18px; transition: transform .2s ease; }
.ink-bar.folded .ink-fold svg { transform: rotate(180deg); }
.ink-bar.folded { flex-wrap: nowrap; width: auto; }
.ink-bar.folded .ink-tabs, .ink-bar.folded .ink-redo, .ink-bar.folded .ink-clear, .ink-bar.folded .ink-mode:not(.on) { display: none; }
.ink-clear .ic-others, .ink-clear .ink-clear-label { display: none; }
.ink-bar.erase-others .ink-undo, .ink-bar.erase-others .ink-redo { display: none; }
.ink-bar.erase-others .ink-clear { width: 136px; gap: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: rgba(255, 59, 48, .85); box-shadow: 0 6px 18px rgba(255, 59, 48, .35); }
.ink-bar.erase-others .ink-clear svg { width: 20px; height: 20px; }
.ink-bar.erase-others .ink-clear .ic-trash { display: none; }
.ink-bar.erase-others .ink-clear .ic-others { display: block; }
.ink-bar.erase-others .ink-clear .ink-clear-label { display: inline; }
.ink-bar.folded.erase-others .ink-undo { display: grid; }
.ink-bar.folded.erase-others .ink-clear { display: none; }
:root.perf-noblur .ink-tabs, :root.perf-noblur .ink-fold { background: rgba(0, 0, 0, .64); }
/* With seat tabs the bar is rows already below 640 px: fold + tabs / pens / buttons (184 px wide). */
@container (max-width: 640px) {
  .ink-bar.has-tabs:not(.folded) { flex-wrap: wrap; justify-content: flex-end; width: 184px; row-gap: 8px; }
  .ink-bar.has-tabs .ink-tabs { flex: 0 0 148px; max-width: 148px; }
  .ink-bar.has-tabs .ink-mode { height: 40px; }
  .ink-bar.has-tabs .ink-fold { height: 40px; }
}
@supports not (container-type: inline-size) { @media (max-width: 663px) {
  .ink-bar.has-tabs:not(.folded) { flex-wrap: wrap; justify-content: flex-end; width: 184px; row-gap: 8px; }
  .ink-bar.has-tabs .ink-tabs { flex: 0 0 148px; max-width: 148px; }
  .ink-bar.has-tabs .ink-mode { height: 40px; }
} }

/* ---------- «Награды за приглашения» (bottom of the Friends tab) ---------- */
.ref-fold { border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.ref-fold > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px 0 16px; cursor: pointer; font-size: 15px; font-weight: 650; -webkit-tap-highlight-color: transparent; }
.ref-fold > summary::-webkit-details-marker { display: none; }
.ref-fold > summary > span:first-child { flex: 1; min-width: 0; }
.ref-fold > summary .coin-pill { flex: 0 0 auto; }
.ref-fold > summary .st-chev { transform: rotate(90deg); transition: transform .2s ease; }
.ref-fold[open] > summary .st-chev { transform: rotate(-90deg); }
.ref-fold[open] > summary .coin-pill { display: none; }
.ref-body { display: flex; flex-direction: column; gap: 14px; padding: 2px 14px 14px; }
.ref-line { display: flex; align-items: center; gap: 16px; font-size: 14px; font-weight: 600; color: var(--muted); }
.ref-line span { display: inline-flex; align-items: center; gap: 6px; }
.ref-line img.coin { width: 18px; height: 18px; }
.ref-line b { color: #ffd666; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ref-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ref-nums > span { display: flex; flex-direction: column; gap: 1px; padding: 0 2px; min-width: 0; }
.ref-nums > span + span { padding-left: 12px; border-left: 1px solid var(--line); }
.ref-nums b { display: flex; align-items: center; gap: 5px; font-size: 18px; font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ref-nums b img.coin { width: 16px; height: 16px; }
.ref-nums small { font-size: 12px; font-weight: 600; color: var(--faint); }
.ref-nums .gold b { color: #ffd666; }
.ref-body .primary { height: 44px; border-radius: 14px; font-size: 15px; box-shadow: 0 8px 20px -8px rgba(255, 64, 64, .5), inset 0 1px 0 rgba(255, 255, 255, .25); }
.ref-body .primary svg { width: 18px; height: 18px; }
.ref-link { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--card-2); font-size: 13px; color: var(--muted); text-align: left; transition: background .2s ease; }
.ref-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-link svg { width: 18px; height: 18px; flex: 0 0 auto; }
.ref-link.ok { background: rgba(80, 220, 140, .1); color: var(--ok); }
.ref-pend { display: flex; flex-direction: column; }
.ref-pend[hidden] { display: none; }
.ref-pend .row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.ref-pend .row + .row { border-top: 1px solid var(--line); }
.ref-pend .ava { width: 32px; height: 32px; font-size: 14px; }
.ref-pend .row > b { flex: 1; min-width: 0; font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-steps { display: flex; gap: 5px; flex: 0 0 auto; }
.ref-step { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; border-radius: 12px; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--faint); background: var(--card-2); }
.ref-step svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ref-step.done { color: var(--ok); background: rgba(80, 220, 140, .1); }
.ref-welcome { align-items: center; text-align: center; gap: 12px; }
.ref-welcome .wl-who { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 6px; }
.ref-welcome .wl-who .ava { width: 64px; height: 64px; font-size: 24px; }
.ref-welcome .wl-who b { font-size: 17px; font-weight: 700; }
.ref-welcome .wl-coin { display: flex; align-items: center; gap: 10px; padding: 6px 0 4px; }
.ref-welcome .wl-coin img { width: 52px; height: 52px; filter: drop-shadow(0 4px 10px rgba(120, 60, 0, .55)); }
.ref-welcome .wl-coin b { font-size: 40px; font-weight: 800; letter-spacing: -.8px; color: #ffd666; text-shadow: 0 2px 16px rgba(255, 190, 60, .4); }
.ref-welcome .primary { align-self: stretch; }
#refwelcome-sheet { z-index: 90; }
:root[data-theme="light"] .ref-line b, :root[data-theme="light"] .ref-nums .gold b { color: #a35a00; }
:root[data-theme="light"] .ref-fold .coin-pill { color: #a35a00; background: rgba(255, 170, 40, .2); }
:root[data-theme="light"] .ref-step.done { color: #12a36b; background: rgba(18, 184, 134, .12); }
:root[data-theme="light"] .ref-welcome .wl-coin b { color: #a35a00; text-shadow: none; }
/* Far throws: the thrower's seat is off screen; the item leaves a small avatar chip at the screen edge (app.js farThrow). */
.far-chip { position: absolute; z-index: 2; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 0 0 5px rgba(255, 61, 110, .55), 0 0 22px 6px rgba(255, 90, 54, .45), 0 6px 16px rgba(0, 0, 0, .5);
  animation: far-in .32s cubic-bezier(.2, .9, .3, 1.2) both; }
.far-chip::before { content: ""; position: absolute; top: 50%; width: 64px; height: 52px; margin-top: -26px; z-index: -1; border-radius: 26px;
  background: linear-gradient(90deg, rgba(20, 20, 26, 0), rgba(20, 20, 26, .78)); }
.far-chip.from-r::before { left: -6px; }
.far-chip.from-l::before { right: -6px; transform: scaleX(-1); }
.far-chip.from-t::before, .far-chip.from-b::before { display: none; }
.far-chip .far-ava { width: 40px; height: 40px; font-size: 17px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; }
.far-chip.from-r { --fx: 70px; --fy: 0px; }
.far-chip.from-l { --fx: -70px; --fy: 0px; }
.far-chip.from-t { --fx: 0px; --fy: -70px; }
.far-chip.from-b { --fx: 0px; --fy: 70px; }
.far-chip.fire { animation: far-kick .26s ease-out; }
.far-chip.leaving { animation: far-out .36s ease-in forwards; }
.far-n { position: absolute; left: -16px; top: -10px; padding: 1px 6px; border-radius: 10px; background: #ff3d6e; color: #fff;
  font: 800 12px/16px system-ui, -apple-system, sans-serif; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.far-chip.from-l .far-n { left: auto; right: -16px; }
.far-n:empty { display: none; }
.far-n.bump { animation: far-bump .25s ease-out; }
.far-center { position: absolute; left: 50%; top: 46%; width: 40px; height: 40px; margin: -20px 0 0 -20px; pointer-events: none; }
.far-fly { position: absolute; pointer-events: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .4)); will-change: transform; }
:root[data-theme="light"] .far-chip::before { background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .85)); }
@keyframes far-in { from { transform: translate(var(--fx), var(--fy)) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes far-out { to { transform: translate(var(--fx), var(--fy)) scale(.6); opacity: 0; } }
@keyframes far-kick { 40% { transform: scale(1.18); } 100% { transform: none; } }
@keyframes far-bump { 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .far-chip, .far-chip.fire, .far-n.bump { animation: none; } }

/* «Угостить» several at once (#tgive-sheet, «Hero»): friend pill, the treat large in its rarity light
   (rays, breathing glow, float), big number between pill buttons, segmented 1 / 5 / 10 / Все with a
   sliding pill, gradient button with a shine and the coin part in its own pill. */
.tgive-sheet { z-index: 86; }
.tgive-card {
  --tint: 160, 168, 185;
  gap: 14px;
  padding: 8px 18px calc(18px + var(--safe-b));
  background: radial-gradient(120% 60% at 50% 0%, rgba(var(--tint), .22), transparent 60%), var(--sheet);
  animation: tgive-up .42s cubic-bezier(.2, 1.15, .3, 1);
}
.tgive-card.rar-common { --tint: 160, 168, 185; }
.tgive-card.rar-rare { --tint: 80, 160, 255; }
.tgive-card.rar-epic { --tint: 175, 110, 255; }
.tgive-card.rar-legendary { --tint: 255, 190, 70; }
@keyframes tgive-up { from { transform: translateY(70px); opacity: .3; } }
.tgive-to { align-self: center; display: flex; align-items: center; gap: 8px; max-width: 100%; height: 38px; padding: 0 14px 0 4px; border-radius: 19px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.tgive-to svg { flex: 0 0 auto; width: 16px; height: 16px; margin-right: -4px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tgive-to > span { display: grid; flex: 0 0 auto; }
.tgive-to .ava { width: 30px; height: 30px; font-size: 12px; box-shadow: 0 0 0 2px rgba(255, 110, 170, .6); }
.tgive-to .ava.treat-hit, .tgive-to > span.treat-hit { animation: treat-hit .5s cubic-bezier(.2, 1.8, .4, 1); }
.tgive-to b { min-width: 0; font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgive-to b:not(.nick):not(.shimmer) { background: linear-gradient(90deg, #ff9ad5, #c79bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tgive-hero { position: relative; display: grid; place-items: center; height: 170px; flex: 0 0 auto; }
.tgive-rays { position: absolute; width: 250px; height: 250px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(var(--tint), .16) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%);
  animation: tgive-spin 26s linear infinite; }
.tgive-glow { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--tint), .65), rgba(var(--tint), .18) 45%, transparent 70%); filter: blur(6px); animation: tgive-breathe 3.4s ease-in-out infinite; }
.tgive-shadow { position: absolute; bottom: 6px; width: 80px; height: 12px; border-radius: 50%; background: rgba(0, 0, 0, .45); filter: blur(6px); }
:root[data-theme="light"] .tgive-shadow { background: rgba(60, 20, 40, .22); }
.tgive-stage { position: relative; display: grid; place-items: center; }
.tgive-ic { width: 128px; height: 128px; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .45)); animation: tgive-float 3.6s ease-in-out infinite; }
.tgive-stage .treat-have { top: -2px; right: -22px; padding: 3px 9px; border-radius: 10px; font-size: 12px; box-shadow: 0 3px 10px rgba(255, 160, 30, .35); }
.tgive-name { margin-top: -6px; text-align: center; font-size: 20px; font-weight: 800; }
@keyframes tgive-spin { to { transform: rotate(360deg); } }
@keyframes tgive-breathe { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes tgive-float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
.tgive-step { display: flex; align-items: center; justify-content: center; gap: 22px; }
.tgive-step button { display: grid; place-items: center; width: 60px; height: 46px; border-radius: 23px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); transition: transform .12s ease, opacity .2s ease; }
.tgive-step button:active:not(:disabled) { transform: scale(.9); }
.tgive-step button:disabled { opacity: .3; }
.tgive-step svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.tgive-step output { min-width: 96px; text-align: center; font-size: 52px; line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px;
  background: linear-gradient(180deg, var(--text) 40%, rgb(var(--tint))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tgive-step output.bump { animation: tgive-bump .26s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes tgive-bump { 0% { transform: translateY(6px) scale(.9); opacity: .6; } }
.tgive-chips { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px; border-radius: 16px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-theme="light"] .tgive-chips { background: #f1ebe8; }
.tgive-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); border-radius: 12px;
  background: linear-gradient(160deg, #ff6a8a, #ff3d6e); box-shadow: 0 6px 16px rgba(255, 61, 110, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .28s cubic-bezier(.2, .9, .25, 1.15), opacity .2s ease; }
.tgive-thumb.off { opacity: 0; }
.tgive-chips button { position: relative; z-index: 1; height: 38px; font-size: 14.5px; font-weight: 800; color: var(--muted); background: none; transition: color .2s ease; }
.tgive-chips button.on { color: #fff; }
.tgive-chips button:disabled { opacity: .3; }
.tgive-go { position: relative; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px; border-radius: 20px; font-size: 17px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #ff6a3d 0%, #ff3d6e 55%, #e0307a 100%);
  box-shadow: 0 14px 34px rgba(255, 61, 110, .42), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .12);
  transition: transform .15s ease, filter .2s ease, opacity .2s ease; }
.tgive-go::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent); animation: tgive-shine 3.2s ease-in-out infinite; pointer-events: none; }
.tgive-go:active:not(:disabled) { transform: scale(.97); filter: brightness(.95); }
.tgive-go:disabled { opacity: .55; }
.tgive-go:disabled::after { display: none; }
.tgive-price { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px 0 7px; border-radius: 12px; background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); font-size: 15px; }
.tgive-price img.coin { width: 20px; height: 20px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
@keyframes tgive-shine { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(320%) skewX(-20deg); } }
:root[data-theme="light"] .tgive-step output { background: linear-gradient(180deg, #1a1416 40%, rgb(var(--tint))); -webkit-background-clip: text; background-clip: text; }
:root.split .tgive-sheet { align-items: center; padding: 16px; }
:root.split .tgive-sheet > .sheet-card { max-width: 400px; padding: 22px; border-radius: 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55), inset 0 1px 0 var(--line-2); animation: modal-in .26s cubic-bezier(.2, 1.1, .3, 1); }
:root.split .tgive-sheet .grip { display: none; }
:root.perf-low .tgive-card, :root.perf-low .tgive-card *, :root.perf-low .tgive-card *::after { animation: none !important; transition: none !important; }
:root.perf-noblur .tgive-glow, :root.perf-low .tgive-glow, :root.perf-low .tgive-shadow { filter: none; }
@media (prefers-reduced-motion: reduce) { .tgive-card, .tgive-card *, .tgive-card *::after { animation: none !important; transition: none !important; } }
