/* Интерфейс в духе Telegram: цвета берутся из темы самого Telegram, списки и
   кнопки — как в его настройках и кошельке, значки поданы как подарки:
   цветной фон, узор, блик, объём. Красный, янтарный и зелёный по-прежнему
   означают только состояние сбора. */

@font-face {
  font-family: "Rubik"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/rubik-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Rubik"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ground: var(--tg-theme-secondary-bg-color, #eef0f5);
  --panel: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --ink: var(--tg-theme-text-color, #0f1216);
  --ink-3: var(--tg-theme-hint-color, #6f7785);
  --action: var(--tg-theme-button-color, #2a8cff);
  --on-action: var(--tg-theme-button-text-color, #ffffff);
  --danger: var(--tg-theme-destructive-text-color, #e5484d);
  --live: #e5384d;
  --standby: #c47a00;
  --done: #1f9d55;
  --gloss: rgb(255 255 255 / 0.7);
  --shadow: 0 1px 0 var(--gloss) inset, 0 14px 30px -22px rgb(20 30 60 / 0.5);

  --ink-2: color-mix(in srgb, var(--ink) 72%, var(--panel));
  --inset: color-mix(in srgb, var(--ink) 6%, var(--panel));
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --lamp-off: color-mix(in srgb, var(--ink) 30%, transparent);

  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: var(--font);
  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-md: 0.9375rem;
  --t-lg: 1.125rem;
  --t-xl: 1.875rem;
  --r: 22px;
  --r-sm: 14px;
  --pad: 16px;
  --target: 44px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.22, 1.35, 0.36, 1);
  --tabs-h: 64px;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --safe-t: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}

[data-theme="dark"] {
  color-scheme: dark;
  --ground: var(--tg-theme-secondary-bg-color, #0b0d12);
  --panel: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #171a21));
  --ink: var(--tg-theme-text-color, #f2f4f8);
  --ink-3: var(--tg-theme-hint-color, #8b94a5);
  --action: var(--tg-theme-button-color, #3d9bff);
  --danger: var(--tg-theme-destructive-text-color, #ff6b61);
  --live: #ff4d5e;
  --standby: #ffb224;
  --done: #37d67a;
  --gloss: rgb(255 255 255 / 0.07);
  --shadow: 0 1px 0 var(--gloss) inset, 0 18px 34px -22px rgb(0 0 0 / 0.9);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--t-md)/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  /* Приложение, а не страница: текст и картинки не выделяются и не утаскиваются. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior-y: none;
  scrollbar-color: var(--line) transparent;
  caret-color: var(--ink);
  accent-color: var(--ink);
}

::selection { background: var(--ink); color: var(--ground); }

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; }
img, svg, canvas { -webkit-user-drag: none; user-drag: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--ink-3); }

/* ------------------------------------------------------------ каркас */

.view {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 20px) var(--pad) calc(var(--tabs-h) + var(--safe-b) + 28px);
  outline: none;
}
.view > * + *, .badge-panel > * + * { margin-top: 24px; }

.boot {
  min-height: 60dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--ink-3); text-align: center;
}

.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 5;
  display: flex; justify-content: center;
  padding: 0 8px var(--safe-b);
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.tabs[hidden] { display: none; }
.tab {
  flex: 1 1 0; max-width: 140px; min-height: var(--tabs-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; padding: 6px 4px;
  color: var(--ink-3); font-size: var(--t-xs); font-weight: 500;
  transition: color 160ms var(--ease);
}
.tab .icon { width: 22px; height: 22px; transition: transform 200ms var(--ease); }
.tab[aria-current="page"] { color: var(--ink); font-weight: 650; }
.tab[aria-current="page"] .icon { stroke-width: 2.1; transform: translateY(-1px); }
.tab:active .icon { transform: scale(0.92); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 12px); z-index: 6;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 14px; border-radius: 999px;
  background: var(--ink); color: var(--ground);
  font-size: var(--t-sm); font-weight: 550; text-align: center;
  box-shadow: 0 8px 24px -8px rgb(0 0 0 / 0.45);
  animation: rise 240ms var(--ease);
}
.toast[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* --------------------------------------------------- лампа и заголовок */

.lamp {
  --tone: var(--lamp-off);
  position: relative; flex: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--tone);
}
.lamp[data-tone="live"] { --tone: var(--live); }
.lamp[data-tone="standby"] { --tone: var(--standby); }
.lamp[data-tone="done"] { --tone: var(--done); }
.lamp[data-tone="live"]::after,
.lamp[data-pulse]::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--tone);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(2.8); } }

.status { display: grid; gap: 6px; }
.status__row { display: flex; align-items: center; gap: 12px; }
.status__word { font-size: var(--t-xl); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.status__who {
  margin-left: auto; align-self: center;
  max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 var(--t-sm)/1 var(--mono); color: var(--ink-3);
}
.status__line { color: var(--ink-2); padding-left: 24px; overflow-wrap: anywhere; }
.status__line b { color: var(--ink); font-weight: 600; }

.banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--inset); color: var(--ink-2); font-size: var(--t-sm);
}
.banner .lamp { margin-top: 4px; }

/* ------------------------------------------------------------- панели */

.panel { background: var(--panel); border-radius: var(--r); padding: var(--pad); }
.panel--flush { padding: 0; overflow: hidden; }
.section > h2 {
  font-size: var(--t-lg); line-height: 1.25; font-weight: 650; letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.section > h2 .count { font: 500 var(--t-sm)/1 var(--mono); color: var(--ink-3); margin-left: 6px; }
.hint { font-size: var(--t-sm); color: var(--ink-3); margin-top: 10px; }

/* сцена: какой значок сейчас собирается */
.stage { display: grid; gap: 18px; overflow: hidden; }
.stage__hero { display: grid; grid-template-columns: 124px minmax(0, 1fr); align-items: center; gap: 16px; }
.ring { position: relative; width: 124px; height: 124px; display: grid; place-items: center; }
.ring > * { grid-area: 1 / 1; }
.ring__svg { width: 100%; height: 100%; position: relative; pointer-events: none; }
.ring__bg { fill: none; stroke: color-mix(in srgb, var(--ink) 9%, transparent); stroke-width: 6; }
.ring__fg { fill: none; stroke: var(--live); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 900ms linear; }

/* значок «как подарок»: свечение своего цвета, узор из мини-копий, искры */
.gift { --size: 96px; position: relative; width: var(--size); height: var(--size); display: grid; place-items: center; isolation: isolate; }
.gift__glow {
  position: absolute; inset: -42%; z-index: -2; border-radius: 50%;
  background: radial-gradient(circle closest-side, color-mix(in srgb, var(--tint) 62%, transparent) 0%, color-mix(in srgb, var(--tint) 20%, transparent) 55%, transparent 100%);
  animation: breathe 5s ease-in-out infinite;
}
.gift__pattern { position: absolute; inset: -46%; z-index: -1; animation: drift 60s linear infinite; }
.gift__mini {
  position: absolute; left: 50%; top: 50%; width: 16%; height: 16%; margin: -8%; object-fit: contain; opacity: 0.2;
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1 * 2.1)) rotate(calc(var(--a) * -1));
  filter: saturate(0.6);
}
.gift__art { width: var(--size); height: var(--size); object-fit: contain; border-radius: 18%; position: relative; animation: float 4.6s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgb(0 0 0 / 0.35)); }
.gift__art--blank { display: grid; place-items: center; color: var(--ink-3); background: var(--inset); filter: none; }
.gift__art--blank .icon { width: 38%; height: 38%; }
.gift__spark { position: absolute; width: 14%; height: 14%; color: #fff; opacity: 0; animation: twinkle 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * -0.56s); }
.gift__spark:nth-of-type(1) { left: -8%; top: 6%; }
.gift__spark:nth-of-type(2) { right: -10%; top: 22%; width: 10%; height: 10%; }
.gift__spark:nth-of-type(3) { left: 4%; bottom: -6%; width: 9%; height: 9%; }
.gift__spark:nth-of-type(4) { right: 2%; bottom: 2%; }
.gift__spark:nth-of-type(5) { left: 44%; top: -14%; width: 8%; height: 8%; }
.spark { display: block; width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 0 4px var(--tint)); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-5px) rotate(1.5deg); } }
@keyframes breathe { 0%, 100% { transform: scale(0.94); opacity: 0.85; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes drift { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 45% { opacity: 1; transform: scale(1) rotate(40deg); } 70% { opacity: 0.2; } }

/* цифры таймера перекатываются */
.digit { display: inline-block; min-width: 0.62em; text-align: center; }
.digit--sep { min-width: 0.34em; opacity: 0.6; }
.digit--roll { animation: roll 420ms var(--spring); }
@keyframes roll { from { transform: translateY(-22%); opacity: 0.2; } }

/* пружинистое появление при смене раздела */
.view[data-enter] > * { animation: enter 560ms var(--spring) backwards; }
.view[data-enter] > *:nth-child(2) { animation-delay: 50ms; }
.view[data-enter] > *:nth-child(3) { animation-delay: 100ms; }
.view[data-enter] > *:nth-child(4) { animation-delay: 150ms; }
.view[data-enter] > *:nth-child(n+5) { animation-delay: 200ms; }
@keyframes enter { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.tab[aria-current="page"] .icon { animation: hop 420ms var(--spring); }
@keyframes hop { 40% { transform: translateY(-5px) scale(1.12); } }
.btn, .badge, .tile, .seg button { transition: transform 220ms var(--spring), background-color 160ms var(--ease), opacity 160ms var(--ease); }
.btn:active { transform: scale(0.96); }

/* коллекция */
.vault { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 22px; padding: 26px var(--pad) 26px 30px; overflow: hidden; }
.vault__num { font-size: 2.75rem; line-height: 1; font-weight: 750; letter-spacing: -0.03em; }
.vault__num span { font-size: var(--t-lg); font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.vault__label { margin-top: 6px; font-size: var(--t-sm); color: var(--ink-2); }
.vault__bar { margin-top: 12px; height: 6px; border-radius: 3px; background: var(--inset); overflow: hidden; }
.vault__bar i { display: block; height: 100%; border-radius: 3px; background: var(--done); transform-origin: left; transform: scaleX(var(--f)); transition: transform 900ms var(--ease); }
.search { margin: 10px 0 12px; min-height: 46px; }
.search input { height: 42px; font-family: var(--font); font-size: var(--t-md); }
.badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.badge {
  width: 100%; height: 100%; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 4px 10px;
  border: 0; border-radius: var(--r-sm); color: inherit; text-align: center;
  background: radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--tint) 26%, var(--panel)) 0%, var(--panel) 72%);
}
.badge:active { transform: scale(0.94); }
.badge[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--tint); }
.badge__art { width: 52px; height: 52px; object-fit: contain; border-radius: 10px; filter: drop-shadow(0 4px 8px rgb(0 0 0 / 0.3)); }
.badge__art--blank { display: grid; place-items: center; background: var(--inset); color: var(--ink-3); filter: none; }
.badge__art--blank .icon { width: 22px; height: 22px; }
.badge__name { font-size: var(--t-xs); line-height: 1.2; font-weight: 550; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge[data-owned="false"] { background: var(--panel); }
.badge[data-owned="false"] .badge__art { filter: grayscale(1); opacity: 0.4; }
.badge[data-owned="false"] .badge__name { color: var(--ink-3); }
.detail { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 44px var(--pad) 22px; overflow: hidden; animation: enter 480ms var(--spring); }
.detail__close { position: absolute; top: 6px; right: 6px; }
.detail__title { margin-top: 22px; font-size: var(--t-xl); line-height: 1.1; font-weight: 750; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.detail__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.detail__text { color: var(--ink-2); font-size: var(--t-sm); max-width: 36ch; }
.pill { padding: 5px 10px; border-radius: 999px; background: var(--inset); font: 500 var(--t-xs)/1.2 var(--mono); color: var(--ink-2); }
.pill[data-tone="done"] { background: var(--done); color: var(--panel); }
.stage__label { font-size: var(--t-sm); color: var(--ink-3); }
.stage__badge { font-size: 1.375rem; line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.stage__count { margin-top: 8px; font-size: var(--t-sm); color: var(--ink-2); }
.stage__left { display: block; font-size: 2rem; line-height: 1.05; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.stage__eta { margin-top: 4px; font-size: var(--t-sm); color: var(--ink-3); }
.stage__stream {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 6px 10px 14px; border-radius: var(--r-sm); background: var(--inset);
}
.stage__name { font-weight: 650; overflow-wrap: anywhere; }
.stage__meta { font-size: var(--t-sm); color: var(--ink-3); overflow-wrap: anywhere; }

/* индикатор уровня: идёт сигнал */
.meter { display: flex; align-items: flex-end; gap: 3px; width: 22px; height: 22px; }
.meter i { flex: 1; height: 100%; border-radius: 2px; background: var(--lamp-off); transform-origin: bottom; transform: scaleY(0.25); }
.stage[data-live] .meter i { background: var(--live); animation: level 1.1s ease-in-out infinite; }
.stage[data-live] .meter i:nth-child(2) { animation-delay: -0.35s; }
.stage[data-live] .meter i:nth-child(3) { animation-delay: -0.7s; }
.stage[data-live] .meter i:nth-child(4) { animation-delay: -0.15s; }
@keyframes level { 0%, 100% { transform: scaleY(0.25); } 40% { transform: scaleY(1); } 70% { transform: scaleY(0.55); } }

/* витрина значков */
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.strip .tile { scroll-snap-align: start; }
.tile {
  --tint: var(--line);
  display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center;
  padding: 14px 8px 12px; border-radius: var(--r);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--tint) 28%, var(--panel)) 0%, var(--panel) 74%);
}
.tile__art { filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.3)); }
.tile__art { width: 72px; height: 72px; object-fit: contain; border-radius: 14px; }
.strip .tile__art { width: 64px; height: 64px; }
.tile__art--blank { display: grid; place-items: center; background: var(--inset); color: var(--ink-3); }
.tile__art--blank .icon { width: 28px; height: 28px; }
.tile__name { font-weight: 650; font-size: var(--t-sm); line-height: 1.25; overflow-wrap: anywhere; }
.tile__sub { font-size: var(--t-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.tile--owned { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tint) 70%, transparent); }
.tile__bar { width: 100%; height: 5px; border-radius: 3px; background: var(--inset); overflow: hidden; }
.tile__bar i { display: block; height: 100%; background: var(--live); transform-origin: left; transform: scaleX(var(--f)); }
@keyframes pop { from { opacity: 0; transform: scale(0.86); } }

