/* ================================================================
   BADMINTON ARENA — Game Pages Theme
   ================================================================ */

:root {
    --bm-bg:          #07120d;
    --bm-court:       #0f2318;
    --bm-court2:      #183326;
    --bm-line:        #22c55e;
    --bm-line-dim:    rgba(34, 197, 94, 0.18);
    --bm-line-mid:    rgba(34, 197, 94, 0.35);
    --bm-gold:        #fbbf24;
    --bm-gold-dim:    rgba(251, 191, 36, 0.15);
    --bm-silver:      #94a3b8;
    --bm-bronze:      #cd7f32;
    --bm-orange:      #f97316;
    --bm-red:         #ef4444;
    --bm-blue:        #38bdf8;
    --bm-teal:        #2dd4bf;
    --bm-text:        #f0fdf4;
    --bm-text-2:      #a7f3d0;
    --bm-text-muted:  #94a3b8;
    --bm-card:        rgba(8, 22, 14, 0.96);
    --bm-card-hover:  rgba(14, 38, 24, 0.98);
    --bm-card-border: rgba(34, 197, 94, 0.28);
    --bm-nav:         rgba(4, 12, 7, 0.97);
    --bm-shadow:      0 4px 24px rgba(0, 0, 0, 0.6);
    --bm-shadow-glow: 0 0 20px rgba(34, 197, 94, 0.25);
    --bm-radius:      12px;
    --bm-radius-sm:   8px;
}

/* ── Body ─────────────────────────────────────────────────────── */
body.game-page {
    background-color: var(--bm-bg) !important;
    color: var(--bm-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Noto Sans", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* Dark scrim over background image so text is always readable */
body.game-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 14, 9, 0.88), rgba(5, 14, 9, 0.80)),
        rgba(5, 14, 9, 0.84);
    z-index: 0;
    pointer-events: none;
}

body.game-page #wrapper,
body.game-page #main,
body.game-page #main-page {
    position: relative;
    z-index: 1;
    min-height: 100%;
}

body.game-page #main {
    background-color: transparent !important;
    margin: 0 !important;
}

body.game-page #main-page {
    padding: 0 !important;
    max-width: 100%;
}

/* ── Bottom Nav ──────────────────────────────────────────────── */
.bm-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bm-nav);
    border-top: 1px solid var(--bm-card-border);
    display: flex;
    align-items: stretch;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

/* ── Profile popup ────────────────────────────────────────────── */
.bm-pp-header {
    text-align: center;
    padding: 2px 0 10px;
    border-bottom: 1px solid var(--bm-line-dim);
    margin-bottom: 0;
}
.bm-pp-avatar {
    font-size: 2.35rem;
    line-height: 1;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 12px rgba(251,191,36,0.5));
}
.bm-pp-name {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--bm-text);
    letter-spacing: 0;
    margin-bottom: 6px;
}
.bm-pp-rank-line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    line-height: 1.1;
}
.bm-pp-role-badge,
.bm-pp-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.66rem;
    font-weight: 800;
    border-radius: 20px;
    padding: 3px 8px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.bm-pp-role-badge {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.35);
    color: #16a34a;
}
.bm-pp-rank-badge.rank-1 { background: rgba(251,191,36,0.18); border: 1px solid rgba(251,191,36,0.5); color: var(--bm-gold); }
.bm-pp-rank-badge.rank-2 { background: rgba(148,163,184,0.15); border: 1px solid rgba(148,163,184,0.4); color: var(--bm-silver); }
.bm-pp-rank-badge.rank-3 { background: rgba(205,127,50,0.15); border: 1px solid rgba(205,127,50,0.4); color: var(--bm-bronze); }
.bm-pp-rank-badge.rank-4 { background: rgba(56,189,248,0.1); border: 1px solid rgba(56,189,248,0.3); color: var(--bm-blue); }
.bm-pp-rank-total { font-weight: 400; opacity: 0.7; }
.bm-pp-pts {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--bm-text-2);
    white-space: nowrap;
}
.bm-pp-pts-label { font-weight: 400; font-size: 0.65rem; color: var(--bm-text-muted); }

.bm-pp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 10px 0 4px;
}
.bm-pp-stat {
    text-align: center;
    padding: 10px 4px 8px;
    border-right: 1px solid var(--bm-line-dim);
}
.bm-pp-stat:last-child { border-right: none; }
.bm-pp-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 0 10px currentColor;
}
.bm-pp-stat-label {
    font-size: 0.6rem;
    color: var(--bm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bm-pp-blue  { color: var(--bm-blue); }
.bm-pp-green { color: var(--bm-line); }
.bm-pp-red   { color: var(--bm-red); }
.bm-pp-gold  { color: var(--bm-gold); }
.bm-pp-formula {
    text-align: center;
    font-size: 0.65rem;
    color: var(--bm-text-muted);
    padding: 8px 0 4px;
    border-top: 1px solid var(--bm-line-dim);
    margin-top: 4px;
    letter-spacing: 0.3px;
}
.bm-pp-empty {
    text-align: center;
    color: var(--bm-text-muted);
    font-size: 0.85rem;
    padding: 16px 0;
}

/* ── Settings dropdown ────────────────────────────────────────── */
#bm-settings-menu {
    position: fixed;
    z-index: 1100;
    width: 180px;
    background: var(--bm-nav);
    border: 1px solid var(--bm-card-border);
    border-radius: var(--bm-radius-sm);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
#bm-settings-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
#bm-settings-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--bm-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}
#bm-settings-menu button:not(:last-child) {
    border-bottom: 1px solid var(--bm-line-dim);
}
#bm-settings-menu button:hover {
    background: var(--bm-card-hover);
    color: var(--bm-line);
}
#bm-set-logout:hover { color: var(--bm-red) !important; }

.bm-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8ba89a;
    text-decoration: none !important;
    font-size: 0.6rem;
    gap: 3px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.bm-nav-btn i {
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.bm-nav-btn:hover, .bm-nav-btn.active {
    color: var(--bm-line) !important;
}

.bm-nav-btn:hover i {
    transform: translateY(-2px);
}

.bm-nav-center {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bm-text-2) !important;
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    padding: 0 4px;
    cursor: pointer;
    border-left: 1px solid var(--bm-card-border);
    border-right: 1px solid var(--bm-card-border);
}

.bm-team-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--bm-text-2);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.2s;
}
.bm-nav-btn.active .bm-team-label,
.bm-nav-btn:hover .bm-team-label {
    color: var(--bm-line);
}

.bm-nav img {
    height: 22px;
    width: 22px;
    object-fit: contain;
    filter: brightness(0.7);
    transition: filter 0.2s;
}

.bm-nav-btn:hover img, .bm-nav-btn.active img {
    filter: brightness(1.2) drop-shadow(0 0 6px var(--bm-line));
}

/* ── Scroll content ───────────────────────────────────────────── */
.bm-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px;
    padding-bottom: 70px;
    min-height: 100vh;
    box-sizing: border-box;
    opacity: 1;
    transition: opacity 0.12s ease;
}

body.game-page.bm-reloading .bm-scroll {
    opacity: 0.96;
}

/* ── Page header (event title) ───────────────────────────────── */
.bm-event-header {
    background: linear-gradient(135deg, rgba(7, 28, 17, 0.98) 0%, rgba(11, 38, 24, 0.96) 100%);
    border: 1px solid rgba(34, 197, 94, 0.38);
    border-radius: var(--bm-radius);
    padding: 16px 18px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.36);
}

.bm-event-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 40px,
        rgba(34,197,94,0.04) 40px,
        rgba(34,197,94,0.04) 41px
    );
    pointer-events: none;
}

.bm-event-header .team-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--bm-gold);
    display: block;
    text-shadow: 0 0 10px rgba(251,191,36,0.4);
    margin-bottom: 4px;
}

.bm-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-right: 4px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.16);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.34), 0 0 18px rgba(251, 191, 36, 0.18);
}

