/* Стенд «Вилки». Токены — те же, что в приложении (static/styles.css), плюс
   игровые: металлы лиг, огонь серии, лед заморозок. Тема только системная. */
:root {
  color-scheme: light;
  --surface-0: #f0f3f7;
  --surface-1: #ffffff;
  --surface-2: #f6f8fb;
  --border: #dee2e8;
  --grid: #eaedf1;
  --text: #13181e;
  --text-2: #51575f;
  --muted: #6e737a;
  --accent: #1d66c9;
  --accent-2: #2a78d6;
  --good: #0b7d0b;
  --good-bg: #1baf7a;
  --bad: #b93030;
  --bad-bg: #d03b3b;
  --gold: #e8a400;
  --warn: #b8480f;
  --buy: #1baf7a;
  --sell: #d93b3b;
  --pass: #d9a300;
  --funnel: rgba(42, 120, 214, .10);
  --zone: rgba(19, 24, 30, .045);
  --zone-2: rgba(19, 24, 30, .025);
  --shadow-card: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px -6px rgba(16,24,40,.08);
  --card-border: rgba(16,24,40,.07);
  --hover: #f5f7fa;
  --m0: #b4573a; --m1: #a8762f; --m2: #8d97a3; --m3: #c99200; --m4: #3f8fa6;
  /* Отступ сверху под вырез экрана и панель мини-аппа Telegram («Закрыть», ⋯):
     панель плавает поверх страницы, и env(safe-area-inset-top) о ней не знает.
     SDK кладет оба значения в --tg-переменные (в Telegram env() может повторять
     --tg-safe-area-inset-top, поэтому max, а не сумма); вне Telegram остаются
     только системные env(). */
  --safe-top: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --surface-0: #121211;
    --surface-1: #1a1a19;
    --surface-2: #232322;
    --border: #34342f;
    --grid: #2b2b28;
    --text: #ffffff;
    --text-2: #c3c2b7;
    --muted: #918f85;
    --accent: #3987e5;
    --accent-2: #5a9ef0;
    --good: #3fbf3f;
    --good-bg: #199e70;
    --bad: #f07474;
    --bad-bg: #d03b3b;
    --warn: #f08a5d;
    --buy: #26b27e;
    --sell: #e5534b;
    --pass: #e3b42a;
    --funnel: rgba(90, 158, 240, .14);
    --zone: rgba(255,255,255,.05);
    --zone-2: rgba(255,255,255,.025);
    --shadow-card: none;
    --card-border: #34342f;
    --hover: #232322;
    --m0: #d0714f; --m1: #c4924a; --m2: #aab3be; --m3: #f0b429; --m4: #5fb3cb;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Без overscroll-behavior на iOS «резиновый» overscroll корня двигает весь
   слой страницы — вместе с fixed-панелью .mobile-nav: меню уезжало вверх
   с серым фоном под ним. Запрет отскока у корня держит панель у края. */
html, body { margin: 0; overscroll-behavior-y: none; }
body {
  background: var(--surface-0); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
b, strong { font-weight: 650; }

.app { max-width: 560px; margin: 0 auto; min-height: 100vh; }
.scr__body { padding: 8px 16px 110px; }
.scr--deal .scr__body { padding-bottom: 120px; }
.scr--deal.is-racing #coach { display: none; }

.mobile-nav { display: none; }
@media (max-width: 720px) {
  body.has-mobile-nav .scr__body { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .mobile-nav {
    position: fixed; left: 50%; bottom: 0; z-index: 40; transform: translateX(-50%);
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    width: 100%; max-width: 560px;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--surface-1) 94%, transparent);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(16,24,40,.08);
  }
  .mobile-nav__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 0; min-height: 54px; padding: 4px 2px; border: 0; border-radius: 12px;
    background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 650;
    line-height: 1.2; cursor: pointer;
  }
  .mobile-nav__item svg {
    width: 23px; height: 23px; flex: none; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .mobile-nav__item span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-nav__item.is-active { background: color-mix(in srgb, var(--accent) 11%, transparent); color: var(--accent); }
  .mobile-nav__item:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -2px; }
  @media (hover: hover) { .mobile-nav__item:hover { background: var(--hover); } }

  /* Клавиатура телефона открыта (фокус в поле ввода): меню прячется, а не
     всплывает над клавиатурой. У панели backdrop-filter, и Safari на iOS
     сдвигал такую composited-панель вверх при открытии клавиатуры, а при
     закрытии не всегда возвращал на место — меню зависало посреди экрана
     (24.11.2026). Класс вешает focusin/focusout в ui.js. */
  body.kbd-open .mobile-nav { display: none; }
}
@media (max-width: 380px) {
  .mobile-nav__item { font-size: 10px; }
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 18px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface-1); color: var(--text);
  font-weight: 650; font-size: 15px; line-height: 1.2;
  box-shadow: 0 3px 0 var(--border); transition: transform .06s ease, box-shadow .06s ease;
}
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }
.btn:disabled { opacity: .45; cursor: default; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.btn--primary:active:not(:disabled) { box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.btn--ghost { background: var(--surface-1); }
.btn--danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; border-radius: 11px; }
.btn--lg { min-height: 50px; padding: 10px 22px; font-size: 16px; }
.btn--xl { width: 100%; min-height: 54px; font-size: 16.5px; margin-top: 4px; }
.btn--block { width: 100%; margin-top: 10px; }
@media (hover: hover) { .btn--ghost:hover { background: var(--hover); } }
.x { width: 36px; height: 36px; border: 0; background: none; border-radius: 10px; font-size: 22px; color: var(--muted); cursor: pointer; }
.row-btns { display: flex; gap: 10px; margin: 6px 0 12px; }
.row-btns .btn { flex: 1 1 0; }

/* ---------- шапки ---------- */
.hub-top, .bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px; background: color-mix(in srgb, var(--surface-0) 86%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.hub-top { justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 7px; padding: 4px 6px 4px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 19px; cursor: pointer; border-radius: 10px; }
.logo:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.logo svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; }
.logo svg circle { fill: var(--surface-1); }
.hub-top__chips { display: flex; align-items: center; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 9px; border-radius: 15px; font-size: 13.5px; font-weight: 700; background: var(--surface-1); border: 1.5px solid var(--border); white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-1)); color: var(--accent); font-weight: 800; padding: 0; }
.avatar--big { width: 54px; height: 54px; font-size: 22px; flex: none; }
@media (max-width: 460px) {
  .hub-top { gap: 6px; padding: calc(10px + var(--safe-top)) 12px 10px; }
  .hub-top__chips { gap: 4px; }
  .chip { height: 28px; padding: 0 7px; font-size: 12.5px; }
  .logo { font-size: 17px; gap: 5px; }
  .logo svg { width: 24px; height: 24px; }
  .avatar { width: 30px; height: 30px; }
}