/* стопка значков серии в строке списка */
.stack { position: relative; display: block; width: 40px; height: 40px; }
.stack img { position: absolute; top: 0; left: 0; width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: var(--inset); box-shadow: 0 0 0 2px var(--panel); }
.stack[data-count="2"] { width: 54px; }
.stack[data-count="3"] { width: 68px; }
.stack img:nth-child(2) { left: 14px; }
.stack img:nth-child(3) { left: 28px; }

/* праздник: значок в коллекции */
.cheer {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: fade 260ms var(--ease);
}
.cheer__card { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 24px; }
.cheer .gift { animation: land 820ms var(--spring) backwards; }
.cheer__burst { position: absolute; left: 50%; top: 98px; width: 0; height: 0; }
.cheer__burst i {
  position: absolute; width: var(--w); height: calc(var(--w) * 0.45); border-radius: 2px; background: var(--c);
  animation: burst 1500ms cubic-bezier(0.12, 0.8, 0.3, 1) var(--d) backwards;
  opacity: 0;
}
.cheer__label { margin-top: 34px; font-size: var(--t-sm); color: var(--done); font-weight: 650; animation: enter 520ms var(--spring) 260ms backwards; }
.cheer__name { font-size: 2rem; line-height: 1.08; font-weight: 750; letter-spacing: -0.02em; overflow-wrap: anywhere; animation: enter 560ms var(--spring) 320ms backwards; }
.cheer__game { color: var(--ink-3); animation: enter 560ms var(--spring) 380ms backwards; }
.cheer__hint { margin-top: 10px; font-size: var(--t-sm); color: var(--ink-3); animation: enter 560ms var(--spring) 460ms backwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes land { from { opacity: 0; transform: scale(0.2) rotate(-24deg); } }
@keyframes burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(0.4); }
  55% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 1.12), calc(var(--y) + 190px)) rotate(calc(var(--r) * 1.6)) scale(0.9); }
}

/* шкала просмотра со станциями-значками */
.reel + .reel { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.reel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.reel__game { font-weight: 600; overflow-wrap: anywhere; }
.reel__time { flex: none; font: 500 var(--t-md)/1.2 var(--mono); color: var(--ink-3); }
.reel__time b { color: var(--ink); font-weight: 700; font-size: var(--t-lg); }
.reel__eta { margin: 2px 0 12px; font-size: var(--t-sm); color: var(--ink-2); }
.reel__eta b { color: var(--ink); font-weight: 600; }

.track {
  --p: 0%; --f: 0;
  position: relative; height: 44px; margin: 14px 20px 12px 0;
}
.track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 10px; border-radius: 5px;
  background: var(--inset); box-shadow: inset 0 0 0 1px var(--line);
}
.track__fill {
  position: absolute; left: 0; top: 17px; height: 10px; border-radius: 5px;
  width: 100%; background: var(--live); overflow: hidden;
  transform-origin: left center; transform: scaleX(var(--f));
  transition: transform 700ms var(--ease);
}
.stage[data-live] .track__fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgb(255 255 255 / 0.55) 50%, transparent 100%);
  transform: translateX(-100%); animation: sheen 2.6s ease-in-out infinite;
}
@keyframes sheen { 60%, 100% { transform: translateX(100%); } }
.station {
  position: absolute; top: 2px; left: var(--at); width: 40px; height: 40px; margin-left: -20px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--line); color: var(--ink-3);
  transition: border-color 300ms var(--ease);
}
.station img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; }
.station .icon { width: 18px; height: 18px; }
.station[data-state="later"] img { filter: grayscale(1); opacity: 0.45; }
.station[data-state="next"] { border-color: var(--live); }
.station[data-state="next"]::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--live);
  animation: ping 2.4s var(--ease) infinite;
}
.station[data-state="ready"] { border-color: var(--standby); }
.station[data-state="done"] { border-color: var(--done); }

.rewards { display: grid; gap: 4px; }
.reward {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 54px;
}
.reward__art { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: var(--inset); }
.reward[data-state="done"] .reward__art { box-shadow: 0 0 0 2px var(--done); }
.reward__art--blank { display: grid; place-items: center; color: var(--ink-3); }
.reward__art--blank .icon { width: 16px; height: 16px; }
.reward[data-state="later"] .reward__art { filter: grayscale(1); opacity: 0.55; }
.reward__name { font-weight: 550; overflow-wrap: anywhere; }
.reward__need { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--ink-3); }
.reward__left { font: 500 var(--t-sm)/1.2 var(--mono); color: var(--ink-3); white-space: nowrap; }
.reward[data-state="next"] .reward__left { color: var(--ink); }
.reward[data-state="ready"] .reward__left { color: var(--standby); }
.reward[data-state="done"] .reward__left { color: var(--done); }

.banner--warn { background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--standby); color: var(--ink-2); }
.banner--warn b { color: var(--ink); }

/* график за неделю */
.chart { margin: 12px 0 0; display: grid; gap: 12px; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-2); font-size: var(--t-sm); }
.chart figcaption b { color: var(--ink); font-size: var(--t-md); }
.chart__bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; height: 132px; }
.chart__col { display: grid; grid-template-rows: 16px minmax(0, 1fr) 16px; justify-items: center; gap: 4px; }
.chart__value { font: 500 var(--t-xs)/16px var(--mono); color: var(--ink-3); }
.chart__bar {
  align-self: end; width: 100%; max-width: 28px; height: var(--h); min-height: 2px;
  border-radius: 6px 6px 2px 2px; background: var(--line);
  transition: height 500ms var(--ease);
}
.chart__col[data-today] .chart__bar { background: var(--live); }
.chart__col[data-today] .chart__value { color: var(--ink); }
.chart__day { font-size: var(--t-xs); color: var(--ink-3); text-transform: lowercase; }
.chart .hint { margin-top: 0; }

