/* ============================================================
   2P_BOT — «Розыгрыши»: чат-розыгрыш и колесо фортуны
   Та же сетка, что у чат-бота и рулетки скинов: один акцент,
   тонкие линии, минимум рамок и цвета. Все классы с префиксом gw- .
   ============================================================ */

.gw {
    --g-surface:   #14141f;
    --g-surface-2: #1b1b29;
    --g-surface-3: #232333;

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

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

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

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

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

.gw h1, .gw h2, .gw h3, .gw h4 { margin: 0; letter-spacing: -0.02em; color: var(--g-fg); }
.gw p { margin: 0; }
.gw code { font-family: var(--g-mono); }
.gw [hidden] { display: none !important; }

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

/* ============================================================
   Шапка и вкладки
   ============================================================ */
.gw-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    padding-bottom: 22px;
}
.gw-head h1 { font-size: 1.625rem; font-weight: 700; line-height: 1.15; }
.gw-head-sub { margin-top: 7px; font-size: 0.875rem; color: var(--g-fg-2); }

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

.gw-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--g-line);
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 30px;
}
.gw-tabs::-webkit-scrollbar { height: 0; }
.gw-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px 13px;
    background: none;
    border: none;
    border-radius: 8px 8px 0 0;
    color: var(--g-fg-3);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.16s var(--g-ease), background 0.16s var(--g-ease);
}
.gw-tab svg { width: 15px; height: 15px; flex-shrink: 0; }
.gw-tab:hover { color: var(--g-fg-2); background: rgba(255, 255, 255, 0.03); }
.gw-tab.active { color: var(--g-fg); font-weight: 600; }
.gw-tab.active::after {
    content: '';
    position: absolute;
    left: 10px; right: 10px; bottom: -1px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--g-accent);
}
.gw-tab-count {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--g-fg-3);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.gw-tab.active .gw-tab-count { background: var(--g-accent-dim); color: var(--g-accent-hi); }
.gw-tab-live { width: 6px; height: 6px; border-radius: 50%; background: var(--g-ok); }

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

.gw-rail { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; }
.gw-rail-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--g-line);
    border-radius: var(--g-r);
    background: var(--g-surface);
}
.gw-rail-title { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--g-fg-3); }
.gw-rail-note {
    padding: 13px 15px;
    border: 1px solid var(--g-line);
    border-radius: var(--g-r);
    background: var(--g-surface-2);
    font-size: 0.78125rem;
    line-height: 1.6;
    color: var(--g-fg-3);
}
.gw-rail-note b { display: block; margin-bottom: 4px; color: var(--g-fg-2); font-weight: 600; }
.gw-rail-note a { color: var(--g-accent-hi); text-decoration: none; font-weight: 600; }
.gw-rail-note a:hover { color: var(--g-fg); }
.gw-rail-steps { margin: 0; padding: 0; list-style: none; counter-reset: gw-step; display: flex; flex-direction: column; gap: 11px; }
.gw-rail-steps li { counter-increment: gw-step; position: relative; padding-left: 26px; }
.gw-rail-steps li::before {
    content: counter(gw-step);
    position: absolute; left: 0; top: 1px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--g-accent-dim);
    color: var(--g-accent-hi);
    font-size: 0.625rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.gw-rail-steps b { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--g-fg); }
.gw-rail-steps span { display: block; margin-top: 2px; font-size: 0.75rem; line-height: 1.45; color: var(--g-fg-3); }
.gw-rail-steps code { color: var(--g-fg-2); }

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

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

.gw-panel {
    border: 1px solid var(--g-line);
    border-radius: var(--g-r-lg);
    background: var(--g-surface);
    overflow: hidden;
    min-width: 0;
}
.gw-panel-pad { padding: 18px 20px; }

.gw-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 15px 20px; }
.gw-row + .gw-row { border-top: 1px solid var(--g-line); }
.gw-row-text { min-width: 0; }
.gw-row-title { display: block; font-size: 0.875rem; font-weight: 600; color: var(--g-fg); }
.gw-row-hint { display: block; margin-top: 4px; font-size: 0.78125rem; line-height: 1.5; color: var(--g-fg-3); max-width: 42rem; }
.gw-row-hint code { color: var(--g-fg-2); }
.gw-row-ctl { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }

