:root {
    --bg-main: #efe3cf;
    --bg-soft: #f7f0e5;
    --wood-deep: #5a3424;
    --wood-dark: #6e4430;
    --wood: #8a5a3b;
    --wood-light: #ad7954;
    --board-red: #a84f3f;
    --board-red-light: #c96d59;
    --olive: #7d8452;
    --olive-light: #a3aa73;
    --ivory: #fff8ea;
    --ivory-soft: #eadcc3;
    --brass: #b98945;
    --brass-light: #d7ad6b;
    --text-main: #3c291f;
    --text-muted: #7e6858;
    --line: rgba(92, 57, 38, 0.20);
    --header-height: 78px;
}


/* -------------------------------------------------------
   PAGE
------------------------------------------------------- */

html,
body {
    min-height: 100%;
}


body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    color: var(--text-main);
    background: radial-gradient( circle at top, rgba(173, 121, 84, 0.18), transparent 42% ), linear-gradient( 180deg, #fbf7ef 0%, #fbf7ef 100% );
}


/* =========================================================
   MASTER HEADER + LEFT DRAWER
   Replace your current HEADER / NAV / BRAND / MOBILE MENU /
   responsive navigation CSS with this block.
   ========================================================= */

:root {
    --master-drawer-width: 320px;
}


/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.master-header {
    position: sticky;
    top: 0;
    z-index: 1080;
    height: var(--header-height);
    background: linear-gradient( 90deg, #6c402b, #9a6746, #6c402b );
    border-bottom: 1px solid rgba(90, 52, 36, 0.35);
    box-shadow: 0 6px 20px rgba(73, 45, 31, 0.18), inset 0 -1px rgba(255, 255, 255, 0.15);
}


    .master-header::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: 0.12;
        background-image: repeating-linear-gradient( 6deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 1px, transparent 1px, transparent 8px );
    }


.master-header-container {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-left: 28px;
    padding-right: 28px;
}


/* ---------------------------------------------------------
   LEFT SIDE
   --------------------------------------------------------- */

.master-header-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}


/* ---------------------------------------------------------
   BRAND
   --------------------------------------------------------- */

.master-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ivory);
    text-decoration: none;
}


    .master-brand:hover {
        color: var(--ivory);
    }


.master-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: fill;
    object-position: center;
    border-radius: 50%;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(63, 39, 26, 0.28), 0 0 0 2px rgba(255, 248, 234, 0.28);
    background-color: #fff7eb;
}


.master-brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.master-brand-title {
    color: var(--ivory);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.45px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(59, 35, 23, 0.42);
}


.master-brand-tagline {
    margin-top: 4px;
    color: #f1d7a7;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.68px;
    white-space: nowrap;
    margin-left: 0.5rem;
}


.master-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------------------------------------------------------
   PAGE BACKDROP
   --------------------------------------------------------- */

.master-menu-backdrop {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    z-index: 1060;
    visibility: hidden;
    opacity: 0;
    background: rgba(42, 29, 21, 0.46);
    backdrop-filter: blur(1.5px);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}


body.master-menu-open .master-menu-backdrop {
    visibility: visible;
    opacity: 1;
}


/* ---------------------------------------------------------
   LEFT DRAWER
   --------------------------------------------------------- */

.master-side-menu {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 1070;
    width: min(var(--master-drawer-width), 88vw);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: linear-gradient(180deg, #fffaf1 0%, #f3e8d8 100%);
    border-right: 1px solid rgba(90, 52, 36, 0.24);
    box-shadow: 14px 0 34px rgba(55, 34, 23, 0.25);
    transform: translateX(-105%);
    transition: transform 0.24s ease;
}


body.master-menu-open .master-side-menu {
    transform: translateX(0);
}


/* ---------------------------------------------------------
   DRAWER - REFINED TYPOGRAPHY AND QUIET ICONS
   --------------------------------------------------------- */

.master-side-menu-head {
    padding: 29px 27px 19px;
    border-bottom: 1px solid rgba(90, 52, 36, 0.12);
    background: transparent;
}

.master-side-menu-eyebrow {
    color: #92664c;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.3px;
}

.master-side-menu-title {
    margin-top: 8px;
    color: #4a3025;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.45px;
}

.master-side-menu-title-dot {
    color: #bd7850;
}

.master-side-menu-nav {
    flex: 1;
    padding: 17px 16px;
}

.master-side-menu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 53px;
    margin: 3px 0;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #4b3429;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04px;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

    .master-side-menu-link:hover,
    .master-side-menu-link:focus-visible {
        background: rgba(161, 110, 73, .11);
        border-color: rgba(132, 84, 52, .11);
        color: #693f2b;
        outline: none;
    }

.master-side-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 19px;
    width: 19px;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #a27658;
    font-size: 15px;
}