/* история */
.timeline { display: grid; gap: 0; padding: 4px var(--pad); }
.timeline__item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.timeline__item:first-child { border-top: 0; }
.timeline__art { width: 36px; height: 36px; margin: -4px; border-radius: 9px; object-fit: contain; background: var(--inset); box-shadow: 0 0 0 2px var(--done); }
.timeline__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--inset); color: var(--ink-3); }
.timeline__dot .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.timeline__item[data-tone="done"] .timeline__dot { background: var(--done); color: var(--panel); }
.timeline__item[data-tone="live"] .timeline__dot { color: var(--live); }
.timeline__item[data-tone="standby"] .timeline__dot { color: var(--standby); }
.timeline__title { font-weight: 550; overflow-wrap: anywhere; }
.timeline__at { font: 500 var(--t-xs)/1.3 var(--mono); color: var(--ink-3); white-space: nowrap; }

/* режимы */
.modes > .mode { padding: 14px var(--pad); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.modes > .mode:first-child { border-top: 0; }
.mode__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.mode__head b { font-weight: 650; }
.mode__head--toggle { min-height: 34px; cursor: pointer; }
.mode__state { font: 500 var(--t-xs)/1 var(--mono); color: var(--ink-3); }
.mode__text { font-size: var(--t-sm); color: var(--ink-3); }
.mode__empty { font-size: var(--t-sm); color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding-left: 12px;
  border-radius: 999px; background: var(--inset); font: 500 var(--t-sm)/1 var(--mono);
}
.chip button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-3); border-radius: 50%; }
.chip button .icon { width: 14px; height: 14px; }
.adder { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 8px; }
.adder .input { min-height: 48px; }
.adder .input input { height: 44px; font-size: var(--t-md); }
.adder__btn { min-height: 48px; padding: 0; }
.stepper { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; text-align: center; }
.stepper__value { display: grid; gap: 2px; }
.stepper__value b { font-size: var(--t-xl); line-height: 1; }
.stepper__value span { font-size: var(--t-sm); color: var(--ink-3); }
.icon-btn[disabled] { opacity: 0.3; cursor: default; }

/* ------------------------------------------------------------ кнопки */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; width: 100%; padding: 0 18px;
  border: 0; border-radius: var(--r-sm);
  background: var(--action); color: var(--on-action);
  font-weight: 650; font-size: var(--t-md); text-decoration: none;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}
.btn:active { transform: scale(0.985); }
.btn--quiet { background: var(--inset); color: var(--ink); }
.btn--danger { background: none; color: var(--danger); font-weight: 600; }
.btn[disabled] { opacity: 0.45; cursor: default; transform: none; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.btn-row { display: grid; gap: 10px; }
.btn-row--2 { grid-template-columns: 1fr 1fr; }

.link {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--target);
  border: 0; background: none; padding: 0;
  color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 4px;
}
.link .icon { width: 16px; height: 16px; }

.icon-btn {
  width: var(--target); height: var(--target); flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--ink-3);
}
.icon-btn:active { background: var(--inset); }

/* ------------------------------------------------- подключение и код */

.lead { font-size: var(--t-xl); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.lead + p { margin-top: 10px; color: var(--ink-2); max-width: 34ch; }

.steps { counter-reset: step; display: grid; gap: 14px; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start;
  color: var(--ink-2);
}
.steps li::before {
  content: counter(step);
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--inset); color: var(--ink);
  font: 600 var(--t-sm)/1 var(--mono);
}
.steps b { color: var(--ink); font-weight: 600; }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.field > label { font-weight: 600; }
.input {
  display: flex; align-items: center;
  min-height: 52px; padding: 0 14px;
  background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color 160ms var(--ease);
}
.input:focus-within { border-color: var(--ink); }
.input[data-error] { border-color: var(--danger); }
.input__prefix { font-family: var(--mono); color: var(--ink-3); white-space: nowrap; }
.input input {
  flex: 1; min-width: 0; width: 100%; height: 48px; border: 0; outline: 0; background: none;
  font-family: var(--mono); font-size: 1rem; color: var(--ink);
}
.input input::placeholder { color: var(--ink-3); opacity: 1; }
.field__error { color: var(--danger); font-size: var(--t-sm); }
.extras-form { margin-top: 14px; }

.code {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; justify-items: center; text-align: center;
  padding: 22px var(--pad) 18px;
}
.code__chars { display: flex; gap: 5px; max-width: 100%; }
.code__chars span {
  width: clamp(26px, 8vw, 38px); height: 50px;
  display: grid; place-items: center;
  background: var(--inset); border-radius: 8px;
  font: 700 1.5rem/1 var(--mono);
}
.code__chars span:nth-child(4) { margin-right: 8px; }
.code__timer { font: 500 var(--t-sm)/1.2 var(--mono); color: var(--ink-3); }
.code__timer b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------- списки */

.rows > li { border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; }
.row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px var(--pad); min-height: 60px;
}
.row__art {
  width: 40px; height: 40px; border-radius: 8px; object-fit: contain;
  background: var(--inset);
}
.row__art--blank { display: grid; place-items: center; color: var(--ink-3); }
.row__main { min-width: 0; }
.row__title { font-weight: 600; overflow-wrap: anywhere; }
.row__sub { font-size: var(--t-sm); color: var(--ink-3); overflow-wrap: anywhere; }
.row__side {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px;
  font: 500 var(--t-xs)/1.3 var(--mono); color: var(--ink-3); white-space: nowrap;
}
.row__side[data-tone="live"] { color: var(--live); }
.row__side[data-tone="done"] { color: var(--done); }
.row__side[data-tone="standby"] { color: var(--standby); }
.row__state { display: inline-flex; align-items: center; gap: 6px; }
.row__state .lamp { width: 8px; height: 8px; }

.waiting-list { display: grid; gap: 8px; }
.waiting-card {
  --tint: var(--standby);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  padding: 10px 12px; gap: 12px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--tint) 12%, var(--panel));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 26%, var(--line));
}
.waiting-card__art {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 12px;
  color: color-mix(in srgb, var(--tint) 56%, var(--ink));
  background: color-mix(in srgb, var(--tint) 22%, var(--panel));
}
.waiting-card__art[data-pair] { grid-template-columns: 1fr 1fr; width: 60px; padding-inline: 3px; }
.waiting-card__image { object-fit: contain; }
.waiting-card__time {
  padding: 4px 8px; border-radius: 8px; white-space: nowrap;
  background: color-mix(in srgb, var(--tint) 18%, var(--panel)); color: var(--ink);
  font-size: var(--t-xs); font-weight: 600;
}

.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; border-radius: 12px; background: var(--inset);
}
.seg button {
  min-height: 40px; border: 0; border-radius: 9px; background: none;
  color: var(--ink-3); font-weight: 600; font-size: var(--t-sm);
  touch-action: manipulation;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.14); }
.seg button:not([aria-pressed="true"]):active { background-color: rgb(255 255 255 / 0.08); }

.seg__n { margin-left: 5px; font: 500 var(--t-xs)/1 var(--mono); opacity: 0.7; }
.row--link {
  width: 100%; border: 0; background: none; text-align: left; color: inherit;
  transition: background-color 160ms var(--ease);
}
.row--link:active { background: var(--inset); }
.row--link .row__title, .row--link .row__sub { display: block; }
.row--link .row__title { font-weight: 550; }
.empty { padding: 28px var(--pad); text-align: center; color: var(--ink-3); }
.empty b { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 600; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.facts > div { background: var(--panel); padding: 14px var(--pad); }
.facts dt { font-size: var(--t-sm); color: var(--ink-3); }
.facts dd { margin-top: 2px; font: 600 var(--t-lg)/1.2 var(--mono); }

/* переключатели */
.toggle {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px;
  padding: 12px var(--pad); min-height: 60px;
}
.toggle__text b { display: block; font-weight: 600; }
.toggle__text span { font-size: var(--t-sm); color: var(--ink-3); }
.switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  position: relative; width: 50px; height: 30px; border-radius: 15px;
  background: var(--lamp-off); cursor: pointer;
  transition: background-color 200ms var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
  transition: transform 200ms var(--ease);
}
.switch:checked { background: var(--done); }
.switch:checked::after { transform: translateX(20px); }

.prose { color: var(--ink-2); display: grid; gap: 10px; max-width: 65ch; }
.prose b { color: var(--ink); }

.skeleton {
  border-radius: var(--r); background: var(--panel); height: 132px;
  position: relative; overflow: hidden;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, var(--inset) 50%, transparent 80%);
  animation: sweep 1.4s linear infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

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


/* ===================== слой Telegram: объём, блики, подарки ===================== */

body { font-variant-numeric: tabular-nums; }
.lead, .status__word { font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.02em; }
.lamp { box-shadow: 0 0 14px color-mix(in srgb, var(--tone) 70%, transparent); }
.lamp[data-tone="off"], .lamp:not([data-tone]) { box-shadow: none; }