.gw-fields { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; padding: 18px 20px; }
.gw-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

/* ============================================================
   Поля
   ============================================================ */
.gw-label { display: block; font-size: 0.78125rem; font-weight: 500; color: var(--g-fg-2); }
.gw-hint { font-size: 0.75rem; line-height: 1.5; color: var(--g-fg-3); }
.gw-hint code { color: var(--g-fg-2); }

.gw-input {
    width: 100%;
    box-sizing: border-box;
    height: 38px;
    padding: 0 12px;
    background: var(--g-surface-2);
    border: 1px solid var(--g-line);
    border-radius: 9px;
    color: var(--g-fg);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.16s var(--g-ease), background 0.16s var(--g-ease);
}
.gw-input::placeholder { color: var(--g-fg-3); }
.gw-input:hover:not(:disabled) { border-color: var(--g-line-2); }
.gw-input:focus { border-color: var(--g-accent-line); background: var(--g-surface-3); }
.gw-input:disabled { opacity: 0.55; cursor: not-allowed; }
.gw-input-mono { font-family: var(--g-mono); font-weight: 600; }
.gw-input-num { width: 74px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.gw-input-num::-webkit-outer-spin-button, .gw-input-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gw-input-num { -moz-appearance: textfield; }
.gw-input-suffix { display: flex; align-items: center; gap: 8px; }
.gw-suffix { font-size: 0.75rem; color: var(--g-fg-3); white-space: nowrap; }
textarea.gw-input { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }

.gw-search {
    position: relative;
    display: flex;
    align-items: center;
}
.gw-search svg { position: absolute; left: 11px; color: var(--g-fg-3); pointer-events: none; }
.gw-search .gw-input { padding-left: 32px; height: 34px; font-size: 0.8125rem; }

/* ============================================================
   Выбор карточками
   ============================================================ */
.gw-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.gw-choice-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 40px 14px 14px;
    border: 1px solid var(--g-line);
    border-radius: var(--g-r);
    background: var(--g-surface-2);
    color: var(--g-fg);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.16s var(--g-ease), background 0.16s var(--g-ease), opacity 0.16s;
}
.gw-choice-card:hover:not(:disabled) { border-color: var(--g-line-2); }
.gw-choice-card.active { border-color: var(--g-accent-line); background: rgba(145, 70, 255, 0.08); }
.gw-choice-card:disabled { cursor: not-allowed; opacity: 0.5; }
.gw-choice-card.active:disabled { opacity: 1; }
.gw-choice-icon {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    flex-shrink: 0;
    border: 1px solid var(--g-line);
    border-radius: 10px;
    background: var(--g-surface);
    color: var(--g-accent-hi);
}
.gw-choice-icon svg { width: 18px; height: 18px; }
.gw-choice-card.active .gw-choice-icon { border-color: var(--g-accent-line); }
.gw-choice-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gw-choice-title { font-size: 0.875rem; font-weight: 600; color: var(--g-fg); display: flex; align-items: center; gap: 7px; }
.gw-choice-desc { font-size: 0.75rem; line-height: 1.45; color: var(--g-fg-3); }
.gw-choice-radio {
    position: absolute; top: 15px; right: 14px;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--g-line-2);
    transition: border-color 0.18s var(--g-ease), box-shadow 0.18s var(--g-ease);
}
.gw-choice-card.active .gw-choice-radio { border-color: var(--g-accent); box-shadow: inset 0 0 0 3.5px var(--g-accent); }

/* ============================================================
   Тумблер, ползунок
   ============================================================ */