.master-side-menu-link:hover .master-side-menu-icon {
    color: #895238;
    border: 0;
}

.master-side-menu-arrow {
    margin-left: auto;
    color: #b9a38e;
    font-size: 10px;
    opacity: 0;
    transition: opacity .18s ease;
}

.master-side-menu-link:hover .master-side-menu-arrow,
.master-side-menu-link:focus-visible .master-side-menu-arrow {
    opacity: 1;
}

/* ---------------------------------------------------------
   BODY STATE
   --------------------------------------------------------- */

body.master-menu-open {
    overflow: hidden;
}


/* -------------------------------------------------------
   COMMON PANEL
------------------------------------------------------- */

.bg-panel {
    background: linear-gradient( 145deg, rgba(255, 248, 234, 0.96), rgba(234, 220, 195, 0.90) );
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(89, 57, 38, 0.12), inset 0 1px rgba(255, 255, 255, 0.70);
}

/* -------------------------------------------------------
   TEXT HELPERS
------------------------------------------------------- */

.text-wood {
    color: var(--wood-dark);
}


.text-muted-earth {
    color: var(--text-muted);
}


.text-olive {
    color: var(--olive);
}


.text-brass {
    color: var(--brass);
}


/* -------------------------------------------------------
   CARDS
------------------------------------------------------- */

.bg-card {
    background: var(--ivory);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(91, 60, 39, 0.10);
}


.bg-card-title {
    margin: 0 0 8px 0;
    color: var(--wood-deep);
    font-weight: 700;
}


.bg-card-text {
    margin: 0;
    color: var(--text-muted);
}


/* -------------------------------------------------------
   DIVIDERS
------------------------------------------------------- */

.bg-divider {
    border: 0;
    height: 1px;
    background: linear-gradient( 90deg, transparent, rgba(90, 52, 36, 0.28), transparent );
}


/* ---------------------------------------------------------
   PAGE SHELL
   --------------------------------------------------------- */

.page-shell {
    min-height: calc(100vh - var(--header-height));
}


.page-main {
    min-height: calc(100vh - var(--header-height));
}


/* ---------------------------------------------------------
   TABLET
   --------------------------------------------------------- */

@media (max-width: 992px) {

    .master-header-container {
        padding-left: 18px;
        padding-right: 18px;
    }
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 768px) {

    :root {
        --header-height: 64px;
        --master-drawer-width: 300px;
    }


    .master-header-container {
        gap: 10px;
        padding-left: 12px;
        padding-right: 12px;
    }


    .master-header-left {
        min-width: 0;
        gap: 10px;
    }


    .master-brand {
        min-width: 0;
        gap: 8px;
    }


    .master-brand-logo {
        width: 40px;
        height: 40px;
    }


    .master-brand-tagline {
        display: block;
        margin-top: 4px;
        font-size: 12px;
        line-height: 1.2;
        letter-spacing: 0.2px;
        white-space: nowrap;
        color: #f1d7a7;
    }

    .master-header-actions {
        gap: 6px;
    }


    .master-side-menu-head {
        padding: 24px 20px 17px;
    }


    .master-side-menu-nav {
        padding: 10px;
    }


    .master-side-menu-link {
        min-height: 50px;
        padding: 8px 10px;
    }
}


/* ---------------------------------------------------------
   SMALL MOBILE
   --------------------------------------------------------- */

@media (max-width: 430px) {

    .master-brand-title {
        max-width: 115px;
        font-size: 13px;
    }


    .master-header-left {
        gap: 7px;
    }


    .master-header-actions {
        gap: 4px;
    }
}


/* ---------------------------------------------------------
   VERY SMALL MOBILE
   --------------------------------------------------------- */

@media (max-width: 370px) {

    .master-brand-text {
        display: none;
    }
}
/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    margin-top: 60px;
    background: linear-gradient(90deg, #6c402b, #8a5a3b, #6c402b);
    border-top: 1px solid rgba(90, 52, 36, 0.28);
    color: var(--ivory);
    box-shadow: 0 -6px 20px rgba(73, 45, 31, 0.10);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 26px 0 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 44px;
    height: 44px;
    object-fit: fill;
    object-position: center;
    border-radius: 50%;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(63, 39, 26, 0.28), 0 0 0 2px rgba(255, 248, 234, 0.28);
    background-color: #fff7eb;
}