/* списки и подписи как в настройках Telegram */
.panel { border-radius: var(--r); box-shadow: var(--shadow); }
.section > h2 { margin: 0 var(--pad) 8px; font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.section > h2 .count { font: inherit; letter-spacing: 0; margin-left: 6px; opacity: 0.8; }
.hint { padding: 0 var(--pad); }
.panel .hint, .chart .hint { padding: 0; }
.rows > li { position: relative; border-top: 0; }
.rows > li + li::before { content: ""; position: absolute; left: 68px; right: 0; top: 0; height: 1px; background: var(--line); }
.row__art { border-radius: 12px; }
.row__title, .tile__name, .reward__name, .mode__head b { font-weight: 600; }

/* кнопки: объём, блик, нажатие «вглубь» */
.btn {
  position: relative; overflow: hidden; min-height: 52px; border-radius: 16px; font-size: 1rem; font-weight: 600;
  background: linear-gradient(180deg, color-mix(in srgb, var(--action) 84%, #ffffff) 0%, var(--action) 100%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.32) inset, 0 -2px 0 rgb(0 0 0 / 0.14) inset, 0 14px 24px -14px var(--action);
}
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 46%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.38), transparent);
  transform: skewX(-18deg); animation: shine 4.2s ease-in-out infinite;
}
@keyframes shine { 0%, 62% { left: -60%; } 100% { left: 130%; } }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn--quiet { background: color-mix(in srgb, var(--action) 15%, transparent); color: var(--action); box-shadow: none; }
.btn--danger { background: none; box-shadow: none; color: var(--danger); }
.btn--quiet::after, .btn--danger::after { display: none; }
.link { color: var(--action); text-decoration: none; }
.switch:checked { background: var(--action); }
.input { border-radius: 14px; border-color: transparent; background: var(--inset); }
.input:focus-within { border-color: var(--action); }
.panel > .input, .field > .input { background: var(--inset); }
.seg { border-radius: 16px; padding: 4px; }
.seg button { border-radius: 12px; min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 0 var(--gloss) inset, 0 6px 14px -8px rgb(0 0 0 / 0.5); }
.pill, .gcard__pill { padding: 5px 11px; border-radius: 999px; background: var(--inset); font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); }

/* нижняя панель «парит» над экраном */
.view { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 46px); }
.tabs {
  left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); max-width: 536px; margin: 0 auto; padding: 6px;
  border: 0; border-radius: 28px;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 1px 0 var(--gloss) inset, 0 16px 36px -12px rgb(0 0 0 / 0.65);
}
.tab { min-height: 52px; max-width: none; border-radius: 22px; font-weight: 600; transition: color 200ms var(--ease), background-color 260ms var(--ease); }
.tab[aria-current="page"] { color: var(--action); background: color-mix(in srgb, var(--action) 15%, transparent); }
.toast { bottom: calc(var(--tabs-h) + var(--safe-b) + 28px); }

/* главная сцена: значок как подарок на цветном фоне */
.stage { --tint: var(--action); padding: 0 0 var(--pad); gap: 16px; }
.stage > *:not(.stage__hero) { margin-inline: var(--pad); }
.stage__hero {
  position: relative; isolation: isolate; overflow: hidden;
  grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 4px;
  padding: 34px var(--pad) 24px; border-radius: var(--r) var(--r) 0 0;
  background: radial-gradient(130% 100% at 50% 0%, color-mix(in srgb, var(--tint) 52%, var(--panel)) 0%, color-mix(in srgb, var(--tint) 14%, var(--panel)) 56%, var(--panel) 100%);
}
.stage__hero::before {
  content: ""; position: absolute; inset: -20px; z-index: -1;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%); mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
  translate: calc(var(--tx, 0) * -12px) calc(var(--ty, 0) * -12px);
}
.ring { width: 176px; height: 176px; margin-bottom: 10px; }
.ring__bg { stroke: rgb(255 255 255 / 0.14); stroke-width: 5; }
.ring__fg { stroke-width: 5; filter: drop-shadow(0 0 6px var(--live)); }
.stage__text { display: grid; justify-items: center; }
.stage__label { font-weight: 500; color: var(--ink-2); }
.stage__badge { font-size: 1.75rem; font-weight: 700; }
.stage__count { margin-top: 10px; }
.stage__left { font-size: 3.25rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; line-height: 1.1; }
.stage__stream { border-radius: 16px; box-shadow: 0 1px 0 var(--gloss) inset; }

/* объём: значок слегка поворачивается вслед за наклоном телефона и покачивается сам */
.gift { transform: perspective(640px) rotateY(calc(var(--tx, 0) * 18deg)) rotateX(calc(var(--ty, 0) * -14deg)); transition: transform 160ms linear; transform-style: preserve-3d; }
.gift__glow { translate: calc(var(--tx, 0) * 10px) calc(var(--ty, 0) * 10px); }
.gift__art { animation: sway 6.5s ease-in-out infinite; filter: drop-shadow(0 14px 16px rgb(0 0 0 / 0.42)); }
@keyframes sway {
  0%, 100% { transform: perspective(520px) rotateY(-13deg) rotateX(5deg) translateY(0); }
  50% { transform: perspective(520px) rotateY(13deg) rotateX(-4deg) translateY(-7px); }
}

/* шкала серии: объёмная дорожка и «жетоны» значков */
.track::before { height: 12px; top: 16px; border-radius: 6px; background: var(--inset); box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.28); }
.track__fill { height: 12px; top: 16px; border-radius: 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--live) 72%, #ffffff), var(--live)); box-shadow: 0 0 12px color-mix(in srgb, var(--live) 60%, transparent); }
.station { box-shadow: 0 1px 0 var(--gloss) inset, 0 8px 14px -8px rgb(0 0 0 / 0.7); }
.reward__art, .tile__art, .badge__art { filter: drop-shadow(0 6px 8px rgb(0 0 0 / 0.32)); background: none; }
.reward[data-state="done"] .reward__art { box-shadow: none; }
.reward__left { font-weight: 600; }