.gw-toggle { position: relative; display: inline-flex; width: 40px; height: 22px; flex-shrink: 0; cursor: pointer; background: none; border: none; padding: 0; }
.gw-toggle:disabled { cursor: not-allowed; opacity: 0.5; }
.gw-toggle-track {
    position: absolute; inset: 0;
    background: var(--g-surface-3);
    border: 1px solid var(--g-line-2);
    border-radius: 100px;
    transition: background 0.2s var(--g-ease), border-color 0.2s var(--g-ease);
}
.gw-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--g-fg-3);
    transition: transform 0.2s var(--g-ease), background 0.2s var(--g-ease);
}
.gw-toggle.on .gw-toggle-track { background: var(--g-accent); border-color: var(--g-accent); }
.gw-toggle.on .gw-toggle-track::after { transform: translateX(18px); background: #fff; }

.gw-range {
    flex: 1;
    min-width: 90px;
    -webkit-appearance: none; appearance: none;
    height: 4px;
    border-radius: 4px;
    background: var(--g-surface-3);
    outline: none;
    cursor: pointer;
}
.gw-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff;
    border: 3px solid var(--g-accent);
    cursor: pointer;
}
.gw-range::-moz-range-thumb {
    width: 10px; height: 10px; border-radius: 50%;
    background: #fff;
    border: 3px solid var(--g-accent);
    cursor: pointer;
}
.gw-range:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   Кнопки
   ============================================================ */
.gw-btn-primary, .gw-btn-ghost, .gw-btn-danger, .gw-btn-ok {
    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(--g-ease), border-color 0.16s var(--g-ease), color 0.16s var(--g-ease);
}
.gw-btn-primary svg, .gw-btn-ghost svg, .gw-btn-danger svg, .gw-btn-ok svg { width: 15px; height: 15px; flex-shrink: 0; }
.gw-btn-primary { background: var(--g-accent); color: #fff; }
.gw-btn-primary:hover:not(:disabled) { background: var(--g-accent-hi); color: #fff; }
.gw-btn-ghost { background: transparent; border-color: var(--g-line-2); color: var(--g-fg); }
.gw-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.22); color: var(--g-fg); }
.gw-btn-danger { background: transparent; border-color: rgba(248, 113, 113, 0.28); color: var(--g-err); }
.gw-btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.1); }
.gw-btn-ok { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.32); color: var(--g-ok); }
.gw-btn-ok:hover:not(:disabled) { background: rgba(52, 211, 153, 0.22); }
.gw-btn-primary:disabled, .gw-btn-ghost:disabled, .gw-btn-danger:disabled, .gw-btn-ok:disabled {
    background: var(--g-surface-2); border-color: var(--g-line); color: var(--g-fg-3); cursor: not-allowed;
}
.gw-btn-sm { height: 32px; padding: 0 12px; font-size: 0.8125rem; }
.gw-btn-lg { height: 46px; padding: 0 26px; font-size: 0.9375rem; }
.gw-btn-lg svg { width: 17px; height: 17px; }
.gw-btn-block { width: 100%; }

.gw-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--g-line-2);
    border-radius: 8px;
    color: var(--g-fg-3);
    cursor: pointer;
    transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.gw-icon-btn svg { width: 14px; height: 14px; }
.gw-icon-btn:hover:not(:disabled) { color: var(--g-fg); background: rgba(255, 255, 255, 0.05); }
.gw-icon-btn.danger:hover:not(:disabled) { color: var(--g-err); border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.08); }
.gw-icon-btn:disabled { cursor: not-allowed; opacity: 0.45; }

.gw-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0;
    background: none; border: none;
    color: var(--g-accent-hi);
    font-family: inherit; font-size: 0.78125rem; font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.gw-link svg { width: 13px; height: 13px; }
.gw-link:hover:not(:disabled) { color: var(--g-fg); }
.gw-link:disabled { color: var(--g-fg-3); cursor: not-allowed; }

/* ============================================================
   Сообщения / пустые состояния / метки
   ============================================================ */
.gw-msg { padding: 11px 15px; border-radius: 10px; font-size: 0.8125rem; line-height: 1.5; border: 1px solid transparent; }
.gw-msg a { color: inherit; font-weight: 700; }
.gw-msg.ok { background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.22); color: var(--g-ok); }
.gw-msg.warn { background: rgba(240, 180, 41, 0.07); border-color: rgba(240, 180, 41, 0.22); color: var(--g-warn); }
.gw-msg.err { background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.22); color: var(--g-err); }
.gw-msg.info { background: var(--g-surface-2); border-color: var(--g-line); color: var(--g-fg-2); }