.footer-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.footer-tagline {
    margin-top: 3px;
    font-size: 10px;
    letter-spacing: 0.6px;
    color: #f1d7a7;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    column-gap: 18px;
    row-gap: 10px;
}

    .footer-links a {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        white-space: nowrap;
        color: var(--ivory-soft);
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        transition: color 0.2s ease, transform 0.2s ease;
    }

        .footer-links a:hover {
            color: #fffdf6;
            transform: translateY(-1px);
        }

        .footer-links a::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -5px;
            width: 100%;
            height: 1px;
            background: var(--brass-light);
            transform: scaleX(0);
            transform-origin: center;
            transition: transform 0.2s ease;
        }

        .footer-links a:hover::after {
            transform: scaleX(1);
        }

        .footer-links a i {
            font-size: 12px;
            color: var(--brass-light);
            flex: 0 0 auto;
        }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 16px;
    border-top: 1px solid rgba(255, 248, 234, 0.12);
    color: #e5d3b5;
    font-size: 11px;
}

.footer-dot {
    color: var(--brass-light);
}

/* =========================================================
   FOOTER - MOBILE
   ========================================================= */

@media (max-width: 768px) {
    .site-footer {
        margin-top: 30px;
    }

    .footer-inner {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 0 10px;
    }

    .footer-brand {
        display: none;
    }

    .footer-links {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        column-gap: 14px;
        row-gap: 9px;
    }

        .footer-links a {
            font-size: 11px;
            white-space: nowrap;
        }

    .footer-bottom {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 4px;
        padding: 7px 0 9px;
        font-size: 9px;
        white-space: nowrap;
    }
}

/* -------------------------------------------------------
   SCROLLBAR
------------------------------------------------------- */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--wood-light) var(--bg-main);
}


/* Chrome / Edge / Safari */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}


::-webkit-scrollbar-track {
    background: var(--bg-main);
}


::-webkit-scrollbar-thumb {
    background: linear-gradient( 180deg, var(--wood-light), var(--wood-dark) );
    border: 2px solid var(--bg-main);
    border-radius: 10px;
}


    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient( 180deg, var(--board-red-light), var(--board-red) );
    }


::-webkit-scrollbar-corner {
    background: var(--bg-main);
}


/* =========================================================
   GLOBAL BACKGAMMON LOADER
   ========================================================= */

.backgammon-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(48, 37, 29, .42);
    backdrop-filter: blur(2px);
}

.backgammon-loader-active {
    display: flex;
}

.backgammon-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 22px 28px;
    border: 1px solid rgba(90, 50, 31, .28);
    border-radius: 18px;
    background: linear-gradient( 145deg, #fff8e9, #e4cba6 );
    box-shadow: 0 18px 40px rgba(48, 25, 13, .32), inset 0 1px rgba(255, 255, 255, .8);
}

.backgammon-loader-dice {
    display: flex;
    align-items: center;
    gap: 12px;
}

.backgammon-loader-die {
    position: relative;
    width: 48px;
    height: 48px;
    border: 2px solid #d2b68a;
    border-radius: 11px;
    background: linear-gradient( 145deg, #fffefb, #f6eddc 55%, #e4d2b1 );
    box-shadow: 0 7px 14px rgba(55, 29, 14, .24), inset 0 2px 2px rgba(255, 255, 255, .95);
    animation: backgammonLoaderDice 1s ease-in-out infinite;
}

.backgammon-loader-die-second {
    animation-delay: .15s;
}

.backgammon-loader-die i {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #292724;
}

    .backgammon-loader-die i:nth-child(1) {
        top: 9px;
        left: 9px;
    }

    .backgammon-loader-die i:nth-child(2) {
        top: 9px;
        right: 9px;
    }

    .backgammon-loader-die i:nth-child(3) {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .backgammon-loader-die i:nth-child(4) {
        bottom: 9px;
        left: 9px;
    }

    .backgammon-loader-die i:nth-child(5) {
        right: 9px;
        bottom: 9px;
    }

.backgammon-loader-text {
    color: var(--wood-dark);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .03em;
}

@keyframes backgammonLoaderDice {

    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(12deg);
    }
}

/* =========================================================
   Account Modal 
   ========================================================= */

.account-modal .modal-content {
    background: #fffaf2;
    border: 1px solid #a88755;
    border-radius: 14px;
    color: #65452e;
    max-height: calc(100dvh - 32px);
    overflow: hidden;
}

.account-modal .modal-header {
    flex-shrink: 0;
}

.account-modal .account-modal-body {
    padding: 24px;
    overflow-y: auto;
    min-height: 0;
}

.account-modal .account-intro,
.account-modal .account-bottom-text,
.account-modal .account-legal {
    color: #78634e;
    font-size: .9rem;
}

.account-modal .account-intro {
    margin-bottom: 20px;
}

.account-modal .site-form-label {
    display: block;
    margin-bottom: 7px;
    color: #65452e;
    font-weight: 600;
}

.account-modal .account-input {
    background: #fffdf8;
    border: 1px solid #d4b991;
    border-radius: 8px;
    color: #65452e;
    padding: 11px 13px;
}

    .account-modal .account-input:focus {
        background: #fffdf8;
        border-color: #a88755;
        color: #65452e;
        box-shadow: 0 0 0 .2rem rgba(168, 135, 85, .15);
    }

    .account-modal .account-input::placeholder {
        color: #927e6b;
    }

    .account-modal .account-input option {
        background: #fffdf8;
        color: #65452e;
    }

.account-modal .account-link {
    padding: 0;
    border: 0;
    background: none;
    color: #79512f;
    text-decoration: underline;
    font-size: .88rem;
    font-weight: 600;
}

    .account-modal .account-link:hover {
        color: #a27645;
    }

.account-modal .account-primary-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 46px;
}

    .account-modal .account-primary-btn:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

