/* ============================================================
   2P_BOT — страница ставок (панель стримера)
   Та же типографическая сетка, что у чат-бота и дропов:
   один акцент, тонкие линии, минимум рамок и цвета.
   Все классы с префиксом pr- .
   ============================================================ */

.pr {
    --p-surface:   #14141f;
    --p-surface-2: #1b1b29;
    --p-surface-3: #232333;

    --p-line:   rgba(255, 255, 255, 0.07);
    --p-line-2: rgba(255, 255, 255, 0.13);

    --p-fg:   #ffffff;
    --p-fg-2: #a3a3b8;
    --p-fg-3: #6e6e85;

    --p-accent:      #9146ff;
    --p-accent-hi:   #a76bff;
    --p-accent-dim:  rgba(145, 70, 255, 0.12);
    --p-accent-line: rgba(145, 70, 255, 0.32);
    --p-ok:   #34d399;
    --p-warn: #f0b429;
    --p-err:  #f87171;
    --p-gold: #fbbf24;

    --p-r:    12px;
    --p-r-lg: 16px;
    --p-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    --p-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    max-width: 1448px;
    padding-bottom: 40px;
    color: var(--p-fg);
}

.pr h1, .pr h2, .pr h3, .pr h4 { margin: 0; letter-spacing: -0.02em; color: var(--p-fg); }
.pr p { margin: 0; }

/* ---------- Служебные состояния ---------- */
.pr-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 96px 24px; color: var(--p-fg-3); font-size: 0.875rem; }
.pr-spinner { width: 26px; height: 26px; border: 2px solid var(--p-line-2); border-top-color: var(--p-accent); border-radius: 50%; animation: pr-spin 0.8s linear infinite; }
.pr-spinner-sm { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: pr-spin .8s linear infinite; display: inline-block; }
@keyframes pr-spin { to { transform: rotate(360deg); } }

/* ============================================================
   Шапка страницы
   ============================================================ */
.pr-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    padding-bottom: 26px;
}
.pr-head h1 { font-size: 1.625rem; font-weight: 700; line-height: 1.15; }
.pr-head-sub { margin-top: 7px; font-size: 0.875rem; color: var(--p-fg-2); }

.pr-state {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border: 1px solid var(--p-line);
    border-radius: 100px;
    background: var(--p-surface);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}
.pr-state.live { border-color: rgba(52, 211, 153, 0.28); }
.pr-state-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--p-fg-3); flex-shrink: 0; }
.pr-state.live .pr-state-dot { background: var(--p-ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14); animation: pr-pulse 2s ease-in-out infinite; }
@keyframes pr-pulse { 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } }

/* ============================================================
   Колонка контента + колонка-помощник
   ============================================================ */
.pr-body {
    display: grid;
    grid-template-columns: minmax(0, 1120px) 300px;
    gap: 28px;
    align-items: start;
}
.pr-main { min-width: 0; display: flex; flex-direction: column; gap: 44px; }

.pr-rail { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; }
.pr-rail-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px 16px;
    border: 1px solid var(--p-line);
    border-radius: var(--p-r);
    background: var(--p-surface);
}
.pr-rail-title { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--p-fg-3); }
.pr-rail-line { display: flex; align-items: center; gap: 9px; font-size: 0.8125rem; color: var(--p-fg); }
.pr-rail-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--p-fg-3); flex-shrink: 0; }
.pr-rail-dot.on { background: var(--p-ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12); }
.pr-rail-sub { margin: -3px 0 0 16px; font-size: 0.75rem; line-height: 1.55; color: var(--p-fg-3); }
.pr-rail-stats { margin-top: 3px; padding-top: 4px; border-top: 1px solid var(--p-line); }
.pr-rail-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 0.8125rem; color: var(--p-fg-3); }
.pr-rail-stat b { color: var(--p-fg); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pr-rail-note {
    padding: 13px 15px;
    border: 1px solid var(--p-line);
    border-radius: var(--p-r);
    background: var(--p-surface-2);
    font-size: 0.78125rem;
    line-height: 1.6;
    color: var(--p-fg-3);
}
.pr-rail-note b { display: block; margin-bottom: 4px; color: var(--p-fg-2); font-weight: 600; }
.pr-rail-link {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.78125rem;
    font-weight: 600;
    color: var(--p-accent-hi);
    text-decoration: none;
}
.pr-rail-link:hover { color: var(--p-fg); }
.pr-rail-steps { margin: 0; padding: 0; list-style: none; counter-reset: pr-step; display: flex; flex-direction: column; gap: 11px; }
.pr-rail-steps li { counter-increment: pr-step; position: relative; padding-left: 26px; }
.pr-rail-steps li::before {
    content: counter(pr-step);
    position: absolute; left: 0; top: 1px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--p-accent-dim);
    color: var(--p-accent-hi);
    font-size: 0.625rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.pr-rail-steps b { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--p-fg); }