.bm-event-header .event-title {
    font-size: 0.86rem;
    color: var(--bm-text-2);
    font-weight: 750;
}

.bm-event-header .event-meta {
    font-size: 0.74rem;
    color: #c8f7df;
    margin-top: 8px;
    font-weight: 650;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 0;
}

.bm-event-header .event-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
    color: #c6f6e0;
}

.bm-event-header .event-meta .event-links-inline {
    margin-left: auto;
    margin-right: 0;
    display: flex;
    gap: 6px;
    align-items: center;
}

.bm-event-header .event-meta .event-links-inline a {
    font-size: 0.7rem;
    color: var(--bm-line) !important;
    text-decoration: none;
    border: 1px solid var(--bm-line-mid);
    border-radius: 20px;
    padding: 2px 10px;
    transition: all 0.2s;
    white-space: nowrap;
}

.bm-event-header .event-meta .event-links-inline a:hover {
    background: var(--bm-line-dim);
}

/* ── Round tab nav ───────────────────────────────────────────── */
.bm-tabs {
    display: flex;
    gap: 6px;
    padding: 0 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.bm-tabs::-webkit-scrollbar { display: none; }

.bm-tab {
    flex-shrink: 0;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #cdeadd;
    background: rgba(6, 20, 12, 0.95);
    border: 1px solid var(--bm-card-border);
    text-decoration: none !important;
    transition: all 0.2s;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.bm-tab:hover {
    color: #d1fae5 !important;
    border-color: var(--bm-line-mid);
}

.bm-tab.active {
    background: var(--bm-line);
    color: #000 !important;
    border-color: var(--bm-line);
    box-shadow: 0 0 12px rgba(34,197,94,0.4);
}

/* ── Round header bar ─────────────────────────────────────────── */
.bm-round-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: rgba(7, 21, 13, 0.92);
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-left: 4px solid var(--bm-gold);
    border-radius: var(--bm-radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}

.bm-round-header .round-title {
    font-size: 0.9rem;
    font-weight: 850;
    color: var(--bm-gold);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bm-round-icon {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.14);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.28);
}

.bm-round-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bm-btn {
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 800;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none !important;
}

.bm-btn-orange {
    color: var(--bm-orange);
    border-color: var(--bm-orange);
    background: rgba(249,115,22,0.1);
}
.bm-btn-orange:hover { background: rgba(249,115,22,0.25); color: var(--bm-orange) !important; }

.bm-btn-green {
    color: var(--bm-line);
    border-color: var(--bm-line);
    background: var(--bm-line-dim);
}
.bm-btn-green:hover { background: rgba(34,197,94,0.25); color: var(--bm-line) !important; }

.bm-btn-primary {
    color: #000;
    border-color: var(--bm-line);
    background: var(--bm-line);
}
.bm-btn-primary:hover { background: #16a34a; border-color: #16a34a; color: #000 !important; }

.bm-btn-gold {
    color: #000;
    border-color: var(--bm-gold);
    background: var(--bm-gold);
}
.bm-btn-gold:hover { background: #d97706; border-color: #d97706; color: #000 !important; }

.bm-btn-done {
    min-width: 128px;
    justify-content: center;
    border-radius: 8px;
}

.bm-btn-done-pending {
    color: var(--bm-text-muted);
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.45);
}

.bm-btn-done-ready {
    color: #04140a;
    border-color: #22c55e;
    background: linear-gradient(180deg, #34d976 0%, #16a34a 100%);
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.28);
}

.bm-btn-done-ready:hover {
    color: #04140a !important;
    border-color: #4ade80;
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    transform: translateY(-1px);
}

.bm-btn:disabled, .bm-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.4);
}

.bm-btn-done:disabled {
    opacity: 0.72;
    filter: none;
}

/* ── Court cards grid ─────────────────────────────────────────── */
.bm-courts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

/* ── Court card ───────────────────────────────────────────────── */
.bm-court-card {
    background: rgba(6, 30, 17, 0.98);
    border: 1px solid rgba(34, 197, 94, 0.34);
    border-radius: var(--bm-radius);
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
    transition: all 0.3s ease;
    position: relative;
}

.bm-court-card::before {
    content: '🏸';
    position: absolute;
    right: 14px;
    top: 14px;
    font-size: 2.2rem;
    opacity: 0.06;
    transform: rotate(-18deg);
    pointer-events: none;
}

/* net line in the middle */
.bm-court-card .court-net {
    position: relative;
    z-index: 5;
    height: 0;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bm-court-card .court-net::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        rgba(34, 197, 94, 0.42) 0,
        rgba(34, 197, 94, 0.42) 5px,
        transparent 5px,
        transparent 10px
    );
}

.bm-court-card .court-net .vs-badge {
    position: relative;
    z-index: 6;
    background: #062414;
    border: 1px solid var(--bm-line-mid);
    color: var(--bm-line);
    font-size: 0.62rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 10px;
    letter-spacing: 1px;
}

.bm-court-card .court-net .vs-badge::before {
    content: '🏸';
    margin-right: 4px;
    font-size: 0.68rem;
    vertical-align: -1px;
}

