.game-operator-section {
    --operator-gold: #f4cf58;
    --operator-mint: #78f0b1;
    --operator-border: rgba(118, 218, 165, .38);
    display: grid;
    gap: 18px;
    overflow: hidden;
}

.game-operator-toolbar,
.game-operator-room-header,
.game-operator-participant,
.game-operator-role-row,
.game-operator-lobby-bot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.game-operator-heading-block,
.game-operator-toolbar-actions,
.game-operator-badges,
.game-operator-room-controls,
.game-operator-global-controls,
.game-operator-add-bot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.game-operator-heading-block h3,
.game-operator-rooms-section > h3,
.game-operator-room h4 {
    margin: 0;
}

.game-operator-role-badge,
.game-operator-badges span,
.game-operator-bot-badge,
.game-operator-human-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid var(--operator-border);
    border-radius: 999px;
    background: rgba(13, 73, 43, .76);
    color: var(--operator-mint);
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .08em;
}

.game-operator-badges span.active,
.game-operator-bot-badge {
    border-color: rgba(244, 207, 88, .58);
    color: var(--operator-gold);
}

.game-operator-fairness-note {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid rgba(244, 207, 88, .45);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(75, 55, 7, .55), rgba(3, 45, 26, .76));
    color: #f8edbd;
    line-height: 1.5;
}

.game-operator-global-controls,
.game-operator-role-section,
.game-operator-room {
    padding: 14px;
    border: 1px solid var(--operator-border);
    border-radius: 15px;
    background: rgba(3, 24, 15, .86);
}

.game-operator-global-controls label {
    font-weight: 900;
}

.game-operator-select,
.game-operator-input {
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid rgba(118, 218, 165, .5);
    border-radius: 10px;
    background: #061d13;
    color: #fff;
}

.game-operator-select.compact {
    min-width: 150px;
}

.game-operator-button {
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid #e8c749;
    border-radius: 10px;
    background: linear-gradient(135deg, #1f6841, #0e3b25);
    color: #fffbea;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .035em;
    cursor: pointer;
    touch-action: manipulation;
}

.game-operator-button.secondary {
    color: #171100;
    background: linear-gradient(135deg, #ffe374, #c99a1a);
}

.game-operator-button.danger {
    border-color: #f59191;
    background: linear-gradient(135deg, #842f34, #49171d);
}

.game-operator-button.compact {
    min-height: 44px;
    padding-inline: 12px;
}

.game-operator-button:disabled,
.game-operator-select:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.game-operator-role-section > summary,
.game-operator-lobby-tools > summary {
    min-height: 44px;
    cursor: pointer;
    color: #ffe37b;
    font-weight: 1000;
}

.game-operator-role-list,
.game-operator-room-list,
.game-operator-participants,
.game-operator-rooms-section {
    display: grid;
    gap: 10px;
}

.game-operator-role-row {
    min-height: 56px;
    padding: 9px 0;
    border-top: 1px solid rgba(118, 218, 165, .18);
}

.game-operator-role-identity,
.game-operator-participant-name {
    display: grid;
    gap: 3px;
}

.game-operator-role-identity span,
.game-operator-participant-name small,
.game-operator-room-header p,
.game-operator-help,
.game-operator-lobby-body > p {
    margin: 0;
    color: #a8c7b5;
    line-height: 1.45;
}

.game-operator-room-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.game-operator-room {
    align-content: start;
    display: grid;
    gap: 13px;
}

.game-operator-room-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #cce8d7;
    font-size: 13px;
}

.game-operator-participant {
    min-height: 58px;
    padding: 8px 0;
    border-top: 1px solid rgba(118, 218, 165, .16);
}

.game-operator-participant-name {
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
}

.game-operator-participant-name small {
    grid-column: 1 / -1;
}

.game-operator-room-controls {
    align-items: stretch;
    padding-top: 4px;
}

.game-operator-add-bot {
    flex: 1 1 100%;
}

.game-operator-add-bot .game-operator-input {
    flex: 1 1 135px;
    min-width: 0;
}

.game-operator-status,
.game-operator-lobby-status {
    min-height: 22px;
    color: #d8eee2;
    font-weight: 800;
}

.game-operator-status.success,
.game-operator-lobby-status.success {
    color: #7ff5b7;
}

.game-operator-status.error,
.game-operator-lobby-status.error {
    color: #ffaaa8;
}

.game-operator-empty {
    margin: 0;
    color: #91ad9d;
    font-style: italic;
}

.game-operator-lobby-tools {
    margin-top: 12px;
    padding: 9px 11px;
    border: 1px dashed rgba(244, 207, 88, .5);
    border-radius: 12px;
    background: rgba(23, 48, 31, .78);
}

.game-operator-lobby-tools > summary {
    align-items: center;
    display: flex;
    list-style: none;
}

.game-operator-lobby-tools > summary::-webkit-details-marker {
    display: none;
}

.game-operator-lobby-tools > summary::before {
    content: '⚙';
    margin-right: 8px;
}

.game-operator-lobby-body {
    display: grid;
    gap: 9px;
    padding-top: 8px;
}

.game-operator-lobby-bot {
    min-height: 48px;
    padding-top: 7px;
    border-top: 1px solid rgba(118, 218, 165, .15);
}

@media (max-width: 700px) {
    .game-operator-section {
        gap: 13px;
    }

    .game-operator-toolbar,
    .game-operator-room-header,
    .game-operator-participant,
    .game-operator-role-row {
        align-items: stretch;
        flex-direction: column;
    }

    .game-operator-toolbar-actions,
    .game-operator-global-controls,
    .game-operator-room-controls,
    .game-operator-add-bot {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .game-operator-button,
    .game-operator-select,
    .game-operator-input {
        width: 100%;
    }

    .game-operator-room-list {
        grid-template-columns: 1fr;
    }

    .game-operator-participant .game-operator-button,
    .game-operator-role-row .game-operator-select {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-operator-section *,
    .game-operator-lobby-tools * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/*
 * Rooms grouped one fold per game, and the accounts fold that sits under the
 * roles list. Both follow the console's existing panel treatment rather than
 * inventing their own.
 */
.game-operator-game-fold,
.game-operator-accounts-section {
    margin-top: 10px;
    border: 1px solid rgba(228, 190, 72, .34);
    border-radius: 14px;
    background: rgba(0, 26, 17, .55);
}

.game-operator-game-fold > summary,
.game-operator-accounts-section > summary {
    padding: 11px 14px;
    color: #f2d47d;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .04em;
    cursor: pointer;
}

.game-operator-game-fold[open] > summary,
.game-operator-accounts-section[open] > summary {
    border-bottom: 1px solid rgba(228, 190, 72, .24);
}

.game-operator-game-fold > .game-operator-room-list,
.game-operator-accounts-section > .game-operator-account-list,
.game-operator-accounts-section > .game-operator-help {
    padding: 10px 12px;
}

.game-operator-account-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 10px;
    padding: 9px 11px;
    margin-bottom: 7px;
    border: 1px solid rgba(228, 190, 72, .22);
    border-radius: 12px;
    background: rgba(3, 32, 21, .7);
}

.game-operator-account-row > strong {
    color: #f4fff8;
    font-size: 13px;
}

.game-operator-account-wallet {
    color: #ffe9a6;
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

.game-operator-account-charm {
    grid-column: 1 / -1;
    color: #a9c6b7;
    font-size: 10px;
    letter-spacing: .04em;
}
