.path-local-nightshift,
.path-local-nightshift body,
.path-local-nightshift #page,
.path-local-nightshift #page-wrapper,
.path-local-nightshift #page-content,
.path-local-nightshift #region-main-box,
.path-local-nightshift #region-main,
.path-local-nightshift .main-inner,
.path-local-nightshift .main-inner-wrapper,
.path-local-nightshift #topofscroll {
    background: #1c1c1c !important;
}

.path-local-nightshift {
    --navbar-height: 0px;
}

body.path-local-nightshift,
.path-local-nightshift #page-wrapper,
.path-local-nightshift #page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.path-local-nightshift .navbar,
.path-local-nightshift .navbar.fixed-top,
.path-local-nightshift .boost-union-menubar,
.path-local-nightshift .drawer-toggles,
.path-local-nightshift .drawer-toggler {
    display: none !important;
}

.path-local-nightshift #region-main,
.path-local-nightshift #region-main .card,
.path-local-nightshift #region-main .box,
.path-local-nightshift #region-main .generalbox,
.path-local-nightshift #page-header,
.path-local-nightshift .page-header,
.path-local-nightshift .page-context-header,
.path-local-nightshift .activity-header {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: #1c1c1c !important;
    box-shadow: none !important;
}

.path-local-nightshift .page-header-headings h1,
.path-local-nightshift #page-header h1,
.path-local-nightshift h1.h2,
.path-local-nightshift .nightshift-loading-title {
    color: #ffffff !important;
}

.nightshift-shell {
    max-width: 940px;
    width: 100%;
    margin: 0 auto;
    color: #f8f7ef;
    font-family: Cairo, Tahoma, Arial, sans-serif;
}

.nightshift-topbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0.85rem;
}

.nightshift-back {
    border-radius: 999px;
}

.nightshift-mobile-note {
    display: none;
    margin: 0 0 0.45rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(184, 150, 62, 0.28);
    border-radius: 8px;
    background: rgba(184, 150, 62, 0.14);
    color: #ffe39a;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
}

.nightshift-password-shell {
    max-width: 520px;
}

.nightshift-password-card {
    display: grid;
    gap: 0.85rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(18, 24, 18, 0.88);
    color: #f8f7ef;
}

.nightshift-password-card h2 {
    margin: 0;
    color: #B8963E !important;
    font-size: 1.45rem;
    font-weight: 800;
}

.nightshift-password-card label {
    color: #f8f7ef;
    font-weight: 700;
}

.nightshift-password-card .btn {
    width: fit-content;
}

.nightshift-game {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    border: 1px solid var(--bu-global-border, rgba(79, 112, 80, 0.22));
    border-radius: 8px;
    background: var(--bu-global-surface, #ffffff);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
    overflow: hidden;
}

.nightshift-canvas {
    display: block;
    width: 100%;
    height: min(56.25vw, calc(100svh - var(--navbar-height, 60px) - 9rem), 560px);
    min-height: 280px;
    border-radius: 8px;
    outline: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.nightshift-loading {
    position: absolute;
    inset: 0;
    z-index: 3;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.45rem;
    text-align: center;
    color: #f7f5eb;
    background: rgba(15, 19, 15, 0.72);
    backdrop-filter: blur(4px);
}

.nightshift-loading[hidden] {
    display: none;
}

.nightshift-loading-title {
    color: #B8963E;
    font-weight: 800;
    font-size: 2rem;
}

.nightshift-loading-text {
    color: rgba(247, 245, 235, 0.78);
    font-size: 1rem;
}

.nightshift-loading-bar {
    width: min(320px, 72vw);
    height: 8px;
    margin-top: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.nightshift-loading-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #4f7050;
    transition: width 180ms ease;
}

.nightshift-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    background: rgba(11, 15, 11, 0.56);
    backdrop-filter: blur(3px);
}

.nightshift-overlay[hidden] {
    display: none;
}

.nightshift-card {
    width: min(92%, 560px);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(18, 24, 18, 0.88);
    color: #f8f7ef;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.nightshift-card h2 {
    margin: 0 0 0.25rem;
    color: #B8963E !important;
    font-size: 2.15rem;
    font-weight: 900;
    letter-spacing: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.nightshift-card p {
    margin: 0.45rem 0;
    line-height: 1.75;
}

.nightshift-byline,
.nightshift-mini {
    color: rgba(248, 247, 239, 0.72);
}

.nightshift-disclaimer {
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(184, 150, 62, 0.28);
    border-radius: 8px;
    background: rgba(184, 150, 62, 0.12);
    color: #ffe39a;
    font-size: 0.92rem;
}

.nightshift-start-button {
    min-width: 10rem;
    min-height: 44px;
    margin-top: 0.75rem;
}

.nightshift-prompt {
    margin-top: 0.7rem;
    color: #ffe39a;
    font-weight: 800;
    animation: nightshift-pulse 1.15s ease-in-out infinite;
}

.nightshift-scoreline strong {
    color: #ffe39a;
}

.nightshift-warning {
    margin: 0.85rem 0 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(184, 150, 62, 0.32);
    border-radius: 8px;
    background: rgba(184, 150, 62, 0.16);
    color: #ffe39a;
    animation: nightshift-fade-in 0.45s ease both;
}

.nightshift-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.nightshift-actions .btn {
    min-width: 8rem;
    min-height: 44px;
}

.path-local-nightshift .nightshift-game {
    background: #1c1c1c;
    border-color: var(--bu-global-border, rgba(255, 255, 255, 0.16));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

@media (max-width: 640px) {
    .nightshift-shell {
        margin: 0;
    }

    .nightshift-game,
    .nightshift-canvas {
        border-radius: 6px;
    }

    .nightshift-canvas {
        height: min(146vw, calc(100svh - 0.75rem), 780px);
        min-height: min(520px, calc(100svh - 0.75rem));
    }

    .nightshift-card {
        padding: 1rem;
    }

    .nightshift-card h2 {
        font-size: 1.72rem;
    }
}

@keyframes nightshift-pulse {
    0%, 100% {
        opacity: 0.55;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-1px);
    }
}

@keyframes nightshift-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .path-local-nightshift #region-main {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .path-local-nightshift #page-header,
    .path-local-nightshift .page-header,
    .path-local-nightshift .page-context-header {
        display: none !important;
    }

    .nightshift-topbar {
        margin-bottom: 0.45rem;
    }

    .nightshift-canvas {
        height: min(56.25vw, calc(100svh - var(--navbar-height, 60px) - 4.25rem), 360px);
        min-height: 220px;
    }
}

@media (max-width: 640px) and (orientation: portrait) {
    .path-local-nightshift #region-main {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .path-local-nightshift #page-header,
    .path-local-nightshift .page-header,
    .path-local-nightshift .page-context-header {
        display: none !important;
    }

    .nightshift-topbar {
        margin-bottom: 0.25rem;
    }

    .nightshift-mobile-note {
        display: block;
    }

    .nightshift-back {
        min-height: 36px;
        padding: 0.25rem 0.65rem;
        font-size: 0.875rem;
    }

    .nightshift-game {
        aspect-ratio: auto;
    }

    .nightshift-canvas,
    .nightshift-loading {
        min-height: min(460px, calc(100svh - var(--navbar-height, 60px) - 1.75rem));
    }
}