.gw-empty-inline { padding: 30px 20px; text-align: center; font-size: 0.8125rem; line-height: 1.55; color: var(--g-fg-3); }
.gw-empty-inline code { color: var(--g-fg-2); }
.gw-empty-inline svg { display: block; margin: 0 auto 10px; opacity: 0.35; }

.gw-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--g-fg-2);
    font-size: 0.6875rem; font-weight: 600;
    white-space: nowrap; flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.gw-tag.accent { background: var(--g-accent-dim); color: var(--g-accent-hi); }
.gw-tag.ok     { background: rgba(52, 211, 153, 0.1);  color: var(--g-ok); }
.gw-tag.warn   { background: rgba(240, 180, 41, 0.12); color: var(--g-warn); }
.gw-tag.err    { background: rgba(248, 113, 113, 0.1); color: var(--g-err); }
.gw-tag.gold   { background: rgba(251, 191, 36, 0.12); color: var(--g-gold); }

.gw-ava {
    width: 26px; height: 26px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--g-surface-3);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6875rem; font-weight: 700; color: var(--g-fg-2);
}
.gw-ava.lg { width: 46px; height: 46px; font-size: 1rem; }

/* ============================================================
   Панель запуска
   ============================================================ */
.gw-launch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border: 1px solid var(--g-accent-line);
    border-radius: var(--g-r-lg);
    background: var(--g-surface);
}
.gw-launch-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gw-launch-title { font-size: 0.9375rem; font-weight: 600; color: var(--g-fg); }
.gw-launch-summary { font-size: 0.78125rem; line-height: 1.5; color: var(--g-fg-3); }
.gw-launch-summary b { color: var(--g-fg-2); font-weight: 600; }
.gw-launch-summary code { color: var(--g-fg-2); }

/* ============================================================
   Чат-розыгрыш: активный
   ============================================================ */
.gw-run-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; flex-wrap: wrap;
    padding: 18px 20px;
    border-bottom: 1px solid var(--g-line);
}
.gw-run-title { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.gw-run-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.gw-run-meta code { font-size: 0.75rem; color: var(--g-accent-hi); }
.gw-status {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem; font-weight: 600;
    white-space: nowrap;
}
.gw-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gw-status.open   { background: rgba(52, 211, 153, 0.1);  color: var(--g-ok); }
.gw-status.closed { background: rgba(240, 180, 41, 0.1); color: var(--g-warn); }

.gw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--g-line); }
.gw-stat { display: flex; flex-direction: column; gap: 4px; padding: 13px 18px; background: var(--g-surface); }
.gw-stat-value { font-size: 1.125rem; font-weight: 700; color: var(--g-fg); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.gw-stat.on .gw-stat-value { color: var(--g-accent-hi); }
.gw-stat.warn .gw-stat-value { color: var(--g-warn); }
.gw-stat-label { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g-fg-3); }

.gw-active { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.gw-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 1100px) { .gw-active { grid-template-columns: minmax(0, 1fr); } }

.gw-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gw-actions > .gw-btn-primary { flex: 1 1 180px; }

.gw-list-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--g-line);
}
.gw-list-title { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; }
.gw-list-tools { padding: 10px 12px; border-bottom: 1px solid var(--g-line); }