.account-modal .account-bottom-text {
    margin: 20px 0 0;
    text-align: center;
}

.account-modal .account-legal {
    font-size: .78rem;
    line-height: 1.6;
}

    .account-modal .account-legal a {
        color: #79512f;
    }

.account-modal .account-check .form-check-input:checked {
    background-color: #65452e;
    border-color: #65452e;
}

.account-modal .account-check .form-check-label {
    color: #78634e;
    font-size: .84rem;
}

.account-modal .account-verification-input {
    display: block;
    width: 100%;
    max-width: 260px;
    height: 64px;
    margin: 0 auto 16px;
    padding: 10px 16px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 10px;
    font-variant-numeric: tabular-nums;
    color: #65452e;
}

    .account-modal .account-verification-input::placeholder {
        color: #c5b49e;
        letter-spacing: 10px;
    }

@media (max-width: 768px) {

    .account-modal .modal-dialog {
        margin: 8px auto;
        width: calc(100% - 16px);
        max-width: 500px;
    }

    .account-modal .modal-dialog-centered {
        min-height: calc(100dvh - 16px);
        align-items: center;
    }

    .account-modal .modal-content {
        max-height: calc(100dvh - 32px);
    }

    .account-modal .account-modal-body {
        padding: 18px;
        max-height: 25rem;
    }
}



/* Account password visibility and inline validation */
.account-modal .account-password-wrap {
    position: relative;
}

    .account-modal .account-password-wrap .account-input {
        padding-right: 48px;
    }

.account-modal .account-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #876036;
    cursor: pointer;
}

    .account-modal .account-password-toggle:focus-visible {
        outline: 2px solid #a88755;
        border-radius: 6px;
    }

.account-modal .account-inline-message {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #d9a29b;
    border-radius: 8px;
    background: #fff0ec;
    color: #963d32;
    font-size: .82rem;
    line-height: 1.5;
    text-align: center;
}

    .account-modal .account-inline-message.is-success {
        border-color: #a3c2a7;
        background: #edf6ee;
        color: #355846;
    }

/* ==========================================
   ACCOUNT DROPDOWN
========================================== */

.site-account-dropdown > .dropdown-toggle::after {
    display: none;
}

.site-account-menu {
    min-width: 230px;
    padding: 8px;
    margin-top: 10px !important;
    background: #fff7eb;
    border: 1px solid #a88755;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(55, 35, 18, .15);
}

    .site-account-menu .dropdown-item {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 48px;
        padding: 12px 14px;
        border-radius: 7px;
        color: #65452e;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
    }

        .site-account-menu .dropdown-item:hover,
        .site-account-menu .dropdown-item:focus {
            background: #eee0c9;
            color: #65452e;
        }

        .site-account-menu .dropdown-item:active {
            background: #e8d5b5;
            color: #65452e;
        }

        .site-account-menu .dropdown-item i {
            width: 20px;
            text-align: center;
            font-size: 16px;
        }

    .site-account-menu .dropdown-divider {
        border-color: #d6bea0;
        margin: 6px 0;
    }

/* ==========================================
   COOKIE NOTICE
========================================== */

.site-cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    padding: 14px 20px;
    background: #fffaf2;
    border-top: 1px solid #a88755;
    box-shadow: 0 -4px 18px rgba(55, 35, 18, .12);
}

.site-cookie-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    color: #65452e;
    font-size: 13px;
}

    .site-cookie-content > i {
        font-size: 24px;
        flex-shrink: 0;
    }

    .site-cookie-content span {
        line-height: 1.6;
    }

    .site-cookie-content a {
        color: #79512f;
        font-weight: 600;
        text-decoration: underline;
    }

    .site-cookie-content .site-text-btn {
        flex-shrink: 0;
        min-height: 40px;
        padding: 8px 18px;
    }

@media (max-width: 768px) {
    .site-cookie-notice {
        padding: 14px;
    }

    .site-cookie-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

        .site-cookie-content > i {
            font-size: 22px;
        }

        .site-cookie-content .site-text-btn {
            width: 100%;
            justify-content: center;
        }
}

/* ==========================================
   account-status
========================================== */

#btnAccount {
    position: relative;
}