.pr-rail-steps span { display: block; margin-top: 2px; font-size: 0.75rem; line-height: 1.45; color: var(--p-fg-3); }

@media (max-width: 1420px) {
    .pr-body { grid-template-columns: minmax(0, 1fr); }
    .pr-rail { position: static; flex-direction: row; flex-wrap: wrap; }
    .pr-rail > * { flex: 1 1 260px; }
}
@media (max-width: 720px) {
    .pr-rail { flex-direction: column; }
}

/* ============================================================
   Секции
   ============================================================ */
.pr-sec { display: flex; flex-direction: column; gap: 14px; }
.pr-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pr-sec-title { font-size: 1.0625rem; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.pr-sec-desc { margin-top: 5px; font-size: 0.8125rem; color: var(--p-fg-2); max-width: 44rem; }
.pr-count {
    min-width: 20px; padding: 1px 7px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--p-fg-3);
    font-size: 0.6875rem; font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pr-panel {
    border: 1px solid var(--p-line);
    border-radius: var(--p-r-lg);
    background: var(--p-surface);
    overflow: hidden;
}

/* ============================================================
   Активное голосование
   ============================================================ */
.pr-live { border-color: var(--p-accent-line); }
.pr-live-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 16px;
}
.pr-live-q { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; word-break: break-word; }
.pr-live-when { margin-top: 5px; font-size: 0.75rem; color: var(--p-fg-3); }

.pr-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.71875rem; font-weight: 600;
    white-space: nowrap; flex-shrink: 0;
}
.pr-badge-active    { background: rgba(52, 211, 153, 0.1);  color: var(--p-ok); }
.pr-badge-locked    { background: rgba(240, 180, 41, 0.12); color: var(--p-warn); }
.pr-badge-resolved  { background: rgba(145, 70, 255, 0.12); color: var(--p-accent-hi); }
.pr-badge-cancelled { background: rgba(248, 113, 113, 0.1); color: var(--p-err); }
.pr-badge-refunded  { background: rgba(255, 255, 255, 0.06); color: var(--p-fg-2); }

/* Полоса показателей */
.pr-metrics {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-top: 1px solid var(--p-line);
    border-bottom: 1px solid var(--p-line);
    background: rgba(255, 255, 255, 0.015);
}
.pr-metric { display: flex; flex-direction: column; gap: 3px; }
.pr-metric-label { font-size: 0.6875rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--p-fg-3); }
.pr-metric-value { font-size: 1.0625rem; font-weight: 700; color: var(--p-fg); font-variant-numeric: tabular-nums; }
.pr-metric-value.accent { color: var(--p-accent-hi); }
.pr-metric-value.warn { color: var(--p-warn); }
.pr-metric.right { margin-left: auto; align-items: flex-end; }

