/* ============ Жребий · дизайн-система ============ */
@font-face { font-family: "Montserrat"; src: url(/fonts/Montserrat.ttf) format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(/fonts/Manrope.ttf) format("truetype"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #0a0d18;
  --bg-2: #0f1326;
  --card: #141a2f;
  --card-2: #1b2240;
  --card-3: #232b4f;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f6f0e6;
  --muted: #9298b7;
  --faint: #5d6385;
  --accent: #ff7a3d;
  --accent-2: #ffc145;
  --accent-soft: rgba(255, 122, 61, .14);
  --mint: #3ce0b1;
  --mint-soft: rgba(60, 224, 177, .13);
  --lilac: #9b8cff;
  --lilac-soft: rgba(155, 140, 255, .14);
  --danger: #ff5a5f;
  --danger-soft: rgba(255, 90, 95, .13);
  --tg-blue: #3a8df5;
  --tg-green: #2fae5b;
  --bubble: #182236;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --r: 22px;
  --r-sm: 14px;
  --display: "Montserrat", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4efe4;
  --bg-2: #ece5d6;
  --card: #fffdf8;
  --card-2: #f6f0e4;
  --card-3: #ece4d4;
  --line: rgba(20, 23, 43, .08);
  --line-2: rgba(20, 23, 43, .16);
  --text: #15182c;
  --muted: #6b6f86;
  --faint: #a2a3b3;
  --accent: #f0612a;
  --accent-soft: rgba(240, 97, 42, .1);
  --mint: #12a37b;
  --mint-soft: rgba(18, 163, 123, .1);
  --lilac: #6b5cf0;
  --lilac-soft: rgba(107, 92, 240, .1);
  --bubble: #ffffff;
  --shadow: 0 16px 34px -20px rgba(60, 40, 10, .35);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at -10% -10%, rgba(255, 122, 61, .16), transparent 60%),
    radial-gradient(55vmax 45vmax at 110% 105%, rgba(155, 140, 255, .16), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="light"] body::before { opacity: .7; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

.app { max-width: 600px; margin: 0 auto; padding: 4px 16px calc(104px + var(--safe-b)); }
.view { animation: viewIn .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: viewIn .45s cubic-bezier(.2, .8, .2, 1) both; }
.stagger > *:nth-child(2) { animation-delay: .04s; } .stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .12s; } .stagger > *:nth-child(5) { animation-delay: .16s; }
.stagger > *:nth-child(n+6) { animation-delay: .2s; }

/* ---------- типографика ---------- */
.display { font-family: var(--display); letter-spacing: -.01em; }
.h1 { font: 800 26px/1.12 var(--display); letter-spacing: -.02em; margin: 0; }
.h2 { font: 700 19px/1.2 var(--display); letter-spacing: -.01em; margin: 0; }
.h3 { font: 700 15px/1.3 var(--display); margin: 0; }
.eyebrow { font: 800 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.gap-s { gap: 6px; } .gap-l { gap: 16px; }
.mt { margin-top: 14px; } .mt-l { margin-top: 24px; } .mb { margin-bottom: 14px; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- шапка ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 17px/1 var(--display); letter-spacing: .02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a0d05; font-size: 16px;
  box-shadow: 0 8px 18px -8px var(--accent); transform: rotate(-6deg);
}
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--card-2);
  display: grid; place-items: center; font: 700 14px var(--display); color: var(--muted); flex: none; overflow: hidden; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; border-radius: 15px; }

/* ---------- нижняя навигация ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 40;
  width: min(560px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(var(--tabs, 4), minmax(0, 1fr)); gap: 2px; align-items: stretch;
  padding: 7px; border-radius: 24px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border: 0; background: none;
  border-radius: 17px; color: var(--muted); font: 700 11px/1 var(--body); cursor: pointer; transition: .2s;
}
.tab svg { width: 22px; height: 22px; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.on { color: var(--text); background: var(--card-2); }
.tb-side { display: flex; gap: 2px; min-width: 0; }
.tb-side .tab { flex: 1 1 0; min-width: 0; }
.tab.create { color: #1a0d05; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 22px -8px rgba(255, 122, 61, .7); }
.tab.create.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border-radius: 16px; border: 1px solid transparent; background: var(--card-2); color: var(--text);
  font: 800 15px/1.1 var(--body); cursor: pointer; transition: transform .15s, filter .2s, background .2s;
  text-align: center; user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1d0e04;
  box-shadow: 0 12px 26px -14px var(--accent); }
.btn.mint { background: var(--mint); color: #04251b; }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; }
.btn.xs { min-height: 30px; padding: 0 11px; border-radius: 10px; font-size: 12.5px; }
.btn .sub { display: block; font: 700 12px var(--body); opacity: .7; margin-top: 3px; }
.btn.stack { flex-direction: column; gap: 0; min-height: 60px; }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 800; cursor: pointer; padding: 0; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; cursor: pointer; color: var(--muted); }

/* ---------- чипы ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; margin-left: -16px; margin-right: -16px;
  cursor: grab; scroll-behavior: smooth; overscroll-behavior-x: contain; }
.chips.dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.chips.dragging .chip { pointer-events: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding-inline: 0; cursor: auto; }
#filters { margin-top: 22px; }
.chip {
  flex: none; height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--text); font: 700 13.5px var(--body); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: .2s;
}
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[data-tone] { --tone: var(--text); border-color: color-mix(in srgb, var(--tone) 45%, transparent);
  background: color-mix(in srgb, var(--tone) 13%, var(--card)); color: var(--tone); }
.chip[data-tone="orange"] { --tone: var(--accent); }
.chip[data-tone="blue"] { --tone: var(--tg-blue); }
.chip[data-tone="red"] { --tone: var(--danger); }
.chip[data-tone].on { background: var(--tone); border-color: var(--tone); color: #fff; box-shadow: 0 8px 20px -10px var(--tone); }
.chip.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }

/* ---------- карточки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; position: relative; }
.card.flat { box-shadow: none; }
.card.pad-l { padding: 20px; }
.card + .card, .card + .section, .section + .card { margin-top: 12px; }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* Перфорация «билета»: пунктир + вырезы по краям */
.perf { position: relative; height: 0; border-top: 2px dashed var(--line-2); margin: 16px -16px; }
.perf::before, .perf::after {
  content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
.perf::before { left: -12px; } .perf::after { right: -12px; }
.ticket { overflow: hidden; }

/* ---------- карточка розыгрыша в каталоге ---------- */
.gw-card { padding: 0; overflow: hidden; box-shadow: var(--shadow); }
.gw-media { container-type: inline-size; position: relative; aspect-ratio: 16 / 9; background: var(--card-2); overflow: hidden; }
.gw-media img, .gw-media video { width: 100%; height: 100%; object-fit: cover; }
.gw-media .art { position: absolute; inset: 0; display: grid; place-items: center; }
.gw-media .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(5, 7, 15, .55)); }
.gw-media .over { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; gap: 8px; align-items: flex-end; }
.gw-media .top { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.gw-body { padding: 16px; }
.gw-title { font: 700 18px/1.22 var(--display); letter-spacing: -.01em; margin: 0 0 8px; overflow-wrap: anywhere; }
.gw-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.gw-meta b { color: var(--text); font-family: var(--display); font-weight: 700; }
.gw-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

/* Арт-заглушка, если нет картинки */
.art-gen { position: absolute; inset: 0; overflow: hidden; }
.art-gen .orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.art-gen .glyph { position: absolute; inset: 0; display: grid; place-items: center; font: 900 clamp(30px, 34cqw, 110px)/1 var(--display);
  color: rgba(255, 255, 255, .92); letter-spacing: -.04em; text-shadow: 0 10px 40px rgba(0, 0, 0, .35); }

/* ---------- бейджи / пилюли ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font: 800 12px/1 var(--body); background: var(--card-2); color: var(--muted); white-space: nowrap; }
.pill.glass { background: rgba(8, 10, 20, .58); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pill.active { background: var(--mint-soft); color: var(--mint); }
.pill.scheduled { background: var(--lilac-soft); color: var(--lilac); }
.pill.finished, .pill.finishing { background: var(--card-3); color: var(--muted); }
.pill.cancelled, .pill.pending { background: var(--danger-soft); color: var(--danger); }
.pill.approved { background: var(--mint-soft); color: var(--mint); }
.pill.rejected { background: var(--danger-soft); color: var(--danger); }
.pill.guarantee { background: linear-gradient(135deg, #ffd27a, var(--accent-2)); color: #2a1a00; }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 var(--mint); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(60, 224, 177, .55); } 70% { box-shadow: 0 0 0 8px rgba(60, 224, 177, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 224, 177, 0); } }

/* ---------- витрина ---------- */
.hero { padding: 22px 18px; border-radius: 26px; position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(140deg, var(--card-2), var(--card)); border: 1px solid var(--line); }
.hero .big { font: 800 52px/1 var(--display); letter-spacing: -.03em; }
.hero .eyebrow { justify-content: center; }
.hero > *:not(.ticket-deco) { position: relative; z-index: 1; }
.hero .hero-text { max-width: 330px; margin-left: auto; margin-right: auto; }
.hero .ticket-deco { position: absolute; right: -40px; top: -30px; width: 130px; height: 130px; opacity: .35; transform: rotate(14deg); }
.hero .ticket-deco.l { right: auto; left: -46px; top: auto; bottom: -40px; transform: rotate(-18deg); opacity: .22; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px dashed var(--line-2);
  color: var(--muted); font-size: 13px; }

/* ---------- обратный отсчёт ---------- */
/* ширина цифры подстраивается под контейнер: с днями (8–9 цифр) карточки уже, но всё влезает */
.countdown { display: flex; justify-content: center; align-items: center; gap: 6px; width: 100%; container-type: inline-size; --o: 52px; }
.countdown[data-days="1"] { gap: 4px; --o: 84px; }
.cd-group { display: flex; gap: 4px; }
.cd-d { --w: min(40px, calc((100cqw - var(--o)) / var(--n, 6))); --h: calc(var(--w) * 1.4); width: var(--w); height: var(--h); flex: none; border-radius: 12px; display: block; position: relative; perspective: 240px;
  border: 1px solid var(--line); box-sizing: content-box; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .6);
  font: 700 calc(var(--w) * .7)/1 var(--display); color: var(--accent-2); font-variant-numeric: tabular-nums; }
