/* Signal Duel — экраны участника (редизайн 20.11.2026). Админка — duel.css, строгая.
   Сначала телефон, потом компьютер (min-width). Светлая гамма всегда — тёмной темы нет. */
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/static/fonts/rubik-cyrillic-wght-normal.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: 300 900; font-display: swap;
  src: url(/static/fonts/rubik-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
                 U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url(/static/fonts/nunito-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url(/static/fonts/nunito-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
                 U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --bg: #fff8ec; --ink: #2b2140; --muted: #6b6280; --card: #ffffff; --line: #efe7dc;
  --teal: #14b8a6; --teal-d: #0d9488; --teal-l: #e6fbf7;
  --orange: #fb923c; --orange-d: #ea580c; --orange-l: #fff1e6;
  --yellow: #facc15; --yellow-l: #fff7d1;
  --violet: #8b5cf6; --violet-d: #6d28d9; --violet-l: #f3efff;
  --win: #16a34a; --win-l: #dcfce7; --lose: #c2410c; --lose-l: #ffedd5;
  --shadow: 0 4px 0 rgba(43, 33, 64, .07), 0 10px 24px rgba(43, 33, 64, .07);
  --head: "Rubik", "Segoe UI", system-ui, sans-serif;
  --text: "Nunito", "Segoe UI", system-ui, sans-serif;
  /* для графика (duel.js читает эти имена) */
  --fg: #2b2140; --up: #14b8a6; --down: #fb923c; --bot: #8b5cf6; --accent: #2b2140;
}
* { box-sizing: border-box; }
/* атрибут hidden сильнее стилей кнопок: «Скопировать», «Поделиться», динамик ждут свой скрипт */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background-color: var(--bg);
  background-image: radial-gradient(circle at 0 0, #dcfaf4 0, rgba(220, 250, 244, 0) 340px),
                    radial-gradient(circle at 100% 120px, #f1e8ff 0, rgba(241, 232, 255, 0) 300px);
  background-repeat: no-repeat; font: 16px/1.5 var(--text); }
body.has-tabs { padding-bottom: 92px; }
h1, h2, h3, .num, .brand, button, .button { font-family: var(--head); }
h1 { font-size: 28px; line-height: 1.15; margin: 8px 0 8px; font-weight: 800; }
h2 { font-size: 20px; line-height: 1.2; margin: 22px 0 10px; font-weight: 800; }
h3 { font-size: 18px; margin: 0 0 6px; font-weight: 700; }
a { color: var(--violet-d); text-underline-offset: 2px; }
.muted { color: var(--muted); }
small { font-size: 13px; }
main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 16px; }
img { max-width: 100%; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -4px; }

/* верх: логотип, кто я, выйти */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; max-width: 1120px; margin: 0 auto; }
.brand { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -.2px; }
.brand span { color: var(--teal); }
.brand .beta { font: 700 11px var(--text); color: var(--violet-d); background: var(--violet-l);
  border-radius: 999px; padding: 2px 8px; margin-left: 4px; vertical-align: 3px; }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who .link { white-space: nowrap; }    /* «Log out» не ломается на две строки */
.who .nick { font-weight: 800; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-flex; align-items: center;
  justify-content: center; color: #fff; font: 800 16px var(--head);
  background: linear-gradient(135deg, var(--teal), var(--violet)); box-shadow: 0 3px 0 rgba(43, 33, 64, .12); }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 4px 2px; color: var(--muted); font: 700 14px var(--text);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; box-shadow: none; min-height: 0; }

/* вкладки: на телефоне — снизу под пальцем, на компьютере — в шапке */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around;
  gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: #fff;
  box-shadow: 0 -6px 20px rgba(43, 33, 64, .08); border-radius: 22px 22px 0 0; }
.tabbar a { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; border-radius: 14px; color: var(--muted); text-decoration: none; font: 700 12px var(--text); }
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a.on { color: var(--violet-d); background: var(--violet-l); }

/* счёт и точность */
.stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.wallet { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow-l); border-radius: 999px;
  padding: 4px 14px 4px 6px; box-shadow: inset 0 0 0 2px #fde68a; }
.wallet .ic { width: 28px; height: 28px; }
.wallet .lbl { font: 700 12px var(--text); color: #92400e; }
.wallet .num { font-weight: 800; font-size: 22px; line-height: 1.1; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 12px;
  font-weight: 700; font-size: 14px; background: var(--teal-l); }
.pill.fire { background: var(--orange-l); }
.pill.violet { background: var(--violet-l); }

/* карточки, кнопки, поля */
.card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; }
.button, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 10px 20px; border: 0; border-radius: 16px; cursor: pointer; text-decoration: none;
  font-weight: 800; font-size: 17px; color: #fff; background: var(--violet); box-shadow: 0 4px 0 var(--violet-d); }
.button:active, button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--violet-d); }
button.danger { background: var(--orange); box-shadow: 0 4px 0 var(--orange-d); }
input[type=text], textarea, select { font: 16px var(--text); color: var(--ink); background: #fff; border: 0;
  border-radius: 14px; padding: 10px 12px; box-shadow: inset 0 0 0 2px var(--line); }