.bar__back { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 10px 0 4px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-1); cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-2); }
.bar__back[hidden] { visibility: hidden; }
.bar__back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bar__title { flex: 1 1 auto; min-width: 0; font-weight: 650; font-size: 14.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__right { flex: none; }

/* ---------- карточки ---------- */
.card { background: var(--surface-1); border: 1px solid var(--card-border); border-radius: 18px; box-shadow: var(--shadow-card); padding: 14px 16px; margin: 0 0 14px; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card__head h2 { margin: 0; font-size: 16.5px; font-weight: 700; }
.card__head .muted { font-size: 12.5px; text-align: right; }
.card__note { margin: 8px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.sub-h { margin: 14px 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.foot-note { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 8px 20px; }
.card--hello { border: 2px solid color-mix(in srgb, var(--good-bg) 35%, var(--border)); }
.card--sum { border: 2px solid color-mix(in srgb, var(--gold) 45%, var(--border)); }

/* ---------- Свечка ---------- */
.coach { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 12px; }
.m { display: block; flex: none; width: 62px; height: 78px; }
.m img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.drawdown-coach { display: flex; gap: 10px; align-items: center; }
.drawdown-coach .note-warn { margin: 0; }
.m--big { width: 96px; height: 120px; }
.m--hero { width: 132px; height: 165px; margin: 10px auto 0; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.bubble { position: relative; flex: 1 1 auto; min-width: 0; padding: 10px 13px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid var(--border); font-size: 14.5px; line-height: 1.45; }
.bubble::before { content: ''; position: absolute; left: -9px; top: 20px; border: 8px solid transparent; border-right: 9px solid var(--border); border-left: 0; }
.bubble::after { content: ''; position: absolute; left: -6.5px; top: 20px; border: 8px solid transparent; border-right: 9px solid var(--surface-2); border-left: 0; }
.coach--happy .bubble, .coach--cheer .bubble, .coach--hello .bubble { border-color: color-mix(in srgb, var(--good-bg) 45%, var(--border)); }
.coach--sad .bubble { border-color: color-mix(in srgb, var(--bad-bg) 40%, var(--border)); }

/* ---------- знакомство ---------- */
/* Экраны без шапки (приветствие, анкета) сами уходят из-под панели Telegram;
   с шапкой (.hub-top) отступ уже в ней — второй раз не добавляем. */
.scr--onb .scr__body { padding-top: calc(24px + var(--safe-top)); }
.scr--onb .hub-top + .scr__body { padding-top: 24px; }
.onb { display: flex; flex-direction: column; gap: 12px; }
/* Служебные состояния загрузчика («Загружаем прогресс…») идут в #app без
   обертки .scr__body — держим их подальше от краев и панели Telegram. */
#app > .onb { padding: calc(24px + var(--safe-top)) 16px 24px; }
/* На приветствии свободную высоту делят Свечка и график. */
.app:has(#n1) { min-height: 0; }
.scr__body:has(#n1) {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  height: var(--tg-viewport-height, 100dvh);
  padding: max(12px, var(--safe-top)) max(16px, env(safe-area-inset-right))
           max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.onb:has(> #n1) {
  display: grid;
  grid-template-rows: minmax(44px, 165px) auto auto auto minmax(40px, 128px) auto;
  align-content: center;
  gap: clamp(4px, 1.4vh, 12px);
}
.onb:has(> #n1) .m--hero, .onb:has(> #n1) .demo {
  height: 100%; min-height: 0; margin: 0 auto;
}
.onb > #n1 { margin: 0; }
@media (max-height: 500px) {
  .onb:has(> #n1) { gap: 4px; }
  .onb:has(> #n1) .onb__text { line-height: 1.3; }
}
.onb__title { margin: 0; text-align: center; font-size: 26px; }
.onb__text { margin: 0; text-align: center; font-size: 16px; color: var(--text-2); }
.onb__small { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.onb__rivals { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.onb__rivals span { padding: 4px 10px; border-radius: 12px; background: var(--surface-1); border: 1.5px solid var(--border); font-size: 13.5px; font-weight: 600; }
.onb__row { display: flex; gap: 10px; } .onb__row .btn { flex: 1; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.field input { height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface-1); color: var(--text); font: inherit; font-size: 16px; }
.field input:focus { outline: none; border-color: var(--accent); }
.friend-link { position: relative; }
.friend-link input { width: 100%; padding-right: 50px; text-overflow: ellipsis; }
.friend-link button { position: absolute; inset: 2px 2px 2px auto; width: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); cursor: pointer; }
.friend-link button:hover, .friend-link button:focus-visible { background: var(--surface-2); color: var(--text); }
.field-err { min-height: 18px; margin: 4px 0 0; font-size: 13px; color: var(--bad); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { min-height: 54px; padding: 10px 16px; text-align: left; border-radius: 14px; border: 2px solid var(--border); background: var(--surface-1); box-shadow: 0 3px 0 var(--border); font-weight: 600; cursor: pointer; }
.opt:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }

/* ---------- главная ---------- */
.tour-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dots { display: flex; gap: 7px; }
.dot { width: 22px; height: 22px; border-radius: 7px; background: var(--grid); border: 2px solid var(--border); }
.dot--win { background: var(--good-bg); border-color: var(--good-bg); }
.dot--loss { background: var(--bad-bg); border-color: var(--bad-bg); }
.dot--pass { background: var(--surface-1); border-color: var(--pass); }
.dots--sm { gap: 4px; }
.dots--sm .dot { width: 10px; height: 10px; border-radius: 4px; border-width: 0; }
.dot--done { background: var(--good-bg); }
.dot--now { background: var(--accent); }
.league-hint { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 12%, var(--surface-1)); font-size: 13.5px; }
.league-hint--up { background: color-mix(in srgb, var(--good-bg) 13%, var(--surface-1)); }
.bar-prog { height: 10px; border-radius: 5px; background: var(--grid); overflow: hidden; margin: 4px 0; }
.bar-prog i { display: block; height: 100%; border-radius: 5px; background: var(--good-bg); }

.path { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.path__node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.path__node:not(:last-child)::after { content: ''; position: absolute; top: 21px; left: 50%; width: 100%; height: 4px; border-radius: 2px; background: var(--border); }
.path__node.is-done:not(:last-child)::after { background: var(--good-bg); }
.path__btn { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 800; font-size: 17px; color: var(--muted); background: var(--surface-2); border: 3px solid var(--border); box-shadow: 0 3px 0 var(--border); }
.path__node.is-done .path__btn { color: #fff; background: var(--good-bg); border-color: var(--good-bg); box-shadow: 0 3px 0 color-mix(in srgb, var(--good-bg) 60%, #000); }
.path__node.is-now .path__btn { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, #000); animation: pulse 1.8s ease-in-out infinite; }
.path__name { font-size: 11.5px; line-height: 1.2; text-align: center; color: var(--text-2); }
.path__next { margin: 8px 0 0; font-size: 13.5px; color: var(--text-2); }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; text-align: left; cursor: pointer; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--card-border); box-shadow: var(--shadow-card); min-height: 116px; }
.tile:active { transform: scale(.98); }
.tile__ico { font-size: 24px; line-height: 1; margin-bottom: 4px; }
.tile b { font-size: 14px; line-height: 1.2; }
.tile span:last-child { font-size: 12px; line-height: 1.3; color: var(--muted); }
.tile.is-lock { opacity: .62; }
@media (max-width: 400px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- таблицы ---------- */
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 12px; }
.tab { min-height: 40px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface-1); font-weight: 650; font-size: 14px; cursor: pointer; }
.tab.is-on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface-1)); }
.lb { display: flex; flex-direction: column; margin-top: 8px; font-variant-numeric: tabular-nums; }
.lb__head, .lb__row { display: grid; grid-template-columns: 30px 26px minmax(0, 1fr) auto 58px; align-items: center; gap: 6px; }
.lb__head { font-size: 11px; color: var(--muted); padding: 0 8px 4px; }
.lb__head span:nth-child(4), .lb__head span:nth-child(5) { text-align: right; }
.lb__row { min-height: 42px; padding: 4px 8px; border-radius: 12px; border: 1.5px solid transparent; }
.lb__row + .lb__row { margin-top: 2px; }
.lb__place { font-weight: 800; color: var(--muted); text-align: center; }
.lb__av { font-size: 18px; text-align: center; }
/* Имя сжимается многоточием, пометка «робот» / «ты» остается видна (28.09.2026). */
.lb__name { min-width: 0; display: flex; align-items: center; gap: 4px; font-weight: 600; }
.lb__nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__name small { flex: none; }
.lb__name small { font-weight: 600; font-size: 10.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 0 4px; margin-left: 2px; }
.lb__val { font-weight: 750; text-align: right; }
.lb__stab { font-size: 12.5px; color: var(--text-2); text-align: right; }
.lb__row--robot { background: var(--surface-2); }
.lb__row.is-me { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface-1)); }
.lb__row.zone-up .lb__place { color: var(--good); }
.lb__row.zone-up { box-shadow: inset 4px 0 0 var(--good-bg); }
.lb__row.zone-down .lb__place { color: var(--bad); }
.lb__row.zone-down { box-shadow: inset 4px 0 0 var(--bad-bg); }
.lb__piggy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0; padding: 6px 10px; border-top: 2px dashed color-mix(in srgb, #e64980 55%, var(--border)); border-bottom: 2px dashed color-mix(in srgb, #e64980 55%, var(--border)); font-size: 13px; font-weight: 700; color: color-mix(in srgb, #c2255c 80%, var(--text)); font-variant-numeric: tabular-nums; }
.lb__gap { text-align: center; color: var(--muted); letter-spacing: 3px; line-height: 1; padding: 2px 0; }
.lb--mini .lb__row { min-height: 38px; }

/* ---------- раздача ---------- */
.card--chart { position: relative; padding: 10px 8px 8px; }
.chart-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 0 6px 2px; font-size: 12px; color: var(--muted); }
.chart-top__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.chart-top__meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 10px; margin-left: auto; }
.kind-sw { display: inline-flex; padding: 2px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.kind-sw__btn { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.kind-sw__btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.kind-sw__btn svg rect { fill: currentColor; stroke: none; }
.kind-sw__btn[aria-pressed="true"] { background: var(--surface-1); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
@media (max-width: 420px) { .chart-top__btns { gap: 6px; } .chart-top__btns .tools-btn { padding: 6px 10px; font-size: 12.5px; } }
.tools-btn { min-height: 36px; padding: 6px 14px; border-radius: 18px; border: 1.5px solid var(--border); background: var(--surface-1); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.tools-btn[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-1)); color: var(--accent); }
@media (hover: hover) { .tools-btn:hover { background: var(--hover); } .tools-btn[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface-1)); } }
.cap-chip { font-weight: 700; color: var(--text-2); }
.chart-host { position: relative; width: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ch { display: block; overflow: visible; }
.ch-grab { position: absolute; touch-action: none; cursor: ns-resize; }
.ch-grid { stroke: var(--grid); stroke-width: 1; }
.ch-grid--zero { stroke: var(--muted); stroke-dasharray: 4 4; opacity: .8; }
.ch-ylab, .ch-xlab { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.ch-xlab--date { fill: var(--text); font-weight: 650; }
.ch-zone { fill: var(--zone); }
.ch-zone--extra { fill: var(--zone-2); }
.ch-zlab { font-size: 11px; font-weight: 600; fill: var(--muted); }
.ch-funnel { fill: var(--funnel); }
.ch-hist { fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linejoin: round; }
.ch-c line { stroke-width: 1; }
.ch-c--up rect { fill: var(--buy); } .ch-c--up line { stroke: var(--buy); }
.ch-c--down rect { fill: var(--sell); } .ch-c--down line { stroke: var(--sell); }
.ch-c--after, .ch-c--extra { opacity: .35; }
.ch-tf { font-weight: 600; }
.ch-now { stroke: var(--muted); stroke-dasharray: 3 4; }
.ch-level { stroke: var(--muted); stroke-dasharray: 2 4; opacity: .7; }
.ch-nowdot { fill: var(--text); }
.ch-entry { stroke: var(--surface-1); stroke-width: 3; animation: pop .35s ease-out both; transform-box: fill-box; transform-origin: center; }
.ch-entry--buy { fill: #2f9e62; } .ch-entry--sell { fill: #d64545; }
.ch-entry__t { font-size: 13px; font-weight: 750; paint-order: stroke; stroke: var(--surface-1); stroke-width: 4px; stroke-linejoin: round; }
.ch-entry__t--buy { fill: #237a4b; } .ch-entry__t--sell { fill: #b83232; }
@media (prefers-color-scheme: dark) { .ch-entry__t--buy { fill: #5cc98c; } .ch-entry__t--sell { fill: #f08080; } }
.ch-line { stroke-width: 2.6; stroke-linecap: round; }
.ch-line--target { stroke: var(--good-bg); }
.ch-line--stop { stroke: var(--bad-bg); }
.ch-llab { font-size: 12px; font-weight: 750; paint-order: stroke; stroke: var(--surface-1); stroke-width: 3px; }
.ch-llab.ch-line--target { fill: var(--good); stroke: var(--surface-1); stroke-width: 3px; }
.ch-llab.ch-line--stop { fill: var(--bad); stroke: var(--surface-1); stroke-width: 3px; }
.ch-handle circle { fill: var(--surface-1); stroke-width: 2.4; }
.ch-handle.ch-line--target circle { stroke: var(--good-bg); }
.ch-handle.ch-line--stop circle { stroke: var(--bad-bg); }
.ch-handle path { fill: none; stroke: var(--text-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ch-handle.is-drag circle { fill: color-mix(in srgb, var(--accent) 20%, var(--surface-1)); }
.ch-fut { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.ch-fut--after { stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 4 3; }
.ch-extra { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 2 3; }
.ch-head { fill: var(--accent); stroke: var(--surface-1); stroke-width: 2; }
.ch-exit { stroke: var(--surface-1); stroke-width: 2.5; animation: pop .35s ease-out both; transform-box: fill-box; transform-origin: center; }
.ch-exit--good { fill: var(--good-bg); }
.ch-exit--bad { fill: var(--bad-bg); }
.ch-event { cursor: pointer; }
.ch-event line { stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 3 3; opacity: .72; pointer-events: none; }
.ch-event circle { fill: var(--gold); stroke: var(--surface-1); stroke-width: 2; }
.ch-event text { fill: var(--surface-1); font-size: 10px; font-weight: 850; pointer-events: none; }
.ch-event:hover circle, .ch-event:focus circle { stroke: var(--accent); }
.ch-event:focus { outline: none; }
.ch-event--rate line { stroke: var(--muted); opacity: .5; }
.ch-event--rate circle { fill: var(--muted); }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.4); } 100% { transform: scale(1); } }

.counter { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 8px 0; font-variant-numeric: tabular-nums; }
.counter b { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.counter span { font-size: 13px; color: var(--muted); }

.flash { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 5; display: flex; flex-direction: column; align-items: center; padding: 10px 22px; border-radius: 18px; color: #fff; pointer-events: none; animation: flash 1.5s ease-out both; box-shadow: 0 8px 24px rgba(0,0,0,.2); text-align: center; }
.flash b { font-size: 34px; font-weight: 900; line-height: 1.1; }
.flash span { font-size: 13px; font-weight: 600; opacity: .95; }
.flash--good { background: var(--good-bg); }
.flash--bad { background: var(--bad-bg); }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }

.sides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sides--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 66px; padding: 8px 6px; border-radius: 16px; border: 2.5px solid var(--border); background: var(--surface-1); box-shadow: 0 4px 0 var(--border); cursor: pointer; text-align: center; transition: transform .06s ease; }
.side:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border); }
.side b { font-size: 16px; }
.side span { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.side--buy.is-on { border-color: var(--buy); background: color-mix(in srgb, var(--buy) 14%, var(--surface-1)); box-shadow: 0 4px 0 color-mix(in srgb, var(--buy) 70%, #000); }
.side--sell.is-on { border-color: var(--sell); background: color-mix(in srgb, var(--sell) 14%, var(--surface-1)); box-shadow: 0 4px 0 color-mix(in srgb, var(--sell) 70%, #000); }
.side--pass.is-on { border-color: var(--pass); background: color-mix(in srgb, var(--pass) 16%, var(--surface-1)); box-shadow: 0 4px 0 color-mix(in srgb, var(--pass) 70%, #000); }
.side.is-lock { opacity: .5; }
.sides--sm .side { min-height: 46px; }

.fork { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.fork__row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 40px 40px 40px; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 12px; background: var(--surface-2); }
.fork__row--target { box-shadow: inset 4px 0 0 var(--good-bg); }
.fork__row--stop { box-shadow: inset 4px 0 0 var(--bad-bg); }
.fork__lab { font-weight: 700; font-size: 14px; }
.fork__val { font-size: 17px; font-variant-numeric: tabular-nums; }
.fork__row--target .fork__val { color: var(--good); }
.fork__row--stop .fork__val { color: var(--bad); }
.round { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface-1); font-size: 20px; font-weight: 700; cursor: pointer; line-height: 1; padding: 0; }
.round--x { font-size: 18px; color: var(--muted); }
.fork__btns { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.fork--ro { gap: 4px; }
.fork__ro { display: flex; gap: 8px; flex-wrap: wrap; }
.fk { padding: 4px 10px; border-radius: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fk--target { color: var(--good); background: color-mix(in srgb, var(--good-bg) 12%, var(--surface-1)); }
.fk--stop { color: var(--bad); background: color-mix(in srgb, var(--bad-bg) 11%, var(--surface-1)); }
.lock-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.size { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.size__lab { font-weight: 700; font-size: 14px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg__btn { flex: 1 1 0; min-height: 40px; min-width: 44px; padding: 0 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface-1); font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap; }
.seg__btn.is-on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-1)); }
.seg--wide .seg__btn { min-height: 46px; }

/* Нижняя полоса раздачи. */
.foot[hidden] { display: none; }
.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface-1); border-top: 1px solid var(--border); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); transition: background-color .25s ease; }
.foot__in { max-width: 528px; margin: 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.foot__sum { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--text-2); line-height: 1.35; }
.foot--good { background: color-mix(in srgb, var(--good-bg) 16%, var(--surface-1)); border-top-color: color-mix(in srgb, var(--good-bg) 40%, var(--border)); }
.foot--bad { background: color-mix(in srgb, var(--bad-bg) 11%, var(--surface-1)); border-top-color: color-mix(in srgb, var(--bad-bg) 40%, var(--border)); }
.foot--good .btn--primary { background: var(--good-bg); border-color: var(--good-bg); box-shadow: 0 4px 0 color-mix(in srgb, var(--good-bg) 60%, #000); }
.foot__verdict { flex: 1 1 auto; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.foot__verdict b { font-size: 21px; font-weight: 850; }
.foot--good .foot__verdict b { color: var(--good); }
.foot--bad .foot__verdict b { color: var(--bad); }
.foot__verdict span { font-size: 12.5px; color: var(--text-2); }

/* Гонка. */
.race { position: relative; }
.race__row { position: absolute; left: 0; right: 0; top: 0; height: 33px; display: grid; grid-template-columns: 22px 24px 118px minmax(0, 1fr) 96px; align-items: center; gap: 6px; padding: 0 6px; border-radius: 10px; transition: transform .22s cubic-bezier(.3,.9,.4,1); font-variant-numeric: tabular-nums; }
.race__row--you { background: color-mix(in srgb, var(--accent) 11%, var(--surface-1)); outline: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent); z-index: 2; }
.race__row--friend { background: color-mix(in srgb, var(--gold) 12%, var(--surface-1)); }
.race__row--piggy { outline: 1.5px dashed color-mix(in srgb, #e64980 55%, transparent); outline-offset: -1.5px; }
.race__place { font-weight: 800; font-size: 13px; color: var(--muted); text-align: center; }
.race__emoji { font-size: 17px; text-align: center; }
/* Имена соперников длинные («Охранник из Пятерочки», 28.09.2026): до двух строк, а не многоточие. */
.race__name { font-size: 13.5px; font-weight: 650; line-height: 1.1; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.race__bar { position: relative; height: 10px; border-radius: 5px; background: var(--grid); }
.race__bar::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1.5px; background: var(--muted); opacity: .5; }
.race__bar i { position: absolute; top: 0; bottom: 0; border-radius: 5px; transition: width .25s ease, left .25s ease; }
.race__bar i.pos { background: var(--good-bg); }
.race__bar i.neg { background: var(--bad-bg); }
.race__val { text-align: right; font-size: 13.5px; font-weight: 800; line-height: 1.1; }
.race__val small { display: block; font-size: 11px; font-weight: 700; opacity: .85; }
.crowd-line { margin: -2px 0 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
@media (max-width: 400px) { .race__row { grid-template-columns: 20px 22px 104px minmax(0, 1fr) 86px; gap: 4px; } .race__name { font-size: 12.5px; } .race__val { font-size: 12.5px; } }

/* Итог раздачи. */
.card--res { text-align: center; }
.res-head { display: flex; align-items: center; justify-content: center; gap: 8px; }
.res-kind { padding: 3px 12px; border-radius: 10px; font-weight: 800; font-size: 14px; color: #fff; }
.res-kind--good { background: var(--good-bg); } .res-kind--bad { background: var(--bad-bg); }
.res-kind--term { background: var(--accent); } .res-kind--pass { background: var(--pass); }
.res-total, .sum-total { margin: 6px 0 2px; font-size: 38px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; animation: pop .4s ease-out both; }
.res-vs { font-size: 14px; color: var(--text-2); }
.res-bal { margin-bottom: 4px; font-size: 15px; }
.res-bal .muted { font-size: 13px; }
.res-place, .sum-place { display: inline-block; margin: 10px 0 4px; padding: 5px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, var(--surface-1)); font-size: 14.5px; }
.breakdown { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13.5px; text-align: left; font-variant-numeric: tabular-nums; }
.breakdown td, .breakdown th { padding: 6px 4px; border-top: 1px solid var(--grid); }
.breakdown th { font-size: 12px; color: var(--muted); font-weight: 600; }
.breakdown td:last-child, .breakdown th:last-child { text-align: right; white-space: nowrap; }
.breakdown__sum td { font-weight: 800; border-top: 2px solid var(--border); }
.reveal-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.reveal-name b { font-size: 18px; line-height: 1.25; }
.cls-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 8px; color: #fff; }
.cls-tag--gold { background: #9a6b00; } .cls-tag--silver { background: #5f6b7a; }
.cls-tag--index { background: var(--accent-2); } .cls-tag--bonds { background: #7a6fbf; } .cls-tag--stock { background: #c2410c; }
.news { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.news li { padding: 5px 0; border-top: 1px solid var(--grid); }
.news li span { display: inline-block; min-width: 86px; font-weight: 700; color: var(--text-2); margin-right: 6px; }
.rob { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 2px; border-top: 1px solid var(--grid); font-size: 14px; font-variant-numeric: tabular-nums; }
.rob__n { display: flex; flex-direction: column; font-weight: 650; min-width: 0; }
.rob__n small { font-weight: 400; font-size: 12px; color: var(--muted); }
.rob b { min-width: 86px; text-align: right; }
.rob--pig { border-top: 2px dashed color-mix(in srgb, #e64980 45%, var(--border)); }
.split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--grid); }
.split i { display: block; height: 100%; }
.split--buy { background: var(--buy); } .split--sell { background: var(--sell); } .split--pass { background: var(--pass); }
.split-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.split-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Итог дня. */
.card--summary { text-align: center; }
.card--summary .coach, .card--summary .lb, .card--summary .rob, .card--summary .sub-h + p { text-align: left; }
.sum-picks { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-top: 12px; }
.sum-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.sum-pick span { font-size: 24px; line-height: 1; }
.sum-pick small { color: var(--muted); font-size: 11px; }
.sum-pick b { font-size: 13px; }
.card--streak { display: flex; align-items: center; gap: 14px; }
.card--streak > .streak-help { flex: none; white-space: nowrap; font-size: 34px; font-weight: 900; color: #e8590c; }
.badge-big { font-size: 56px; text-align: center; line-height: 1.1; margin: 4px 0; animation: pop .5s ease-out both; }

/* Мой стиль. */
.me { display: flex; align-items: center; gap: 12px; }
.paid { margin: 10px 0 0; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; background: color-mix(in srgb, var(--gold) 13%, var(--surface-1)); }
.gauge { display: flex; align-items: center; gap: 12px; }
.gauge b { font-size: 44px; font-weight: 900; color: var(--accent); }
.gauge span { font-size: 14px; color: var(--text-2); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--grid); font-size: 14px; }
.skill { padding: 10px 0; border-top: 1px solid var(--grid); }
.skill:first-of-type { border-top: 0; }
.skill__h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.skill p { margin: 2px 0 6px; }
.was { font-size: 12.5px; color: var(--text-2); }
.wk { display: flex; gap: 6px; align-items: flex-end; height: 74px; }
.wk__c { flex: 1 1 0; max-width: 60px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.wk__c i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--accent) 70%, var(--surface-1)); }
.wk__c span { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wk__c small { font-size: 10.5px; color: var(--muted); }

/* Значки и коллекция. */
.badges, .coll { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--card-border); box-shadow: var(--shadow-card); filter: grayscale(1); opacity: .7; }
.badge.is-got { filter: none; opacity: 1; border: 2px solid color-mix(in srgb, var(--gold) 60%, var(--border)); }
.badge__ico { font-size: 34px; line-height: 1.1; }
.badge b { font-size: 14px; }
.badge span { font-size: 12px; color: var(--text-2); line-height: 1.35; }
.badge small { font-size: 11.5px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.coll__c { display: flex; flex-direction: column; gap: 3px; min-height: 108px; padding: 12px; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--card-border); box-shadow: var(--shadow-card); }
.coll__c b { font-size: 14px; line-height: 1.25; }
.coll__c small { color: var(--muted); font-weight: 700; }
.coll__c > span:last-child { font-size: 12px; color: var(--text-2); }
.coll__c.is-lock { align-items: center; justify-content: center; background: var(--surface-2); box-shadow: none; }
.coll__q { font-size: 34px; font-weight: 900; color: var(--muted); }

/* Дуэль. */
.duel { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0; }
.duel__p { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; background: var(--surface-2); border: 2px solid transparent; }
.duel__p.is-win { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--surface-1)); }
.duel__p span { font-size: 28px; }
.duel__p em { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.duel__vs { font-weight: 900; color: var(--muted); }

/* Актуальные графики. */
.disclaimer { margin: 8px 0 0; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; background: var(--surface-2); color: var(--text-2); }
.stand-warn { margin: 6px 0 0; font-size: 12.5px; color: var(--warn); }
.slot-h { margin-bottom: 6px; }
.bf-name { font-weight: 700; margin: 6px 0 2px; }
.bf-status { margin: 8px 0 0; font-size: 13.5px; }
.sel { width: 100%; height: 44px; padding: 0 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface-1); color: var(--text); font: inherit; font-size: 14.5px; }
.card--slot .sides { margin-top: 8px; }
.card--slot .seg { margin-top: 8px; }

/* Окна. */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; }
.modal__back { position: absolute; inset: 0; background: rgba(10, 14, 20, .5); opacity: 0; transition: opacity .2s ease; }
.modal.is-open .modal__back { opacity: 1; }
.modal__sheet { position: relative; width: min(560px, 100%); max-height: 88vh; overflow-y: auto; padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--surface-1); transform: translateY(40px); opacity: 0; transition: transform .25s cubic-bezier(.3,.9,.4,1), opacity .2s ease; }
.modal.is-open .modal__sheet { transform: none; opacity: 1; }
@media (min-width: 600px) { .modal { place-items: center; } .modal__sheet { border-radius: 22px; max-width: 460px; } }
.modal__m { display: flex; justify-content: center; }
.modal__title { margin: 6px 0 8px; text-align: center; font-size: 20px; }
.modal__body { font-size: 15px; line-height: 1.5; }
.modal__body p { margin: 0 0 10px; }
.modal__btns { display: flex; gap: 10px; margin-top: 12px; }
.modal__btns .btn { flex: 1 1 0; min-height: 50px; }
.nick-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chip-btn { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 2px solid var(--border); background: var(--surface-2); font-weight: 650; cursor: pointer; }
.push { display: flex; gap: 10px; align-items: flex-start; padding: 10px; margin-top: 8px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.push__ico .m { width: 30px; height: 38px; animation: none; }
.push small { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 96px; z-index: 80; transform: translateX(-50%); max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 14px; background: #1f2a37; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: toastIn .25s ease-out both; }
.toast.is-out { opacity: 0; transition: opacity .4s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 13px; border-radius: 2px; animation: fall 1.6s cubic-bezier(.2,.7,.4,1) both; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: .8; } }

/* Ставка из кошелька (27.09.2026) */
.bet { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.bet__row { display: flex; align-items: center; gap: 8px; }
.bet__row .size__lab { margin-right: auto; }
.bet__box { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface-1); }
.bet__box:focus-within { border-color: var(--accent); }
.bet__in { width: 5.5em; border: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 750; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; outline: none; }
.bet .seg__btn { flex: 1 1 0; }
.chip--wallet { font-variant-numeric: tabular-nums; }

/* Кубки недели (28.09.2026) */
.cup { width: 22px; height: 22px; fill: currentColor; vertical-align: middle; }
.cup--1 { color: #d4a017; }
.cup--2 { color: #9aa3ad; }
.cup--3 { color: #b0703c; }
.badge-big .cup { width: 72px; height: 72px; }
.lb__place .cup { width: 20px; height: 20px; }

/* Переключатель «Графики из прошлого / Актуальные графики» (28.09.2026) */
.mode-sw { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.mode-sw__btn { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; padding: 8px 10px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface-1); color: var(--text); cursor: pointer; font: inherit; text-align: center; }
.mode-sw__btn b { font-size: 15px; font-weight: 750; }
.mode-sw__btn span { font-size: 12px; color: var(--muted); }
.mode-sw__btn.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-1)); }
.mode-sw__btn.is-on b { color: var(--accent); }
@media (max-width: 380px) { .mode-sw__btn b { font-size: 13.5px; } .mode-sw__btn span { font-size: 11px; } }
.mode-sw--onb { margin-top: 16px; }
.mode-sw--onb .mode-sw__btn { min-height: 76px; }
.seg__btn.is-soon { cursor: default; opacity: .55; border-style: dashed; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.seg__btn.is-soon small { font-weight: 500; font-size: 12px; color: var(--muted); }
.ch-sellnote { font-size: 12px; font-weight: 750; fill: var(--sell, var(--bad)); paint-order: stroke; stroke: var(--surface-1); stroke-width: 3px; }
.bar__rrow { display: flex; align-items: center; gap: 8px; }
@media (max-width: 440px) { .bar__back span { display: none; } .bar__back { padding-left: 10px; padding-right: 10px; } .bar__rrow { gap: 6px; } }
@media (max-width: 440px) { .bar__sub { display: none; } }
/* Линии до выбора стороны — нейтральные (28.09.2026) */
line.ch-line--neutral { stroke: var(--muted); stroke-dasharray: 6 4; }
.ch-handle.ch-line--neutral circle { stroke: var(--muted); }
.fork__row--neutral { box-shadow: inset 4px 0 0 var(--border); }

/* Кнопки стороны в своих цветах сразу (28.09.2026): «Покупаю» — зеленая,
   «Продаю» — красная, «Пас» — желтая; выбранная — плотнее заливка и тень. */
.side--buy { border-color: var(--buy); background: color-mix(in srgb, var(--buy) 7%, var(--surface-1)); }
.side--sell { border-color: var(--sell); background: color-mix(in srgb, var(--sell) 7%, var(--surface-1)); }
.side--pass { border-color: var(--pass); background: color-mix(in srgb, var(--pass) 8%, var(--surface-1)); }
.side--buy b { color: color-mix(in srgb, var(--buy) 75%, var(--text)); }
.side--sell b { color: color-mix(in srgb, var(--sell) 75%, var(--text)); }
.side--pass b { color: color-mix(in srgb, var(--pass) 65%, var(--text)); }
.side--buy.is-on { background: color-mix(in srgb, var(--buy) 24%, var(--surface-1)); }
.side--sell.is-on { background: color-mix(in srgb, var(--sell) 24%, var(--surface-1)); }
.side--pass.is-on { background: color-mix(in srgb, var(--pass) 26%, var(--surface-1)); }
.res-kind--pass { color: #1c1a14; }

/* Скрываемые подсказки Свечки (28.09.2026) */
.coach--tip .bubble { padding-right: 34px; }
.tip-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.tip-x:hover { background: var(--surface-1); color: var(--text); }
.tip-show { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0 0 12px; padding: 4px 12px 4px 6px; border-radius: 22px; border: 1.5px solid var(--border); background: var(--surface-1); color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.m--mini { width: 26px; height: 32px; animation: none; }

/* Прицел на графике (28.09.2026) */
.ch-scrub { position: absolute; inset: 0; pointer-events: none; }
.ch-scrub[hidden] { display: none; }
.ch-scrub__line { position: absolute; width: 0; border-left: 1.5px dashed var(--text-2); }
.ch-scrub__dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 2px var(--surface-1); }
.ch-tip { position: absolute; max-width: 250px; padding: 8px 11px; border-radius: 12px; background: var(--surface-1); border: 1.5px solid var(--border); box-shadow: 0 6px 20px rgba(0,0,0,.18); font-size: 13px; line-height: 1.45; }
.ch-tip b { font-weight: 750; }
.ch-tip__m { color: var(--muted); font-weight: 500; }
.ch-tip .pos { color: var(--good); } .ch-tip .neg { color: var(--bad); }
.ch-q { font-size: 30px; font-weight: 800; fill: var(--muted); opacity: .55; }

/* Выбор актива в знакомстве (28.09.2026): кнопка на актив, ведет на экран покупки. */
.pick-balance { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 14px 18px; border-radius: 16px; background: color-mix(in srgb, var(--good) 10%, var(--surface-1)); font-weight: 650; }
.pick-balance strong { font-size: 24px; color: var(--good); font-variant-numeric: tabular-nums; }
.asset-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
@media (max-width: 480px) { .asset-pick { grid-template-columns: 1fr; } }
.asset-btn { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface-1); color: var(--text); cursor: pointer; font: inherit; text-align: left; box-shadow: 0 2px 0 var(--border); }
.asset-btn:active { transform: translateY(1px); box-shadow: none; }
@media (hover: hover) { .asset-btn:hover { border-color: var(--accent); } }
.asset-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.asset-logo { flex: none; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 7%); }
.asset-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.asset-logo--sber img, .asset-logo--gazprom img, .asset-logo--novatek img { padding: 4px; }
/* Плашка актива над графиком: лого, название и тикер (23.11.2026). */
.asset-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 750; color: var(--text); }
.asset-badge .asset-logo { width: 22px; height: 22px; border-radius: 6px; }
.asset-badge__tk { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--muted); }
.asset-btn__txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.asset-btn__txt b { font-size: 17px; font-weight: 750; }
.asset-btn__txt span { font-size: 13px; color: var(--muted); }
.asset-btn__go { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.onb__back { display: block; margin: 14px auto 0; }
/* Купленный актив раздачи (28.09.2026): карточка под графиком и отметка на выборе актива. */
.hold__done { display: flex; gap: 10px; align-items: flex-start; }
.hold__done b { font-size: 16px; }
.hold__ok { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2f9e62; color: #fff; font-weight: 800; }
.hold__q { margin: 14px 0 10px; font-size: 16px; font-weight: 700; }
.hold__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .hold__btns { grid-template-columns: 1fr; } .hold__btns #holdYes { order: -1; } }
.asset-btn.is-bought { border-color: #2f9e62; background: color-mix(in srgb, #2f9e62 8%, var(--surface-1)); }
.asset-btn__got { margin-top: 3px; font-size: 13px; font-weight: 750; color: #237a4b; }
@media (prefers-color-scheme: dark) { .asset-btn__got { color: #5cc98c; } }
.scr--pick #pickGo { margin-top: 16px; }
/* Окно «На сколько вперед?» (28.09.2026): ползунок от 1 дня до года и готовые сроки. */
.hz { display: flex; flex-direction: column; gap: 10px; }
.hz__val { text-align: center; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hz__val .muted { font-size: 14px; font-weight: 600; }
.hz__range { width: 100%; height: 32px; accent-color: var(--accent); cursor: pointer; }
.hz__ends { display: flex; justify-content: space-between; margin-top: -8px; font-size: 12px; color: var(--muted); }
.hz__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.hz__chips .chip-btn { min-height: 36px; padding: 0 12px; font-size: 13.5px; color: var(--text); }
.hz__chips .chip-btn.is-on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-1)); }
.res-step { margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--accent); }
/* Прирост в процентах рядом с рублями (28.09.2026). */
.res-total small { display: block; font-size: 17px; font-weight: 700; letter-spacing: 0; }
.counter b { white-space: nowrap; }
.hold__list { margin-top: 3px; font-size: 14.5px; line-height: 1.5; }
/* Сделки после шага в будущее: под каждым графиком (28.09.2026). */
.trade-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 8px 2px; }
.trade-btns[hidden] { display: none; }
/* Режим в разработке: кнопка видна, но не нажимается (28.09.2026). */
.mode-sw__btn.is-soon { cursor: default; opacity: .55; border-style: dashed; }
/* Таблица игры в карточке шага (28.09.2026): промежуточная до срока, потом победители. */
.res-lb__h { margin-top: 12px; text-align: left; }
.res-lb { text-align: left; margin-bottom: 4px; }
.card--res .res-lb + .muted { margin: 0 0 8px; text-align: left; }
/* «До конца игры» в окне шага — отдельной строкой во всю ширину (28.09.2026). */
.hz__chips .chip-btn--end { flex-basis: 100%; }
/* Лимит игр (28.09.2026): таймер до новой игры. */
.wait { text-align: center; margin: 14px 0 16px; }
.wait__lab { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wait__clock { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 4px 0 6px; }
.games-left { text-align: center; margin: 6px 0 0; }

/* Карточки выбора актива: год истории раздачи, скрытое будущее с «?», два факта,
   фирменный логотип и призыв. Две колонки остаются и на телефоне: шесть карточек
   не превращают выбор в длинную ленту. */
.apick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.apick { container: asset-card / inline-size; min-width: 0; --a: #2f6fd0; --a-btn: var(--a); position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px; border-radius: 20px; border: 2px solid color-mix(in srgb, var(--a) 30%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--a) 7%, var(--surface-1)), var(--surface-1) 60%); color: var(--text); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 4px 0 color-mix(in srgb, var(--a) 28%, var(--border)); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; animation: apickIn .45s cubic-bezier(.2, .8, .3, 1.2) both; }
.apick--silver { --a: #7248c8; }
.apick--sber { --a: #21a038; --a-btn: #178134; }
.apick--gazprom { --a: #007ac2; --a-btn: #006aa9; }
.apick--lukoil { --a: #d92836; --a-btn: #bd1f2c; }
.apick--novatek { --a: #d9572a; --a-btn: #bd441e; }
/* В темной теме линия светлее, а кнопка темнее: белый текст на светлой кнопке не читается. */
@media (prefers-color-scheme: dark) {
  .apick { --a: #5a9ef0; --a-btn: #2f6fd0; }
  .apick--silver { --a: #a07ee8; --a-btn: #6a44c0; }
  .apick--sber { --a: #58c979; --a-btn: #178134; }
  .apick--gazprom { --a: #4db5ed; --a-btn: #006aa9; }
  .apick--lukoil { --a: #f06a74; --a-btn: #bd1f2c; }
  .apick--novatek { --a: #f08a64; --a-btn: #bd441e; }
}
.apick--n1 { animation-delay: .08s; }
.apick--n2 { animation-delay: .16s; }
.apick--n3 { animation-delay: .24s; }
.apick--n4 { animation-delay: .32s; }
.apick--n5 { animation-delay: .4s; }
@media (hover: hover) {
  .apick:hover { transform: translateY(-3px); border-color: var(--a); box-shadow: 0 7px 0 color-mix(in srgb, var(--a) 40%, var(--border)), 0 14px 28px -10px color-mix(in srgb, var(--a) 45%, transparent); }
  .apick:hover .apick__arr { transform: translateX(4px); }
  .apick:hover .apick__q { animation-duration: .9s; }
}
.apick:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--a) 28%, var(--border)); }
.apick:focus-visible { outline: 3px solid color-mix(in srgb, var(--a) 50%, transparent); outline-offset: 3px; }
.apick__head { flex-grow: 1; display: flex; align-items: center; gap: 12px; }
.apick__name { hyphens: auto; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.apick__name b { font-size: 18px; font-weight: 800; }
.apick__name span { font-size: 13px; color: var(--muted); }
.apick__spark { display: block; width: 100%; height: auto; color: var(--a); overflow: visible; }
.apick__fut { fill: var(--zone); }
.apick__nowline { stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 3 4; }
.apick__line { fill: none; stroke: var(--a); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: apickDraw 1.1s ease-out .15s forwards; }
.apick--n1 .apick__line { animation-delay: .3s; }
.apick__area { opacity: 0; animation: apickFade .6s ease 1s forwards; }
.apick__ghost { stroke: var(--a); stroke-width: 1.5; stroke-dasharray: 2 5; opacity: .45; }
.apick__dot { fill: var(--a); stroke: var(--surface-1); stroke-width: 2; }
.apick__ring { fill: none; stroke: var(--a); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: apickRing 1.8s ease-out 1.2s infinite; opacity: 0; }
.apick__q { font-size: 44px; font-weight: 900; fill: var(--a); opacity: .75; transform-box: fill-box; transform-origin: center; animation: apickQ 2.4s ease-in-out infinite; }
.apick__axis { display: grid; column-gap: 6px; grid-template-columns: 74fr 26fr; margin-top: -6px; font-size: 11.5px; color: var(--muted); }
.apick__axis span:nth-child(2) { display: none; }
.apick__axis span:last-child { text-align: center; }
.apick__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.apick__fact { overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 12px; background: var(--surface-2); }
.apick__fact i { font-style: normal; font-size: 12px; color: var(--muted); }
.apick__fact b { font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.apick__cta { margin-top: auto; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 14px; background: var(--a-btn); color: #fff; font-weight: 800; font-size: 15.5px; }
.apick__arr { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
@media (max-width: 480px) {
  .apick-row { gap: 10px; }
  .apick { gap: 8px; padding: 10px 10px 9px; border-radius: 17px; }
  .apick__head { gap: 8px; }
  .apick .asset-logo { width: 40px; height: 40px; border-radius: 11px; }
  .apick__name b { font-size: 16px; }
  .apick__fact { padding: 6px 7px; }
  .apick__fact b { font-size: 14px; }
  .apick__cta { min-height: 42px; font-size: 13px; }
  .apick__axis { font-size: 10.5px; }
}
@container asset-card (max-width: 205px) {
  .apick__head { flex-direction: column; align-items: flex-start; }
  .apick__facts { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (max-width: 359px) {
  .apick-row { grid-template-columns: minmax(0, 1fr); }
}
@keyframes apickIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes apickDraw { to { stroke-dashoffset: 0; } }
@keyframes apickFade { to { opacity: 1; } }
@keyframes apickRing { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes apickQ { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) {
  .apick, .apick__area, .apick__ring, .apick__q { animation: none; }
  .apick__area { opacity: 1; }
  .apick__line { animation: none; stroke-dashoffset: 0; }
}


/* ===== Правки по аудиту UX/UI 28.09.2026 («Бумажный волк. Аудит UX-UI стенда 28.09.2026.md») ===== */

/* Тосты — у верхнего края: внизу они закрывали «Покупаю». */
.toast { top: calc(12px + var(--safe-top)); bottom: auto; animation-name: toastInTop; }
@keyframes toastInTop { from { opacity: 0; transform: translate(-50%, -10px); } }

/* Цели касания — от 44 px, текст — от 12 px. */
.avatar { width: 44px; height: 44px; }
.bar__back { height: 44px; min-width: 44px; }
.x { width: 44px; height: 44px; }
.tip-x { width: 44px; height: 44px; top: 0; right: 0; }
.kind-sw__btn { min-height: 40px; }
.trade-btns .btn { min-height: 44px; }
.tab { min-height: 44px; }
.tabs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chip-btn { min-height: 44px; }
.round { width: 44px; height: 44px; }
.bet__box { height: 44px; }
.logo { min-height: 44px; font-size: 18px; }
.logo b { font-weight: 850; letter-spacing: -.01em; }
.ch-ylab, .ch-xlab, .ch-zlab { font-size: 12px; }
.apick__axis { font-size: 12px; }
.wk__c small, .sum-pick small, .badge small, .race__val small { font-size: 12px; }

/* Таблицы: имена целиком (перенос вместо многоточия), метка и «выше Охранника» — второй строкой. */
.lb__head, .lb__row { grid-template-columns: 28px 24px minmax(0, 1fr) auto; gap: 8px; }
.lb__head { font-size: 12px; align-items: center; }
.lb__head span:nth-child(4) { text-align: right; }
.lb__name { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.2; }
.lb__nm { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.lb__name small { border: 0; padding: 0; margin: 1px 0 0; font-size: 12px; font-weight: 500; }
.lb__val { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; white-space: nowrap; }
.lb__val small { font-size: 12px; font-weight: 500; color: var(--muted); }
.lb__row { padding: 6px 8px; }
.lb__av { font-size: 17px; }
.lb__row--wolf { background: color-mix(in srgb, var(--bad-bg) 8%, var(--surface-2)); }
.lb__row--wolf .lb__name small { color: var(--bad); font-weight: 650; }
.qmark { width: 28px; height: 28px; margin-left: 4px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface-1); color: var(--muted); font-weight: 800; font-size: 13px; cursor: pointer; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Переключатель % · ₽ — две таблицы, % по умолчанию. */
.mswitch { display: inline-flex; flex: none; padding: 2px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.mswitch button { min-width: 44px; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 800; font-size: 15px; cursor: pointer; }
.mswitch button[aria-pressed="true"] { background: var(--surface-1); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.card__head:has(.mswitch) { align-items: center; }

/* Шаг времени — кнопками. */
.hops { display: flex; flex-wrap: wrap; gap: 8px; }
.hop { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 2px solid color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--surface-1); color: var(--accent); font: inherit; font-weight: 750; font-size: 14.5px; cursor: pointer; }
.hop:active { transform: translateY(1px); }
.hop--end { background: var(--accent); border-color: var(--accent); color: #fff; }
.hop--auto { border-style: dashed; }
.hold__go { margin-top: 12px; }
.hold__go .sub-h { margin-top: 0; }
.card--hold #holdYes { margin-top: 10px; }
.note-warn { margin: 12px 0 0; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, var(--surface-1)); font-size: 13.5px; }
.foot__in--col { flex-direction: column; align-items: stretch; gap: 8px; }
.foot__in--col .foot__verdict { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; }
.foot--step .hops { justify-content: center; }
.foot--step .hop { background: var(--surface-1); min-height: 42px; padding: 0 12px; font-size: 14px; }
.foot--step .hop--end { background: var(--accent); color: #fff; }
.scr--deal .scr__body { padding-bottom: 190px; }

/* Окно суммы: доли кошелька и живой пример. */
.bet__shares { display: flex; gap: 8px; }
.bet__shares .chip-btn { flex: 1 1 0; }
.bet__ex { margin: 0; min-height: 2.6em; font-size: 13.5px; color: var(--text-2); }
.modal__btns .btn:disabled { opacity: .45; cursor: not-allowed; }

/* Точка сделки — подписью в шапке карточки, а не поверх свечей. */
.entry-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 14px; background: color-mix(in srgb, var(--good-bg) 15%, var(--surface-1)); color: var(--good); font-weight: 750; font-size: 13px; }
.chart-top__btns { align-items: center; }

/* Гонка над графиками во время прокрутки. */
.card--race-top { padding-top: 10px; padding-bottom: 10px; }
.card--race-top .card__head { margin-bottom: 4px; }
.race__row--wolf { outline: 1.5px solid color-mix(in srgb, var(--bad-bg) 45%, transparent); outline-offset: -1.5px; }

/* Итог шага и игры — одна карточка. */
.res-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.res-cap { font-size: 14px; font-weight: 750; color: var(--accent); text-align: left; }
.res-up { color: var(--good); font-weight: 800; animation: pop .5s ease-out both; display: inline-block; }
.res-down { color: var(--bad); font-weight: 800; animation: pop .5s ease-out both; display: inline-block; }
.res-wolf { margin: 8px 0 0; padding: 7px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bad-bg) 10%, var(--surface-1)); font-size: 14px; }
.res-wolf.is-ahead { background: color-mix(in srgb, var(--good-bg) 14%, var(--surface-1)); }
.res-lb__n { text-align: left; margin: 4px 0 0; }
.res-more { margin-top: 10px; text-align: left; }
.res-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 650; color: var(--accent); }
.rate-note { margin: 4px 0 10px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--surface-1)); font-size: 13.5px; line-height: 1.45; }
.rate-note span { display: block; margin-top: 3px; color: var(--text-2); font-size: 12.5px; }

/* Остановка на рыночном событии: новость — повод решить, а не приказ сделать сделку. */
.card--event { border: 2px solid color-mix(in srgb, var(--gold) 48%, var(--border)); background: color-mix(in srgb, var(--gold) 7%, var(--surface-1)); }
.event__list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.event__item { padding: 9px 12px; border-radius: 12px; background: var(--surface-1); border: 1.5px solid var(--border); }
.event__item p { margin: 5px 0 0; font-size: 14.5px; font-weight: 650; line-height: 1.4; }
.event__item .event__meaning { margin-top: 8px; color: var(--text-2); font-weight: 400; line-height: 1.5; }
.event-analysts { margin: 16px 0; }
.event-analysts h3 { margin: 0 0 6px; font-size: 16px; }
.apick__position:empty { display: none; }
.event-asset__owned { color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.event-asset__amounts { display: flex; flex-wrap: wrap; gap: 0 5px; }
.event-asset__owned { max-width: 100%; }
.apick:has(.event-asset__owned) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.event-price-line { display: block; width: 100%; color: var(--accent); margin: 7px 0; }
.event-chart-dates { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px; font-variant-numeric: tabular-nums; }
.event-chart-dates { color: var(--text-2); font-size: 12px; }
dialog.event-asset-page { position: fixed; inset: 0; box-sizing: border-box; margin: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; overflow: auto; overscroll-behavior: contain; padding: calc(20px + var(--safe-top)) 16px 20px; border: none; color: var(--text); background: var(--surface-1); }
.event-asset-page main { width: min(100%, 680px); margin: auto; }
.event-asset-page h2 { margin: 22px 0 8px; }
.event-asset-page h3 { margin: 24px 0 8px; }
.event-asset-page .brief-view p { line-height: 1.5; }
.event__kind { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, var(--surface-1)); color: color-mix(in srgb, var(--warn) 85%, var(--text)); font-size: 12px; font-weight: 800; }
.event__move { display: flex; flex-direction: column; gap: 4px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.event__move span:first-child { color: var(--text-2); font-weight: 600; }
.event__note { margin: 10px 0 12px; font-size: 13px; line-height: 1.45; color: var(--text-2); }
dialog.card--event {
  position: fixed; inset: 0; margin: auto; width: min(540px, calc(100% - 32px));
  max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; color: var(--text);
}
dialog.card--event::backdrop { background: rgba(10, 14, 20, .52); }
html:has(#marketStop[open]) { overflow: hidden; }
.scr--deal:has(#marketStop[open]) .card--step [data-advance] { display: none; }
.event__close { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-2); font-size: 25px; cursor: pointer; }
.event__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.event__actions .btn { flex: 1 1 170px; min-height: 48px; }

/* Карточка события по клику на «!». */
.modal__sheet--event .event__item { background: var(--surface-2); }
.event-info__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.event-info__prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, var(--surface-1)); font-size: 13.5px; font-weight: 750; font-variant-numeric: tabular-nums; }
.event-info__prices .muted { font-weight: 500; }
.event-more { margin-top: 8px; border-top: 1px solid var(--border); }
.event-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--accent); font-size: 13.5px; font-weight: 700; }
.event-more ul { margin: 2px 0 8px; padding-left: 20px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.event-more li + li { margin-top: 6px; }

/* «Что это было» — перевертыши с настоящими названиями. */
.card--reveal { text-align: center; }
.flips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; perspective: 800px; }
.flip { height: 92px; }
.flip__in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: flipIt .7s ease-in-out .5s forwards; }
.flip--n1 .flip__in { animation-delay: 1.1s; }
.flip__f, .flip__b { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 2px solid var(--border); background: var(--surface-2); }
.flip__b { transform: rotateY(180deg); border-color: color-mix(in srgb, var(--gold) 60%, var(--border)); background: color-mix(in srgb, var(--gold) 12%, var(--surface-1)); }
.flip__b b { font-size: 19px; font-weight: 850; }
.flip__b span { font-weight: 750; }
@keyframes flipIt { to { transform: rotateY(180deg); } }
.reveal__period { margin: 12px 0 4px; font-weight: 700; }
.reveal__ev { margin: 6px 0 10px; padding-left: 20px; text-align: left; font-size: 13.5px; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .flip__in { animation-duration: .01s; animation-delay: 0s; } }

/* Главная: ритуал 40 ₽, серия, вчерашний турнир, Волк, лиги. */
.card--claim { display: flex; align-items: center; gap: 12px; border: 2px solid color-mix(in srgb, var(--gold) 55%, var(--border)); background: color-mix(in srgb, var(--gold) 9%, var(--surface-1)); }
.claim__bag { font-size: 34px; animation: bob 1.6s ease-in-out infinite; }
.claim__t { flex: 1 1 auto; display: flex; flex-direction: column; }
.claim__t span { font-size: 13px; color: var(--text-2); }
.card--daily-wait { border-color: var(--border); background: var(--surface-1); }
.claim__mascot { flex: 0 0 58px; width: 58px; }
.claim__clock { display: inline-block; color: var(--text); font-size: 1.1em; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 430px) {
  .card--claim { flex-wrap: wrap; }
  .card--claim .btn { width: 100%; }
  .card--daily-wait { flex-wrap: nowrap; }
}
.coin { position: fixed; z-index: 90; font-style: normal; font-size: 22px; pointer-events: none; animation: coinFly .9s ease-in forwards; }
@keyframes coinFly { 0% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(.5); opacity: .2; } }
.streak { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.freeze-help, .streak-help { position: relative; background: transparent; padding: 0; border: 0; border-radius: 4px; cursor: pointer; }
.freeze-help::before, .streak-help::before { content: ''; position: absolute; inset: -8px -3px; }
.freeze-help:focus-visible, .streak-help:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.streak .streak-help, .streak .freeze-help { font-weight: 800; font-size: 15px; white-space: nowrap; }
.streak__days { display: flex; gap: 4px; }
.sd { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grid); color: var(--muted); font-size: 12px; font-weight: 700; }
.sd.is-on { background: #f08c00; color: #fff; }
.sd.is-frozen { background: #74c0fc; color: #fff; }
.sd.is-today { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 380px) { .sd { width: 26px; height: 26px; } }
.card--yday p { margin: 0 0 4px; }
.card--wolf { display: flex; align-items: center; gap: 12px; border: 2px solid color-mix(in srgb, var(--bad-bg) 30%, var(--border)); }
.wolf__av { font-size: 34px; }
.wolf__t { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.3; }
.wolf__t span { font-size: 12.5px; color: var(--text-2); }
.wolf__sc { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dots .dot { display: grid; place-items: center; width: 26px; height: 26px; color: #fff; font-weight: 900; font-size: 14px; }
.dots .dot--pass { color: var(--pass); }
.league-dot { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; background: var(--m0); }
.card--league-1 .league-dot { background: var(--m2); }
.card--league-2 .league-dot { background: var(--m3); }
.card--league-0 { border-top: 4px solid var(--m0); }
.card--league-1 { border-top: 4px solid var(--m2); }
.card--league-2 { border-top: 4px solid var(--m3); }
.league-hint--down { background: color-mix(in srgb, var(--bad-bg) 11%, var(--surface-1)); }
.cups-shelf { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.cups-shelf__c { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.cups-shelf .cup { width: 24px; height: 24px; }
.bar-prog--sm { display: block; height: 6px; margin: 6px 0 0; }
.w0 { width: 0%; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; } 

/* Демо на приветствии. */
.demo { display: block; width: min(320px, 100%); margin: 4px auto 18px; overflow: visible; }
.demo__fut { fill: var(--zone); stroke: var(--border); stroke-dasharray: 4 4; }
.demo__hist { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.demo__next { fill: none; stroke: var(--good-bg); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: demoDraw 4.5s ease-in-out infinite; }
.demo__dot { fill: var(--accent); }
.demo__q { font-size: 44px; font-weight: 900; fill: var(--muted); animation: demoQ 4.5s ease-in-out infinite; }
.demo__win { opacity: 0; animation: demoWin 4.5s ease-in-out infinite; }
.demo__win rect { fill: var(--gold); }
.demo__win text { fill: #1c1a14; font-size: 12px; font-weight: 800; }
@keyframes demoDraw { 0%, 25% { stroke-dashoffset: 1; } 60%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes demoQ { 0%, 25% { opacity: 1; } 40%, 90% { opacity: 0; } 100% { opacity: 1; } }
@keyframes demoWin { 0%, 55% { opacity: 0; } 65%, 90% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .demo__next { animation: none; stroke-dashoffset: 0; } .demo__q { animation: none; opacity: 0; } .demo__win { animation: none; opacity: 1; } }
.onb__small { margin-top: 12px; }

/* Меню профиля: переходы в разделы и окна «Как играть» / «Уведомления». */
.menu { display: flex; flex-direction: column; padding: 4px 0 8px; }
.menu__i { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 6px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.menu__i:hover { background: var(--hover); }
/* Пункт-ссылка «К аналитике счета» (стенд открыт с сайта) — как кнопки рядом. */
a.menu__i { text-decoration: none; }
.menu__i > span:first-child { width: 26px; text-align: center; font-size: 18px; }
.menu__t { flex: 1; min-width: 0; }
.menu__t small { display: block; color: var(--text-2); font-size: 13px; font-weight: 500; }
.menu__go, .todo__go { margin-left: auto; color: var(--muted); font-size: 20px; }
.pf-svc { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 2px 0; border-top: 1px solid var(--grid); }
.link-danger { min-height: 44px; padding: 0; border: 0; background: none; color: var(--bad); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.rules { margin: 0; padding-left: 18px; text-align: left; }
.rules li { margin-bottom: 8px; }

/* Экран ожидания: чем заняться. */
.todo { display: flex; flex-direction: column; gap: 4px; }
.todo__i { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 8px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.todo__i > span:first-child { font-size: 22px; width: 28px; text-align: center; }
.todo__i b { display: block; }
.todo__i small { color: var(--text-2); font-size: 13px; }
.card--wait #remind { margin-top: 12px; }

/* Компьютер: графики слева, итог и гонка справа — без прокрутки. */
@media (min-width: 1000px) {
  .app:has(.scr--deal) { max-width: 1140px; }
  .scr--deal .scr__body { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 0 18px; align-items: start; }
  .scr--deal .deal-charts { grid-column: 1; grid-row: 1 / span 3; }
  .scr--deal #coach, .scr--deal #resHost, .scr--deal #panel { grid-column: 2; }
  .scr--deal .foot__in { max-width: 1108px; }
}

/* Доводка после проверки 29.09.2026. */
.dots .dot { width: 22px; height: 22px; }
.card--tour .dots .dot { width: 26px; height: 26px; }
.dots--sm .dot { width: 10px; height: 10px; font-size: 0; }
.chip--wallet small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
@media (max-width: 440px) { .chip--wallet small { display: none; } }
.side span { font-size: 12px; }
.wk__c span { font-size: 12px; }
.qmark { width: 36px; height: 36px; }
.sum-total small { display: block; font-size: 17px; font-weight: 700; letter-spacing: 0; }
@media (max-width: 380px) { .streak__days { gap: 3px; } .sd { width: 22px; height: 22px; font-size: 0; } .streak .streak-help, .streak .freeze-help { font-size: 14px; } }
/* Узкие экраны (iPhone SE, 320–380 px): подпись позиции переносится, нижняя полоса ниже. */
.counter { flex-wrap: wrap; }
.counter span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 380px) {
  .counter b { font-size: 22px; }
  .foot { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .foot__verdict b { font-size: 18px; }
  .foot--step .hops { gap: 6px; }
  .foot--step .hop { min-height: 40px; padding: 0 10px; font-size: 13px; }
  .hop { padding: 0 11px; font-size: 13.5px; }
}
@media (min-width: 1000px) { .scr--deal .scr__body { grid-template-rows: auto auto 1fr; } }
@media (max-width: 380px) { .bar__rrow .dots--sm { display: none; } }

/* Кошелек — кнопка с историей поступлений (29.09.2026) */
button.chip--wallet { font: inherit; font-weight: 700; color: var(--text); cursor: pointer; position: relative; }
button.chip--wallet::before { content: ''; position: absolute; inset: -6px -2px; }
@media (hover: hover) { button.chip--wallet:hover { border-color: var(--accent); } }
button.chip--wallet:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.wl-sum { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 12px; }
.wl-sum__r { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.wl-sum__r--total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 7px; font-size: 16px; }
.wl-note, .wl-warn { font-size: 13.5px; color: var(--muted); }
.wl-warn { color: var(--bad); }
.wl-day { margin: 12px 0 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.wl-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.wl-row__t, .wl-row__v { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wl-row__t span, .wl-row__v span { font-size: 12.5px; line-height: 1.35; }
.wl-row__v { align-items: flex-end; flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Обратный отсчет до следующей игры на главной (29.09.2026) */
.hub-wait { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; margin: 10px 0 2px; text-align: center; }
.hub-wait__lab { font-size: 14px; font-weight: 650; color: var(--muted); }
.hub-wait__clock { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* Своя подпись кнопки «назад» — видна и на телефоне, переносится в две строки (29.09.2026) */
.bar__back--label, .bar__back--label svg { flex: none; }
.bar__back--label span { line-height: 1.15; text-align: left; }
/* На телефоне подпись и заголовок вместе не помещаются: заголовок прячется, подпись — в одну строку; на iPhone SE — в две («На главную» склеено неразрывным пробелом). */
@media (max-width: 440px) {
  .bar__back--label span { display: inline; white-space: nowrap; }
  .bar__back--label { padding-left: 4px; }
  .bar:has(.bar__back--label) .bar__title { display: none; }
}
@media (max-width: 400px) { .bar__back--label { flex: 0 1 auto; } .bar__back--label span { white-space: normal; } }

/* Турнир дня до 19:00 по Москве (29.09.2026): место сейчас и отсчет до финала. */
.tour-live { margin-top: 10px; text-align: center; }
.tour-live__place { display: inline-block; margin-bottom: 6px; padding: 5px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, var(--surface-1)); font-size: 14.5px; }
.tour-final { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; margin: 8px 0 2px; }
.tour-final__lab { font-size: 14px; font-weight: 650; color: var(--muted); }
.tour-final__clock { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tour-final--soon .tour-final__clock { color: var(--bad); }
.tour-live .btn { margin-top: 10px; }
.card--summary .tour-final + .muted { margin-top: 0; }

/* Окно «Лиги» (29.09.2026): лига на главной — кнопка, в окне три лиги с зонами перехода и правила. */
.league-open { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.league-open__go { margin-left: 6px; color: var(--muted); font-size: 22px; line-height: 1; transition: transform .15s ease; }
@media (hover: hover) { .league-open:hover .league-open__go { transform: translateX(3px); color: var(--text); } }
.league-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.modal__sheet.sheet--leagues { padding-top: 12px; }
@media (min-width: 600px) { .modal__sheet.sheet--leagues { max-width: 560px; } }
.sheet--leagues .modal__title { position: sticky; top: -12px; z-index: 2; margin: -12px -18px 0; padding: 8px 56px 4px; line-height: 36px; background: var(--surface-1); }
.lg-x { position: absolute; top: 4px; right: 8px; line-height: 1; font-size: 28px; }
@media (hover: hover) { .lg-x:hover { color: var(--text); background: var(--surface-2); } }
.lg-tabs { position: sticky; top: 36px; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 -2px; padding: 6px 2px 8px; background: var(--surface-1); }
.lg-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 6px 4px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--muted); font: inherit; font-weight: 750; font-size: 14px; cursor: pointer; }
.lg-tab .league-dot { margin: 0; width: 10px; height: 10px; }
.lg-tab--1 .league-dot { background: var(--m2); }
.lg-tab--2 .league-dot { background: var(--m3); }
.lg-tab small { font-size: 11px; font-weight: 600; color: var(--accent); }
.lg-tab.is-on { color: var(--text); background: var(--surface-1); border-color: var(--accent); }
.lg-when { margin: 2px 0 8px; }
.lg-me { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.lg-me--up { background: color-mix(in srgb, var(--good-bg) 16%, var(--surface-1)); }
.lg-me--down { background: color-mix(in srgb, var(--bad-bg) 16%, var(--surface-1)); }
.lg-zone { margin-top: 12px; }
.lg-zone__h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 2px 2px; font-size: 14px; }
.lg-zone__h span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.lg-zone--up .lg-zone__h b { color: var(--good); }
.lg-zone--down .lg-zone__h b { color: var(--bad); }
.lg-zone .lb { margin-top: 4px; }
.lg-rules h3 { margin: 4px 0 6px; font-size: 16px; }
.lg-rules .rules + h3 { margin-top: 14px; }
@media (max-width: 400px) { .lg-tab { font-size: 13px; padding: 6px 2px; } .lg-tabs { gap: 4px; } }
/* Окно «Лиги» — под шапкой сайта, а не поверх нее (29.09.2026). */
.modal.modal--under-top { top: var(--top-h, 0px); }
.modal.modal--under-top::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: var(--top-h, 0px); }
.modal--under-top .modal__sheet { max-height: calc(100% - 12px); }
@media (min-width: 600px) { .modal.modal--under-top { place-items: start center; padding-top: 12px; } .modal--under-top .modal__sheet { max-height: calc(100% - 24px); } }

/* Карта исторических событий. Изгибы соединяют центры соседних остановок. */
.app:has(.practice-atlas) { max-width: 820px; }
.practice-atlas {
  --map-ink: color-mix(in srgb, var(--text-2) 65%, #a78759);
  --map-paper: color-mix(in srgb, var(--surface-1) 95%, #d1a568);
  --map-grid: color-mix(in srgb, var(--map-ink) 9%, transparent);
  padding: clamp(14px, 3.5vw, 30px);
}
.practice-atlas .card__head { align-items: center; }
.practice-atlas .card__head h2 { font: bold clamp(23px, 4vw, 34px)/1.12 Georgia, serif; letter-spacing: -.035em; }
.route-progress { height: 4px; background: var(--grid); border-radius: 4px; margin: 13px 0 16px; overflow: hidden; }
.route-progress i { display: block; height: 100%; background: var(--good); }
.practice-route {
  list-style: none; margin: 18px 0 0; padding: clamp(12px, 2vw, 24px) clamp(8px, 2vw, 22px);
  border: 1px solid var(--border); border-radius: 18px;
  background-color: var(--map-paper);
  background-image: linear-gradient(var(--map-grid) 1px, transparent 1px), linear-gradient(90deg, var(--map-grid) 1px, transparent 1px);
  background-size: 22px 22px;
}
.route-step { --trail-color: var(--map-ink); }
.route-step--done { --trail-color: var(--good); }
.route-stop { position: relative; display: grid; grid-template-columns: 32% 68%; align-items: center; }
.route-step:nth-child(even) .route-stop { grid-template-columns: 68% 32%; }
.route-stop::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 16%;
  width: 0; border-left: 3px dashed var(--trail-color); transform: translateX(-50%);
}
.route-step:nth-child(even) .route-stop::before { left: 84%; }
.route-step:first-child .route-stop::before { top: 50%; }
.route-step:last-child .route-stop::before { bottom: 50%; }
.route-marker {
  grid-row: 1; grid-column: 1; position: relative; justify-self: center;
  width: min(82%, 146px); padding: 4px; border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface-1); box-shadow: 0 3px 9px #172c432b;
}
.route-marker img { display: block; width: 100%; height: auto; border-radius: inherit; }
.route-marker span {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px;
  display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--surface-1);
  background: var(--text-2); color: var(--surface-1); font-size: 12px; font-weight: 750;
}
.route-step:nth-child(even) .route-marker { grid-column: 2; }
.route-card {
  grid-column: 2; grid-row: 1; position: relative; padding: clamp(12px, 2vw, 20px);
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface-1); box-shadow: var(--shadow-card);
}
.route-step:nth-child(even) .route-card { grid-column: 1; }
.route-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px 8px; color: var(--text-2); font-size: 12px; }
.route-meta strong { font-size: 11px; font-weight: 650; }
.route-card h3 { margin: 6px 0; font: bold clamp(18px, 2.8vw, 27px)/1.12 Georgia, serif; letter-spacing: -.025em; }
.route-card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.route-card .btn { margin-top: 12px; max-width: 100%; }
.route-step--current .route-card, .route-step--current .route-marker { border-color: var(--accent); }
.route-step--current .route-marker { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.route-step--current .route-marker span { background: var(--accent); color: white; }
.route-step--current strong { color: var(--accent); }
.route-step--done strong { color: var(--good); }
.route-step--done .route-marker span { background: var(--good); }
.route-bend { display: block; width: 100%; height: clamp(38px, 6vw, 68px); overflow: visible; }
.route-bend path { fill: none; stroke: var(--trail-color); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 4 7; }
.route-step:nth-child(even) .route-bend { transform: scaleX(-1); }
@media (max-width: 480px) {
  .scr__body:has(.practice-atlas) { padding-inline: 8px; }
  .practice-atlas { padding-inline: 10px; }
  .route-card { padding: 10px; }
  .route-card p { font-size: 13px; }
  .route-card .btn { padding-inline: 10px; }
}

/* ---------- Настройки: имя, аватар (24.11.2026) ---------- */
.set-me { display: flex; align-items: center; gap: 14px; }
.set-me .field { flex: 1; margin: 0; }
/* Выбор аватара открывается кликом по своему аватару, карандаш — подсказка под ним. */
.set-ava { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; padding: 0; border: 0; background: none; cursor: pointer; }
.set-ava__pen { font-size: 13px; line-height: 1; opacity: .7; }
.set-ava.is-open .set-ava__pen { opacity: 1; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 12px; }
.emoji-grid[hidden] { display: none; }
.emoji-btn { aspect-ratio: 1; display: grid; place-items: center; border: 2px solid transparent; border-radius: 12px; background: var(--surface-2); font-size: 20px; cursor: pointer; }
.player-form { max-width: 440px; margin: 0 auto; gap: 18px; }
/* Анкета ограничена видимой высотой: при открытой клавиатуре сетка аватаров
   прокручивается, а «Готово» остается над клавиатурой. --visible-h — готовая
   видимая высота из boot.js (visualViewport); из --tg-viewport-height
   клавиатуру не вычитаем — Telegram уменьшает его сам, вычитание считало бы
   ее дважды. Нижний отступ меньше общего: нижнего меню на этом экране нет. */
.scr__body:has(.player-form) {
  display: flex; flex-direction: column;
  height: var(--visible-h, var(--tg-viewport-height, 100dvh));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  /* Низкие телефоны: даже без сетки анкета выше видимой области — экран
     прокручивается целиком, «Готово» достижимо. */
  overflow-y: auto;
}
.player-form { flex: 1 1 auto; min-height: 0; }
.player-form fieldset { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.player-form .emoji-grid { flex: 1 1 auto; min-height: 64px; overflow-y: auto; align-content: start; }
.player-form .btn--xl { flex: none; }
/* Клавиатура открыта: описание прячем, зазоры жмем — аватаров видно больше. */
body.kbd-open .player-form { gap: 12px; }
body.kbd-open .player-form .onb__text { display: none; }
.player-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.player-form legend, .player-form .field > span { padding: 0; font-size: 15px; font-weight: 650; color: var(--text); }
.player-form .emoji-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 8px; }
.player-form .emoji-btn { position: relative; }
.player-form .emoji-btn input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.player-form .emoji-btn:has(:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface-1)); }
.player-form .emoji-btn:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.emoji-btn:hover { background: var(--hover); }
.emoji-btn.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-1)); }
.link { min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }

/* ---------- Главная: награды рядом (24.11.2026) ---------- */
.badges--row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; }
.badges--row .badge { padding: 10px 8px; align-items: center; text-align: center; }
.badges--row .badge b { font-size: 11.5px; line-height: 1.2; }
.badges--row .badge small { display: none; }
.badges--row .badge__ico { font-size: 26px; }
@media (max-width: 400px) { .emoji-grid { grid-template-columns: repeat(6, 1fr); } }

/* Плашка-тикер для активов без логотипа (индексы Практики, 24.11.2026). */
.asset-logo--idx { background: var(--accent); color: #fff; }
.asset-logo--idx b { font-size: 11px; font-weight: 800; letter-spacing: .01em; }
.asset-badge .asset-logo--idx b { font-size: 6px; }
.apick .asset-logo--idx b { font-size: 9px; }

/* Persistent section navigation above the mobile breakpoint. */
@media (min-width: 721px) {
  .mobile-nav {
    display: flex; justify-content: center; gap: 6px; padding: 8px 16px;
    border-bottom: 1px solid var(--border); background: var(--surface-1);
  }
  .mobile-nav__item {
    display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px;
    border: 0; border-radius: 12px; background: transparent; color: var(--text-2);
    font: inherit; font-weight: 650; cursor: pointer;
  }
  .mobile-nav__item:hover { background: var(--hover); }
  .mobile-nav__item.is-active { color: var(--accent); background: var(--grid); }
  .mobile-nav__item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .app:has(.apick-row) { max-width: 1000px; }
  :is(.scr--onb, .scr--pick) .apick-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :is(.scr--onb, .scr--pick) .apick__spark { max-height: 88px; }
  .scr--onb .coach { max-width: 720px; }
}
#hubPlay { margin-top: 14px; }
.other-assets > summary { padding: 8px 4px; font-weight: 650; cursor: pointer; min-height: 44px; }
.other-assets > .card--chart { margin: 12px 0; }
.trade-btns [data-hold] { grid-column: 1 / -1; }
@media (min-width: 540px) {
  .trade-btns:has([data-hold]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trade-btns [data-hold] { grid-column: auto; }
}
.scr--onb .onb__small { margin: 0; }
#coach:empty { display: none; }
@media (max-width: 720px) {
  .card--step .res-total small { display: inline; padding-left: 4px; }
  .card--step .res-place { margin-top: 4px; }
  .card--step .res-more { margin-top: 2px; }
  .card--step .res-more summary { min-height: 44px; }
}

.asset-brief { border-top: 1px solid var(--border); margin: 4px 6px 0; }
.asset-brief > summary { padding: 12px 0; min-height: 44px; cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 700; }
.asset-brief__body { font-size: 14px; line-height: 1.5; padding: 0 0 8px; }
.asset-brief__body p { margin: 0 0 8px; }
.asset-brief__body h3 { font-size: 16px; margin: 14px 0 3px; }
.asset-brief__body .brief-period, .brief-view small { color: var(--text-2); font-size: 12px; }
.asset-brief__body a { color: var(--accent); }
.brief-views { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; margin-top: 8px; }
.brief-view { padding: 10px 12px; border-inline-start: 3px solid var(--buy); border-radius: 4px; background: var(--surface-2); }
.brief-view--sell { border-color: var(--sell); }
.brief-view h4 { margin: 0 0 6px; font-size: 14px; color: var(--good); }
.brief-view--sell h4 { color: var(--bad); }
.brief-view b, .brief-view small { display: block; }
.brief-author { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 10px; margin: 10px 0 12px; }
.brief-author img { display: block; width: 72px; height: 72px; border-radius: 12px; }
.brief-author b, .brief-author__firm, .brief-author small { line-height: 1.3; }
.brief-author__firm { display: block; font-size: 13px; margin: 2px 0 3px; }
.brief-view > p { margin-bottom: 0; }

/* Инструменты технического анализа в карточке актива. */
.ta-panel { margin: 2px 0 4px; color: var(--text-2); font-size: 13px; }
.ta-panel summary { width: fit-content; padding: 8px 4px; cursor: pointer; color: var(--accent); font-weight: 700; }
.ta-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.ta-actions button { min-height: 36px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-1); color: var(--text); font: inherit; font-weight: 650; cursor: pointer; }
.ta-actions button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-1)); }
.ta-actions button:disabled { opacity: .45; cursor: default; }
.ta-sma20 { --study-color: #a35c00; }
.ta-sma50 { --study-color: #7754aa; }
@media (prefers-color-scheme: dark) {
  .ta-sma20 { --study-color: #f3ba61; }
  .ta-sma50 { --study-color: #c7a0ff; }
}
.ta-actions [data-period]::before { content: ''; display: inline-block; width: 13px; margin-right: 5px; vertical-align: middle; border-top: 2px solid var(--study-color); }
.ta-actions [data-period="50"]::before { border-top-style: dashed; }
.ta-help { margin: 6px 0; font-size: 12px; }
.ta-overlay { overflow: hidden; pointer-events: none; }
.ta-avg, .ta-level, .ta-trend, .ta-measure { fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.ta-avg { stroke: var(--study-color); }
.ta-avg.ta-sma50 { stroke-dasharray: 5 2; }
.ta-level, .ta-trend, .ta-measure { stroke: var(--text-2); }
.ta-level { stroke-dasharray: 6 3; }
.ta-measure { stroke-dasharray: 2 2; }
.ta-label { fill: var(--text); stroke: var(--surface-1); stroke-width: 3px; paint-order: stroke; font-size: 11px; font-weight: 700; }
.ta-anchor { fill: var(--accent); stroke: var(--surface-1); stroke-width: 2; }
.ta-drawing, .ta-drawing .ch-event { cursor: crosshair; }
.ta-drawing .ch-grab { pointer-events: none; }
.ch-tip [class^="ta-sma"] { color: var(--study-color); }
@media (pointer: coarse) {
  .ta-panel summary, .ta-actions button { min-height: 44px; }
  .ta-panel summary { align-content: center; }
}

#data-loading { color: var(--text); background: var(--surface-1); padding: 1rem 1.5rem; border: 0; border-radius: 1rem; }
#data-loading::backdrop { background: rgb(0 0 0 / .26); }

.app:has(.course) { max-width: 980px; }
.course { --ink: #153c37; --paper: #faf7ef; --wash: #e5ede2; --rule: #c3cec1; --course-serif: Georgia, "Times New Roman", serif; }
@media (prefers-color-scheme: dark) {
  .course { --ink: #d5e7db; --paper: #22251f; --wash: #293a32; --rule: #49594b; }
}
.course :is(button,summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.course h1, .course-reader h2, .course-tile strong { font-family: var(--course-serif); font-weight: 600; letter-spacing: -.035em; }
.course-library { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(0,1.55fr); gap: clamp(20px,4vw,56px); padding-top: 26px; }
.course-library-head { align-self:start; padding: 23px; color: var(--ink); background: var(--wash); border-radius: 6px 22px 22px 6px; border-left: 5px solid var(--ink); }
.course h1 { font-size: clamp(34px,4.6vw,54px); line-height: 1.03; margin: 0 0 14px; }
.course-library-head p, .course-cover p { margin: 0; font-size: 16px; line-height: 1.5; }
.course-progress { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0 6px; font-size: 13px; }
.course progress { display: block; appearance:none; width: 100%; height: 5px; border: 0; border-radius: 8px; overflow: hidden; background: var(--rule); color: var(--ink); }
.course progress::-webkit-progress-bar { background: var(--rule); }
.course progress::-webkit-progress-value { background: var(--ink); }
.course progress::-moz-progress-bar { background: var(--ink); }
.course-shelf { margin-bottom: 26px; }
.course-shelf h2 { margin: 0 0 10px; color: var(--text-2); font-size: 14px; font-weight: 650; }
.course-tile { display: grid; grid-template-columns: 96px 1fr 28px; gap: 18px; align-items: center; width: 100%; text-align: left; padding: 0 16px 0 0; background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px; overflow:hidden; cursor:pointer; box-shadow: var(--shadow-card); }
.course-tile + .course-tile { margin-top: 8px; }
.course-tile:hover { border-color: var(--ink); background: var(--paper); }
.course-tile img { width: 100%; height: 100%; min-height: 94px; object-fit: cover; }
.course-tile-copy { padding: 10px 0; min-width:0; }
.course-tile strong { display: block; font-size: clamp(20px,2.3vw,27px); line-height: 1.15; }
.course-tile small { display: block; margin-top: 7px; font-size: 12px; color: var(--text-2); }
.course-arrow { display:grid; place-items:center; border-radius:50%; border:1px solid var(--border); width:28px; height:28px; color:var(--ink); font-size:17px; }
.course-reader { max-width: 880px; margin: 0 auto; padding-top: 22px; }
.course-cover { display:grid; grid-template-columns: minmax(0,1fr) minmax(160px,34%); align-items: center; gap:24px; background:var(--wash); color:var(--ink); border-radius:18px; padding: clamp(16px,3vw,30px); }
.course-cover > div { grid-column:1; grid-row:1; }
.course-cover img { grid-column:2; grid-row:1; display:block; width:100%; height:auto; border-radius:9px; }
.course-kicker { font-size: 12px; font-weight: 700; line-height:1.45; letter-spacing:.04em; color:var(--ink); margin-bottom:10px; }
.course-paper { max-width: 700px; margin: 0 auto; padding: 18px clamp(0px,3vw,22px); }
.course-contents { padding: 12px 0; border-block:1px solid var(--border); margin-bottom:28px; }
.course-contents summary { cursor:pointer; font-weight:600; }
.course-contents ol { margin:12px 0 0; padding-left:25px; }
.course-contents button,.course-resume { background:none; border:0; font:inherit; color:var(--accent); cursor:pointer; text-align:left; padding:6px 0; }
.course-resume { text-decoration:underline; text-underline-offset:3px; }
.course-cover .course-resume { margin-top:12px; }
.course-chapter, .course-check { scroll-margin-top:76px; }
.course-reader h2 { margin: 0 0 14px; font-size: clamp(25px,3.3vw,35px); line-height:1.13; }
.course-chapter p, .course-example p { font-size: 17px; line-height:1.7; margin:0 0 14px; }
.course-chapter { margin:28px 0; }
.course-flow, .course-lab, .course-check, .course-example { border:1px solid var(--rule); border-radius:16px; margin:28px 0; padding:clamp(16px,3vw,26px); }
.course-flow, .course-example { background:var(--paper); }
.course-flow figcaption { font-size:18px; line-height:1.3; font-weight:650; color:var(--ink); }
.course-flow ol { list-style:none; display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin:20px 0 0; padding:0; }
.course-flow li { padding: 0 12px; border-left:1px solid var(--rule); }
.course-flow li:first-child { border:0; padding-left:0; }
.course-flow strong { display:block; font:600 clamp(17px,2.4vw,27px)/1.2 var(--course-serif); color:var(--ink); }
.course-flow li span { display:block; font-size:13px; line-height:1.4; margin-top:5px; }
.course-scene { margin:32px 0; }
.course-scene img { display:block; width:100%; height:auto; aspect-ratio: 3/2; object-fit:cover; border-radius:14px; }
.course-scene figcaption { margin:8px 2px; font-size:13px; line-height:1.45; color:var(--text-2); }
.course-check { background:var(--surface-1); }
.course fieldset { border:0; padding:0; margin:0 0 14px; min-width:0; }
.course legend { padding:0; font:600 20px/1.35 var(--course-serif); margin-bottom:12px; }
.course-option { display:flex; align-items:baseline; gap:10px; padding:11px 12px; margin:6px 0; border:1px solid var(--border); border-radius:9px; cursor:pointer; }
.course-option:has(:checked) { border-color:var(--ink); background:var(--wash); }
.course-number { display:grid; gap:6px; font-size:14px; }
.course-number input { width:100%; color:var(--text); background:var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:12px; font:inherit; font-size:16px; }
.course-feedback { margin:12px 0 0; line-height:1.5; }
.course-feedback:empty { margin:0; }
.course-check:has(:disabled) .course-feedback { color:var(--ink); }
.course-example { border-left:4px solid var(--ink); }
.course-example p { margin:0; }
.course-example details { margin-top:14px; }
.course-example summary { color:var(--ink); font-weight:650; cursor:pointer; }
.course-example details p { margin-top:12px; }
.course-lab { background:var(--wash); color:var(--ink); }
.course-lab > p { margin:0; }
.course-switch { display:flex; flex-wrap:wrap; gap:6px; margin:16px 0; }
.course-switch button { background:var(--surface-1); border:1px solid var(--rule); padding:8px 13px; border-radius:20px; font-size:14px; color:var(--text); cursor:pointer; }
.course-switch button[aria-pressed=true] { background:var(--ink); color:var(--wash); border-color:var(--ink); }
.course-plot { padding:16px; background:var(--surface-1); color:var(--text); border-radius:10px; }
.course-data { width:100%; border-collapse:collapse; text-align:left; margin-bottom:14px; font-size:14px; font-variant-numeric:tabular-nums; }
.course-data th, .course-data td { padding:7px 4px; vertical-align:top; }
.course-data th { border-bottom:1px solid var(--border); }
.course-data th + th, .course-data td + td { text-align:right; }
.course-bar { display:grid; grid-template-columns:1fr auto; gap:4px 8px; font-size:14px; margin-bottom:12px; }
.course-bar > i { grid-column:1/-1; display:block; height:7px; background:var(--surface-0); border-radius:4px; overflow:hidden; }
.course-bar > i i { height:100%; display:block; background:#4c8375; }
.course-bar:nth-child(2) > i i { background:#bc833f; }
.course-bar:nth-child(3) > i i { background:#547c9b; }
.course-outcome { display:flex; gap:8px; justify-content:space-between; align-items:center; border-top:1px solid var(--border); padding-top:10px; font-size:14px; }
.course-outcome strong { font:600 24px var(--course-serif); color:var(--ink); }
.course-plot p { margin:8px 0 0; font-size:14px; line-height:1.5; }
.course-end { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:26px; padding-top:18px; border-top:1px solid var(--border); }
.course-done { width:100%; font-weight:600; margin:0; }
@media (max-width:720px) {
  .course-library { display:block; padding-top:14px; }
  .course-library-head { margin-bottom:22px; padding:18px; }
  .course-progress { margin-top:16px; }
  .course-cover { grid-template-columns: 1fr 104px; gap:12px; }
  .course-cover h1 { font-size:clamp(27px,6vw,38px); }
  .course-cover p { font-size:14px; }
  .course-paper { padding:16px 0 0; }
  .course-tile { grid-template-columns: 79px 1fr 25px; gap:12px; padding-right:10px; }
  .course-tile img { min-height:79px; }
  .course-tile strong { font-size:20px; }
  .course-arrow { width:25px; height:25px; }
}
@media (max-width:440px) {
  .course-cover { display:flow-root; }
  .course-cover img { float:right; width:88px; margin:0 0 7px 13px; }
  .course-cover > div { display:contents; }
  .course-flow li { padding-inline:7px; }
}

.cloud-status { position: fixed; z-index: 85; top: calc(8px + var(--safe-top)); left: 50%; transform: translateX(-50%); width: max-content; max-width: 94vw; padding: 6px 12px; border-radius: 12px; color: var(--text); background: var(--surface-1); border: 1px solid var(--border); font-size: 13px; }
.cloud-status .link { display: inline; margin: 0 0 0 6px; }
.cloud-status [hidden] { display: none; }
#cloud-choice, .notice-dialog { width: min(400px, 90vw); box-sizing: border-box; padding: 20px; border: 1px solid var(--border); border-radius: 16px; color: var(--text); background: var(--surface-1); }
.notice-dialog { text-align: center; }
.walkthrough-exit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#cloud-choice::backdrop, .notice-dialog::backdrop { background: rgb(0 0 0 / .55); }
#cloud-choice h2 { margin-top: 0; }

.walkthrough {
  container: walkthrough / inline-size;
  width: min(calc(100% - 24px), 660px);
  margin: 14px auto 6px;
  padding: clamp(14px, 3vw, 22px);
  color: #302517;
  background: #fff2cc;
  border: 2px solid #d99822;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgb(32 23 5 / .24);
}
.walkthrough .bubble {
  color: inherit; background: #fffaf0; border-color: #dfc58a;
}
.walkthrough .bubble::before { border-right-color: #dfc58a; }
.walkthrough .bubble::after { border-right-color: #fffaf0; }
.walkthrough__next { display: block; margin-top: 6px; font-weight: 750; }
.walkthrough__head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  color: #675032; font-size: 13px;
}
.walkthrough__head > span { grid-column: 2; text-align: center; }
.walkthrough__head .link { margin: 0; min-height: 44px; color: #604114; }
.walkthrough__head [data-prev] { grid-column: 1; justify-self: start; }
.walkthrough__head [data-finish] { grid-column: 3; justify-self: end; }
@container walkthrough (max-width: 220px) {
  .walkthrough__head { grid-template-columns: 1fr 1fr; }
  .walkthrough__head > span { grid-row: 1; grid-column: 1 / -1; }
  .walkthrough__head .link { grid-row: 2; }
  .walkthrough__head [data-finish] { grid-column: 2; }
}
.walkthrough h1 { margin: 4px 0 12px; font-size: clamp(22px, 4vw, 30px); line-height: 1.15; }
.modal__sheet .walkthrough, #app .walkthrough {
  width: 100%; margin: 8px 0 14px; text-align: left;
}
button.walkthrough-target {
  position: relative;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--surface-1);
  scroll-margin: 12px;
}
body:has(.nav-dock > .walkthrough:not([hidden]))::before {
  content: ''; position: fixed; inset: 0; z-index: 39;
  background: rgb(12 15 20 / .40); pointer-events: none;
}
.nav-dock:has(> .walkthrough:not([hidden])) { position: relative; z-index: 40; }
.nav-dock > .walkthrough { outline: none; margin-top: 36px; }
.nav-dock .walkthrough .coach { margin-bottom: 0; }
.mobile-nav__item.walkthrough-target {
  background: transparent; outline: none; box-shadow: none;
}
.mobile-nav__item.walkthrough-target:focus-visible { outline: 2px dashed currentColor; }
.mobile-nav__item.walkthrough-target::after,
[data-walletlog].walkthrough-target::after,
[data-ev].walkthrough-target::after {
  content: ''; position: absolute; z-index: 1; pointer-events: none;
  left: calc(50% - 11px); top: calc(100% + 3px); width: 22px; height: 25px;
  background: var(--good);
  clip-path: polygon(50% 0, 100% 44%, 83% 59%, 60% 36%, 60% 100%, 40% 100%, 40% 36%, 17% 59%, 0 44%);
  --arrow-travel: 7px;
}
[data-ev].walkthrough-target::after {
  left: calc(100% + 10px); top: calc(50% - 12px); rotate: -90deg;
}
#app .walkthrough:has(+ .card .walkthrough-ledger) { scroll-margin-top: 62px; }
#walkthrough-dialog { max-height: 90vh; max-height: 90dvh; overflow-y: auto; }
#walkthrough-dialog .walkthrough__head, #walkthrough-dialog .walkthrough__head .link { color: var(--text-2); }
#walkthrough-dialog .m--hero { display: block; width: 90px; height: 112px; }
#walkthrough-dialog h2 { margin: 12px 0 18px; }
.walkthrough-ledger { max-height: 23vh; overflow: auto; text-align: left; margin: 12px 0 18px; }
@media (prefers-reduced-motion: no-preference) {
  .mobile-nav__item.walkthrough-target::after { animation: walkthrough-arrow .65s ease-in-out infinite alternate; }
  @keyframes walkthrough-arrow { from { translate: 0 var(--arrow-travel); } to { translate: 0; } }
  .walkthrough-target:not([data-mobile-nav]) { animation: walkthrough-pulse 1.45s ease-out 3; }
  @keyframes walkthrough-pulse {
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent); }
  }
}
@media (max-width: 720px) {
  .nav-dock:has(> .walkthrough:not([hidden])) {
    position: fixed; z-index: 40; bottom: 0; left: 50%; transform: translateX(-50%);
    width: min(100%, 560px); display: flex; flex-direction: column-reverse; gap: 38px;
    pointer-events: none;
  }
  .nav-dock:has(> .walkthrough:not([hidden])) .mobile-nav {
    position: relative; left: auto; transform: none; pointer-events: auto;
    background: var(--surface-1);
  }
  .nav-dock > .walkthrough {
    width: calc(100% - 24px); max-height: 58vh; max-height: 58dvh; overflow-y: auto;
    margin: 0 auto; padding: 8px 12px 12px; pointer-events: auto;
  }
  .nav-dock .walkthrough h1 { margin: 0 0 6px; font-size: 20px; }
  .nav-dock .walkthrough .m { width: 44px; height: 58px; }
  .mobile-nav__item.walkthrough-target::after {
    top: auto; bottom: calc(100% + 5px); rotate: 180deg; --arrow-travel: -7px;
  }
  #app .walkthrough { scroll-margin-top: 62px; }
  .card--chart .walkthrough { padding: 10px; }
  .card--chart .walkthrough .m { width: 40px; height: 52px; }
  body.has-mobile-nav button.walkthrough-target:not([data-mobile-nav]) { scroll-margin-bottom: calc(90px + env(safe-area-inset-bottom)); }
}

.scr--deal:has(.foot--step) main button.walkthrough-target {
  scroll-margin-bottom: calc(64px + env(safe-area-inset-bottom));
}

.board-head { flex-wrap: wrap; }
.board-head h2 { display: inline-flex; align-items: center; gap: 3px; }
.board-picker { position: relative; display: inline-flex; align-items: center; min-height: 36px; }
.board-picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.board-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.board-chevron { display: inline-block; width: 7px; height: 7px; margin: 0 3px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); }
.board-head .mswitch { margin-left: auto; }
.board-info {
  display: inline-grid; place-items: center; position: relative; flex: none;
  width: 26px; height: 26px; padding: 0; border: 0; background: transparent;
  color: var(--muted); font: 700 10px/1 sans-serif; cursor: pointer;
}
.board-info::before {
  content: ''; position: absolute; width: 15px; height: 15px;
  border: 1px solid var(--border); border-radius: 50%;
}

.lb__row.is-friend { background: color-mix(in srgb, #369b80 14%, transparent); box-shadow: inset 3px 0 #369b80; }
.friend-results { margin: 1rem 0; padding: .85rem 1rem; border-radius: .75rem; background: color-mix(in srgb, #369b80 12%, transparent); }
.friend-results h3 { font-size: 1rem; margin: 0 0 .5rem; }
.friend-results > div { display: flex; flex-wrap: wrap; gap: .25rem .75rem; justify-content: space-between; overflow-wrap: anywhere; }
.friend-results > div + div { margin-top: .5rem; }

.friend-scores { margin: .7rem 0; padding: .8rem 1rem; border-radius: .75rem; background: color-mix(in srgb, #369b80 12%, transparent); overflow-wrap: anywhere; }
.friend-scores h3 { margin: 0 0 .35rem; font-size: 1rem; }
.friend-scores p { margin: 0; }
.friend-scores summary { padding: .45rem 0; cursor: pointer; }
.friend-score { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .75rem; padding: .2rem 0; }