.site-account-status {
    display: none;
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 2;
}

    .site-account-status.available,
    .site-account-status.busy {
        display: block;
    }

    .site-account-status.available {
        background: #28a745;
    }

    .site-account-status.busy {
        background: #fd7e14;
    }

    /* The notification count replaces the small dot, retaining its status color. */
    .site-account-status.notification {
        display: flex;
        align-items: center;
        justify-content: center;
        right: -5px;
        bottom: -5px;
        width: auto;
        min-width: 20px;
        height: 20px;
        padding: 0 4px;
        border-radius: 20px;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
    }

    .site-account-status.playing {
        display: flex;
        width: 19px;
        height: 19px;
        align-items: center;
        justify-content: center;
        background: #65452e;
        color: #fff;
        font-size: 10px;
    }

        .site-account-status.playing::after {
            content: "\f522";
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
        }

.site-account-challenge-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
}

    .site-account-challenge-option .form-check {
        display: flex;
        align-items: center;
        padding-left: 0;
        margin: 0;
    }

    .site-account-challenge-option .form-check-input {
        width: 3.4rem;
        height: 1.8rem;
        margin: 0;
        flex-shrink: 0;
        cursor: pointer;
        background-color: #fd7e14;
        border: 2px solid #fd7e14;
        box-shadow: none;
        transition: background-color 0.2s, border-color 0.2s;
    }

        .site-account-challenge-option .form-check-input:checked {
            background-color: #28a745;
            border-color: #28a745;
        }

        .site-account-challenge-option .form-check-input:focus {
            box-shadow: 0 0 0 3px rgba(168, 135, 85, 0.18);
        }

/* ==========================================
   Player Online
========================================== */

.play-game-online-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 3px;
}

.play-game-online-player {
    display: flex;
    align-items: center;
    gap: 9px;
    position: relative;
    padding: 10px;
    border: 1px solid #a88755;
    border-radius: 8px;
    background: #f5ead7;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    min-width: 0;
}

    .play-game-online-player:hover {
        background: #e8d5b5;
        border-color: #65452e;
    }

.play-game-online-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #a88755;
}

.play-game-online-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.play-game-online-name {
    color: #65452e;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.play-game-online-details {
    color: #8b7355;
    font-size: 11px;
}

.play-game-online-status {
    position: absolute;
    right: 4px;
    top: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgb(40, 167, 69);
}

.play-game-online-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 10px;
    color: #8b7355;
    font-size: 13px;
}

    .play-game-online-empty i {
        font-size: 25px;
    }

.play-game-online-filters {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.play-game-online-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    border: 1px solid #a88755;
    border-radius: 7px;
    background: #f5ead7;
    color: #65452e;
}

    .play-game-online-search i {
        padding-left: 12px;
        color: #a88755;
    }

    .play-game-online-search input {
        width: 100%;
        min-width: 0;
        padding: 10px;
        border: none;
        outline: none;
        background: transparent;
        color: #65452e;
        font-size: 13px;
    }

        .play-game-online-search input::placeholder {
            color: #8b7355;
        }

    .play-game-online-search:focus-within {
        border-color: #65452e;
    }

.play-game-level-dropdown {
    position: relative;
    width: 170px;
    flex-shrink: 0;
    margin: 0;
}

    .play-game-level-dropdown .site-dropdown-toggle {
        height: 100%;
        min-height: 40px;
    }

    .play-game-level-dropdown .site-dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        width: 210px;
        z-index: 1060;
    }

    .play-game-level-dropdown.is-open .site-dropdown-menu {
        display: block;
    }

.play-game-level-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #65452e;
    font-size: 13px;
    cursor: pointer;
}

    .play-game-level-option:hover {
        background: #e8d5b5;
    }

    .play-game-level-option input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: #65452e;
        cursor: pointer;
    }

    .play-game-level-option span {
        flex: 1;
    }

.play-game-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.play-game-level-dropdown {
    margin-top: -2px;
}


.play-game-online-challenged {
    position: absolute;
    top: 0px;
    right: 4px;
    color: #dc3545;
    font-size: 16px;
    z-index: 2;
}

@media (max-width: 608px) {
    .play-game-online-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .play-game-level-dropdown {
        width: 125px;
    }

        .play-game-level-dropdown .site-dropdown-menu {
            width: 185px;
        }
}

@media (max-width: 400px) {
    .play-game-online-list {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   MASTER PLAY-GAME MODAL AND CHALLENGE POPOVER
   ========================================================= */

/* =========================================================
   PLAY GAME OPTIONS
   ========================================================= */

.play-game-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}

    .play-game-options > .play-game-option {
        width: 100%;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        text-align: left;
        white-space: normal;
    }

.play-game-option > .play-game-option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
}

.play-game-option > span:nth-child(2) {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
}

.play-game-option > em,
.play-game-option > i:last-child {
    flex-shrink: 0;
}