.gw-people { display: flex; flex-direction: column; max-height: 460px; overflow-y: auto; padding: 6px; }
.gw-person {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px;
    border-radius: 9px;
    min-width: 0;
}
.gw-person:hover { background: rgba(255, 255, 255, 0.025); }
.gw-person.picked { background: var(--g-accent-dim); }
.gw-person-name { flex: 1; min-width: 0; font-size: 0.8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-person-time { font-size: 0.71875rem; color: var(--g-fg-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }

.gw-rejected { border-top: 1px solid var(--g-line); }
.gw-rejected-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none; border: none;
    color: var(--g-fg-2);
    font-family: inherit; font-size: 0.8125rem; font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.gw-rejected-toggle:hover { color: var(--g-fg); }
.gw-rejected-toggle svg { transition: transform 0.18s var(--g-ease); flex-shrink: 0; }
.gw-rejected-toggle.open svg { transform: rotate(180deg); }
.gw-rejected .gw-people { max-height: 260px; padding-top: 0; }
.gw-rejected .gw-person { opacity: 0.85; }

/* Победитель чат-розыгрыша */
.gw-winner {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 26px 20px 22px;
    border: 1px solid var(--g-accent-line);
    border-radius: var(--g-r-lg);
    background: radial-gradient(120% 90% at 50% 0%, rgba(145, 70, 255, 0.16), transparent 62%), var(--g-surface);
    text-align: center;
    animation: gw-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.gw-winner-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--g-fg-3); }
.gw-winner-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.gw-winner-meta { font-size: 0.78125rem; color: var(--g-fg-3); }
.gw-winner-meta b { color: var(--g-fg-2); }
.gw-crown { width: 44px; height: 30px; color: var(--g-gold); }
@keyframes gw-pop { from { opacity: 0; transform: scale(0.94) translateY(6px); } to { opacity: 1; transform: none; } }

/* Таймер ответа победителя */
.gw-reply {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 16px 18px;
    border: 1px solid var(--g-accent-line);
    border-radius: var(--g-r-lg);
    background: var(--g-surface);
    animation: gw-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.gw-reply-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.gw-ring { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.gw-ring svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.gw-ring-track { stroke: var(--g-surface-3); }
.gw-ring-bar { stroke: var(--g-accent); transition: stroke-dashoffset 1s linear, stroke 0.3s; }
.gw-ring.urgent .gw-ring-bar { stroke: var(--g-err); }
.gw-ring-num {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--g-mono); font-size: 0.9375rem; font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.gw-ring.urgent .gw-ring-num { color: var(--g-err); }
.gw-reply-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gw-reply-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--g-fg-3); }
.gw-reply-name { font-size: 1.125rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-reply-hint { font-size: 0.75rem; color: var(--g-fg-3); }
.gw-reply-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* История выборов */
.gw-log { display: flex; flex-direction: column; }
.gw-log-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 0.8125rem; }
.gw-log-row + .gw-log-row { border-top: 1px solid var(--g-line); }
.gw-log-num { width: 26px; flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: var(--g-fg-3); font-variant-numeric: tabular-nums; }
.gw-log-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-log-time { font-size: 0.71875rem; color: var(--g-fg-3); font-variant-numeric: tabular-nums; }
.gw-log-row.win .gw-log-name { color: var(--g-gold); }

/* Лента при розыгрыше в чате */
.gw-belt-wrap { padding: 26px 20px 28px; text-align: center; }
.gw-belt-label { display: inline-flex; align-items: center; gap: 9px; font-size: 0.875rem; font-weight: 600; color: var(--g-fg-2); margin-bottom: 18px; }
.gw-belt-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g-accent-hi); animation: gw-blink 1s ease-in-out infinite; }
@keyframes gw-blink { 50% { opacity: 0.3; } }
.gw-belt-track {
    position: relative;
    width: 100%;
    height: 104px;
    overflow: hidden;
    border: 1px solid var(--g-line-2);
    border-radius: var(--g-r);
    background: var(--g-surface-2);
    display: flex;
    align-items: center;
    contain: paint;
}
.gw-belt { display: flex; flex-direction: row; flex-wrap: nowrap; will-change: transform; }
/* Ширина элемента жёстко связана с BeltItemWidth в DashboardChatGiveaways.razor (130px) */
.gw-belt-item {
    box-sizing: border-box;
    width: 130px; height: 104px;
    flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    border-right: 1px solid var(--g-line);
}
.gw-belt-item span:last-child { max-width: 114px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78125rem; font-weight: 600; color: var(--g-fg-2); }
.gw-belt-indicator {
    position: absolute; top: 0; bottom: 0; left: 50%;
    width: 2px; transform: translateX(-50%);
    background: var(--g-accent);
    pointer-events: none; z-index: 5;
}
.gw-belt-indicator::before, .gw-belt-indicator::after {
    content: ""; position: absolute; left: 50%; transform: translateX(-50%);
    border-left: 7px solid transparent; border-right: 7px solid transparent;
}
.gw-belt-indicator::before { top: 0; border-top: 8px solid var(--g-accent); }
.gw-belt-indicator::after { bottom: 0; border-bottom: 8px solid var(--g-accent); }
.gw-belt-fade { position: absolute; top: 0; bottom: 0; width: 70px; pointer-events: none; z-index: 4; }
.gw-belt-fade.l { left: 0;  background: linear-gradient(90deg, var(--g-surface-2), transparent); }
.gw-belt-fade.r { right: 0; background: linear-gradient(270deg, var(--g-surface-2), transparent); }

