:root {
    --bg: #06090a;
    --card-bg: #10150f;
    --card-border: rgba(77,255,110,0.14);
    --accent: #4dff6e;
    --accent-soft: rgba(77,255,110,0.14);
    --text-primary: #f2f5f2;
    --text-secondary: #8a9891;
    --warning: #ffb020;
    --warning-soft: rgba(255,176,32,0.14);
    --danger: #ff5b5b;
    --danger-soft: rgba(255,91,91,0.12);
    /* Добавлено для бейджа "🔵 Завершено" в аккордеоне "Мои испытания"
       (2026-09-23) — та же пара "цвет + приглушённый фон", что и у
       --warning/--danger, просто синий оттенок, которого раньше не было
       в палитре (нужен для четвёртого, нейтрально-закрытого статуса). */
    --info: #4da3ff;
    --info-soft: rgba(77,163,255,0.14);
    /* Золото — только для Jackpot в игре «Карточки» (2026-09-23): редкое
       событие должно отличаться от обычного зелёного выигрыша с первого взгляда. */
    --gold: #ffcf5a;
    --gold-soft: rgba(255,207,90,0.14);
  }

  * { box-sizing: border-box; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    padding: 24px 16px;
    background: var(--bg);
    color: var(--text-primary);
    margin: 0;
  }

  .hidden { display: none !important; }

  .card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 18px 16px;
    max-width: 480px;
    margin: 0 auto 14px auto;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  }

  h1 { font-size: 52px; margin: 4px 0 0 0; color: var(--text-primary); line-height: 1.1; }
  h2 { font-size: 18px; margin: 0 0 8px 0; color: var(--text-primary); }
  p { color: var(--text-secondary); margin: 4px 0; font-size: 14px; }
  .label { font-size: 12px; color: var(--text-secondary); margin: 0; text-align: left; }

  button {
    font-family: inherit;
    font-size: 14px;
    padding: 12px 18px;
    border-radius: 999px;
    border: none;
    color: #06210f;
    margin-top: 10px;
    display: block;
    width: 100%;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 700;
    cursor: pointer;
  }

  .pill-btn { background: var(--accent); box-shadow: 0 0 16px rgba(77,255,110,0.22); }
  .pill-btn:disabled { background: #2a2f2b; color: #6b756d; cursor: default; box-shadow: none; }

  /* ---- Прямоугольные кнопки со скруглёнными углами (не на всю ширину) ---- */
  .rect-btn {
    background: var(--accent);
    color: #06210f;
    font-weight: 700;
    border: none;
    border-radius: 13px;
    padding: 13px 18px;
    font-size: 14px;
    width: auto;
    max-width: none;
    margin: 0;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(77,255,110,0.2);
  }
  .rect-btn:disabled { background: #2a2f2b; color: #6b756d; cursor: default; box-shadow: none; }
  /* color обязателен: общий класс .small описан ниже и иначе перекрашивает
     текст кнопки в серый — на зелёном фоне он почти не читается */
  .rect-btn.small { padding: 12px 14px; font-size: 14px; letter-spacing: 0.2px; flex: 1; flex-shrink: 1; color: #06210f; }

  .ghost-btn {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    font-weight: 500;
    padding: 9px 12px;
  }

  .small { font-size: 12px; color: var(--text-secondary); }

  /* ---- Модалка выбора ставки (USDT + GP-бонус) — premium glass, 2026-09-20 ----
     GP-бонус к ставке в Challenge даёт только доп. расчётный вес, НЕ деньги.
     Id-шники элементов (stakeInput/gpBonusMax/gpStepValue/gpStepDown/gpStepUp/
     weightPreview/confirmJoinBtn/cancelStakeBtn) не менялись — вся бизнес-логика
     (расчёт максимума, вес, submit) осталась прежней в JS, здесь только новая
     визуальная оболочка вокруг неё, собранная из тех же токенов (--accent,
     --card-bg/--card-border, .modal-close-btn), что и остальной интерфейс. */
  /* Составной селектор .modal-box.stake-modal-box (не просто .stake-modal-box) —
     иначе при равной специфичности более поздние правила .modal-box (ширина
     260px, text-align:center и т.д., объявлены ниже по каскаду) перебивают
     этот блок. Так же поступает уже существующий .modal-box.wide. */
  .modal-box.stake-modal-box {
    width: 340px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    text-align: left;
    position: relative;
    padding: 20px 18px 18px 18px;
    animation: stakeModalIn .22s cubic-bezier(.2,.8,.2,1) both;
  }
  @keyframes stakeModalIn {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .stake-modal-box { animation: none; }
  }

  .stake-modal-header { display: flex; align-items: flex-start; gap: 12px; margin: 4px 34px 18px 0; }
  .stake-modal-header-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border: 1px solid rgba(77,255,110,0.3);
    font-size: 16px;
    color: var(--accent);
  }
  .stake-modal-title { font-size: 17px; font-weight: 800; color: var(--text-primary); margin: 0 0 4px 0; }
  .stake-modal-subtitle { font-size: 12.5px; color: var(--text-secondary); margin: 0; line-height: 1.4; }

  /* Общая "стеклянная" карточка для всех трёх блоков (ставка/GP/вес) */
  .stake-glass-card {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    backdrop-filter: blur(6px);
  }
  .stake-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .stake-card-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    font-size: 13px;
  }
  .stake-card-copy { display: flex; flex-direction: column; min-width: 0; }
  .stake-card-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
  .stake-card-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 1px; }

  /* Блок ставки USDT — тот же number-input, что и раньше, просто стилизован
     как крупное "значение", а не обычное текстовое поле */
  .stake-value-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
  .stake-usdt-input {
    flex: 1;
    min-width: 0;
    width: auto;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    text-align: right;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
  }
  .stake-usdt-input::placeholder { color: rgba(242,245,242,0.3); }
  .stake-usdt-input:focus-visible { outline: 2px solid rgba(77,255,110,0.5); outline-offset: 3px; border-radius: 6px; }
  .stake-usdt-input::-webkit-inner-spin-button,
  .stake-usdt-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  .stake-usdt-input { -moz-appearance: textfield; }
  .stake-value-suffix { font-size: 13px; font-weight: 700; color: var(--text-secondary); flex-shrink: 0; }

  /* Блок GP: доступно/MAX + степпер */
  .gp-available-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .gp-available-text { font-size: 12px; color: var(--text-secondary); }
  .gp-available-text b { color: var(--text-primary); font-weight: 700; }
  .gp-max-btn {
    display: inline-block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 3px 9px;
    background: var(--accent-soft);
    border: 1px solid rgba(77,255,110,0.3);
    border-radius: 999px;
    color: var(--accent);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: transform .1s ease, opacity .2s ease;
  }
  .gp-max-btn:disabled { opacity: 0.35; cursor: default; }
  .gp-max-btn:active:not(:disabled) { transform: scale(0.94); }

  .gp-stepper { display: flex; align-items: center; justify-content: center; gap: 14px; }
  .gp-stepper-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 14px;
    background: var(--accent-soft);
    border: 1px solid rgba(77,255,110,0.3);
    color: var(--accent);
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
    transition: transform .1s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  }
  .gp-stepper-btn:active:not(:disabled) { transform: scale(0.92); }
  .gp-stepper-btn:disabled { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.07); color: #4a534c; }
  .gp-stepper-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; }
  .gp-stepper-value { font-size: 30px; font-weight: 800; color: var(--text-primary); line-height: 1; }
  .gp-stepper-suffix { font-size: 11px; color: var(--text-secondary); font-weight: 700; letter-spacing: 0.4px; margin-top: 2px; }

  /* Блок расчётного веса — единственная карточка с акцентной обводкой:
     это главный итог, на который должен упасть взгляд последним */
  .weight-glass-card { border-color: rgba(77,255,110,0.28); background: rgba(77,255,110,0.045); margin-bottom: 16px; }
  .weight-value-row { display: flex; justify-content: flex-end; }
  .weight-value-big { font-size: 32px; font-weight: 800; color: var(--accent); letter-spacing: -0.3px; transition: color .2s ease; }
  @keyframes weightPulse {
    0% { text-shadow: 0 0 0 rgba(77,255,110,0); }
    45% { text-shadow: 0 0 16px rgba(77,255,110,0.6); }
    100% { text-shadow: 0 0 0 rgba(77,255,110,0); }
  }
  .weight-value-big.pulse { animation: weightPulse .5s ease; }
  .weight-value-big.share-mode { font-size: 22px; }
  @media (prefers-reduced-motion: reduce) {
    .weight-value-big.pulse { animation: none; }
  }

  .stake-modal-error {
    font-size: 12.5px;
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid rgba(255,91,91,0.35);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 0 0 12px 0;
    line-height: 1.4;
  }

  .stake-modal-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-height: 50px;
    margin: 0 0 10px 0;
    background: var(--accent);
    color: #06210f;
    font-size: 15px;
    font-weight: 800;
    border-radius: 999px;
    box-shadow: 0 0 18px rgba(77,255,110,0.28);
    transition: transform .1s ease;
  }
  .stake-modal-cta:disabled { background: #2a2f2b; color: #6b756d; box-shadow: none; cursor: default; }
  .stake-modal-cta:active:not(:disabled) { transform: scale(0.99); }

  .cta-spinner {
    display: inline-block;
    width: 15px; height: 15px;
    border: 2px solid rgba(6,33,15,0.35);
    border-top-color: #06210f;
    border-radius: 50%;
    margin-right: 8px;
    animation: ctaSpin .6s linear infinite;
  }
  @keyframes ctaSpin { to { transform: rotate(360deg); } }

  .stake-modal-cancel {
    display: block;
    width: 100%;
    max-width: none;
    min-height: 44px;
    margin: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 999px;
  }
  .stake-modal-cancel:active { background: rgba(255,255,255,0.08); }

  input[type=number] {
    width: 160px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    text-align: center;
    font-size: 16px;
    margin-top: 4px;
    margin-bottom: 4px;
  }
  input[type=number]::placeholder { color: var(--text-secondary); }

  /* ---- Прогресс-бары ---- */
  .bar {
    height: 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin: 10px 0 6px 0;
  }
  .bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2fae4c, var(--accent));
    border-radius: 6px;
    transition: width .3s ease;
  }
  .bar-fill.warning { background: linear-gradient(90deg, #b8790f, var(--warning)); }
  .bar-caption { font-size: 12px; color: var(--text-secondary); text-align: left; margin: 0; }

  /* ---- Баланс (главный экран) ---- */
  .hero-card {
    position: relative;
    overflow: hidden;
    text-align: left;
    max-width: 480px;
    padding: 32px 26px 28px 26px;
  }
  .hero-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(77,255,110,0.30), transparent 70%);
    filter: blur(6px);
    pointer-events: none;
  }
  .hero-label { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
  h1 { font-size: 62px; }
  .gp-suffix { font-size: 0.4em; color: var(--text-secondary); font-weight: 600; margin-left: 6px; }
  /* USDT — настоящие деньги, отдельно от GP-баланса выше. Специально тише и
     мельче: это не игровая валюта, а реальный баланс для ставок в Challenge. */
  .usdt-balance-line { font-size: 14px; color: var(--text-secondary); font-weight: 600; margin: 0 0 4px 0; }
  .usdt-balance-line .usdt-value { color: var(--text-primary); }
  /* Публичный номер игрока (#001) — справа от USDT, над линией банка. Стоит
     поверх строки (absolute) и ничего в карточке не сдвигает; нарочно тише USDT. */
  .usdt-row { position: relative; }
  .usdt-row .usdt-balance-line { padding-right: 96px; }
  .player-number {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 1px 1px 1px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .player-number-value {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .player-number.is-hidden .player-number-value { letter-spacing: 0.16em; opacity: 0.7; }
  .player-number-eye {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    max-width: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color .15s ease, background .15s ease;
  }
  .player-number-eye::after { content: ''; position: absolute; inset: -8px; }  /* палец попадает легче */
  .player-number-eye:active { background: rgba(255,255,255,0.08); color: var(--text-primary); }
  .player-number-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .player-number-eye svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .player-number-eye .eye-closed,
  .player-number.is-hidden .eye-open { display: none; }
  .player-number.is-hidden .eye-closed { display: block; }

  /* Первые 100 номеров (#001–#100) — навсегда золотые: металлический градиент,
     мягкое свечение и редкий медленный блик. Статус — только по самому номеру
     (playerNumberTier в farm.js); скрытый номер (••••) золота не показывает. */
  .player-number-star { display: none; }
  .player-number.is-gold {
    gap: 4px;
    border-color: rgba(255,207,90,0.24);
    background: rgba(255,207,90,0.05);
    box-shadow: 0 0 12px rgba(255,190,80,0.08);
  }
  .player-number.is-gold .player-number-star {
    display: block;
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    fill: #eac36b;
    filter: drop-shadow(0 0 3px rgba(255,200,95,0.45));
  }
  .player-number.is-gold .player-number-value {
    color: #e6bd62;  /* если телефон не умеет градиент в тексте */
    filter: drop-shadow(0 0 5px rgba(255,195,85,0.22));
  }
  @supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .player-number.is-gold .player-number-value {
      /* верхний слой — узкий блик: в крайних положениях он за краем, поэтому
         цикл без скачка; нижний — само золото */
      background-image:
        linear-gradient(105deg, transparent 42%, rgba(255,247,222,0.85) 50%, transparent 58%),
        linear-gradient(180deg, #f5dc98 0%, #e2b85c 52%, #bf8d3b 100%);
      background-size: 300% 100%, 100% 100%;
      background-position: 100% 0, 0 0;
      background-repeat: no-repeat;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      animation: playerNumberShimmer 8s ease-in-out infinite;
    }
  }
  @keyframes playerNumberShimmer {
    0%, 74% { background-position: 100% 0, 0 0; }
    100% { background-position: 0% 0, 0 0; }
  }
  /* #001–#003 — самые ранние аккаунты (не места рейтинга): чуть заметнее */
  .player-number.is-gold-top {
    border-color: rgba(255,207,90,0.34);
    box-shadow: 0 0 14px rgba(255,190,80,0.14);
  }
  .player-number.is-gold-top .player-number-value { filter: drop-shadow(0 0 6px rgba(255,195,85,0.34)); }
  .player-number.is-gold-top .player-number-star { filter: drop-shadow(0 0 4px rgba(255,200,95,0.6)); }
  @supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .player-number.is-gold-top .player-number-value { animation-duration: 6s; }
  }
  @media (prefers-reduced-motion: reduce) {
    .player-number.is-gold .player-number-value { animation: none; }
  }
  /* Колокольчик уведомлений в правом верхнем углу карточки баланса
     (2026-09-24, раньше был кружком в меню разделов). Тот же зелёный
     кружок, что у кнопок меню, только меньше; при непрочитанных — ярче
     обводка и один раз качнётся колокольчик. */
  .hero-notif-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 1;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    max-width: none;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid rgba(77,255,110,0.30);
    box-shadow: 0 0 12px rgba(77,255,110,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
  }
  .hero-notif-btn:active { transform: scale(0.92); }
  .hero-notif-btn.has-unread {
    border-color: rgba(77,255,110,0.65);
    box-shadow: 0 0 16px rgba(77,255,110,0.30);
  }
  .hero-notif-bell { display: block; transform-origin: 50% 12%; }
  .hero-notif-btn.has-unread .hero-notif-bell { animation: heroBellRing .9s ease-in-out 1; }
  @keyframes heroBellRing {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(16deg); }
    30% { transform: rotate(-14deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-6deg); }
    75% { transform: rotate(3deg); }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero-notif-btn.has-unread .hero-notif-bell { animation: none; }
  }
  .hero-notif-btn .notif-badge {
    top: -5px;
    right: -6px;
    min-width: 17px;
    height: 17px;
    box-shadow: 0 0 0 2px var(--card-bg);
  }

  /* ---- Банк: встроен в карточку баланса ---- */
  .bank-section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  .bank-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
  }
  .bank-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--fill, 0) * 1%), rgba(140,152,145,0.35) 0);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 14px rgba(77,255,110,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    flex-shrink: 0;
  }
  .bank-icon-btn {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    padding: 0;
    margin: 0;
    max-width: none;
  }
  .bank-stats { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
  .bank-progress-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .bank-progress-value { font-size: 20px; color: var(--text-primary); font-weight: 800; margin: 0; }
  .bank-progress-sep { color: var(--text-secondary); font-weight: 400; margin: 0 1px; }
  .bank-level-pill {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    padding: 4px 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .bank-level-group { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
  /* ---- Второстепенная кнопка "?" в потоке (не absolute, в отличие от .info-btn) ---- */
  .info-btn-inline {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    margin: 0;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
  }
  .bank-rate-line { color: var(--accent); font-size: 16px; font-weight: 800; margin: 0; }
  .bank-buttons-row { display: flex; gap: 10px; }
  .bank-buttons-row .rect-btn { flex: 1; }

  #bankInfo { margin-top: 12px; }
  #bankInfo:not(:empty)::before { content: 'ⓘ '; }

  /* ---- Круглые кнопки разделов на главном экране ----
     Сетка ровно по 4 в ряд (2026-09-24): одинаковые ячейки, неполный
     последний ряд остаётся прижатым влево и не растягивается. Ширина —
     как у карточек (480px), чтобы на широком экране не расползалось. */
  .nav-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 16px 6px;
    max-width: 480px;
    margin: 18px auto 0 auto;
  }
  .challenge-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    color: var(--text-secondary);
    /* Подпись чуть мельче на узких телефонах — «Уведомления» и
       «Реферальная» должны влезать в свою ячейку, не залезая на соседей. */
    font-size: clamp(10px, 3.1vw, 13px);
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .challenge-entry-icon {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid rgba(77,255,110,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    box-shadow: 0 0 18px rgba(77,255,110,0.18);
  }
  /* Текущий Jackpot «Карточек» — золотая плашка-«уведомление» в правом
     верхнем углу кружка «Карточки» (золото — цвет Jackpot в самой игре).
     Сумма коротко и с округлением ВНИЗ, чтобы не показать больше, чем есть. */
  .nav-jackpot-badge {
    position: absolute;
    top: -7px;
    right: -10px;
    display: flex;
    align-items: center;
    gap: 2px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffe08a, var(--gold));
    color: #2a1d00;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 0 0 2px var(--bg), 0 0 10px rgba(255,207,90,0.45);
    pointer-events: none;
  }
  .nav-jackpot-badge.bump { animation: navJackpotBump .6s ease; }
  @keyframes navJackpotBump {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(1.18); }
  }
  @media (prefers-reduced-motion: reduce) {
    .nav-jackpot-badge.bump { animation: none; }
  }

  /* ---- Реферальная программа: один premium hero-блок вместо нескольких
     одинаковых карточек — по образцу .hero-card/.bank-section (главный
     экран) и .challenge-card/.pool-block (карточка испытания). Ссылка
     оформлена как .stake-glass-card/.weight-glass-card — тот же "стеклянный"
     компонент с зелёным акцентом, что уже используется в модалке ставки,
     просто переиспользован здесь. Меняется только вёрстка/стили — все id
     и данные, которые сюда пишет JS (renderReferralState), остаются прежними. */
  .referral-hero-card { position: relative; overflow: hidden; text-align: left; animation: referralFadeIn .35s ease; }
  .referral-hero-card::before {
    content: '';
    position: absolute;
    top: -55px; right: -45px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(77,255,110,0.20), transparent 70%);
    filter: blur(8px);
    pointer-events: none;
  }
  .referral-link-value {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--accent);
    word-break: break-all;
    text-align: left;
    margin: 0 0 12px 0;
    line-height: 1.45;
  }
  .referral-hint { text-align: left; margin-top: 12px; }
  /* Крупнее обычного .stat-value (20px) — эти цифры главные на экране после
     самой ссылки, должны читаться за секунду, как и в карточке испытания
     (там та же логика: .challenge-card .stat-value крупнее базового). */
  .referral-hero-card .stat-row .stat-value { font-size: 28px; letter-spacing: -0.3px; margin-top: 4px; }
  @keyframes referralFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  /* ---- Экран "История" (2026-09-23) ----
     Тот же принцип, что у .referral-hero-card: одна .card с внутренними
     .bank-section-секциями вместо нескольких отдельных карточек. Сводка —
     настоящий CSS grid 2x2 (а не два .stat-row) — компактнее и не зависит
     от того, чётное ли число показателей. */
  .history-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 14px;
    text-align: left;
  }
  .history-summary-grid .stat-value { font-size: 22px; }

  /* Горизонтальные чипы-фильтры — скроллятся, если не влезают, но не
     занимают лишней высоты (одна строка, без "панели"). */
  /* Переключатели (2-3 варианта) — умещаются в ширину экрана без бокового
     скролла: чипы делят строку поровну (flex:1) и переносятся на вторую
     строку (flex-wrap:wrap), если совсем не влезают, а не уезжают вбок.
     Горизонтальный скролл в узких переключателях — плохой UX (легко не
     заметить, что там есть ещё варианты), поэтому здесь и в будущих
     похожих рядах — wrap, а не overflow-x. */
  .history-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 2px 2px 4px 2px;
    margin: 18px 0 4px 0;
  }
  /* Основной фильтр "Все/GP/USDT/Испытания" — выпадающий список (2026-09-23,
     по прямой просьбе пользователя), а не ряд чипов. Переиспользует .ghost-btn
     (тот же выпадающий список уже есть у тестовой панели рефералки,
     #referralReferrerSelect) — просто во всю ширину и с воздухом сверху,
     где раньше была строка чипов. */
  .history-filter-select {
    width: 100%;
    max-width: none;
    margin: 18px 0 12px 0;
    text-align: left;
    cursor: pointer;
  }
  .history-filter-chip {
    /* flex:1 вместо flex-shrink:0 — чипы делят ширину строки поровну и
       всегда помещаются целиком, без горизонтального скролла (см.
       .history-filter-row выше). min-width:0 разрешает тексту сжаться
       вместо того, чтобы раздувать чип за пределы его доли. */
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
  }
  .history-filter-chip.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(77,255,110,0.4);
  }

  /* Одна строка ленты — GP/USDT-событие или итог испытания. Тот же
     приём, что у .participant-row (разделитель, а не отдельная карточка
     на каждую строку — иначе список из десятка операций был бы огромным). */
  .history-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 11px 2px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: left;
  }
  .history-item-row:last-child { border-bottom: none; }
  .history-item-copy { min-width: 0; }
  .history-item-type { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
  .history-item-date { font-size: 11.5px; color: var(--text-secondary); margin-top: 1px; }
  .history-item-amount { font-size: 15px; font-weight: 800; flex-shrink: 0; white-space: nowrap; }
  .history-item-amount.positive { color: var(--accent); }
  .history-item-amount.negative { color: var(--danger); }

  /* Карточка испытания в истории — компактная, тапабельная, как элемент
     списка испытаний (.challenge-list-item), но без отдельного .card
     (иначе список из нескольких испытаний снова становится "стеной
     карточек" — ровно то, от чего просили уйти в редизайне 2026-09-23). */
  .history-challenge-row {
    display: block;
    width: 100%;
    text-align: left;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s ease, border-color .15s ease;
  }
  .history-challenge-row:active { background: rgba(255,255,255,0.06); }
  .history-challenge-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
  }
  .history-challenge-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .history-challenge-result {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
  }
  .history-challenge-result.win { background: var(--accent-soft); color: var(--accent); }
  .history-challenge-result.eliminated { background: var(--danger-soft); color: var(--danger); }
  .history-challenge-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
  }

  .history-state-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 22px 8px;
  }
  .history-load-more {
    margin: 10px auto 0 auto;
    display: block;
  }

  /* ---- Аккордеон "Мои испытания" (2026-09-23) ----
     Компактная свёрнутая строка + плавно раскрывающееся тело. Раскрытие —
     через max-height (быстрый и надёжный способ анимировать "auto"-высоту
     в CSS без grid-трюков, которые не везде одинаково поддерживаются в
     мобильных WebView) с overflow:hidden, а не display:none — иначе не
     было бы анимации вообще. Тот же .card-язык, что у остального
     приложения — просто как строка списка, а не отдельная модалка. */
  .my-challenge-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color .2s ease;
  }
  .my-challenge-card.expanded { border-color: rgba(255,255,255,0.12); }
  .my-challenge-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
  }
  .my-challenge-head:active { background: rgba(255,255,255,0.04); }
  .my-challenge-head-copy { min-width: 0; flex: 1; }
  .my-challenge-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .my-challenge-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
  .my-status-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    white-space: nowrap;
  }
  .my-status-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
  .my-status-badge.active { background: var(--accent-soft); color: var(--accent); }
  .my-status-badge.recruiting { background: var(--warning-soft); color: var(--warning); }
  .my-status-badge.eliminated { background: var(--danger-soft); color: var(--danger); }
  .my-status-badge.finished { background: var(--info-soft); color: var(--info); }
  .my-challenge-chevron {
    flex-shrink: 0;
    color: var(--text-secondary);
    font-size: 13px;
    transition: transform .2s ease;
  }
  .my-challenge-card.expanded .my-challenge-chevron { transform: rotate(180deg); }

  .my-challenge-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .22s ease;
  }
  .my-challenge-card.expanded .my-challenge-body { max-height: 260px; }
  .my-challenge-body-inner {
    padding: 0 14px 14px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 2px;
  }
  .my-challenge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 10px;
    margin-top: 12px;
    text-align: left;
  }
  .my-challenge-grid .label { margin-bottom: 2px; }
  .my-challenge-grid .stat-value { font-size: 17px; }
  .my-challenge-full-row { grid-column: 1 / -1; }
  .my-challenge-open-btn {
    margin: 12px 0 0 0;
    display: block;
    width: 100%;
    max-width: none;
  }

  /* ---- История завершённых испытаний (2026-09-23) ----
     Карточка — та же .history-challenge-row (фон/рамка/скругление как у
     аккордеона "Мои испытания" рядом), только название может переноситься
     на вторую строку, а не обрезаться сразу. */
  .ch-history-list { max-width: 480px; margin: 0 auto; }
  .ch-history-subtitle { text-align: left; margin: -4px 2px 12px 2px; }
  /* max-width/margin — иначе общее правило button (max-width:260px,
     margin:auto) сжимает карточку до узкой полоски по центру. */
  .ch-history-card { max-width: none; margin: 0 0 10px 0; }
  .ch-history-card .history-challenge-head { align-items: flex-start; }
  .ch-history-name {
    flex: 1;
    min-width: 0;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ch-history-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 2px 12px;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
  }
  .ch-history-pool { color: var(--text-primary); font-weight: 800; font-size: 14px; overflow-wrap: anywhere; }
  .ch-history-prize { color: var(--accent); font-weight: 700; }
  .ch-history-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--text-secondary);
  }
  .ch-history-chevron { font-size: 18px; line-height: 1; color: var(--text-secondary); flex-shrink: 0; }

  .ch-history-modal .modal-title { padding: 0 26px; overflow-wrap: anywhere; margin-bottom: 8px; }
  .ch-history-modal-badge { text-align: center; margin-bottom: 4px; }
  .ch-history-desc { text-align: left; margin: 10px 0 0 0; line-height: 1.4; overflow-wrap: anywhere; }
  .ch-history-modal .my-challenge-grid .stat-value { font-size: 15px; overflow-wrap: anywhere; }
  .ch-history-my { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
  .ch-history-my-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .ch-history-my-title { margin: 0; font-size: 14px; font-weight: 800; color: var(--text-primary); }
  .ch-history-my .my-challenge-grid { margin-top: 10px; }

  /* ---- Уведомления (2026-09-23) ----
     Бейдж непрочитанных — поверх колокольчика в углу карточки баланса
     (.hero-notif-btn). Список уведомлений — та же строчная лента, что у
     "Истории" (.history-item-row), просто с иконкой слева и точкой-индикатором
     непрочитанного вместо цветной суммы справа. */
  .notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  .notif-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
    padding: 11px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    text-align: left;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s ease;
  }
  .notif-item:last-child { border-bottom: none; }
  .notif-item.unread { background: rgba(77,255,110,0.05); }
  .notif-item:active { background: rgba(255,255,255,0.05); }
  .notif-item-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; margin-top: 1px; }
  .notif-item-copy { flex: 1; min-width: 0; }
  .notif-item-text { font-size: 13.5px; color: var(--text-primary); white-space: pre-line; line-height: 1.4; margin: 0; }
  .notif-item-date { font-size: 11px; color: var(--text-secondary); margin: 4px 0 0 0; }
  .notif-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 5px;
  }

  /* ---- Subtle press-feedback на уже существующих кнопках (были без него) ---- */
  .rect-btn, .ghost-btn { transition: transform .12s ease, background-color .15s ease, opacity .15s ease; }
  .rect-btn:active:not(:disabled) { transform: scale(0.97); }
  .ghost-btn:active { background: rgba(255,255,255,0.1); transform: scale(0.97); }

  /* ---- Шапка с кнопкой "назад" ---- */
  .view-header {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto 14px auto;
  }
  .back-btn {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 10px 18px;
    font-size: 15px;
    flex-shrink: 0;
  }
  .view-header h2 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -0.3px; }
  /* Второстепенное действие в правом верхнем углу шапки (кнопка "История" на
     экране "Испытания", 2026-09-23) — тот же .ghost-btn, что и "← Назад"
     слева, только компактнее. Заголовок между ними может сжаться с
     многоточием — лучше, чем горизонтальная прокрутка на узком экране. */
  .view-header-action {
    width: auto;
    max-width: none;
    margin: 0 0 0 auto;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
  }
  .view-header.with-action h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Три элемента в одну строку на узких телефонах (замерено: при обычных
     размерах "Испытания" начинает обрезаться уже ниже ~375px) — чуть
     ужимаем шапку этого экрана, чтобы заголовок читался целиком. */
  @media (max-width: 374px) {
    .view-header.with-action { gap: 8px; }
    .view-header.with-action h2 { font-size: 22px; }
    .view-header.with-action .back-btn { padding: 9px 13px; }
    .view-header-action { padding: 7px 11px; }
  }
  @media (max-width: 340px) {
    .view-header.with-action { gap: 6px; }
    .view-header.with-action h2 { font-size: 19px; }
    .view-header.with-action .back-btn { padding: 8px 11px; font-size: 14px; }
    .view-header-action { padding: 6px 9px; font-size: 12px; }
  }

  /* ---- Карточка испытания в списке (компактная версия дизайн-системы Grind Point) ---- */
  .challenge-list-item {
    text-align: center;
    cursor: pointer;
    padding: 30px 22px 28px 22px;
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .challenge-list-item:hover,
  .challenge-list-item:active {
    border-color: rgba(77,255,110,0.35);
    box-shadow: 0 4px 18px rgba(0,0,0,0.35), 0 0 20px rgba(77,255,110,0.12);
  }
  .list-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
    color: var(--text-primary);
  }
  .list-status-row { margin: 0 0 22px 0; }
  .challenge-list-item .status-pill { font-size: 14px; padding: 7px 16px; }
  .list-participants-line {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
    margin: 0 0 10px 0;
  }
  .list-participants-icon { font-size: 18px; margin-right: 6px; }
  /* шкала до следующего чек-ина в карточке списка (2026-10-17) */
  .list-checkin-bar { height: 6px; margin-top: 8px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,0.08); }
  .list-checkin-bar.hidden { display: none; }
  .list-checkin-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #c8901f, #ffcf5a); }
  .list-checkin-bar.is-open i { background: linear-gradient(90deg, #1fa34a, #5ef08c); }
  .list-timer-line {
    font-size: 15px;
    color: var(--accent);
    font-weight: 600;
    margin: 0;
  }

  /* ---- Таймлайн фаз (компактнее — редизайн 2026-09-23, см. .challenge-card
     ниже: цель — тот же объём информации в заметно меньшей высоте) ---- */
  .phase-timeline { margin: 4px 0 0 0; }
  .challenge-card .phase-timeline .label { text-align: center; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
  .phase-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .phase-connector {
    flex: 1;
    height: 3px;
    min-width: 14px;
    max-width: 60px;
    margin: 0 4px;
    background: rgba(140,152,145,0.22);
    border-radius: 3px;
    transition: background .3s ease;
  }
  .phase-connector.filled { background: linear-gradient(90deg, #2fae4c, var(--accent)); }
  .phase-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(140,152,145,0.3);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14px;
    padding: 0;
    margin: 0;
    max-width: none;
    flex-shrink: 0;
    transition: background .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
  }
  .phase-circle.completed {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(77,255,110,0.5);
  }
  .phase-circle.current {
    background: var(--accent);
    color: #06210f;
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(77,255,110,0.4);
  }

  /* ---- Секции внутри объединённой карточки испытания (по образцу .bank-section) ----
     Отступы уменьшены в редизайне 2026-09-23 (было margin-top:34px;
     padding-top:28px — по факту ~60px пустоты на каждый переход между
     секциями, главный вклад в "слишком много вертикального пространства"). */
  .challenge-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  .start-timer { margin: 14px 0 6px 0; text-align: left; }
  .start-timer .label { margin-bottom: 4px; }

  /* ---- Основная карточка испытания ---- */
  .challenge-card { padding: 24px 20px 22px 20px; }
  .challenge-card .label { font-size: 14px; font-weight: 600; }

  /* ---- Заголовок испытания + кнопка "?" ---- */
  .challenge-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-right: 38px;
  }
  .challenge-name {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.15;
    color: var(--text-primary);
  }
  .info-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    margin: 0;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
  }

  /* ---- Статус-пилюля ---- */
  .challenge-status-row { text-align: center; margin: 14px 0 12px 0; }
  .prize-fund-line {
    text-align: center;
    margin: 0 0 14px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
  }
  /* Сумма ставок участников (2026-10-31) — сразу под призом */
  .players-pool-line { text-align: center; margin: -8px 0 14px 0; font-size: 14px; font-weight: 700; color: var(--text-primary); }
  .players-pool-line.hidden { display: none; }
  /* Отдельный зелёный оттенок (не золотой, как у призового фонда) — чтобы
     сразу отличать "деньги мне" от "деньги для победителей". */
  .admin-tax-line { color: #4dff6e; }
  /* Испытание на GP: короткие правила под призовым фондом */
  /* Закрытый бета-раздел в меню (beta_entries из /api/state) — золотая рамка и плашка */
  .beta-entry .challenge-entry-icon { background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(255,207,90,0.45); }
  .beta-badge {
    position: absolute; top: -4px; right: -8px; padding: 2px 5px; border-radius: 6px;
    background: var(--gold); color: #1d1404; font-size: 8px; font-weight: 900; letter-spacing: 0.04em; line-height: 1.2;
  }
  .gp-challenge-note {
    text-align: center;
    margin: -6px 0 14px 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-secondary);
  }
  #gpOnlyAvailableRow { margin: 10px 0 0 0; }

  /* Значок GP (2026-10-10) — золотая монета из присланной владельцем картинки
     (static/img/gp-coin.png; исходник и скрипт вырезки — docs/brand). Размер —
     от шрифта строки (1.2em), текст «GP» внутри спрятан, он только для разметки.
     Тёплое свечение отделяет золото от тёмного фона. */
  .gp-coin {
    display: inline-block;
    flex-shrink: 0;
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.22em;
    background: url('/img/gp-coin.png?v=1') center / contain no-repeat;
    filter: drop-shadow(0 0 0.16em rgba(255, 186, 38, 0.45));
    color: transparent;
    overflow: hidden;
    text-indent: 110%;
    white-space: nowrap;
    user-select: none;
  }
  /* Круглая подложка значка: вместо зелёной — тёплое золотое сияние под монету */
  .coin-holder {
    background: radial-gradient(circle, rgba(255, 196, 40, 0.24) 0%, rgba(255, 196, 40, 0.06) 62%, rgba(255, 196, 40, 0) 72%);
    border-color: rgba(255, 196, 40, 0.38);
    overflow: visible;
  }
  .stake-modal-header-icon .gp-coin { width: 32px; height: 32px; }
  .stake-card-icon .gp-coin { width: 26px; height: 26px; }
  .stat-hint .gp-coin { width: 1.4em; height: 1.4em; vertical-align: -0.38em; }

  /* Плавающее «яйцо» на экране испытания на GP — ведёт на /egg. Кремовое
     пятнистое, как в мини-игре; изредка покачивается. Над панелью check-in
     его поднимает syncCheckinBarSpacing (style.bottom). */
  .egg-fab {
    position: fixed;
    z-index: 41;
    right: max(14px, calc((100vw - 480px) / 2 + 14px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 72px;
    max-width: none;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.55));
    transform-origin: 50% 90%;
    animation: eggFabWobble 4s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
  }
  .egg-fab-shell {
    position: absolute;
    inset: 0;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background:
      radial-gradient(circle at 62% 30%, #c9bc98 0 3px, transparent 4px),
      radial-gradient(circle at 34% 56%, #cfc3a2 0 2.5px, transparent 3.5px),
      radial-gradient(circle at 66% 70%, #c9bc98 0 2px, transparent 3px),
      radial-gradient(circle at 36% 26%, #fffdf3 0 14%, #f4ead0 45%, #dccaa0 100%);
    box-shadow: inset -5px -7px 12px rgba(120,90,40,0.35), 0 0 0 2px rgba(77,255,110,0.6), 0 0 18px rgba(77,255,110,0.35);
  }
  .egg-fab-label {
    position: relative;
    margin-bottom: 13px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(5,42,16,0.88);
    color: var(--accent);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    white-space: nowrap;
  }
  .egg-fab:active { scale: 0.94; }
  @keyframes eggFabWobble {
    0%, 84%, 100% { transform: rotate(0deg); }
    87% { transform: rotate(-9deg); }
    90% { transform: rotate(8deg); }
    93% { transform: rotate(-5deg); }
    96% { transform: rotate(3deg); }
  }
  @media (prefers-reduced-motion: reduce) {
    .egg-fab { animation: none; }
  }
  .list-prize-line {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 10px 0;
  }
  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(77,255,110,0.35);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
  }
  .status-pill.danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(255,91,91,0.4); }
  .challenge-card .status-pill { padding: 8px 18px; font-size: 14px; }

  .stat-row { display: flex; justify-content: space-between; text-align: left; margin-bottom: 10px; }
  .stat-value { font-size: 20px; color: var(--text-primary); font-weight: 700; margin: 2px 0 0 0; }
  .stat-hint { font-size: 11px; color: var(--text-secondary); font-weight: 600; margin: 3px 0 0 0; }
  .stat-hint.positive { color: var(--accent); }
  .challenge-card .stat-row { margin-bottom: 12px; }
  .challenge-card .stat-value { font-size: 24px; letter-spacing: -0.3px; margin-top: 3px; }
  .challenge-card .stat-hint { font-size: 12.5px; margin-top: 4px; }

  /* ---- Карточка активного испытания — переработана 2026-09-20, компактный
     редизайн 2026-09-23 ----
     Раньше показывала 6-7 чисел сразу (участники, ставка, GP, вес ставки,
     доля, пул, вес пула) вперемешку — GP визуально складывались с USDT в
     "вес", из-за чего казалось, что это деньги. Иерархия по важности осталась
     той же: Пул (реальные USDT, главное число) > Твоя доля (%, отдельно) >
     Твоя ставка + GP-бейдж (вторично) > участники (мелкая строка). Новое в
     редизайне — Пул и "Твоя доля/Твоя ставка" объединены в один визуальный
     блок .money-block (общий фон+рамка), а не два раздельно отмаргиненных
     блока, чтобы это читалось как одна денежная группа, а не список карточек.
     Слово "вес" в интерфейсе не используется — расчёт остаётся на backend
     (weight/share_percent), меняется только то, что видит игрок. */
  .participants-line { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; margin: 0 0 10px 0; text-align: center; }
  .money-block {
    margin-top: 2px;
    padding: 14px 16px 12px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
  }
  .money-block .stat-row { margin-bottom: 0; }
  .pool-block { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.07); text-align: center; }
  .pool-value { font-size: 28px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; margin: 2px 0 0 0; }
  .share-value { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -0.3px; margin: 2px 0 0 0; }
  /* Полоса под "Твоя доля" — чуть компактнее обычной .bar, чтобы влезть в
     узкую колонку рядом со "Твоя ставка"; растёт/уменьшается сама при
     каждом обращении к /api/challenge/state (раз в 2с), в том числе когда
     кто-то выбывает (его вес выпадает из знаменателя доли). */
  .share-bar { margin: 6px 0 4px 0; height: 6px; }
  /* «Сейчас у тебя» (2026-10-26): одна главная цифра, большая шкала доли с подписью внутри, ставка строкой */
  .my-money { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); text-align: left; }
  .my-money-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .my-money-head .label { margin: 0; }
  .my-money-value { font-size: 15px; font-weight: 800; color: var(--accent); white-space: nowrap; }
  .my-money-value b { font-size: 30px; font-weight: 900; letter-spacing: -0.4px; font-variant-numeric: tabular-nums;
    text-shadow: 0 0 16px rgba(77,255,110,0.35); }
  .share-big { position: relative; height: 22px; margin: 10px 0 6px; border-radius: 99px; overflow: hidden;
    background: rgba(255,255,255,0.07); box-shadow: inset 0 1px 3px rgba(0,0,0,0.45); }
  .share-big .bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2fbf55, var(--accent));
    box-shadow: 0 0 12px rgba(77,255,110,0.45); transition: width .4s ease; }
  .share-big-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.7); font-variant-numeric: tabular-nums; }
  .my-money-hint { margin: 0; font-size: 12px; line-height: 1.4; color: var(--text-secondary); }
  .my-money-stake { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; font-size: 13px; color: var(--text-secondary); }
  .my-money-stake .stake-value { font-size: 14px; margin: 0; }
  /* Выбывший (2026-10-28): тот же экран, вместо «Сейчас у тебя» — «Ты выбыл», без суммы и шкалы доли */
  .my-money-stake .stake-out { display: none; }
  .is-out .my-money-stake .stake-out { display: inline; }
  .is-out .my-money-stake .stake-in, .is-out .my-money-value, .is-out .share-big { display: none; }
  .is-out .my-money-head .label { color: var(--danger, #ff5c5c); font-weight: 700; }
  .stake-value { font-size: 18px; font-weight: 700; color: var(--text-primary); margin: 2px 0 0 0; }
  .stake-gp-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: var(--accent-soft);
    border: 1px solid rgba(77,255,110,0.3);
    border-radius: 999px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
  }
  .join-closed-notice { font-size: 13px; color: var(--text-secondary); text-align: center; margin: 4px 0 0 0; }

  /* ---- CTA-кнопка испытания: крупная, с зелёным свечением и воздухом сверху ---- */
  .cta-btn {
    max-width: 300px;
    margin-top: 32px;
    padding: 18px 28px;
    font-size: 19px;
    box-shadow: 0 0 22px rgba(77,255,110,0.28);
  }

  /* ---- Вложенный блок check-in внутри карточки испытания (без отдельной внешней карточки) ----
     Раньше это была подпись-таймер + огромная зелёная/серая pill-кнопка на всю
     ширину — выглядело как "большая disabled-кнопка", а не часть карточки.
     Теперь это составной статус-блок этапа: строка метаданных, крупный таймер,
     прогресс-бар и компактная строка-действие (не отдельная кнопка-пилюля) —
     собраны из тех же токенов, что и остальной интерфейс (.card, .status-pill,
     .rect-btn, .bar). Три состояния переключаются классами на самом .checkin-box:
     is-waiting (тихо, окно ещё не открылось) · is-open (акцент+свечение, можно
     нажать) · is-done (тихое зелёное подтверждение, уже не кнопка по смыслу). */
  .checkin-box {
    margin-top: 20px;
    padding: 18px 18px 16px 18px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
  }
  .checkin-box.is-open {
    border-color: rgba(77,255,110,0.4);
    box-shadow: 0 0 20px rgba(77,255,110,0.14);
  }
  .checkin-box.is-done {
    border-color: rgba(77,255,110,0.22);
    background: rgba(77,255,110,0.04);
  }

  /* ---- Панель check-in закреплена внизу экрана (2026-09-23) ----
     Раньше .checkin-box был обычным блоком внутри карточки испытания и
     уезжал вверх при скролле. Теперь сама карточка (#timerCard) закреплена
     у нижнего края экрана поверх контента — внутренняя разметка карточки
     (.checkin-meta-row/.checkin-timer-block/.checkin-action-row и т.д.) не
     менялась, здесь только позиционирование внешнего контейнера. Нижний
     отступ контента, чтобы панель ничего не перекрывала, считается в JS
     (syncCheckinBarSpacing) по РЕАЛЬНОЙ высоте панели, а не magic-числом —
     высота меняется (сообщение об успехе, длина текста фазы).
     env(safe-area-inset-bottom) — отступ под системный индикатор/чёлку на
     iPhone, без него кнопка утыкалась бы в системную полосу. */
  .checkin-box.checkin-fixed-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    margin: 0 auto;
    max-width: 480px;
    border-radius: 16px 16px 0 0;
    background: var(--card-bg);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  /* Верхняя строка: где мы в графике испытания + тихий бейдж "CHECK-IN" */
  .checkin-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
  }
  .checkin-meta-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
  }
  .checkin-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 4px 9px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color .3s ease, background .3s ease, border-color .3s ease;
  }
  .checkin-box.is-open .checkin-badge,
  .checkin-box.is-done .checkin-badge {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(77,255,110,0.4);
  }

  /* Крупный таймер — то же типографическое соотношение "подпись сверху,
     крупное число снизу", что уже используется в .bank-progress-row/.stat-value */
  .checkin-timer-block { margin-bottom: 2px; }
  .checkin-timer-caption {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: left;
    margin: 0 0 2px 0;
  }
  .checkin-timer-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    text-align: left;
    margin: 0;
    transition: color .3s ease;
  }
  .checkin-box.is-open .checkin-timer-value,
  .checkin-box.is-done .checkin-timer-value { color: var(--accent); }

  /* Строка-действие: компактная, часть карточки — не отдельная гигантская
     кнопка. Форма и радиус — как у .rect-btn, но в виде полной строки
     с иконкой слева и шевроном справа вместо просто текста по центру. */
  .checkin-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 14px 0 0 0;
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    text-align: left;
    font-family: inherit;
    cursor: default;
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
  }
  .checkin-action-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    transition: background .25s ease, color .25s ease;
  }
  .checkin-action-copy { flex: 1; min-width: 0; }
  .checkin-action-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
  }
  .checkin-action-sub {
    display: block;
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-top: 1px;
  }
  .checkin-action-arrow {
    font-size: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .25s ease, transform .25s ease;
  }
  /* Открыт и кликабелен — акцентный фон, лёгкое свечение, шеврон "выезжает" */
  .checkin-action-row:not(:disabled) {
    cursor: pointer;
    background: var(--accent-soft);
    border-color: rgba(77,255,110,0.45);
    box-shadow: 0 0 14px rgba(77,255,110,0.18);
  }
  .checkin-action-row:not(:disabled) .checkin-action-icon {
    background: var(--accent);
    color: #06210f;
  }
  .checkin-action-row:not(:disabled) .checkin-action-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent);
  }
  .checkin-action-row:not(:disabled):active { transform: scale(0.99); }
  /* Уже отметились — тихое зелёное подтверждение, а не кнопка (курсор обычный,
     фон зелёный совсем приглушённо, шеврон не показываем — действия больше нет) */
  .checkin-box.is-done .checkin-action-row {
    background: rgba(77,255,110,0.07);
    border-color: rgba(77,255,110,0.24);
  }
  .checkin-box.is-done .checkin-action-icon {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .checkin-box.is-done .checkin-action-title { color: var(--accent); }

  /* ---- Список участников ---- */
  .participant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 8px 2px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .participant-row:last-child { border-bottom: none; }
  .participant-row .pname { color: var(--text-primary); }
  .participant-row .pstake { color: var(--accent); font-weight: 600; }
  .participant-row.eliminated .pname,
  .participant-row.eliminated .pstake { color: #555; text-decoration: line-through; }

  .success-msg { color: var(--accent); font-weight: 700; }

  /* ---- Выбывание ---- */
  .challenge-section.eliminated { border-top-color: rgba(255,91,91,0.25); }
  .challenge-section.eliminated p { color: var(--danger); font-weight: 700; font-size: 15px; margin: 0; text-align: center; }

  /* ---- Забрал приз и вышел (это НЕ выбывание — приз получен) ---- */
  .challenge-section.claimed { border-top-color: rgba(77,255,110,0.25); }
  .challenge-section.claimed .claimed-title { color: var(--accent); font-weight: 700; font-size: 17px; margin: 0; text-align: center; }
  .challenge-section.claimed .small { text-align: center; margin-top: 6px; }

  /* ---- Выбор после завершённой фазы: остаться или забрать приз ---- */
  .decision-box {
    padding: 20px;
    border-radius: 16px;
    background: rgba(77,255,110,0.05);
    border: 1px solid rgba(77,255,110,0.28);
  }
  .decision-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--accent);
    margin: 0 0 6px 0;
    text-align: center;
  }
  .decision-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.4;
  }
  .decision-buttons { display: flex; gap: 10px; margin-top: 6px; }
  .decision-buttons .rect-btn { flex: 1; }
  .claim-btn {
    background: var(--warning);
    color: #2a1a00;
    box-shadow: 0 0 14px rgba(255,176,32,0.22);
  }
  .decision-warning {
    margin-top: 12px;
    text-align: center;
    color: var(--warning);
  }

  /* Кнопки голосования: невыбранный вариант приглушён, выбранный горит.
     Голос можно менять до закрытия окна, поэтому оба остаются кликабельными. */
  .vote-btn { opacity: 0.4; transition: opacity .2s ease, transform .12s ease; }
  .vote-btn.selected { opacity: 1; transform: translateY(-1px); }
  .vote-btn.selected::before { content: '✓ '; }

  /* ---- Рулетка (ничья в голосовании) ---- */
  .roulette-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 20px auto 8px auto;
  }
  .roulette-pointer {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 16px solid var(--text-primary);
    z-index: 2;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
  }
  .roulette-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* Зелёный сектор — правая половина (0°–180° по часовой от верха),
       оранжевый — левая. От этого считается угол остановки в spinRoulette. */
    background: conic-gradient(var(--accent) 0deg 180deg, var(--warning) 180deg 360deg);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08), 0 0 24px rgba(0,0,0,0.5);
    position: relative;
  }
  .roulette-label {
    position: absolute;
    top: 50%;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    white-space: nowrap;
  }
  .roulette-label.stay { right: 8px; transform: translateY(-50%); color: #06210f; }
  .roulette-label.claim { left: 8px; transform: translateY(-50%); color: #2a1a00; }
  .vote-result-line {
    font-size: 17px;
    font-weight: 800;
    margin: 14px 0 0 0;
    color: var(--text-primary);
    line-height: 1.35;
  }
  /* Итог именно рулетки (ничья): приглушённая подпись сверху, крупный
     выпавший результат — главный акцент, короткое следствие снизу тише.
     Не путать с .vote-result-line — та осталась как была, для случая,
     когда решило настоящее большинство голосов (без рулетки). */
  .roulette-result { margin: 14px 0 0 0; }
  .roulette-result-lead {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
  }
  .roulette-result-word {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 4px 0 0 0;
    line-height: 1.15;
  }
  .roulette-result-caption {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 6px 0 0 0;
    line-height: 1.4;
  }

  /* ---- Панель тест-игроков ---- */
  .test-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
  .test-name { width: 16px; flex-shrink: 0; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
  .test-btn { flex: 1; width: auto; max-width: none; margin: 0; padding: 9px 4px; font-size: 10px; }
  /* Тестовые панели свёрнуты в строку-заголовок и выезжают по нажатию на неё
     (просьба пользователя 2026-09-25). Обёртку строит initTestFolds() по
     атрибуту data-test-fold. Выезд — через grid-template-rows 0fr → 1fr:
     так анимируется настоящая высота содержимого, какой бы она ни была. */
  .test-fold-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; max-width: none; margin: 0; padding: 2px 0;
    background: none; border-radius: 0; text-align: left;
    color: var(--warning); font-size: 12px; font-weight: 800;
  }
  .test-fold-arrow { flex-shrink: 0; transition: transform 0.3s ease; }
  .test-fold.open .test-fold-arrow { transform: rotate(180deg); }
  .test-fold-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
  .test-fold.open .test-fold-body { grid-template-rows: 1fr; }
  .test-fold-inner {
    min-height: 0; overflow: hidden;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
  }
  .test-fold.open .test-fold-inner {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
  }
  .test-fold-body > .test-fold-inner > :first-child { margin-top: 10px; }
  .step-log {
    margin: 0 0 12px 0;
    min-height: 16px;
    color: var(--accent);
    font-weight: 600;
    line-height: 1.35;
  }
  .step-log.error { color: var(--warning); }

  /* ---- Модалки ---- */
  .modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Выше закреплённой внизу панели check-in (.checkin-fixed-bar,
       z-index: 40) — иначе мини-игра check-in и остальные модалки/оверлеи
       рисовались бы ПОД панелью вместо поверх всего экрана. */
    z-index: 100;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .modal-overlay.hidden { display: none; }
  .modal-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    width: 260px;
    text-align: center;
  }
  /* ---- Popup "Как работает испытание" ---- */
  .modal-box.wide {
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: 82vh;
    overflow-y: auto;
    text-align: left;
    position: relative;
    padding: 22px 20px 20px 20px;
  }
  .modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin: 0;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .modal-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    text-align: center;
  }
  .info-step { margin-bottom: 12px; }
  .info-step:last-of-type { margin-bottom: 0; }
  .info-step-title { color: var(--text-primary); font-weight: 700; font-size: 13px; margin: 0 0 2px 0; }
  .info-step-text { color: var(--text-secondary); font-size: 12.5px; line-height: 1.4; margin: 0; }
  .info-step-text b { color: var(--text-primary); }  /* выделения в правилах (тексты — в locales/*.json) */
  .info-flow {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(77,255,110,0.3);
    border-radius: 12px;
    padding: 10px 8px;
    margin: 16px 0;
  }
  .info-warning {
    font-size: 12px;
    color: var(--warning);
    background: var(--warning-soft);
    border: 1px solid rgba(255,176,32,0.35);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 0 0 14px 0;
    line-height: 1.4;
    text-align: left;
  }
  .info-cancel-block {
    background: var(--danger-soft);
    border: 1px solid rgba(255,91,91,0.3);
    border-radius: 12px;
    padding: 10px 12px;
  }
  .info-cancel-block .info-step-title { color: var(--danger); }

  /* ---- Мини-игра check-in: повтори направление стрелки ---- */
  .game-overlay {
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
  }
  .game-box {
    width: 320px;
    max-width: calc(100vw - 32px);
    border: 1px solid rgba(77,255,110,0.35);
    box-shadow: 0 0 44px rgba(77,255,110,0.18), 0 20px 60px rgba(0,0,0,0.6);
    padding: 22px 20px 20px 20px;
  }
  .game-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent);
    margin: 0;
  }
  .game-dots { display: flex; gap: 9px; justify-content: center; margin-top: 14px; }
  .game-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.14);
    transition: background .2s ease, box-shadow .2s ease;
  }
  .game-dot.done { background: var(--accent); box-shadow: 0 0 10px rgba(77,255,110,0.65); }
  .game-counter { font-size: 12px; color: var(--text-secondary); margin: 8px 0 0 0; }

  /* Игровая рамка — стрелка появляется только внутри неё.
     touch-action: none обязателен: без него Telegram перехватывает вертикальный
     свайп и тянет страницу вместо того, чтобы отдать жест игре. */
  .checkin-frame {
    position: relative;
    width: 100%;
    height: 190px;
    margin: 16px 0 14px 0;
    border-radius: 16px;
    border: 2px dashed rgba(77,255,110,0.3);
    background: rgba(77,255,110,0.04);
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
    transition: border-color .15s ease, background .15s ease;
  }
  .checkin-frame.ok { border-color: rgba(77,255,110,0.85); background: rgba(77,255,110,0.13); }
  .checkin-frame.error {
    border-color: rgba(255,91,91,0.75);
    background: rgba(255,91,91,0.1);
    animation: frame-shake .32s;
  }
  .checkin-frame.done {
    border-style: solid;
    border-color: rgba(77,255,110,0.85);
    background: rgba(77,255,110,0.13);
    cursor: default;
  }
  @keyframes frame-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(3px); }
  }

  .checkin-arrow {
    position: absolute;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    text-shadow: 0 0 22px rgba(77,255,110,0.7);
    pointer-events: none;
    animation: arrow-pop .18s ease-out;
  }
  @keyframes arrow-pop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }

  .frame-result {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    color: var(--accent);
    text-shadow: 0 0 26px rgba(77,255,110,0.6);
    animation: arrow-pop .25s ease-out;
  }

  .game-hint { font-size: 13px; color: var(--text-secondary); margin: 0 0 4px 0; min-height: 18px; }
  .game-hint.error { color: var(--danger); font-weight: 700; }
  .game-hint.success { color: var(--accent); font-weight: 700; }

  /* ==================== ИГРА «КАРТОЧКИ» (2026-09-23) ====================
     Поле 3×3 должно помещаться на экран телефона без прокрутки: ширина поля
     считается от высоты экрана (--tg-viewport-stable-height ставит сам
     Telegram SDK), всё остальное — компактные блоки над и под полем.
     История/статистика/тест-панель — ниже, туда уже можно прокрутить. */
  .cards-stage { max-width: 480px; margin: 0 auto 14px auto; }

  .cards-jackpot {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255,207,90,0.10), rgba(255,207,90,0.015) 62%), var(--card-bg);
    border: 1px solid rgba(255,207,90,0.28);
    border-radius: 18px;
    /* по бокам по 50px — место под кнопку «?» справа (и столько же слева,
       чтобы сумма оставалась по центру и не наезжала на кнопку) */
    padding: 11px 50px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35), 0 0 22px rgba(255,207,90,0.08);
  }
  /* Кнопка «?» у Jackpot — тот же .info-btn, что у испытания, только в золоте */
  .info-btn.cards-jackpot-info {
    right: 12px;
    color: var(--gold);
    background: rgba(255,207,90,0.10);
    border-color: rgba(255,207,90,0.42);
    font-size: 15px;
    font-weight: 800;
    transition: transform .12s ease, background .2s ease;
  }
  .info-btn.cards-jackpot-info::after { content: ''; position: absolute; inset: -8px; } /* зона нажатия больше самой кнопки */
  .info-btn.cards-jackpot-info:active { transform: translateY(-50%) scale(0.9); background: rgba(255,207,90,0.2); }
  .cards-jackpot::before {
    content: '';
    position: absolute;
    top: -60px; left: 50%;
    width: 220px; height: 120px;
    margin-left: -110px;
    background: radial-gradient(ellipse, rgba(255,207,90,0.22), transparent 70%);
    pointer-events: none;
  }
  .cards-jackpot-label { position: relative; font-size: 12px; font-weight: 800; letter-spacing: 1.8px; color: var(--gold); margin: 0; }
  .cards-jackpot-value {
    position: relative;
    display: inline-block;
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 2px 0 0 0;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 18px rgba(255,207,90,0.25);
  }
  .cards-jackpot-unit { font-size: 0.5em; color: var(--text-secondary); font-weight: 700; letter-spacing: 0; }
  .cards-jackpot-value.bump { animation: cardsJackpotBump .6s ease; }
  @keyframes cardsJackpotBump {
    0% { transform: scale(1); }
    35% { transform: scale(1.07); color: var(--gold); }
    100% { transform: scale(1); }
  }

  .cards-prompt { min-height: 52px; margin: 12px 0 10px 0; display: flex; flex-direction: column; justify-content: center; }
  .cards-prompt-title { font-size: 17px; font-weight: 800; color: var(--text-primary); margin: 0; line-height: 1.2; }
  .cards-prompt-sub { font-size: 13px; margin: 3px 0 0 0; min-height: 17px; }
  .cards-prompt.is-result .cards-prompt-title { font-size: 24px; letter-spacing: -0.3px; animation: cardsPromptIn .35s ease both; }
  .cards-prompt.is-result .cards-prompt-sub { font-size: 15px; font-weight: 800; color: var(--text-primary); animation: cardsPromptIn .35s .08s ease both; }
  .cards-prompt.kind-lose .cards-prompt-title { color: var(--text-secondary); }
  .cards-prompt.kind-lose .cards-prompt-sub { color: var(--text-secondary); }
  .cards-prompt.kind-even .cards-prompt-title,
  .cards-prompt.kind-win .cards-prompt-title,
  .cards-prompt.kind-win .cards-prompt-sub { color: var(--accent); }
  .cards-prompt.kind-win .cards-prompt-title { text-shadow: 0 0 16px rgba(77,255,110,0.45); }
  .cards-prompt.kind-tickets .cards-prompt-title { color: var(--info); }
  .cards-prompt.kind-tickets .cards-prompt-sub { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
  .cards-prompt.kind-jackpot .cards-prompt-title,
  .cards-prompt.kind-jackpot .cards-prompt-sub { color: var(--gold); }
  .cards-prompt.kind-jackpot .cards-prompt-title { text-shadow: 0 0 18px rgba(255,207,90,0.55); }
  .cards-prompt.is-error .cards-prompt-sub { color: var(--warning); font-weight: 700; }
  /* "На остальных карточках — другие призы игры": без этой подписи игрок мог
     бы решить, что приз с соседней карточки правда лежал там. Место под неё
     берётся из отступов вокруг подсказки, чтобы поле не съезжало вниз. */
  .cards-prompt-note { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); margin: 3px 0 0 0; }
  .cards-prompt-note:empty { display: none; }
  .cards-prompt.has-note { margin: 6px 0 4px 0; }
  .cards-test-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--warning);
    background: var(--warning-soft);
    border-radius: 6px;
    padding: 2px 6px;
    margin-bottom: 4px;
    align-self: center;
  }
  @keyframes cardsPromptIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  .cards-grid {
    /* ширина поля = высота экрана минус всё, что над и под полем (≈360px),
       переведённая в ширину для карточек 1:1.22; но не шире 340px и не уже 228px */
    width: clamp(228px, calc((var(--tg-viewport-stable-height, 100vh) - 360px) * 0.82 + 20px), 340px);
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  /* Сама карточка — <button>: общий стиль кнопок проекта (пилюля на всю
     ширину, отступы, зелёный текст) здесь сброшен полностью. */
  .gp-card {
    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: none;
    color: var(--text-primary);
    font-weight: 700;
    perspective: 700px;
    -webkit-tap-highlight-color: transparent;
    transition: transform .14s ease, opacity .35s ease, filter .35s ease;
  }
  .gp-card::before { content: ''; display: block; padding-top: 122%; } /* пропорция карточки */
  /* Мягкое свечение вокруг — отдельным слоем, чтобы анимировать только
     его прозрачность (дёшево для телефона), а не саму тень. */
  .gp-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(77,255,110,0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
  }
  .gp-card-inner {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform .7s cubic-bezier(.2,.75,.25,1);
  }
  .gp-card.flipped .gp-card-inner { transform: rotateY(180deg); }
  .gp-card-cover,
  .gp-card-face {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  /* Рубашка */
  .gp-card-cover {
    transform: rotateY(0deg);
    background:
      radial-gradient(120% 75% at 50% 0%, rgba(77,255,110,0.17), transparent 62%),
      repeating-linear-gradient(135deg, rgba(255,255,255,0.028) 0 6px, transparent 6px 12px),
      linear-gradient(165deg, #182218, #0a0f0a);
    border: 1px solid rgba(77,255,110,0.26);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), inset 0 -12px 20px rgba(0,0,0,0.38), 0 6px 14px rgba(0,0,0,0.45);
  }
  .gp-card-cover::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 11px;
    border: 1px solid rgba(77,255,110,0.12);
    pointer-events: none;
  }
  .gp-card-mark {
    position: absolute;
    top: 9px; left: 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    color: rgba(77,255,110,0.45);
  }
  .gp-card-q {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 5.4vw, 23px);
    font-weight: 800;
    color: var(--accent);
    background: rgba(77,255,110,0.08);
    border: 1px solid rgba(77,255,110,0.3);
    text-shadow: 0 0 12px rgba(77,255,110,0.6);
  }
  /* Лицевая сторона с результатом */
  .gp-card-face {
    transform: rotateY(180deg);
    background: linear-gradient(165deg, #1b221b, #0c110c);
    border: 1px solid rgba(255,255,255,0.14);
    padding: 6px;
    text-align: center;
  }
  .gp-card-face-icon { font-size: clamp(15px, 4.8vw, 21px); line-height: 1; min-height: 1em; }
  .gp-card-face-main { font-size: clamp(16px, 5.4vw, 23px); font-weight: 800; line-height: 1.1; margin-top: 4px; letter-spacing: -0.3px; }
  .gp-card-face-sub { font-size: clamp(9.5px, 2.8vw, 11.5px); font-weight: 700; color: var(--text-secondary); margin-top: 3px; white-space: nowrap; }
  .gp-card-face.kind-lose { background: linear-gradient(165deg, #221616, #110b0b); border-color: rgba(255,91,91,0.32); }
  .gp-card-face.kind-lose .gp-card-face-main { color: var(--text-secondary); }
  .gp-card-face.kind-partial { border-color: rgba(255,255,255,0.2); }
  .gp-card-face.kind-even { background: linear-gradient(165deg, #172a1a, #0c140d); border-color: rgba(77,255,110,0.38); }
  .gp-card-face.kind-even .gp-card-face-main { color: var(--accent); }
  .gp-card-face.kind-win {
    background: radial-gradient(110% 80% at 50% 20%, rgba(77,255,110,0.28), transparent 70%), linear-gradient(165deg, #173019, #0b150c);
    border-color: rgba(77,255,110,0.65);
  }
  .gp-card-face.kind-win .gp-card-face-main,
  .gp-card-face.kind-win .gp-card-face-sub { color: var(--accent); }
  .gp-card-face.kind-tickets {
    background: radial-gradient(110% 80% at 50% 20%, rgba(77,163,255,0.24), transparent 70%), linear-gradient(165deg, #141d2a, #0a0f16);
    border-color: rgba(77,163,255,0.55);
  }
  .gp-card-face.kind-tickets .gp-card-face-main { color: var(--info); }
  .gp-card-face.kind-jackpot {
    background: radial-gradient(110% 85% at 50% 15%, rgba(255,231,160,0.45), transparent 70%), linear-gradient(165deg, #3a2c0b, #140f04);
    border-color: rgba(255,207,90,0.85);
  }
  .gp-card-face.kind-jackpot .gp-card-face-main { color: var(--gold); font-size: clamp(11px, 3.6vw, 15px); letter-spacing: 1px; }
  .gp-card-face.kind-jackpot .gp-card-face-sub { color: #ffe7a0; }

  /* Состояния поля */
  .cards-grid.locked .gp-card:not(.flipped) { opacity: 0.62; }
  .cards-grid.playable .gp-card { cursor: pointer; }
  .cards-grid.playable .gp-card::after { animation: cardBreathe 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.29s); }
  @keyframes cardBreathe { 0%, 100% { opacity: 0.05; } 50% { opacity: 0.55; } }
  @media (hover: hover) {
    .cards-grid.playable .gp-card:hover { transform: translateY(-3px); }
    .cards-grid.playable .gp-card:hover::after { opacity: 0.9; animation: none; }
  }
  .cards-grid.playable .gp-card:active,
  .gp-card.pressing { transform: scale(0.94); }
  .gp-card.pressing::after { animation: cardWait .6s ease-in-out infinite alternate; }
  @keyframes cardWait { from { opacity: 0.35; } to { opacity: 1; } }
  /* После открытия остальные 8 карточек (.peek) переворачиваются волной от
     открытой (--done-delay) и показывают другие призы игры, каждый по разу,
     в случайном порядке — ничего не выплачивают. Приглушены: главной
     остаётся карточка, которую выбрал игрок. */
  .gp-card.peek { opacity: 0.42; cursor: default; transition-delay: var(--done-delay, 0s); }
  .gp-card.peek .gp-card-inner { transition-delay: var(--done-delay, 0s); }
  .cards-grid.jackpot-mode .gp-card.peek { opacity: 0.25; }
  /* Запасной вид для раундов, открытых до 2026-09-23 (у них остальные
     карточки не разыграны): гаснут рубашкой вверх, «?» → «✓». */
  .gp-card.done { opacity: 0.38; filter: grayscale(0.9); cursor: default; transition-delay: var(--done-delay, 0s); }
  .cards-grid.jackpot-mode .gp-card.done { opacity: 0.12; }
  .gp-card-q { position: relative; transition: color .3s ease, background .3s ease, border-color .3s ease; }
  .gp-card-q-done { position: absolute; opacity: 0; transform: scale(0.5); transition: opacity .3s ease, transform .3s ease; }
  .gp-card-q-mark { transition: opacity .2s ease; }
  .gp-card.done .gp-card-q,
  .gp-card.done .gp-card-q-done,
  .gp-card.done .gp-card-q-mark { transition-delay: var(--done-delay, 0s); }
  .gp-card.done .gp-card-q { color: var(--text-secondary); background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.16); text-shadow: none; }
  .gp-card.done .gp-card-q-mark { opacity: 0; }
  .gp-card.done .gp-card-q-done { opacity: 1; transform: none; }

  /* «Открыть 9 карт»: на рубашке каждой большой карточки — маленькое поле
     3×3 (уменьшенная игра). Карточки играют по очереди: подсветка прыгает
     по маленькому полю (.hop), останавливается на выбранной (.picked), и
     большая карточка переворачивается результатом. Ждущие — приглушены. */
  .gp-mini {
    display: none;
    position: absolute;
    inset: 16% 14%;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
  }
  .gp-card.batch .gp-mini { display: grid; }
  .gp-card.batch .gp-card-q,
  .gp-card.batch .gp-card-mark { display: none; }
  .gp-mini-cell {
    border-radius: 4px;
    background: linear-gradient(165deg, #1f2d1f, #0d140d);
    border: 1px solid rgba(77,255,110,0.3);
    transition: background .08s ease, border-color .08s ease, transform .12s ease, box-shadow .12s ease;
  }
  .gp-mini-cell.hop { background: rgba(77,255,110,0.35); border-color: var(--accent); }
  .gp-mini-cell.picked { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px rgba(77,255,110,0.8); transform: scale(1.15); }
  .gp-card.batch-wait { opacity: 0.5; }
  .gp-card.batch-unused { opacity: 0.2; } /* пачка за билеты меньше 9 — лишние карточки не участвуют */
  .gp-card.batch-active::after { opacity: 1; animation: none; }
  .gp-card.revealed-pop { animation: cardPop .45s ease; }
  @keyframes cardPop { 0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1); } }
  /* Выбранная игроком карточка — светлая рамка, чтобы её было видно среди
     открывшихся остальных при любом исходе (у выигрышей её перекрывает их
     собственное свечение ниже). */
  .gp-card.mine::after { box-shadow: 0 0 0 2px rgba(255,255,255,0.7), 0 0 16px rgba(255,255,255,0.2); opacity: 1; animation: none; }
  .gp-card.revealed-glow-win::after { box-shadow: 0 0 22px rgba(77,255,110,0.6); opacity: 1; animation: none; }
  .gp-card.revealed-glow-tickets::after { box-shadow: 0 0 22px rgba(77,163,255,0.55); opacity: 1; animation: none; }
  .gp-card.revealed-glow-jackpot::after { box-shadow: 0 0 30px rgba(255,207,90,0.75); opacity: 1; animation: none; }

  .cards-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 12px 0 10px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .cards-meta b { color: var(--text-primary); font-weight: 800; font-variant-numeric: tabular-nums; }
  .cards-actions { max-width: 340px; margin: 0 auto; }
  .cards-actions .stake-modal-cta { margin-bottom: 8px; }
  /* «Открыть 9 карт» — второстепенная кнопка под главной, в зелёной обводке */
  .cards-batch-btn {
    display: block;
    width: 100%;
    max-width: none;
    min-height: 44px;
    margin: 0 0 8px 0;
    background: var(--accent-soft);
    border: 1px solid rgba(77,255,110,0.45);
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    border-radius: 999px;
    transition: transform .1s ease;
  }
  .cards-batch-btn:disabled { opacity: 0.5; }
  .cards-batch-btn:active:not(:disabled) { transform: scale(0.98); }
  /* «Купить билет за GP» — отдельно от покупок за USDT: синяя (цвет билетов),
     с отступом и тонкой чертой сверху */
  .cards-gp-btn {
    display: block;
    width: 100%;
    max-width: none;
    min-height: 44px;
    margin: 14px 0 6px 0;
    background: var(--info-soft);
    border: 1px solid rgba(77,163,255,0.45);
    color: var(--info);
    font-size: 14px;
    font-weight: 800;
    border-radius: 999px;
    transition: transform .1s ease;
    position: relative;
  }
  .cards-gp-btn::before {
    content: '';
    position: absolute;
    left: 20%; right: 20%; top: -8px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .cards-gp-btn:disabled { opacity: 0.5; }
  .cards-gp-btn:active:not(:disabled) { transform: scale(0.98); }
  .cards-gp-note { font-size: 13px; font-weight: 600; text-align: center; margin: 0 0 8px 0; color: var(--text-secondary); }
  .cards-gp-note.is-ok { color: var(--info); }

  /* ===== Help / FAQ ===== */
  .help-intro { font-size: 13px; color: var(--text-secondary); margin: 0 0 12px 0; text-align: left; }
  .help-list { display: flex; flex-direction: column; gap: 10px; }
  .help-item {
    display: flex; align-items: center; gap: 12px; width: 100%; max-width: none; margin: 0; text-align: left;
    padding: 14px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border);
    color: var(--text-primary); cursor: pointer; transition: transform .1s ease, border-color .2s ease; font: inherit;
  }
  .help-item:active { transform: scale(0.985); border-color: rgba(77,255,110,0.45); }
  .help-item-title, .help-item-sub { display: block; }
  .help-support {
    margin: 16px 0 4px 0; padding: 14px; border-radius: 18px; text-align: center; font-size: 15px; font-weight: 700;
    color: var(--text-primary); background: var(--card-bg); border: 1px solid var(--card-border);
  }
  .help-support a { color: var(--info); font-weight: 800; text-decoration: none; }
  .help-item-icon {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center;
    justify-content: center; font-size: 22px; background: var(--accent-soft); border: 1px solid rgba(77,255,110,0.25);
  }
  .help-item-body { flex: 1; min-width: 0; }
  .help-item-title { font-size: 15px; font-weight: 800; }
  .help-item-sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
  .help-item-chevron { color: var(--text-secondary); font-size: 18px; flex-shrink: 0; }
  .help-sheet-overlay {
    position: fixed; inset: 0; z-index: 8000; background: rgba(0,0,0,0.6);
    display: flex; align-items: flex-end; justify-content: center; animation: helpFade .2s ease both;
  }
  .help-sheet {
    width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column;
    background: #0d130c; border: 1px solid var(--card-border); border-bottom: none;
    border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,0.6);
    animation: helpSlideUp .3s cubic-bezier(.2,.9,.3,1) both;
  }
  @keyframes helpFade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes helpSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .help-sheet-handle { width: 40px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.18); margin: 8px auto 2px auto; }
  .help-sheet-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .help-sheet-back { width: auto; max-width: none; margin: 0; padding: 7px 12px; font-size: 13px; }
  .help-sheet-title { flex: 1; min-width: 0; text-align: center; font-size: 16px; font-weight: 900; color: var(--text-primary); overflow-wrap: anywhere; }
  .help-sheet-close {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05); color: var(--text-secondary); font-size: 15px; cursor: pointer; padding: 0;
  }
  .help-sheet-body {
    overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px)) 16px;
    text-align: left;
  }
  .help-sheet-body p { font-size: 14px; line-height: 1.5; color: var(--text-primary); margin: 0 0 10px 0; }
  .help-h { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-secondary); margin: 16px 0 8px 0; }
  .help-ul { margin: 0 0 10px 0; padding: 0; list-style: none; }
  .help-ul li { position: relative; padding-left: 18px; margin-bottom: 7px; font-size: 14px; line-height: 1.45; color: var(--text-primary); }
  .help-ul li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
  .help-box { padding: 12px 14px; border-radius: 14px; margin: 0 0 12px 0; font-size: 14px; line-height: 1.45;
    background: var(--accent-soft); border: 1px solid rgba(77,255,110,0.3); color: var(--text-primary); }
  .help-box.gold { background: var(--gold-soft); border-color: rgba(255,207,90,0.4); }
  .help-box.warn { background: var(--danger-soft); border-color: rgba(255,91,91,0.45); color: var(--danger); font-weight: 800; }
  .help-box b { color: var(--accent); }
  .help-box.gold b { color: var(--gold); }
  .help-table { width: 100%; border-collapse: collapse; margin: 0 0 12px 0; font-size: 13.5px; }
  .help-table th { font-size: 11px; font-weight: 800; color: var(--text-secondary); text-align: left; padding: 6px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1); text-transform: uppercase; letter-spacing: .04em; }
  .help-table td { padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-primary); font-variant-numeric: tabular-nums; }
  .help-table td:first-child { font-weight: 800; }
  .help-flow { display: flex; flex-direction: column; align-items: stretch; margin: 0 0 12px 0; }
  .help-flow-step { padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08); font-size: 13.5px; color: var(--text-primary); }
  .help-flow-step.hi { border-color: rgba(255,207,90,0.45); background: var(--gold-soft); }
  .help-flow-step.ok { border-color: rgba(77,255,110,0.4); background: var(--accent-soft); }
  .help-flow-arrow { text-align: center; color: var(--text-secondary); font-size: 13px; line-height: 1; padding: 3px 0; }
  .help-steps { counter-reset: hs; margin: 0 0 12px 0; padding: 0; list-style: none; }
  .help-steps li { counter-increment: hs; position: relative; padding: 0 0 12px 34px; font-size: 14px; line-height: 1.45; color: var(--text-primary); }
  .help-steps li::before { content: counter(hs); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent-soft); border: 1px solid rgba(77,255,110,0.4); color: var(--accent);
    font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
  .help-steps li:not(:last-child)::after { content: ''; position: absolute; left: 11.5px; top: 26px; bottom: 2px; width: 1px; background: rgba(77,255,110,0.25); }
  .help-note { font-size: 12.5px; color: var(--text-secondary); margin: 0 0 10px 0; }

  /* ===== Grinder: уровень по достижениям ===== */
  .grinder-card { cursor: pointer; text-align: left; transition: transform .1s ease; }
  .grinder-card:active { transform: scale(0.985); }
  .grinder-card-static { cursor: default; }
  .grinder-card-static:active { transform: none; }
  .grinder-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .grinder-title { font-size: 17px; font-weight: 900; color: var(--gold); letter-spacing: .02em; }
  .grinder-open { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
  .grinder-line { margin: 6px 0 10px 0; font-size: 14px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px 12px; }
  .grinder-line b { color: var(--text-primary); }
  .grinder-speed { color: var(--accent); font-weight: 800; }
  .grinder-bar { position: relative; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
  .grinder-bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width .4s ease; }
  .grinder-mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(0,0,0,0.55); }
  .grinder-next { margin: 8px 0 0 0; font-size: 13px; font-weight: 700; color: var(--text-primary); }
  .grinder-next.is-max { color: var(--gold); letter-spacing: .04em; }
  .grinder-levels-hint { text-align: left; margin-top: 10px; }
  .ach-group-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
  .ach-group-title { font-size: 15px; font-weight: 800; color: var(--text-primary); }
  .ach-group-count { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
  .ach-item { padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.05); text-align: left; }
  .ach-item:last-child { border-bottom: none; }
  .ach-body { min-width: 0; }
  .ach-title { font-size: 15px; font-weight: 900; color: var(--text-primary); }
  .ach-text { font-size: 13px; color: var(--text-secondary); margin-top: 3px; overflow-wrap: anywhere; }
  .ach-progress { font-size: 13px; font-weight: 800; color: var(--text-primary); margin-top: 5px; font-variant-numeric: tabular-nums; }
  .ach-status { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-top: 5px; }
  .ach-item.is-done .ach-status { color: var(--accent); }
  .ach-item.is-done .ach-title { color: var(--gold); }
  .ach-item.is-secret .ach-title, .ach-item.is-secret .ach-text { color: var(--text-secondary); font-style: italic; }
  /* Плашка «Достижение выполнено» — наверху, поверх игры (но под экранами
     правил и бана) */
  .ach-banner {
    position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; z-index: 9000;
    max-width: 440px; margin: 0 auto; padding: 12px 14px; border-radius: 16px;
    display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
    background: linear-gradient(135deg, #1f2a14, #121a0d); border: 1px solid rgba(255,207,90,0.5);
    box-shadow: 0 12px 34px rgba(0,0,0,0.6), 0 0 22px rgba(255,207,90,0.15);
    animation: achBannerIn .35s cubic-bezier(.2,.9,.3,1.2) both;
  }
  .ach-banner.is-leaving { animation: achBannerOut .3s ease-in both; }
  @keyframes achBannerIn { from { transform: translateY(-140%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  @keyframes achBannerOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-140%); opacity: 0; } }
  .ach-banner-check {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 16px rgba(77,255,110,0.55);
    animation: achCheckPop .45s .15s cubic-bezier(.2,.9,.3,1.4) both;
  }
  .ach-banner-check svg { width: 24px; height: 24px; }
  .ach-banner-check path {
    fill: none; stroke: #06210f; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 22; stroke-dashoffset: 22; animation: achCheckDraw .35s .45s ease-out forwards;
  }
  @keyframes achCheckPop { from { transform: scale(0); } to { transform: scale(1); } }
  @keyframes achCheckDraw { to { stroke-dashoffset: 0; } }
  .ach-banner-body { min-width: 0; flex: 1; }
  .ach-banner-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
  .ach-banner-title { font-size: 16px; font-weight: 900; color: var(--gold); margin-top: 1px; overflow-wrap: anywhere; }
  .ach-banner-text { font-size: 12.5px; color: var(--text-secondary); margin-top: 1px; overflow-wrap: anywhere; }
  @media (prefers-reduced-motion: reduce) {
    .ach-banner, .ach-banner.is-leaving, .ach-banner-check { animation: none; }
    .ach-banner-check path { animation: none; stroke-dashoffset: 0; }
  }
  /* Live Activity (2026-09-24) — маленькая «стеклянная» плашка события игры
     сверху. pointer-events: none — сквозь неё можно нажимать, игре не мешает.
     Место то же, что у плашки достижений, но они идут по очереди (общая
     очередь в JS) и никогда не накладываются. */
  .live-banner {
    position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px; z-index: 8900;
    max-width: 340px; margin: 0 auto; padding: 9px 14px 10px; border-radius: 16px;
    text-align: left; pointer-events: none;
    background: rgba(12,18,14,0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 10px 28px rgba(0,0,0,0.55);
    animation: liveIn .38s cubic-bezier(.2,.9,.3,1.1) both;
  }
  .live-banner.is-leaving { animation: liveOut .3s ease-in both; }
  @keyframes liveIn { from { transform: translateY(-120%) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes liveOut { from { transform: none; opacity: 1; } to { transform: translateY(-60%) scale(.97); opacity: 0; } }
  .live-banner-title { font-size: 13.5px; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
  .live-banner-text { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-top: 2px; line-height: 1.3; overflow-wrap: anywhere; }
  .live-banner-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; overflow-wrap: anywhere; }
  .live-banner-text:empty, .live-banner-sub:empty { display: none; }
  /* акцент по типу события: выигрыши — золото, выбывания — красный, рост Jackpot — зелёный */
  .live-banner.is-win { border-color: rgba(255,207,90,0.45); box-shadow: 0 10px 28px rgba(0,0,0,0.55), 0 0 18px rgba(255,207,90,0.14); }
  .live-banner.is-win .live-banner-title { color: var(--gold); }
  .live-banner.is-elim { border-color: rgba(255,91,91,0.35); }
  .live-banner.is-elim .live-banner-text { color: var(--text-secondary); font-weight: 600; }
  .live-banner.is-jackpot { border-color: rgba(77,255,110,0.30); }
  .live-banner.is-jackpot .live-banner-text { color: var(--accent); font-weight: 800; }
  @media (prefers-reduced-motion: reduce) {
    .live-banner, .live-banner.is-leaving { animation: none; }
  }

  /* ---- Random Event (2026-09-25): окно «Система сочла вас счастливчиком».
     Карточки — тот же компонент .gp-card, что в «Карточках» (рубашка,
     переворот, лицевая сторона с kind-оформлением). ---- */
  .modal-box.re-box {
    position: relative;
    width: 340px;
    max-width: calc(100vw - 32px);
    padding: 20px 16px 16px;
    background: radial-gradient(120% 60% at 50% 0%, rgba(255,207,90,0.14), transparent 62%), var(--card-bg);
    border-color: rgba(255,207,90,0.38);
    box-shadow: 0 18px 50px rgba(0,0,0,0.6), 0 0 26px rgba(255,207,90,0.12);
    animation: reBoxIn .32s cubic-bezier(.2,.9,.3,1.1) both;
  }
  @keyframes reBoxIn { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
  .re-title { font-size: 17px; font-weight: 900; color: var(--gold); margin: 0; line-height: 1.3; }
  .re-text { font-size: 13.5px; margin: 6px 0 14px; }
  .re-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .re-cards .gp-card { cursor: pointer; }
  .re-cards .gp-card::after { animation: cardBreathe 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.7s); }
  .re-cards.picked .gp-card::after { animation: none; }
  .re-cards .gp-card:disabled { cursor: default; }
  .re-cards .gp-card.re-off { opacity: 0.3; filter: grayscale(0.7); }
  .re-cards .gp-card:active:not(:disabled) { transform: scale(0.94); }
  .re-hint { font-size: 12.5px; margin: 12px 0 0; min-height: 1.3em; }
  .re-hint.is-reward { font-size: 15px; font-weight: 800; color: var(--text-primary); }
  .re-hint.is-error { color: var(--danger); }
  .re-ok { width: 100%; max-width: none; margin-top: 12px; }
  .re-later { width: auto; max-width: none; margin: 10px auto 0; padding: 8px 16px; font-size: 13px; }
  .re-chip {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 4px auto;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(255,207,90,0.12);
    border: 1px solid rgba(255,207,90,0.45);
    color: var(--gold);
    font-size: 13.5px;
    font-weight: 800;
    animation: reChipGlow 2.4s ease-in-out infinite;
  }
  @keyframes reChipGlow { 0%, 100% { box-shadow: 0 0 8px rgba(255,207,90,0.12); } 50% { box-shadow: 0 0 22px rgba(255,207,90,0.34); } }
  .re-boost-line { font-size: 12px; font-weight: 700; color: var(--gold); margin: 2px 0 0; text-align: left; }
  .re-test-select { width: 100%; max-width: none; margin: 8px 0 0; color: var(--text-primary); }
  @media (prefers-reduced-motion: reduce) {
    .modal-box.re-box, .re-chip, .re-cards .gp-card::after { animation: none; }
  }

  /* ---- Настройки (2026-09-24): строка «название + переключатель» ---- */
  .settings-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; }
  .settings-copy { min-width: 0; }
  .settings-title { font-size: 16px; font-weight: 800; color: var(--text-primary); margin: 0; }
  .settings-sub { font-size: 13px; margin: 3px 0 0 0; }
  .settings-hint { font-size: 12.5px; text-align: left; margin: 14px 0 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.07); line-height: 1.45; }
  .settings-error { font-size: 12.5px; color: var(--danger); text-align: left; margin: 10px 0 0 0; }
  .settings-test { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,0.12); text-align: left; }
  .settings-test-label { font-size: 12px; font-weight: 800; color: var(--warning); margin: 0 0 8px 0; }
  .settings-test .ghost-btn { width: 100%; max-width: none; margin: 8px 0 0 0; }
  .switch-btn {
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
    width: auto; max-width: none; margin: 0; padding: 4px 0; background: none; border-radius: 999px;
    color: var(--text-secondary); font-size: 12px; font-weight: 800; letter-spacing: .04em;
  }
  .switch-btn[aria-checked="true"] { color: var(--accent); }
  .switch-track {
    position: relative; width: 50px; height: 30px; border-radius: 999px;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.10);
    transition: background .2s ease, box-shadow .2s ease;
  }
  .switch-thumb {
    position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: #dfe6e0; box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: transform .22s cubic-bezier(.3,.9,.4,1.2);
  }
  .switch-btn[aria-checked="true"] .switch-track { background: var(--accent); border-color: transparent; box-shadow: 0 0 12px rgba(77,255,110,0.35); }
  .switch-btn[aria-checked="true"] .switch-thumb { transform: translateX(20px); background: #fff; }
  .switch-btn:disabled { opacity: .6; cursor: default; }
  /* 🌐 Язык (2026-10-05): строка-кнопка в настройках и компактное окно выбора */
  .settings-link-row {
    width: 100%; max-width: none; margin: 0; padding: 4px 0; background: none; border-radius: 0;
    color: inherit; font-weight: inherit;
  }
  .settings-link-row .settings-title { display: block; }
  .settings-value { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 14px; font-weight: 700; color: var(--text-secondary); }
  .settings-chevron { font-size: 20px; line-height: 1; }
  .settings-link-row + .settings-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.07); }
  .language-box { position: relative; max-width: calc(100vw - 32px); padding: 22px 16px 16px 16px; }
  .language-options { display: flex; flex-direction: column; gap: 8px; }
  .language-option {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; max-width: none; margin: 0; padding: 13px 16px; border-radius: 13px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary); font-size: 15px; font-weight: 700; text-align: left;
  }
  .language-option.is-active { color: var(--accent); background: var(--accent-soft); border-color: rgba(77,255,110,0.5); }
  .language-check { color: var(--accent); font-weight: 800; }

  /* ===== Экран бана (Anti-Twin, CRITICAL) — поверх всего ===== */
  .banned-view {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
  }
  .banned-box { max-width: 360px; width: 100%; text-align: center; }
  .banned-icon { font-size: 56px; line-height: 1; margin-bottom: 14px; }
  .banned-title { font-size: 26px; font-weight: 800; color: var(--danger); margin: 0 0 18px 0; }
  .banned-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin: 0 0 6px 0; }
  .banned-reason {
    font-size: 15px; color: var(--text-primary); margin: 0 0 22px 0; padding: 12px 14px;
    background: var(--danger-soft); border: 1px solid rgba(255,91,91,0.3); border-radius: 14px; overflow-wrap: anywhere;
  }
  .banned-support { font-size: 15px; color: var(--text-primary); margin: 0; }
  .banned-support a { color: var(--info); font-weight: 800; text-decoration: none; }

  /* ===== Пауза игры — на весь экран, над правилами, под баном ===== */
  .paused-view { z-index: 99995; }
  .paused-title { font-size: 24px; font-weight: 800; color: var(--text-primary); margin: 0 0 16px 0; }
  .paused-text { font-size: 15px; line-height: 1.45; color: var(--text-primary); margin: 0 0 10px 0; }
  .paused-wait { font-size: 13px; color: var(--text-secondary); margin: 18px 0 0 0; }
  .paused-view .stake-modal-cta { margin-top: 20px; }
  .paused-admin { font-size: 12px; color: var(--text-secondary); margin: 10px 0 0 0; overflow-wrap: anywhere; }

  /* ===== AFK — на весь экран, под правилами, паузой и баном ===== */
  .afk-view { z-index: 99980; }
  .afk-view .stake-modal-cta { margin-top: 20px; }

  /* ===== Правила платформы — обязательный экран на весь экран ===== */
  .rules-view {
    position: fixed;
    inset: 0;
    z-index: 99990; /* под экраном бана: бан важнее */
    background: var(--bg);
    display: flex;
    justify-content: center;
  }
  .rules-box {
    width: 100%;
    max-width: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 0 16px;
    box-sizing: border-box;
  }
  .rules-title { font-size: 20px; font-weight: 800; color: var(--text-primary); text-align: center; margin: 4px 0 12px 0; }
  .rules-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
  .rules-warning {
    font-size: 19px; line-height: 1.35; font-weight: 900; color: var(--danger);
    background: var(--danger-soft); border: 2px solid rgba(255,91,91,0.6); border-radius: 16px;
    padding: 14px 14px; margin: 0 0 16px 0; text-align: left; overflow-wrap: anywhere;
  }
  .rules-list { margin: 0; padding: 0 0 0 22px; text-align: left; }
  .rules-list li { margin: 0 0 12px 0; font-size: 15px; line-height: 1.45; color: var(--text-primary); }
  .rules-list li b { display: block; margin-bottom: 2px; }
  .rules-list li span { color: var(--text-secondary); }
  .rules-version { font-size: 12px; color: var(--text-secondary); text-align: center; margin: 8px 0 0 0; }
  .rules-footer {
    padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px)) 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: var(--bg);
  }
  .rules-accept-btn { width: 100%; margin: 0; }
  .rules-accept-btn:disabled { opacity: 0.45; filter: grayscale(0.6); cursor: not-allowed; }
  .rules-error { font-size: 13px; color: var(--danger); text-align: center; margin: 8px 0 0 0; }

  /* ===== Anti-Fraud (только админ) ===== */
  .af-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
  .af-filter { width: auto; max-width: none; margin: 0; padding: 8px 12px; font-size: 13px; }
  .af-filter.active { color: var(--accent); border-color: rgba(77,255,110,0.5); background: var(--accent-soft); }
  .af-hint { text-align: left; margin-bottom: 8px; }
  .af-item { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); cursor: pointer; text-align: left; }
  .af-item:last-child { border-bottom: none; }
  .af-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--text-primary); }
  .af-item-sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; overflow-wrap: anywhere; }
  .af-level { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
  .af-level.LOW { color: var(--accent); background: var(--accent-soft); }
  .af-level.MEDIUM { color: var(--warning); background: var(--warning-soft); }
  .af-level.HIGH { color: #ff8a3d; background: rgba(255,138,61,0.14); }
  .af-level.CRITICAL { color: var(--danger); background: var(--danger-soft); }
  .af-title { font-size: 13px; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 6px 0; text-align: left; }
  .af-line { font-size: 13px; color: var(--text-primary); text-align: left; margin: 4px 0; overflow-wrap: anywhere; }
  .af-line.muted { color: var(--text-secondary); }
  .af-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
  .af-actions .ghost-btn { width: auto; max-width: none; margin: 0; flex: 1 1 140px; }
  .cards-gp-note.is-error { color: var(--danger); }
  .cards-paid-note {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(77,255,110,0.3);
    border-radius: 999px;
    padding: 10px 16px;
    margin: 3px 0 8px 0;
  }
  #cardsTopupModal .info-warning { font-size: 13px; line-height: 1.45; margin-bottom: 14px; }

  /* Окно «?» у Jackpot — тот же .modal-box.wide, что у «Как работает
     испытание» (сам прокручивается, если не влезает в экран). */
  .cards-info-modal .info-step-text + .info-step-text { margin-top: 6px; }
  .cards-info-flow {
    text-align: left;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
    color: #ffe7a0;
    background: rgba(255,207,90,0.07);
    border-color: rgba(255,207,90,0.32);
    margin: 14px 0;
  }
  .cards-info-flow b { color: var(--gold); }
  .cards-info-odds { margin-top: 4px; }
  .cards-info-odds td:nth-child(2) { white-space: nowrap; }
  .cards-info-odds tr.kind-win td:first-child { color: var(--accent); }
  .cards-info-odds tr.kind-tickets td:first-child { color: var(--info); }
  .cards-info-odds tr.kind-jackpot td { color: var(--gold); font-weight: 700; }
  .cards-info-note { margin-top: 8px; }

  .cards-section-title { font-size: 15px; font-weight: 800; color: var(--text-primary); margin: 0 0 6px 0; text-align: left; }
  .cards-history-card { text-align: left; }
  .cards-hist-day {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 12px 0 2px 0;
  }
  .cards-hist-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .cards-hist-row:last-child { border-bottom: none; }
  .cards-hist-time { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
  .cards-hist-label { font-size: 13.5px; font-weight: 700; color: var(--text-primary); min-width: 0; }
  .cards-hist-label small { font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-left: 6px; }
  .cards-hist-amount { font-size: 13.5px; font-weight: 800; white-space: nowrap; color: var(--text-primary); }
  .cards-hist-amount.zero { color: var(--text-secondary); }
  .cards-hist-amount.win { color: var(--accent); }
  .cards-hist-amount.jackpot { color: var(--gold); }

  /* Статистика админа и тест-панель */
  .cards-admin-card, .cards-test-card { text-align: left; }
  .cards-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 8px; }
  .cards-admin-grid .stat-value { font-size: 16px; }
  .cards-odds-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; color: var(--text-secondary); }
  .cards-odds-table th { font-weight: 700; font-size: 11px; text-align: right; padding: 6px 4px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .cards-odds-table td { text-align: right; padding: 6px 4px; border-bottom: 1px solid rgba(255,255,255,0.05); font-variant-numeric: tabular-nums; }
  .cards-odds-table th:first-child, .cards-odds-table td:first-child { text-align: left; color: var(--text-primary); font-weight: 700; }
  .cards-test-outcomes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0 8px 0; }
  .cards-test-outcomes .ghost-btn { width: auto; max-width: none; margin: 0; padding: 8px 2px; font-size: 11px; font-weight: 700; }
  .cards-test-outcomes .ghost-btn.active { color: var(--accent); border-color: rgba(77,255,110,0.5); background: var(--accent-soft); }
  .cards-test-card .test-row .ghost-btn { font-size: 11px; }
  .cards-test-card input[type=number] { flex: 1; width: auto; min-width: 0; margin: 0; padding: 9px; font-size: 13px; }
  .cards-test-log { white-space: pre-line; text-align: left; font-size: 12px; margin-top: 10px; }

  /* Jackpot — отдельная, редкая и заметная анимация: вспышка, золотые лучи,
     крупная надпись, сумма "набегает" с нуля. Без мигания и ярких красок
     казино — тот же тёмный стиль, просто золото вместо зелёного. */
  .cards-jackpot-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    overflow: hidden;
    animation: jpFadeIn .3s ease both;
  }
  @keyframes jpFadeIn { from { opacity: 0; } to { opacity: 1; } }
  .cards-jackpot-flash {
    position: absolute;
    left: 50%; top: 50%;
    width: 150vmax; height: 150vmax;
    margin: -75vmax 0 0 -75vmax;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,240,190,0.95) 0%, rgba(255,207,90,0.5) 16%, rgba(255,207,90,0) 50%);
    pointer-events: none;
    animation: jpFlash 1.1s ease-out both;
  }
  @keyframes jpFlash { 0% { transform: scale(0.04); opacity: 1; } 55% { opacity: 0.8; } 100% { transform: scale(1); opacity: 0; } }
  .cards-jackpot-rays {
    position: absolute;
    left: 50%; top: 50%;
    width: 560px; height: 560px;
    margin: -280px 0 0 -280px;
    border-radius: 50%;
    background: repeating-conic-gradient(rgba(255,207,90,0.14) 0deg 7deg, transparent 7deg 22deg);
    -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%);
    mask: radial-gradient(circle, #000 18%, transparent 66%);
    pointer-events: none;
    animation: jpRays 16s linear infinite;
  }
  @keyframes jpRays { to { transform: rotate(360deg); } }
  .jp-spark {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ffe7a0;
    box-shadow: 0 0 10px 2px rgba(255,207,90,0.8);
    opacity: 0;
    pointer-events: none;
    animation: jpSpark 2.4s ease-in-out infinite;
  }
  @keyframes jpSpark { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1); } }
  .cards-jackpot-modal {
    position: relative;
    width: 300px;
    max-width: calc(100vw - 32px);
    padding: 26px 20px 20px 20px;
    border-radius: 22px;
    text-align: center;
    background: linear-gradient(170deg, #251d0b, #0f0c05 72%);
    border: 1px solid rgba(255,207,90,0.55);
    box-shadow: 0 0 40px rgba(255,207,90,0.32), 0 20px 50px rgba(0,0,0,0.6);
    animation: jpPop .55s .25s cubic-bezier(.2,1.3,.3,1) both;
  }
  @keyframes jpPop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .cards-jackpot-gem { font-size: 54px; line-height: 1; filter: drop-shadow(0 0 18px rgba(255,207,90,0.7)); animation: jpGem 2.2s ease-in-out infinite; }
  @keyframes jpGem { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
  .cards-jackpot-title {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 10px 0 2px 0;
    color: var(--gold);
    background: linear-gradient(180deg, #fff3c4, #ffcf5a 55%, #d99a1e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(255,207,90,0.45));
  }
  .cards-jackpot-amount { font-size: 26px; font-weight: 800; color: var(--text-primary); margin: 0 0 6px 0; font-variant-numeric: tabular-nums; }
  .cards-jackpot-note { font-size: 12px; color: rgba(255,231,160,0.72); margin: 0 0 16px 0; }
  .stake-modal-cta.cards-gold-cta { background: linear-gradient(180deg, #ffe08a, #ffc23d); color: #2a1d00; box-shadow: 0 0 22px rgba(255,207,90,0.45); margin: 0; }

  @media (prefers-reduced-motion: reduce) {
    .gp-card-inner { transition: none; }
    .cards-grid.playable .gp-card::after, .gp-card.pressing::after,
    .gp-card.revealed-pop, .cards-jackpot-value.bump,
    .cards-jackpot-flash, .cards-jackpot-rays, .jp-spark, .cards-jackpot-gem,
    .cards-jackpot-modal, .cards-prompt.is-result .cards-prompt-title,
    .cards-prompt.is-result .cards-prompt-sub { animation: none; }
  }
  .report-error-footer { margin: 20px 0 8px; padding-bottom: env(safe-area-inset-bottom, 0px); }
  a.report-error-card, a.report-error-card:visited { display: flex; width: 100%; align-items: center; gap: 12px; text-align: left; text-decoration: none; color: #fff; border: 1px solid #000; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
  .report-error-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.07); font-size: 22px; font-weight: 700; }
  .report-error-copy { flex: 1; min-width: 0; }
  .report-error-title { display: block; font-size: 14px; font-weight: 700; line-height: 1.4; }
  .report-error-hint { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: #fff; }
  .report-error-arrow { flex-shrink: 0; font-size: 24px; color: #fff; }
  .report-error-card:active { background: #192019; border-color: rgba(255,255,255,0.35); }
  .report-error-card:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

  /* ================= ГЛАВНЫЙ ЭКРАН (редизайн 2026-10-11) =================
     Шапка, компактный блок GP, «Новые испытания» (js/home.js) и событие «Яйцо».
     Задача — за 2 секунды увидеть баланс GP и актуальное испытание: карточка
     испытания начинается уже на первом экране телефона. Логика блоков прежняя. */
  #mainView { padding-top: env(safe-area-inset-top, 0px); }
  .home-header {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    max-width: 480px; margin: -8px auto 12px auto;
  }
  .home-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .home-logo { width: 30px; height: 30px; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(255,190,40,0.45)); }
  .home-brand-name { font-size: 17px; font-weight: 800; letter-spacing: 0.02em; color: var(--text-primary); white-space: nowrap; }
  .home-brand-name b { color: var(--accent); font-weight: 800; }
  .home-header .hero-notif-btn { position: relative; top: auto; right: auto; flex-shrink: 0; }

  /* Блок GP — тот же, но компактнее: испытание должно поместиться на первый экран */
  .hero-card { padding: 18px 20px 16px 20px; margin-bottom: 18px; }
  .hero-card .hero-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
  .hero-card h1 { font-size: clamp(38px, 12vw, 50px); overflow-wrap: anywhere; }
  .hero-card .bank-section { margin-top: 14px; padding-top: 14px; }
  .hero-card .bank-top-row { margin-bottom: 12px; gap: 14px; }
  .hero-card .bank-ring { width: 56px; height: 56px; }

  /* ---- «Новые испытания» ---- */
  .home-challenges { max-width: 480px; margin: 0 auto 16px auto; text-align: left; }
  .home-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 10px 2px; }
  .home-section-title {
    margin: 0; font-size: 13px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-primary);
  }
  .home-count {
    flex-shrink: 0; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
    color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(77,255,110,0.3);
  }
  .spot-card {
    position: relative; overflow: hidden; isolation: isolate; cursor: pointer;
    padding: 16px 16px 16px 16px; border-radius: 22px;
    background:
      radial-gradient(120% 90% at 100% 0%, rgba(255,207,90,0.13), transparent 55%),
      radial-gradient(100% 80% at 0% 100%, rgba(77,255,110,0.12), transparent 60%),
      linear-gradient(165deg, #141c13, #0c110c);
    border: 1px solid rgba(255,207,90,0.30);
    box-shadow: 0 10px 30px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05);
  }
  /* Мягкое свечение рамки — анимируется только прозрачность (дёшево для телефона) */
  .spot-card::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
    box-shadow: 0 0 0 1px rgba(255,207,90,0.45), 0 0 26px rgba(255,207,90,0.22), inset 0 0 22px rgba(77,255,110,0.08);
    opacity: 0.35; animation: spotGlow 3.6s ease-in-out infinite alternate;
  }
  @keyframes spotGlow { to { opacity: 1; } }
  /* Лёгкое движение фона — одно размытое пятно, только transform */
  .spot-bg {
    position: absolute; z-index: -1; width: 220px; height: 220px; right: -60px; top: -70px; border-radius: 50%;
    background: radial-gradient(circle, rgba(77,255,110,0.22), transparent 65%);
    animation: spotDrift 12s ease-in-out infinite alternate; pointer-events: none;
  }
  @keyframes spotDrift { to { transform: translate(-90px, 120px) scale(1.15); } }
  .spot-card.is-ready { animation: spotIn .45s ease-out both; }
  @keyframes spotIn { from { opacity: 0; transform: translateY(12px); } }
  .spot-card:active { transform: scale(0.99); }

  .spot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .spot-status {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(77,255,110,0.35);
    transition: color .3s ease, background-color .3s ease, border-color .3s ease;
  }
  .spot-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
  .spot-card[data-status="soon"] .spot-status { color: var(--gold); background: var(--gold-soft); border-color: rgba(255,207,90,0.4); }
  .spot-card[data-status="live"] .spot-status { color: var(--info); background: var(--info-soft); border-color: rgba(77,163,255,0.4); }
  .spot-card[data-status="live"] .spot-dot { animation: spotPulse 1.6s ease-in-out infinite; }
  @keyframes spotPulse { 50% { opacity: 0.35; } }
  .spot-status.is-changed { animation: spotFlash .7s ease-out; }
  @keyframes spotFlash { 0% { transform: scale(1.12); filter: brightness(1.6); } }
  .spot-type { font-size: 11px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; }
  .spot-title {
    margin: 10px 0 0 0; font-size: 21px; font-weight: 800; line-height: 1.2; color: var(--text-primary);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  }
  .spot-center { display: flex; align-items: center; gap: 14px; margin: 14px 0 10px 0; }
  .spot-emblem {
    position: relative; flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 40%, rgba(255,207,90,0.22), rgba(16,21,15,0.9) 70%);
    box-shadow: 0 0 0 2px rgba(255,207,90,0.45), 0 0 24px rgba(255,207,90,0.25);
  }
  .spot-emblem-coin { width: 54px; height: 54px; filter: drop-shadow(0 0 6px rgba(255,186,38,0.5)); }
  .spot-emblem-cup { width: 40px; height: 40px; filter: drop-shadow(0 0 6px rgba(255,186,38,0.45)); }
  .spot-emblem-badge {
    position: absolute; right: -4px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; font-size: 14px;
    display: flex; align-items: center; justify-content: center; background: #0c110c; border: 1px solid rgba(255,207,90,0.5);
  }
  .spot-prize { display: flex; flex-direction: column; min-width: 0; }
  .spot-prize-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
  .spot-prize-value {
    font-size: clamp(26px, 8.5vw, 34px); font-weight: 900; line-height: 1.1; color: var(--gold);
    text-shadow: 0 0 22px rgba(255,207,90,0.35); overflow-wrap: anywhere;
  }
  .spot-desc {
    margin: 0 0 12px 0; font-size: 13px; line-height: 1.45; color: #c3cdc6; text-align: left;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .spot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
  .spot-stat {
    display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 8px 9px; border-radius: 12px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  }
  .spot-stat-label { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; color: var(--text-secondary); line-height: 1.2; }
  .spot-stat b { font-size: 14px; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  /* окошко «Следующий чек-ин» (2026-10-17): отсчёт и заполняющаяся шкала; окно открыто — зелёное */
  .spot-checkin {
    margin: 0 0 14px; padding: 12px 12px 10px; border-radius: 14px; text-align: left;
    background: linear-gradient(180deg, rgba(255,207,90,0.12), rgba(255,207,90,0.03)); border: 1px solid rgba(255,207,90,0.28);
  }
  .spot-checkin.hidden { display: none; }
  .spot-checkin-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .spot-checkin-icon { flex: none; font-size: 16px; line-height: 1; }
  .spot-checkin-label { flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 700; color: var(--text-secondary); line-height: 1.25; }
  .spot-checkin-time { flex: none; font-size: 20px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums;
    text-shadow: 0 0 14px rgba(255,207,90,0.35); }
  .spot-checkin-bar { position: relative; height: 9px; margin-top: 10px; border-radius: 99px; overflow: hidden;
    background: rgba(255,255,255,0.08); box-shadow: inset 0 1px 2px rgba(0,0,0,0.4); }
  .spot-checkin-bar i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1s linear;
    background: linear-gradient(90deg, #c8901f, #ffcf5a 60%, #ffe9a8); box-shadow: 0 0 12px rgba(255,207,90,0.55); }
  .spot-checkin-sub { margin: 7px 0 0; font-size: 11.5px; color: var(--text-secondary); line-height: 1.3; }
  .spot-checkin.is-open { background: linear-gradient(180deg, rgba(94,240,140,0.16), rgba(94,240,140,0.04)); border-color: rgba(94,240,140,0.5);
    animation: spotCheckinPulse 1.6s ease-in-out infinite; }
  .spot-checkin.is-open .spot-checkin-label { color: #b9f7cb; }
  .spot-checkin.is-open .spot-checkin-time { color: #5ef08c; text-shadow: 0 0 14px rgba(94,240,140,0.45); }
  .spot-checkin.is-open .spot-checkin-bar i { background: linear-gradient(90deg, #1fa34a, #5ef08c 60%, #c4ffd6); box-shadow: 0 0 12px rgba(94,240,140,0.6); }
  @keyframes spotCheckinPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(94,240,140,0); } 50% { box-shadow: 0 0 16px 0 rgba(94,240,140,0.35); } }
  @media (prefers-reduced-motion: reduce) { .spot-checkin-bar i { transition: none; } .spot-checkin.is-open { animation: none; } }
  .spot-cta {
    display: block; width: 100%; max-width: none; margin: 0; padding: 14px 16px; border-radius: 14px;
    font-size: 15px; font-weight: 800; color: #06210f; background: linear-gradient(180deg, #6bff86, var(--accent));
    box-shadow: 0 0 18px rgba(77,255,110,0.30); transition: transform .1s ease;
  }
  .spot-cta:active { transform: scale(0.97); }
  /* Загрузка: заготовка карточки вместо пустоты */
  .spot-card.is-loading { min-height: 330px; cursor: default; }
  .spot-card.is-loading > :not(.spot-bg) { visibility: hidden; }
  .spot-card.is-loading::before {
    content: ''; position: absolute; inset: 16px; border-radius: 14px;
    background: linear-gradient(100deg, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 70%);
    background-size: 200% 100%; animation: spotShimmer 1.4s linear infinite;
  }
  @keyframes spotShimmer { to { background-position: -200% 0; } }
  .spot-empty {
    text-align: center; padding: 26px 18px; border-radius: 22px; border: 1px dashed rgba(77,255,110,0.25);
    background: rgba(16,21,15,0.6);
  }
  .spot-empty-icon { font-size: 30px; opacity: 0.7; }
  .spot-empty-title { margin: 8px 0 2px 0; font-size: 16px; font-weight: 800; color: var(--text-primary); }
  .spot-empty-text { margin: 0; font-size: 13px; }
  .spot-retry { margin-top: 12px; max-width: 200px; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(77,255,110,0.35); }
  .home-all-link {
    display: block; width: auto; max-width: none; margin: 10px 0 0 auto; padding: 6px 4px;
    background: none; border: none; color: var(--accent); font-size: 14px; font-weight: 700;
  }

  /* ---- Событие «Разбей яйцо» — компактная карточка ---- */
  .egg-event-card {
    display: flex; align-items: center; gap: 12px; width: 100%; max-width: 480px; margin: 0 auto 14px auto;
    padding: 12px 14px; border-radius: 18px; text-align: left; color: var(--text-primary);
    background: linear-gradient(120deg, rgba(255,207,90,0.10), rgba(16,21,15,0.95) 55%);
    border: 1px solid rgba(255,207,90,0.25);
  }
  .egg-event-card:active { transform: scale(0.99); }
  .egg-event-icon {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 14px; font-size: 24px;
    display: flex; align-items: center; justify-content: center; background: rgba(255,207,90,0.12);
  }
  .egg-event-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .egg-event-title { font-size: 14px; font-weight: 800; }
  .egg-event-bar { position: relative; height: 6px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
  .egg-event-fill { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #ff5b5b, #ff8a94); border-radius: 4px; }
  .egg-event-meta { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
  .egg-event-arrow { flex-shrink: 0; font-size: 24px; color: var(--text-secondary); }

  @media (prefers-reduced-motion: reduce) {
    .spot-card::after, .spot-bg, .spot-card[data-status="live"] .spot-dot, .spot-card.is-loading::before { animation: none; }
    .spot-card::after { opacity: 0.7; }
    .spot-card.is-ready, .spot-status.is-changed { animation: none; }
  }

  /* ===== «ПЕРВОПРОХОДЕЦ» (2026-10-11): уникальная награда — золото, след, «1 из 1» ===== */
  .pioneer-medal {
    position: relative; width: 64px; height: 64px; flex: none; border-radius: 50%;
    display: grid; place-items: center;
    background: radial-gradient(circle at 50% 32%, #2c2511 0%, #120f08 72%);
    border: 2px solid rgba(255,207,90,0.85);
    box-shadow: 0 0 0 4px rgba(255,207,90,0.1), inset 0 0 16px rgba(255,207,90,0.18);
  }
  .pioneer-medal svg { width: 40px; height: 40px; position: relative; filter: drop-shadow(0 0 6px rgba(255,207,90,0.45)); }
  /* мягкие лучи вокруг медали и пульсирующее свечение */
  .pioneer-medal::before {
    content: ""; position: absolute; inset: -16px; border-radius: 50%; z-index: -1;
    background: conic-gradient(from 0deg, transparent 0 7%, rgba(255,207,90,0.26) 10%, transparent 13% 32%,
      rgba(255,207,90,0.26) 35%, transparent 38% 57%, rgba(255,207,90,0.26) 60%, transparent 63% 82%,
      rgba(255,207,90,0.26) 85%, transparent 88%);
    -webkit-mask: radial-gradient(circle, #000 38%, transparent 70%); mask: radial-gradient(circle, #000 38%, transparent 70%);
    animation: pioneerSpin 16s linear infinite;
  }
  .pioneer-medal::after {
    content: ""; position: absolute; inset: -2px; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 26px 4px rgba(255,207,90,0.42);
    animation: pioneerGlow 2.8s ease-in-out infinite alternate;
  }
  .pioneer-medal-big { width: 104px; height: 104px; margin: 6px auto 12px; }
  .pioneer-medal-big svg { width: 64px; height: 64px; }
  .pioneer-medal-big::before { inset: -26px; }
  .pioneer-badge {
    display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
    font-size: 11px; font-weight: 900; letter-spacing: 0.06em; color: #1a1405;
    background: linear-gradient(180deg, #ffeeb5, #ffcf5a 55%, #d99d2e);
    box-shadow: 0 0 12px rgba(255,207,90,0.35);
  }

  .modal-box.pioneer-box {
    position: relative; isolation: isolate; width: 340px; max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px); overflow-x: hidden; overflow-y: auto; padding: 26px 20px 18px;
    background: radial-gradient(120% 70% at 50% 0%, rgba(255,207,90,0.2), transparent 62%), linear-gradient(180deg, #17140b, var(--card-bg) 72%);
    border: 1px solid rgba(255,207,90,0.55);
    box-shadow: 0 20px 60px rgba(0,0,0,0.65), 0 0 40px rgba(255,207,90,0.18);
    animation: pioneerIn .5s cubic-bezier(.2,.9,.3,1.15) both;
  }
  .pioneer-kicker { margin: 10px 0 2px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,207,90,0.8); }
  .pioneer-title {
    margin: 0; font-size: 28px; font-weight: 900; line-height: 1.15; color: var(--gold);
    background: linear-gradient(180deg, #fff3cc, #ffcf5a 60%, #e0a53a); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .pioneer-text { white-space: pre-line; margin: 12px 0 14px; font-size: 14px; line-height: 1.5; color: var(--text-primary); }
  .pioneer-bonus {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px;
    font-size: 15px; font-weight: 900; color: var(--gold);
    background: rgba(255,207,90,0.1); border: 1px solid rgba(255,207,90,0.35);
  }
  .rect-btn.pioneer-ok {
    display: block; width: 100%; margin-top: 16px; color: #1a1405;
    background: linear-gradient(180deg, #ffe58f, #ffc53d); box-shadow: 0 0 18px rgba(255,197,61,0.3);
  }

  .card.pioneer-card {
    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 16px;
    padding-left: 22px;
    border-color: rgba(255,207,90,0.5);
    background: radial-gradient(120% 120% at 0% 0%, rgba(255,207,90,0.16), transparent 55%), linear-gradient(180deg, #16130a, var(--card-bg));
    box-shadow: 0 4px 18px rgba(0,0,0,0.35), 0 0 22px rgba(255,207,90,0.1);
  }
  /* блик, раз в несколько секунд проходящий по карточке */
  .card.pioneer-card::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255,231,160,0.12) 50%, transparent 65%);
    transform: translateX(-100%); animation: pioneerSheen 7s ease-in-out infinite;
  }
  .pioneer-card-body { min-width: 0; flex: 1; text-align: left; }
  .pioneer-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .pioneer-card-title { font-size: 18px; font-weight: 900; color: var(--gold); }
  .pioneer-card-kicker { margin: 2px 0 0; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,207,90,0.7); }
  .pioneer-card-text { margin: 6px 0; font-size: 13px; color: var(--text-primary); }
  .pioneer-card-bonus { margin: 0; font-size: 13px; font-weight: 800; color: var(--gold); }
  .pioneer-card-meta { margin: 4px 0 0; font-size: 11.5px; color: var(--text-secondary); }
  .pioneer-card-meta:empty { display: none; }

  @keyframes pioneerSpin { to { transform: rotate(1turn); } }
  @keyframes pioneerGlow { from { opacity: 0.4; } to { opacity: 1; } }
  @keyframes pioneerIn { from { transform: translateY(18px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes pioneerSheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
  @media (prefers-reduced-motion: reduce) {
    .pioneer-medal::before, .pioneer-medal::after, .modal-box.pioneer-box, .card.pioneer-card::after { animation: none; }
    .card.pioneer-card::after { opacity: 0; }
  }

  /* ===== «ФОНД ИСПЫТАНИЙ» (2026-10-30): GP игроков → +USDT к призу следующего испытания ===== */
  .spot-prize-fund { font-size: 12px; font-weight: 700; color: var(--accent); }
  .spot-prize-fund.hidden { display: none; }
  .spot-prize-pool { font-size: 12px; font-weight: 700; color: var(--text-primary); }
  .spot-prize-pool.hidden { display: none; }
  .fund-card {
    position: relative; overflow: hidden; width: 100%; max-width: 480px; margin: 0 auto 14px auto;
    padding: 14px; border-radius: 20px; color: var(--text-primary);
    background:
      radial-gradient(110% 80% at 0% 0%, rgba(255,207,90,0.16), transparent 55%),
      linear-gradient(160deg, #15190f, #0c110c);
    border: 1px solid rgba(255,207,90,0.32);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  }
  .fund-card.hidden { display: none; }
  .fund-head { display: flex; align-items: center; gap: 10px; }
  .fund-icon {
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
    background: rgba(255,207,90,0.12); box-shadow: inset 0 0 0 1px rgba(255,207,90,0.2);
  }
  .fund-icon img { filter: drop-shadow(0 0 6px rgba(255,207,90,0.5)); }
  .fund-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .fund-kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
  .fund-title { margin: 0; font-size: 17px; font-weight: 900; }
  .fund-bonus {
    flex-shrink: 0; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 900; white-space: nowrap;
    color: #1a1405; background: linear-gradient(180deg, #ffeeb5, #ffcf5a 55%, #d99d2e); box-shadow: 0 0 14px rgba(255,207,90,0.35);
  }
  .fund-bonus.hidden { display: none; }
  .fund-rule { margin: 10px 0; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
  .fund-rule b { color: var(--text-primary); }
  .fund-bar { position: relative; height: 12px; border-radius: 8px; background: rgba(255,255,255,0.08); overflow: hidden; }
  .fund-bar-small { height: 10px; margin-top: 12px; }
  .fund-fill, .fund-add { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 8px; transition: width .6s ease, left .6s ease; }
  .fund-fill { width: 0; background: linear-gradient(90deg, #d99d2e, var(--gold)); box-shadow: 0 0 12px rgba(255,207,90,0.45); }
  .fund-add { width: 0; background: repeating-linear-gradient(135deg, rgba(77,255,110,0.95) 0 6px, rgba(77,255,110,0.65) 6px 12px); }
  .fund-bar-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
  .fund-bar-row b { color: var(--gold); white-space: nowrap; }
  .fund-ready { margin: 10px 0 0 0; padding: 8px 10px; border-radius: 12px; font-size: 13px; font-weight: 800; color: var(--accent); background: var(--accent-soft); }
  .fund-ready.hidden, .fund-last.hidden { display: none; }
  .fund-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--text-secondary); }
  .fund-last { margin: 6px 0 0 0; font-size: 12px; color: var(--text-secondary); }
  .fund-cta {
    display: block; width: 100%; margin-top: 12px; padding: 12px 16px; border-radius: 14px; border: none;
    font-size: 15px; font-weight: 800; color: #1a1405; background: linear-gradient(180deg, #ffe08a, var(--gold));
    box-shadow: 0 0 16px rgba(255,207,90,0.3); transition: transform .1s ease;
  }
  .fund-cta:active { transform: scale(0.97); }
  .fund-actions { display: flex; gap: 10px; margin-top: 12px; }
  .fund-actions .fund-cta { flex: 1; margin-top: 0; }
  .fund-mine {
    flex: 1; padding: 12px 10px; border-radius: 14px; font-size: 15px; font-weight: 800; color: var(--accent);
    background: var(--accent-soft); border: 1px solid var(--accent); transition: transform .1s ease;
  }
  .fund-mine.hidden { display: none; }
  .fund-mine:active { transform: scale(0.97); }
  .fund-mine:disabled { opacity: .6; }
  .fund-card.is-bump .fund-fill { animation: fundBump .7s ease; }
  /* Живой фонд на экране испытания (2026-10-31) */
  .fund-grow {
    margin: 0 0 14px 0; padding: 12px; border-radius: 16px; text-align: left;
    background: rgba(255,207,90,0.06); border: 1px solid rgba(255,207,90,0.32);
  }
  .fund-grow.hidden { display: none; }
  .fund-grow-rule { margin: 0; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
  .fund-grow .fund-bar-row span { text-align: right; }
  .fund-card .fund-bar-row span { text-align: right; }
  /* Приз по фазам (2026-10-31): подписи под кружками фаз и короткое правило под ними */
  .phase-node { position: relative; flex-shrink: 0; }
  .phase-prize-tag {
    position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
    display: none; white-space: nowrap; text-align: center; line-height: 1.2;
    font-size: 12px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums;
  }
  .phase-prize-tag small { display: block; font-size: 10px; font-weight: 700; color: var(--text-secondary); }
  .phase-prize-tag.is-done { color: var(--accent); }
  .phase-stepper.has-prizes { padding-bottom: 32px; }
  .phase-stepper.has-prizes .phase-prize-tag { display: block; }
  .phase-prize { margin: 8px 0 0 0; text-align: center; }
  .phase-prize.hidden, .phase-prize-mine.hidden { display: none; }
  .phase-prize-mine { display: inline-block; margin: 0 0 6px 0; padding: 4px 10px; border-radius: 10px; font-size: 13px; font-weight: 800; color: var(--gold); background: rgba(255,207,90,0.1); }
  .phase-prize-note { margin: 0; font-size: 12px; line-height: 1.35; color: var(--text-secondary); }
  @keyframes fundBump { 0%, 100% { filter: none; } 40% { filter: brightness(1.6); } }

  .modal-box.fund-box { position: relative; width: 340px; max-width: calc(100vw - 32px); max-height: 88vh; overflow-y: auto; text-align: left; padding: 22px 18px 18px 18px; }
  .fund-box .modal-title { text-align: center; margin: 0 0 10px 0; }
  .fund-how { margin: 0 0 12px 0; padding-left: 20px; font-size: 13px; line-height: 1.45; color: var(--text-secondary); }
  .fund-how li + li { margin-top: 3px; }
  .fund-balance { margin: 0 0 10px 0; font-size: 13px; font-weight: 700; }
  .fund-amount-label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
  .fund-amount-row { display: flex; gap: 8px; }
  .fund-step-btn {
    flex-shrink: 0; width: 46px; border-radius: 12px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.05);
    color: var(--text-primary); font-size: 22px; font-weight: 800;
  }
  .fund-amount {
    flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,207,90,0.35);
    background: rgba(0,0,0,0.3); color: var(--gold); font-size: 22px; font-weight: 900; text-align: center; font-variant-numeric: tabular-nums;
  }
  .fund-amount:focus { outline: none; border-color: var(--gold); }
  .fund-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
  .fund-chips button {
    padding: 8px 4px; border-radius: 10px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.04);
    color: var(--text-primary); font-size: 13px; font-weight: 800;
  }
  .fund-chips button.is-active { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
  .fund-after { margin: 6px 0 0 0; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
  .fund-after.is-step { color: var(--accent); font-weight: 800; font-size: 13px; }
  .fund-error { margin: 10px 0 0 0; font-size: 13px; color: var(--danger); }
  .fund-error.hidden, .fund-form.hidden, .fund-done.hidden, .fund-done-step.hidden { display: none; }
  .fund-confirm { display: block; width: 100%; margin-top: 14px; }
  .fund-confirm:disabled { opacity: 0.5; }
  .fund-cancel { display: block; width: 100%; margin-top: 8px; padding: 8px; border: none; background: none; color: var(--text-secondary); font-size: 14px; }
  .fund-done { text-align: center; padding-top: 6px; }
  .fund-done-icon { display: block; font-size: 48px; margin-bottom: 8px; }
  .fund-done-title { margin: 0; font-size: 17px; font-weight: 900; }
  .fund-done-step { margin: 10px 0 0 0; font-size: 14px; font-weight: 800; color: var(--accent); }
  @media (prefers-reduced-motion: reduce) {
    .fund-fill, .fund-add { transition: none; }
    .fund-card.is-bump .fund-fill { animation: none; }
  }