/* =========================================================
   PLAY GAME INVITATION
   ========================================================= */

.play-game-invite-title {
    margin-bottom: 16px;
    color: #355846;
    text-align: center;
    font-weight: 800;
}

.play-game-invite .input-group {
    flex-wrap: nowrap;
}

.play-game-invite .form-control {
    min-width: 0;
    background: #fff;
    color: #3f2417;
    border-color: #c9ac85;
    font-size: 0.8rem;
}

.play-game-expire {
    margin: 16px 0;
    padding: 11px;
    text-align: center;
    background: #eadabf;
    border-radius: 9px;
    font-size: 0.8rem;
}

    .play-game-expire strong {
        color: #9c3e32;
        margin-left: 4px;
        font-variant-numeric: tabular-nums;
    }

.play-game-share {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

    .play-game-share > .site-text-btn {
        flex: 0 1 auto;
        max-width: 100%;
    }

#btnBackgammonCancelInvitation {
    display: flex;
    width: fit-content;
    margin: 18px auto 0;
}

#btnApplyPlaySettings {
    display: flex;
    width: 100%;
    margin-top: 18px;
    align-items: center;
    justify-content: center;
}



/* Challenge popover */

.site-game-popover:has(.play-game-challenge-header) {
    --bs-popover-max-width: 290px;
    --bs-popover-bg: #f5ead7;
    --bs-popover-border-color: #a88755;
    --bs-popover-body-padding-x: 0;
    --bs-popover-body-padding-y: 0;
    border-radius: 10px;
    overflow: visible;
}

    .site-game-popover:has(.play-game-challenge-header) .popover-body {
        padding: 0;
    }

    .site-game-popover:has(.play-game-challenge-header) .popover-arrow {
        visibility: visible;
    }

.play-game-challenge-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #e8d5b5;
    border-bottom: 1px solid #a88755;
    color: #65452e;
    font-size: 14px;
    font-weight: 700;
    border-radius: 9px 9px 0 0;
}

    .play-game-challenge-header i {
        font-size: 18px;
    }

.play-game-challenge-body {
    padding: 17px 16px 15px;
    text-align: center;
}

.play-game-challenge-name {
    display: block;
    color: #65452e;
    font-size: 17px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.play-game-challenge-details {
    margin-top: 4px;
    color: #8b7355;
    font-size: 12px;
    font-weight: 500;
}

.play-game-challenge-message {
    margin: 15px 0;
    color: #65452e;
    font-size: 13px;
}

.play-game-challenge-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

    .play-game-challenge-actions .site-text-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        flex: 1;
        padding: 9px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

/* Incoming challenge */

.play-game-challenge-incoming-message {
    color: #65452e;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.play-game-challenge-incoming-actions {
    justify-content: center;
}

    .play-game-challenge-incoming-actions .site-text-btn {
        flex: 1;
        padding: 9px 10px;
        font-size: 12px;
        white-space: nowrap;
    }


.site-account-dropdown .site-account-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #a88755;
}


.play-game-online-player.play-game-online-challenge-active {
    border-color: #2f1f16;
    background: #e8d5b5;
    box-shadow: inset 0 0 0 1px rgba(128, 0, 32, 0.35), inset 0 0 18px rgba(128, 0, 32, 0.07);
}

    .play-game-online-player.play-game-online-challenge-active:hover {
        border-color: #800020;
        background: #ead3d1;
    }

/* Online players: consistent one-line controls and compact filtering. */
.play-game-online-toolbar {
    align-items: stretch;
}

    .play-game-online-toolbar > [class*="col-"] {
        min-width: 0;
    }

    .play-game-online-toolbar .play-game-online-search,
    .play-game-online-toolbar .play-game-online-search input,
    .play-game-online-toolbar .site-icon-btn,
    .play-game-online-toolbar .site-dropdown-toggle {
        height: 34px;
        min-height: 34px;
        box-sizing: border-box;
    }

        .play-game-online-toolbar .play-game-online-search input {
            padding-top: 0;
            padding-bottom: 0;
        }

.play-game-online-filter-controls {
    display: flex;
    align-items: stretch;
    gap: 7px;
    width: 100%;
    min-width: 0;
    height: 34px;
}

    .play-game-online-filter-controls > .site-icon-btn {
        flex: 0 0 34px;
        width: 34px;
        padding: 0;
    }

    .play-game-online-filter-controls .play-game-level-dropdown,
    .play-game-online-filter-controls .play-game-challenge-filter-dropdown {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        max-width: none;
        margin: 0;
    }

    .play-game-online-filter-controls .site-dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 5px;
        width: 100%;
        min-width: 0;
        padding: 0 8px;
        font-size: 11px;
        white-space: nowrap;
    }

        .play-game-online-filter-controls .site-dropdown-toggle .site-dropdown-value {
            display: block;
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            line-height: 1.2;
        }

        .play-game-online-filter-controls .site-dropdown-toggle > i {
            flex-shrink: 0;
        }

