div:where(.swal2-container) {
    z-index: 100000 !important;
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm,
div:where(.swal2-container) .swal2-confirm {
    background: linear-gradient(to bottom, #c19e67 0%, #b57d29 100%) !important;
    border: solid 1px #c19e67 !important;
    box-shadow: none !important;
}

div:where(.swal2-container) .swal2-popup {
    font-family: 'Noto Sans KR', sans-serif;
}

/* Game provider grid — replace float layout to avoid gaps */
.casino-g,
.slot-g {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.casino-g::after,
.slot-g::after {
    display: none;
}

.casino-g > .game-provider-card,
.slot-g > .game-provider-card {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.casino-g .list-menugame,
.slot-g .list-menugame {
    float: none;
    width: 100%;
    padding: 0;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.casino-g .companys-title,
.slot-g .companys-title {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.casino-g .companys-title img,
.slot-g .companys-title img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #fff;
}

.provider-text-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 412 / 230;
    padding: 16px 20px;
    box-sizing: border-box;
    border: 2px solid #c69b4a;
    border-radius: 10px;
    background: linear-gradient(145deg, #fdfbf7 0%, #f5efe3 100%);
    color: #9a7330;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: clamp(14px, 2.2vw, 20px);
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.provider-text-card[hidden],
.game-text-thumb[hidden] {
    display: none !important;
}

.game-text-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    padding: 12px 10px;
    box-sizing: border-box;
    background: linear-gradient(145deg, #fdfbf7 0%, #f5efe3 100%);
    color: #9a7330;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: clamp(12px, 1.8vw, 15px);
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
    .casino-g,
    .slot-g {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .casino-g,
    .slot-g {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Site logo sizing (design/Logo.png — square emblem) */
.logo_top img {
    width: 150px;
    max-width: 90%;
    height: auto;
    margin: 24px auto 0 auto;
    filter: none;
}

.logo_top:hover img {
    filter: brightness(1.05);
}

.sigma-login-overlay .lg_frm_arr .frm-logo {
    width: 150px;
    max-width: 90%;
    height: auto;
    margin: 20px auto 16px auto;
}

/* Override legacy site.min.css dark theme — restore sigma-365 white layout */
html,
body,
body.sigma-mobile,
body.lobby-page {
    background: #fff !important;
    color: #000 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

.sub_content_arr_bg,
.main_content_wrap,
.casinoZone,
.col-wrapper,
.containerInner,
.casino-g,
.slot-g {
    background: #fff;
}

.sub-topcont11 {
    background: #fff;
}

.main_navigation a,
.sub-topcont11 a {
    color: inherit;
}

/* Sigma login overlay (avoids conflict with Bootstrap .modal) */
.sigma-login-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    top: 0;
    left: 0;
    display: none;
    z-index: 99999;
}

.sigma-login-overlay .modal_content {
    width: 400px;
    background: #fff;
    border-radius: 10px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    box-sizing: border-box;
    box-shadow: #000 0.1em 0.1em 0.3em;
    line-height: 23px;
    cursor: default;
    border: solid 2px #c19e67;
}

.sigma-login-overlay .modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.sigma-login-overlay .lg_frm_arr {
    padding: 30px;
}

.sigma-login-overlay .lg_frm_arr .frm-logo {
    display: block;
    width: 150px;
    margin: 30px auto 20px auto;
}

.sigma-login-overlay .lg_frm_arr h4 {
    font-size: 20px;
    color: #333;
    border-bottom: solid 2px #444;
    padding: 25px 0;
    margin: 0 0 20px 0;
}

.sigma-login-overlay .lg_frm_arr input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.sigma-login-overlay .lg_frm_arr button,
.sigma-login-overlay .lg_frm_arr a.fadeIn.fourth {
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    width: 100%;
    font-size: 13px;
    font-weight: bold;
    height: 40px;
    line-height: 40px;
    border-radius: 10px;
    margin-top: 5px;
    border: solid 1px #c19e67;
    background: linear-gradient(to bottom, #c19e67 0%, #b57d29 100%);
}

.sigma-login-overlay .lg_frm_arr a.fadeIn.fourth {
    background: #555;
    border-color: #555;
}

/* Restore Bootstrap modals after sigma style.css */
.modal.fade {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: none;
    overflow: hidden;
    outline: 0;
    width: auto;
    height: auto;
    background: transparent;
}

.modal.fade.in,
.modal.fade.show {
    display: block;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background-color: #000;
}

.modal-backdrop.fade.in {
    opacity: 0.5;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 30px auto;
    pointer-events: none;
}

.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

/* Logged-in user bar */
.sub-topcont11 .user-bar {
    position: absolute;
    right: 10px;
    top: 7px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #333;
}

.sub-topcont11 .user-bar .balance {
    color: #b57d29;
    font-weight: bold;
}

.sub-topcont11 .user-bar a {
    color: #b57d29;
    cursor: pointer;
}

.sub-topcont11 .user-bar button {
    border: solid 1px #c19e67;
    background: linear-gradient(to bottom, #c19e67 0%, #b57d29 100%);
    color: #fff;
    border-radius: 10px;
    padding: 0 16px;
    height: 35px;
    line-height: 35px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
}

/* Swiper banner — override style.css height:100% and legacy 1920px body width */
.swiper.mySwiper {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1920 / 550;
    max-height: min(550px, 42vw);
    overflow: hidden !important;
    margin: 0 auto;
}

.swiper.mySwiper .swiper-wrapper {
    height: 100% !important;
}

.swiper.mySwiper .swiper-slide {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1920 / 550;
    flex-shrink: 0;
}

.swiper.mySwiper .swiper-slide img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

#mask {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    padding-top: 20%;
}

/* Popup lobby (slot/casino game list window) */
body.lobby-page {
    background: #fff !important;
    color: #333 !important;
    width: 100% !important;
    min-height: 100vh;
}

.lobby-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.lobby-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.lobby-header-title i {
    font-size: 22px;
}

.lobby-close-btn {
    border: solid 1px #c19e67;
    background: linear-gradient(to bottom, #c19e67 0%, #b57d29 100%);
    color: #fff;
    border-radius: 8px;
    padding: 8px 18px;
    cursor: pointer;
    font-weight: bold;
}

.lobby-content {
    padding: 20px 24px 40px;
    background: #fff;
}

.lobby-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.lobby-game-card {
    display: flex;
    flex-direction: column;
    height: 168px;
    border: 1px solid #c9a24d;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    color: #2b1f0e !important;
}

.lobby-game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    color: #2b1f0e !important;
}

.lobby-game-thumb {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background: #faf8f6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.lobby-game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lobby-game-name {
    flex: 0 0 26px;
    height: 26px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 26px;
    text-align: center;
    color: #2b1f0e !important;
    background: linear-gradient(180deg, #fff9da 0%, #f5e6b8 100%);
    border-top: 1px solid #c9a24d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .lobby-header {
        padding: 10px 14px;
    }

    .lobby-content {
        padding: 12px 10px 30px;
    }

    .lobby-game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .lobby-game-card {
        height: 140px;
    }
}

/* Mobile sigma layout */
body.sigma-mobile {
    background: #fff !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

.sigma-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 3px solid #b39139;
    gap: 8px;
}

.sigma-mobile-logo {
    flex: 0 0 auto;
}

.sigma-mobile-logo img {
    width: 120px !important;
    max-width: 120px !important;
    height: auto !important;
    display: block;
}

.sigma-mobile-auth {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.sigma-mobile-btn {
    border: solid 1px #c19e67;
    background: linear-gradient(to bottom, #c19e67 0%, #b57d29 100%);
    color: #fff;
    border-radius: 8px;
    padding: 0 12px;
    height: 32px;
    line-height: 32px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.sigma-mobile-btn-outline {
    background: #555;
    border-color: #555;
}

.sigma-mobile-user {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    text-align: right;
    color: #333;
}

.sigma-mobile-user-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    line-height: 1.5;
}

.sigma-mobile-user-row .balance {
    color: #b57d29;
    font-weight: bold;
}

.sigma-mobile-user-row a {
    color: #b57d29;
}

.sigma-mobile-btn-sm {
    border: solid 1px #c19e67;
    background: linear-gradient(to bottom, #c19e67 0%, #b57d29 100%);
    color: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
}

.sigma-mobile-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #ccc;
    font-size: 12px;
    color: #333;
}

.sigma-mobile-notice marquee {
    flex: 1;
}

.sigma-mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #ccc;
    border-bottom: 1px solid #ccc;
}

.sigma-mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
}

.sigma-mobile-nav a i {
    font-size: 18px;
    color: #b57d29;
}

.sigma-mobile-content {
    background: #fff;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body.sigma-mobile .main_content_wrap,
body.sigma-mobile .casinoZone,
body.sigma-mobile .containerInner {
    padding: 0 8px;
}

body.sigma-mobile .title h3 {
    font-size: 16px;
}

body.sigma-mobile #footer {
    margin-top: 20px;
    text-align: center;
}

body.sigma-mobile #footer .footer-png {
    width: 100%;
    max-width: 100%;
    height: auto;
}

body.sigma-mobile .sigma-login-overlay .modal_content {
    width: 92%;
    max-width: 360px;
}

body.sigma-mobile .modal-dialog {
    margin: 10px auto;
    width: 95%;
}

/* Narrow viewport: collapse desktop sidebar layout (DevTools responsive, small windows) */
@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden !important;
        min-width: 0 !important;
    }

    body:not(.sigma-mobile):not(.lobby-page) {
        min-height: 0 !important;
    }

    .header-arr {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 3px solid #b39139;
    }

    .sub_content_arr_bg,
    .sub-topcont11 {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sub-topcont11 {
        height: auto;
        min-height: 50px;
        padding: 8px 10px;
        box-sizing: border-box;
    }

    .sub-topcont11 .user-bar {
        position: relative;
        right: auto;
        top: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
        font-size: 11px;
    }

    .sub-topcont11 .topbtn-arr {
        position: relative;
        right: auto;
        top: auto;
        display: flex;
        gap: 6px;
        justify-content: flex-end;
    }

    .logo_top img {
        width: 120px !important;
        margin: 12px auto !important;
    }

    .main_navigation_arr {
        width: 100%;
        padding: 0 8px 8px;
        box-sizing: border-box;
    }

    .main_navigation {
        float: none !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(4, 1fr);
        gap: 1px;
        padding: 0 !important;
        margin: 0 0 1px 0 !important;
        border: none !important;
        background: #ccc;
    }

    .main_navigation.right-navi {
        margin-top: 0 !important;
    }

    .main_navigation li {
        float: none !important;
        width: auto !important;
        background: #fff;
    }

    .main_navigation a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px 4px;
        font-size: 10px;
        font-weight: 600;
        text-align: center;
        line-height: 1.2;
    }

    .main_navigation a i {
        font-size: 18px;
        color: #b57d29;
    }

    .msg1,
    .leftbotbanner_arr {
        display: none !important;
    }

    .hader_top_arr,
    .user-info-arr1 {
        width: 100%;
    }

    .sub_content_arr_bg {
        padding: 0;
    }

    .main_content_wrap {
        width: 100%;
        padding: 0 8px;
        box-sizing: border-box;
    }

    #footer .footer-png {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    /* Swiper: fixed aspect ratio instead of height:100% from style.css */
    .swiper.mySwiper {
        height: auto !important;
        aspect-ratio: 1920 / 550;
        max-height: 42vw;
    }

    .swiper.mySwiper .swiper-wrapper,
    .swiper.mySwiper .swiper-slide {
        height: 100% !important;
    }

    .swiper.mySwiper .swiper-slide img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        object-fit: cover;
    }

    body.sigma-mobile .swiper.mySwiper {
        max-height: 42vw;
    }

    body.sigma-mobile,
    body.sigma-mobile .sigma-mobile-content,
    body.sigma-mobile .main_content_wrap,
    body.sigma-mobile .casinoZone,
    body.sigma-mobile .containerInner,
    body.sigma-mobile .col-wrapper {
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    body.sigma-mobile .sigma-mobile-logo img,
    body.sigma-mobile #footer .footer-png,
    body.sigma-mobile .companys-title img {
        max-width: 100%;
        height: auto;
    }
}

/* Must stay last — beats legacy common.css body{width:1920px} in site.min.css */
html,
body,
body.sigma-mobile,
body.lobby-page {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}