/* карточки-подарки */
.gifts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gcard {
  --tint: var(--action);
  position: relative; overflow: hidden; isolation: isolate; width: 100%; height: 100%;
  display: grid; justify-items: center; align-content: start; gap: 4px; padding: 20px 10px 14px;
  border: 0; border-radius: 20px; color: inherit; text-align: center;
  background: radial-gradient(120% 86% at 50% 16%, color-mix(in srgb, var(--tint) 48%, var(--panel)) 0%, color-mix(in srgb, var(--tint) 10%, var(--panel)) 62%, var(--panel) 100%);
  box-shadow: var(--shadow);
  transition: transform 260ms var(--spring);
}
.gcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  -webkit-mask-image: radial-gradient(circle at 50% 26%, #000, transparent 70%); mask-image: radial-gradient(circle at 50% 26%, #000, transparent 70%);
}
.gcard:active { transform: scale(0.95); }
.gcard__art { width: 76px; height: 76px; object-fit: contain; border-radius: 16px; margin-bottom: 6px; filter: drop-shadow(0 12px 12px rgb(0 0 0 / 0.4)); animation: sway 7s ease-in-out infinite; }
.gcard:nth-child(even) .gcard__art, li:nth-child(even) > .gcard .gcard__art { animation-delay: -3.2s; }
.gcard__art--blank { display: grid; place-items: center; background: var(--inset); color: var(--ink-3); filter: none; animation: none; }
.gcard__art--blank .icon { width: 30px; height: 30px; }
.gcard__name { font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
.gcard__sub { font-size: var(--t-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.gcard__pill { margin-top: 6px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.ribbon {
  position: absolute; top: 13px; right: -34px; width: 116px; padding: 3px 0; rotate: 45deg; z-index: 1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--action) 80%, #ffffff), var(--action)); color: var(--on-action);
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center;
  box-shadow: 0 4px 10px -4px rgb(0 0 0 / 0.6);
}
.ribbon[data-tone="done"] { background: linear-gradient(180deg, color-mix(in srgb, var(--done) 76%, #ffffff), var(--done)); color: #062b14; }
.ribbon[data-tone="live"] { background: linear-gradient(180deg, color-mix(in srgb, var(--live) 76%, #ffffff), var(--live)); color: #ffffff; }

/* плитки коллекции: тот же приём, компактнее */
.tile, .badge { box-shadow: var(--shadow); border-radius: 18px; }
.badge { transition: transform 240ms var(--spring); }
.vault { background: radial-gradient(120% 120% at 12% 20%, color-mix(in srgb, var(--action) 30%, var(--panel)) 0%, var(--panel) 70%); }
.vault__num { font-size: 3rem; font-weight: 700; }
.vault__bar i { background: linear-gradient(90deg, var(--action), var(--done)); }
.facts { border-radius: var(--r); box-shadow: var(--shadow); }
.facts dd { font-size: 1.375rem; font-weight: 700; }
.chart__bar { border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.chart__col[data-today] .chart__bar { background: linear-gradient(180deg, color-mix(in srgb, var(--action) 66%, #ffffff), var(--action)); box-shadow: 0 0 14px color-mix(in srgb, var(--action) 55%, transparent); }
.timeline__art { box-shadow: none; filter: drop-shadow(0 4px 6px rgb(0 0 0 / 0.35)); background: none; }
.banner { border-radius: 16px; }
.banner--warn { box-shadow: inset 0 0 0 1.5px var(--standby), var(--shadow); }
.code__chars span { border-radius: 12px; box-shadow: 0 1px 0 var(--gloss) inset, 0 6px 12px -8px rgb(0 0 0 / 0.6); font-weight: 700; }
.steps li::before { font-weight: 700; background: color-mix(in srgb, var(--action) 16%, transparent); color: var(--action); }
.chip { font-weight: 600; }

/* шторка снизу: значок крупно, как подарок */
.sheet {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end;
  background: rgb(0 0 0 / 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade 220ms var(--ease);
}
.sheet__card {
  --tint: var(--action);
  width: 100%; max-width: 560px; max-height: 90dvh; margin: 0 auto; overflow: auto;
  display: grid; gap: 14px; padding: 0 var(--pad) calc(16px + var(--safe-b));
  background: var(--panel); border-radius: 28px 28px 0 0;
  box-shadow: 0 -20px 50px -20px rgb(0 0 0 / 0.8);
  animation: sheet-up 460ms var(--spring);
}
.sheet[data-closing] { opacity: 0; transition: opacity 220ms var(--ease); }
.sheet[data-closing] .sheet__card { transform: translateY(40%); transition: transform 220ms ease-in; }
@keyframes sheet-up { from { transform: translateY(60%); opacity: 0.4; } }
.sheet__head {
  position: relative; isolation: isolate; overflow: hidden; margin: 0 calc(var(--pad) * -1);
  display: grid; justify-items: center; gap: 12px; text-align: center; padding: 52px var(--pad) 24px;
  background: radial-gradient(130% 100% at 50% 0%, color-mix(in srgb, var(--tint) 56%, var(--panel)) 0%, color-mix(in srgb, var(--tint) 14%, var(--panel)) 58%, var(--panel) 100%);
}
.sheet__head::before {
  content: ""; position: absolute; inset: -20px; z-index: -1;
  -webkit-mask-image: radial-gradient(circle at 50% 36%, #000, transparent 72%); mask-image: radial-gradient(circle at 50% 36%, #000, transparent 72%);
  translate: calc(var(--tx, 0) * -12px) calc(var(--ty, 0) * -12px);
}
.sheet__grip { position: absolute; top: 9px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: rgb(255 255 255 / 0.4); }
.sheet__title { margin-top: 26px; font-size: 1.625rem; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.sheet__text { color: var(--ink-2); font-size: var(--t-sm); }
.table { margin: 0; border-radius: 16px; background: var(--inset); overflow: hidden; }
.table > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 12px 14px; }
.table > div + div { border-top: 1px solid var(--line); }
.table dt { color: var(--ink-3); }
.table dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.steps2 { display: grid; gap: 8px; }
.steps2 li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; }


/* ============ всегда тёмный вид: глубокий фон, подсветка, богатые полосы ============ */

:root, [data-theme="dark"], [data-theme="light"] {
  color-scheme: dark;
  --ground: #07080d;
  --panel: #12141c;
  --panel-hi: #1a1d28;
  --ink: #f4f6fb;
  --ink-2: #b7bdcc;
  --ink-3: #8089a0;
  --inset: rgb(255 255 255 / 0.06);
  --line: rgb(255 255 255 / 0.09);
  --action: #3e9bff;
  --action-2: #7c5cff;
  --on-action: #ffffff;
  --danger: #ff6b61;
  --live: #ff4d5e;
  --standby: #ffb224;
  --done: #37d67a;
  --lamp-off: rgb(255 255 255 / 0.22);
  --gloss: rgb(255 255 255 / 0.08);
  --shadow: 0 1px 0 var(--gloss) inset, 0 0 0 1px rgb(255 255 255 / 0.045) inset, 0 22px 40px -26px rgb(0 0 0);
}

/* фон с мягкой цветной подсветкой сверху — глубина вместо плоской заливки */
body { background: var(--ground); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 38% at 12% -6%, rgb(62 155 255 / 0.20) 0%, transparent 70%),
    radial-gradient(60% 34% at 96% 2%, rgb(124 92 255 / 0.18) 0%, transparent 70%),
    radial-gradient(90% 40% at 50% 110%, rgb(62 155 255 / 0.08) 0%, transparent 70%);
}

/* поверхности: лёгкий градиент сверху вниз и тонкая светлая кромка */
.panel, .tile, .badge, .facts > div, .gcard, .table, .stage__stream {
  background-color: var(--panel);
}
.panel { background-image: linear-gradient(180deg, var(--panel-hi) 0%, var(--panel) 70%); }
.facts { background: var(--line); }
.facts > div { background-image: linear-gradient(180deg, var(--panel-hi), var(--panel)); }
.stage { background-image: none; }
.stage__stream { background: rgb(255 255 255 / 0.05); }
.input { background: rgb(255 255 255 / 0.06); }
.seg { background: rgb(255 255 255 / 0.05); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.5); }
.seg button[aria-pressed="true"] { background: linear-gradient(180deg, #262a38, #1c1f2b); color: var(--ink); }
.btn { background: linear-gradient(180deg, #5db0ff 0%, var(--action) 55%, #2f7fe6 100%); }
.btn--quiet { background: rgb(62 155 255 / 0.16); color: #8cc4ff; }
.btn--danger { background: none; }
.link { color: #8cc4ff; }
.pill, .gcard__pill { background: rgb(255 255 255 / 0.08); color: var(--ink-2); }
.pill[data-tone="done"] { background: var(--done); color: #05240f; }

/* нижняя панель: тёмное стекло с подсветкой активного раздела */
.tabs {
  background: linear-gradient(180deg, rgb(32 36 50 / 0.86), rgb(16 18 26 / 0.9));
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.12) inset, 0 0 0 1px rgb(255 255 255 / 0.06) inset, 0 20px 40px -12px rgb(0 0 0);
}
.tab { color: var(--ink-3); }
.tab[aria-current="page"] {
  color: #ffffff;
  background: linear-gradient(180deg, rgb(62 155 255 / 0.34), rgb(124 92 255 / 0.22));
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 8px 20px -10px var(--action);
}

/* шкала серии: стеклянный жёлоб, светящееся заполнение с бегущим бликом и «головой» */
.track { height: 48px; margin-right: 22px; }
.track::before {
  top: 16px; height: 16px; border-radius: 8px;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.55), rgb(255 255 255 / 0.05));
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.7), inset 0 -1px 0 rgb(255 255 255 / 0.08), 0 1px 0 rgb(255 255 255 / 0.05);
}
.track__fill {
  top: 18px; left: 2px; height: 12px; border-radius: 6px; width: calc(100% - 4px);
  background: linear-gradient(180deg, #ff97a1 0%, var(--live) 45%, #d92b45 100%);
  box-shadow: 0 0 16px rgb(255 77 94 / 0.65), inset 0 1px 0 rgb(255 255 255 / 0.5);
}
.station { top: 4px; background: linear-gradient(180deg, #2a2e3d, #171a24); border-color: rgb(255 255 255 / 0.14); }
.station[data-state="done"] { border-color: var(--done); box-shadow: 0 0 14px rgb(55 214 122 / 0.5), 0 8px 14px -8px rgb(0 0 0); }
.station[data-state="next"] { border-color: var(--live); box-shadow: 0 0 14px rgb(255 77 94 / 0.55), 0 8px 14px -8px rgb(0 0 0); }

/* маленькие полосы: коллекция и плитки «на подходе» */
.vault__bar, .tile__bar {
  height: 10px; border-radius: 5px;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.55), rgb(255 255 255 / 0.05));
  box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.7), inset 0 -1px 0 rgb(255 255 255 / 0.08);
}
.vault__bar i { border-radius: 5px; background: linear-gradient(90deg, var(--action), var(--action-2)); box-shadow: 0 0 12px rgb(62 155 255 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.45); }
.tile__bar { height: 8px; }
.tile__bar i { border-radius: 4px; background: linear-gradient(180deg, #ff97a1, var(--live)); box-shadow: 0 0 10px rgb(255 77 94 / 0.55); }

/* график: у каждого столбика свой жёлоб на всю высоту */
.chart__bars { height: 150px; }
.chart__col { position: relative; }
.chart__col::before {
  content: ""; position: absolute; left: 50%; top: 20px; bottom: 20px; width: 100%; max-width: 28px; translate: -50% 0;
  border-radius: 9px; background: linear-gradient(180deg, rgb(0 0 0 / 0.45), rgb(255 255 255 / 0.04));
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.6), inset 0 -1px 0 rgb(255 255 255 / 0.07);
}
.chart__bar { position: relative; border-radius: 8px; background: linear-gradient(180deg, #6f7890, #474e62); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3); }
.chart__col[data-today] .chart__bar { background: linear-gradient(180deg, #8cc4ff, var(--action) 55%, var(--action-2)); box-shadow: 0 0 18px rgb(62 155 255 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.5); }
.chart__value { color: var(--ink-2); }

/* кольцо прогресса на сцене */
.ring__bg { stroke: rgb(255 255 255 / 0.12); stroke-width: 7; }
.ring__fg { stroke-width: 7; filter: drop-shadow(0 0 8px rgb(255 77 94 / 0.8)); }
.switch { background: rgb(255 255 255 / 0.16); }
.switch:checked { background: linear-gradient(180deg, #5db0ff, var(--action)); }
.code__chars span { background: linear-gradient(180deg, #232735, #171a24); }
.sheet__card { background: linear-gradient(180deg, var(--panel-hi), var(--panel)); }
.toast { background: #f4f6fb; color: #0b0d12; }


/* ============ цветные значки-плитки, аватары, шкала мест, карточки статистики ============ */

.glyph {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 11px; color: #ffffff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 72%, #ffffff) 0%, var(--tint) 55%, color-mix(in srgb, var(--tint) 70%, #000000) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 -1px 0 rgb(0 0 0 / 0.25), 0 8px 18px -8px var(--tint);
  transition: filter 240ms var(--ease), opacity 240ms var(--ease);
}
.glyph .icon { width: 19px; height: 19px; stroke-width: 2; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.35)); }
.glyph[data-off] { filter: saturate(0.12) brightness(0.72); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2); }

/* режимы и переключатели — как строки настроек Telegram */
.mode__head { gap: 12px; }
.mode__head b { font-size: var(--t-md); }
.mode__state {
  padding: 5px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.07); color: var(--ink-3);
  font-family: inherit; font-size: var(--t-xs); font-weight: 600; line-height: 1.2;
}
.mode__state[data-on] { background: rgb(55 214 122 / 0.16); color: #6be7a0; }
.mode__text { padding-left: 48px; }
.modes .chips, .modes .adder, .modes .mode__empty { margin-left: 48px; }
.toggle--glyph { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
.rows > li:has(.toggle--glyph) + li::before { left: 64px; }

/* аватары друзей: цветной круг, у тех, кто в эфире, — светящееся кольцо */
.ava {
  position: relative; width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%;
  font-weight: 700; font-size: 1.0625rem; color: #ffffff; text-shadow: 0 1px 1px rgb(0 0 0 / 0.3);
  background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 70%, #ffffff), color-mix(in srgb, var(--tint) 78%, #000000));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4), 0 8px 16px -10px var(--tint);
}
.ava[data-live]::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--live);
  box-shadow: 0 0 12px rgb(255 77 94 / 0.7); animation: ava-pulse 2.4s var(--ease) infinite;
}
@keyframes ava-pulse { 50% { opacity: 0.45; transform: scale(1.06); } }
.row__state {
  padding: 5px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.06); font-size: var(--t-xs); font-weight: 600; white-space: nowrap;
}

/* шкала мест: ячейки, занятые светятся */
.seats { display: grid; gap: 12px; }
.seats__head { display: flex; align-items: baseline; justify-content: space-between; color: var(--ink-3); font-size: var(--t-sm); }
.seats__head b { font-size: 1.75rem; line-height: 1; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.seats__head b span { font-size: var(--t-md); font-weight: 600; color: var(--ink-3); }
.seats__bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; }
.seats__bar i {
  height: 14px; border-radius: 5px;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.55), rgb(255 255 255 / 0.05));
  box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.7), inset 0 -1px 0 rgb(255 255 255 / 0.08);
}
.seats__bar i[data-on] {
  background: linear-gradient(180deg, #8cc4ff, var(--action) 55%, var(--action-2));
  box-shadow: 0 0 12px rgb(62 155 255 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.5);
  animation: seat-in 520ms var(--spring, var(--ease)) backwards; animation-delay: calc(var(--i) * 45ms);
}
@keyframes seat-in { from { opacity: 0; transform: scaleY(0.3); } }

/* статистика: четыре отдельные карточки с цветным значком и подсветкой угла */
.facts { gap: 10px; background: none; border-radius: 0; overflow: visible; box-shadow: none; }
.facts > .fact {
  position: relative; overflow: hidden; display: grid; align-content: start; gap: 4px; padding: 14px; border-radius: 20px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel)); box-shadow: var(--shadow);
}
.facts > .fact::before {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tint) 34%, transparent), transparent);
}
.facts .glyph { width: 32px; height: 32px; border-radius: 10px; margin-bottom: 8px; }
.facts .glyph .icon { width: 17px; height: 17px; }
.facts dd { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.facts dt { font-size: var(--t-sm); color: var(--ink-3); }

/* график: будни — приглушённый синий, сегодня — яркий со свечением */
.chart__bar { background: linear-gradient(180deg, #5f83d8 0%, #3d4f96 100%); opacity: 0.85; }
.chart__col[data-today] .chart__bar { opacity: 1; }
.chart__col[data-today] .chart__day { color: #8cc4ff; font-weight: 600; }

/* история: кружки событий с объёмом */
.timeline__dot { background: linear-gradient(180deg, #2a2e3d, #171a24); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12); }
.timeline__item[data-tone="done"] .timeline__dot {
  background: linear-gradient(180deg, #6be7a0, var(--done)); color: #05240f; box-shadow: 0 0 12px rgb(55 214 122 / 0.5), inset 0 1px 0 rgb(255 255 255 / 0.5);
}

/* поля ввода и счётчик мест — утопленные, со своим фоном */
.input { box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.55), inset 0 -1px 0 rgb(255 255 255 / 0.06); border-radius: 14px; }
.chip { background: linear-gradient(180deg, #262a38, #1b1e2a); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1); }
.stepper .icon-btn { background: rgb(255 255 255 / 0.07); color: var(--ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1); }

@media (prefers-reduced-motion: reduce) {
  .ava[data-live]::after, .seats__bar i[data-on] { animation: none; }
}


/* ============ спокойнее: свечение только у «идёт сейчас», один синий, свой фон, плотные иконки ============ */

:root, [data-theme="dark"], [data-theme="light"] { --spring: cubic-bezier(0.2, 1.1, 0.3, 1); }

/* фон: узор из значков, как обои чата в Telegram, и один мягкий свет сверху */
body::before {
  background:
    radial-gradient(120% 46% at 50% -12%, rgb(62 155 255 / 0.13) 0%, transparent 72%),
    url("/pattern.svg") 0 0 / 220px 220px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, rgb(0 0 0 / 0.5) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 40%, rgb(0 0 0 / 0.5) 100%);
}
.stage__hero::before, .gcard::before, .sheet__head::before { background-image: none; }
.vault { background: linear-gradient(180deg, var(--panel-hi), var(--panel)); }

/* нижняя панель: активный раздел — синим, без перелива */
.tabs { background: rgb(22 24 31 / 0.84); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.07) inset, 0 16px 32px -14px rgb(0 0 0); }
.tab .icon { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: #6cb6ff; background: rgb(255 255 255 / 0.08); box-shadow: none; }

/* полосы: один синий, блик сверху, без ореола */
.vault__bar i, .seats__bar i[data-on], .chart__col[data-today] .chart__bar {
  background: linear-gradient(180deg, #62adff, #3e9bff); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35);
}
.chart__bar { background: #3a4257; opacity: 1; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12); }
.tile__bar i { box-shadow: none; }
.track__fill { box-shadow: 0 0 10px rgb(255 77 94 / 0.35), inset 0 1px 0 rgb(255 255 255 / 0.45); }
.station[data-state="done"], .station[data-state="next"] { box-shadow: 0 8px 14px -8px rgb(0 0 0); }
.ring__fg { filter: drop-shadow(0 0 4px rgb(255 77 94 / 0.45)); }
.lamp { box-shadow: none; }
.lamp[data-tone="live"] { box-shadow: 0 0 8px rgb(255 77 94 / 0.6); }
.timeline__item[data-tone="done"] .timeline__dot { background: var(--done); box-shadow: none; }
.btn:not(.btn--quiet):not(.btn--danger) {
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.3) inset, 0 -2px 0 rgb(0 0 0 / 0.14) inset, 0 10px 18px -14px rgb(0 0 0);
}

/* значки-плитки: ровный цвет, как в настройках Telegram */
.glyph { border-radius: 10px; background: var(--tint); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28); }
.glyph .icon { width: 20px; height: 20px; filter: none; }
.glyph[data-off] { background: #3a3f4d; color: #aab0c0; filter: none; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12); }
.ava { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3); }
.ava[data-live]::after { box-shadow: none; }

/* статистика: одна панель, цифры и настоящие значки */
.facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel-hi), var(--panel)); box-shadow: var(--shadow);
}
.facts > div { padding: 14px var(--pad); background: none; }
.facts > div:nth-child(even) { border-left: 1px solid var(--line); }
.facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.facts dt { font-size: var(--t-sm); color: var(--ink-3); }
.facts dd { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.facts__stack { display: inline-flex; }
.facts__art { width: 26px; height: 26px; margin-left: -8px; border-radius: 7px; object-fit: contain; background: var(--panel); box-shadow: 0 0 0 2px var(--panel-hi); }
.facts__art:first-child { margin-left: 0; }


/* ============ матовый вид: без глянца и цветных пятен, один синий акцент ============ */

:root, [data-theme="dark"], [data-theme="light"] {
  --gloss: transparent;
  --panel: #14161c;
  --panel-hi: #14161c;
  --shadow: 0 0 0 1px rgb(255 255 255 / 0.06) inset;
}
body::before {
  background:
    radial-gradient(120% 40% at 50% -14%, rgb(62 155 255 / 0.07) 0%, transparent 72%),
    url("/pattern.svg") 0 0 / 220px 220px;
}

/* поверхности ровные */
.panel, .facts, .vault { background: var(--panel); }
.stage__stream { box-shadow: none; }
.tile { background: var(--panel); }
.tile--owned { box-shadow: var(--shadow); }

/* значок-подарок: мягкий цвет сверху и чистый значок с тенью */
.stage__hero { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 26%, var(--panel)) 0%, var(--panel) 100%); }
.gcard { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 20%, var(--panel)) 0%, var(--panel) 74%); }
.sheet__head { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 28%, var(--panel)) 0%, var(--panel) 100%); }
.gift__art { filter: drop-shadow(0 10px 14px rgb(0 0 0 / 0.4)); }
.ring__bg { stroke: rgb(255 255 255 / 0.14); stroke-width: 6; }
.ring__fg { stroke: #ffffff; stroke-width: 6; filter: none; }

/* кнопки без блика и перелива */
.btn::after { display: none; }
.btn:not(.btn--quiet):not(.btn--danger) { background: var(--action); box-shadow: none; }
.btn--quiet { background: rgb(62 155 255 / 0.14); color: #7dbcff; box-shadow: none; }
.switch:checked { background: var(--action); }

/* полосы: ровный жёлоб, ровное синее заполнение */
.track::before { top: 19px; height: 10px; border-radius: 5px; background: rgb(255 255 255 / 0.09); box-shadow: none; }
.track__fill { top: 19px; left: 0; width: 100%; height: 10px; border-radius: 5px; background: var(--action); box-shadow: none; }
.stage[data-live] .track__fill::after { display: none; }
.station { background: #1b1e26; border-color: rgb(255 255 255 / 0.16); box-shadow: none; }
.station[data-state="done"] { border-color: var(--done); box-shadow: none; }
.station[data-state="next"] { border-color: var(--action); box-shadow: none; }
.station[data-state="next"]::after { border-color: var(--action); }
.vault__bar, .tile__bar, .seats__bar i, .chart__col::before { background: rgb(255 255 255 / 0.08); box-shadow: none; }
.vault__bar i, .tile__bar i, .seats__bar i[data-on], .chart__col[data-today] .chart__bar { background: var(--action); box-shadow: none; }
.chart__bar { background: rgb(255 255 255 / 0.22); box-shadow: none; }
.lamp[data-tone="live"] { box-shadow: none; }

/* значки-плитки и аватары: один спокойный тон вместо разноцветных */
.glyph { background: rgb(62 155 255 / 0.14); color: #6cb6ff; box-shadow: none; }
.glyph[data-off] { background: rgb(255 255 255 / 0.06); color: #7d8598; box-shadow: none; }
.ava { background: color-mix(in srgb, var(--tint) 60%, #1b1e26); box-shadow: none; text-shadow: none; }

/* мелочи без объёма */
.seg { background: rgb(255 255 255 / 0.06); box-shadow: none; }
.seg button[aria-pressed="true"] { background: rgb(255 255 255 / 0.12); box-shadow: none; }
.input { background: rgb(255 255 255 / 0.06); box-shadow: none; }
.chip { background: rgb(255 255 255 / 0.08); box-shadow: none; }
.code__chars span { background: rgb(255 255 255 / 0.07); }
.stepper .icon-btn { box-shadow: none; }
.timeline__dot { background: rgb(255 255 255 / 0.07); box-shadow: none; }
.tabs { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.07) inset, 0 12px 28px -14px rgb(0 0 0); }
.station[data-state="next"]::after { display: none; }
.stage > .btn { width: auto; }


/* ============ цвет из картинки значка, обои из своих значков, новая шторка ============ */

/* фон: свет сверху в цвет текущего значка и медленные ряды собственных значков */
body::before {
  background: radial-gradient(120% 46% at 50% -12%, color-mix(in srgb, var(--page-tint, #3e9bff) 30%, transparent) 0%, transparent 72%);
  -webkit-mask-image: none; mask-image: none;
}
.wall {
  position: fixed; inset: 0 0 auto 0; height: 88vh; z-index: -1; overflow: hidden; pointer-events: none; opacity: 0.12;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgb(0 0 0 / 0.6) 42%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgb(0 0 0 / 0.6) 42%, transparent 100%);
  animation: fade 1200ms var(--ease);
}
.wall__tilt { display: grid; gap: 22px; transform: rotate(-9deg) scale(1.3); transform-origin: 50% 40%; }
.wall__row { display: flex; gap: 24px; width: max-content; padding-right: 24px; animation: wall var(--d, 120s) linear infinite; will-change: transform; }
.wall__row:nth-child(even) { animation-direction: reverse; }
.wall__row img { width: 44px; height: 44px; flex: none; object-fit: contain; border-radius: 10px; }
@keyframes wall { to { transform: translateX(-50%); } }

/* цвет значка — глубокий, из его же картинки */
.stage__hero {
  background: radial-gradient(125% 90% at 50% 0%, color-mix(in srgb, var(--tint) 62%, #0b0c11) 0%, color-mix(in srgb, var(--tint) 26%, var(--panel)) 56%, var(--panel) 100%);
}
.gcard { background: radial-gradient(135% 92% at 50% 0%, color-mix(in srgb, var(--tint) 46%, var(--panel)) 0%, var(--panel) 80%); }
.tile { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 26%, var(--panel)), var(--panel) 72%); }
.badge { position: relative; }
.badge[data-owned="true"] { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 26%, var(--panel)), var(--panel) 78%); }
.badge[data-owned="false"] { background: var(--panel); }
.badge[data-owned="false"] .badge__art { filter: grayscale(1); opacity: 0.38; }
.badge[data-owned="false"] .badge__name { color: var(--ink-3); }
.badge__ok {
  position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; display: grid; place-items: center;
  border-radius: 50%; background: var(--done); color: #05240f;
}
.badge__ok .icon { width: 10px; height: 10px; stroke-width: 3; }
.seg--tight button { padding-inline: 4px; font-size: var(--t-sm); }

/* шторка: цветная шапка с медленными лучами, значок «вылетает», строки появляются по очереди */
.sheet__card { display: block; padding: 0; overscroll-behavior: contain; background: var(--panel); transition: transform 260ms var(--ease); }
.sheet__head {
  margin: 0; padding: 46px var(--pad) 22px; gap: 8px; touch-action: none;
  background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--tint) 66%, #0b0c11) 0%, color-mix(in srgb, var(--tint) 26%, var(--panel)) 58%, var(--panel) 100%);
}
.sheet__rays {
  position: absolute; left: 50%; top: 112px; z-index: -1; width: 640px; height: 640px; margin: -320px 0 0 -320px; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgb(255 255 255 / 0.075) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 14%, transparent 76%); mask-image: radial-gradient(closest-side, #000 14%, transparent 76%);
  animation: rays 90s linear infinite;
}
@keyframes rays { to { transform: rotate(360deg); } }
.sheet .gift { animation: reveal 780ms var(--spring) 80ms backwards; }
@keyframes reveal { from { opacity: 0; transform: perspective(640px) rotateY(-110deg) scale(0.5); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.sheet__title { margin-top: 18px; animation: rise 460ms var(--ease) 160ms backwards; }
.sheet__sub { margin: -2px 0 4px; color: color-mix(in srgb, var(--tint) 30%, #ffffff); font-size: var(--t-sm); animation: rise 460ms var(--ease) 200ms backwards; }
.pill--state {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; font-size: var(--t-sm);
  background: rgb(0 0 0 / 0.3); color: #ffffff; animation: rise 460ms var(--ease) 240ms backwards;
}
.pill--state[data-tone="done"] { background: var(--done); color: #05240f; }
.pill--state .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.pill--state .lamp { width: 8px; height: 8px; }
.sheet__body { display: grid; gap: 18px; padding: 4px var(--pad) 18px; }
.sheet__body > * { animation: rise 460ms var(--ease) backwards; }
.sheet__body > :nth-child(1) { animation-delay: 240ms; }
.sheet__body > :nth-child(2) { animation-delay: 300ms; }
.sheet__body > :nth-child(3) { animation-delay: 360ms; }
.sheet__foot { position: sticky; bottom: 0; padding: 14px var(--pad) calc(14px + var(--safe-b)); background: linear-gradient(180deg, transparent, var(--panel) 36%); }
.sheet__text--lead { font-size: var(--t-md); color: var(--ink-2); }

.stats3 { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-radius: 18px; background: rgb(255 255 255 / 0.05); }
.stats3 > div { display: grid; gap: 2px; padding: 12px 8px; text-align: center; }
.stats3 > div + div { border-left: 1px solid var(--line); }
.stats3 b { font-size: 1.0625rem; font-weight: 700; }
.stats3 span { font-size: var(--t-xs); color: var(--ink-3); }

.sheet__sec { display: grid; gap: 10px; }
.sheet__sec h3 { margin: 0; font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.path { display: grid; margin: 0; padding: 0; list-style: none; }
.path li {
  position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0;
  animation: rise 420ms var(--ease) backwards; animation-delay: calc(340ms + var(--i) * 70ms);
}
.path li + li::before { content: ""; position: absolute; left: 23px; top: -9px; width: 2px; height: 18px; border-radius: 1px; background: rgb(255 255 255 / 0.12); }
.path li[data-state="done"] + li::before { background: var(--done); }
.path__art { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / 0.06); box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.1); }
.path__img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.path__img--blank { display: grid; place-items: center; color: var(--ink-3); }
.path li[data-state="done"] .path__art { box-shadow: inset 0 0 0 2px var(--done); }
.path li[data-state="now"] .path__art { box-shadow: inset 0 0 0 2px var(--action); }
.path li[data-state="wait"] .path__img { filter: grayscale(0.9); opacity: 0.6; }
.path__main { display: grid; gap: 2px; min-width: 0; }
.path__main b { font-weight: 600; overflow-wrap: anywhere; }
.path__main > span { font-size: var(--t-sm); color: var(--ink-3); }
.path li[data-state="done"] .path__main > span { color: var(--done); }
.path__bar { display: block; height: 6px; margin-top: 5px; border-radius: 3px; background: rgb(255 255 255 / 0.09); overflow: hidden; }
.path__bar i { display: block; height: 100%; border-radius: 3px; background: var(--action); transform-origin: left; transform: scaleX(var(--f)); animation: grow 900ms var(--ease) 560ms backwards; }
@keyframes grow { from { transform: scaleX(0); } }
.path__mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink-3); }
.path__mark .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.path li[data-state="done"] .path__mark { background: var(--done); color: #05240f; animation: pop 420ms var(--spring) backwards; animation-delay: calc(500ms + var(--i) * 70ms); }
.path li[data-state="wait"] .path__mark { width: 14px; height: 14px; margin-right: 7px; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.14); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip--link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgb(255 255 255 / 0.08); color: var(--ink); font: inherit; font-size: var(--t-sm); font-weight: 600;
}
.chip--link .icon { width: 14px; height: 14px; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .wall__row, .sheet__rays, .sheet .gift, .sheet__body > *, .path li, .path__bar i { animation: none; }
}


/* ============ свой фон карточек: узор из символов, оттенок значка, цветная кромка ============ */

.gcard, .stage, .sheet__card, .tile, .badge[data-owned="true"] { --card: color-mix(in srgb, var(--tint) 11%, #14161c); }
.backdrop {
  position: absolute; z-index: -1; pointer-events: none; fill: none; stroke: none;
  color: color-mix(in srgb, var(--tint) 45%, #ffffff);
}

.gcard {
  background: radial-gradient(135% 92% at 50% 0%, color-mix(in srgb, var(--tint) 52%, #101116) 0%, var(--card) 82%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--tint) 55%, transparent), inset 0 0 0 1px rgb(255 255 255 / 0.06);
}
.gcard .backdrop { left: 50%; top: 58px; width: 250px; height: 250px; margin: -125px 0 0 -125px; }

.stage { background: var(--card); }
.stage__hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(125% 90% at 50% 0%, color-mix(in srgb, var(--tint) 64%, #0b0c11) 0%, color-mix(in srgb, var(--tint) 28%, var(--card)) 56%, var(--card) 100%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--tint) 60%, transparent);
}
.stage__hero .backdrop { left: 50%; top: 122px; width: 500px; height: 500px; margin: -250px 0 0 -250px; animation: rays 220s linear infinite; }

.sheet__card {
  background: var(--card);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--tint) 60%, transparent), 0 -20px 50px -20px rgb(0 0 0 / 0.8);
}
.sheet__head {
  background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--tint) 68%, #0b0c11) 0%, color-mix(in srgb, var(--tint) 28%, var(--card)) 58%, var(--card) 100%);
}
.sheet__head .backdrop { left: 50%; top: 112px; width: 470px; height: 470px; margin: -235px 0 0 -235px; animation: rays 180s linear infinite; }
.sheet__foot { background: linear-gradient(180deg, transparent, var(--card) 36%); }

.tile, .badge[data-owned="true"] {
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 32%, #14161c), var(--card) 76%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--tint) 45%, transparent), inset 0 0 0 1px rgb(255 255 255 / 0.05);
}

@media (prefers-reduced-motion: reduce) { .backdrop { animation: none; } }


/* ============ главная карточка: как профиль с подарком в Telegram ============ */

.art--pixel { image-rendering: pixelated; }

/* цвет: в центре, за значком, — насыщенный, к краям темнее */
.stage__hero {
  background: radial-gradient(circle 440px at 50% 122px, color-mix(in oklab, var(--tint) 80%, #0b0c11) 0%, color-mix(in oklab, var(--tint) 46%, #0b0c11) 44%, var(--card) 100%);
}
.stage__label, .stage__eta, .stage__count { color: color-mix(in srgb, var(--tint) 20%, #ffffff); opacity: 0.86; }
.stage .ring__bg { stroke: rgb(255 255 255 / 0.2); }
.stage .hint { color: color-mix(in srgb, var(--tint) 16%, #aab0c0); }

/* точка «В эфире»: маячок с расходящимися волнами */
.status__row .lamp { position: relative; width: 12px; height: 12px; margin: 0 4px 0 6px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--tone) 22%, transparent); }
.status__row .lamp::before, .status__row .lamp::after {
  content: ""; position: absolute; inset: 0; border: 0; border-radius: 50%; background: var(--tone); opacity: 0; animation: none;
}
.status__row .lamp[data-tone="live"]::before, .status__row .lamp[data-pulse]::before { animation: beacon 2.4s var(--ease) infinite; }
.status__row .lamp[data-tone="live"]::after, .status__row .lamp[data-pulse]::after { animation: beacon 2.4s var(--ease) 1.2s infinite; }
@keyframes beacon { 0% { opacity: 0.5; transform: scale(1); } 100% { opacity: 0; transform: scale(3.6); } }
.status__line { padding-left: 34px; }

/* строка «что смотрю»: диск с живыми полосками, канал, зрители, переход на стрим */
.now {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: auto;
  padding: 10px 12px 10px 10px; border: 0; border-radius: 22px; text-align: left; color: inherit; font: inherit;
  background: rgb(0 0 0 / 0.26); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); transition: transform 200ms var(--ease);
}
button.now:active { transform: scale(0.985); }
.now__disc {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--tint) 72%, #0b0c11); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
}
.now__bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.now__bars i { width: 3px; height: 100%; border-radius: 2px; background: #ffffff; transform-origin: bottom; animation: bars 1.1s ease-in-out infinite; }
.now__bars i:nth-child(2) { animation-delay: -0.35s; }
.now__bars i:nth-child(3) { animation-delay: -0.7s; }
.now__bars i:nth-child(4) { animation-delay: -0.15s; }
@keyframes bars { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.stage:not([data-live]) .now__bars i { animation: none; transform: scaleY(0.35); opacity: 0.6; }
.now__who { display: grid; gap: 1px; min-width: 0; }
.now__who b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now__who span { font-size: var(--t-sm); color: color-mix(in srgb, var(--tint) 20%, #ffffff); opacity: 0.72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now__eye {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: rgb(255 255 255 / 0.1); font-size: var(--t-sm); font-weight: 600; font-variant-numeric: tabular-nums;
}
.now__eye .icon { width: 15px; height: 15px; }
.now__go { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #ffffff; color: #0b0c11; }
.now__go .icon { width: 16px; height: 16px; stroke-width: 2.4; }

/* шкала серии: тёмный жёлоб, светлая полоса с бегущими штрихами, бегунок, значки-станции с подписями */
.track { height: 74px; margin: 14px 24px 6px 2px; }
.track::before { top: 15px; height: 14px; border-radius: 7px; background: rgb(0 0 0 / 0.3); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07); }
.track__fill {
  top: 15px; left: 0; width: var(--p); height: 14px; border-radius: 7px; overflow: hidden; transform: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 60%, #ffffff) 0%, #ffffff 100%);
  transition: width 700ms var(--ease);
}
.stage[data-live] .track__fill::after {
  content: ""; display: block; position: absolute; inset: 0 0 0 -16px; transform: none;
  background: repeating-linear-gradient(115deg, rgb(0 0 0 / 0.1) 0 7px, transparent 7px 14px);
  animation: stripes 1.3s linear infinite;
}
@keyframes stripes { to { transform: translateX(15.45px); } }
.track__head {
  position: absolute; z-index: 1; top: 12px; left: var(--p); width: 20px; height: 20px; margin-left: -10px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tint) 50%, transparent), 0 2px 6px rgb(0 0 0 / 0.4);
  transition: left 700ms var(--ease);
}
.stage[data-live] .track__head { animation: head 1.8s ease-in-out infinite; }
@keyframes head { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--tint) 22%, transparent), 0 2px 6px rgb(0 0 0 / 0.4); } }
.station {
  z-index: 2; top: 0; width: 44px; height: 44px; margin-left: -22px;
  background: color-mix(in srgb, var(--tint) 30%, #0e0f14); border: 2px solid rgb(255 255 255 / 0.22);
}
.station img { width: 30px; height: 30px; border-radius: 8px; }
.station[data-state="done"] { border-color: var(--done); }
.station[data-state="next"] { border-color: #ffffff; }
.station[data-state="ready"] { border-color: var(--standby); }
.station small {
  position: absolute; top: 50px; left: 50%; translate: -50% 0; white-space: nowrap;
  font-size: var(--t-xs); font-weight: 600; color: color-mix(in srgb, var(--tint) 20%, #ffffff); opacity: 0.7;
}
.station[data-state="next"] small { color: #ffffff; opacity: 1; }
.station__ok {
  position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; display: grid; place-items: center;
  border-radius: 50%; background: var(--done); color: #05240f; box-shadow: 0 0 0 2px var(--card);
}
.station__ok .icon { width: 10px; height: 10px; stroke-width: 3.2; }

/* кнопка сверки: в тон карточки, со значком */
.stage > .btn--quiet { gap: 8px; background: rgb(255 255 255 / 0.1); color: #ffffff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); }
.stage > .btn--quiet .icon { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .status__row .lamp::before, .status__row .lamp::after, .now__bars i, .stage[data-live] .track__fill::after, .stage[data-live] .track__head { animation: none; }
}


/* ============ ровный узор: символы стоят прямо, не вращаются и не лезут под текст ============ */

.stage__hero .backdrop, .sheet__head .backdrop { animation: none; }
.backdrop {
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 73%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 73%);
}


/* ============ «Только выбранные значки»: список с отметками, пометка на карточках ============ */

.mode > .seg { margin-top: 2px; }
.mode__text--flat { padding-left: 0; }
.mode > .btn { width: 100%; }

.sheet__title--plain { margin-top: 30px; }
.pick__tools { display: flex; justify-content: space-between; gap: 12px; }
.linkish {
  min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--action);
  font: inherit; font-size: var(--t-sm); font-weight: 600;
}
.linkish:active { opacity: 0.6; }

.picks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pick {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 10px 12px; border: 0; border-radius: var(--r-sm); text-align: left;
  color: var(--ink); font: inherit;
  background: rgb(255 255 255 / 0.05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.pick:active { transform: scale(0.985); }
.pick__art { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; filter: grayscale(0.85); opacity: 0.6; transition: filter 160ms var(--ease), opacity 160ms var(--ease); }
.pick__art.gift__art--blank, span.pick__art { display: grid; place-items: center; background: rgb(255 255 255 / 0.06); color: var(--ink-3); }
.pick__main { display: grid; gap: 2px; min-width: 0; }
.pick__main b { font-weight: 600; overflow-wrap: anywhere; }
.pick__main span { font-size: var(--t-sm); color: var(--ink-3); overflow-wrap: anywhere; }
.pick__box {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.28); color: transparent;
  transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 220ms var(--spring);
}
.pick__box .icon { width: 15px; height: 15px; stroke-width: 3; }
.pick[aria-checked="true"] {
  background: color-mix(in srgb, var(--tint) 20%, #14161c);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 46%, transparent);
}
.pick[aria-checked="true"] .pick__art { filter: none; opacity: 1; }
.pick[aria-checked="true"] .pick__box { background: var(--action); box-shadow: none; color: #ffffff; transform: scale(1.08); }

.gcard--off { filter: grayscale(0.9); opacity: 0.55; }
.gcard--off .gcard__art { animation: none; }
.ribbon[data-tone="off"] { background: rgb(255 255 255 / 0.16); color: var(--ink-2); }

.status + .btn { width: auto; justify-self: start; margin-top: -4px; }

/* привязка Twitch: подставить логин одним касанием */
.suggest {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; min-height: 44px; width: 100%;
  padding: 8px 14px; border: 0; border-radius: var(--r-sm); text-align: left;
  background: rgb(62 155 255 / 0.12); color: var(--ink); font: inherit; font-size: var(--t-sm);
}
.suggest b { color: var(--action); font-weight: 650; }
.suggest span { margin-left: auto; color: var(--ink-3); }
.suggest:active { background: rgb(62 155 255 / 0.2); }

@media (prefers-reduced-motion: reduce) { .pick, .pick__box, .pick__art { transition: none; } }


/* ============ «Режимы»: выбранные каналы и игры — списком на всю ширину ============ */

.modes .adder, .modes .mode__empty, .modes .mlist, .modes .mlist__more { margin-left: 0; }
.mlist { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mlist__row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 6px 4px 6px 10px; border-radius: var(--r-sm);
  background: rgb(255 255 255 / 0.05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.05);
}
.ava--sm { width: 34px; height: 34px; font-size: 0.9375rem; }
.mlist__game {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: rgb(62 155 255 / 0.14); color: var(--action);
}
.mlist__game .icon { width: 18px; height: 18px; }
.mlist__main { display: grid; min-width: 0; }
.mlist__main b { font-weight: 600; overflow-wrap: anywhere; }
.mlist__main span { font-size: var(--t-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.mlist__x {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: none; color: var(--ink-3);
}
.mlist__x .icon { width: 16px; height: 16px; }
.mlist__x:active { background: rgb(255 255 255 / 0.08); color: var(--ink); }
.mlist__more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--ink-3); }
.mlist__add {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 10px;
  border: 0; border-radius: 999px; background: rgb(62 155 255 / 0.12); color: var(--action);
  font: inherit; font-size: var(--t-sm); font-weight: 600;
}
.mlist__add .icon { width: 14px; height: 14px; }
.mlist__add:active { background: rgb(62 155 255 / 0.22); }