/* Варианты */
.pr-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; padding: 18px 20px; }
.pr-opt {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 15px;
    border: 1px solid var(--p-line);
    border-radius: var(--p-r);
    background: var(--p-surface-2);
    transition: border-color 0.16s var(--p-ease);
}
.pr-opt:hover { border-color: var(--p-line-2); }
.pr-opt-head { display: flex; align-items: center; gap: 8px; }
.pr-opt-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--pr-c); flex-shrink: 0; }
.pr-opt-name { font-size: 0.875rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-opt-odds {
    margin-left: auto; flex-shrink: 0;
    font-family: var(--p-mono);
    font-size: 0.78125rem; font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--p-fg-2);
}
.pr-track { height: 6px; border-radius: 100px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.pr-fill { height: 100%; border-radius: 100px; background: var(--pr-c); transition: width 0.4s var(--p-ease); }
.pr-opt-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 0.75rem; color: var(--p-fg-3); }
.pr-opt-foot b { color: var(--p-fg); font-weight: 600; font-variant-numeric: tabular-nums; }

.pr-opt-win {
    height: 32px;
    border: 1px solid var(--p-line-2);
    border-radius: 8px;
    background: transparent;
    color: var(--p-fg-2);
    font-family: inherit;
    font-size: 0.78125rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.16s var(--p-ease), border-color 0.16s var(--p-ease), background 0.16s var(--p-ease);
}
.pr-opt-win:hover:not(:disabled) { color: var(--p-fg); border-color: var(--pr-c); background: rgba(255, 255, 255, 0.05); }
.pr-opt-win:disabled { opacity: 0.45; cursor: not-allowed; }

.pr-live-actions { display: flex; gap: 8px; padding: 0 20px 18px; flex-wrap: wrap; }

/* ============================================================
   Форма создания
   ============================================================ */
.pr-form-block { padding: 18px 20px; }
.pr-form-block + .pr-form-block { border-top: 1px solid var(--p-line); }
.pr-label { display: block; font-size: 0.78125rem; font-weight: 500; color: var(--p-fg-2); margin-bottom: 8px; }
.pr-label-note { font-weight: 400; color: var(--p-fg-3); }

.pr-input {
    width: 100%;
    box-sizing: border-box;
    height: 38px;
    padding: 0 12px;
    background: var(--p-surface-2);
    border: 1px solid var(--p-line);
    border-radius: 9px;
    color: var(--p-fg);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.16s var(--p-ease), background 0.16s var(--p-ease);
}
.pr-input::placeholder { color: var(--p-fg-3); }
.pr-input:hover { border-color: var(--p-line-2); }
.pr-input:focus { border-color: var(--p-accent-line); background: var(--p-surface-3); }
.pr-input-lg { height: 44px; font-size: 0.9375rem; font-weight: 500; }

/* Шаблоны */
.pr-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.pr-preset {
    display: inline-flex; align-items: center; gap: 7px;
    height: 30px; padding: 0 12px;
    border: 1px solid var(--p-line);
    border-radius: 100px;
    background: var(--p-surface-2);
    color: var(--p-fg-2);
    font-family: inherit;
    font-size: 0.78125rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.16s var(--p-ease), border-color 0.16s var(--p-ease), background 0.16s var(--p-ease);
}
.pr-preset:hover { color: var(--p-fg); border-color: var(--p-accent-line); background: var(--p-accent-dim); }
.pr-preset-swatch { display: inline-flex; gap: 3px; }
.pr-preset-swatch i { width: 6px; height: 6px; border-radius: 2px; }

/* Варианты ответа */
.pr-opt-rows { display: flex; flex-direction: column; gap: 8px; }
.pr-opt-row { display: flex; align-items: center; gap: 9px; }
.pr-opt-row .pr-input { flex: 1; min-width: 0; }
.pr-color {
    width: 38px; height: 38px;
    padding: 3px;
    flex-shrink: 0;
    border: 1px solid var(--p-line);
    border-radius: 9px;
    background: var(--p-surface-2);
    cursor: pointer;
    transition: border-color 0.16s var(--p-ease);
}
.pr-color:hover { border-color: var(--p-line-2); }
.pr-color::-webkit-color-swatch-wrapper { padding: 0; }
.pr-color::-webkit-color-swatch { border: none; border-radius: 6px; }
.pr-color::-moz-color-swatch { border: none; border-radius: 6px; }