/* ============================================================
   Колесо фортуны
   ============================================================ */
.gw-wheel { display: flex; flex-direction: column; gap: 30px; }
.gw-stage-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1080px) { .gw-stage-grid { grid-template-columns: minmax(0, 1fr); } }

/* Участники */
.gw-add { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 14px 16px 6px; }
.gw-add-hint { padding: 0 16px 12px; }
.gw-add-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 0 16px 14px; }
.gw-bulk { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.gw-bulk-btns { display: flex; gap: 8px; }

.gw-stepper {
    display: inline-flex; align-items: center;
    height: 38px;
    border: 1px solid var(--g-line);
    border-radius: 9px;
    background: var(--g-surface-2);
    overflow: hidden;
    flex-shrink: 0;
}
.gw-stepper button {
    width: 28px; height: 100%;
    background: none; border: none;
    color: var(--g-fg-2);
    font-family: inherit; font-size: 1rem; line-height: 1;
    cursor: pointer;
    transition: color 0.16s, background 0.16s;
}
.gw-stepper button:hover:not(:disabled) { color: var(--g-fg); background: rgba(255, 255, 255, 0.05); }
.gw-stepper button:disabled { color: var(--g-fg-3); opacity: 0.5; cursor: not-allowed; }
.gw-stepper input {
    width: 40px; height: 100%;
    padding: 0;
    background: none; border: none;
    border-left: 1px solid var(--g-line); border-right: 1px solid var(--g-line);
    color: var(--g-fg);
    font-family: inherit; font-size: 0.8125rem; font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    outline: none;
    -moz-appearance: textfield;
}
.gw-stepper input::-webkit-outer-spin-button, .gw-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gw-stepper input:focus { background: var(--g-surface-3); }
.gw-stepper input:disabled { color: var(--g-fg-3); }
.gw-stepper.sm { height: 28px; border-radius: 7px; }
.gw-stepper.sm button { width: 24px; font-size: 0.875rem; }
.gw-stepper.sm input { width: 38px; font-size: 0.75rem; }

.gw-plist { display: flex; flex-direction: column; max-height: 520px; overflow-y: auto; padding: 4px 8px 8px; border-top: 1px solid var(--g-line); }
.gw-prow {
    display: flex; align-items: center; gap: 9px;
    padding: 6px 8px;
    border-radius: 9px;
    min-width: 0;
    transition: background 0.16s, opacity 0.16s;
}
.gw-prow:hover { background: rgba(255, 255, 255, 0.025); }
.gw-prow.flash { animation: gw-flash 1.2s var(--g-ease); }
@keyframes gw-flash { 0%, 40% { background: var(--g-accent-dim); } 100% { background: transparent; } }
.gw-prow.out { opacity: 0.42; }
.gw-prow.out .gw-prow-name { text-decoration: line-through; }
.gw-prow.win { background: rgba(251, 191, 36, 0.08); }
.gw-prow.duel { background: var(--g-accent-dim); }
.gw-prow-dot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.gw-prow-name { flex: 1; min-width: 0; font-size: 0.8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-prow-meta { font-size: 0.71875rem; color: var(--g-fg-3); font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 38px; text-align: right; }
.gw-prow-rm {
    width: 22px; height: 22px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 6px;
    color: var(--g-fg-3);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.16s, color 0.16s, background 0.16s;
}
.gw-prow:hover .gw-prow-rm, .gw-prow-rm:focus-visible { opacity: 1; }
.gw-prow-rm:hover { color: var(--g-err); background: rgba(248, 113, 113, 0.1); }
@media (hover: none) { .gw-prow-rm { opacity: 1; } }

.gw-plist-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 16px;
    border-top: 1px solid var(--g-line);
    font-size: 0.75rem; color: var(--g-fg-3);
    font-variant-numeric: tabular-nums;
}
.gw-plist-foot b { color: var(--g-fg-2); font-weight: 600; }

/* Сцена с колесом */
.gw-stage { display: flex; flex-direction: column; }
.gw-stage-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--g-line);
}
.gw-stage-status { display: inline-flex; align-items: center; gap: 9px; font-size: 0.8125rem; font-weight: 600; color: var(--g-fg-2); }
.gw-stage-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g-fg-3); flex-shrink: 0; }
.gw-stage-status.live { color: var(--g-fg); }
.gw-stage-status.live::before { background: var(--g-accent-hi); animation: gw-blink 1s ease-in-out infinite; }
.gw-stage-status.done::before { background: var(--g-gold); }
.gw-scene { display: flex; justify-content: center; padding: 22px 18px 14px; }
.gw-canvas-wrap { width: 100%; max-width: 520px; aspect-ratio: 1 / 1; position: relative; }
.gw-canvas { width: 100%; height: 100%; display: block; }