.play-game-challenge-filter-dropdown .site-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 185px;
    z-index: 1060;
}

.play-game-challenge-filter-dropdown.is-open .site-dropdown-menu {
    display: block;
}

.play-game-challenge-filter-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    color: #65452e;
    font-size: 13px;
    cursor: pointer;
}

    .play-game-challenge-filter-option:hover {
        background: #e8d5b5;
    }

    .play-game-challenge-filter-option input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: #65452e;
        cursor: pointer;
    }

.play-game-online-player.play-game-online-challenge-incoming {
    border-color: #37855d;
    background: #e6f2e8;
    box-shadow: inset 0 0 0 1px rgba(55, 133, 93, .25);
}

.play-game-online-player.play-game-online-challenge-outgoing:not(.play-game-online-challenge-incoming) {
    border-color: #b98945;
    background: #f9ecd2;
    box-shadow: inset 0 0 0 1px rgba(185, 137, 69, .22);
}

.play-game-online-player.play-game-online-challenge-incoming.play-game-online-challenge-outgoing {
    border-color: #62839b;
    background: #e9eef3;
}

@media (max-width: 575.98px) {
    .play-game-online-filter-controls {
        gap: 5px;
    }

        .play-game-online-filter-controls .site-dropdown-toggle {
            padding: 0 6px;
            font-size: 11px;
        }

    .play-game-level-dropdown .site-dropdown-menu {
        width: 185px;
    }
}

.play-game-online-player.play-game-online-challenge-incoming:hover {
    background: #d8eadc;
    border-color: #27734d;
}

.play-game-online-player.play-game-online-challenge-outgoing:not(.play-game-online-challenge-incoming):hover {
    background: #f2e0b8;
    border-color: #a57b30;
}

.play-game-online-player.play-game-online-challenge-incoming.play-game-online-challenge-outgoing:hover {
    background: #dae5ed;
    border-color: #537a96;
}

/* Player picker: deliberately two rows at ALL viewport widths. */
.play-game-online-toolbar .play-game-online-search {
    width: 100%;
    min-height: 34px;
    height: 34px;
}

    .play-game-online-toolbar .play-game-online-search input {
        min-height: 34px;
        height: 34px;
    }

.play-game-online-toolbar .play-game-online-filter-controls {
    justify-content: flex-start;
    height: 34px;
}

    .play-game-online-toolbar .play-game-online-filter-controls > .site-icon-btn {
        height: 34px;
        min-height: 34px;
    }

    .play-game-online-toolbar .play-game-online-filter-controls .site-dropdown-toggle {
        height: 34px;
        min-height: 34px;
    }

/* =========================================================
   FRIEND PRESENCE, FILTERS, CHALLENGE EMPHASIS & AI SELECTOR
   ========================================================= */
#backgammonOnlineStatusDropdown, #backgammonOnlineChallengeDropdown {
    min-width: 0;
}

.play-game-status-filter-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    color: #65452e;
    font-size: 13px;
    cursor: pointer;
}

    .play-game-status-filter-option:hover {
        background: #e8d5b5;
    }

    .play-game-status-filter-option input {
        accent-color: #65452e;
    }

.backgammon-filter-dot, .backgammon-friend-presence {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 2px solid #fffaf2;
    border-radius: 50%;
    flex: none;
}

    .backgammon-filter-dot.online, .backgammon-friend-presence.online {
        background: #28a745;
    }

    .backgammon-filter-dot.offline, .backgammon-friend-presence.offline {
        background: #dc3545;
    }

.backgammon-friend-avatar-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    flex: none;
}

.backgammon-friend-presence {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 13px;
    height: 13px;
}

.backgammon-friend-offline {
    opacity: .78;
}

.backgammon-open-challengers {
    flex: 0 0 auto;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 7px;
    border: 1px solid #a88755;
    border-radius: 7px;
    background: #f5ead7;
    color: #65452e;
    font-size: 10px;
    cursor: pointer;
    white-space: nowrap;
}

    .backgammon-open-challengers input {
        width: 28px;
        height: 15px;
        accent-color: #28a745;
        cursor: pointer;
    }

.play-game-online-player.play-game-online-challenge-incoming {
    border: 2px solid #299153;
    box-shadow: 0 0 0 2px rgba(41,145,83,.22), 0 5px 15px rgba(41,145,83,.17);
}

.play-game-online-player.play-game-online-challenge-outgoing:not(.play-game-online-challenge-incoming) {
    border: 2px solid #bd7a27;
    box-shadow: 0 0 0 2px rgba(189,122,39,.16), 0 5px 15px rgba(189,122,39,.15);
}