.pr-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--p-fg-3);
    cursor: pointer;
    transition: color 0.16s, background 0.16s;
}
.pr-icon-btn:hover { color: var(--p-err); background: rgba(248, 113, 113, 0.1); }
.pr-opt-add {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 13px;
    margin-top: 2px;
    border: 1px dashed var(--p-line-2);
    border-radius: 9px;
    background: transparent;
    color: var(--p-fg-3);
    font-family: inherit;
    font-size: 0.78125rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.16s, border-color 0.16s;
}
.pr-opt-add:hover { color: var(--p-fg-2); border-color: var(--p-accent-line); }

/* Длительность — сегментированный переключатель */
.pr-seg { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--p-line); border-radius: 10px; background: var(--p-surface-2); flex-wrap: wrap; }
.pr-seg-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--p-fg-3);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    transition: background 0.16s, color 0.16s;
}
.pr-seg-btn:hover { color: var(--p-fg-2); }
.pr-seg-btn.active { background: rgba(255, 255, 255, 0.08); color: var(--p-fg); font-weight: 600; }

.pr-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-top: 1px solid var(--p-line);
    background: rgba(255, 255, 255, 0.015);
}
.pr-form-summary { font-size: 0.78125rem; color: var(--p-fg-3); }
.pr-form-summary b { color: var(--p-fg-2); font-weight: 600; }

/* ============================================================
   Кнопки
   ============================================================ */
.pr-btn-primary, .pr-btn-ghost, .pr-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 18px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.16s var(--p-ease), border-color 0.16s var(--p-ease), color 0.16s var(--p-ease);
}
.pr-btn-primary svg, .pr-btn-ghost svg, .pr-btn-danger svg { width: 15px; height: 15px; flex-shrink: 0; }
.pr-btn-primary { background: var(--p-accent); color: #fff; }
.pr-btn-primary:hover:not(:disabled) { background: var(--p-accent-hi); }
.pr-btn-ghost { background: transparent; border-color: var(--p-line-2); color: var(--p-fg); }
.pr-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.22); }
.pr-btn-danger { background: transparent; border-color: rgba(248, 113, 113, 0.28); color: var(--p-err); }
.pr-btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.45); }
.pr-btn-primary:disabled, .pr-btn-ghost:disabled, .pr-btn-danger:disabled {
    background: var(--p-surface-2); border-color: var(--p-line); color: var(--p-fg-3); cursor: not-allowed;
}
.pr-btn-sm { height: 32px; padding: 0 12px; font-size: 0.8125rem; }

/* ============================================================
   Сообщения
   ============================================================ */
.pr-msg { padding: 11px 15px; border-radius: 10px; font-size: 0.8125rem; line-height: 1.5; border: 1px solid transparent; }
.pr-msg.ok { background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.22); color: var(--p-ok); }
.pr-msg.err { background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.22); color: var(--p-err); }

/* ============================================================
   История
   ============================================================ */
.pr-hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pr-hist-card {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 15px 16px;
    border: 1px solid var(--p-line);
    border-radius: var(--p-r);
    background: var(--p-surface);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.16s var(--p-ease), background 0.16s var(--p-ease);
}
.pr-hist-card:hover { border-color: var(--p-line-2); background: var(--p-surface-2); }
.pr-hist-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pr-hist-title { font-size: 0.875rem; font-weight: 600; line-height: 1.4; color: var(--p-fg); word-break: break-word; }
.pr-hist-winner { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78125rem; font-weight: 600; color: var(--p-ok); }
.pr-hist-winner svg { flex-shrink: 0; }
.pr-hist-opts { display: flex; flex-direction: column; gap: 6px; }
.pr-hist-opt { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--p-fg-3); }
.pr-hist-opt-dot { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.pr-hist-opt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-hist-opt-pct { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--p-fg-2); }
.pr-hist-foot {
    display: flex; flex-wrap: wrap; gap: 4px 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--p-line);
    font-size: 0.71875rem; color: var(--p-fg-3);
    font-variant-numeric: tabular-nums;
}
.pr-hist-foot b { color: var(--p-fg-2); font-weight: 600; }
.pr-hist-more { display: flex; justify-content: center; margin-top: 4px; }