.gw-stage-foot {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 14px 18px;
    border-top: 1px solid var(--g-line);
}
.gw-ctl { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--g-fg-2); white-space: nowrap; }
.gw-ctl-dur { flex: 1 1 200px; max-width: 320px; }
.gw-ctl-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--g-fg); min-width: 30px; }
.gw-stage-cta { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
    .gw-stage-cta { margin-left: 0; width: 100%; }
    .gw-stage-cta > * { flex: 1; }
}

.gw-stage-side { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }

/* Результат вращения */
.gw-result {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--g-line);
    border-radius: var(--g-r-lg);
    background: var(--g-surface);
    animation: gw-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.gw-result-icon {
    width: 42px; height: 42px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--g-surface-2);
    color: var(--g-fg-2);
}
.gw-result-icon svg { width: 20px; height: 20px; }
.gw-result-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gw-result-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--g-fg-3); }
.gw-result-name { font-size: 1.125rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-result-sub { font-size: 0.75rem; color: var(--g-fg-3); }
.gw-result.elim .gw-result-icon { background: rgba(248, 113, 113, 0.1); color: var(--g-err); }
.gw-result.duel .gw-result-icon { background: var(--g-accent-dim); color: var(--g-accent-hi); }

/* Текущий матч турнира */
.gw-duel {
    border: 1px solid var(--g-accent-line);
    border-radius: var(--g-r-lg);
    background: var(--g-surface);
    overflow: hidden;
}
.gw-duel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--g-line);
    font-size: 0.75rem; color: var(--g-fg-3);
}
.gw-duel-head b { color: var(--g-fg); font-weight: 600; }
.gw-duel-body { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 16px; }
.gw-duel-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gw-duel-side.b { align-items: flex-end; text-align: right; }
.gw-duel-name { font-size: 1rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gw-duel-sub { font-size: 0.75rem; color: var(--g-fg-3); font-variant-numeric: tabular-nums; }
.gw-duel-vs { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; color: var(--g-fg-3); }
.gw-duel-bar { display: flex; height: 4px; margin: 0 16px 16px; border-radius: 4px; overflow: hidden; background: var(--g-surface-3); }
.gw-duel-bar span:first-child { background: var(--g-accent); }
.gw-duel-bar span:last-child { background: #22b8cf; }

/* Чемпион / победитель */
.gw-champion {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 24px 20px 20px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--g-r-lg);
    background: radial-gradient(120% 90% at 50% 0%, rgba(251, 191, 36, 0.12), transparent 60%), var(--g-surface);
    text-align: center;
    animation: gw-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.gw-champion-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--g-fg-3); }
.gw-champion-name { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.gw-champion-meta { font-size: 0.78125rem; color: var(--g-fg-3); }
.gw-champion-meta b { color: var(--g-fg-2); }
.gw-champion .gw-actions { justify-content: center; margin-top: 6px; }

/* ============================================================
   Турнирная сетка
   ============================================================ */
.gw-bracket-scroll { overflow-x: auto; padding: 18px 20px 20px; }
.gw-bracket { display: flex; gap: 32px; min-width: max-content; }
.gw-br-round { display: flex; flex-direction: column; width: 212px; flex-shrink: 0; }
.gw-br-round-title {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding-bottom: 12px;
    font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--g-fg-3);
}
.gw-br-round.current .gw-br-round-title { color: var(--g-accent-hi); }
.gw-br-col { display: flex; flex-direction: column; flex: 1; }
.gw-br-slot { position: relative; flex: 1; display: flex; align-items: center; padding: 6px 0; }