.backgammon-ai-player {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 96px;
    padding: 10px;
    border: 1px solid #a88755;
    border-radius: 10px;
    background: #f5ead7;
    color: #65452e;
    text-align: left;
    cursor: pointer;
}

    .backgammon-ai-player:hover {
        background: #e8d5b5;
        border-color: #65452e;
    }

    .backgammon-ai-player img {
        width: 75px;
        height: 75px;
        border-radius: 9px;
        object-fit: cover;
    }

.backgammon-ai-info {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

    .backgammon-ai-info strong {
        font-size: 16px;
    }

    .backgammon-ai-info small {
        font-size: 12px;
        color: #8b7355;
    }

.backgammon-ai-player > i {
    font-size: 13px;
}

@media (max-width:440px) {
    .backgammon-open-challengers-label {
        display: none;
    }

    .backgammon-open-challengers {
        padding: 0 4px;
    }
}


/* =========================================================
   FRIEND ACTION BUTTON + SINGLE ROW LIST
   ========================================================= */
.play-game-online-list {
    grid-template-columns: 1fr;
    max-height: 360px;
}

.play-game-online-player {
    gap: 12px;
    padding: 11px 12px;
    cursor: default;
}

.play-game-online-info {
    min-width: 0;
}

.backgammon-friend-action {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #a88755;
    border-radius: 9px;
    background: #fff8ea;
}

    .backgammon-friend-action:hover,
    .backgammon-friend-action:focus-visible {
        border-color: #65452e;
        background: #eee0c9;
    }

    .backgammon-friend-action > i {
        font-size: 15px;
    }

.backgammon-friend-action-active {
    border-color: #b98945;
    background: #f8ebc9;
    box-shadow: inset 0 0 0 1px rgba(185, 137, 69, .18);
}

.backgammon-friend-action-disabled,
.backgammon-friend-action:disabled {
    opacity: .5;
    cursor: not-allowed;
    background: #f1e6d5;
}

    .backgammon-friend-action-disabled:hover,
    .backgammon-friend-action:disabled:hover {
        border-color: #a88755;
        background: #f1e6d5;
    }


/* Friend toolbar: Bootstrap switch next to presence filter. */
.play-game-online-filter-controls #backgammonOnlineStatusDropdown {
    flex: 1 1 auto;
}

.play-game-online-filter-controls .backgammon-open-challengers {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0 10px;
    height: 34px;
    border: 1px solid #a88755;
    border-radius: 7px;
    background: #f5ead7;
    color: #65452e;
    font-size: 11px;
    white-space: nowrap;
}

    .play-game-online-filter-controls .backgammon-open-challengers .form-check-input {
        float: none;
        width: 2rem;
        height: 1rem;
        margin: 0;
        padding: 0;
        border-color: #a88755;
        background-color: #b9aa92;
        background-image: var(--bs-form-switch-bg);
        box-shadow: none;
        cursor: pointer;
    }

        .play-game-online-filter-controls .backgammon-open-challengers .form-check-input:checked {
            background-color: #28a745;
            border-color: #28a745;
        }

    .play-game-online-filter-controls .backgammon-open-challengers .form-check-label {
        display: inline;
        cursor: pointer;
    }


/* =========================================================
   FRIEND FILTER: BOOTSTRAP BUTTON TOGGLE, NOT FORM SWITCH
   ========================================================= */
.play-game-online-filter-controls .backgammon-open-challengers {
    flex: 0 0 auto;
    display: block;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
}

.play-game-online-filter-controls .backgammon-open-challengers-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #a88755;
    border-radius: 7px;
    background: #f5ead7;
    color: #65452e;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

    .play-game-online-filter-controls .backgammon-open-challengers-button:hover {
        border-color: #65452e;
        background: #e8d5b5;
        color: #65452e;
    }

.backgammon-open-challengers-button .backgammon-toggle-off,
.backgammon-open-challengers-button .backgammon-toggle-on {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.backgammon-open-challengers-button .backgammon-toggle-on {
    display: none;
}

#backgammonOpenChallengersOnly:checked + .backgammon-open-challengers-button {
    border-color: #6b873d;
    background: #e5efd7;
    color: #476229;
}

    #backgammonOpenChallengersOnly:checked + .backgammon-open-challengers-button .backgammon-toggle-off {
        display: none;
    }

    #backgammonOpenChallengersOnly:checked + .backgammon-open-challengers-button .backgammon-toggle-on {
        display: inline-flex;
    }

#backgammonOpenChallengersOnly:focus-visible + .backgammon-open-challengers-button {
    outline: 2px solid #65452e;
    outline-offset: 2px;
}

/* Online + accepts = green; offline + accepts = red; challenges off = orange. */
.backgammon-friend-presence.closed {
    background: #fd7e14;
}
