  /* Единая палитра Тотошка (апка + бот): success=green, attention=gold, error=red, neutral=hint. */
  :root {
    --tg-bg:        var(--tg-theme-bg-color, #17212b);
    --tg-secondary: var(--tg-theme-secondary-bg-color, #232e3c);
    --tg-text:      var(--tg-theme-text-color, #f5f5f5);
    --tg-hint:      var(--tg-theme-hint-color, #708499);
    --tg-button:    var(--tg-theme-button-color, #2ea6ff);
    --green:        #2dbd6e;   /* успех, сохранён */
    --green-dim:    #1a7a44;
    --gold:         #f5c542;   /* внимание, нет прогноза */
    --orange:       #e88a2e;   /* дедлайн < 2 ч */
    --red-live:     #e05252;   /* LIVE, ошибка */
    --playoff:      #a78bfa;   /* плей-офф, стадия knockout */
    --playoff-soft: rgba(167, 139, 250, 0.14);
    --playoff-border: rgba(167, 139, 250, 0.32);
    --exit-nav:     #8b9cf7;   /* выход «← К матчам» (не плей-офф) */
    --exit-nav-soft: rgba(139, 156, 247, 0.14);
    --exit-nav-border: rgba(139, 156, 247, 0.32);
    --section-h1:   #34d399;
    --section-h2:   #60a5fa;
    --section-match: var(--green);
    --section-goals: var(--gold);
    --section-extra: var(--playoff);
    --card-bg:      var(--tg-secondary);
    --radius:       14px;
    --radius-sm:    8px;
    --nav-h:        72px; /* таббар с чипами; safe-area — в padding снизу у .nav */
    --page-pad:     16px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  .opt-btn:focus-visible, .q-nav-btn:focus-visible, .goal-quick-btn:focus-visible,
  .chip:focus-visible, .btn-primary:focus-visible, .header-chat-btn:focus-visible {
    outline: 2px solid var(--green); outline-offset: 2px;
  }
  button:focus-visible { outline: 2px solid var(--tg-button); outline-offset: 2px; }
  body {
    font-family: 'Inter', sans-serif;
    background: var(--tg-bg); color: var(--tg-text);
    min-height: 100vh; overflow-x: hidden;
    padding-bottom: var(--nav-h);
  }

  .nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--tg-secondary); border-top: 1px solid rgba(255,255,255,0.07);
    display: flex; align-items: stretch; gap: 6px; z-index: 100;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }
  .nav-btn {
    position: relative;
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    color: var(--tg-hint); font-size: 11px; font-weight: 500;
    transition: color .2s, background .2s, border-color .2s, box-shadow .2s;
    min-height: 0; padding: 6px 4px 7px;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-btn svg { width: 22px; height: 22px; flex-shrink: 0; opacity: .92; }
  .nav-btn:not(.active) { opacity: .88; }
  .nav-btn.active {
    opacity: 1;
    color: var(--green);
    font-weight: 700;
    border-color: rgba(45, 189, 110, .55);
    background: rgba(45, 189, 110, .18);
    box-shadow: 0 0 0 1px rgba(45, 189, 110, .12) inset;
  }
  .nav-btn.active svg { opacity: 1; stroke-width: 2.25; }
  .nav-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 12px; }
  .nav-badge {
    position: absolute; top: 2px; right: 50%; margin-right: -18px;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: var(--gold); color: #1a1a1a; font-size: 10px; font-weight: 800;
    line-height: 16px; text-align: center; pointer-events: none;
  }

  .screen { display: none; animation: fadeUp .25s ease; }
  .screen.active { display: block; }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .header { padding: 16px var(--page-pad) 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .header-title { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 1.5px; }
  .header-title span { color: var(--green); }
  /* Кнопка «К списку» / назад: не сжимать — полный текст; заголовок рядом может обрезаться */
  .header > .header-back-btn + .header-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 22px;
    letter-spacing: 1px;
  }
  .header-back-btn {
    flex-shrink: 0;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(45, 189, 110, 0.55);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: #e8fff1;
    background: linear-gradient(180deg, rgba(45, 189, 110, 0.22) 0%, rgba(45, 189, 110, 0.08) 100%);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.08) inset,
      0 2px 10px rgba(0, 0, 0, 0.28);
  }
  .header-back-btn:active {
    transform: scale(0.98);
    opacity: 0.92;
  }
  .header-back-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
  .header-right {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  #matches-header-chat { min-width: 0; }
  .badge {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(45,189,110,0.16);
    color: var(--green);
    font-size: 10px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid rgba(45,189,110,0.45);
    line-height: 16px;          /* фиксированная высота строки */
    text-align: center;         /* строгий горизонтальный центр */
  }
  .badge.badge-attention {
    background: rgba(245,197,66,.18);
    color: var(--gold);
    border-color: rgba(245,197,66,.5);
    cursor: pointer;
    min-width: 22px;
    padding: 2px 8px;
  }
  .badge.badge-attention:active { opacity: .85; }
  .header-chat-btn {
    padding: 5px 8px;
    border-radius: 999px;
    border: none;
    font-size: 10px;
    font-weight: 600;
    background: rgba(46,166,255,0.9);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 32px;
  }
  .header-chat-btn:focus-visible {
    outline: 2px solid rgba(46,166,255,0.65);
    outline-offset: 2px;
  }

  .header-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }
  .header-info-btn:active {
    opacity: 1;
    transform: scale(0.92);
  }
  .header-info-btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
  }

  .section-label {
    font-size: 11px; font-weight: 600; letter-spacing: 1.2px; color: var(--tg-hint);
    text-transform: uppercase; padding: 4px 16px 8px;
  }

  .quick-bar {
    padding: 0 16px 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  /* Симметричное расположение «Чат участников» и «0:0 на все открытые» */
  #matches-actions {
    justify-content: space-between;
  }
  .quick-btn {
    padding: 5px 9px;
    border-radius: 999px;
    border: none;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    color: var(--tg-text);
    cursor: pointer;
    min-height: 32px;
  }
  .quick-btn:active {
    background: var(--green);
  }
  .quick-btn.danger {
    border-color: rgba(224, 82, 82, 0.5);
    color: var(--red-live);
    background: rgba(224, 82, 82, 0.12);
  }
  .quick-btn:focus-visible {
    outline: 2px solid rgba(45,189,110,0.55);
    outline-offset: 2px;
  }
  .quick-btn.quick-btn-primary {
    background: var(--green);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 1px 10px rgba(45, 189, 110, 0.38);
  }
  .quick-btn.quick-btn-primary:active {
    background: #26a862;
    box-shadow: 0 1px 6px rgba(45, 189, 110, 0.28);
  }

  .btn-primary {
    margin-top: 12px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    min-height: 40px;
  }
  .btn-primary:active { filter: brightness(0.95); transform: translateY(1px); }
  .btn-primary:focus-visible {
    outline: 2px solid rgba(45,189,110,0.65);
    outline-offset: 2px;
  }

  .match-card {
    margin: 0 12px 6px;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: stretch;
    transition: transform .1s;
  }
  .match-card:active { transform: scale(0.98); }
  .match-card-accent {
    width: 3px; flex-shrink: 0;
  }
  .match-card-accent.green { background: var(--green); }
  .match-card-accent.purple { background: var(--playoff); }
  .match-card-accent.zero { background: var(--gold); opacity: 0.85; }
  .match-card--zero-template { box-shadow: inset 0 0 0 1px rgba(245,197,66,.35); }
  .match-card--playoff {
    box-shadow: inset 0 0 0 1px var(--playoff-border);
  }
  .match-card--playoff.match-card--zero-template {
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.38), inset 0 0 0 1px rgba(245,197,66,.28);
  }
  .match-teams-primary .match-stage-chip {
    margin-right: 0;
    vertical-align: middle;
  }
  .match-card--zero-template .match-card-accent.zero {
    background: repeating-linear-gradient(
      -45deg,
      rgba(245,197,66,.95),
      rgba(245,197,66,.95) 4px,
      rgba(245,197,66,.55) 4px,
      rgba(245,197,66,.55) 8px
    );
  }
  .match-card-accent.amber { background: var(--gold); }
  .match-card-accent.orange { background: var(--orange); }
  .match-card-accent.gray  { background: rgba(255,255,255,.15); }
  .match-card-accent.red   { background: var(--red-live); }
  .match-card.live {
    box-shadow: 0 0 0 1px rgba(224,82,82,0.35), 0 2px 12px rgba(224,82,82,0.12);
    opacity: 1;
  }
  .match-card--live .match-card-accent.red {
    box-shadow: 0 0 8px rgba(224,82,82,0.45);
  }
  .match-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 6px;
    padding: 2px 7px 2px 5px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--red-live);
    border-radius: 4px;
    vertical-align: middle;
  }
  .match-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: live-pulse 1.4s ease-in-out infinite;
  }
  @keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.75); }
  }
  .match-card-body {
    flex: 1; padding: 9px 12px; min-width: 0;
  }
  .date-group {
    margin: 10px 12px 0;
  }
  .matches-live-section {
    margin: 0 12px 12px;
    padding: 10px 10px 8px;
    border-radius: 12px;
    background: rgba(224, 82, 82, 0.06);
    border: 1px solid rgba(224, 82, 82, 0.22);
  }
  .matches-live-section-title {
    padding: 0 2px 8px;
    color: var(--red-live);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(224, 82, 82, 0.15);
  }
  .matches-live-section-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
  }
  .matches-live-section-list .match-card {
    margin-left: 0;
    margin-right: 0;
  }
  .date-group:first-child { margin-top: 0; }
  .date-group-title {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 2px 8px;
    background: linear-gradient(180deg, rgba(18,28,39,0.98), rgba(18,28,39,0.86));
    color: var(--tg-hint);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(6px);
  }
  .date-group-list { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 0; }
  .date-group-list .match-card { margin-left: 0; margin-right: 0; }
  .date-group--collapsed .date-group-list { display: none; }
  .date-group-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 10px 2px 8px;
  }
  .date-group-chevron {
    flex-shrink: 0;
    width: 1em;
    opacity: 0.75;
  }
  .matches-all-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 12px 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
  }
  .matches-all-options-label {
    font-size: 12px;
    color: var(--tg-hint);
    font-weight: 500;
  }
  .matches-show-finished-btn {
    margin: 8px 0 4px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    color: var(--tg-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .match-row-top {
    display: flex; align-items: flex-start;
    justify-content: space-between; margin-bottom: 6px;
    gap: 10px;
  }
  .match-teams-primary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
  }
  .match-teams-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
  }
  .match-teams-str {
    font-size: 15px; font-weight: 700; line-height: 1.25;
    width: 100%;
    white-space: normal;
    word-break: break-word;
  }
  .match-teams-meta .match-live-badge { margin-right: 0; flex-shrink: 0; }
  .match-row-bot {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }
  .match-row-chips {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
  }
  .match-stage-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--playoff);
    background: var(--playoff-soft);
    border: 1px solid var(--playoff-border);
  }
  .match-stage-chip--final {
    color: #fde68a;
    background: rgba(245, 197, 66, 0.14);
    border-color: rgba(245, 197, 66, 0.38);
  }
  .match-meta-end {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-left: auto;
    min-width: 0;
  }
  .match-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .match-status-chip--done { background: rgba(45,189,110,0.16); color: var(--green); }
  .match-status-chip--zero-template {
    background: rgba(245,197,66,0.14);
    color: var(--gold);
    border: 1px dashed rgba(245,197,66,0.55);
  }
  .match-status-chip--missing { background: rgba(245,197,66,0.12); color: var(--gold); }
  .match-status-chip--urgent { background: rgba(232,138,46,0.16); color: var(--orange); }
  .match-status-chip--closed { background: rgba(255,255,255,0.06); color: var(--tg-hint); font-weight: 600; }
  .match-status-chip--live { background: rgba(224,82,82,0.18); color: var(--red-live); }
  .match-status-chip--awaiting { background: rgba(245,197,66,0.12); color: var(--gold); }
  .match-score-ft--meta {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--green);
    font-size: 12px;
  }
  .match-score-ft--prominent {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--green);
    font-size: 14px;
    padding: 0.1em 0.35em;
    background: rgba(45,189,110,0.12);
    border-radius: var(--radius-sm);
    margin-right: 6px;
  }
  .match-pred-score {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    color: var(--tg-text);
    padding: 0.1em 0.35em;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
  }
  .match-ai-hint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(245,197,66,0.08);
    border: 1px solid rgba(245,197,66,0.18);
  }
  .match-ai-hint-text { font-size: 11px; color: var(--gold); line-height: 1.3; flex: 1 1 auto; }
  .match-ai-hint-btn {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(245,197,66,0.35);
    background: rgba(245,197,66,0.12);
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .matches-focus-banner--done-flash {
    background: rgba(45,189,110,0.1);
    border-color: rgba(45,189,110,0.28);
  }
  .matches-focus-text--done { color: var(--green); font-weight: 600; text-align: center; }
  .match-card.closed { opacity: 0.6; cursor: default; }
  .match-today-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--tg-button-text-color, #fff); background: var(--green); border-radius: 4px; }
  .match-time { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--tg-hint); }
  .match-time-block { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 72px; flex: 0 0 auto; }
  .match-time-block--compact { min-width: 58px; }
  .match-time-date { font-size: 11px; color: var(--tg-hint); line-height: 1.1; }
  .match-time-clock { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; color: var(--tg-text); line-height: 1.1; }
  .match-countdown-sub { font-size: 10px; color: var(--tg-hint); font-family: 'JetBrains Mono', monospace; }
  .match-countdown-sub--emph { color: var(--gold); font-weight: 600; }
  .pred-status { font-size: 12px; font-weight: 500; }
  .pred-status.done    { color: var(--green); }
  .pred-status.zero-template { color: var(--gold); font-weight: 600; }
  .pred-status.missing { color: var(--gold); }
  .pred-status.closed  { color: var(--tg-hint); }
  .pred-status.live    { color: var(--red-live); font-weight: 700; }
  .pred-status.awaiting { color: var(--gold); font-weight: 600; }
  .match-delay-banner-top {
    font-size: 12px;
    line-height: 1.35;
    color: var(--gold);
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.25);
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  .match-delay-banner {
    font-size: 11px;
    color: var(--gold);
    background: rgba(255, 193, 7, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    margin: 2px 0 6px;
  }
  .deadline-text { font-size: 11px; color: var(--tg-hint); }
  .countdown { color: var(--gold); font-weight: 600; }
  .teams-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
  .team { text-align: center; }
  .team-flag { font-size: 30px; line-height: 1; margin-bottom: 4px; }
  .team-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .score-box { background: rgba(0,0,0,0.25); border-radius: 10px; padding: 8px 14px; text-align: center; }
  .score-vs  { font-size: 12px; font-weight: 700; color: var(--tg-hint); letter-spacing: 1px; }
  .match-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.06);
  }

  .chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
  .chip.green { background: rgba(45,189,110,0.15); color: var(--green); }
  .chip.gold  { background: rgba(245,197,66,0.15);  color: var(--gold); }
  .chip.red   { background: rgba(224,82,82,0.15);   color: var(--red-live); }

  .my-progress-wrap { margin: 0 12px 10px; }
  .my-progress { background: var(--card-bg); border-radius: 9px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.06); }
  .my-progress-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
  .my-progress-title { font-size: 11px; font-weight: 700; color: var(--tg-text); }
  .my-progress-val { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--green); font-weight: 700; }
  .pbar-track { height: 4px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; }
  .pbar-fill { height: 100%; background: var(--green); border-radius: 999px; transition: width .4s; }
  .my-chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
  .my-chip { font-size: 10px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
  .my-chip.mc-green { background: rgba(45,189,110,.15); color: var(--green); }
  .my-chip.mc-gold { background: rgba(245,197,66,.12); color: var(--gold); }
  .my-chip.mc-gray { background: rgba(255,255,255,.06); color: var(--tg-hint); }
  .empty-state { text-align: center; padding: 48px 24px; color: var(--tg-hint); font-size: 15px; }
  .empty-state--rich .btn-primary,
  .empty-state--rich .btn-secondary { margin: 8px 4px 0; }
  .post-match-recap {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9996; display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 14px;
    background: rgba(18,28,39,0.96); border: 1px solid rgba(45,189,110,0.45);
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  }
  .post-match-recap-text { flex: 1; font-size: 13px; line-height: 1.4; color: var(--tg-text); font-weight: 500; }
  .post-match-recap-btn {
    flex-shrink: 0; border: none; border-radius: 999px; padding: 8px 14px;
    background: var(--green); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  }
  .post-match-recap-close {
    flex-shrink: 0; border: none; background: transparent; color: var(--tg-hint);
    font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px;
  }
  .spinner { text-align: center; padding: 48px 24px; }
  .spinner::after { content: '⏳'; font-size: 32px; animation: pulse 1.2s infinite; display: inline-block; }

  /* Skeleton loaders */
  .skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%); background-size: 200% 100%; animation: skeleton 1.2s ease-in-out infinite; border-radius: var(--radius-sm); }
  @keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
  .skeleton-line { height: 14px; margin-bottom: 8px; }
  .skeleton-line.short { width: 40%; }
  .skeleton-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; }
  .skeleton-card { padding: 14px; margin-bottom: 10px; border-radius: var(--radius); background: var(--card-bg); }
  .skeleton-stat { width: 100%; height: 36px; border-radius: var(--radius-sm); }
  .skeleton-match { padding: 16px; margin-bottom: 10px; border-radius: var(--radius); background: var(--card-bg); }
  .skeleton-match .teams-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
  .skeleton-match .team-block { width: 80px; height: 20px; }
  .skeleton-match .vs-block { width: 24px; height: 14px; }

  /* Pull-to-refresh */
  .pull-refresh-indicator {
    position: fixed; top: 0; left: 0; right: 0; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--tg-secondary); color: var(--tg-hint);
    font-size: 13px; font-weight: 500; z-index: 200;
    transform: translateY(-100%); transition: transform .2s ease;
    pointer-events: none;
  }
  .pull-refresh-indicator.visible { transform: translateY(0); }
  .pull-refresh-indicator.refreshing { color: var(--green); }

  /* Predict */
  .pred-match-header {
    background: var(--tg-secondary); padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07); text-align: center;
  }
  .pred-teams { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 8px; }
  .pred-team  { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .pred-flag  {
    font-size: 40px;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .pred-flag-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1em;
    vertical-align: -0.14em;
    line-height: 1;
  }
  .pred-flag-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 1px;
  }
  .pred-flag .pred-flag-inline {
    width: 100%;
    height: 100%;
    vertical-align: baseline;
  }
  .pred-flag .pred-flag-img {
    object-fit: contain;
    box-shadow: none;
  }
  .match-teams-str .pred-flag-inline,
  .compare-match-row .pred-flag-inline {
    width: 1.15em;
    height: 0.95em;
    vertical-align: -0.12em;
  }
  .mt-team-flag .pred-flag-inline { width: 1.1em; height: 0.9em; vertical-align: -0.1em; }
  .pred-tname { font-size: 14px; font-weight: 700; }
  .pred-vs    { font-size: 20px; font-weight: 700; color: var(--tg-hint); }

  .pred-match-context {
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 11px;
    line-height: 1.45;
    color: var(--tg-hint);
  }
  .pred-ctx-line + .pred-ctx-line { margin-top: 3px; }
  .pred-ctx-team { color: var(--tg-text); font-weight: 600; }

  .mc-section { margin-bottom: 14px; }
  .mc-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tg-hint);
    margin-bottom: 8px;
  }
  .mc-team-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
  }
  .mc-team-name { font-size: 15px; font-weight: 700; }
  .mc-form-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--tg-separator);
    color: var(--tg-hint);
    white-space: nowrap;
  }
  .mc-goals { font-size: 12px; color: var(--tg-hint); margin-bottom: 6px; }
  .mc-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 6px;
    align-items: center;
    padding: 6px 0 0;
    font-size: 13px;
  }
  .mc-match-block {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 8px;
  }
  .mc-match-block:first-child .mc-row { padding-top: 6px; }
  .mc-stat-compact { padding: 6px 0 2px 44px; }
  .mc-stat-bar {
    height: 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin-bottom: 5px;
  }
  .mc-stat-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(45,189,110,0.85), rgba(45,189,110,0.55));
  }
  .mc-stat-txt {
    font-size: 11px;
    color: var(--tg-hint);
    line-height: 1.35;
  }
  .mc-date { color: var(--tg-hint); font-size: 12px; }
  .mc-opp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mc-score { font-weight: 700; text-align: right; }
  .mc-divider { height: 10px; }
  .mc-empty-h2h { font-size: 13px; color: var(--tg-hint); }

  .pred-progress { padding: 8px 16px 0; }
  .progress-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
  .progress-label { font-size: 12px; color: var(--tg-hint); }
  .progress-count { font-size: 12px; font-weight: 700; color: var(--green); }
  .pred-q-dots {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 0 1px;
  }
  .pred-q-dot {
    flex: 1 1 0;
    max-width: 8px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid transparent;
    transition: background .2s, transform .2s, border-color .2s;
  }
  .pred-q-dot--h1 { border-color: rgba(52, 211, 153, 0.35); }
  .pred-q-dot--h2 { border-color: rgba(96, 165, 250, 0.35); }
  .pred-q-dot--match { border-color: rgba(45, 189, 110, 0.35); }
  .pred-q-dot--goals { border-color: rgba(245, 197, 66, 0.35); }
  .pred-q-dot--extra { border-color: var(--playoff-border); }
  .pred-q-dot--done.pred-q-dot--h1 { background: var(--section-h1); }
  .pred-q-dot--done.pred-q-dot--h2 { background: var(--section-h2); }
  .pred-q-dot--done.pred-q-dot--match { background: var(--section-match); }
  .pred-q-dot--done.pred-q-dot--goals { background: var(--section-goals); }
  .pred-q-dot--done.pred-q-dot--extra { background: var(--playoff); }
  .pred-q-dot--current {
    transform: scaleY(1.35);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.25);
  }
  .progress-bar   { height: 5px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
  .progress-fill  { height: 100%; background: var(--green); border-radius: 2px; transition: width .3s ease; }
  .pred-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 12px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: center;
  }
  .pred-tools::-webkit-scrollbar { display: none; }
  .personal-best-msg { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--green); }
  .stats-vs-teams { font-size: 12px; color: var(--tg-hint); margin-bottom: 10px; }
  .matches-focus-banner { margin: 6px 12px 6px; padding: 10px 12px; border-radius: 10px; }
  .matches-focus-banner--urgent { background: rgba(224,82,82,.12); border: 1px solid rgba(224,82,82,.45); }
  .matches-focus-banner--soon { background: rgba(245,197,66,.12); border: 1px solid rgba(245,197,66,.45); }
  .matches-focus-banner--normal { background: rgba(245,197,66,.08); border: 1px solid rgba(245,197,66,.3); }
  .matches-focus-banner--gameday { background: rgba(76,175,80,.08); border: 1px solid rgba(76,175,80,.25); }
  .matches-focus-inner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .matches-focus-inner--multi { align-items: flex-start; }
  .matches-focus-copy--multi { flex: 1; min-width: 0; width: 100%; }
  .matches-focus-when { font-size: 11px; color: var(--tg-hint); margin-bottom: 6px; }
  .matches-focus-rows { display: flex; flex-direction: column; gap: 8px; }
  .matches-focus-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
  .matches-focus-row .matches-focus-text { flex: 1; min-width: 0; }
  .matches-focus-row .matches-focus-btn { flex-shrink: 0; padding: 7px 12px; font-size: 11px; }
  .matches-focus-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex-shrink: 0; }
  .matches-focus-link {
    border: none; background: transparent; color: var(--gold); font-size: 11px; font-weight: 500;
    padding: 2px 0; cursor: pointer; text-align: center; white-space: nowrap;
  }
  .matches-focus-btn--primary-lg { min-width: 132px; padding: 10px 14px; font-size: 13px; }
  .matches-focus-btn--secondary {
    background: transparent; color: var(--gold); border: 1px solid rgba(245,197,66,.35);
    font-size: 11px; padding: 7px 10px;
  }
  .matches-gameday-progress {
    margin: 0 12px 8px; padding: 8px 10px 10px; border-radius: 8px;
    background: rgba(45,189,110,.06); border: 1px solid rgba(45,189,110,.2); cursor: pointer;
    transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
  }
  .matches-gameday-progress:active { opacity: .85; }
  .matches-gameday-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
  }
  .matches-gameday-progress-label { font-size: 11px; font-weight: 600; color: var(--green); margin-bottom: 0; flex: 1; min-width: 0; }
  .matches-gameday-progress-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(45, 189, 110, 0.2);
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
  }
  .matches-gameday-progress-hint { font-size: 10px; color: var(--gold); margin-top: 6px; line-height: 1.3; }
  .matches-gameday-progress-track { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
  .matches-gameday-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-dim), var(--green));
    border-radius: 4px;
    transition: width .45s cubic-bezier(.22, 1, .36, 1);
  }
  .matches-gameday-progress--complete {
    background: rgba(45, 189, 110, 0.12);
    border-color: rgba(45, 189, 110, 0.45);
    box-shadow: 0 0 0 1px rgba(45, 189, 110, 0.12) inset;
  }
  .matches-gameday-progress--pulse .matches-gameday-progress-fill {
    animation: gameday-fill-pulse .65s ease-out;
  }
  .matches-gameday-progress--pulse.matches-gameday-progress--complete {
    animation: gameday-complete-flash .85s ease-out;
  }
  @keyframes gameday-fill-pulse {
    0% { filter: brightness(1); }
    40% { filter: brightness(1.35); }
    100% { filter: brightness(1); }
  }
  @keyframes gameday-complete-flash {
    0% { box-shadow: 0 0 0 0 rgba(45, 189, 110, 0.45); }
    50% { box-shadow: 0 0 0 4px rgba(45, 189, 110, 0.2); }
    100% { box-shadow: 0 0 0 1px rgba(45, 189, 110, 0.12) inset; }
  }
  .match-card--featured { border: 1px solid rgba(45,189,110,.28); box-shadow: 0 2px 10px rgba(45,189,110,.08); }
  .match-card--featured .match-card-body { padding-top: 10px; padding-bottom: 10px; }
  .match-nearest-label {
    display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--green); margin-right: 6px; vertical-align: middle;
  }
  .match-card--flash-save {
    animation: match-save-flash 1.2s ease-out;
  }
  @keyframes match-save-flash {
    0% { box-shadow: 0 0 0 0 rgba(45,189,110,.55); }
    40% { box-shadow: 0 0 0 4px rgba(45,189,110,.25); }
    100% { box-shadow: none; }
  }
  .matches-pull-indicator {
    text-align: center; font-size: 11px; color: var(--tg-hint); padding: 6px 12px 2px;
  }
  .matches-pull-indicator--ready { color: var(--green); }
  .matches-pull-indicator--loading { color: var(--tg-text); }
  .success-gameday-btn {
    background: rgba(245,197,66,.12); color: var(--gold); border: 1px solid rgba(245,197,66,.35);
  }
  .matches-stale-banner {
    margin: 4px 12px 6px; padding: 8px 10px; border-radius: 8px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  }
  .matches-stale-banner-text { flex: 1; min-width: 0; font-size: 11px; color: var(--tg-hint); line-height: 1.35; }
  .matches-stale-banner-btn {
    border: none; background: rgba(255,255,255,.1); color: var(--tg-text);
    font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 6px; cursor: pointer; flex-shrink: 0;
  }
  .match-new-badge {
    display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    color: var(--gold); background: rgba(245,197,66,.12); border: 1px solid rgba(245,197,66,.25);
    border-radius: 4px; padding: 1px 5px; margin-right: 4px; vertical-align: middle;
  }
  .matches-focus-copy { flex: 1; min-width: 0; }
  .matches-focus-title { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
  .matches-focus-banner--urgent .matches-focus-title { color: var(--red-live); }
  .matches-focus-banner--soon .matches-focus-title,
  .matches-focus-banner--normal .matches-focus-title { color: var(--gold); }
  .matches-focus-banner--gameday .matches-focus-title { color: var(--green); }
  .matches-focus-text { font-size: 12px; color: var(--tg-text); line-height: 1.35; }
  .matches-focus-btn {
    flex-shrink: 0; border: none; border-radius: 999px; padding: 7px 13px;
    background: var(--gold); color: #1a1400; font-size: 12px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
  }
  .matches-focus-banner--gameday .matches-focus-btn { background: var(--green); color: #fff; }
  .matches-focus-banner--urgent .matches-focus-btn { background: var(--red-live); color: #fff; }
  .gameday-digest-banner { margin: 6px 12px 6px; padding: 10px 12px; border-radius: 10px; background: rgba(76,175,80,.08); border: 1px solid rgba(76,175,80,.25); }
  .next-deadline-banner { margin: 6px 12px 6px; padding: 10px 12px; border-radius: 10px; background: rgba(245,197,66,.1); border: 1px solid rgba(245,197,66,.35); }
  .next-deadline-inner { display: flex; gap: 10px; align-items: center; }
  .next-deadline-copy { flex: 1; min-width: 0; }
  .next-deadline-title { font-size: 12px; font-weight: 600; color: var(--gold); margin-bottom: 2px; }
  .next-deadline-text { font-size: 12px; color: var(--tg-text); line-height: 1.35; }
  .next-deadline-btn { flex-shrink: 0; border: none; border-radius: 999px; padding: 7px 13px; background: var(--gold); color: #1a1400; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
  .deadline-alert {
    position: fixed; left: 0; right: 0; top: 0; z-index: 9997;
    padding: 12px 14px; background: rgba(245,197,66,.94); color: #1a1400;
    display: flex; gap: 10px; align-items: center;
    border-bottom: 1px solid rgba(0,0,0,.1);
  }
  .deadline-alert-text { flex: 1; font-size: 13px; line-height: 1.4; font-weight: 500; }
  .deadline-alert-btn {
    border: none; border-radius: 999px; padding: 7px 13px; background: var(--tg-bg);
    color: var(--gold); font-weight: 600; cursor: pointer; white-space: nowrap; font-size: 13px;
  }
  .deadline-alert-close {
    border: none; background: transparent; color: rgba(26,20,0,.45);
    font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
  }
  body.predict-screen-active { padding-bottom: 0; }
  body.predict-screen-active .nav { display: none; }
  .pred-section-bar {
    margin: 8px 12px 4px; padding: 6px 10px; border-radius: 8px;
    background: rgba(45,189,110,.1); border-left: 3px solid var(--green);
  }
  .pred-section-bar--h1 { background: rgba(52, 211, 153, 0.1); border-left-color: var(--section-h1); }
  .pred-section-bar--h1 .pred-section-title { color: var(--section-h1); }
  .pred-section-bar--h2 { background: rgba(96, 165, 250, 0.1); border-left-color: var(--section-h2); }
  .pred-section-bar--h2 .pred-section-title { color: var(--section-h2); }
  .pred-section-bar--match { background: rgba(45, 189, 110, 0.1); border-left-color: var(--section-match); }
  .pred-section-bar--match .pred-section-title { color: var(--section-match); }
  .pred-section-bar--goals { background: rgba(245, 197, 66, 0.1); border-left-color: var(--section-goals); }
  .pred-section-bar--goals .pred-section-title { color: var(--section-goals); }
  .pred-section-bar--extra { background: var(--playoff-soft); border-left-color: var(--playoff); }
  .pred-section-bar--extra .pred-section-title { color: var(--playoff); }
  .pred-section-bar--upcoming { background: rgba(255,255,255,.04); border-left-color: rgba(255,255,255,.22); }
  .pred-section-title { font-size: 11px; font-weight: 600; color: var(--green); }
  .pred-section-bar--upcoming .pred-section-title { color: var(--tg-hint); }
  .pred-section-sub { font-size: 10px; color: var(--tg-hint); margin-top: 2px; }
  .push-settings-hint { font-size: 11px; color: var(--tg-hint); line-height: 1.4; margin-top: 8px; }
  .push-settings-note {
    margin: 0 12px 10px; padding: 10px 12px; border-radius: 10px; font-size: 11px; line-height: 1.4;
    color: var(--tg-hint); background: rgba(46,166,255,.08); border: 1px solid rgba(46,166,255,.22);
  }
  .push-enable-btn { width: 100%; margin-top: 10px; font-size: 13px; padding: 10px 12px; }
  .settings-quiet-label { font-size: 11px; font-weight: 600; color: var(--tg-hint); margin: 8px 0 2px; }
  .gameday-digest-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
  .gameday-digest-text { font-size: 12px; color: var(--tg-hint); line-height: 1.35; margin-bottom: 8px; }
  .gameday-digest-btn { width: 100%; font-size: 13px; padding: 8px 12px; }
  #my-preds-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 8px; }
  #my-preds-filters .filter-chip { font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--tg-separator); background: transparent; color: var(--tg-text); }
  #my-preds-filters .filter-chip.active { border-color: var(--green); color: var(--green); }
  .compare-ai-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tg-separator); }
  .compare-ai-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
  .compare-ai-scores { font-size: 13px; margin-bottom: 6px; }
  .compare-ai-legend { font-size: 11px; color: var(--tg-hint); margin-bottom: 8px; }
  .compare-ai-row { display: grid; grid-template-columns: 28px 20px 1fr 1fr; gap: 4px; font-size: 11px; padding: 3px 0; align-items: center; }
  .compare-ai-row.diff { background: rgba(255,152,0,.06); border-radius: 4px; }
  .compare-ai-u.hit, .compare-ai-a.hit { color: var(--green); font-weight: 600; }
  .ai-strategy-badge, .mp-ai-strategy { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--tg-hint); line-height: 1.35; }
  .mp-ai-strategy { margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(100,100,100,.12); }
  .what-if-ai-text { font-size: 13px; line-height: 1.4; margin: 0 0 6px; }
  .what-if-ai-hint { font-size: 11px; color: var(--tg-hint); margin: 0; line-height: 1.35; }

  .question-card {
    margin: 8px 12px 0; background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.07); border-radius: var(--radius); padding: 16px;
  }
  .q-num  { font-size: 10px; font-weight: 700; color: var(--green); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
  .q-text { font-size: 15px; font-weight: 600; margin-bottom: 14px; line-height: 1.4; }

  .scorer-section { margin-bottom: 14px; }
  .scorer-section:last-child { margin-bottom: 0; }
  .scorer-section-title {
    font-size: 12px; font-weight: 700; color: var(--green);
    letter-spacing: 0.03em; margin: 0 0 8px 2px; padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: rgba(45, 189, 110, 0.1);
    border: 1px solid rgba(45, 189, 110, 0.22);
    line-height: 1.35;
  }
  .q-squads-warn {
    font-size: 12px; color: var(--tg-hint); line-height: 1.45;
    margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm);
    background: rgba(255, 180, 60, 0.1); border: 1px solid rgba(255, 180, 60, 0.25);
  }
  .q-squads-warn .btn-secondary { margin-top: 8px; width: 100%; }

  .options-grid         { display: grid; gap: 8px; }
  .options-grid.cols2   { grid-template-columns: 1fr 1fr; }
  .options-grid.cols3   { grid-template-columns: 1fr 1fr 1fr; }
  .options-grid.cols4   { grid-template-columns: 1fr 1fr 1fr 1fr; }

  .opt-btn {
    background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm); padding: 10px 8px; color: var(--tg-text);
    font-size: 13px; font-weight: 500; cursor: pointer; text-align: center; transition: all .15s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .opt-btn:active  { transform: scale(0.96); }
  .opt-btn.selected { background: rgba(45,189,110,0.15); border-color: var(--green); color: var(--green); font-weight: 700; }
  .opt-select {
    padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.15);
    background: var(--tg-secondary); color: var(--tg-text); font-size: 14px; font-family: inherit;
    cursor: pointer; min-height: 44px;
  }

  .score-picker  { display: flex; align-items: center; justify-content: center; gap: 16px; }
  .score-spinner { display: flex; flex-direction: column; align-items: center; }
  .spin-btn {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08);
    border: none; color: var(--tg-text); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background .15s;
  }
  .spin-btn:active { background: var(--green); }
  .spin-val   { font-family: 'JetBrains Mono', monospace; font-size: 34px; font-weight: 700; width: 44px; text-align: center; line-height: 1.4; }
  .score-colon { font-family: 'JetBrains Mono', monospace; font-size: 30px; font-weight: 700; color: var(--tg-hint); margin-top: -4px; }
  .goal-quick-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
  .goal-quick-row:last-child { margin-bottom: 0; }
  .goal-quick-btn {
    min-width: 44px; height: 44px; padding: 0 10px; border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06);
    color: var(--tg-text); font-size: 16px; font-weight: 700; cursor: pointer;
    transition: background .15s, border-color .15s;
  }
  .goal-quick-btn:active { background: rgba(45,189,110,0.2); border-color: var(--green); }
  .goal-quick-btn.selected { background: rgba(45,189,110,0.2); border-color: var(--green); color: var(--green); }

  /* Сетка пресетов счёта (тайм / матч): прокрутка на маленьком экране */
  .score-presets-grid {
    margin-top: 12px;
    max-height: min(42vh, 360px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    touch-action: manipulation;
    position: relative;
    mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
  }
  .score-presets-grid::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: block;
    height: 28px;
    margin-top: -28px;
    background: linear-gradient(180deg, transparent, var(--tg-bg) 90%);
    pointer-events: none;
  }
  @media (max-width: 360px) {
    .question-card:has(.score-presets-grid)::after {
      content: '↕';
      display: block;
      text-align: center;
      font-size: 10px;
      color: var(--tg-hint);
      margin-top: 2px;
      opacity: 0.75;
    }
  }

  #screen-predict.active {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    overflow: hidden;
  }
  #screen-matches.active,
  #screen-my.active {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    overflow: hidden;
  }
  body.screen-fixed-scroll-active {
    overflow: hidden;
    height: 100dvh;
  }
  .screen-sticky-head {
    flex: 0 0 auto;
    background: var(--tg-bg);
    z-index: 6;
    padding-bottom: 2px;
    box-shadow: 0 1px 0 rgba(255,255,255,.04);
  }
  .screen-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  #screen-predict .pred-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #screen-predict .pred-footer {
    flex: 0 0 auto;
    width: 100%;
    background: var(--tg-bg);
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 8px 12px 10px;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.28);
    z-index: 20;
  }
  #screen-predict .pred-footer-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }
  #screen-predict .pred-footer-chip {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: var(--tg-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    white-space: normal;
  }
  #screen-predict .pred-footer-chip--reset {
    color: var(--tg-hint);
    background: rgba(255,255,255,0.04);
  }
  #screen-predict .pred-nav-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }
  #screen-predict .pred-nav-btn {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
  }
  #screen-predict .pred-nav-btn--back {
    grid-column: 1;
    background: rgba(255,255,255,0.08);
    color: var(--tg-text);
  }
  #screen-predict .pred-nav-btn--exit {
    background: var(--exit-nav-soft);
    color: var(--exit-nav);
    border: 1px solid var(--exit-nav-border);
  }
  #screen-predict .pred-nav-exit-row {
    margin-top: 8px;
    width: 100%;
  }
  #screen-predict .pred-nav-exit-row[hidden] {
    display: none;
  }
  #screen-predict .pred-nav-btn--exit-secondary {
    width: 100%;
    min-height: 40px;
    padding: 9px 14px;
    background: var(--exit-nav-soft);
    color: var(--exit-nav);
    border: 1px solid var(--exit-nav-border);
    font-size: 13px;
    font-weight: 600;
  }
  #screen-predict .pred-nav-btn--next {
    grid-column: 2;
    background: var(--green);
    color: #fff;
  }
  #screen-predict .pred-nav-btn--next:disabled {
    background: var(--green-dim);
    opacity: .6;
  }
  #screen-predict .pred-nav-row.pred-nav-row--solo-next .pred-nav-btn--back {
    display: none;
  }
  #screen-predict .pred-nav-row.pred-nav-row--solo-next .pred-nav-btn--next {
    grid-column: 2;
  }
  .q-nav { display: flex; gap: 10px; margin: 16px 12px 0; }
  .q-nav-btn { flex: 1; padding: 14px; border-radius: var(--radius); border: none; cursor: pointer; font-size: 14px; font-weight: 700; transition: all .15s; }
  .q-nav-btn.back { background: rgba(255,255,255,0.08); color: var(--tg-text); }
  .q-nav-btn.next { background: var(--green); color: #fff; }
  .q-nav-btn.next:disabled { background: var(--green-dim); opacity: .6; }

  /* Leaderboard */
  .lb-podium { display: flex; align-items: flex-end; justify-content: center; gap: 5px; padding: 10px 12px 10px; }
  .podium-item { flex: 1; text-align: center; max-width: 100px; background: var(--card-bg); border: 1px solid rgba(255,255,255,0.07); border-radius: 9px; padding: 8px 5px; cursor: default; }
  .podium-item.first { transform: scale(1.05); transform-origin: bottom; background: rgba(245,197,66,.1); border-color: rgba(245,197,66,.25); }
  .podium-medal { font-size: 18px; margin-bottom: 3px; }
  .podium-alias { font-size: 10px; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
  .podium-pts   { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--green); }
  .podium-pts-label { font-size: 8px; color: var(--tg-hint); letter-spacing: .3px; }
  .first .podium-pts { color: var(--gold); font-size: 14px; }

  .lb-list { padding: 0 12px; }
  .lb-row { display: flex; align-items: center; gap: 12px; background: var(--card-bg); border: 1px solid rgba(255,255,255,0.07); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; }
  /* Тап по строке, а не выделение текста (Telegram Desktop / WebView). */
  .lb-row.lb-row--tap,
  .podium-item.lb-row--tap,
  .match-card[data-tap-card] {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    cursor: pointer;
  }
  .lb-row.lb-row--tap:focus-visible,
  .podium-item.lb-row--tap:focus-visible,
  .match-card[data-tap-card]:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
  }
  .lb-rank  { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: var(--tg-hint); width: 24px; text-align: center; }
  .lb-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--green-dim), var(--green)); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0; }
  .lb-name  { flex: 1; }
  .lb-alias { font-size: 14px; font-weight: 600; }
  .lb-clan  { font-size: 11px; color: var(--tg-hint); }
  .lb-score { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 700; }
  .lb-row.me { border-color: rgba(45,189,110,0.55); background: rgba(45,189,110,0.08); box-shadow: 0 0 0 1px rgba(45,189,110,0.15); }
  .lb-row.me .lb-score { color: var(--green); }
  .lb-row.me .lb-alias { color: var(--green); }
  .lb-row.me .lb-avatar { box-shadow: 0 0 0 2px rgba(45,189,110,0.45); }
  .podium-item.me { border-color: rgba(45,189,110,0.5); background: rgba(45,189,110,0.1); box-shadow: 0 0 0 1px rgba(45,189,110,0.2); }
  .podium-item.me .podium-alias { color: var(--green); }

  .mp-preds-table { padding: 0 12px 8px; }
  .mp-cols-head {
    display: grid;
    grid-template-columns: 24px 42px 1fr 52px 52px;
    gap: 8px;
    align-items: end;
    padding: 8px 14px 2px;
  }
  .mp-cols-head .mp-col-rank,
  .mp-cols-head .mp-col-avatar,
  .mp-cols-head .mp-col-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--tg-hint);
    text-transform: uppercase;
    letter-spacing: .4px;
  }
  .mp-col-sort {
    border: none;
    background: transparent;
    color: var(--tg-hint);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .35px;
    padding: 2px 0 4px;
    cursor: pointer;
    text-align: center;
    border-bottom: 2px solid transparent;
  }
  .mp-col-sort.active {
    color: var(--green);
    border-bottom-color: var(--green);
  }
  .mp-col-sort--static {
    cursor: default;
    text-align: center;
    border-bottom: 2px solid transparent;
  }
  .mp-cols-hint {
    margin: 0 14px 8px;
    text-align: left;
    font-size: 11px;
    color: var(--tg-hint);
  }
  .lb-row.mp-pred-row {
    display: grid;
    grid-template-columns: 24px 42px 1fr 52px 52px;
    gap: 8px;
    align-items: center;
    margin: 0 0 8px;
    padding: 10px 14px;
  }
  .mp-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
  }
  .mp-me-mark {
    width: 14px;
    flex-shrink: 0;
    font-size: 11px;
    line-height: 1;
    text-align: center;
  }
  .mp-me-mark--empty { visibility: hidden; }
  .mp-pred-row .lb-avatar { width: 30px; height: 30px; font-size: 12px; }
  .mp-pred-row .lb-name { min-width: 0; }
  .mp-pred-row .lb-alias {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mp-pts {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
  }
  .mp-pts-match { color: var(--tg-text); font-size: 12px; }
  .mp-pts-tour { color: var(--green); }
  .lb-row.mp-pred-row.me .mp-pts-tour { color: var(--gold); }

  /* Profile — компактная шапка (аватар + ник), ближе по плотности к блокам ниже */
  .profile-hero { padding: 12px 16px 10px; text-align: center; background: var(--tg-secondary); border-bottom: 1px solid rgba(255,255,255,0.07); }
  .profile-hero .skeleton-avatar { width: 56px; height: 56px; margin: 0 auto 8px; }
  .profile-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg,#1a7a44,var(--green)); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; margin: 0 auto 8px; border: 2px solid var(--green); }
  .profile-name { font-size: 17px; font-weight: 700; margin-bottom: 2px; line-height: 1.25; }

  .stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 16px 12px; }
  .stat-card  { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.07); border-radius: var(--radius-sm); padding: 14px 8px; text-align: center; }
  .stat-val   { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
  .stat-val.green { color: var(--green); }
  .stat-val.gold  { color: var(--gold); }
  .stat-label { font-size: 10px; color: var(--tg-hint); text-transform: uppercase; letter-spacing: .6px; }

  .pf-rank-strip { margin: 0 12px 10px; background: rgba(245,197,66,.08); border: 1px solid rgba(245,197,66,.2); border-radius: 9px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; }
  .pf-rank-num   { font-family: 'Bebas Neue', sans-serif; font-size: 42px; color: var(--gold); line-height: 1; }
  .pf-rank-info  { flex: 1; }
  .pf-rank-title { font-size: 12px; font-weight: 700; color: var(--tg-text); margin-bottom: 2px; }
  .pf-rank-sub   { font-size: 11px; color: var(--tg-hint); }
  .pf-rank-pts   { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 700; color: var(--green); margin-top: 4px; }
  .pf-rank-ptslbl { font-size: 9px; color: var(--tg-hint); letter-spacing: .5px; }
  .stats-row { display: flex; gap: 6px; padding: 0 12px 10px; }
  .stat-card  { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.07); border-radius: var(--radius-sm); padding: 14px 8px; text-align: center; flex: 1; }

  /* Question stats — strong/weak bars */
  .qs-legend { padding: 10px 16px 6px; font-size: 11px; color: var(--tg-hint); line-height: 1.35; text-align: right; }
  .qs-note { margin: 0 12px 8px; padding: 8px 10px; border-radius: 8px; background: rgba(245,197,66,.08); border: 1px solid rgba(245,197,66,.22); font-size: 12px; color: var(--gold); line-height: 1.35; }
  .qs-summary { margin: 0 12px 10px; padding: 10px 12px; background: var(--card-bg); border: 1px solid rgba(255,255,255,0.07); border-radius: var(--radius-sm); }
  .qs-summary-line { font-size: 12px; line-height: 1.4; margin-bottom: 4px; }
  .qs-summary-line:last-child { margin-bottom: 0; }
  .qs-summary-line--good { color: var(--green); }
  .qs-summary-line--bad { color: #e07a6a; }
  .qs-list { padding: 0 12px 8px; display: flex; flex-direction: column; gap: 6px; }
  .qs-row { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 8px 10px; }
  .qs-row--low-n { opacity: 0.72; }
  .qs-row-head { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; margin-bottom: 6px; }
  .qs-num { font-size: 10px; color: var(--tg-hint); font-family: 'JetBrains Mono', monospace; padding-top: 1px; }
  .qs-label { font-size: 12px; font-weight: 600; color: var(--tg-text); line-height: 1.35; word-break: break-word; }
  .qs-pct { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; min-width: 36px; text-align: right; padding-top: 1px; flex-shrink: 0; }
  .qs-pct--good { color: var(--green); }
  .qs-pct--mid { color: var(--gold); }
  .qs-pct--bad { color: #e07a6a; }
  .qs-pct--muted { color: var(--tg-hint); }
  .qs-bar-wrap { padding: 0 2px; }
  .qs-bar-track { position: relative; height: 10px; border-radius: 5px; background: rgba(255,255,255,0.06); overflow: visible; }
  .qs-bar-fill { height: 100%; border-radius: 5px; min-width: 0; transition: width .25s ease; }
  .qs-bar-fill--good { background: linear-gradient(90deg, rgba(45,189,110,.55), var(--green)); }
  .qs-bar-fill--mid { background: linear-gradient(90deg, rgba(245,197,66,.45), var(--gold)); }
  .qs-bar-fill--bad { background: linear-gradient(90deg, rgba(224,122,106,.45), #e07a6a); }
  .qs-bar-fill--muted { background: rgba(255,255,255,0.12); }
  .qs-bar-field { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: rgba(255,255,255,0.45); border-radius: 1px; pointer-events: none; }
  .qs-history-btn { margin: 4px 16px 12px; }

  .rank-banner { margin: 0 12px 12px; background: linear-gradient(135deg,rgba(45,189,110,.15),rgba(45,189,110,.05)); border: 1px solid rgba(45,189,110,.3); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
  .rank-num   { font-family: 'Bebas Neue', sans-serif; font-size: 48px; color: var(--green); line-height: 1; }
  .rank-info  { flex: 1; }
  .rank-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
  .rank-sub   { font-size: 12px; color: var(--tg-hint); }

  /* Success */
  .preview-hint { font-size: 13px; color: var(--tg-hint); text-align: center; margin: 12px 16px 8px; line-height: 1.4; }
  .success-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .success-overlay.show { opacity: 1; pointer-events: all; }
  .success-box { background: var(--tg-secondary); border-radius: 20px; padding: 32px 40px; text-align: center; transform: scale(.8); transition: transform .3s; border: 1px solid rgba(45,189,110,.3); }
  .success-overlay.show .success-box { transform: scale(1); }
  .zero-ticket-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s; padding: 16px; box-sizing: border-box; }
  .zero-ticket-overlay.show { opacity: 1; pointer-events: all; }
  .zero-ticket-overlay .zero-ticket-box { max-width: 100%; max-height: 85vh; overflow: auto; background: var(--card-bg); border-radius: 12px; border: 1px solid rgba(255,255,255,.12); padding: 14px; transform: scale(0.95); transition: transform .25s; }
  .zero-ticket-overlay.show .zero-ticket-box { transform: scale(1); }
  .zero-ticket-overlay .zero-ticket-box .totoshka-prediction-ticket {
    display: block;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.45);
    font-size: 12px;
    line-height: 1.52;
    box-sizing: border-box;
    max-width: 100%;
  }
  .zero-ticket-overlay .zero-ticket-box .totoshka-prediction-ticket > pre {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    line-height: 1.52;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .zero-ticket-overlay .zero-ticket-box .totoshka-ticket-head,
  .zero-ticket-overlay .zero-ticket-box .totoshka-ticket-foot {
    text-align: center;
  }
  .zero-ticket-overlay .zero-ticket-box .totoshka-prediction-ticket > pre.totoshka-ticket-body {
    font-size: 11px;
    line-height: 14px;
    white-space: pre;
    overflow-x: auto;
    text-align: left;
  }
  .zero-ticket-overlay .zero-ticket-close { margin-top: 12px; padding: 10px 24px; border-radius: 999px; border: none; background: var(--green); color: #fff; font-weight: 600; cursor: pointer; }
  .success-icon  { font-size: 56px; margin-bottom: 12px; display: block; }
  .success-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
  .success-sub   { font-size: 14px; color: var(--tg-hint); }
  .success-more  { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
  .success-more-btn { display: inline-block; min-height: 44px; padding: 12px 20px; font-size: 14px; font-weight: 600; color: var(--tg-button-text-color, #fff); background: var(--tg-button-color, #2481cc); border: none; border-radius: 12px; cursor: pointer; line-height: 1.2; width: 100%; }
  .success-more-btn.success-next-btn { background: var(--gold); color: #1a1400; }
  .success-more-btn.success-next-btn--primary { background: var(--green); color: #fff; }
  .success-more-btn.success-back-btn { background: rgba(255,255,255,.12); color: var(--tg-text); }
  .success-more-btn:active { opacity: .9; }
  .success-more-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

  .ios-tip {
    margin: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
    background: rgba(45, 189, 110, 0.12); border: 1px solid rgba(45, 189, 110, 0.3);
    font-size: 12px; color: var(--tg-text); line-height: 1.45;
  }

  .matches-login-bar {
    padding: 10px 16px 12px;
    background: rgba(45, 189, 110, 0.08);
    border-bottom: 1px solid rgba(45, 189, 110, 0.2);
  }
  .matches-login-bar .login-bar-hint { font-size: 12px; color: var(--tg-hint); margin-bottom: 8px; line-height: 1.35; }
  .matches-login-bar .login-bar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .matches-login-bar .login-bar-input { flex: 1; min-width: 140px; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); background: rgba(13,17,23,0.6); color: var(--tg-text); font-size: 14px; }
  .matches-login-bar .login-bar-btn { padding: 8px 16px; border: none; border-radius: 999px; background: var(--green); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }

  .filter-bar-wrap {
    position: relative;
  }
  .filter-bar-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 10px;
    width: 24px;
    background: linear-gradient(270deg, transparent, var(--tg-bg) 88%);
    pointer-events: none;
    z-index: 1;
  }
  .filter-bar-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 10px;
    width: 32px;
    background: linear-gradient(90deg, transparent, var(--tg-bg) 85%);
    pointer-events: none;
    z-index: 1;
  }
  .filter-bar {
    display: flex;
    gap: 8px;
    padding: 2px 16px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-bar {
    margin-top: 2px;
  }
  .chip {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: var(--tg-text);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
  }
  .chip.active {
    border-color: rgba(45, 189, 110, .55);
    background: rgba(45, 189, 110, .16);
  }

  .pred-tools {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 4px 12px 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: center;
  }
  .pred-tools::-webkit-scrollbar { display: none; }
  #screen-predict .pred-tools .chip--tool {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .pred-meta {
    padding: 0 16px 6px;
    font-size: 12px;
    color: var(--tg-hint);
  }

  .sheet-backdrop {
    position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,.5);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .sheet-backdrop.show { opacity: 1; pointer-events: all; }
  .sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--card-bg);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -12px 30px rgba(0,0,0,.35);
    transform: translateY(110%);
    transition: transform .25s ease;
    z-index: 9999;
    max-height: 76vh;
    overflow: hidden;
  }
  .sheet.show { transform: translateY(0); }
  .sheet-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .sheet-title { font-weight: 900; }
  .sheet-close {
    border:none;
    background: rgba(255,255,255,.08);
    color: var(--tg-text);
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 900;
    cursor: pointer;
  }
  .sheet-body { padding: 12px 16px 16px; overflow:auto; max-height: calc(76vh - 56px); }
  .sheet-confirm-body { text-align: center; }
  .sheet-confirm-msg { font-size: 14px; line-height: 1.45; color: var(--tg-text); margin: 0 0 16px; }
  .sheet-confirm-actions { display: flex; flex-direction: column; gap: 10px; }
  .sheet-confirm-actions .btn-primary { min-height: 46px; }
  .sheet-confirm-actions .quick-btn { min-height: 44px; }
  .q-jump-grid { display:grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .q-jump {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: var(--tg-text);
    padding: 10px 0;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
  }
  .q-jump.done { border-color: rgba(45,189,110,.45); background: rgba(45,189,110,.14); }
  .q-jump.miss { border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.10); }

  .settings-section {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .settings-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .settings-title {
    font-weight: 800;
    font-size: 14px;
  }
  .settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    gap: 10px;
  }
  /* Прогноз участника: вопрос и ответ в одной строке (inline), не два блока друг под другом */
  .participant-pred-list {
    padding: 0 12px 12px;
    text-align: left;
  }
  #pred-detail-list .participant-pred-list.pred-detail-ticket {
    padding: 8px 12px 16px;
    text-align: left;
  }
  .participant-pred-row {
    font-size: 12px;
    line-height: 1.45;
    padding: 5px 0;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-align: left;
  }
  .participant-pred-row .ppl {
    color: var(--tg-hint);
    font-weight: 500;
  }
  .participant-pred-row .ppv {
    font-weight: 600;
    word-break: break-word;
  }
  .participant-pred-row .pred-line-meta {
    font-size: 11px;
    color: var(--tg-hint);
    font-weight: 500;
  }
  .participant-pred-row .pred-line-pt {
    font-size: 11px;
    font-weight: 700;
  }
  .pd-cards {
    display: grid;
    gap: 10px;
    padding: 8px 12px 16px;
  }
  .pd-card {
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    padding: 10px 12px;
  }
  .pd-card.ok {
    border-color: rgba(45,189,110,0.35);
    background: rgba(45,189,110,0.08);
  }
  .pd-card.bad {
    border-color: rgba(224,82,82,0.35);
    background: rgba(224,82,82,0.08);
  }
  .pd-card-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  .pd-card-q {
    font-size: 11px;
    color: var(--tg-hint);
    font-weight: 700;
  }
  .pd-card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
  }
  .pd-card-pt {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
  }
  .pd-card-pt.ok {
    color: #fff;
    background: var(--green);
  }
  .pd-card-pt.bad {
    color: #fff;
    background: var(--red-live);
  }
  .pd-card-row {
    display: flex;
    gap: 6px;
    font-size: 13px;
    line-height: 1.35;
    margin-top: 4px;
  }
  .pd-card-row .k {
    color: var(--tg-hint);
    min-width: 56px;
  }
  .pd-card-row .v {
    font-weight: 700;
    word-break: break-word;
  }
  .settings-label {
    color: var(--tg-hint);
    font-size: 12px;
  }
  .settings-hint {
    color: var(--tg-hint);
    font-size: 12px;
    line-height: 1.5;
    padding: 6px 0 2px;
  }
  .settings-row.help-row {
    cursor: pointer;
    padding: 4px 0;
  }
  .help-row-arrow {
    color: var(--tg-hint);
    font-size: 18px;
  }
  .settings-select {
    background: rgba(255,255,255,.06);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    color: var(--tg-text);
    padding: 6px 10px;
    font-size: 13px;
  }
  .toggle {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255,255,255,.2);
    cursor: pointer;
    flex-shrink: 0;
  }
  .toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform .16s ease, background .16s ease;
  }
  .toggle.on {
    background: rgba(45,189,110,.6);
  }
  .toggle.on .toggle-knob {
    transform: translateX(20px);
  }
  .toggle.toggle--disabled { opacity: 0.45; pointer-events: none; }

  .profile-edit-btn {
    margin: 0 16px 12px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    color: var(--tg-text);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }
  .profile-help-card {
    margin: 0 16px 16px;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 14px 16px;
  }
  .profile-help-card .settings-title {
    margin-bottom: 4px;
  }
  .profile-help-card .profile-edit-btn {
    margin: 0 0 8px;
    border-radius: 12px;
  }
  .profile-help-card .profile-edit-btn:last-child {
    margin-bottom: 0;
  }

  .profile-edit-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }
  .profile-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.04);
    color: var(--tg-text);
    font-size: 13px;
  }
  .profile-textarea {
    min-height: 60px;
    resize: vertical;
  }
  .profile-save-btn {
    align-self: flex-end;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: var(--green);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }

  .help-body {
    padding: 12px 16px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tg-text);
  }
  .help-body h1, .help-body h2, .help-body h3 {
    margin: 12px 0 6px;
    font-weight: 800;
  }
  .help-body p {
    margin: 6px 0;
  }
  .help-body pre {
    display: inline-block;
    margin: 8px auto 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.55);
    font-size: 12px;
    line-height: 1.45;
    white-space: pre;
  }
  #pred-detail-list .totoshka-prediction-ticket,
  #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket,
  #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket,
  #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin: 8px 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.55);
    font-size: 12px;
    line-height: 1;
    box-sizing: border-box;
    text-align: left;
    vertical-align: top;
  }
  #pred-detail-list .totoshka-prediction-ticket > pre,
  #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket > pre,
  #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket > pre,
  #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket > pre {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
  }
  #pred-detail-list .totoshka-prediction-ticket > pre.totoshka-ticket-head,
  #pred-detail-list .totoshka-prediction-ticket > pre.totoshka-ticket-foot,
  #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket > pre.totoshka-ticket-head,
  #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket > pre.totoshka-ticket-foot,
  #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket > pre.totoshka-ticket-head,
  #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket > pre.totoshka-ticket-foot,
  #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket > pre.totoshka-ticket-head,
  #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket > pre.totoshka-ticket-foot {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.45;
  }
  #pred-detail-list .totoshka-prediction-ticket > pre.totoshka-ticket-body,
  #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket > pre.totoshka-ticket-body,
  #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket > pre.totoshka-ticket-body,
  #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket > pre.totoshka-ticket-body {
    white-space: pre;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    font-size: 11px;
    line-height: 14px;
    text-align: left;
  }
  .totoshka-prediction-ticket .ticket-hit-ok {
    color: var(--green);
    font-weight: 700;
  }
  .totoshka-prediction-ticket .ticket-hit-bad {
    color: var(--red-live);
    font-weight: 700;
  }
  #pred-detail-list .totoshka-prediction-ticket > .totoshka-ticket-head,
  #pred-detail-list .totoshka-prediction-ticket > .totoshka-ticket-foot,
  #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket > .totoshka-ticket-head,
  #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket > .totoshka-ticket-foot,
  #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket > .totoshka-ticket-head,
  #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket > .totoshka-ticket-foot,
  #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket > .totoshka-ticket-head,
  #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket > .totoshka-ticket-foot {
    text-align: center;
  }
  #pred-detail-list .totoshka-prediction-ticket > div.totoshka-ticket-body--grid,
  #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket > div.totoshka-ticket-body--grid,
  #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket > div.totoshka-ticket-body--grid,
  #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket > div.totoshka-ticket-body--grid,
  .zero-ticket-overlay .zero-ticket-box .totoshka-prediction-ticket > div.totoshka-ticket-body--grid {
    font-size: clamp(10px, 3.1vw, 12px);
    word-break: break-word;
  }
  .totoshka-ticket-body--grid {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    line-height: 1.45;
    width: fit-content;
    max-width: 100%;
  }
  .totoshka-ticket-table {
    display: table;
    width: fit-content;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
  }
  .totoshka-ticket-table .totoshka-ticket-row {
    display: table-row;
  }
  .totoshka-ticket-table .totoshka-ticket-q,
  .totoshka-ticket-table .totoshka-ticket-a,
  .totoshka-ticket-table .totoshka-ticket-p,
  .totoshka-ticket-table .totoshka-ticket-f,
  .totoshka-ticket-table .totoshka-ticket-hit {
    display: table-cell;
    vertical-align: top;
    padding: 3px 0;
  }
  .totoshka-ticket-table .totoshka-ticket-q {
    padding-right: 6px;
    color: var(--tg-text);
    white-space: normal;
  }
  .totoshka-ticket-table .totoshka-ticket-a,
  .totoshka-ticket-table .totoshka-ticket-p {
    padding-left: 0;
    white-space: nowrap;
    font-weight: 700;
  }
  .totoshka-ticket-table .totoshka-ticket-a::before,
  .totoshka-ticket-table .totoshka-ticket-p::before {
    content: '| ';
    color: var(--tg-hint);
    font-weight: 400;
  }
  .totoshka-ticket-table .totoshka-ticket-row--head .totoshka-ticket-p::before {
    content: '| ';
  }
  .totoshka-ticket-table .totoshka-ticket-row--head .totoshka-ticket-p,
  .totoshka-ticket-table .totoshka-ticket-row--head .totoshka-ticket-f {
    font-weight: 600;
    color: var(--tg-hint);
    font-size: 0.92em;
  }
  .totoshka-ticket-table .totoshka-ticket-row + .totoshka-ticket-row .totoshka-ticket-q,
  .totoshka-ticket-table .totoshka-ticket-row + .totoshka-ticket-row .totoshka-ticket-a,
  .totoshka-ticket-table .totoshka-ticket-row + .totoshka-ticket-row .totoshka-ticket-p,
  .totoshka-ticket-table .totoshka-ticket-row + .totoshka-ticket-row .totoshka-ticket-f,
  .totoshka-ticket-table .totoshka-ticket-row + .totoshka-ticket-row .totoshka-ticket-hit {
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .totoshka-ticket-table--scored .totoshka-ticket-f,
  .totoshka-ticket-table--scored .totoshka-ticket-hit {
    padding-left: 10px;
    white-space: nowrap;
    font-weight: 700;
  }
  .totoshka-ticket-table--scored .totoshka-ticket-f::before {
    content: '| ';
    color: var(--tg-hint);
    font-weight: 400;
  }
  .totoshka-ticket-table--scored .totoshka-ticket-row--head .totoshka-ticket-f::before {
    content: '| ';
  }
  .totoshka-ticket-table--scored .totoshka-ticket-hit {
    padding-left: 8px;
    text-align: left;
  }
  .totoshka-ticket-body--grid .totoshka-ticket-n {
    color: var(--tg-hint);
    font-weight: 600;
  }
  .totoshka-ticket-body--grid .ticket-legend-line {
    text-align: center;
    margin-bottom: 6px;
  }
  #pred-detail-list .totoshka-prediction-ticket--scored .totoshka-ticket-body .ticket-legend-line,
  #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket--scored .totoshka-ticket-body .ticket-legend-line,
  #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket--scored .totoshka-ticket-body .ticket-legend-line,
  #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket--scored .totoshka-ticket-body .ticket-legend-line {
    display: block;
    text-align: center;
    line-height: 14px;
  }
  #pred-detail-list {
    padding: 12px 16px 16px;
    text-align: center;
  }
  #match-preds-list .participant-pred-ticket-host,
  #sheet-participant-pred-content .participant-pred-ticket-host,
  #ur-content .participant-pred-ticket-host {
    text-align: center;
  }
  .help-body ul {
    margin: 6px 0 6px 18px;
    padding-left: 0;
  }
  .help-body li {
    margin: 4px 0;
  }

  .ur-section-title {
    padding: 8px 16px 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tg-hint);
  }

  .lb-primary { display: flex; gap: 6px; padding: 10px 14px 0; }
  .lbp { padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; border: none; transition: all .15s; }
  .lbp.main-tab { background: var(--green); color: var(--tg-button-text-color, #fff); }
  .lbp.sec-tab { background: rgba(255,255,255,.06); color: var(--tg-hint); border: 1px solid rgba(255,255,255,.1); }
  .lbp.sec-tab.active { background: rgba(255,255,255,.12); color: var(--tg-text); border-color: rgba(255,255,255,.2); }
  .lbs { padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; cursor: pointer; background: none; border: 1px solid rgba(255,255,255,.1); color: var(--tg-hint); }
  .lbs.active { background: rgba(255,255,255,.1); color: var(--tg-text); border-color: rgba(255,255,255,.2); }
  .lb-tabs { display: flex; gap: 8px; padding: 0 16px 2px; }
  .lb-tab {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.04);
    cursor: pointer;
    color: var(--tg-hint);
  }
  .lb-tab.active {
    background: rgba(45,189,110,.22);
    border-color: rgba(45,189,110,.9);
    color: var(--green);
    font-weight: 800;
  }
  .compare-rival-card { margin-top: 8px; }
  .compare-rival-header { font-size: 13px; margin-bottom: 8px; }
  .compare-rival-matches { font-size: 12px; color: var(--tg-hint); }
  .compare-match-row { margin: 4px 0; }
  /* Тап по кнопке в WebView: без inline onclick (кавычки в UUID ломали атрибут), делегирование в ui-events.js */
  .compare-rival-card .compare-rival-results-btn {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
  }
  .sheet-back { cursor: pointer; padding: 8px 0; color: var(--green); font-weight: 600; }
  .ui-appeal-hint {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tg-hint);
  }
  .ui-appeal-textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
  }
  .ui-appeal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }

  @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }

  .match-score-ft {
    font-weight: 700;
    font-size: 1.05em;
    margin-left: 0.4em;
    padding: 0.15em 0.4em;
    background: rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
  }
  .match-my-pts {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    padding: 0.15em 0.45em;
    background: rgba(245, 197, 66, 0.12);
    border: 1px solid rgba(245, 197, 66, 0.25);
    border-radius: var(--radius-sm);
    white-space: nowrap;
  }

  /* Landing overlay (iframe) — app stays in memory under the hood */
  .landing-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: #0d1117;
    display: block;
  }
  .landing-overlay[hidden] {
    display: none !important;
  }
  .landing-overlay-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #0d1117;
  }
  body.landing-overlay-open {
    overflow: hidden;
  }

  @media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  }

  .mini-toto-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 12px 6px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: rgba(245,197,66,0.1);
    border: 1px solid rgba(245,197,66,0.35);
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .mt-meta { padding: 0 14px 12px; font-size: 13px; color: var(--tg-hint); line-height: 1.45; }
  .mt-deadline { color: var(--gold); }
  .mt-section { padding: 0 12px 14px; }
  .mt-section-h { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
  .mt-counter { color: var(--gold); font-weight: 600; }
  .mt-team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mt-team-chip {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 8px 4px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.06); border: 1px solid transparent;
    color: var(--tg-text); font-size: 11px; cursor: pointer;
  }
  .mt-team-chip.selected { border-color: var(--gold); background: rgba(245,197,66,0.12); }
  .mt-team-flag { font-size: 22px; line-height: 1; }
  .mt-team-name { text-align: center; line-height: 1.2; }
  .mt-hint { font-size: 12px; color: var(--tg-hint); margin: 0 0 8px; line-height: 1.35; }
  .mt-search { margin-bottom: 10px; }
  .mt-empty-pool { font-size: 13px; color: var(--tg-hint); padding: 8px 2px 4px; }
  .mt-select, .mt-input {
    width: 100%; box-sizing: border-box; padding: 12px;
    border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.12);
    background: var(--card-bg); color: var(--tg-text); font-size: 14px;
  }
  .mt-input-num { max-width: 120px; }
  .mt-scorer-wrap { position: relative; }
  .mt-scorer-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    max-height: 220px;
    overflow-y: auto;
    background: var(--tg-bg);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  }
  .mt-scorer-opt {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--tg-text);
    font-size: 14px;
    cursor: pointer;
  }
  .mt-scorer-opt:active, .mt-scorer-opt:hover { background: rgba(255,255,255,0.06); }
  .mt-save { margin: 8px 12px 16px; width: calc(100% - 24px); }
  .mt-closed { padding: 12px; color: var(--tg-hint); text-align: center; }
  .mt-result-card { margin: 12px; padding: 16px; border-radius: var(--radius); background: var(--card-bg); }
  .mt-result-title { font-size: 14px; color: var(--tg-hint); margin-bottom: 6px; }
  .mt-result-pts { font-size: 28px; font-weight: 800; color: var(--gold); margin-bottom: 10px; }
  .mt-result-lines { font-size: 14px; line-height: 1.6; }
  .mt-lb-br { font-size: 11px; color: var(--tg-hint); min-width: 48px; text-align: right; }
  .mt-interim-card {
    margin: 12px;
    padding: 16px; border-radius: var(--radius); background: var(--card-bg);
    border: 1px solid rgba(245, 197, 66, 0.22);
  }
  .mt-review-h { margin-top: 12px; padding: 0; }
  .mt-team-review {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px;
  }
  .mt-review-chip {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 8px 4px; border-radius: var(--radius-sm); font-size: 11px;
    background: rgba(255,255,255,0.06); border: 1px solid transparent;
  }
  .mt-review-chip.hit { border-color: rgba(76, 175, 80, 0.55); background: rgba(76, 175, 80, 0.1); }
  .mt-review-chip.miss { border-color: rgba(244, 67, 54, 0.4); background: rgba(244, 67, 54, 0.08); opacity: 0.92; }
  .mt-review-mark { font-size: 12px; line-height: 1; }
  .mt-open-lb { width: 100%; margin-top: 12px; }
  .mt-result-card .mt-open-lb { margin-top: 12px; }
  .mt-lb-sub { font-size: 12px; color: var(--tg-hint); padding: 4px 12px 8px; }
  .mt-lb-colhdr { opacity: 0.75; font-size: 11px; pointer-events: none; }
  .mt-lb-colhdr .lb-score, .mt-lb-colhdr .mt-lb-br { font-weight: 600; }
  #lb-content .lb-row.me { border-color: var(--gold); background: rgba(245, 197, 66, 0.08); }

  /* --- PWA standalone polish (STANDALONE_UI_POLISH + body.totoshka-standalone-polish) --- */
  .totoshka-splash {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #17212b;
    color: var(--tg-text);
    transition: opacity 0.28s ease;
  }
  .totoshka-splash.is-visible { display: flex; opacity: 1; }
  .totoshka-splash.is-hiding { opacity: 0; pointer-events: none; }
  .totoshka-splash-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  }
  .totoshka-splash-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 2px;
  }
  .totoshka-splash-title span { color: var(--green); }

  body.totoshka-standalone-polish .screen-sticky-head .header,
  body.totoshka-standalone-polish #screen-leaderboard > .header,
  body.totoshka-standalone-polish #screen-profile > .header,
  body.totoshka-standalone-polish #screen-match-preds > .header,
  body.totoshka-standalone-polish #screen-predict .pred-match-header {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }

  body.totoshka-standalone-polish #screen-predict.active,
  body.totoshka-standalone-polish #screen-matches.active,
  body.totoshka-standalone-polish #screen-my.active {
    height: calc(100dvh - var(--nav-h) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-bottom, 0px));
  }

  body.totoshka-standalone-polish #screen-predict .pred-footer {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  body.totoshka-standalone-polish .totoshka-prediction-ticket,
  body.totoshka-standalone-polish #pred-detail-list .totoshka-prediction-ticket,
  body.totoshka-standalone-polish #match-preds-list .participant-pred-ticket-host .totoshka-prediction-ticket,
  body.totoshka-standalone-polish #sheet-participant-pred-content .participant-pred-ticket-host .totoshka-prediction-ticket,
  body.totoshka-standalone-polish #ur-content .participant-pred-ticket-host .totoshka-prediction-ticket {
    max-width: 100%;
    box-sizing: border-box;
  }
  body.totoshka-standalone-polish .totoshka-prediction-ticket > pre.totoshka-ticket-body,
  body.totoshka-standalone-polish .totoshka-prediction-ticket > div.totoshka-ticket-body--grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .totoshka-onboard {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(0, 0, 0, 0.55);
  }
  .totoshka-onboard-card {
    width: 100%;
    max-width: 420px;
    background: var(--tg-secondary);
    border-radius: 16px;
    padding: 20px 18px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  }
  .totoshka-onboard-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
  }
  .totoshka-onboard-body {
    font-size: 14px;
    line-height: 1.45;
    color: var(--tg-hint);
    margin-bottom: 14px;
    min-height: 3.2em;
  }
  .totoshka-onboard-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 14px;
  }
  .totoshka-onboard-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
  }
  .totoshka-onboard-dot.active { background: var(--green); }
  .totoshka-onboard-actions {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .totoshka-onboard-skip {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--tg-hint);
    font-size: 14px;
    cursor: pointer;
    padding: 10px 8px;
  }
  .totoshka-onboard-next {
    flex: 1.4;
    min-height: 44px;
  }

  /* UI Polish v2 — body.totoshka-ui-v2 */
  body.totoshka-ui-v2 #lb-mode-row { display: none !important; }
  body.totoshka-ui-v2.has-mini-toto-lb #lb-mode-row {
    display: flex !important;
    padding: 8px 14px 0;
    gap: 8px;
  }
  body.totoshka-ui-v2.has-mini-toto-lb #lb-mode-matches,
  body.totoshka-ui-v2.has-mini-toto-lb #lb-mode-minitoto {
    flex: 1;
    min-height: 40px;
    font-size: 18px;
  }
  body.totoshka-ui-v2.has-mini-toto-lb #lb-mode-minitoto.active {
    border-color: var(--gold);
    background: rgba(245, 197, 66, 0.12);
  }
  body.totoshka-ui-v2 #lb-tab-main { display: none; }
  body.totoshka-ui-v2 #screen-leaderboard > .header .header-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }
  body.totoshka-ui-v2 #lb-board-row {
    padding-bottom: 10px;
    position: relative;
    z-index: 2;
  }
  body.totoshka-ui-v2 #lb-content {
    position: relative;
    z-index: 1;
  }
  body.totoshka-ui-v2 .lb-podium {
    padding: 12px 12px 8px;
    gap: 8px;
    margin-top: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(245, 197, 66, 0.04) 0%, transparent 48px);
  }
  body.totoshka-ui-v2 .podium-item.first {
    transform: none;
    padding: 11px 6px 12px;
    min-height: 82px;
    border-color: rgba(245, 197, 66, 0.5);
    box-shadow: 0 8px 20px rgba(245, 197, 66, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  body.totoshka-ui-v2 .podium-item.second,
  body.totoshka-ui-v2 .podium-item.third {
    padding-bottom: 9px;
  }
  body.totoshka-ui-v2 .podium-item.first .podium-medal::after { content: ' 👑'; }
  body.totoshka-ui-v2 .lb-row.me {
    border-color: rgba(45, 189, 110, 0.55);
    box-shadow: inset 3px 0 0 var(--green);
  }
  body.totoshka-ui-v2 .pred-detail-score-hero { text-align: center; padding: 8px 0 12px; }
  body.totoshka-ui-v2 .pred-detail-score-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    line-height: 1;
    color: #f0c030;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    letter-spacing: 1px;
  }
  body.totoshka-ui-v2 .pred-detail-score-denom { font-size: 22px; color: var(--tg-hint); margin-left: 2px; }
  body.totoshka-ui-v2 .pred-detail-score-lbl {
    font-size: 11px;
    color: var(--tg-hint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
  }
  body.totoshka-ui-v2 .ticket-v2-card,
  body.totoshka-ui-v2 .totoshka-prediction-ticket--scored {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 8px;
    margin: 0 12px 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  }
  body.totoshka-ui-v2 .pred-detail-footer {
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--tg-bg);
  }
  body.totoshka-ui-v2 .pred-detail-appeal-btn {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(45, 189, 110, 0.45);
    background: rgba(45, 189, 110, 0.12);
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }
  body.totoshka-ui-v2 .compare-ai-toggle {
    width: 100%;
    text-align: left;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--tg-text);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 8px;
  }
  body.totoshka-ui-v2 .compare-ai-block.is-collapsed .compare-ai-legend,
  body.totoshka-ui-v2 .compare-ai-block.is-collapsed .compare-ai-rows,
  body.totoshka-ui-v2 .compare-ai-block.is-collapsed .ai-strategy-badge { display: none; }
  body.totoshka-ui-v2 #screen-predict .pred-match-header { padding: 10px 14px 8px; }
  body.totoshka-ui-v2 #screen-predict .pred-flag { font-size: 28px; width: 28px; height: 28px; }
  body.totoshka-ui-v2 #screen-predict .pred-tname { font-size: 12px; }
  body.totoshka-ui-v2 #screen-predict .pred-vs { font-size: 16px; }
  body.totoshka-ui-v2 #screen-predict .pred-match-context { padding: 6px 12px; font-size: 10px; line-height: 1.35; }
  body.totoshka-ui-v2 #screen-predict .pred-tools {
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 6px 12px 4px;
  }
  body.totoshka-ui-v2 .pred-tools-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    align-items: center;
  }
  body.totoshka-ui-v2 .pred-tools-row--primary {
    padding-bottom: 2px;
  }
  body.totoshka-ui-v2 .podium-item.first .podium-pts { color: #f0c030; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
  body.totoshka-ui-v2 .pred-tools-row--secondary {
    padding: 2px 0 4px;
  }
  body.totoshka-ui-v2 #screen-predict .pred-tools-row .chip--tool {
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
  }
  body.totoshka-ui-v2 .matches-today-bar {
    margin: 0 12px 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(45, 189, 110, 0.1);
    border: 1px solid rgba(45, 189, 110, 0.22);
    font-size: 11px;
    color: var(--green);
    font-weight: 600;
  }
  body.totoshka-ui-v2 .match-my-pts {
    font-size: 14px;
    font-weight: 800;
    color: var(--gold);
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(245, 197, 66, 0.12);
    border: 1px solid rgba(245, 197, 66, 0.25);
  }
  body.totoshka-ui-v2 #screen-my .screen-sticky-head { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
  body.totoshka-ui-v2 #screen-my #my-preds-filters {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--tg-bg);
    padding-top: 4px;
    padding-bottom: 6px;
  }
  body.totoshka-ui-v2 .profile-dashboard {
    margin: 12px 16px 8px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  body.totoshka-ui-v2 .profile-dashboard-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tg-hint);
    margin-bottom: 10px;
  }
  body.totoshka-ui-v2 .profile-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
  }
  body.totoshka-ui-v2 .profile-dashboard-cell {
    text-align: center;
    padding: 8px 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
  }
  body.totoshka-ui-v2 .profile-dashboard-val { font-size: 18px; font-weight: 800; line-height: 1.2; }
  body.totoshka-ui-v2 .profile-dashboard-val.green { color: var(--green); }
  body.totoshka-ui-v2 .profile-dashboard-lbl { font-size: 9px; color: var(--tg-hint); margin-top: 2px; line-height: 1.2; }
  body.totoshka-ui-v2 .profile-dashboard-link {
    width: 100%;
    border: 1px solid rgba(45, 189, 110, 0.35);
    background: rgba(45, 189, 110, 0.1);
    color: var(--green);
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  body.totoshka-ui-v2 .empty-state { padding: 28px 20px; text-align: center; line-height: 1.45; }
  body.totoshka-ui-v2 .empty-state .btn-primary { margin-top: 12px; min-width: 180px; }