.countdown[data-days="1"] .cd-group { gap: 3px; }
@supports not (width: 1cqw) {
  .cd-d { --w: 40px; }
  .countdown[data-days="1"] .cd-d { --w: 29px; }
  @media (max-width: 380px) { .cd-d { --w: 34px; } .countdown[data-days="1"] .cd-d { --w: 25px; } }
}
.cd-d .fl { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cd-d .fl b { font: inherit; display: block; height: var(--h); line-height: var(--h); text-align: center; }
.cd-d .top, .cd-d .ftop { top: 0; border-radius: 11px 11px 0 0; background: var(--card-3); transform-origin: 50% 100%; }
.cd-d .bot, .cd-d .fbot { bottom: 0; border-radius: 0 0 11px 11px; background: var(--card-2); transform-origin: 50% 0; }
.cd-d .bot b, .cd-d .fbot b { margin-top: calc(var(--h) / -2); }
.cd-d .ftop, .cd-d .fbot { z-index: 2; visibility: hidden; }
.cd-d.flip .ftop { visibility: visible; animation: flipTop .3s cubic-bezier(.55, .05, .9, .45) forwards; }
.cd-d.flip .fbot { visibility: visible; transform: rotateX(90deg); animation: flipBot .32s .28s cubic-bezier(.2, .9, .3, 1.25) forwards; }
.cd-d::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .45); z-index: 3; }
@keyframes flipTop { from { transform: rotateX(0); filter: brightness(1); } to { transform: rotateX(-90deg); filter: brightness(.55); } }
@keyframes flipBot { from { transform: rotateX(90deg); filter: brightness(1.6); } to { transform: rotateX(0); filter: brightness(1); } }
@media (prefers-reduced-motion: reduce) { .cd-d.flip .ftop, .cd-d.flip .fbot { animation-duration: .01s; animation-delay: 0s; } }
.cd-sep { color: var(--faint); font: 700 22px var(--display); padding: 0 1px; }
.cd-unit { color: var(--muted); font: 800 13px var(--body); margin: 0 4px 0 2px; align-self: flex-end; padding-bottom: 6px; }
.cd-label { text-align: center; color: var(--muted); font-weight: 700; font-size: 13px; margin-top: 8px; }

.progress { height: 10px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s; }