/* ============================================================
   Пустые состояния
   ============================================================ */
.pr-empty {
    padding: 36px 24px;
    border: 1px dashed var(--p-line-2);
    border-radius: var(--p-r-lg);
    text-align: center;
}
.pr-empty h3 { font-size: 0.9375rem; font-weight: 600; }
.pr-empty p { margin-top: 6px; font-size: 0.8125rem; line-height: 1.55; color: var(--p-fg-3); }
.pr-empty .pr-btn-ghost { margin-top: 16px; }

/* ============================================================
   PRO-заглушка
   ============================================================ */
.pr-gate {
    max-width: 560px;
    margin: 56px auto;
    padding: 36px 32px;
    border: 1px solid var(--p-line);
    border-radius: 20px;
    background: var(--p-surface);
    text-align: center;
}
.pr-gate-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    margin-bottom: 18px;
    border: 1px solid var(--p-accent-line);
    border-radius: 15px;
    background: var(--p-accent-dim);
    color: var(--p-accent-hi);
}
.pr-gate h2 { font-size: 1.25rem; font-weight: 700; }
.pr-gate-desc { margin-top: 10px; font-size: 0.875rem; line-height: 1.6; color: var(--p-fg-2); }
.pr-gate-list { display: grid; gap: 10px; margin: 24px 0 26px; text-align: left; }
.pr-gate-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.8125rem; color: var(--p-fg-2); }
.pr-gate-item svg { flex-shrink: 0; margin-top: 2px; color: var(--p-ok); }

/* ============================================================
   Модальные окна
   ============================================================ */
.pr-modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(6, 6, 12, 0.72);
    backdrop-filter: blur(6px);
    animation: pr-fade 0.18s ease;
}
@keyframes pr-fade { from { opacity: 0; } to { opacity: 1; } }
.pr-modal {
    --p-surface:   #14141f;
    --p-surface-2: #1b1b29;
    --p-surface-3: #232333;
    --p-line:   rgba(255, 255, 255, 0.07);
    --p-line-2: rgba(255, 255, 255, 0.13);
    --p-fg:   #ffffff;
    --p-fg-2: #a3a3b8;
    --p-fg-3: #6e6e85;
    --p-accent:      #9146ff;
    --p-accent-hi:   #a76bff;
    --p-accent-dim:  rgba(145, 70, 255, 0.12);
    --p-accent-line: rgba(145, 70, 255, 0.32);
    --p-ok:   #34d399;
    --p-warn: #f0b429;
    --p-err:  #f87171;
    --p-gold: #fbbf24;
    --p-r:    12px;
    --p-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    --p-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    width: 100%;
    max-width: 720px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--p-line-2);
    border-radius: 18px;
    background: var(--p-surface);
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95);
    animation: pr-rise 0.22s var(--p-ease);
    color: var(--p-fg);
}
@keyframes pr-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pr-modal h2, .pr-modal h3, .pr-modal h4 { margin: 0; letter-spacing: -0.02em; color: var(--p-fg); }
.pr-modal p { margin: 0; }
.pr-modal-sm { max-width: 440px; }
.pr-modal-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--p-line);
    flex-shrink: 0;
}
.pr-modal-title { font-size: 1rem; font-weight: 700; }
.pr-modal-subtitle { display: block; margin-top: 4px; font-size: 0.78125rem; color: var(--p-fg-3); }
.pr-modal-close {
    background: none; border: none; padding: 2px 8px;
    border-radius: 8px; color: var(--p-fg-3);
    font-size: 1.375rem; line-height: 1; cursor: pointer;
    transition: color 0.16s, background 0.16s;
}
.pr-modal-close:hover { color: var(--p-fg); background: rgba(255, 255, 255, 0.06); }
.pr-modal-body { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; min-height: 0; }
/* Внутри прокручиваемого flex-контейнера блоки иначе сжимаются до нуля */
.pr-modal-body > * { flex-shrink: 0; }
.pr-modal-text { font-size: 0.875rem; line-height: 1.6; color: var(--p-fg-2); }
.pr-modal-text b { color: var(--p-fg); font-weight: 600; }
.pr-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--p-line); flex-shrink: 0; }