/* соединительные линии: выход вправо + вертикаль к паре */
.gw-br-round:not(:last-child) .gw-br-slot::after {
    content: ""; position: absolute; top: 50%; right: -16px; width: 16px;
    border-top: 1px solid var(--g-line-2);
}
.gw-br-round:not(:last-child) .gw-br-slot:nth-child(odd)::before {
    content: ""; position: absolute; top: 50%; right: -16px; height: 50%;
    border-right: 1px solid var(--g-line-2);
}
.gw-br-round:not(:last-child) .gw-br-slot:nth-child(even)::before {
    content: ""; position: absolute; top: 0; right: -16px; height: 50%;
    border-right: 1px solid var(--g-line-2);
}
.gw-br-round:not(:first-child) .gw-br-match::before {
    content: ""; position: absolute; top: 50%; left: -17px; width: 16px;
    border-top: 1px solid var(--g-line-2);
}

.gw-br-match {
    position: relative;
    width: 100%;
    border: 1px solid var(--g-line);
    border-radius: 10px;
    background: var(--g-surface-2);
    font-family: inherit;
    text-align: left;
    color: var(--g-fg);
    padding: 0;
    transition: border-color 0.16s var(--g-ease), background 0.16s var(--g-ease), box-shadow 0.16s var(--g-ease);
}
button.gw-br-match { cursor: pointer; }
button.gw-br-match:hover:not(:disabled) { border-color: var(--g-line-2); }
button.gw-br-match:disabled { cursor: default; }
.gw-br-match.ready { border-color: rgba(145, 70, 255, 0.22); }
.gw-br-match.current { border-color: var(--g-accent); box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.16); }
.gw-br-match.bye { opacity: 0.55; border-style: dashed; }
.gw-br-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; min-width: 0; font-size: 0.78125rem; }
.gw-br-row + .gw-br-row { border-top: 1px solid var(--g-line); }
.gw-br-seed { width: 18px; flex-shrink: 0; font-size: 0.6875rem; font-weight: 700; color: var(--g-fg-3); font-variant-numeric: tabular-nums; text-align: right; }
.gw-br-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-br-pts { font-size: 0.6875rem; color: var(--g-fg-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.gw-br-row.empty .gw-br-name { color: var(--g-fg-3); font-weight: 500; font-style: italic; }
.gw-br-row.win { background: rgba(145, 70, 255, 0.1); }
.gw-br-row.win .gw-br-name { color: var(--g-fg); }
.gw-br-row.win .gw-br-seed { color: var(--g-accent-hi); }
.gw-br-row.lose .gw-br-name { color: var(--g-fg-3); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }
.gw-br-match.final-done .gw-br-row.win { background: rgba(251, 191, 36, 0.12); }
.gw-br-match.final-done .gw-br-row.win .gw-br-seed { color: var(--g-gold); }

.gw-bracket-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--g-line); }
.gw-bracket-progress { display: flex; align-items: center; gap: 12px; font-size: 0.78125rem; color: var(--g-fg-3); font-variant-numeric: tabular-nums; }
.gw-progress { width: 160px; height: 4px; border-radius: 4px; background: var(--g-surface-3); overflow: hidden; }
.gw-progress span { display: block; height: 100%; background: var(--g-accent); border-radius: 4px; transition: width 0.4s var(--g-ease); }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 720px) {
    .gw-head { align-items: flex-start; }
    .gw-state { width: 100%; justify-content: center; }
    .gw-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .gw-row-ctl { justify-content: space-between; }
    .gw-fields { grid-template-columns: minmax(0, 1fr); }
    .gw-launch { flex-direction: column; align-items: stretch; }
    .gw-launch .gw-btn-primary { width: 100%; }
    .gw-reply-actions { width: 100%; }
    .gw-reply-actions > * { flex: 1; }
    .gw-duel-body { grid-template-columns: minmax(0, 1fr); text-align: center; }
    .gw-duel-side, .gw-duel-side.b { align-items: center; text-align: center; }
}