/* ---------- статистика ---------- */
.stats { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 10px; }
.stats { text-align: center; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 12px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stat .v { font: 700 24px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-weight: 700; font-size: 12px; margin-top: 4px; }
.stat .d { font-size: 12px; font-weight: 800; color: var(--mint); margin-top: 2px; }
.stat.accent { background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #1d0e04; border: 0; }
.stat.accent .l { color: rgba(29, 14, 4, .7); }

/* ---------- условия ---------- */
.conds { display: flex; flex-direction: column; }
.cond { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.cond:first-child { border-top: 0; }
.cond .ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.cond .ic.wait { border: 2px dashed var(--accent); }
.cond .ic.wait::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.cond .ic.ok { background: var(--mint); color: #04251b; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.cond .ic.no { background: var(--danger-soft); color: var(--danger); border: 2px solid var(--danger); }
.cond .ic svg { width: 20px; height: 20px; }
.cond .t { font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.cond.done .t { color: var(--muted); font-weight: 700; }
.cond .h { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cond .a { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes pop { from { transform: scale(.4); } to { transform: none; } }

/* ---------- жетоны ---------- */
.tokens { display: flex; gap: 10px; overflow-x: auto; padding: 4px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.token {
  flex: none; position: relative; min-width: 120px; padding: 12px 16px 12px 22px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1d0e04;
}
.token::before { content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; border-left: 2px dashed rgba(29, 14, 4, .35); }
.token::after { content: ""; position: absolute; left: -8px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--card); }
.token .n { font: 800 22px/1 var(--display); letter-spacing: -.02em; }
.token .r { font: 800 11px var(--body); opacity: .7; text-transform: uppercase; letter-spacing: .08em; margin-top: 5px; }
.token.alt { background: linear-gradient(135deg, var(--lilac), #c7bcff); }
.token.alt2 { background: linear-gradient(135deg, var(--mint), #a7f5dd); }

/* ---------- победители ---------- */
.winner { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.winner:first-child { border-top: 0; }
.medal { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--display); flex: none;
  background: var(--card-3); color: var(--muted); }
.medal.p1 { background: linear-gradient(135deg, #ffe08a, var(--accent-2)); color: #3a2400; }
.medal.p2 { background: linear-gradient(135deg, #eef1f8, #b9c1d6); color: #22283b; }
.medal.p3 { background: linear-gradient(135deg, #f3b98d, #c97a4a); color: #3a1806; }
.winner.me { background: var(--accent-soft); border-radius: 14px; padding-inline: 10px; margin: 0 -10px; }

/* ---------- формы ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 14px; }
.label { font-weight: 800; font-size: 13px; color: var(--muted); }
.input, .textarea, select.input {
  width: 100%; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text);
  padding: 13px 14px; font: 600 15px/1.4 var(--body); outline: none; transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.hint { font-size: 12.5px; color: var(--muted); }
.counter { font-size: 12px; color: var(--faint); text-align: right; font-weight: 700; }
.counter.over { color: var(--danger); }

.switch-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row:first-child { border-top: 0; }
.switch-row .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--card-2); display: grid; place-items: center; font-size: 18px; flex: none; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--card-3); transition: .25s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .25s cubic-bezier(.3, 1.5, .5, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch input:checked + i { background: var(--mint); }
.switch input:checked + i::after { transform: translateX(20px); }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--card-2); border-radius: 14px; padding: 4px; border: 1px solid var(--line); }
.stepper button { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--card-3); font: 800 18px var(--body); cursor: pointer; }
.stepper input { width: 54px; text-align: center; border: 0; background: none; color: var(--text); font: 700 17px var(--display); outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- выбор вариантов ---------- */
.options { display: grid; gap: 10px; }
.options.two { grid-template-columns: 1fr 1fr; }
.options.three { grid-template-columns: repeat(3, 1fr); }
.opt {
  position: relative; text-align: left; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line-2);
  background: var(--card); cursor: pointer; transition: border-color .2s, background .2s, transform .15s;
}
.opt:active { transform: scale(.98); }
.opt.on { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), transparent 70%); }
.opt.on::after { content: "✓"; position: absolute; right: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #1d0e04; display: grid; place-items: center; font: 900 12px var(--body); }
.opt .e { font-size: 24px; line-height: 1; }
.opt .t { font: 700 15px/1.25 var(--display); margin-top: 10px; }
.opt .d { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.opt.center { text-align: center; }

.chat-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; border: 1.5px solid var(--line);
  background: var(--card); cursor: pointer; transition: .2s; width: 100%; text-align: left; }
.chat-item.on { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), transparent 70%); }
.chat-item .check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; }
.chat-item.on .check { background: var(--accent); border-color: var(--accent); color: #1d0e04; }

/* ---------- мастер ---------- */
.wiz-head { position: sticky; top: 0; z-index: 20; padding: 10px 0 12px; margin: -10px 0 8px;
  background: linear-gradient(var(--bg) 75%, transparent); }
.wiz-steps { display: flex; gap: 4px; margin-top: 10px; }
.wiz-steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--card-3); transition: .3s; cursor: pointer; }
.wiz-steps i.done { background: var(--accent); }
.wiz-steps i.cur { background: var(--accent-2); }
.wiz-nav { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b));
  width: min(560px, calc(100% - 24px)); display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 8px;
  border-radius: 24px; background: color-mix(in srgb, var(--card) 85%, transparent); border: 1px solid var(--line-2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow); }
body.wizard .tabbar { display: none; }
.step-title { font: 700 24px/1.15 var(--display); letter-spacing: -.02em; margin: 2px 0 6px; }
.step-sub { color: var(--muted); margin: 0 0 18px; }

.big-number { font: 800 64px/1 var(--display); letter-spacing: -.04em; text-align: center; font-variant-numeric: tabular-nums; }
.big-stepper { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 22px 0 14px; }
.big-stepper button { width: 56px; height: 56px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--card-2); font: 700 26px var(--display); cursor: pointer; }

/* ---------- превью Telegram-поста ---------- */
.tg-preview { background: var(--bg-2); border-radius: 20px; padding: 14px; border: 1px solid var(--line); }
.tg-bubble { background: var(--bubble); border-radius: 16px 16px 16px 6px; overflow: hidden; max-width: 100%;
  font: 400 15px/1.4 -apple-system, "Segoe UI", Roboto, var(--body); color: var(--text); }
.tg-bubble .media img, .tg-bubble .media video { width: 100%; max-height: 300px; object-fit: cover; }
.tg-bubble .txt { padding: 9px 12px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tg-bubble .txt a { color: #6ab3f3; }
.tg-bubble blockquote { margin: 4px 0; padding: 4px 10px; border-left: 3px solid #6ab3f3; background: rgba(106, 179, 243, .1); border-radius: 4px; }
.tg-bubble code { font-family: var(--mono); font-size: 13px; background: rgba(255, 255, 255, .08); padding: 1px 4px; border-radius: 4px; }
.tg-bubble tg-spoiler, .tg-bubble .tg-spoiler { background: var(--faint); color: transparent; border-radius: 4px; }
.tg-bubble .meta { text-align: right; font-size: 11px; color: var(--faint); padding: 0 10px 6px; }
.tg-kb { margin-top: 5px; }
.tg-btn { width: 100%; padding: 10px; border-radius: 12px; border: 0; text-align: center; font: 600 14px -apple-system, "Segoe UI", var(--body);
  background: color-mix(in srgb, var(--bubble) 75%, #8899aa); color: #fff; position: relative; transition: background .3s; }
[data-theme="light"] .tg-btn { background: rgba(80, 110, 140, .32); }
.tg-btn.primary { background: var(--tg-blue); }
.tg-btn.success { background: var(--tg-green); }
.tg-btn::after { content: "↗"; position: absolute; right: 8px; top: 4px; font-size: 10px; opacity: .8; }

.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.swatch { border-radius: 18px; border: 1.5px solid var(--line-2); padding: 14px 10px; background: var(--card); cursor: pointer; text-align: center; }
.swatch .s { height: 40px; border-radius: 12px; margin-bottom: 10px; }
.swatch.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.swatch .t { font-weight: 800; font-size: 13.5px; }

/* ---------- медиа загрузка ---------- */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed var(--line-2); border-radius: 18px; padding: 22px; text-align: center; cursor: pointer; color: var(--muted); background: var(--card); }
.drop:hover { border-color: var(--accent); }
.media-prev { position: relative; border-radius: 18px; overflow: hidden; }
.media-prev img, .media-prev video { width: 100%; max-height: 260px; object-fit: cover; }
.media-prev .x { position: absolute; right: 10px; top: 10px; }
.nft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nft { border-radius: 14px; background: var(--card-2); padding: 6px; text-align: center; font-size: 11px; font-weight: 800; }
.nft img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--card-3); }

.demo-video { border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; margin-top: 12px; }
.demo-video video { width: 100%; height: 100%; }

/* ---------- таблицы/ряды ---------- */
.rows { display: flex; flex-direction: column; }
.r { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.r:first-child { border-top: 0; }
.r .t { font-weight: 800; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.kv:first-child { border-top: 0; }
.kv .k { color: var(--muted); font-weight: 700; }
.kv .v { font-weight: 800; text-align: right; overflow-wrap: anywhere; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min-content, 1fr); padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); gap: 4px; }
.seg button { border: 0; background: none; height: 38px; border-radius: 12px; font: 800 clamp(11px, 3.3vw, 13.5px) var(--body); color: var(--muted); cursor: pointer; white-space: nowrap; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.seg button.on { background: var(--card-3); color: var(--text); }

/* ---------- графики ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 700 11px var(--body); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Lottie ---------- */
.lottie { display: inline-block; flex: none; }
.lottie svg { display: block; }
.empty .lottie { margin: 0 auto 6px; }
.art-gen .glyph .lottie { filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .35)); }
.brand-mark.anim { background: none; box-shadow: none; transform: none; width: 40px; height: 40px; }
.celebrate { text-align: center; padding: 20px 18px 22px; border-radius: 26px; background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #1d0e04; }
.celebrate .h1 { color: #1d0e04; }
.celebrate .btn { background: rgba(29, 14, 4, .12); color: #1d0e04; }
.celebrate .btn.dark { background: #1d0e04; color: #fff; }

/* ---------- состояние ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .e { font-size: 44px; margin-bottom: 10px; }
.skel { border-radius: var(--r); background: linear-gradient(100deg, var(--card) 40%, var(--card-2) 50%, var(--card) 60%) 0 0 / 300% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toast / sheet ---------- */
.toast-wrap { position: fixed; top: 10px; left: 0; right: 0; z-index: 460; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { max-width: 520px; padding: 12px 16px; border-radius: 16px; background: var(--text); color: var(--bg); font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow); animation: toastIn .35s cubic-bezier(.2, 1.4, .4, 1) both; pointer-events: auto; }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--mint); color: #04251b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.sheet-bg { position: fixed; inset: 0; z-index: 440; background: rgba(4, 6, 14, .55); animation: fade .2s both; }
.sheet { position: fixed; z-index: 441; left: 50%; bottom: 0; transform: translateX(-50%); width: min(600px, 100%); max-height: 86vh; overflow: auto;
  background: var(--bg-2); border-radius: 26px 26px 0 0; padding: 10px 16px calc(20px + var(--safe-b)); border: 1px solid var(--line-2); border-bottom: 0;
  animation: sheetIn .35s cubic-bezier(.2, .9, .2, 1) both; }
.sheet .grip { width: 40px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 0 auto 14px; }
@keyframes sheetIn { from { transform: translate(-50%, 100%); } }
@keyframes fade { from { opacity: 0; } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; }

.win-banner { text-align: center; padding: 22px; border-radius: 24px; background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #1d0e04; }
.win-banner .h1 { color: #1d0e04; }

.reveal-ball { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff 0 48%, transparent 50%), var(--c, var(--accent));
  font: 800 13px var(--display); color: #11131f; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); }

@media (max-width: 380px) {
  .h1 { font-size: 23px; }  .stats:not(.keep3) { --cols: 2 !important; }  .stats.keep3 { gap: 4px; }
  .options.three { grid-template-columns: 1fr 1fr; }
}

/* ============ v2 ============ */
.pay-amount { text-align: center; font: 800 44px/1 var(--display); margin: 16px 0 20px; letter-spacing: -.03em; }
.pay-amount .num { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* продвижение в каталоге */
.gw-card.highlight { border: 0; box-shadow: 0 0 0 2px var(--accent), 0 0 30px -8px var(--accent); animation: glowPulse 2.6s ease-in-out infinite; }
@keyframes glowPulse { 50% { box-shadow: 0 0 0 2px var(--accent-2), 0 0 44px -4px var(--accent); } }
.pill.pinned { background: var(--text); color: var(--bg); }
.pill.contest { background: linear-gradient(135deg, var(--lilac), #c7bcff); color: #1b1240; }

/* рейтинг канала */
.rate { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font: 800 12px/1 var(--body); }
.rate b { font-family: var(--display); font-weight: 700; }
.rate.excellent { background: var(--mint-soft); color: var(--mint); }
.rate.good { background: var(--lilac-soft); color: var(--lilac); }
.rate.average { background: var(--accent-soft); color: var(--accent); }
.rate.low { background: var(--danger-soft); color: var(--danger); }
.rate.new { background: var(--card-2); color: var(--muted); }
.rating-big { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--c, var(--mint)) calc(var(--p) * 1%), var(--card-3) 0); }
.rating-big > div { width: 68px; height: 68px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  font: 800 24px/1 var(--display); }

/* конкурсные работы */
.entries { display: grid; gap: 12px; }
.entry { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.entry.mine { border-color: var(--accent); }
.entry.hidden-e { opacity: .45; }
.entry .media img { width: 100%; max-height: 340px; object-fit: cover; }
.entry .body { padding: 14px; }
.entry .text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.entry .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.vote-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line-2);
  background: var(--card-2); font: 800 14px var(--body); cursor: pointer; color: var(--text); }
.vote-btn .n { font-family: var(--display); }
.vote-btn.voted { background: var(--accent); border-color: var(--accent); color: #1d0e04; }
.vote-btn[disabled] { opacity: .6; }

/* задания */
.task { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task .ic { width: 42px; height: 42px; border-radius: 14px; background: var(--card-2); display: grid; place-items: center; font-size: 20px; flex: none; }
.task.done .ic { background: var(--mint-soft); }
.dots { display: flex; gap: 4px; margin-top: 6px; }
.dots i { width: 14px; height: 6px; border-radius: 3px; background: var(--card-3); }
.dots i.on { background: var(--mint); }

/* профиль */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .avatar { width: 64px; height: 64px; font-size: 24px; border-radius: 22px; }
.balance-card { background: linear-gradient(140deg, #1d2552, #2b1f4d); color: #fff; border: 0; position: relative; overflow: hidden; }
[data-theme="light"] .balance-card { background: linear-gradient(140deg, #2a2f5c, #3d2a63); }
.balance-card .v { font: 800 40px/1 var(--display); letter-spacing: -.03em; }
.balance-card::after { content: "⭐"; position: absolute; right: -10px; top: -20px; font-size: 120px; opacity: .12; transform: rotate(14deg); }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.history-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.history-row:first-child { border-top: 0; }
.place-badge { font: 800 12px var(--body); padding: 4px 9px; border-radius: 99px; background: linear-gradient(135deg, #ffe08a, var(--accent-2)); color: #3a2400; }

/* брендинг */
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type="color"] { width: 52px; height: 44px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card-2); padding: 4px; cursor: pointer; }
.brand-preview { height: 120px; border-radius: 20px; position: relative; overflow: hidden; display: grid; place-items: center; }
.swatch-mini { display: inline-block; width: 18px; height: 18px; border-radius: 6px; vertical-align: -4px; }

/* гарантия */
.guarantee-box { border-radius: 20px; padding: 16px; background: linear-gradient(160deg, rgba(255, 193, 69, .16), transparent 70%); border: 1.5px solid rgba(255, 193, 69, .45); }
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gift-opt { border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--card); padding: 10px 4px; text-align: center; cursor: pointer; }
.gift-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.gift-opt .e { font-size: 26px; line-height: 1.1; }
.gift-opt .s { font: 800 12px var(--body); color: var(--muted); margin-top: 4px; }
.cost-row { display: flex; justify-content: space-between; padding: 6px 0; font-weight: 700; }
.cost-row.total { border-top: 1px dashed var(--line-2); margin-top: 6px; padding-top: 10px; font-size: 17px; }

/* промо-офферы */
.offers { display: grid; gap: 10px; }
.offer { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.offer .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--card-2); flex: none; }
.offer .price { font: 800 15px var(--display); white-space: nowrap; }
.offer.active { border-color: var(--mint); }
.mini-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }


/* ============ шапка: название · баланс · язык · аватар ============ */
.appbar { max-width: 600px; margin: 0 auto; padding: 10px 16px 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.appbar:empty { display: none; }
.ab-brand { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); font: 800 17px/1 var(--display); letter-spacing: .01em; }
.ab-logo { width: 34px; height: 34px; flex: none; }
.ab-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-right { display: flex; align-items: center; gap: 8px; flex: none; }
.ab-balance { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 99px; color: var(--text);
  background: var(--card); border: 1px solid var(--line-2); font: 800 13px var(--body); }
.ab-balance b { font-family: var(--display); font-weight: 700; display: inline-block; }
.ab-lang { width: 36px; height: 36px; border-radius: 50%; padding: 2px; border: 1.5px solid var(--line-2); background: var(--card);
  display: grid; place-items: center; cursor: pointer; transition: transform .2s, border-color .2s; }
.ab-lang:active { transform: scale(.92); }
.ab-lang:hover { border-color: var(--accent); }
.ab-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--card-2);
  color: var(--muted); font: 700 14px var(--display); border: 1.5px solid var(--line-2); }
.ab-avatar img { width: 100%; height: 100%; object-fit: cover; }

img.flag { display: inline-block; flex: none; border-radius: 4px; object-fit: cover; vertical-align: -3px; }
img.flag.round { border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12) inset; }
img.flag.inline { width: 1.15em; height: 1.15em; border-radius: 50%; vertical-align: -.2em; margin-right: 2px; }

/* меню выбора языка */
.lang-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(4, 6, 14, 0); transition: background .25s; }
.lang-backdrop.open { background: rgba(4, 6, 14, .35); }
.lang-menu { position: fixed; z-index: 91; top: 56px; right: max(12px, calc((100vw - 600px) / 2 + 12px)); width: 230px; padding: 8px;
  border-radius: 22px; background: color-mix(in srgb, var(--card) 92%, transparent); border: 1px solid var(--line-2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
  transform-origin: top right; transform: translateY(-8px) scale(.9); opacity: 0;
  transition: transform .28s cubic-bezier(.2, 1.3, .4, 1), opacity .2s; }
.lang-menu.open { transform: none; opacity: 1; }
.lm-title { font: 800 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 6px; }
.lm-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 14px; background: none;
  color: var(--text); font: 800 15px var(--body); cursor: pointer; text-align: left;
  opacity: 0; transform: translateX(10px); transition: background .2s, opacity .3s, transform .3s; transition-delay: 0s, calc(var(--i) * 45ms + 60ms), calc(var(--i) * 45ms + 60ms); }
.lang-menu.open .lm-item { opacity: 1; transform: none; }
.lm-item:hover { background: var(--card-2); }
.lm-item.on { background: var(--accent-soft); }
.lm-item span { flex: 1; }
.lm-item i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #1d0e04; display: grid; place-items: center; font-size: 12px; font-weight: 900; }

/* «живая» кнопка: мягкие импульсы */
.btn.pulse { position: relative; isolation: isolate; overflow: visible; animation: breathe 2.6s ease-in-out infinite; }
.btn.pulse::before, .btn.pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  animation: pulseRing 2.6s cubic-bezier(.2, .6, .3, 1) infinite; }
.btn.pulse::after { animation-delay: 1.3s; }
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 61, .5); }
  70% { box-shadow: 0 0 0 14px rgba(255, 122, 61, 0); }
  100% { box-shadow: 0 0 0 14px rgba(255, 122, 61, 0); }
}
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@media (prefers-reduced-motion: reduce) { .btn.pulse, .btn.pulse::before, .btn.pulse::after { animation: none; } }
@media (max-width: 360px) { .ab-name { display: none; } }
.ab-name.sm { font-size: 14px; }
.ab-name.xs { font-size: 12px; white-space: normal; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.btn.sm.pulse::before, .btn.sm.pulse::after { animation-name: pulseRingSm; }
@keyframes pulseRingSm { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 61, .5); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255, 122, 61, 0); } }
.tb-side .tab { padding-left: 0; padding-right: 0; font-size: 10.5px; letter-spacing: -.01em; }

/* выбор шаблона поста: сразу видно, как он выглядит */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpl-opt { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line);
  color: var(--muted); cursor: pointer; text-align: left; transition: border-color .2s, transform .15s, background .2s; min-width: 0; }
.tpl-opt:active { transform: scale(.97); }
.tpl-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.tpl-mini { position: relative; height: 112px; overflow: hidden; border-radius: 10px; padding: 7px 8px; background: var(--bubble, #182533);
  color: var(--bubble-text, var(--text)); font: 500 8.5px/1.35 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
.tpl-mini::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: linear-gradient(transparent, var(--bubble, #182533)); }
.tpl-mini a { color: #6ab3f3; }
.tpl-mini img.flag.inline { width: 9px; height: 9px; }
.tpl-name { font: 800 13px var(--body); text-align: center; white-space: nowrap; }
.pv-loading { display: inline-flex; gap: 5px; padding: 4px 0; }
.pv-loading i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; animation: pvDot 1s infinite ease-in-out; }
.pv-loading i:nth-child(2) { animation-delay: .15s; } .pv-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes pvDot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: .9; transform: translateY(-3px); } }

/* анимированные стикеры в карточках выбора */
.opt .e.anim { height: 44px; display: flex; align-items: center; }
.opt.center .e.anim { justify-content: center; height: 52px; }
.switch-row .ic .lottie { pointer-events: none; }
.btn .btn-ico { display: inline-flex; width: 30px; height: 30px; margin: -6px 0 -6px -6px; vertical-align: middle; }
.btn.block.pulse::before, .btn.block.pulse::after { animation-name: pulseRingWide; }
.btn.block.pulse { animation-name: breatheWide; }
@keyframes pulseRingWide { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 61, .45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(255, 122, 61, 0); } }
@keyframes breatheWide { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.018); } }
.step-title.with-anim { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.step-title .step-anim { margin: -8px 0; }
.win-anim { display: flex; justify-content: center; margin: -10px 0 -4px; }

/* вкладка API */
pre.code { white-space: pre; margin: 8px 0; padding: 12px; font-size: 12px; line-height: 1.45; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.api-steps { display: grid; gap: 8px; margin-top: 12px; }
.api-steps div { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 14px; }
.api-steps b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 800 13px var(--display); }
.api-res { text-align: center; padding: 8px 4px 4px; }
.api-res .e { font-size: 44px; }
.api-res p { overflow-wrap: anywhere; }

/* NFT-коллаж: целиком, без обрезки */
.gw-media img.fit { position: relative; object-fit: contain; }
.gw-media img.bg-blur { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(22px) brightness(.55) saturate(1.2); }

/* призы по местам */
.pp-box { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
.pp-count .stepper b { min-width: 40px; text-align: center; font: 700 17px var(--display); }
.pp-count .stepper button { color: var(--text); }
.pp-list { display: flex; flex-direction: column; gap: 10px; }
.pp-row { padding: 12px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .2s, border-color .2s; touch-action: pan-y; }
.pp-row.tail { border-style: dashed; }
.pp-row.dragging { position: relative; z-index: 5; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); border-color: var(--accent); transition: none; }
.pp-row.drop-target { border-color: var(--accent-2); }
.pp-head { display: flex; align-items: center; gap: 8px; }
.pp-head .link-btn { margin-left: auto; }
.pp-place { font: 800 14px var(--body); }
.pp-handle { cursor: grab; color: var(--muted); font-weight: 900; letter-spacing: -2px; padding: 4px 6px; border-radius: 8px; background: var(--card-3); touch-action: none; user-select: none; }
.pp-nft { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.pp-secret { display: flex; align-items: center; gap: 8px; }
.pp-secret.col { flex-direction: column; align-items: stretch; gap: 6px; }
.pp-secret.col > span { font-size: 12px; color: var(--muted); font-weight: 700; }
.pp-secret .input.sm { height: 38px; font-size: 13px; padding: 0 12px; }
.prize-line { margin-top: 10px; font: 800 18px var(--display); }
.secret-box { margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); text-align: left; }
.secret-box .k { font-size: 12px; font-weight: 800; opacity: .8; }
.secret-box .v { margin-top: 6px; font: 700 14px var(--mono, monospace); word-break: break-all; filter: blur(6px); cursor: pointer; transition: filter .25s; user-select: all; }
.secret-box .v.shown { filter: none; }
.prize-groups { display: flex; flex-direction: column; gap: 10px; }
.prize-groups div { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.prize-groups .pl { flex: none; min-width: 36px; height: 28px; display: grid; place-items: center; }
.prize-groups .pl.md { font-size: 22px; line-height: 1; }
.prize-groups .pl.num { padding: 0 8px; border-radius: 99px; background: var(--card-2); color: var(--muted); font-size: 12px; font-weight: 800; }
.prize-groups .nm { min-width: 0; overflow-wrap: anywhere; }
.dl { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.dl.sent { background: rgba(60, 220, 160, .15); color: #3cdca0; }
.dl.failed { background: rgba(255, 90, 90, .15); color: #ff6b6b; }
.dl.app, .dl.pending { background: var(--card-3); color: var(--muted); }
.tabbar .tab { min-width: 0; padding-left: 0; padding-right: 0; font-size: 10.5px; letter-spacing: -.01em; }
.tabbar .tab span { max-width: 100%; }
@media (max-width: 370px) { .tabbar { padding: 5px; } .tabbar .tab { font-size: 9.5px; letter-spacing: -.02em; } }

/* админка: модерация, служебные каналы, цены */
.mod-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); font: 700 14px var(--body); cursor: pointer; text-align: left; }
.mod-link b { font-family: var(--display); color: var(--muted); }
.mod-link b.hot { color: #1d0e04; background: var(--accent); padding: 1px 9px; border-radius: 99px; }
.mod-link .chev { color: var(--muted); }
.mod-card.pending { border-color: rgba(255, 170, 60, .55); }
.mod-card .quote { padding: 10px 12px; border-radius: 12px; background: var(--card-2); border-left: 3px solid var(--accent); }
.svc-ch { padding: 12px 0; border-top: 1px solid var(--line); }
.svc-ch:first-of-type { border-top: 0; padding-top: 0; }
.price-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.price-in { display: flex; align-items: center; gap: 6px; flex: none; }
.price-in input { width: 96px; text-align: right; height: 38px; }
.price-in i { font-style: normal; color: var(--muted); font-size: 12px; min-width: 26px; }
.chat-item.small-chat { opacity: .6; }

/* выбор темы ролика и музыки */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.theme-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer; text-align: left; transition: border-color .2s, transform .15s; min-width: 0; }
.theme-opt:active { transform: scale(.97); }
.theme-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.theme-opt .sw { width: 100%; height: 38px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.theme-opt b { font: 800 13px var(--body); }
.theme-opt .pr { font-size: 12px; color: var(--muted); font-weight: 700; }
.track-list { display: flex; flex-direction: column; gap: 6px; }
.track { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.track.on { border-color: var(--accent); }
.track .play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: #1d0e04; font-size: 13px; cursor: pointer; flex: none; }
.track .t { background: none; border: 0; color: var(--text); font: 700 14px var(--body); text-align: left; cursor: pointer; padding: 8px 0; }
.track i { font-style: normal; color: var(--accent); font-weight: 900; }

/* ---------- живые итоги ---------- */
.live-show { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; padding: calc(var(--tg-safe-area-inset-top, 0px) + 54px) 18px 24px; color: #fff; opacity: 0; transition: opacity .3s; overflow-y: auto; }
.live-show.on { opacity: 1; }
.live-show .ls-bg { position: fixed; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 50% 0%, #3a1d6e 0%, #120a26 55%, #07050f 100%); }
.live-show .ls-bg::after { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 38%, rgba(255,255,255,.05) 0 6deg, transparent 6deg 18deg); animation: ls-spin 30s linear infinite; }
@keyframes ls-spin { to { transform: rotate(360deg); } }
.live-show .ls-close { position: fixed; top: calc(var(--tg-safe-area-inset-top, 0px) + 12px); right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 16px; cursor: pointer; }
.live-show .ls-top { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 12px; letter-spacing: .12em; padding: 6px 12px; border-radius: 99px; background: rgba(255,60,90,.18); color: #ff8fa3; }
.live-show .ls-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 0 0 rgba(255,59,92,.7); animation: ls-pulse 1.2s infinite; }
@keyframes ls-pulse { 70% { box-shadow: 0 0 0 10px rgba(255,59,92,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,92,0); } }
.live-show .ls-title { margin-top: 12px; font-weight: 800; font-size: 20px; text-align: center; max-width: 520px; }
.live-show .ls-stage { width: 100%; max-width: 420px; margin-top: 26px; text-align: center; }
.live-show .ls-place { font-weight: 800; font-size: 18px; color: #ffd36b; margin-bottom: 12px; }
.live-show .ls-reel { position: relative; height: 192px; overflow: hidden; border-radius: 22px; background: rgba(255,255,255,.06); -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.live-show .ls-strip { will-change: transform; }
.live-show .ls-name { height: 64px; line-height: 64px; font-size: 28px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 16px; opacity: .55; }
.live-show .ls-name.hit { opacity: 1; color: #ffd36b; text-shadow: 0 0 22px rgba(255,190,70,.8); animation: ls-hit .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes ls-hit { 0% { transform: scale(.8); } 100% { transform: scale(1.12); } }
.live-show .ls-frame { position: absolute; left: 10px; right: 10px; top: 64px; height: 64px; border-radius: 16px; border: 2px solid rgba(255,211,107,.6); box-shadow: 0 0 24px rgba(255,190,70,.25) inset; pointer-events: none; transition: border-color .3s, box-shadow .3s; }
.live-show .ls-reel.won .ls-frame { border-color: #ffd36b; box-shadow: 0 0 30px rgba(255,190,70,.6), 0 0 30px rgba(255,190,70,.35) inset; }
.live-show .ls-prize { margin-top: 14px; display: inline-block; padding: 8px 16px; border-radius: 99px; font-weight: 800; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #1d0e04; animation: ls-in .4s ease both; }
.live-show .ls-you { margin-top: 10px; font-weight: 800; font-size: 18px; color: #7dffcf; animation: ls-in .4s ease both; }
@keyframes ls-in { from { opacity: 0; transform: translateY(8px); } }
.live-show .ls-list { width: 100%; max-width: 420px; margin-top: 22px; display: flex; flex-direction: column; gap: 6px; }
.live-show .ls-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.07); animation: ls-in .35s ease both; }
.live-show .ls-row.me { background: rgba(125,255,207,.16); }
.live-show .ls-row .m { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #ffd36b; color: #2a1a00; flex: none; }
.live-show .ls-row .nm { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-show .ls-row .tk { font-size: 12px; opacity: .6; font-weight: 700; }
.live-show .ls-count { padding: 30px 0; }
.live-show .ls-count .n { font-size: 120px; font-weight: 800; line-height: 1; background: linear-gradient(180deg, #fff, #ffd36b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-show .ls-count .n.pop { animation: ls-hit .35s cubic-bezier(.3,1.6,.5,1); }
.live-show .ls-count .k { margin-top: 10px; font-weight: 800; opacity: .75; }
.live-show .btn.primary { color: #1d0e04; }
.cards-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.cards-strip img { width: 62%; max-width: 260px; flex: none; border-radius: 16px; scroll-snap-align: start; aspect-ratio: 4/5; object-fit: cover; }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pack { padding: 12px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); }
.pack.max { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), var(--card) 70%); }
.pack .btn s { opacity: .55; }
.dispute .quote { padding: 8px 10px; border-radius: 12px; background: var(--card-2); font-size: 14px; }
.dispute.owner { border: 1.5px solid var(--accent); }
.note.warn { background: rgba(255, 170, 60, .12); }
.pro-lock { position: relative; overflow: hidden; }
.pro-blur { margin-top: 12px; filter: blur(5px); opacity: .7; pointer-events: none; user-select: none; }
.dispute-state { padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .14); font-weight: 800; font-size: 13px; }
.flag-bad { padding: 8px 10px; border-radius: 12px; background: rgba(255, 80, 80, .12); color: var(--danger); font-weight: 800; font-size: 13px; }
.proof { display: block; border-radius: 14px; overflow: hidden; max-height: 260px; border: 1px solid var(--line); }
.proof img { width: 100%; display: block; object-fit: cover; }
.ex-row { align-items: center; gap: 10px; }
.switch-mini { position: relative; width: 40px; height: 24px; flex: none; }
.switch-mini input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-mini i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch-mini i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch-mini input:checked + i { background: var(--mint); }
.switch-mini input:checked + i::after { transform: translateX(16px); }

.sheet .sheet-x { position: sticky; top: 0; float: right; margin: -4px -4px 0 8px; width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: var(--card-2); color: var(--muted); font-size: 14px; cursor: pointer; z-index: 2; }
.theme-opt.busy { opacity: .6; pointer-events: none; }
.opts-busy { pointer-events: none; opacity: .7; }
.lottie.emo { display: grid; place-items: center; line-height: 1; overflow: hidden; }

.gw-chan { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gw-chan .ellipsis { min-width: 0; flex: 0 1 auto; }
.gw-chan .rate, .gw-chan > :last-child { flex: none; }
.gw-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- голографический билет ---------- */
.btn.holo { position: relative; overflow: hidden; color: #10121f; font-weight: 800;
  background: linear-gradient(110deg, #ffd1f7, #b9f3ff 25%, #d4ffcf 45%, #fff3b0 65%, #ffc9d9 85%, #ffd1f7); background-size: 220% 100%; animation: holo-move 5s linear infinite; }
@keyframes holo-move { to { background-position: -220% 0; } }
.tk-overlay { position: fixed; inset: 0; z-index: 420; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 18px 24px;
  background: radial-gradient(120% 80% at 50% 10%, #2b1d5e, #0b0a18 70%); opacity: 0; transition: opacity .3s; }
.tk-overlay.on { opacity: 1; }
.tk-wrap { perspective: 900px; width: min(340px, 86vw); }
.tk { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; border-radius: 28px; padding: 14px 14px 18px; color: #fff; overflow: hidden;
  background: #12142a; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .08s linear;
  box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.08) inset; animation: tk-in .7s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes tk-in { from { transform: translateY(60px) rotateX(40deg) scale(.8); opacity: 0; } }
.tk::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from 0deg, #ff9ae6, #9ae6ff, #b8ffa1, #ffe98a, #ff9ae6); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tk-holo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55; z-index: 2;
  background: linear-gradient(115deg, transparent 20%, rgba(255,120,220,.55) 35%, rgba(120,230,255,.55) 45%, rgba(170,255,140,.5) 55%, rgba(255,230,120,.5) 65%, transparent 80%);
  background-size: 250% 250%; background-position: var(--mx) var(--my); }
.tk-sheen { position: absolute; inset: 0; pointer-events: none; z-index: 3; background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.35), transparent 45%); mix-blend-mode: overlay; }
.tk-cover { height: 150px; border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, #ff9ae6, #9ae6ff 50%, #ffe98a); }
.tk-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-art { width: 100%; height: 100%; display: grid; place-items: center; }
.tk-chan { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.tk-title { margin-top: 4px; font: 800 18px/1.25 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-cut { display: flex; align-items: center; margin: 14px -14px; }
.tk-cut i { width: 18px; height: 26px; background: radial-gradient(circle at var(--side, 0) 50%, #0b0a18 12px, transparent 13px); flex: none; }
.tk-cut i:first-child { --side: 0; } .tk-cut i:last-child { --side: 100%; }
.tk-cut b { flex: 1; border-top: 2px dashed rgba(255,255,255,.18); }
.tk-label { text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.tk-no { text-align: center; font: 800 52px/1.1 var(--display); margin-top: 4px;
  background: linear-gradient(110deg, #ffb1f0, #9ae6ff 30%, #c4ffae 55%, #ffe98a 75%, #ffb1f0); background-size: 200% 100%; background-position: var(--mx) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(160,220,255,.35)); }
.tk-info { text-align: center; font-weight: 800; font-size: 13px; color: #ffd36b; margin-top: 4px; }
.tk-bar { display: flex; justify-content: center; gap: 3px; height: 28px; margin-top: 12px; opacity: .55; }
.tk-bar i { background: #fff; height: 100%; display: block; }
.tk-hint { color: rgba(255,255,255,.55); font-size: 12px; font-weight: 700; }
.tk-actions { display: flex; gap: 8px; width: min(340px, 86vw); }

/* ---------- цели ---------- */
.goals .goal-track { position: relative; height: 10px; border-radius: 99px; background: var(--card-2); margin: 18px 14px 6px; }
.goals .goal-track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.goals .goal-pin { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-2); border: 2px solid var(--line-2, rgba(255,255,255,.15)); font-size: 12px; transition: background .3s, border-color .3s; }
.goals .goal-pin.on { background: var(--mint); border-color: var(--mint); color: #062018; }
.goals .goal-list { display: flex; flex-direction: column; gap: 6px; }
.goals .goal { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--card-2); font-weight: 700; font-size: 14px; }
.goals .goal .at { min-width: 46px; font-weight: 800; color: var(--muted); }
.goals .goal.on { background: rgba(60,224,177,.13); }
.goals .goal.on .at { color: var(--mint); }
.goals .pop { animation: goal-pop .7s cubic-bezier(.2,1.6,.4,1); }
@keyframes goal-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.goals .goal-pin.pop { animation: pin-pop .7s cubic-bezier(.2,1.6,.4,1); }
@keyframes pin-pop { 0% { transform: translate(-50%, -50%) scale(.6); } 60% { transform: translate(-50%, -50%) scale(1.35); } 100% { transform: translate(-50%, -50%) scale(1); } }

/* ---------- шанс ---------- */
.chance { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border-radius: 18px; background: var(--card-2); }
.chance .ring { --deg: 30deg; width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) 0 var(--deg), rgba(255,255,255,.08) var(--deg) 360deg); transition: --deg .6s; }
.chance .ring span { width: 44px; height: 44px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-weight: 800; font-size: 12px; }

/* ---------- живая лента ---------- */
.feed { position: relative; display: flex; flex-direction: column; gap: 6px; margin-top: 12px; min-height: 0; }
.feed-item { padding: 8px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted);
  animation: feed-in .35s cubic-bezier(.2,1.3,.4,1); transition: opacity .5s, transform .5s; }
.feed-item b { color: var(--text, #fff); }
.feed-item.out { opacity: 0; transform: translateY(-6px); }
@keyframes feed-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }

/* ---------- честность ---------- */
.seal-chip { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 8px 12px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: inherit; font: 700 13px var(--body); }
.seal-chip span { flex: 1; text-align: left; }
.seal-chip b { color: var(--muted); }
.seal-chip .fp { border-radius: 6px; }
.seal-box { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: var(--card-2); margin-bottom: 10px; }
.seal-box .fp { flex: none; border-radius: 14px; background: rgba(0,0,0,.25); padding: 4px; }
.vline { opacity: 0; animation: v-in .35s ease forwards; }
@keyframes v-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.verify-res { margin-top: 12px; padding: 12px; border-radius: 14px; text-align: center; font-weight: 800; opacity: 0; animation: v-in .4s ease forwards; }
.verify-res.ok { background: rgba(60,224,177,.15); color: var(--mint); }
.verify-res.bad { background: rgba(255,80,80,.13); color: var(--danger); }
.hall-link { margin-left: auto; text-decoration: none; font-size: 18px; padding: 2px 4px; }

/* ---------- распаковка ---------- */
.unbox { position: fixed; inset: 0; z-index: 430; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; opacity: 0; transition: opacity .3s; }
.unbox.on { opacity: 1; }
.unbox .ub-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, #3d2275, #0b0a18 70%); }
.unbox .ub-rays { position: absolute; width: 160vmax; height: 160vmax; left: 50%; top: 45%; transform: translate(-50%, -50%); opacity: 0;
  background: repeating-conic-gradient(rgba(255,214,107,.18) 0 8deg, transparent 8deg 22deg); transition: opacity .5s; animation: ls-spin 18s linear infinite; }
.unbox .ub-box { position: relative; cursor: pointer; transition: transform .4s, opacity .4s; }
.unbox.shake .ub-box { animation: ub-shake .14s ease-in-out infinite; }
@keyframes ub-shake { 0%,100% { transform: rotate(-6deg) scale(1.02); } 50% { transform: rotate(6deg) scale(1.06); } }
.unbox .ub-tap { position: relative; margin-top: 10px; font-weight: 800; opacity: .75; animation: pulse-t 1.4s ease-in-out infinite; }
@keyframes pulse-t { 50% { opacity: .35; } }
.unbox .ub-prize { position: absolute; text-align: center; padding: 0 24px; width: min(360px, 90vw); opacity: 0; transform: scale(.6); pointer-events: none; }
.unbox .ub-place { font-size: 84px; line-height: 1; }
.unbox .ub-sub { margin-top: 8px; font-weight: 800; color: #ffd36b; }
.unbox.open .ub-box { animation: none; transform: scale(2.4); opacity: 0; }
.unbox.open .ub-tap { opacity: 0; animation: none; }
.unbox.open .ub-rays { opacity: 1; }
.unbox.open .ub-prize { opacity: 1; transform: none; pointer-events: auto; transition: opacity .45s .25s, transform .6s .25s cubic-bezier(.2,1.5,.4,1); }
.unbox.open::after { content: ''; position: absolute; inset: 0; background: #fff; animation: ub-flash .6s ease forwards; pointer-events: none; }
@keyframes ub-flash { from { opacity: .9; } to { opacity: 0; } }

/* ---------- не повезло ---------- */
.luck-bonus { padding: 10px 12px; border-radius: 14px; background: rgba(255,193,69,.13); font-weight: 700; font-size: 14px; }
.luck-bonus.mb { margin-bottom: 10px; }
.luck-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.luck-next .ln { display: block; text-decoration: none; color: inherit; border-radius: 16px; background: var(--card-2); overflow: hidden; }
.luck-next .ln .m { height: 72px; overflow: hidden; position: relative; }
.luck-next .ln .m > img, .luck-next .ln .m > video, .luck-next .ln .m > .art-gen { width: 100%; height: 100%; object-fit: cover; }
.luck-next .ln .t { padding: 6px 8px 0; font-weight: 800; font-size: 12px; }
.luck-next .ln .s { padding: 0 8px 8px; }

/* ---------- зал славы ---------- */
.hall-head { text-align: center; padding: 8px 0 4px; }
.hall-head .hall-anim { display: flex; justify-content: center; }
.hall-head .avatar.sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.hall-g { text-decoration: none; color: inherit; gap: 10px; }
.hall-list { display: flex; flex-direction: column; gap: 4px; }
.hall-w { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.hall-w .nm { font-weight: 800; }
.hall-card img { width: 44px; height: 55px; object-fit: cover; border-radius: 8px; display: block; }

/* ---------- итоги года ---------- */
.wr { position: fixed; inset: 0; z-index: 300; color: #fff; overflow: hidden; display: flex; flex-direction: column; transition: background .6s; }
.wr[data-bg=a] { background: radial-gradient(120% 80% at 20% 0%, #ff7a3d, #3b1b6e 55%, #0b0a18); }
.wr[data-bg=b] { background: radial-gradient(120% 80% at 80% 10%, #7c5cff, #1b1450 55%, #0b0a18); }
.wr[data-bg=c] { background: radial-gradient(120% 80% at 50% 0%, #ffc145, #6b2a0f 55%, #0b0a18); }
.wr[data-bg=d] { background: radial-gradient(120% 80% at 10% 20%, #3ce0b1, #0e3b45 55%, #0b0a18); }
.wr[data-bg=e] { background: radial-gradient(120% 80% at 90% 0%, #ff6fb5, #431248 55%, #0b0a18); }
.wr[data-bg=final] { background: #0b0a18; }
.wr-bars { display: flex; gap: 4px; padding: calc(var(--tg-safe-area-inset-top, 0px) + 12px) 14px 0; position: relative; z-index: 3; }
.wr-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.25); overflow: hidden; position: relative; }
.wr-bars i.done { background: #fff; }
.wr-bars i.on::after { content: ''; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: wr-bar 4.2s linear forwards; }
@keyframes wr-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.wr-x { position: absolute; right: 12px; top: calc(var(--tg-safe-area-inset-top, 0px) + 24px); z-index: 4; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; }
.wr-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; z-index: 1; }
.wr-tap { position: absolute; top: 60px; bottom: 0; width: 35%; z-index: 2; }
.wr-tap.l { left: 0; } .wr-tap.r { right: 0; width: 65%; }
.wr-slide { text-align: center; animation: wr-in .6s cubic-bezier(.2,1.3,.4,1); }
@keyframes wr-in { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.wr-anim { display: flex; justify-content: center; margin-bottom: 8px; }
.wr-year, .wr-num { font: 800 110px/1 var(--display); background: linear-gradient(110deg, #ffd1f7, #b9f3ff 30%, #d4ffcf 55%, #fff3b0 75%, #ffd1f7); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: holo-move 6s linear infinite; }
.wr-num { font-size: 96px; }
.wr-label { margin-top: 10px; font: 800 26px/1.2 var(--display); }
.wr-sub { margin-top: 12px; font-weight: 700; opacity: .8; line-height: 1.5; }
.wr-final { width: min(360px, 88vw); position: relative; z-index: 3; animation: wr-in .6s cubic-bezier(.2,1.3,.4,1); }
.wr-final .wr-img { width: 100%; border-radius: 22px; display: block; margin-bottom: 14px; aspect-ratio: 9/16; object-fit: cover; max-height: 62vh; }
.wr-chats { margin-top: 16px; text-align: center; }
.wr-chats .chip { color: #fff; border-color: rgba(255,255,255,.25); }
.goals-ed .goal-row { display: grid; grid-template-columns: 26px 1fr 1fr 32px; gap: 8px; align-items: end; padding: 10px 0; border-top: 1px solid var(--line); }
.goals-ed .goal-row:first-child { border-top: 0; }
.goals-ed .gr-n { width: 26px; height: 26px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; font-weight: 800; font-size: 12px; margin-bottom: 8px; }
.goals-ed .gr-f span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.goals-ed .gr-t { grid-column: 2 / 5; }
.goals-ed .icon-btn { margin-bottom: 4px; }

.tk-overlay .ls-close { position: fixed; top: calc(var(--tg-safe-area-inset-top, 0px) + 12px); right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.12); color: #fff; font-size: 16px; cursor: pointer; z-index: 2; }
.seal-chip .fp { background: rgba(0,0,0,.25); padding: 2px; }
.nowrap { white-space: nowrap; flex-shrink: 0; }
.hall-head .hall-anim { margin-bottom: 6px; }
.note .note-anim { flex-shrink: 0; }
.ad-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ad-stats > div { background: var(--card-2); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; }
.ad-stats b { font: 800 20px var(--display); }
.ad-stats span { font-size: 12px; color: var(--muted); }

/* анимация на обложке вписывается и по ширине, и по высоте (широкие низкие рамки, свои .tgs без полей) */
.art-gen { container-type: size; }
.art-gen .glyph > .lottie { width: min(62cqw, 84cqh) !important; height: min(62cqw, 84cqh) !important; }
.drop .lottie { max-width: 100%; }
#bdirty { color: var(--accent); font-weight: 700; }
/* панель мастера: кнопка запуска сжимается и переносит текст, а не вылезает за рамку */
.wiz-nav { grid-template-columns: auto minmax(0, 1fr); }
.wiz-nav .btn { min-width: 0; padding: 0 16px; }
.wiz-nav .btn.launch { white-space: normal; line-height: 1.15; padding: 0 12px; }
.wiz-nav .btn.pulse { animation: none; }

/* кнопка «Назад» в шапке на всех вложенных экранах */
.ab-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ab-back { flex: none; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card);
  color: var(--text); display: grid; place-items: center; cursor: pointer; font: 800 18px/1 var(--body); padding: 0; }
.ab-back svg { width: 20px; height: 20px; }
.ab-back:active { transform: scale(.94); }
@media (max-width: 440px) { .ab-left:has(.ab-back) .ab-name { display: none; } }
.dot-live.off { background: var(--faint); box-shadow: none; animation: none; }

/* технические работы */
.maint { min-height: 78vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 26px; }
.maint .h1 { font: 800 26px/1.15 var(--display); }
.maint p { max-width: 380px; line-height: 1.45; }
.maint-anim { filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .35)); }
.maint-dots { display: flex; gap: 8px; margin-top: 18px; }
.maint-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: maintDot 1.2s ease-in-out infinite; }
.maint-dots i:nth-child(2) { animation-delay: .2s; } .maint-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes maintDot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
.maint-bar { position: sticky; top: 0; z-index: 60; display: block; text-align: center; padding: 8px 12px; font: 700 13px/1.3 var(--body);
  background: linear-gradient(90deg, #ff7a3d, #ffc145); color: #1d0e04; }
.maint-card.on { border: 1px solid #ffb35c; box-shadow: 0 0 0 3px rgba(255, 160, 70, .18); }
.btn-pair > .btn { min-width: 0; padding: 0 12px; white-space: normal; line-height: 1.15; }
.test-card.on { border: 1px solid #9b8cff; box-shadow: 0 0 0 3px rgba(155, 140, 255, .18); }

/* пояснение к условию «приведи друга» */
.ref-note { margin: 12px 0 0 -54px; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--card-2); font-size: 13px; line-height: 1.4; color: var(--muted); }
.ref-note .rn-t { font-weight: 800; color: var(--text); margin-bottom: 6px; font-size: 13px; }
.ref-note .rn-i { position: relative; padding-left: 16px; margin-top: 5px; }
.ref-note .rn-i::before { content: ""; position: absolute; left: 2px; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.ref-note .rn-i.wait::before { background: var(--accent); }
.ref-note .rn-i.no::before { background: var(--danger); }
.tk-hint { text-align: center; max-width: 420px; }