.bm-court-number {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: #06351b;
    border: 1px solid var(--bm-line-mid);
    border-radius: 20px;
    padding: 1px 10px;
    font-size: 0.66rem;
    font-weight: 850;
    color: #ecfdf5;
    z-index: 10;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ── Team half (inside court card) ──────────────────────────── */
.bm-team {
    padding: 24px 10px 14px;
    min-height: 86px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bm-team:first-child {
    border-bottom: none;
    padding-top: 30px;
}

.bm-team:last-child {
    padding-bottom: 16px;
}

.bm-team .trophy-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.bm-team .shuttle-reaction {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%) rotate(18deg);
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bm-team.active .trophy-icon {
    opacity: 1;
}

.bm-team.won {
    background: linear-gradient(135deg, rgba(251,191,36,0.15) 0%, rgba(34,197,94,0.1) 100%);
}

.bm-team.won .trophy-icon {
    opacity: 1;
    animation: trophy-bounce 0.5s ease;
}

.bm-team.won .shuttle-reaction {
    opacity: 1;
    animation: shuttle-pop 0.45s ease;
}

.bm-team.lost {
    opacity: 0.55;
}

@keyframes trophy-bounce {
    0%   { transform: translateY(-50%) scale(0.5); }
    60%  { transform: translateY(-50%) scale(1.2); }
    100% { transform: translateY(-50%) scale(1); }
}

@keyframes shuttle-pop {
    0% { transform: translateY(-50%) translateX(10px) rotate(45deg); opacity: 0; }
    65% { transform: translateY(-50%) translateX(-2px) rotate(12deg); opacity: 1; }
    100% { transform: translateY(-50%) translateX(0) rotate(18deg); opacity: 1; }
}

.bm-team:hover:not(.won):not(.lost) {
    background: var(--bm-line-dim);
}

/* ── Player badges ───────────────────────────────────────────── */
.bm-player-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

/* override Bootstrap badge-info generated by PHP */
.bm-player-badges .badge,
.bm-player-badges .badge-info {
    background: rgba(34,197,94,0.22) !important;
    border: 1px solid rgba(134,239,172,0.46) !important;
    color: #f0fdf4 !important;
    font-size: 0.74rem !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    padding: 5px 11px !important;
    border-radius: 999px !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
    min-width: auto !important;
}

.bm-team.won .bm-player-badges .badge,
.bm-team.won .bm-player-badges .badge-info {
    background: rgba(251,191,36,0.22) !important;
    border-color: rgba(251,191,36,0.7) !important;
    color: #fde68a !important;
}

.bm-team.lost .bm-player-badges .badge,
.bm-team.lost .bm-player-badges .badge-info {
    background: rgba(148,163,184,0.12) !important;
    border-color: rgba(148,163,184,0.18) !important;
    color: #b6c4d4 !important;
}

.bm-player-badges .bm-win-star,
.bm-waiting-badge .bm-win-star {
    color: var(--bm-gold);
    font-size: 0.68rem;
    margin-left: 4px;
    text-shadow: 0 0 8px rgba(251,191,36,0.48);
    vertical-align: 1px;
}

.bm-waiting-badge .bm-win-star {
    color: #f59e0b;
    font-size: 0.62rem;
    margin-left: 3px;
}

.bm-team.won .bm-player-badges .bm-win-star {
    color: #facc15;
}

.bm-team.lost .bm-player-badges .bm-win-star {
    opacity: 0.72;
}

.bm-badge {
    background: rgba(34,197,94,0.12);
    border: 1px solid var(--bm-line-mid);
    color: var(--bm-text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}

.bm-team.won .bm-badge {
    background: rgba(251,191,36,0.18);
    border-color: rgba(251,191,36,0.5);
    color: var(--bm-gold);
}

.bm-team.lost .bm-badge {
    background: rgba(100,100,100,0.1);
    border-color: rgba(100,100,100,0.2);
    color: var(--bm-text-muted);
}

.bm-na {
    font-size: 0.72rem;
    color: var(--bm-text-muted);
    font-weight: 750;
}

/* ── Random method setting control ───────────────────────────── */
.bm-random-methods {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    padding: 5px 10px;
    margin: 0;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 8px;
}

.bm-random-methods::before {
    content: 'Mode';
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-right: 2px;
}

.bm-random-methods label {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0;
    margin: 0;
    border-radius: 0;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease;
}

.bm-random-methods input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bm-random-methods span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0;
    border-radius: 0;
}

.bm-random-methods span::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid #94a3b8;
    background: #fff;
    margin-right: 6px;
    box-shadow: inset 0 0 0 2px #fff;
}

.bm-random-methods input:checked + span {
    background: transparent;
    color: #15803d;
    box-shadow: none;
}

.bm-random-methods input:checked + span::before {
    border-color: #16a34a;
    background: #16a34a;
}

.bm-random-methods input:disabled + span {
    color: rgba(148, 163, 184, 0.55);
    cursor: not-allowed;
}

.bm-random-methods input:disabled + span::before {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(241, 245, 249, 0.85);
}

/* ── Waiting / Early leave list ──────────────────────────────── */
.bm-waiting-list {
    background: var(--bm-card);
    border: 1px solid var(--bm-card-border);
    border-radius: var(--bm-radius-sm);
    padding: 10px 14px;
    margin-top: 4px;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.bm-waiting-list .label {
    color: #9dc9b4;
    margin-bottom: 8px;
    font-size: 0.7rem;
}

.bm-waiting-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bm-waiting-badge {
    background: rgba(56,189,248,0.1);
    border: 1px solid rgba(56,189,248,0.3);
    color: var(--bm-blue);
    font-size: 0.68rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.bm-early-badge {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: var(--bm-red);
    font-size: 0.68rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* ── Empty / info messages ───────────────────────────────────── */
.bm-empty {
    text-align: center;
    padding: 40px 20px;
    color: #a8c4b8;
    font-size: 0.85rem;
    background: var(--bm-card);
    border: 1px solid var(--bm-card-border);
    border-radius: var(--bm-radius);
}

.bm-empty-shuttle {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    font-size: 1.6rem;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.bm-empty > i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
    color: var(--bm-line);
    opacity: 0.4;
}

.bm-empty .bm-btn i {
    font-size: inherit;
    margin-bottom: 0;
    display: inline-block;
    color: inherit;
    opacity: 1;
}

.bm-empty .bm-btn {
    margin-top: 16px;
}

/* ── Statistic table ──────────────────────────────────────────── */
.bm-stat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    background: var(--bm-card);
    border: 1px solid var(--bm-card-border);
    border-radius: var(--bm-radius);
    overflow: hidden;
}

.bm-stat-table th,
.bm-stat-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--bm-line-dim);
    color: var(--bm-text);
}

.bm-stat-table thead th {
    background: rgba(34,197,94,0.15);
    color: #c6f6e0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.bm-stat-table thead th:first-child { text-align: left; }

.bm-stat-table tbody tr:last-child td { border-bottom: none; }

.bm-stat-table tbody tr:hover td {
    background: var(--bm-line-dim);
}

.bm-stat-table .stat-name { font-weight: 600; }
.bm-stat-table .stat-num { text-align: center; font-weight: 700; color: #c6f6e0; }
.bm-stat-table .stat-section td {
    background: rgba(34,197,94,0.06);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bm-text-2);
    text-align: center;
    letter-spacing: 0.5px;
}

/* ── Attendance page ──────────────────────────────────────────── */
.bm-attend-header {
    background: linear-gradient(135deg, rgba(34,197,94,0.12) 0%, rgba(34,197,94,0.05) 100%);
    border: 1.5px solid var(--bm-line-mid);
    border-radius: var(--bm-radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    position: relative;
    overflow: visible;
}
.bm-attend-card-main { display: flex; align-items: flex-start; gap: 16px; }
.bm-attend-event-icon {
    width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center;
    border-radius: 18px; background: linear-gradient(145deg, rgba(25,198,220,.18), rgba(67,135,237,.16));
    box-shadow: inset 0 0 0 1px rgba(67,135,237,.12); font-size: 27px;
}
.bm-attend-event-copy { flex: 1; min-width: 0; }
.bm-attend-event-copy h1 {
    margin: 1px 0 10px; color: var(--bm-text); font-size: 1.2rem; font-weight: 850; line-height: 1.3;
}
.bm-attend-event-grid { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 16px; }
.bm-attend-event-grid span { display: inline-flex; align-items: center; color: var(--bm-text-2); font-size: .74rem; font-weight: 650; }
.bm-attend-event-grid i { width: 17px; margin-right: 4px; color: var(--bm-blue); text-align: center; }
.bm-attend-description {
    margin-top: 14px; padding: 11px 13px; border-radius: 13px;
    color: var(--bm-text-muted); background: rgba(67,135,237,.055); font-size: .72rem; line-height: 1.55;
}
.bm-attend-admin-actions {
    margin: 15px -16px -14px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-top: 1px solid var(--bm-line-dim);
    border-radius: 0 0 calc(var(--bm-radius) - 2px) calc(var(--bm-radius) - 2px);
    background: rgba(235,247,255,.72);
    box-shadow: inset 0 -1px 0 var(--bm-line-mid);
}
.bm-admin-label { color: var(--bm-text-muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.bm-admin-label i { margin-right: 5px; color: var(--bm-blue); }
.bm-attend-admin-actions > div { display: flex; gap: 8px; }
.bm-attend-action {
    min-height: 39px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px;
    border: 1px solid rgba(67,135,237,.18); border-radius: 13px; font-size: .75rem; font-weight: 800; text-decoration: none !important;
}
.bm-attend-checkin { color: var(--bm-blue) !important; background: #fff; }
.bm-attend-start { color: #fff !important; border-color: transparent; background: linear-gradient(135deg, #ffb62f, #ff7657); }

.attend-header-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.attend-header-left { flex: 1; min-width: 0; }

.bm-attend-header .event-date {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--bm-line);
    margin-bottom: 4px;
}

.bm-attend-header .event-meta {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--bm-text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.bm-attend-header .event-meta-sep {
    color: var(--bm-text-muted);
    font-weight: 400;
}

.bm-attend-header .event-meta-time {
    color: var(--bm-text-muted);
    font-weight: 500;
}

.bm-attend-header .event-title-sub {
    font-size: 0.75rem;
    color: var(--bm-text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attend-start-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.8rem !important;
    padding: 7px 14px !important;
}

.bm-section-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a8c4b8;
    padding: 6px 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--bm-line-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bm-section-header i { color: var(--bm-line); }

.bm-player-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.bm-player-item {
    background: var(--bm-card);
    border: 1px solid var(--bm-card-border);
    border-radius: var(--bm-radius-sm);
    padding: 9px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.bm-player-item:hover {
    background: var(--bm-card-hover);
    border-color: var(--bm-line-mid);
}

.bm-player-item .player-num {
    order: 1;
    width: 22px;
    height: 22px;
    background: var(--bm-line-dim);
    border: 1px solid var(--bm-line-mid);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--bm-line);
    flex-shrink: 0;
}

.bm-player-item .player-num.over {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.3);
    color: var(--bm-red);
}

.bm-player-item .player-name {
    order: 2;
    flex: 1 1 0;
    font-weight: 600;
    color: var(--bm-text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bm-player-item.over .player-name {
    color: var(--bm-red);
}

.bm-player-item .player-extra {
    order: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.bm-player-item .plus-badge {
    font-size: 0.65rem;
    color: var(--bm-orange);
    font-weight: 700;
}

.bm-player-item .comment {
    order: 4;
    flex: 0 0 calc(100% - 32px);
    display: block;
    width: auto;
    font-size: 0.67rem;
    color: #8ecfb0;
    margin-top: -2px;
    margin-left: 32px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    font-style: italic;
}

.bm-player-item .delete-btn {
    padding: 3px 8px;
    font-size: 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.1);
    color: var(--bm-red);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.bm-player-item .delete-btn:hover {
    background: rgba(239,68,68,0.25);
}

.bm-player-item .approve-btn {
    padding: 3px 8px;
    font-size: 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(34,197,94,0.4);
    background: rgba(34,197,94,0.1);
    color: var(--bm-line);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.bm-player-item .approve-btn:hover {
    background: rgba(34,197,94,0.25);
}

/* ── Check-in page ────────────────────────────────────────────── */
.bm-checkin-goto {
    font-size: 0.7rem;
    color: var(--bm-line) !important;
    text-decoration: none;
    font-weight: 600;
}

/* ── Checkin redesign ─────────────────────────────────────────── */
.bm-ci-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.bm-ci-stat {
    flex: 1;
    background: var(--bm-card);
    border: 1px solid var(--bm-card-border);
    border-radius: var(--bm-radius-sm);
    padding: 10px 6px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bm-ci-stat-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--bm-text);
    line-height: 1;
}
.bm-ci-stat-lbl {
    font-size: 0.58rem;
    color: var(--bm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bm-ci-stat.ci-green .bm-ci-stat-val { color: var(--bm-line); }
.bm-ci-stat.ci-gold  .bm-ci-stat-val { color: var(--bm-gold); }

.bm-ci-item {
    background: var(--bm-card);
    border: 1px solid var(--bm-card-border);
    border-radius: var(--bm-radius-sm);
    margin-bottom: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.bm-ci-item[data-status="1"] { border-color: rgba(34,197,94,0.4); }
.bm-ci-item[data-status="2"] { border-color: rgba(251,146,60,0.35); }
.bm-ci-item[data-status="3"] { border-color: rgba(239,68,68,0.3); }

.bm-ci-top {
    display: flex;
    align-items: center;
    padding: 9px 10px;
    gap: 8px;
    border-bottom: 1px solid var(--bm-line-dim);
}

.bm-ci-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700;
    flex-shrink: 0;
    background: var(--bm-line-dim);
    border: 1px solid var(--bm-line-mid);
    color: var(--bm-line);
    transition: all 0.2s;
}
.bm-ci-num.s1 { background: rgba(34,197,94,0.2);  border-color: rgba(34,197,94,0.45); color: #4ade80; }
.bm-ci-num.s2 { background: rgba(251,146,60,0.15); border-color: rgba(251,146,60,0.4); color: var(--bm-orange); }
.bm-ci-num.s3 { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.35); color: var(--bm-red); }

.bm-ci-name-wrap { flex: 1; min-width: 0; }
.bm-ci-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bm-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bm-ci-plus  { font-size: 0.68rem; color: var(--bm-orange); margin-left: 4px; }
.bm-ci-comment {
    font-size: 0.64rem;
    color: var(--bm-text-muted);
    font-style: italic;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bm-ci-paid-toggle { cursor: pointer; flex-shrink: 0; line-height: 1; }
.bm-ci-paid-toggle input { display: none; }
.bm-ci-paid-icon {
    font-size: 1.25rem;
    opacity: 0.22;
    transition: opacity 0.2s, filter 0.2s;
    display: block;
}
.bm-ci-paid-toggle input:checked ~ .bm-ci-paid-icon {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(251,191,36,0.55));
}

.bm-ci-pills { display: flex; }
.bm-ci-pill {
    flex: 1;
    text-align: center;
    padding: 7px 2px;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--bm-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-right: 1px solid var(--bm-line-dim);
    user-select: none;
    white-space: nowrap;
}
.bm-ci-pill:last-child { border-right: none; }
.bm-ci-pill input { display: none; }
.bm-ci-pill:hover { background: var(--bm-card-hover); }
.bm-ci-pill.s0.active { color: var(--bm-text-muted); background: rgba(148,163,184,0.1); }
.bm-ci-pill.s1.active { background: rgba(34,197,94,0.15);  color: #4ade80; }
.bm-ci-pill.s2.active { background: rgba(251,146,60,0.15); color: var(--bm-orange); }
.bm-ci-pill.s3.active { background: rgba(239,68,68,0.12);  color: var(--bm-red); }

/* light mode overrides */
body.game-page.bm-light .bm-ci-item     { background: #ffffff; }
body.game-page.bm-light .bm-ci-stat     { background: #f8fafc; }
body.game-page.bm-light .bm-ci-name     { color: #1e293b; }
body.game-page.bm-light .bm-ci-pill     { color: #64748b; }
body.game-page.bm-light .bm-ci-pill.s1.active { color: #16a34a; }
body.game-page.bm-light .bm-ci-pill.s2.active { color: #ea580c; }
body.game-page.bm-light .bm-ci-pill.s3.active { color: #dc2626; }

/* ── Ranking page ─────────────────────────────────────────────── */
.bm-ranking-table .no-col {
    text-align: center;
    width: 40px;
    font-weight: 700;
}

.bm-ranking-table .medal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bm-ranking-table .medal-icon img {
    width: 28px;
    height: 28px;
}

.bm-ranking-table td, .bm-ranking-table th {
    padding: 10px 12px !important;
    vertical-align: middle;
}

.bm-ranking-table tbody tr {
    background: var(--bm-card) !important;
    border-bottom: 1px solid var(--bm-line-dim) !important;
    transition: all 0.2s;
}

.bm-ranking-table tbody tr:hover {
    background: var(--bm-card-hover) !important;
    border-color: var(--bm-card-border) !important;
}

.bm-ranking-table thead {
    background: rgba(34,197,94,0.1) !important;
}

.bm-ranking-table thead th {
    color: #c6f6e0 !important;
    font-size: 0.7rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none !important;
}

/* Top 3 highlight */
.bm-ranking-table tbody tr:nth-child(1) td { background: rgba(251,191,36,0.08) !important; }
.bm-ranking-table tbody tr:nth-child(2) td { background: rgba(148,163,184,0.07) !important; }
.bm-ranking-table tbody tr:nth-child(3) td { background: rgba(205,127,50,0.07) !important; }

.bm-ranking-table .player-name { font-weight: 600; color: var(--bm-text); font-size: 0.82rem; }
.bm-ranking-table .game-info { font-size: 0.75rem; color: #c6f6e0; }
.bm-ranking-table .point-val { font-size: 0.9rem; font-weight: 800; color: var(--bm-gold); }

/* ── Event list (all.blade.php) ──────────────────────────────── */
.bm-event-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
}
.bm-event-card-full {
    grid-column: 1 / -1;
}
@media (max-width: 480px) {
    .bm-event-grid { grid-template-columns: 1fr; }
    .bm-event-card-full { grid-column: auto; }
}
.bm-event-card {
    background: var(--bm-card);
    border: 1px solid var(--bm-card-border);
    border-radius: var(--bm-radius);
    overflow: hidden;
    transition: all 0.25s ease;
    position: relative;
}

.bm-event-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--bm-line);
    opacity: 0.6;
}

.bm-event-card:hover {
    border-color: var(--bm-line-mid);
    box-shadow: var(--bm-shadow-glow);
    transform: translateY(-1px);
}

.bm-event-card .card-top {
    padding: 12px 14px 8px 18px;
}

.bm-event-card .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--bm-text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bm-event-card .card-title i { color: var(--bm-line); }

.bm-event-card .card-meta {
    font-size: 0.7rem;
    color: #9dc9b4;
    line-height: 1.6;
}

.bm-event-card .card-meta span {
    color: #d1fae5;
    font-weight: 500;
}

.bm-event-card .card-footer-bm {
    padding: 8px 12px;
    border-top: 1px solid var(--bm-line-dim);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.15);
}

.bm-event-card .attendance-badge {
    background: rgba(34,197,94,0.1);
    border: 1px solid var(--bm-line-mid);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--bm-line);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bm-event-card .action-btns {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ── History card ─────────────────────────────────────────────── */
.bm-history-card {
    background: var(--bm-card);
    border: 1px dashed var(--bm-card-border);
    border-radius: var(--bm-radius);
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.2s;
}

.bm-history-card:hover {
    border-style: solid;
    border-color: var(--bm-line-mid);
}

.bm-history-card .card-top {
    padding: 12px 14px 8px;
}

.bm-history-card .card-footer-bm {
    padding: 8px 12px;
    border-top: 1px solid var(--bm-line-dim);
    display: flex;
    justify-content: flex-end;
    background: rgba(0,0,0,0.15);
}

/* ── Scrollbar style ──────────────────────────────────────────── */
.bm-scroll::-webkit-scrollbar { width: 4px; }
.bm-scroll::-webkit-scrollbar-track { background: transparent; }
.bm-scroll::-webkit-scrollbar-thumb {
    background: var(--bm-line-mid);
    border-radius: 2px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
    .bm-badge { font-size: 0.65rem; padding: 2px 8px; }
    .bm-player-item .player-name { font-size: 0.75rem; }
}

/* ================================================================
   POPUP / DIALOG RESET
   jquery-confirm inherits body color (#f0fdf4 white-ish) into
   its white-background box → text becomes invisible.
   Force dark text for all popup content.
   ================================================================ */

/* Box background & base text */
body.game-page .jconfirm .jconfirm-box {
    color: #1a1a1a !important;
    background: #ffffff !important;
}

/* Title */
body.game-page .jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title {
    color: #1a1a1a !important;
}

/* Body content — the most critical selector */
body.game-page .jconfirm .jconfirm-box div.jconfirm-content,
body.game-page .jconfirm .jconfirm-box div.jconfirm-content p,
body.game-page .jconfirm .jconfirm-box div.jconfirm-content span,
body.game-page .jconfirm .jconfirm-box div.jconfirm-content div,
body.game-page .jconfirm .jconfirm-box div.jconfirm-content b,
body.game-page .jconfirm .jconfirm-box div.jconfirm-content strong,
body.game-page .jconfirm .jconfirm-box div.jconfirm-content label {
    color: #222222 !important;
}

/* Form elements inside popup */
body.game-page .jconfirm .jconfirm-box input[type="text"],
body.game-page .jconfirm .jconfirm-box input[type="number"],
body.game-page .jconfirm .jconfirm-box input[type="password"],
body.game-page .jconfirm .jconfirm-box input[type="email"],
body.game-page .jconfirm .jconfirm-box select,
body.game-page .jconfirm .jconfirm-box textarea {
    color: #222222 !important;
    background: #f8f9fa !important;
    border: 1px solid #ced4da !important;
}

body.game-page .jconfirm .jconfirm-box input::placeholder,
body.game-page .jconfirm .jconfirm-box textarea::placeholder {
    color: #6c757d !important;
}

/* Status icon buttons (fa-check-circle-o, fa-times-circle) */
body.game-page .jconfirm .jconfirm-box .i-outline-secondary {
    color: #555555 !important;
}

body.game-page .jconfirm .jconfirm-box .i-outline-secondary.active,
body.game-page .jconfirm .jconfirm-box .i-outline-secondary:hover {
    color: #e67e22 !important;
}

/* Keep type-specific icon colors (orange warning, etc.) */
body.game-page .jconfirm .jconfirm-box.jconfirm-type-orange .jconfirm-title-c .jconfirm-icon-c {
    color: #e67e22 !important;
}
body.game-page .jconfirm .jconfirm-box.jconfirm-type-red .jconfirm-title-c .jconfirm-icon-c {
    color: #e74c3c !important;
}
body.game-page .jconfirm .jconfirm-box.jconfirm-type-green .jconfirm-title-c .jconfirm-icon-c {
    color: #2ecc71 !important;
}

/* Button bar border */
body.game-page .jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-buttons {
    border-top: 1px solid #dee2e6 !important;
}

/* Close icon */
body.game-page .jconfirm .jconfirm-box div.jconfirm-closeIcon {
    color: #555555 !important;
}

/* ================================================================
   LIGHT MODE — body.game-page.bm-light
   ================================================================ */

body.game-page.bm-light {
    --bm-card-pad-x: 22px;
    --bm-card-pad-y: 18px;
    --bm-bg:          #f0f4f8;
    --bm-court:       #ffffff;
    --bm-court2:      #f8fafb;
    --bm-line:        #16a34a;
    --bm-line-dim:    rgba(22, 163, 74, 0.08);
    --bm-line-mid:    rgba(22, 163, 74, 0.28);
    --bm-gold:        #b45309;
    --bm-gold-dim:    rgba(180, 83, 9, 0.1);
    --bm-silver:      #64748b;
    --bm-bronze:      #92400e;
    --bm-orange:      #ea580c;
    --bm-red:         #dc2626;
    --bm-blue:        #0284c7;
    --bm-teal:        #0d9488;
    --bm-text:        #1e293b;
    --bm-text-2:      #334155;
    --bm-text-muted:  #64748b;
    --bm-card:        rgba(255, 255, 255, 0.98);
    --bm-card-hover:  rgba(240, 249, 244, 0.98);
    --bm-card-border: rgba(22, 163, 74, 0.22);
    --bm-nav:         rgba(255, 255, 255, 0.97);
    --bm-shadow:      0 4px 24px rgba(0, 0, 0, 0.08);
    --bm-shadow-glow: 0 0 20px rgba(22, 163, 74, 0.12);
    color: var(--bm-text);
    background-color: var(--bm-bg) !important;
}

/* Remove dark scrim overlay in light mode */
body.game-page.bm-light::before {
    background: rgba(240, 244, 248, 0.82) !important;
}

/* Nav */
body.game-page.bm-light .bm-nav {
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    border-top-color: rgba(22,163,74,0.15);
}
body.game-page.bm-light .bm-nav-btn { color: #64748b; }
body.game-page.bm-light .bm-nav-btn:hover,
body.game-page.bm-light .bm-nav-btn.active { color: var(--bm-line) !important; }
body.game-page.bm-light .bm-nav img { filter: brightness(0.4) saturate(0.5); }
body.game-page.bm-light .bm-nav-btn:hover img,
body.game-page.bm-light .bm-nav-btn.active img { filter: brightness(0.6) saturate(1.2) drop-shadow(0 0 4px var(--bm-line)); }
body.game-page.bm-light .bm-nav-center { color: #334155 !important; border-color: rgba(22,163,74,0.15); }

/* Event header */
body.game-page.bm-light .bm-event-header {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-color: rgba(22,163,74,0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
body.game-page.bm-light .bm-event-header .team-name { color: #92400e; text-shadow: none; }
body.game-page.bm-light .bm-event-header .event-title { color: #1e293b; }
body.game-page.bm-light .bm-event-header .event-meta { color: #334155; }
body.game-page.bm-light .bm-event-header .event-meta span { color: #334155; }
body.game-page.bm-light .bm-event-header .event-meta .event-links-inline a { color: #15803d !important; border-color: rgba(22,163,74,0.4); }
body.game-page.bm-light .bm-brand-mark { background: rgba(180,83,9,0.1); box-shadow: inset 0 0 0 1px rgba(180,83,9,0.25); }

/* Event cards */
body.game-page.bm-light .bm-event-card { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
body.game-page.bm-light .bm-event-card .card-meta { color: #4b7a5e; }
body.game-page.bm-light .bm-event-card .card-meta span { color: #1e3a2f; }
body.game-page.bm-light .bm-event-card .card-footer-bm { background: rgba(0,0,0,0.02); }
body.game-page.bm-light .bm-event-card .card-title { color: var(--bm-text); }

/* Buttons in light mode */
body.game-page.bm-light .bm-btn-green { color: #15803d; border-color: #16a34a; background: rgba(22,163,74,0.08); }
body.game-page.bm-light .bm-btn-orange { color: #c2410c; border-color: #ea580c; background: rgba(234,88,12,0.08); }

/* Round header */
body.game-page.bm-light .bm-round-header {
    background: rgba(255,255,255,0.95);
    border-color: rgba(180,83,9,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body.game-page.bm-light .bm-round-header .round-title { color: #92400e; }
body.game-page.bm-light .bm-round-icon { background: rgba(180,83,9,0.1); box-shadow: inset 0 0 0 1px rgba(180,83,9,0.22); }

/* Tabs */
body.game-page.bm-light .bm-tab {
    background: #f1f5f9;
    color: #334155;
    border-color: rgba(22,163,74,0.25);
}
body.game-page.bm-light .bm-tab:hover { background: #e2e8f0; color: #1e293b !important; }
body.game-page.bm-light .bm-tab.active { background: var(--bm-line); color: #fff !important; border-color: var(--bm-line); }

/* Free/Mix + Courts pill */
body.game-page.bm-light .bm-random-methods {
    background: rgba(255,255,255,0.82) !important;
    border-color: rgba(148,163,184,0.34) !important;
}
body.game-page.bm-light .bm-random-methods label { color: #334155 !important; }
body.game-page.bm-light .bm-random-methods input:checked + span { color: #15803d !important; }
body.game-page.bm-light .bm-random-methods input:disabled + span { color: rgba(100,116,139,0.5); }
body.game-page.bm-light .bm-court-wrap {
    background: #f1f5f9 !important;
    border-color: rgba(22,163,74,0.3) !important;
    color: #334155 !important;
}

/* Empty state */
body.game-page.bm-light .bm-empty { background: #ffffff; color: #334155; border-color: rgba(22,163,74,0.2); }
body.game-page.bm-light .bm-empty strong { color: #166534; }
body.game-page.bm-light .bm-empty-shuttle { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* Stat table */
body.game-page.bm-light .bm-stat-table th,
body.game-page.bm-light .bm-stat-table td { color: var(--bm-text); border-bottom-color: rgba(22,163,74,0.1); }
body.game-page.bm-light .bm-stat-table thead th { background: rgba(22,163,74,0.08); color: #166534; }
body.game-page.bm-light .bm-stat-table tbody tr:hover td { background: rgba(22,163,74,0.04); }
body.game-page.bm-light .bm-stat-table .stat-num { color: #166534; }

/* Ranking */
body.game-page.bm-light .bm-ranking-table tbody tr { background: #ffffff !important; border-bottom-color: rgba(22,163,74,0.1) !important; }
body.game-page.bm-light .bm-ranking-table tbody tr:hover { background: #f0fdf4 !important; }
body.game-page.bm-light .bm-ranking-table thead { background: rgba(22,163,74,0.08) !important; }
body.game-page.bm-light .bm-ranking-table thead th { color: #166534 !important; }
body.game-page.bm-light .bm-ranking-table .player-name { color: var(--bm-text); }
body.game-page.bm-light .bm-ranking-table tbody tr:nth-child(1) td { background: rgba(180,83,9,0.06) !important; }
body.game-page.bm-light .bm-ranking-table tbody tr:nth-child(2) td { background: rgba(100,116,139,0.06) !important; }
body.game-page.bm-light .bm-ranking-table tbody tr:nth-child(3) td { background: rgba(146,64,14,0.05) !important; }

/* Court card */
body.game-page.bm-light .bm-court-card { background: #ffffff; border-color: rgba(22,163,74,0.25); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
body.game-page.bm-light .bm-court-card .court-net .vs-badge { background: #f0fdf4; color: #15803d; }
body.game-page.bm-light .bm-court-number { background: #f0fdf4; color: #166534; }
body.game-page.bm-light .bm-team:hover:not(.won):not(.lost) { background: rgba(22,163,74,0.04); }
body.game-page.bm-light .bm-player-badges .badge,
body.game-page.bm-light .bm-player-badges .badge-info { background: rgba(22,163,74,0.1) !important; color: #166534 !important; border-color: rgba(22,163,74,0.3) !important; }

/* Player list */
body.game-page.bm-light .bm-player-item { background: #ffffff; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
body.game-page.bm-light .bm-player-item .player-name { color: var(--bm-text); }
body.game-page.bm-light .bm-player-item:hover { background: #f8fffe; }

/* Checkin */
body.game-page.bm-light .bm-attend-header { background: linear-gradient(135deg, rgba(22,163,74,0.08) 0%, rgba(22,163,74,0.03) 100%); border-color: rgba(22,163,74,0.35); }
body.game-page.bm-light .bm-attend-header .event-meta { color: #1e293b; }

/* Waiting list */
body.game-page.bm-light .bm-waiting-list { background: #ffffff; }

/* ================================================================
   POCKET ARENA — Unified public game shell
   ================================================================ */
body.game-page.bm-light {
    --bm-bg: #eaf6fd;
    --bm-court: #f4fbff;
    --bm-court2: #e8f6ff;
    --bm-line: #19c6dc;
    --bm-line-dim: rgba(25,198,220,.14);
    --bm-line-mid: rgba(25,198,220,.34);
    --bm-gold: #ffb62f;
    --bm-orange: #ff7b55;
    --bm-blue: #4387ed;
    --bm-teal: #19c6dc;
    --bm-text: #24415c;
    --bm-text-2: #52708b;
    --bm-text-muted: #7c91a5;
    --bm-card: rgba(255,255,255,.94);
    --bm-card-hover: #ffffff;
    --bm-card-border: rgba(67,135,237,.12);
    --bm-nav: rgba(247,252,255,.94);
    --bm-shadow: 0 14px 34px rgba(55,105,145,.14), 0 2px 8px rgba(55,105,145,.08);
    --bm-shadow-glow: 0 12px 28px rgba(25,198,220,.16);
    --bm-radius: 24px;
    --bm-radius-sm: 15px;
    background:
        radial-gradient(circle at 8% 0, rgba(25,198,220,.20), transparent 31rem),
        radial-gradient(circle at 94% 8%, rgba(129,117,237,.16), transparent 28rem),
        linear-gradient(155deg, #f8fdff 0%, #eaf6fd 52%, #deedf9 100%) !important;
    background-attachment: fixed !important;
}
body.game-page.bm-light::before {
    opacity: .32;
    background:
        linear-gradient(rgba(255,255,255,.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px) !important;
    background-size: 44px 44px !important;
}
.bm-app-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 990; height: 78px;
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 0 max(22px, calc((100vw - 1240px) / 2));
    border-bottom: 1px solid rgba(255,255,255,.9);
    background: rgba(239,249,255,.88);
    box-shadow: 0 8px 28px rgba(55,105,145,.09);
    backdrop-filter: blur(18px);
}
.bm-app-brand { display: flex; align-items: center; gap: 12px; color: var(--bm-text) !important; text-decoration: none !important; }
.bm-app-logo {
    width: 48px; height: 48px; display: grid; place-items: center; border-radius: 17px;
    color: #fff; font-size: 24px; background: linear-gradient(145deg, #19c6dc, #4387ed);
    box-shadow: 0 8px 20px rgba(25,198,220,.3), inset 0 1px 0 rgba(255,255,255,.6);
}
.bm-app-brand-copy strong, .bm-app-brand-copy small { display: block; }
.bm-app-brand-copy strong { font-size: 14px; letter-spacing: .08em; }
.bm-app-brand-copy small { max-width: 50vw; margin-top: 2px; overflow: hidden; color: var(--bm-text-muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.bm-app-status { display: flex; align-items: center; gap: 14px; }
.bm-header-profile {
    min-width: 158px; display: flex; align-items: center; gap: 9px; padding: 6px 9px;
    border: 0; border-radius: 18px; color: var(--bm-text); background: rgba(255,255,255,.82);
    box-shadow: 0 6px 18px rgba(55,105,145,.1); text-align: left; cursor: pointer;
}
.bm-header-avatar {
    width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center;
    border: 3px solid #fff; border-radius: 50%; color: #fff; font-size: 16px; font-weight: 900;
    background: linear-gradient(145deg, #8175ed, #19c6dc); box-shadow: 0 4px 12px rgba(67,135,237,.24);
}
.bm-header-player { flex: 1; min-width: 0; }
.bm-header-player strong, .bm-header-player small { display: block; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-header-player strong { font-size: 12px; }
.bm-header-player small { color: var(--bm-text-muted); font-size: 9px; }
body.game-page #wrapper { padding-top: 78px; }
body.game-page #main-page { width: 100%; max-width: 1240px; padding: 20px 22px 100px !important; }
.bm-scroll { max-height: none !important; overflow: visible !important; padding: 0 !important; }

body.game-page.bm-light .bm-event-header {
    overflow: hidden; margin: 0 0 18px; padding: 24px !important; border: 1px solid rgba(255,255,255,.94);
    border-radius: 26px; background:
        radial-gradient(circle at 100% 0, rgba(129,117,237,.18), transparent 38%),
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(235,249,255,.94)) !important;
    box-shadow: var(--bm-shadow);
}
body.game-page.bm-light .bm-event-header > div:first-child,
body.game-page.bm-light .bm-event-header .team-name,
body.game-page.bm-light .bm-event-header .event-title {
    color: var(--bm-text) !important; text-shadow: none !important;
}
.bm-event-grid { gap: 18px !important; margin-bottom: 18px !important; }
body.game-page.bm-light .bm-event-card,
body.game-page.bm-light .bm-history-card {
    overflow: hidden; border: 1px solid rgba(255,255,255,.95) !important; border-radius: 24px !important;
    background: var(--bm-card) !important; box-shadow: var(--bm-shadow) !important;
}
.bm-event-card::before { height: 5px !important; background: linear-gradient(90deg, #19c6dc, #4387ed, #8175ed) !important; }
.bm-event-card .card-top { padding: var(--bm-card-pad-y, 18px) var(--bm-card-pad-x, 22px) 16px !important; }
.bm-event-card .card-title { color: var(--bm-text) !important; font-size: 1.04rem !important; }
.bm-event-card .card-meta { color: var(--bm-text-muted) !important; line-height: 1.8 !important; }
.bm-event-card .card-meta span { color: var(--bm-text-2) !important; }
.bm-event-card .card-footer-bm { padding: 14px var(--bm-card-pad-x, 22px) !important; background: rgba(235,247,255,.72) !important; }
.bm-history-card .card-top {
    padding: var(--bm-card-pad-y, 18px) var(--bm-card-pad-x, 22px) 14px !important;
}
.bm-history-card .card-title {
    margin: 0 0 8px !important; color: var(--bm-text) !important; font-size: .9rem !important; line-height: 1.35;
}
.bm-history-card .card-meta {
    margin: 0; color: var(--bm-text-2) !important; font-size: .76rem; line-height: 1.55;
}
.bm-history-card .card-footer-bm {
    min-height: 68px; padding: 12px var(--bm-card-pad-x, 22px) !important;
    align-items: center; background: rgba(235,247,255,.72) !important;
}
.bm-btn {
    min-height: 40px; padding: 9px 14px !important; border-radius: 14px !important;
    font-weight: 800 !important; box-shadow: none !important;
}
body.game-page.bm-light .bm-btn-green {
    border-color: transparent !important; color: #fff !important;
    background: linear-gradient(135deg, #19c6dc, #4387ed) !important;
}
body.game-page.bm-light .bm-btn-orange {
    border-color: transparent !important; color: #fff !important;
    background: linear-gradient(135deg, #ffb62f, #ff7657) !important;
}
.bm-nav {
    left: 50% !important; right: auto !important; bottom: 14px !important;
    width: min(660px, calc(100% - 32px)) !important; height: 70px !important; padding: 7px !important;
    transform: translateX(-50%); overflow: hidden; border: 1px solid rgba(255,255,255,.92) !important;
    border-radius: 24px !important; background: var(--bm-nav) !important;
    box-shadow: 0 14px 38px rgba(55,105,145,.23) !important; backdrop-filter: blur(18px);
}
.bm-nav-btn { gap: 4px !important; border-radius: 17px; color: var(--bm-text-muted) !important; font-size: 10px !important; font-weight: 800; }
.bm-nav-btn i { font-size: 19px !important; }
.bm-nav-btn:hover, .bm-nav-btn.active {
    color: var(--bm-blue) !important; background: #fff !important; box-shadow: 0 6px 18px rgba(55,105,145,.12);
}
.bm-nav-center { border: 0 !important; }
body.game-page .back-to-top {
    right: max(22px, calc((100vw - 1240px) / 2)) !important;
    bottom: 98px !important;
    width: 44px !important; height: 44px !important;
    z-index: 1020 !important;
    border: 1px solid rgba(67,135,237,.22);
    border-radius: 15px !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 8px 22px rgba(55,105,145,.2) !important;
}
body.game-page .back-to-top i {
    width: 44px !important; height: 44px !important;
    border-radius: 15px !important;
    color: var(--bm-blue) !important;
    background: transparent !important;
}
.bm-register-fab {
    position: fixed; left: 50%; right: auto; bottom: 100px; z-index: 980;
    min-width: 176px; min-height: 60px; display: flex; align-items: center; gap: 11px; padding: 8px 18px 8px 9px;
    border: 3px solid rgba(255,255,255,.94); border-radius: 22px; color: #fff;
    background: linear-gradient(135deg, #19c6dc 0%, #4387ed 72%, #8175ed 100%);
    box-shadow: 0 14px 32px rgba(67,135,237,.34), 0 3px 10px rgba(55,105,145,.18);
    transform: translateX(-50%); text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease;
}
.bm-attendance-page .back-to-top {
    right: max(22px, calc((100vw - 1240px) / 2)) !important;
    bottom: 176px !important;
    z-index: 970 !important;
}
.bm-attendance-page .bm-scroll { padding-bottom: 190px !important; }
.bm-register-fab:hover, .bm-register-fab:focus {
    transform: translateX(-50%) translateY(-3px); outline: none;
    box-shadow: 0 18px 38px rgba(67,135,237,.4), 0 4px 12px rgba(55,105,145,.2);
}
.bm-register-fab:active { transform: translateX(-50%) scale(.98); }
.bm-register-fab-icon {
    width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center;
    border-radius: 15px; color: var(--bm-blue); background: #fff; font-size: 17px;
    box-shadow: inset 0 0 0 1px rgba(67,135,237,.08);
}
.bm-register-fab strong, .bm-register-fab small { display: block; }
.bm-register-fab strong { font-size: 15px; line-height: 1.2; }
.bm-register-fab small { margin-top: 2px; color: rgba(255,255,255,.82); font-size: 9px; font-weight: 700; }

body.game-page.bm-light .bm-court-card,
body.game-page.bm-light .bm-player-item,
body.game-page.bm-light .bm-waiting-list,
body.game-page.bm-light .bm-attend-header,
body.game-page.bm-light .bm-court-wrap {
    border-color: rgba(255,255,255,.95) !important;
    border-radius: 22px !important;
    background: rgba(255,255,255,.94) !important;
    box-shadow: var(--bm-shadow) !important;
}
body.game-page.bm-light .jconfirm .jconfirm-box {
    border: 1px solid rgba(255,255,255,.95) !important; border-radius: 26px !important;
    background: #f6fbff !important; box-shadow: 0 24px 70px rgba(55,105,145,.3) !important;
}

/* Dark theme contrast */
body.game-page:not(.bm-light) .bm-app-header {
    border-bottom-color: rgba(34,197,94,.22);
    background: rgba(5,18,12,.94);
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
body.game-page:not(.bm-light) .bm-app-brand,
body.game-page:not(.bm-light) .bm-app-brand-copy strong {
    color: #f0fdf4 !important;
}
body.game-page:not(.bm-light) .bm-app-brand-copy small { color: #a7c7b4 !important; }
body.game-page:not(.bm-light) .bm-header-profile {
    color: #f0fdf4; background: rgba(15,45,28,.9);
    box-shadow: inset 0 0 0 1px rgba(34,197,94,.2), 0 6px 18px rgba(0,0,0,.28);
}
body.game-page:not(.bm-light) .bm-header-player strong { color: #f0fdf4; }
body.game-page:not(.bm-light) .bm-header-player small { color: #9bc2aa; }
body.game-page:not(.bm-light) .bm-event-card .card-title { color: #f0fdf4 !important; }
body.game-page:not(.bm-light) .bm-event-card .card-meta { color: #9bc2aa !important; }
body.game-page:not(.bm-light) .bm-event-card .card-meta span { color: #d1fae5 !important; }
body.game-page:not(.bm-light) .bm-event-card .card-footer-bm,
body.game-page:not(.bm-light) .bm-history-card .card-footer-bm {
    border-top-color: rgba(34,197,94,.18) !important;
    background: rgba(11,35,22,.96) !important;
}
body.game-page:not(.bm-light) .bm-history-card .card-title { color: #f0fdf4 !important; }
body.game-page:not(.bm-light) .bm-history-card .card-meta { color: #a7c7b4 !important; }
body.game-page:not(.bm-light) .bm-nav {
    border-color: rgba(34,197,94,.22) !important;
    box-shadow: 0 14px 38px rgba(0,0,0,.58) !important;
}
body.game-page:not(.bm-light) .bm-nav-btn { color: #9bc2aa !important; }
body.game-page:not(.bm-light) .bm-nav-btn:hover,
body.game-page:not(.bm-light) .bm-nav-btn.active {
    color: #6ee7a0 !important;
    background: rgba(22,70,42,.82) !important;
    box-shadow: inset 0 0 0 1px rgba(34,197,94,.22);
}
body.game-page:not(.bm-light) .bm-attend-admin-actions {
    border-top-color: rgba(34,197,94,.2);
    background: rgba(11,35,22,.96);
    box-shadow: inset 0 -1px 0 rgba(34,197,94,.3);
}
body.game-page:not(.bm-light) .bm-attend-checkin {
    color: #6ee7a0 !important;
    border-color: rgba(34,197,94,.32);
    background: rgba(22,70,42,.7);
}
body.game-page:not(.bm-light) #bm-settings-menu {
    border-color: rgba(34,197,94,.24);
    background: rgba(5,18,12,.98);
}

@media (max-width: 767px) {
    body.game-page.bm-light { --bm-card-pad-x: 16px; --bm-card-pad-y: 16px; }
    .bm-app-header { height: 66px; padding: 0 14px; }
    .bm-app-logo { width: 42px; height: 42px; border-radius: 14px; }
    .bm-app-brand-copy strong { font-size: 12px; }
    .bm-app-brand-copy small { font-size: 9px; }
    .bm-header-player, .bm-header-profile > i { display: none; }
    .bm-header-profile { min-width: 0; padding: 2px; background: transparent; box-shadow: none; }
    body.game-page #wrapper { padding-top: 66px; }
    body.game-page #main-page { padding: 12px 12px 82px !important; }
    body.game-page.bm-light .bm-event-header { margin-bottom: 12px; padding: 18px 14px !important; border-radius: 20px; }
    .bm-event-grid { gap: 12px !important; margin-bottom: 12px !important; }
    body.game-page.bm-light .bm-event-card, body.game-page.bm-light .bm-history-card { border-radius: 19px !important; }
    .bm-event-card .card-top { padding: var(--bm-card-pad-y) var(--bm-card-pad-x) 12px !important; }
    .bm-event-card .card-footer-bm { padding: 12px var(--bm-card-pad-x) !important; }
    .bm-history-card .card-top { padding: var(--bm-card-pad-y) var(--bm-card-pad-x) 12px !important; }
    .bm-history-card .card-footer-bm { min-height: 60px; padding: 10px var(--bm-card-pad-x) !important; }
    .bm-nav { bottom: 0 !important; width: 100% !important; height: 70px !important; padding: 5px 6px max(5px, env(safe-area-inset-bottom)) !important; border-width: 1px 0 0 !important; border-radius: 21px 21px 0 0 !important; }
    .bm-nav-btn { font-size: 9px !important; }
    .bm-nav-btn i { font-size: 18px !important; }
    body.game-page .back-to-top {
        right: 12px !important;
        bottom: calc(82px + env(safe-area-inset-bottom)) !important;
        width: 42px !important; height: 42px !important;
    }
    body.game-page .back-to-top i { width: 42px !important; height: 42px !important; }
    .bm-register-fab {
        left: 50%; right: auto; bottom: calc(82px + env(safe-area-inset-bottom));
        width: min(230px, calc(100% - 112px)); min-width: 0; min-height: 58px;
        justify-content: center; padding: 7px 18px 7px 9px; border-radius: 20px;
        transform: translateX(-50%);
    }
    .bm-register-fab:hover, .bm-register-fab:focus { transform: translateX(-50%) translateY(-3px); }
    .bm-register-fab:active { transform: translateX(-50%) scale(.98); }
    .bm-register-fab-icon { width: 38px; height: 38px; border-radius: 13px; }
    .bm-attendance-page .back-to-top {
        right: 12px !important; bottom: calc(86px + env(safe-area-inset-bottom)) !important;
        width: 42px !important; height: 42px !important; border-radius: 15px !important;
        color: var(--bm-blue) !important; background: rgba(255,255,255,.96) !important;
        box-shadow: 0 8px 22px rgba(55,105,145,.2) !important;
    }
    .bm-attendance-page .back-to-top i {
        width: 42px !important; height: 42px !important; border-radius: 15px !important;
        color: var(--bm-blue) !important; background: transparent !important;
    }
    .bm-attendance-page .bm-scroll { padding-bottom: 168px !important; }
    .bm-attend-header { padding: 14px !important; }
    .bm-attend-card-main { gap: 11px; }
    .bm-attend-event-icon { width: 44px; height: 44px; border-radius: 15px; font-size: 22px; }
    .bm-attend-event-copy h1 { margin-bottom: 8px; font-size: 1rem; }
    .bm-attend-event-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
    .bm-attend-event-grid span { font-size: .66rem; }
    .bm-attend-event-grid span:nth-child(3) { grid-column: 1 / -1; }
    .bm-attend-admin-actions {
        margin: 13px -14px -14px; padding: 11px 14px;
        border-radius: 0 0 20px 20px;
    }
    .bm-admin-label { display: none; }
    .bm-attend-admin-actions > div { width: 100%; }
    .bm-attend-action { flex: 1; justify-content: center; min-height: 42px; }
}

/* Theme toggle button */
.bm-theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.75;
    transition: opacity 0.2s, transform 0.3s;
}
.bm-theme-toggle:hover { opacity: 1; transform: rotate(20deg); }

/* Sport icon — class tên = giá trị DB (event_subtype hoặc event_type) */
.sport-icon::before { font-size: 1.5rem; line-height: 1; }
.sport-icon--badminton::before { content: '🏸'; }
.sport-icon--camping::before   { content: '🧭'; }
.sport-icon--travel::before    { content: '🧭'; }
.sport-icon--sport::before     { content: '🏆'; }
.sport-icon--default::before   { content: '🏆'; }