/* ---------- Содержимое аналитики ---------- */
.pr-an-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.pr-an-q { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; }

.pr-an-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--p-line); border: 1px solid var(--p-line); border-radius: var(--p-r); overflow: hidden; }
.pr-an-stat { display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; background: var(--p-surface-2); }
.pr-an-stat-value { font-size: 1rem; font-weight: 700; color: var(--p-fg); font-variant-numeric: tabular-nums; }
.pr-an-stat-label { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--p-fg-3); }

.pr-an-sub { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--p-fg-3); margin-bottom: 12px; }

.pr-an-chart { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.pr-donut {
    position: relative;
    width: 152px; height: 152px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pr-donut::after {
    content: "";
    position: absolute; inset: 26px;
    border-radius: 50%;
    background: var(--p-surface);
}
.pr-donut-center {
    position: absolute; inset: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.pr-donut-total { font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-donut-label { font-size: 0.6875rem; color: var(--p-fg-3); }
.pr-legend { flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 9px; }
.pr-legend-item { display: flex; align-items: center; gap: 9px; font-size: 0.8125rem; color: var(--p-fg-2); }
.pr-legend-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.pr-legend-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-legend-pct { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--p-fg); font-weight: 600; }
.pr-legend-item.win .pr-legend-name { color: var(--p-fg); font-weight: 600; }

.pr-an-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.pr-an-opt { display: flex; flex-direction: column; gap: 10px; padding: 14px 15px; border: 1px solid var(--p-line); border-radius: var(--p-r); background: var(--p-surface-2); }
.pr-an-opt.win { border-color: rgba(52, 211, 153, 0.3); }
.pr-an-opt-head { display: flex; align-items: center; gap: 8px; }
.pr-an-opt-title { font-size: 0.875rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-win-tag { margin-left: auto; flex-shrink: 0; padding: 2px 8px; border-radius: 100px; background: rgba(52, 211, 153, 0.12); color: var(--p-ok); font-size: 0.6875rem; font-weight: 600; }
.pr-an-metrics { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pr-an-metric { display: flex; flex-direction: column; }
.pr-an-metric b { font-size: 0.8125rem; font-weight: 700; color: var(--p-fg); font-variant-numeric: tabular-nums; }
.pr-an-metric span { font-size: 0.6875rem; color: var(--p-fg-3); }

.pr-bettors { display: flex; flex-direction: column; }
.pr-bettor { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.pr-bettor + .pr-bettor { border-top: 1px solid var(--p-line); }
.pr-bettor-rank { width: 20px; flex-shrink: 0; text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--p-fg-3); font-variant-numeric: tabular-nums; }
.pr-bettor-rank.top { color: var(--p-gold); }
.pr-bettor-ava {
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--p-surface-3);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: var(--p-fg-3);
}
.pr-bettor-ava img { width: 100%; height: 100%; object-fit: cover; }
.pr-bettor-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.pr-bettor-name { font-size: 0.8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-bettor-opt { font-size: 0.6875rem; font-weight: 500; }
.pr-bettor-amount { font-size: 0.8125rem; font-weight: 700; color: var(--p-gold); flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 860px) {
    .pr-an-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .pr-head { align-items: flex-start; }
    .pr-state { width: 100%; justify-content: center; }
    .pr-metrics { gap: 18px; }
    .pr-metric.right { margin-left: 0; align-items: flex-start; }
    .pr-live-actions .pr-btn-ghost, .pr-live-actions .pr-btn-danger { flex: 1; }
    .pr-form-foot { flex-direction: column; align-items: stretch; }
    .pr-form-foot .pr-btn-primary { width: 100%; }
    .pr-an-chart { justify-content: center; }
    .pr-modal-foot { flex-direction: column-reverse; }
    .pr-modal-foot > * { width: 100%; }
}