input[type=text]:focus, textarea:focus, select:focus { outline: 0; box-shadow: inset 0 0 0 3px var(--violet); }
textarea { width: 100%; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.error { color: var(--lose); font-weight: 700; }

/* таблицы (до переделки остальных экранов) */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 2px solid #f6f1ea; vertical-align: top; }
th { font: 700 13px var(--text); color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr.me td { background: var(--teal-l); }
.tag { font-size: 12px; font-weight: 700; color: var(--violet-d); background: var(--violet-l); border-radius: 999px;
  padding: 1px 8px; }

/* экран сигнала */
.botline { display: flex; align-items: center; gap: 12px; margin: 2px 0 12px; }
.av { width: 56px; height: 56px; border-radius: 50%; flex: none; display: block;
  box-shadow: 0 3px 0 rgba(43, 33, 64, .12); background: #fff; }
.botline .kicker { display: block; font: 800 12px var(--text); text-transform: uppercase; letter-spacing: .6px;
  color: var(--orange-d); }
.botline h1 { margin: 0; font-size: 24px; }
.botline h1 .real { font: 700 14px var(--text); color: var(--muted); }
.botline .sym { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; }
.tfs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.tfs .tf { min-height: 36px; padding: 4px 14px; border-radius: 12px; font-size: 15px; color: var(--ink);
  background: var(--violet-l); box-shadow: none; }
.tfs .tf.on { background: var(--violet); color: #fff; }
.chart { width: 100%; height: 250px; border-radius: 18px; background: #fff; overflow: hidden;
  box-shadow: inset 0 0 0 2px var(--line); margin: 0 0 6px; }
.chart-note { font-size: 14px; color: var(--muted); margin: 6px 2px 2px; }
.credit { font-size: 12px; color: var(--muted); margin: 0 2px 8px; }
.credit a { color: var(--muted); }

.answer { margin: 6px 0 0; }
.answer fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.answer fieldset:disabled { opacity: .4; }
.q { font: 800 19px var(--head); padding: 0; margin: 0 0 8px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt > span { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease; }
.opt input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ans > span { min-height: 66px; border-radius: 20px; font: 800 21px var(--head); background: #fff; }
.ans .ic { width: 24px; height: 24px; }
.ans-buy > span { color: var(--teal-d); box-shadow: inset 0 0 0 3px #99f0e2, 0 5px 0 #99f0e2; }
.ans-sell > span { color: var(--orange-d); box-shadow: inset 0 0 0 3px #fed7aa, 0 5px 0 #fed7aa; }
.ans-skip { grid-column: 1 / -1; }
.ans-skip > span { min-height: 54px; font-size: 18px; color: var(--violet-d); box-shadow: inset 0 0 0 3px #ddd6fe, 0 5px 0 #ddd6fe; }
.ans-buy input:checked + span { background: var(--teal); color: #fff; box-shadow: 0 5px 0 var(--teal-d); }
.ans-sell input:checked + span { background: var(--orange); color: #fff; box-shadow: 0 5px 0 var(--orange-d); }
.ans-skip input:checked + span { background: var(--violet); color: #fff; box-shadow: 0 5px 0 var(--violet-d); }
.ans input:checked + span { transform: translateY(2px); }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip > span { min-height: 52px; border-radius: 16px; font-weight: 800; font-size: 15px; line-height: 1.15;
  background: var(--violet-l); padding: 4px; }
.chip input:checked + span { background: #ede9fe; box-shadow: inset 0 0 0 3px var(--violet); color: var(--violet-d); }
.confs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.conf > span { flex-direction: column; gap: 0; min-height: 86px; border-radius: 18px; padding: 8px 4px;
  background: #fffbeb; box-shadow: inset 0 0 0 2px #fde68a; }
.conf .stars { display: flex; gap: 1px; color: #f59e0b; min-height: 20px; }
.conf .stars .ic { width: 18px; height: 18px; }
.conf b { font: 800 16px var(--head); }
.conf small { color: var(--muted); font-weight: 700; }
.conf input:checked + span { background: #fef3c7; box-shadow: inset 0 0 0 3px #f59e0b, 0 4px 0 #fcd34d; transform: translateY(-2px); }
button.go { width: 100%; min-height: 62px; border-radius: 20px; font-size: 22px; margin-top: 4px;
  background: linear-gradient(90deg, var(--teal), var(--violet)); box-shadow: 0 5px 0 var(--violet-d); }

.hints { margin: 18px 0 0; }
.hints h2 { margin: 0 0 8px; font-size: 17px; }
.hint-list { display: grid; gap: 10px; grid-template-columns: 1fr; }
.hint { background: var(--violet-l); border-radius: 18px; padding: 12px 14px; }
.hint strong { display: block; font: 800 16px var(--head); }
.hint p, .hint ul { margin: 4px 0 0; font-size: 15px; }
.hint ul { padding-left: 18px; }
.hint .buy-hint { margin-top: 8px; min-height: 42px; font-size: 15px; padding: 6px 14px; border-radius: 14px; }
.hint .buy-hint .ic { width: 16px; height: 16px; }
.hint .none { color: var(--muted); font-size: 14px; }

/* итог раунда: сначала ход бота, потом твой итог (step-1 → step-2 → step-3) */
.ic-big { width: 52px; height: 52px; }
.reveal > * { margin: 0 0 12px; }
.kicker { display: block; font: 800 12px var(--text); text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.botmove { display: flex; align-items: flex-start; gap: 12px; background: #fff; border-radius: 22px;
  padding: 14px; box-shadow: var(--shadow); }
.botmove .av { width: 52px; height: 52px; }
.bm-body { flex: 1; min-width: 0; }
.botmove .kicker { color: var(--violet-d); }
.botmove h2 { margin: 0 0 6px; font-size: 19px; }
.botmove h2 .real { font: 700 13px var(--text); color: var(--muted); }
.pts { font-size: 20px; font-weight: 800; white-space: nowrap; }
.pts.up { color: var(--win); }
.pts.down { color: var(--lose); }
.moves { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.move { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 12px 3px 8px;
  font: 800 15px var(--head); color: #fff; background: var(--violet); }
.move .ic { width: 18px; height: 18px; }
.move-buy { background: var(--teal); }
.move-sell { background: var(--orange); }
.move-meta { display: inline-flex; align-items: center; gap: 1px; border-radius: 999px; padding: 3px 10px;
  font-weight: 700; font-size: 14px; background: var(--violet-l); }
.move-meta .ic { width: 14px; height: 14px; color: #f59e0b; }
.move-meta .ic + .ic { margin-left: -1px; }
.exit { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.35; }
.verdict { border-radius: 24px; padding: 16px; box-shadow: var(--shadow); background: #fff; }
.is-win .verdict { background: var(--win-l); box-shadow: inset 0 0 0 3px #86efac, 0 6px 0 #86efac; }
.is-lose .verdict { background: var(--lose-l); box-shadow: inset 0 0 0 3px #fdba74, 0 6px 0 #fdba74; }
.v-head { display: flex; align-items: center; gap: 12px; }
.v-title { flex: 1; min-width: 0; }
.v-title h1 { margin: 0; font-size: 26px; white-space: nowrap; }
.is-win .v-title h1, .is-win .v-pts { color: var(--win); }
.is-lose .v-title h1, .is-lose .v-pts { color: var(--lose); }
.v-pts { font-size: 30px; font-weight: 900; line-height: 1; white-space: nowrap; }
.verdict .ic-big { width: 46px; height: 46px; }
.cheer { margin: 8px 0 10px; font: 800 17px var(--head); }
.moves.mine .me-av { width: 28px; height: 28px; font-size: 13px; }
.round { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 10px 14px;
  box-shadow: var(--shadow); font-size: 15px; line-height: 1.35; }
.round .ic { width: 26px; height: 26px; color: var(--violet); }
.badge-new { display: flex; align-items: center; gap: 10px; background: var(--yellow-l); border-radius: 18px;
  padding: 10px 14px; box-shadow: inset 0 0 0 2px #fde68a; font-size: 15px; line-height: 1.35; }
.badge-new .ic { width: 34px; height: 34px; }
.badge-new b { display: block; font-family: var(--head); }
a.go { width: 100%; min-height: 62px; border-radius: 20px; font-size: 21px;
  background: linear-gradient(90deg, var(--teal), var(--violet)); box-shadow: 0 5px 0 var(--violet-d); }
.after h2 { margin: 0 0 10px; }
.key { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.key::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bot); }
.key-me::before { background: var(--accent); }
/* проявление: цифры уже в разметке, анимация лишь показывает их по очереди (≤ 1,1 с) */
.step-1 { animation: pop .45s ease-out backwards; }
.step-2 { animation: pop .5s ease-out .55s backwards; }
.step-3 { animation: rise .4s ease-out .95s backwards; }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wallet { position: relative; }
.wallet.bump { animation: bump .5s ease-out; }
@keyframes bump { 40% { transform: scale(1.08); } }
.delta { position: absolute; right: 8px; top: -18px; font: 900 15px var(--head); pointer-events: none;
  animation: float 1.6s ease-out forwards; }
.delta.up { color: var(--win); }
.delta.down { color: var(--lose); }
@keyframes float { from { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; }
  to { opacity: 0; transform: translateY(-22px); } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* общие куски списков: лидеры, дуэли, профиль */
.narrow { max-width: 820px; margin: 0 auto; }
.page-head h1 .ic { width: 30px; height: 30px; margin-right: 8px; color: var(--violet); vertical-align: -5px; }
.lead { color: var(--muted); margin: 0 0 12px; }
.small-print { font-size: 13px; margin: 12px 2px 0; }
.tag.you { color: var(--teal-d); background: #fff; box-shadow: inset 0 0 0 2px #99f0e2; }
.lb-place { width: 34px; flex: none; display: flex; justify-content: center; }
.medal { width: 32px; height: 32px; display: block; }
.rank-n { font: 800 17px var(--head); color: var(--muted); }
.lb-score { font-size: 18px; font-weight: 800; white-space: nowrap; }
.hue0 { background: linear-gradient(135deg, var(--teal), var(--violet)); }
.hue1 { background: linear-gradient(135deg, var(--orange), #f472b6); }
.hue2 { background: linear-gradient(135deg, #facc15, var(--orange)); }
.hue3 { background: linear-gradient(135deg, var(--violet), #f472b6); }
.empty-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 20px; text-align: center; }
.empty-card .ic { width: 44px; height: 44px; color: var(--yellow); }

/* лидеры */
.season-pick { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.season-pick label { font-weight: 800; }
.season-pick select { flex: 1; min-width: 0; min-height: 48px; }
.season-pick button { min-height: 48px; padding: 8px 16px; font-size: 16px; }
.my-place { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 6px 14px;
  border-radius: 999px; background: var(--teal-l); font-size: 15px; }
ol.lb { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px;
        grid-template-columns: minmax(0, 1fr); }   /* длинный ник со званием не растягивает строку */
.lb li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 10px 12px;
  box-shadow: var(--shadow); }
.lb li.me { background: var(--teal-l); box-shadow: inset 0 0 0 3px var(--teal), var(--shadow); }
.lb .av, .lb .me-av { width: 44px; height: 44px; font-size: 18px; }
.lb-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.lb-name { font: 800 16px var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-who small { color: var(--muted); font-weight: 700; }
.lb-who small .tag { font-size: 11px; }
.nw { white-space: nowrap; }

/* дуэли: список и экран «вызов» */
.duel-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.duel-item { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 10px 12px;
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.duel-item .av { width: 48px; height: 48px; }
.di-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.di-name { font: 800 17px var(--head); }
.di-score { font-size: 14px; color: var(--muted); }
.di-score b { color: var(--ink); }
.state { font: 800 13px var(--text); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.st-lead .state { background: var(--win-l); color: var(--win); }
.st-behind .state { background: var(--lose-l); color: var(--lose); }
.st-tie .state { background: var(--violet-l); color: var(--violet-d); }
.st-new .state { background: var(--yellow-l); color: #92400e; }
.st-new .di-score { font-style: italic; }
.versus { background: linear-gradient(135deg, var(--teal-l), var(--violet-l)); border-radius: 26px; padding: 14px;
  box-shadow: var(--shadow); text-align: center; margin: 4px 0 8px; }
.versus .kicker { color: var(--orange-d); }
.vs-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 8px;
  margin: 18px 0 10px; }
.vs-side { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
  background: #fff; border-radius: 20px; padding: 16px 6px 10px; }
.vs-side.lead { box-shadow: inset 0 0 0 3px var(--yellow), 0 5px 0 #fde68a; }
.crown { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); }
.crown .ic { width: 32px; height: 32px; }
.me-av.big, .av.big { width: 72px; height: 72px; font-size: 30px; }
.vs-side b { font: 800 17px var(--head); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-pts { font-size: 26px; font-weight: 900; line-height: 1.1; }
.vs-side small { color: var(--muted); font-weight: 700; font-size: 12.5px; line-height: 1.3; }
.vs-mid { align-self: center; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font: 900 18px var(--head); color: #fff; background: var(--orange);
  box-shadow: 0 4px 0 var(--orange-d); transform: rotate(-8deg); }
.vs-verdict { font-size: 17px; margin: 6px 0 4px; }
.vs-about { font-size: 13px; color: var(--muted); margin: 0; }
.hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hist a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; background: #fff; border-radius: 18px;
  padding: 10px 14px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.h-when { grid-column: 1; grid-row: 1; font-size: 13px; color: var(--muted); font-weight: 700; }
.h-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.h-who { width: 34px; font-weight: 800; font-size: 14px; color: var(--muted); }
.h-row .pts { font-size: 16px; margin-left: auto; }
.h-go { grid-column: 2; grid-row: 1; align-self: center; display: inline-flex; align-items: center; gap: 2px;
  font-weight: 800; font-size: 14px; color: var(--violet-d); }
.h-go .ic { width: 16px; height: 16px; }
.alias { margin-top: 22px; }
.alias h2 { margin: 0 0 4px; font-size: 18px; }
.alias-form { display: flex; gap: 8px; }
.alias-form input { flex: 1; min-width: 0; min-height: 48px; }

/* профиль */
.hero { display: flex; align-items: center; gap: 14px; margin: 2px 0 12px; }
.hero h1 { margin: 0; overflow-wrap: anywhere; }
.hero .lead { margin: 0; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: #fff; border-radius: 20px; padding: 12px 14px; box-shadow: var(--shadow); display: flex;
  flex-direction: column; min-width: 0; }
.tile.teal { background: var(--teal-l); }
.tile.fire { grid-column: 1 / -1; background: var(--orange-l); flex-direction: row; align-items: center; gap: 10px; }
.tile.fire .ic { width: 34px; height: 34px; }
.t-num { font-size: 28px; font-weight: 900; line-height: 1.1; }
.t-lbl { font-size: 13.5px; color: var(--muted); font-weight: 700; line-height: 1.3; }
ul.badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.badges li { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 10px 14px; font-size: 14.5px;
  line-height: 1.35; }
.badges li b { display: block; font: 800 16px var(--head); }
.badges li small { display: block; color: var(--muted); font-weight: 700; }
.badges li.got { background: var(--yellow-l); box-shadow: inset 0 0 0 2px #fde68a; }
.badges li.locked { background: #f6f1ea; color: var(--muted); }
.badges li.locked b { color: var(--ink); opacity: .6; }
.badges .ic { width: 34px; height: 34px; }
.badges li.locked .ic { color: #c4bbd3; width: 26px; height: 26px; margin: 4px; }
.seasons { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.seasons li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 10px 12px;
  box-shadow: var(--shadow); }
.seasons li.now { box-shadow: inset 0 0 0 3px var(--teal), var(--shadow); }
.s-body { flex: 1; min-width: 0; line-height: 1.3; }
.s-body small { display: block; color: var(--muted); font-weight: 700; }

/* вход, знакомство, ожидание, листки сообщений */
.welcome-hero { text-align: center; background: linear-gradient(160deg, #fff 0%, var(--teal-l) 55%, var(--violet-l) 100%);
  border-radius: 28px; box-shadow: var(--shadow); padding: 22px 18px 18px; margin: 4px 0 8px; }
.welcome-hero h1 { font-size: 32px; margin: 12px 0 8px; }
.welcome-hero .lead { font-size: 17px; color: var(--ink); }
.welcome-hero .go { width: 100%; max-width: 380px; }
.faces { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; }
.faces .av { width: 52px; height: 52px; }
.faces .vs-mid { margin: 0 2px; width: 40px; height: 40px; font-size: 15px; }
.faces .me-av.big { width: 56px; height: 56px; font-size: 26px; }
.welcome-hero .faces { flex-wrap: nowrap; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.steps li { display: flex; align-items: flex-start; gap: 12px; background: #fff; border-radius: 18px; padding: 12px 14px;
  box-shadow: var(--shadow); line-height: 1.35; }
.steps b { display: block; font: 800 17px var(--head); }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 900 17px var(--head); color: #fff; background: var(--violet); box-shadow: 0 3px 0 var(--violet-d); }
.steps li:nth-child(2) .step-n { background: var(--teal); box-shadow: 0 3px 0 var(--teal-d); }
.steps li:nth-child(3) .step-n { background: var(--orange); box-shadow: 0 3px 0 var(--orange-d); }
.perks { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.perks li { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow-l); border-radius: 999px;
  padding: 6px 12px; font-weight: 700; font-size: 14px; }
.perks .ic { color: var(--violet); }
ol.rules { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
ol.rules li { display: flex; align-items: flex-start; gap: 12px; background: #fff; border-radius: 18px; padding: 12px 14px;
  box-shadow: var(--shadow); line-height: 1.45; }
ol.rules li > .ic { width: 26px; height: 26px; flex: none; color: var(--violet); margin-top: 1px; }
ol.rules li:last-child { background: var(--teal-l); }
ol.rules li:last-child > .ic { color: var(--teal-d); }
.join { display: flex; flex-direction: column; gap: 8px; }
.join .q { margin: 0; }
.hint-line { margin: -4px 0 4px; font-size: 14px; }
.join input[type=text] { min-height: 52px; font-size: 18px; }
.agree { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; margin: 6px 0; }
.agree input { width: 26px; height: 26px; flex: none; accent-color: var(--violet); margin: 0; }
.join .go { margin-top: 4px; }
.sheet { background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 20px 18px; margin: 6px 0 8px; }
.sheet.center { text-align: center; }
.sheet h1 { font-size: 28px; }
.sheet-ic { display: inline-block; }
.sheet-ic .ic-big { width: 72px; height: 72px; }
.sheet .lead { color: var(--ink); font-size: 17px; }
.sheet .faces { margin-top: 6px; }
.waiting-for { font-weight: 800; margin: 14px 0 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 0; }
.actions.center { justify-content: center; }
.button.ghost { background: #fff; color: var(--violet-d); box-shadow: inset 0 0 0 2px #ddd6fe, 0 4px 0 #ddd6fe; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheet-head h1 { margin: 0; font-size: 25px; }
.fb-ic { width: 52px; height: 52px; flex: none; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: var(--yellow-l); box-shadow: inset 0 0 0 2px #fde68a; }
.fb-ic .ic { width: 30px; height: 30px; }
.fb-bug { background: var(--violet-l); box-shadow: inset 0 0 0 2px #ddd6fe; color: var(--violet); }
.fb-form .q { display: block; }
.fb-form textarea { min-height: 170px; }
.prose h2 { font-size: 19px; margin: 18px 0 6px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 4px; }

/* уровни: полоска в шапке, стрелка уровня 1, подбадривание, новый уровень */
.lvl { flex: 1 1 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px;
  padding: 7px 12px; border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--line); }
.lvl-head { font-size: 14px; white-space: nowrap; }
.lvl-head b { font-family: var(--head); color: var(--violet-d); }
.lvl progress { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border: 0; border-radius: 999px;
  background: #efe7dc; overflow: hidden; }
.lvl progress::-webkit-progress-bar { background: #efe7dc; border-radius: 999px; }
.lvl progress::-webkit-progress-value { background: linear-gradient(90deg, var(--teal), var(--violet)); border-radius: 999px; }
.lvl progress::-moz-progress-bar { background: linear-gradient(90deg, var(--teal), var(--violet)); border-radius: 999px; }
.lvl small { grid-column: 1 / -1; color: var(--muted); font-weight: 700; font-size: 12.5px; line-height: 1.3; }
.lvl-3 { background: var(--yellow-l); box-shadow: inset 0 0 0 2px #fde68a; }
.trend { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  min-height: 210px; border-radius: 22px; padding: 18px 14px; margin: 0 0 8px; background: #fff;
  box-shadow: inset 0 0 0 2px var(--line); }
.trend .ic-trend { width: 120px; height: 120px; }
.trend-up .ic-trend { color: var(--teal); }
.trend-down .ic-trend { color: var(--orange); }
.trend-flat .ic-trend { color: var(--violet); }
.trend-up { background: var(--teal-l); box-shadow: inset 0 0 0 2px #99f0e2; }
.trend-down { background: var(--orange-l); box-shadow: inset 0 0 0 2px #fed7aa; }
.trend-flat { background: var(--violet-l); box-shadow: inset 0 0 0 2px #ddd6fe; }
.trend-text { margin: 0; font: 800 19px/1.3 var(--head); }
.coach { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 4px; padding: 10px 12px; border-radius: 16px;
  background: var(--yellow-l); font-weight: 700; font-size: 15px; line-height: 1.4; }
.coach .ic { margin-top: 1px; }
.level-1 .ans > span { min-height: 84px; font-size: 24px; }
.level-1 .ans .ic { width: 28px; height: 28px; }
.levelup { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px;
  background: linear-gradient(120deg, var(--yellow-l), var(--violet-l)); box-shadow: inset 0 0 0 2px #fde68a, var(--shadow); }
.levelup b { display: block; font: 800 18px var(--head); }
.lu-n { flex: none; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 900 24px var(--head); color: #fff; background: linear-gradient(135deg, var(--teal), var(--violet));
  box-shadow: 0 4px 0 var(--violet-d); }
.chart.unveil { animation: unveil 1.3s ease-out both; }
@keyframes unveil { from { clip-path: inset(0 100% 0 0); opacity: .3; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

/* обучение: пробная партия, «Сначала попробуй», облачка, простой итог */
.practice-tag { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 2px 0 12px; padding: 8px 12px;
  border-radius: 16px; background: var(--violet-l); font-size: 14px; }
.practice-tag .ic { color: #f59e0b; }
.practice-tag span { color: var(--muted); font-weight: 700; margin-left: auto; }
.practice-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 14px 2px 0;
  font-weight: 700; font-size: 14px; }
.practice-link { margin: 14px 2px 0; font-weight: 700; font-size: 14px; }
.practice-link a { display: inline-flex; align-items: center; gap: 6px; }
.practice-link .ic { width: 18px; height: 18px; color: #f59e0b; }
.practice-result .verdict { margin: 4px 0 12px; }
.mine-choice { margin: 0; font-weight: 700; color: var(--muted); }
.practice-next { margin: 0 0 14px; }
.practice-next .go { flex: 1 1 260px; }
.key-after::before { background: var(--up); }
.is-lose .key-after::before { background: var(--down); }
.intro-art { display: flex; justify-content: center; gap: 4px; margin-bottom: 4px; }
.intro-art .ic-trend { width: 72px; height: 72px; }
.intro-art .ic-trend:first-child { color: var(--teal); }
.intro-art .ic-trend:last-child { color: var(--orange); }
.intro .go { min-height: 58px; }
.coach-shade { position: fixed; inset: 0; z-index: 45; background: rgba(43, 33, 64, .45); }
.coach-target { position: relative; z-index: 46; border-radius: 18px; background-color: var(--bg);
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--yellow); }
.coach-pop { position: absolute; z-index: 47; width: min(320px, calc(100vw - 24px)); padding: 14px 14px 12px; border-radius: 18px;
  background: #fff; box-shadow: 0 12px 30px rgba(43, 33, 64, .3); font-weight: 700; line-height: 1.4; }
.coach-pop::before { content: ""; position: absolute; top: -9px; left: var(--arrow-x, 50%); width: 18px; height: 18px;
  margin-left: -9px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
.coach-pop.up::before { top: auto; bottom: -9px; }
.coach-pop p { margin: 0 0 10px; font-size: 16px; }
.coach-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coach-count { color: var(--muted); font-size: 13px; }
.coach-ok { min-height: 42px; padding: 6px 16px; font-size: 16px; border-radius: 14px; }
.result.simple { display: block; max-width: 620px; margin: 0 auto; }
details.more { margin: 2px 0 0; }
details.more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--line);
  font: 800 15px var(--head); color: var(--violet-d); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "▾"; }
details.more[open] > summary::after { content: "▴"; }
details.more[open] > summary { margin-bottom: 12px; }
details.more > * + * { margin-top: 12px; }
.yourmove { background: #fff; border-radius: 22px; padding: 12px 14px; box-shadow: var(--shadow); }
.yourmove .kicker { margin-bottom: 6px; color: var(--teal-d); }
.more-open > * { margin: 0 0 12px; }

/* зацепки: вызов дня, звания-рамки, строка-достижение */
.me-av.ring-bronze { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #d08b4f; }
.me-av.ring-silver { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #aab4c3; }
.me-av.ring-gold { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f5c518, 0 0 14px rgba(245, 197, 24, .55); }
.who .me-av[class*="ring-"], .lb .me-av[class*="ring-"] { margin: 0 6px; }
.tier { display: inline-block; vertical-align: 2px; font: 800 11.5px var(--text); border-radius: 999px; padding: 1px 8px;
  color: #6b3f12; background: #f7dcc2; }
.tier-silver { color: #3f4a5a; background: #e3e8ef; }
.tier-gold { color: #6b4e00; background: #fdeb9c; }
.daily { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; margin: 0 0 12px;
  padding: 9px 12px; border-radius: 16px; background: var(--orange-l); box-shadow: inset 0 0 0 2px #fed7aa; }
.daily > .ic { width: 26px; height: 26px; }
.daily-body { font-size: 15px; line-height: 1.3; min-width: 0; }
.daily-body b { font-family: var(--head); }
.daily-body small { display: block; color: var(--muted); font-weight: 700; }
.daily progress { grid-column: 1 / -1; -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0;
  border-radius: 999px; background: #fde4cc; overflow: hidden; }
.daily progress::-webkit-progress-bar { background: #fde4cc; border-radius: 999px; }
.daily progress::-webkit-progress-value { background: var(--orange); border-radius: 999px; }
.daily progress::-moz-progress-bar { background: var(--orange); border-radius: 999px; }
.daily.done { background: var(--win-l); box-shadow: inset 0 0 0 2px #86efac; }
.daily-win, .title-win { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px;
  font-size: 15px; line-height: 1.35; }
.daily-win { background: var(--win-l); box-shadow: inset 0 0 0 2px #86efac; }
.daily-win .ic { width: 34px; height: 34px; }
.title-win { background: linear-gradient(120deg, #fff7d1, #fdeccf); box-shadow: inset 0 0 0 2px #fde68a; }
.title-win .me-av { width: 40px; height: 40px; font-size: 18px; flex: none; margin: 4px; }
.daily-win b, .title-win b { display: block; font: 800 17px var(--head); }
.achv { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-weight: 800; color: var(--orange-d); }
.daily-tile { grid-column: 1 / -1; background: var(--orange-l); flex-direction: row; align-items: center; gap: 10px; }
.daily-tile .ic { width: 30px; height: 30px; }
@media (min-width: 860px) { .daily { max-width: 620px; } }

/* вызов другу: карточка для друга и раздел в профиле */
.challenge .me-av.big { width: 88px; height: 88px; font-size: 38px; margin: 6px auto 4px; }
.challenge h1 { margin: 6px 0 2px; }
.ch-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.ch-stats div { background: var(--teal-l); border-radius: 16px; padding: 10px 8px; display: flex; flex-direction: column;
  align-items: center; line-height: 1.25; }
.ch-stats div:nth-child(2) { background: var(--violet-l); }
.ch-stats div:nth-child(3) { background: var(--orange-l); }
.ch-stats div:nth-child(4) { background: var(--yellow-l); }
.ch-stats b { font-size: 26px; font-weight: 900; }
.ch-stats span { font-size: 13px; color: var(--muted); font-weight: 700; }
.ch-call { font: 800 21px/1.3 var(--head); margin: 6px 0 4px; }
.challenge .go { min-width: 240px; }
.challenge-box { margin: 16px 0 6px; }
.challenge-box h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 19px; }
.challenge-box h2 .ic { color: var(--violet); }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; }
.share-msg { white-space: pre-line; margin: 8px 0 4px; padding: 10px 14px; border-radius: 14px;
  background: var(--violet-l); font-size: 15px; line-height: 1.45; }
.share-msg .share-link-word { color: var(--muted); font-style: italic; }
.share-url { flex: 1 1 220px; min-width: 0; min-height: 46px; font-size: 14px !important; }
.share-row button { min-height: 46px; padding: 8px 16px; font-size: 15px; }
.share-native { background: var(--teal); box-shadow: 0 4px 0 var(--teal-d); }
.share-off { display: block; margin-top: 4px; }
.invited { margin: 10px 0 0; font-weight: 700; }
.challenge-link { margin: -2px 0 0; text-align: center; font-weight: 800; }
.challenge-link a { display: inline-flex; align-items: center; gap: 6px; }
.challenge-link .ic { color: var(--violet); }

/* 404: «4 [Сапёр] 4» */
.lost-art { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 6px; }
.d4 { font: 900 96px/1 var(--head); color: var(--teal); text-shadow: 0 5px 0 #99f0e2; }
.d4b { color: var(--orange); text-shadow: 0 5px 0 #fed7aa; }
.lost-art .av { width: 92px; height: 92px; transform: rotate(-8deg); }
.go-home .ic { width: 22px; height: 22px; }

/* звук: кнопка-динамик в шапке (видна, когда работает sound.js) */
.sound-toggle { min-height: 0; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: #fff; color: var(--muted);
  box-shadow: inset 0 0 0 2px var(--line); }
.sound-toggle:active { transform: none; box-shadow: inset 0 0 0 2px var(--line); }
.sound-toggle .ic-sound-on { display: none; }
.sound-toggle[aria-pressed="true"] { color: var(--teal-d); background: var(--teal-l); box-shadow: inset 0 0 0 2px #99f0e2; }
.sound-toggle[aria-pressed="true"] .ic-sound-on { display: inline-block; }
.sound-toggle[aria-pressed="true"] .ic-sound-off { display: none; }
.tabbar a.tab-prizes .ic { color: var(--orange-d); }
.tabbar a.tab-prizes.on .ic { color: inherit; }

/* прочее */
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; }
ul.fb-mine { padding-left: 18px; }
ul.fb-mine li { margin-bottom: 8px; }

/* подвал */
.foot { max-width: 1120px; margin: 24px auto 0; padding: 12px 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.foot a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 14px;
  box-shadow: inset 0 0 0 2px #fde68a, 0 3px 0 #fde68a; }
.legal { max-width: 1120px; margin: 8px auto 16px; padding: 0 16px; font-size: 12px; }
.legal a { color: var(--muted); }

@media (max-width: 419px) { .wallet .lbl { display: none; } }
@media (min-width: 600px) {
  .chart { height: 340px; }
  .hint-list { grid-template-columns: 1fr 1fr; }
  .duel-list, ul.badges { grid-template-columns: 1fr 1fr; }
  .vs-row { gap: 16px; }
  .me-av.big, .av.big { width: 88px; height: 88px; font-size: 36px; }
  .vs-pts { font-size: 32px; }
}
@media (min-width: 860px) {
  body.has-tabs { padding-bottom: 0; }
  .top { padding: 16px 24px; }
  main { padding: 8px 24px 24px; }
  .tabbar { position: sticky; top: 0; bottom: auto; justify-content: center; gap: 6px; padding: 8px 24px;
    background: rgba(255, 248, 236, .92); backdrop-filter: blur(6px); box-shadow: none; border-radius: 0;
    max-width: none; margin: 0 auto 4px; }
  .tabbar a { flex: none; flex-direction: row; gap: 8px; max-width: none; padding: 8px 16px; font-size: 15px;
    background: #fff; box-shadow: var(--shadow); border-radius: 999px; }
  .tabbar a .ic { width: 20px; height: 20px; }
  .tabbar a.on { background: var(--violet); color: #fff; }
  .welcome-hero { padding: 32px 28px 24px; }
  .welcome-hero h1 { font-size: 40px; }
  .faces .av { width: 72px; height: 72px; }
  .faces .vs-mid { width: 50px; height: 50px; font-size: 18px; }
  .faces .me-av.big { width: 80px; height: 80px; font-size: 34px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; }
  .sheet { padding: 28px 32px; }
  h1 { font-size: 32px; }
  .play { display: grid; grid-template-columns: minmax(0, 1fr) 390px; grid-template-areas: "board answer" "hints answer";
    gap: 0 28px; align-items: start; }
  .play .board { grid-area: board; }
  .play .answer { grid-area: answer; background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 18px; margin: 0; }
  .play .hints { grid-area: hints; }
  .chart { height: 420px; }
  .result { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .result .after { margin: 0; }
  .result .chart { height: 460px; }
  .v-title h1 { font-size: 30px; }
  .duels-page .duel-list { grid-template-columns: repeat(3, 1fr); }
  .lvl { flex: 0 1 480px; }
  .me-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .me-grid ul.badges, .me-grid .duel-list { grid-template-columns: 1fr; }
  .v-pts { font-size: 34px; }
  .verdict .ic-big { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Telegram Mini App (docs/signal_duel_telegram_spec.md §4): вход, кнопка «Играть в Telegram»,
   внутри Telegram мелкие кнопки — не ниже 44–48 px под палец */
.tg-card { text-align: center; padding: 28px 20px; }
.tg-card h1 { font-size: 24px; }
.tg-spinner { display: inline-block; width: 44px; height: 44px; border-radius: 50%;
  border: 5px solid var(--violet-l); border-top-color: var(--violet); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tg-spinner { animation-duration: 3s; } }
a.go.tg-go { background: #229ed9; box-shadow: 0 5px 0 #1679a8; }
.login-alt { margin-top: 10px; width: 100%; }
body.in-tg .tfs .tf { min-height: 44px; }
body.in-tg .hint .buy-hint, body.in-tg .coach-ok { min-height: 48px; }
body.in-tg .share-url, body.in-tg .share-row button { min-height: 48px; }
body.in-tg .sound-toggle { width: 44px; height: 44px; }
body.in-tg .ans-skip > span { min-height: 58px; }
.notify-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notify-row button { min-height: 48px; padding: 8px 18px; font-size: 16px; }
/* язык игры (вкладка «Я»): текущий — залит, второй — контуром */
.lang-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang-row .lang-btn { min-height: 48px; padding: 8px 18px; font-size: 16px; }
.notify-state { font-weight: 800; }
.notify-state.on { color: var(--teal-d); }
.notify-state.off { color: var(--muted); }

/* квест (docs/signal_duel_quest_spec.md): строка цели, лестница, обучение, значки, награда */
.goalbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center;
  background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 10px 12px; margin: 4px 0 6px; }
.goalbar small { display: block; font: 800 11px var(--text); letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); }
.gb-now { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 0; }
.gb-now > .ic { flex: none; width: 28px; height: 28px; color: var(--teal-d); }
.gb-now b { font: 700 16px/1.25 var(--head); }
.gb-goal { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-items: center; min-width: 0;
  color: var(--ink); text-decoration: none; padding: 6px 10px 8px 6px; border-radius: 16px; background: var(--violet-l); }
.gb-badge, .gb-ic { grid-row: span 2; width: 38px; height: 38px; }
.gb-ic .ic { width: 30px; height: 30px; margin: 4px; }
.gb-text { min-width: 0; font-size: 14px; line-height: 1.25; }
.gb-text b { font-family: var(--head); margin-right: 5px; }
.gb-text > span { display: block; color: var(--muted); font-weight: 700; }
.gb-score { display: flex; flex-direction: column; line-height: 1.1; }
.goalbar .wallet .ic { width: 30px; height: 30px; }
.goalbar .wallet { align-self: stretch; padding-right: 12px; }
.goalbar .wallet .num { font-size: 20px; }
.stats-mini { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 2px 12px; font-size: 13px; font-weight: 700;
  color: var(--muted); }
.lvl-chip { color: var(--violet-d); text-decoration: none; }
.lvl-chip b { font-family: var(--head); }
.acc-chip { display: inline-flex; align-items: center; gap: 4px; }
.acc-chip .ic { width: 16px; height: 16px; }
@media (min-width: 760px) {
  .goalbar { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; }
  .gb-now { grid-column: auto; }
}
.goalbar progress, .quest progress, .friends progress, .locked-sheet progress, .lvl-line progress {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border: 0;
  border-radius: 999px; background: #efe7dc; overflow: hidden; }
.goalbar progress::-webkit-progress-bar, .quest progress::-webkit-progress-bar,
.friends progress::-webkit-progress-bar, .locked-sheet progress::-webkit-progress-bar,
.lvl-line progress::-webkit-progress-bar { background: #efe7dc; border-radius: 999px; }
.goalbar progress::-webkit-progress-value, .quest progress::-webkit-progress-value,
.friends progress::-webkit-progress-value, .locked-sheet progress::-webkit-progress-value,
.lvl-line progress::-webkit-progress-value { background: linear-gradient(90deg, var(--teal), var(--violet)); border-radius: 999px; }
.goalbar progress::-moz-progress-bar, .quest progress::-moz-progress-bar, .friends progress::-moz-progress-bar,
.locked-sheet progress::-moz-progress-bar, .lvl-line progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--teal), var(--violet)); border-radius: 999px; }

/* лестница квеста: три значка и полоски между ними */
.quest { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 12px 14px; margin: 0 0 12px; }
.q-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.q-head b { font: 800 17px var(--head); }
.q-head small { color: var(--muted); font-weight: 700; font-size: 13px; }
.q-track { display: grid; grid-template-columns: auto minmax(14px, 1fr) auto minmax(14px, 1fr) auto; align-items: start;
  gap: 0 6px; margin: 10px 0 4px; }
.q-step { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 62px; }
.q-step .badge-img { width: 48px; height: 48px; border-radius: 50%; }
.q-step b { font: 800 13px/1.2 var(--head); margin-top: 2px; }
.q-step small { color: var(--muted); font-weight: 700; font-size: 12px; }
.q-step.next .badge-img { animation: qglow 1.6s ease-in-out infinite; opacity: .8; }
.quest progress.q-seg { margin-top: 20px; }
.q-next { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; font-size: 14px; line-height: 1.35; }
.q-next > .ic { flex: none; width: 20px; height: 20px; margin-top: 1px; }
@keyframes qglow { 50% { box-shadow: 0 0 0 6px rgba(250, 204, 21, .5); } }
.badge-img { display: block; }
.badge-img.locked { filter: grayscale(1); opacity: .45; }

/* обучение: шаги 1–5 помечены, текущий светится (coach.js) */
.tut-step { display: inline-flex; align-items: center; margin: 0 0 6px; padding: 2px 10px; border-radius: 999px;
  font: 800 12px var(--head); background: var(--yellow); color: var(--ink); box-shadow: 0 2px 0 #ca8a04; }
.play.tut [data-tut] { position: relative; border-radius: 18px; margin-top: 16px; }
.play.tut [data-tut] > .tut-step { position: absolute; top: -12px; left: 12px; z-index: 2; margin: 0; }
.play.tut .board > [data-tut]:first-child { margin-top: 10px; padding-top: 18px; }
legend .tut-step { margin: 0 0 0 8px; vertical-align: 3px; }
.tut-now { box-shadow: 0 0 0 3px var(--yellow), 0 0 0 8px rgba(250, 204, 21, .3);
  animation: tutpulse 1.4s ease-in-out infinite; }
@keyframes tutpulse { 50% { box-shadow: 0 0 0 3px var(--yellow), 0 0 0 12px rgba(250, 204, 21, .12); } }
body.tut-off .tut-step { display: none; }
body.tut-off .tut-now { box-shadow: none; animation: none; }
.conf-locked { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 0 0 14px;
  border-radius: 16px; background: #f6f1ea; color: var(--muted); font-size: 14px; line-height: 1.35; }
.conf-locked > .ic { flex: none; width: 20px; height: 20px; }
.conf-locked > span:last-child { flex: 1; min-width: 0; }
.conf-locked b { color: var(--ink); }
.coach-row { flex-wrap: wrap; }
.coach-count { white-space: nowrap; }
.coach-skip { order: 3; flex-basis: 100%; min-height: 36px; padding: 2px 0; font-size: 14px; text-align: left;
  background: none; color: var(--muted); box-shadow: none; text-decoration: underline; justify-content: flex-start; }
.result.tut .tut-step { margin-bottom: 8px; }

/* новый значок: выскакивает с блеском (только показ; при «уменьшить движение» — без движения) */
.reward-pop .rp-art { position: relative; flex: none; width: 64px; height: 64px; }
.reward-pop .rp-art::before { content: ""; position: absolute; inset: -9px; border-radius: 50%;
  background: conic-gradient(rgba(250, 204, 21, 0), rgba(250, 204, 21, .6) 12%, rgba(250, 204, 21, 0) 25%,
    rgba(250, 204, 21, .6) 37%, rgba(250, 204, 21, 0) 50%, rgba(250, 204, 21, .6) 62%, rgba(250, 204, 21, 0) 75%,
    rgba(250, 204, 21, .6) 87%, rgba(250, 204, 21, 0));
  animation: spin 5s linear infinite; }
.reward-pop .badge-img { position: relative; width: 64px; height: 64px;
  animation: badgepop .9s cubic-bezier(.2, 1.5, .4, 1) .75s backwards; }
@keyframes badgepop { 0% { transform: scale(.2) rotate(-25deg); opacity: 0; }
  60% { transform: scale(1.18) rotate(6deg); opacity: 1; } 100% { transform: none; } }

/* значки в профиле, замок дуэлей, вкладка с замком */
.badges .badge-img { flex: none; width: 52px; height: 52px; }
.lvl-line { display: grid; gap: 3px; margin: 6px 0 0; max-width: 360px; }
.lvl-line small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.locked-sheet .badge-img.big { width: 96px; height: 96px; margin: 0 auto 4px; }
.locked-sheet h2 { margin: 6px 0; }
.locked-sheet progress { max-width: 280px; margin: 8px auto 14px; }
.tabbar a { position: relative; }
.tabbar a.locked { opacity: .75; }
.tab-lock { position: absolute; top: 2px; right: calc(50% - 30px); line-height: 0; }
.tab-lock .ic { width: 15px; height: 15px; }

/* друзья по ссылке */
.friends h3 { margin: 14px 0 6px; font-size: 16px; }
.friends h3 small { color: var(--muted); font-weight: 700; margin-left: 6px; }
.friends ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.friends li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
  padding: 8px 10px; border-radius: 14px; background: #f6f1ea; }
.friends li.counted { background: var(--win-l); }
.friends li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friends li progress { grid-column: 2 / -1; height: 6px; }
.friends .me-av { width: 32px; height: 32px; font-size: 14px; }
.f-state { font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.f-state.ok { color: var(--win); }
.friends-next { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.friends-next .ic { flex: none; width: 20px; height: 20px; }

/* ysys и вкладка «Призы» (docs/signal_duel_ysys_spec.md) */
.ysys-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px 1px 6px; border-radius: 999px;
  background: var(--teal-l); box-shadow: inset 0 0 0 2px #99f0e2; color: var(--teal-d); text-decoration: none; }
.ysys-chip .ic { width: 16px; height: 16px; }
.ysys-chip b { color: var(--ink); font-size: 14px; }
/* цветная рамка имени — приз; цвета не повторяют рамки званий (бронза, серебро, золото) */
.frame { display: inline-block; max-width: 100%; padding: 0 9px; border-radius: 999px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; box-shadow: inset 0 0 0 2px currentColor; }
.frame-teal { color: var(--teal-d); background: var(--teal-l); }
.frame-violet { color: var(--violet-d); background: var(--violet-l); }
.frame-pink { color: #be185d; background: #fce7f3; }
.prize-flash { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px;
  border-radius: 18px; font-weight: 700; }
.prize-flash.ok { background: var(--win-l); box-shadow: inset 0 0 0 2px #86efac; }
.prize-flash.bad { display: block; background: var(--lose-l); box-shadow: inset 0 0 0 2px #fdba74; color: var(--lose); }
.prize-flash .ic { width: 28px; height: 28px; flex: none; }
.ysys-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 12px;
  padding: 14px 16px; margin: 0 0 8px; border-radius: 22px; background: linear-gradient(135deg, #e6fbf7, #f3efff);
  box-shadow: var(--shadow), inset 0 0 0 2px #99f0e2; }
.ysys-card > .ic { width: 46px; height: 46px; }
.ysys-sum { margin: 0; line-height: 1.1; }
.ysys-sum small { display: block; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.ysys-sum b { font-size: 34px; font-weight: 800; }
.ysys-sum span { font: 800 16px var(--head); color: var(--teal-d); }
.ysys-card .button { grid-column: 1 / -1; }
.ysys-how { margin: 0 2px 14px; font-size: 14px; }
.prize-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.prize { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 14px 16px; }
.prize-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.prize-head h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.prize-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--violet-l); color: var(--violet); }
.prize-ic .ic { width: 26px; height: 26px; }
.price { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 6px; border-radius: 999px;
  background: var(--teal-l); box-shadow: inset 0 0 0 2px #99f0e2; font-size: 16px; white-space: nowrap; }
.price .ic { width: 18px; height: 18px; }
.prize-desc { margin: 8px 0; font-size: 14.5px; }
.prize-note { margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: var(--violet-d); }
.prize-state { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 12px; border-radius: 14px;
  background: #f6f1ea; font-weight: 700; font-size: 14px; color: var(--muted); }
.prize-state .ic { width: 20px; height: 20px; flex: none; }
.prize-state.ok { background: var(--win-l); color: #166534; }
.prize-state.next-month { display: block; background: var(--orange-l); color: #9a3412; }
.prize-state + .button { margin-top: 8px; width: 100%; }
.prize-buy > summary { list-style: none; width: 100%; }
.prize-buy > summary::-webkit-details-marker { display: none; }
.prize-buy[open] > summary { background: #fff; color: var(--violet-d); box-shadow: inset 0 0 0 2px #ddd6fe; }
.prize-buy form { display: grid; gap: 8px; margin-top: 10px; }
.prize-buy .field { font-weight: 800; font-size: 14px; }
.prize-buy select, .prize-buy input[type=text] { width: 100%; }
.frame-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.frame-pick legend { font-weight: 800; font-size: 14px; padding: 0; margin-bottom: 6px; }
.frame-pick .opt { margin-bottom: 8px; }
.frame-pick .chip > span { min-height: 46px; gap: 10px; }
.frame-pick .chip small { color: var(--muted); font-weight: 700; }
.vote-box { text-align: center; }
.vote-box p { margin: 0 0 10px; }
.vote-box .button { width: 100%; background: var(--teal); box-shadow: 0 4px 0 var(--teal-d); }
.ysys-rows { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.ysys-rows li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px;
  background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-size: 14px; }
.yr-when { flex: none; color: var(--muted); font-weight: 700; font-size: 13px; }
.yr-what { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.yr-state { flex: none; max-width: 46%; font-weight: 800; font-size: 13px; color: var(--muted); text-align: right; }
.yr-state.st-approved { color: var(--win); }
.yr-state.st-rejected { color: var(--lose); }
.yr-delta { flex: none; font-weight: 800; font-size: 16px; }
.yr-delta.up { color: var(--win); }
.yr-delta.down { color: var(--lose); }
.prizes .small-print { display: flex; gap: 6px; align-items: flex-start; }
.prizes .small-print .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--teal-d); }
.closed-duel { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 14px;
  background: var(--violet-l); box-shadow: inset 0 0 0 2px #ddd6fe; color: var(--violet-d); font-size: 14px; }
.closed-duel .ic { width: 20px; height: 20px; }
.closed-line { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border-radius: 20px;
  background: var(--violet-l); box-shadow: inset 0 0 0 2px #ddd6fe; font-weight: 700; }
.closed-line.won { background: var(--yellow-l); box-shadow: inset 0 0 0 2px #fde68a; }
.closed-line .ic { width: 30px; height: 30px; flex: none; color: var(--violet); }
.hint .buy-hint.free { background: var(--teal); box-shadow: 0 4px 0 var(--teal-d); }
.friends-ysys { margin-top: 10px; }
.friends-ysys .ic { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }
.lb-name.framed { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; white-space: normal; }
.lb-name.framed .frame { min-width: 0; }
.named-by { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; }
.named-by .ic { width: 18px; height: 18px; }
@media (min-width: 760px) {
  .prize-list { grid-template-columns: 1fr 1fr; align-items: start; }
  .ysys-card { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ysys-card .button { grid-column: auto; }
}
