* {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: Arial, sans-serif;
            background: #0f172a;
            color: #f8fafc;
        }

        header {
            padding: 16px 24px;
            background: #020617;
            border-bottom: 1px solid #334155;
        }

        h1 {
            margin: 0 0 6px 0;
            font-size: 1.5rem;
        }

        p {
            margin: 0;
            color: #cbd5e1;
        }

        #questionScreen {
            min-height: calc(100vh - 73px);
            display: grid;
            grid-template-columns: 1fr 340px;
            gap: 18px;
            padding: 18px;
        }

        #questionFocus {
            position: relative;
            background: #020617;
            border: 1px solid #334155;
            border-radius: 14px;
            overflow: auto;
            min-height: 70vh;
        }

        .focusPanel {
            position: absolute;
            inset: 0;
            display: none;
        }

        .focusPanel.active {
            display: flex;
        }

        #questionPanel {
            align-items: center;
            justify-content: center;
            background: #020617;
        }

        #questionImage {
            width: 100%;
            height: 100%;
            max-height: calc(100vh - 110px);
            object-fit: contain;
            display: block;
        }

        #mapPanel {
            flex-direction: column;
            background: #020617;
        }

        #sidePanel {
            background: #1e293b;
            border: 1px solid #334155;
            border-radius: 14px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        #sidePanel h2 {
            margin: 0;
            font-size: 1.15rem;
        }

        .infoBox {
            padding: 12px;
            border-radius: 10px;
            background: #0f172a;
            border: 1px solid #334155;
            line-height: 1.45;
        }

        .infoBox strong {
            color: #ffffff;
        }

        button {
            padding: 10px 14px;
            border: none;
            border-radius: 8px;
            background: #2563eb;
            color: white;
            font-weight: bold;
            cursor: pointer;
            font-size: 0.95rem;
        }

        button:hover {
            background: #1d4ed8;
        }

        #openMapButton {
            background: #f97316;
            font-size: 1.05rem;
        }

        #openMapButton:hover {
            background: #ea580c;
        }

        #submitGuessButton,
        #submitGuessButtonMap {
            background: #16a34a;
        }

        #submitGuessButton:hover,
        #submitGuessButtonMap:hover {
            background: #15803d;
        }

        #clearGuessButton,
        #backToQuestionButton {
            background: #dc2626;
        }

        #clearGuessButton:hover,
        #backToQuestionButton:hover {
            background: #b91c1c;
        }

        #scoreText {
            font-size: 1.25rem;
            font-weight: bold;
            color: #facc15;
        }

        #mapToolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
            padding: 12px;
            background: #1e293b;
            border-bottom: 1px solid #334155;
        }

        #mapToolbar span {
            color: #e5e7eb;
            font-size: 0.95rem;
        }

        .toolbarLabel {
            color: #e5e7eb;
            font-weight: bold;
            font-size: 0.95rem;
        }

        #mapLayerSelect {
            padding: 9px 12px;
            border: 1px solid #475569;
            border-radius: 8px;
            background: #0f172a;
            color: #f8fafc;
            font-weight: bold;
            cursor: pointer;
        }

        #zoomSlider {
            width: 180px;
            cursor: pointer;
        }

        #mapViewport {
            position: relative;
            flex: 1;
            overflow: hidden;
            background: #020617;
            cursor: grab;
            touch-action: none;
            min-height: 0;
        }

        #mapViewport:active {
            cursor: grabbing;
        }

        #mapInner {
            position: absolute;
            top: 0;
            left: 0;
            transform-origin: 0 0;
            user-select: none;
        }

        #mapImage {
            display: block;
            max-width: none;
            user-select: none;
            -webkit-user-drag: none;
        }

        .pin {
            position: absolute;
            width: 30px;
            height: 30px;
            border: 3px solid white;
            border-radius: 50% 50% 50% 0;
            transform: translate(-50%, -100%) rotate(-45deg);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
            pointer-events: none;
        }

        .pin::after {
            content: "";
            position: absolute;
            width: 9px;
            height: 9px;
            background: white;
            border-radius: 50%;
            top: 7px;
            left: 7px;
        }

        .playerPin {
            background: #ef4444;
        }

        .answerPin {
            background: #22c55e;
        }

        #resultLine {
            position: absolute;
            height: 4px;
            background: #facc15;
            transform-origin: 0 50%;
            pointer-events: none;
            display: none;
            box-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
        }

        .popupOverlay {
            position: fixed;
            inset: 0;
            z-index: 2000;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            padding: 20px;
            background: rgba(2, 6, 23, 0);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.28s ease, background 0.28s ease;
        }

        .popupOverlay.open {
            opacity: 1;
            pointer-events: auto;
            background: rgba(2, 6, 23, 0.88);
        }

        .popupCard {
            position: relative;
            width: min(980px, 96vw);
            max-height: 94vh;
            overflow: auto;
            background: #1e293b;
            border: 1px solid #475569;
            border-radius: 18px;
            padding: 18px;
            box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
            transform: translateY(110%);
            transition: transform 0.34s ease;
        }

        .popupOverlay.open .popupCard {
            transform: translateY(0);
        }

        .popupCard h2 {
            margin: 0 42px 14px 0;
            font-size: clamp(1.4rem, 3vw, 2.4rem);
            color: #facc15;
        }

        .popupCloseButton {
            position: absolute;
            top: 14px;
            right: 14px;
            width: 38px;
            height: 38px;
            padding: 0;
            border-radius: 50%;
            background: #dc2626;
            font-size: 1.5rem;
            line-height: 1;
        }

        #popupMapPreview {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            overflow: hidden;
            background: #020617;
            border: 1px solid #334155;
            border-radius: 14px;
            margin-bottom: 14px;
        }

        #popupMapImage {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
        }

        .popupPin {
            position: absolute;
            width: 24px;
            height: 24px;
            border: 3px solid white;
            border-radius: 50% 50% 50% 0;
            transform: translate(-50%, -100%) rotate(-45deg);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
            pointer-events: none;
            z-index: 3;
        }

        .popupPin::after {
            content: "";
            position: absolute;
            width: 7px;
            height: 7px;
            background: white;
            border-radius: 50%;
            top: 6px;
            left: 6px;
        }

        .popupGuessPin {
            background: #ef4444;
        }

        .popupAnswerPin {
            background: #22c55e;
        }

        #popupResultLine {
            position: absolute;
            height: 4px;
            background: #facc15;
            transform-origin: 0 50%;
            pointer-events: none;
            z-index: 2;
            box-shadow: 0 0 8px rgba(250, 204, 21, 0.85);
        }

        .popupInfoBox,
        .popupScoreBox {
            padding: 14px;
            border-radius: 12px;
            background: #0f172a;
            border: 1px solid #334155;
            margin-top: 12px;
            line-height: 1.45;
        }

        .popupInfoBox strong,
        .popupScoreBox span {
            display: block;
            margin-bottom: 6px;
            color: #ffffff;
        }

        .popupScoreBox #scoreText {
            font-size: 1.8rem;
            font-weight: bold;
            color: #facc15;
        }

        @media (max-width: 900px) {
            #questionScreen {
                grid-template-columns: 1fr;
            }

            #questionFocus {
                min-height: 60vh;
            }

            #questionImage {
                max-height: 60vh;
            }
        }


/* Map choice popup */
.mapChoiceOverlay {
    align-items: center;
}

.mapChoiceCard {
    position: relative;
    width: min(760px, 94vw);
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
    transform: translateY(110%);
    transition: transform 0.34s ease;
}

.mapChoiceOverlay.open .mapChoiceCard {
    transform: translateY(0);
}

.mapChoiceCard h2 {
    margin: 0 42px 8px 0;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: #facc15;
}

.mapChoiceHelp {
    margin-bottom: 16px;
    color: #cbd5e1;
}

.mapChoiceCarousel {
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    gap: 14px;
    align-items: center;
}

.mapChoicePreview {
    overflow: hidden;
    border-radius: 14px;
    background: #020617;
    border: 1px solid #334155;
    text-align: center;
}

.mapChoicePreview img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.mapChoicePreview h3 {
    margin: 0;
    padding: 12px;
    font-size: 1.4rem;
}

.mapArrowButton {
    height: 56px;
    width: 56px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    padding: 0;
}

.confirmMapButton {
    width: 100%;
    margin-top: 16px;
    background: #16a34a;
    font-size: 1.05rem;
}

.confirmMapButton:hover {
    background: #15803d;
}

@media (max-width: 650px) {
    .mapChoiceCarousel {
        grid-template-columns: 44px 1fr 44px;
        gap: 8px;
    }

    .mapArrowButton {
        width: 44px;
        height: 44px;
    }
}


/* Map choice popup layout tweaks */
.mapChoiceOverlay {
    align-items: center;
    justify-content: center;
}

.mapChoiceCard {
    width: min(620px, 92vw);
    max-height: 88vh;
}

.mapChoiceCarousel {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    grid-template-areas: "previous preview next";
    gap: 12px;
    align-items: center;
}

#previousMapButton {
    grid-area: previous;
}

#nextMapButton {
    grid-area: next;
}

.mapChoicePreview {
    grid-area: preview;
}

.mapChoicePreview img {
    width: 100%;
    max-height: 260px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.mapArrowButton {
    width: 48px;
    height: 48px;
    min-width: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#changeMapButton {
    background: #7c3aed;
}

#changeMapButton:hover {
    background: #6d28d9;
}

@media (max-width: 650px) {
    .mapChoiceCard {
        width: min(520px, 94vw);
    }

    .mapChoiceCarousel {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        grid-template-areas: "previous preview next";
        gap: 8px;
    }

    .mapArrowButton {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.6rem;
    }

    .mapChoicePreview img {
        max-height: 200px;
    }
}


/* Multi-round game UI */
#runningScoreText {
    font-size: 1.35rem;
    font-weight: bold;
    color: #facc15;
}

.totalScoreLabel {
    margin-top: 12px;
}

#popupTotalScoreText,
#finalScoreText {
    font-size: 2rem;
    font-weight: bold;
    color: #facc15;
}

.finalScoreCard {
    text-align: center;
}

.finalScoreCard p {
    margin: 0 0 14px 0;
}


/* Hitman-style floor selector */
#mapViewport {
    position: relative;
}

#floorSelector {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 170px;
    pointer-events: auto;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.floorButton {
    border: 0;
    border-radius: 0;
    padding: 14px 20px;
    background: rgba(100, 116, 139, 0.5);
    color: #f8fafc;
    font-size: 1.45rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: background 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.floorButton:hover {
    background: rgba(148, 163, 184, 0.75);
}

.floorButton.selected {
    background: #ef0000;
    opacity: 1;
}

.floorButton.selected::before {
    content: "➜";
    margin-right: 12px;
}

.floorButton:not(.selected) {
    opacity: 0.82;
}

#currentFloorText {
    color: #facc15;
    font-weight: bold;
}

@media (max-width: 700px) {
    #floorSelector {
        right: 10px;
        bottom: 10px;
        min-width: 132px;
    }

    .floorButton {
        padding: 10px 14px;
        font-size: 1.05rem;
    }
}


/* Question preview button */
#questionPreviewButton {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 24;
    width: 210px;
    max-width: 42%;
    padding: 0;
    border: 2px solid rgba(248, 250, 252, 0.65);
    border-radius: 12px;
    overflow: hidden;
    background: #020617;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    pointer-events: auto;
}

#questionPreviewButton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0);
    transition: background 0.18s ease;
    pointer-events: none;
}

#questionPreviewButton:hover {
    border-color: #facc15;
}

#questionPreviewButton:hover::after {
    background: rgba(15, 23, 42, 0.22);
}

#questionPreviewImage {
    display: block;
    width: 100%;
    height: auto;
    max-height: inherit;
    object-fit: contain;
    pointer-events: none;
}

#questionPreviewHint {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.88);
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
    white-space: nowrap;
}

#questionPreviewButton:hover #questionPreviewHint {
    opacity: 1;
}

#questionPreviewResizeHandle {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 3;
    width: 26px;
    height: 100%;
    cursor: ew-resize;
    background: linear-gradient(to left, rgba(250, 204, 21, 0.45), rgba(250, 204, 21, 0));
}

#questionPreviewResizeHandle::after {
    content: "↔";
    position: absolute;
    right: 5px;
    bottom: 5px;
    color: #facc15;
    font-weight: bold;
    text-shadow: 0 1px 3px #020617;
}

@media (max-width: 700px) {
    #questionPreviewButton {
        left: 10px;
        bottom: 10px;
        width: 150px;
        max-width: 45%;
    }

    #questionPreviewHint {
        font-size: 0.72rem;
        padding: 6px 8px;
    }
}


/* Main menu */
.menuBody {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.25), transparent 34rem),
        #020617;
}

#mainMenuScreen,
#previousDaysScreen {
    width: min(920px, 92vw);
    padding: 28px;
}

.menuCard {
    padding: clamp(28px, 5vw, 56px);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid #334155;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    text-align: center;
}

.menuEyebrow {
    margin: 0 0 10px 0;
    color: #facc15;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.menuCard h1 {
    margin: 0;
    font-size: clamp(2.4rem, 8vw, 5rem);
}

.menuIntro {
    max-width: 650px;
    margin: 18px auto 0 auto;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
}

.menuButtons {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.menuButton {
    min-width: 210px;
    padding: 14px 20px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: bold;
    text-decoration: none;
    border: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.primaryMenuButton {
    background: #f97316;
    color: #ffffff;
}

.primaryMenuButton:hover {
    background: #ea580c;
}

.secondaryMenuButton {
    background: #2563eb;
    color: #ffffff;
}

.secondaryMenuButton:hover {
    background: #1d4ed8;
}

.smallNavLink {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 16px;
    color: #facc15;
    font-weight: bold;
    text-decoration: none;
}

.smallNavLink:hover {
    color: #fde68a;
}

.previousDaysCard {
    text-align: left;
}

.previousDaysCard .menuEyebrow,
.previousDaysCard h1,
.previousDaysCard .menuIntro {
    text-align: center;
}

.previousDaysList {
    margin-top: 28px;
    display: grid;
    gap: 12px;
}

.previousDayButton {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 14px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    text-decoration: none;
}

.previousDayButton:hover {
    border-color: #facc15;
    background: #1e293b;
}

.previousDayButton span {
    color: #94a3b8;
    font-weight: bold;
}

@media (max-width: 600px) {
    .previousDayButton {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* Local saved scores */
.savedScoreText {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.previousDayButton em {
    color: #facc15;
    font-style: normal;
    font-weight: bold;
    white-space: nowrap;
}


/* Locked, responsive results popup */
#resultPopup {
    align-items: center;
    padding: clamp(8px, 2vw, 18px);
}

#resultPopup .popupCard {
    width: min(980px, 96vw);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    padding: clamp(12px, 2vw, 18px);
}

#resultPopup .popupCard h2 {
    font-size: clamp(1.15rem, 3vw, 2rem);
    margin-right: 0;
    margin-bottom: clamp(8px, 1.5vw, 14px);
}

#resultPopup #popupMapPreview {
    flex: 1 1 auto;
    min-height: 180px;
    max-height: min(52dvh, 520px);
    margin-bottom: 10px;
}

#resultPopup .popupInfoBox,
#resultPopup .popupScoreBox {
    margin-top: 8px;
    padding: clamp(10px, 1.5vw, 14px);
}

#resultPopup .popupScoreBox #scoreText,
#popupTotalScoreText {
    font-size: clamp(1.35rem, 3.5vw, 2rem);
}

/* Archive completion and score colours */
.previousDayButton.scoreLow {
    background: rgba(127, 29, 29, 0.95);
    border-color: #ef4444;
}

.previousDayButton.scoreLow:hover {
    background: rgba(153, 27, 27, 0.98);
}

.previousDayButton.scoreMedium {
    background: rgba(113, 63, 18, 0.95);
    border-color: #facc15;
}

.previousDayButton.scoreMedium:hover {
    background: rgba(146, 64, 14, 0.98);
}

.previousDayButton.scoreHigh {
    background: rgba(20, 83, 45, 0.95);
    border-color: #22c55e;
}

.previousDayButton.scoreHigh:hover {
    background: rgba(22, 101, 52, 0.98);
}

.previousDayButton b {
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #020617;
    color: #f8fafc;
    font-size: 1.1rem;
}

.previousDayButton.scoreLow b,
.previousDayButton.scoreMedium b,
.previousDayButton.scoreHigh b {
    color: #facc15;
}


/* Unfinished games with 0 score stay grey/default */
.previousDayButton.scoreUnfinishedZero {
    background: #0f172a;
    border-color: #334155;
}

.previousDayButton.scoreUnfinishedZero:hover {
    background: #1e293b;
    border-color: #facc15;
}


/* Randomised fading menu background slideshow */
.menuBody {
    position: relative;
    overflow-x: hidden;
    background: #020617;
}

#backgroundSlideshow {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: #020617;
}

.backgroundSlide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 1.6s ease-in-out;
}

.backgroundSlide.active {
    opacity: 1;
}

#backgroundSlideshow::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at center, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.72)),
        rgba(2, 6, 23, 0.46);
    pointer-events: none;
}

.menuCard {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(7px);
}


/* Stretchable map preview on question page */
#questionPanel {
    position: relative;
}

#mapPreviewButton {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 24;
    width: 210px;
    max-width: 78%;
    min-height: 90px;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 2px solid rgba(248, 250, 252, 0.65);
    border-radius: 12px;
    overflow: hidden;
    background: #020617;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    pointer-events: auto;
}

#mapPreviewButton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0);
    transition: background 0.18s ease;
    pointer-events: none;
}

#mapPreviewButton:hover {
    border-color: #facc15;
}

#mapPreviewButton:hover::after {
    background: rgba(15, 23, 42, 0.22);
}

#mapPreviewImage {
    display: block;
    width: 100%;
    height: 100%;
    max-height: inherit;
    object-fit: contain;
    pointer-events: none;
}

#mapPreviewHint {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.88);
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
    white-space: nowrap;
}

#mapPreviewButton:hover #mapPreviewHint {
    opacity: 1;
}

#mapPreviewResizeHandle {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 3;
    width: 26px;
    height: 100%;
    cursor: ew-resize;
    background: linear-gradient(to left, rgba(250, 204, 21, 0.45), rgba(250, 204, 21, 0));
}

#mapPreviewResizeHandle::after {
    content: "↔";
    position: absolute;
    right: 5px;
    bottom: 5px;
    color: #facc15;
    font-weight: bold;
    text-shadow: 0 1px 3px #020617;
}

@media (max-width: 700px) {
    #mapPreviewButton {
        left: 10px;
        bottom: 10px;
        width: 150px;
        max-width: 78%;
        min-height: 72px;
    }

    #mapPreviewHint {
        font-size: 0.72rem;
        padding: 6px 8px;
    }
}


/* Neutral mini-map state before the player chooses a map */
#mapPreviewButton.empty {
    background:
        linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(2, 6, 23, 0.95));
}

#mapPreviewButton.empty #mapPreviewImage {
    opacity: 0;
}

#mapPreviewPlaceholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    color: #facc15;
    font-weight: 800;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    pointer-events: none;
}

#mapPreviewButton.empty #mapPreviewPlaceholder {
    display: flex;
}


/* Hitman-style final score screen */
.hitmanScoreCard {
    width: min(1240px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(460px, 1.1fr);
    gap: 28px;
    padding: 28px;
    color: #f8fafc;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(15, 23, 42, 0.93));
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.68);
    overflow: hidden;
}

.hitmanScoreLeft {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.hitmanScoreImage {
    width: 100%;
    height: 100%;
    min-height: 520px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.hitmanScoreRight {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.hitmanBadge {
    display: flex;
    justify-content: center;
}

.hitmanBadgeCircle {
    width: 142px;
    height: 142px;
    display: grid;
    place-items: center;
    border: 6px double #f8fafc;
    border-radius: 50%;
    color: #020617;
    background: #f8fafc;
    box-shadow: 0 0 0 7px rgba(248, 250, 252, 0.2);
}

.hitmanBadgeCircle span {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hitmanRankBar {
    padding: 9px 12px;
    background: #ef0000;
    color: #fff;
    text-align: center;
    font-size: 1.08rem;
    font-weight: 900;
    text-transform: uppercase;
}

.hitmanStatsGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
}

.hitmanStatBox {
    min-height: 78px;
    padding: 8px;
    background: #f8fafc;
    color: #111827;
    border-right: 1px solid #64748b;
}

.hitmanStatBox span {
    display: block;
    color: #ef0000;
    font-size: 0.72rem;
    font-weight: 900;
}

.hitmanStatBox strong {
    display: block;
    font-size: 1.38rem;
    line-height: 1.05;
    font-weight: 900;
}

.hitmanStatBox small {
    display: block;
    margin-top: 3px;
    font-size: 0.58rem;
    font-weight: 800;
}

.hitmanStars {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1;
    letter-spacing: -0.06em;
    white-space: nowrap;
    color: #111827;
}

.hitmanMainMenuButton {
    align-self: flex-end;
    margin-top: 6px;
    padding: 10px 18px;
    border: none;
    background: #f8fafc;
    color: #111827;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.hitmanMainMenuButton:hover {
    background: #ef0000;
    color: #fff;
}

@media (max-width: 860px) {
    .hitmanScoreCard {
        grid-template-columns: 1fr;
        padding: 20px;
        overflow-y: auto;
    }

    .hitmanScoreLeft {
        min-height: 220px;
    }

    .hitmanScoreImage {
        min-height: 220px;
    }

    .hitmanStatsGrid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}


/* Centred and animated Hitman-style final score screen refinements */
#finalPopup.open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hitmanScoreCard {
    margin: auto;
    align-self: center;
    justify-self: center;
}

.hitmanScoreRight {
    align-items: stretch;
    text-align: left;
}

.hitmanStars {
    width: 100%;
    max-width: 100%;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1;
    letter-spacing: -0.06em;
    white-space: nowrap;
    overflow: visible;
    min-height: 1.08em;
}

#finalTimeText {
    font-size: clamp(1.25rem, 2.2vw, 1.9rem);
    letter-spacing: -0.05em;
    white-space: nowrap;
}

#finalScoreText {
    font-size: clamp(1.15rem, 2vw, 1.75rem);
    letter-spacing: -0.05em;
    white-space: nowrap;
}

#finalStarLabel {
    font-size: 0.74rem;
}

.hitmanStatBox {
    min-height: 112px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hitmanStars.pop {
    animation: starPop 0.18s ease-out;
}

#finalScoreText.scoreReveal {
    animation: scoreReveal 0.45s ease-out;
}

@keyframes starPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.18);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes scoreReveal {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1040px) {
    .hitmanStatsGrid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    #finalScoreText,
    #finalTimeText {
        white-space: normal;
    }
}

@media (max-width: 860px) {
    #finalPopup.open {
        align-items: flex-start;
    }

    .hitmanScoreCard {
        margin-top: 8px;
    }

    .hitmanStatBox {
        min-height: 100px;
    }
}


/* Keep all 5 stars visible inside the final rating box */
.hitmanStatBox:first-child {
    min-width: 0;
}

#finalStarRating {
    display: block;
    transform-origin: left center;
}

@media (max-width: 1200px) {
    #finalStarRating {
        font-size: clamp(1.25rem, 1.8vw, 1.6rem);
        letter-spacing: -0.08em;
    }
}

@media (max-width: 1040px) {
    #finalStarRating {
        font-size: 1.8rem;
        letter-spacing: -0.04em;
    }
}


/* Equal final score boxes */
.hitmanStatsGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
}

.hitmanStatBox {
    min-width: 0;
    overflow: hidden;
}

#finalStarRating,
#finalTimeText,
#finalScoreText {
    max-width: 100%;
    overflow: visible;
}

#finalTimeText,
#finalScoreText {
    line-height: 1.05;
}

@media (max-width: 1040px) {
    .hitmanStatsGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #finalStarRating {
        font-size: clamp(1.2rem, 2.6vw, 1.65rem);
    }

    #finalTimeText {
        font-size: clamp(1.05rem, 2.35vw, 1.45rem);
    }

    #finalScoreText {
        font-size: clamp(1rem, 2.1vw, 1.35rem);
    }
}

@media (max-width: 760px) {
    .hitmanStatsGrid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    #finalStarRating {
        font-size: 2rem;
    }

    #finalTimeText {
        font-size: 2rem;
    }

    #finalScoreText {
        font-size: 1.8rem;
    }
}


/* Hitman-style round score screen */
.hitmanRoundScoreCard {
    width: min(980px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px;
    color: #f8fafc;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(15, 23, 42, 0.93));
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.68);
    overflow: auto;
    margin: auto;
}

.hitmanRoundHeader {
    display: grid;
    gap: 6px;
}

.hitmanRoundEyebrow {
    margin: 0;
    color: #ef0000;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hitmanRoundHeader h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.45rem);
    line-height: 1.05;
    text-transform: uppercase;
}

.hitmanRoundScoreCard #popupMapPreview {
    width: 100%;
    height: clamp(240px, 38dvh, 430px);
    max-height: none;
    border: 1px solid rgba(248, 250, 252, 0.35);
    background: #020617;
}

.hitmanRoundInfoBox {
    padding: 12px 14px;
    background: rgba(148, 163, 184, 0.18);
    border-left: 5px solid #ef0000;
    font-size: 0.92rem;
}

.hitmanRoundInfoBox strong {
    display: block;
    margin-bottom: 4px;
    color: #ef0000;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hitmanRoundStatsGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
}

.hitmanRoundStatsGrid .hitmanStatBox {
    min-height: 96px;
    min-width: 0;
    overflow: hidden;
}

.hitmanRoundStatsGrid #roundTimeText,
.hitmanRoundStatsGrid #scoreText,
.hitmanRoundStatsGrid #popupTotalScoreText {
    font-size: clamp(1.15rem, 2vw, 1.75rem);
    letter-spacing: -0.05em;
    white-space: nowrap;
    line-height: 1.05;
}

.hitmanRoundScoreCard .hitmanMainMenuButton {
    align-self: flex-end;
}

@media (max-width: 760px) {
    .hitmanRoundScoreCard {
        padding: 18px;
    }

    .hitmanRoundStatsGrid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .hitmanRoundStatsGrid #roundTimeText,
    .hitmanRoundStatsGrid #scoreText,
    .hitmanRoundStatsGrid #popupTotalScoreText {
        font-size: 1.65rem;
        white-space: normal;
    }
}


/* Hitman-style previous days archive */
.previousDaysCard {
    width: min(980px, calc(100vw - 28px));
}

.previousDaysList {
    display: grid;
    gap: 12px;
}

.previousScoreCard {
    overflow: hidden;
    color: #f8fafc;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

.previousScoreCard.completed {
    border-color: rgba(239, 0, 0, 0.5);
}

.previousScoreToggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border: none;
    color: #f8fafc;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.previousScoreToggle:hover {
    background: rgba(248, 250, 252, 0.08);
}

.previousScoreDate {
    display: grid;
    gap: 3px;
}

.previousScoreDate strong {
    font-size: 1.02rem;
    text-transform: uppercase;
}

.previousScoreDate em {
    color: #cbd5e1;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.previousScoreStatus {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #020617;
    background: #f8fafc;
    border-radius: 50%;
    font-weight: 900;
}

.previousScoreCard:not(.completed) .previousScoreStatus {
    color: #f8fafc;
    background: #475569;
}

.previousScoreDetails {
    display: none;
    padding: 0 18px 18px;
}

.previousScoreCard.open .previousScoreDetails {
    display: grid;
    gap: 12px;
}

.previousScoreStatsGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
}

.previousScoreStatsGrid .hitmanStatBox {
    min-height: 88px;
    min-width: 0;
    overflow: hidden;
}

.previousScoreStatsGrid .hitmanStatBox strong {
    font-size: clamp(1rem, 1.8vw, 1.42rem);
    white-space: nowrap;
}

.previousScoreStatsGrid .hitmanStatBox:first-child strong {
    font-size: clamp(1.25rem, 1.8vw, 1.7rem);
    letter-spacing: -0.08em;
}

.previousPlayButton {
    justify-self: end;
    padding: 10px 22px;
    color: #111827;
    background: #f8fafc;
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
}

.previousPlayButton:hover {
    color: #fff;
    background: #ef0000;
}

@media (max-width: 900px) {
    .previousScoreStatsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
}

@media (max-width: 560px) {
    .previousScoreStatsGrid {
        grid-template-columns: 1fr;
    }

    .previousScoreStatsGrid .hitmanStatBox strong {
        white-space: normal;
    }

    .previousPlayButton {
        justify-self: stretch;
        text-align: center;
    }
}


/* Prevent long archive rank names from spilling off-screen */
.previousScoreDetails .hitmanRankBar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.05;
    font-size: clamp(0.82rem, 2.2vw, 1.08rem);
    padding-left: 10px;
    padding-right: 10px;
}

.previousScoreStatsGrid .hitmanStatBox strong {
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.05;
}

.previousScoreStatsGrid .hitmanStatBox:nth-child(4) strong {
    font-size: clamp(0.78rem, 1.45vw, 1.12rem);
    white-space: normal;
}

@media (max-width: 560px) {
    .previousScoreDetails .hitmanRankBar {
        font-size: clamp(0.72rem, 4vw, 0.95rem);
    }

    .previousScoreStatsGrid .hitmanStatBox:nth-child(4) strong {
        font-size: 1rem;
    }
}


/* Hitman-style index menu retained */
.hitmanMenuCard,
.menuCard {
    color: #f8fafc;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.hitmanMenuRankBar {
    width: 100%;
    margin: 14px 0 18px;
    padding: 9px 12px;
    background: #ef0000;
    color: #fff;
    text-align: center;
    font-size: clamp(0.86rem, 2vw, 1.08rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hitmanMenuCard h1,
.menuCard h1 {
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hitmanMenuCard p,
.menuCard p {
    color: #cbd5e1;
}

.hitmanMenuButton,
.menuButton,
.primaryButton,
.secondaryButton {
    border: none;
    background: #f8fafc;
    color: #111827;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: none;
}

.hitmanMenuButton:hover,
.menuButton:hover,
.primaryButton:hover,
.secondaryButton:hover {
    background: #ef0000;
    color: #fff;
}

/* Daily page: buttons only */
.dailyBody button,
.dailyBody .confirmMapButton,
.dailyBody .controlButton,
.dailyBody #submitButton,
.dailyBody #mapButton,
.dailyBody #backToQuestionButton,
.dailyBody #returnToMapChoiceButton,
.dailyBody #nextRoundButton,
.dailyBody .mapChoiceArrow {
    border: none;
    background: #f8fafc;
    color: #111827;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: none;
}

.dailyBody button:hover,
.dailyBody .confirmMapButton:hover,
.dailyBody .controlButton:hover,
.dailyBody #submitButton:hover,
.dailyBody #mapButton:hover,
.dailyBody #backToQuestionButton:hover,
.dailyBody #returnToMapChoiceButton:hover,
.dailyBody #nextRoundButton:hover,
.dailyBody .mapChoiceArrow:hover {
    background: #ef0000;
    color: #fff;
}

.dailyBody button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dailyBody #floorSelector button.selected {
    background: #ef0000;
    color: #fff;
}


/* Softer Hitman-style daily page refresh */
.hitmanDailySoft {
    color: #f8fafc;
    background:
        radial-gradient(circle at 12% 10%, rgba(148, 163, 184, 0.12), transparent 26%),
        linear-gradient(90deg, #020617, #0f172a);
}

.hitmanDailySoft .gameHeader,
.hitmanDailySoft header,
.hitmanDailySoft .topBar {
    color: #f8fafc;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

.hitmanDailySoft h1 {
    color: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.dailyMissionBar {
    width: min(420px, 100%);
    margin: 10px auto 0;
    padding: 8px 12px;
    background: #ef0000;
    color: #fff;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Keep the existing layout, only retheme the main play panels */
.hitmanDailySoft #questionPanel,
.hitmanDailySoft .questionPanel,
.hitmanDailySoft .questionCard,
.hitmanDailySoft .gamePanel,
.hitmanDailySoft .mapPanel,
.hitmanDailySoft .controlsPanel {
    color: #f8fafc;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

.hitmanDailySoft #questionPanel h2,
.hitmanDailySoft .questionCard h2,
.hitmanDailySoft .gamePanel h2 {
    color: #fff;
    background: #ef0000;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 900;
}

/* White stat-chip look for score and round information */
.hitmanDailySoft #runningScoreText,
.hitmanDailySoft #roundCounter,
.hitmanDailySoft .scoreDisplay,
.hitmanDailySoft .roundDisplay,
.hitmanDailySoft .currentScore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    color: #111827;
    background: #f8fafc;
    border: none;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Daily button style, matching score/archive screens */
.hitmanDailySoft button,
.hitmanDailySoft .confirmMapButton,
.hitmanDailySoft .controlButton,
.hitmanDailySoft #submitButton,
.hitmanDailySoft #mapButton,
.hitmanDailySoft #backToQuestionButton,
.hitmanDailySoft #returnToMapChoiceButton,
.hitmanDailySoft #nextRoundButton,
.hitmanDailySoft .mapChoiceArrow {
    border: none;
    background: #f8fafc;
    color: #111827;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: none;
}

.hitmanDailySoft button:hover,
.hitmanDailySoft .confirmMapButton:hover,
.hitmanDailySoft .controlButton:hover,
.hitmanDailySoft #submitButton:hover,
.hitmanDailySoft #mapButton:hover,
.hitmanDailySoft #backToQuestionButton:hover,
.hitmanDailySoft #returnToMapChoiceButton:hover,
.hitmanDailySoft #nextRoundButton:hover,
.hitmanDailySoft .mapChoiceArrow:hover {
    background: #ef0000;
    color: #fff;
}

.hitmanDailySoft button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Map selector and popups share the same visual language */
.hitmanDailySoft .mapChoiceCard,
.hitmanDailySoft .popupCard {
    color: #f8fafc;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(15, 23, 42, 0.93));
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.68);
}

.hitmanDailySoft .mapChoiceCard h2,
.hitmanDailySoft .popupCard h2 {
    color: #fff;
    background: #ef0000;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 900;
}

/* Floor buttons */
.hitmanDailySoft #floorSelector button {
    background: #f8fafc;
    color: #111827;
}

.hitmanDailySoft #floorSelector button:hover,
.hitmanDailySoft #floorSelector button.selected {
    background: #ef0000;
    color: #fff;
}

/* Preserve result and final score screens */
.hitmanDailySoft .hitmanRoundScoreCard,
.hitmanDailySoft .hitmanScoreCard {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(15, 23, 42, 0.93));
}


/* Daily UI fixes: running total, map selector controls, restored mini previews */
.hitmanDailySoft #runningScoreText,
.hitmanDailySoft .currentScore,
.hitmanDailySoft .scoreDisplay {
    display: grid;
    gap: 3px;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 58px;
    padding: 10px 14px;
    color: #f8fafc;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-left: 6px solid #ef0000;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
    text-align: center;
    line-height: 1.05;
}

.hitmanDailySoft #runningScoreText::before,
.hitmanDailySoft .currentScore::before,
.hitmanDailySoft .scoreDisplay::before {
    content: "Running Total";
    color: #ef0000;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Put the close button on the corner instead of squeezed inside it */
.hitmanDailySoft .mapChoiceCard,
.hitmanDailySoft .popupCard {
    position: relative;
}

.hitmanDailySoft #closeMapChoiceButton,
.hitmanDailySoft .closeMapChoiceButton,
.hitmanDailySoft .closeButton,
.hitmanDailySoft .popupCloseButton {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 20;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    line-height: 1;
    overflow: visible;
    white-space: nowrap;
}

/* Centre carousel arrows vertically and horizontally */
.hitmanDailySoft .mapChoiceArrow {
    display: grid;
    place-items: center;
    text-align: center;
    line-height: 1;
    padding: 0;
}

.hitmanDailySoft .mapChoiceCarousel,
.hitmanDailySoft .mapChoicePreviewRow,
.hitmanDailySoft .mapChoiceContent {
    align-items: center;
}

/* Revert mini question/map previews away from the red refresh */
.hitmanDailySoft #questionPreviewButton,
.hitmanDailySoft #mapPreviewButton {
    border-color: rgba(248, 250, 252, 0.65);
    background: #020617;
}

.hitmanDailySoft #questionPreviewButton:hover,
.hitmanDailySoft #mapPreviewButton:hover {
    border-color: #facc15;
}

.hitmanDailySoft #questionPreviewHint,
.hitmanDailySoft #mapPreviewHint {
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0));
}

.hitmanDailySoft #questionPreviewResizeHandle,
.hitmanDailySoft #mapPreviewResizeHandle {
    background: linear-gradient(to left, rgba(250, 204, 21, 0.45), rgba(250, 204, 21, 0));
}

.hitmanDailySoft #questionPreviewResizeHandle::after,
.hitmanDailySoft #mapPreviewResizeHandle::after {
    color: #111827;
    background: #facc15;
}

@media (max-width: 700px) {
    .hitmanDailySoft #runningScoreText,
    .hitmanDailySoft .currentScore,
    .hitmanDailySoft .scoreDisplay {
        min-width: 120px;
        min-height: 50px;
        padding: 8px 10px;
    }

    .hitmanDailySoft #closeMapChoiceButton,
    .hitmanDailySoft .closeMapChoiceButton,
    .hitmanDailySoft .closeButton,
    .hitmanDailySoft .popupCloseButton {
        top: -10px;
        right: -10px;
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }
}


/* Map selector alignment fix */
.hitmanDailySoft .mapChoiceCard {
    position: relative;
    padding-top: 34px;
    overflow: visible;
}

.hitmanDailySoft .mapChoiceCard h2 {
    margin-top: 0;
    margin-right: 0;
    padding-right: 12px;
}

/* Keep the X outside the title bar so it does not interrupt the red strip */
.hitmanDailySoft #closeMapChoiceButton,
.hitmanDailySoft .closeMapChoiceButton,
.hitmanDailySoft .mapChoiceCloseButton,
.hitmanDailySoft .closeButton,
.hitmanDailySoft .popupCloseButton {
    position: absolute;
    top: -20px;
    right: -20px;
    z-index: 30;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    line-height: 1;
    overflow: visible;
    transform: none;
}

/* Centre the left/right arrows against the image preview */
.hitmanDailySoft .mapChoiceCarousel,
.hitmanDailySoft .mapChoicePreviewRow,
.hitmanDailySoft .mapChoiceContent {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    column-gap: 10px;
}

.hitmanDailySoft .mapChoiceArrow {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    justify-self: center;
    align-self: center;
    display: grid;
    place-items: center;
    line-height: 1;
    text-align: center;
    border-radius: 50%;
}

.hitmanDailySoft .mapChoiceArrow:first-of-type {
    grid-column: 1;
}

.hitmanDailySoft .mapChoicePreview,
.hitmanDailySoft .mapChoiceImageWrap,
.hitmanDailySoft .mapChoiceSelected,
.hitmanDailySoft .mapChoiceMapCard {
    grid-column: 2;
    justify-self: stretch;
    align-self: center;
}

.hitmanDailySoft .mapChoiceArrow:last-of-type {
    grid-column: 3;
}

@media (max-width: 620px) {
    .hitmanDailySoft .mapChoiceCard {
        padding-top: 30px;
    }

    .hitmanDailySoft #closeMapChoiceButton,
    .hitmanDailySoft .closeMapChoiceButton,
    .hitmanDailySoft .mapChoiceCloseButton,
    .hitmanDailySoft .closeButton,
    .hitmanDailySoft .popupCloseButton {
        top: -14px;
        right: -10px;
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .hitmanDailySoft .mapChoiceCarousel,
    .hitmanDailySoft .mapChoicePreviewRow,
    .hitmanDailySoft .mapChoiceContent {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        column-gap: 6px;
    }

    .hitmanDailySoft .mapChoiceArrow {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
}


/* Final map selector positioning fix */
.hitmanDailySoft .mapChoiceCard {
    position: relative;
    overflow: visible;
}

/* Move X fully clear of the red heading */
.hitmanDailySoft #closeMapChoiceButton,
.hitmanDailySoft .closeMapChoiceButton,
.hitmanDailySoft .mapChoiceCloseButton,
.hitmanDailySoft .closeButton,
.hitmanDailySoft .popupCloseButton {
    position: absolute;
    top: -34px;
    right: -34px;
    z-index: 50;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    line-height: 1;
}

/* Keep title full width and uninterrupted */
.hitmanDailySoft .mapChoiceCard h2 {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px;
    padding: 8px 12px;
}

/* Put arrows in true absolute vertical centre beside the image/card */
.hitmanDailySoft .mapChoiceCarousel {
    position: relative;
    display: block;
    padding: 0 58px;
}

.hitmanDailySoft .mapChoiceCarousel .mapChoiceArrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    line-height: 1;
    text-align: center;
}

.hitmanDailySoft .mapChoiceCarousel .mapChoiceArrow:first-of-type {
    left: 0;
}

.hitmanDailySoft .mapChoiceCarousel .mapChoiceArrow:last-of-type {
    right: 0;
}

/* The preview itself remains centred */
.hitmanDailySoft .mapChoiceMapCard,
.hitmanDailySoft .mapChoicePreview,
.hitmanDailySoft .mapChoiceImageWrap,
.hitmanDailySoft .mapChoiceSelected {
    margin-left: auto;
    margin-right: auto;
}

/* Cancel the earlier grid selector rule if it exists later/earlier */
.hitmanDailySoft .mapChoicePreviewRow,
.hitmanDailySoft .mapChoiceContent {
    align-items: center;
}

@media (max-width: 620px) {
    .hitmanDailySoft #closeMapChoiceButton,
    .hitmanDailySoft .closeMapChoiceButton,
    .hitmanDailySoft .mapChoiceCloseButton,
    .hitmanDailySoft .closeButton,
    .hitmanDailySoft .popupCloseButton {
        top: -28px;
        right: -12px;
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .hitmanDailySoft .mapChoiceCarousel {
        padding: 0 44px;
    }

    .hitmanDailySoft .mapChoiceCarousel .mapChoiceArrow {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
}


/* Hard map selector layout fix */
.hitmanDailySoft .mapChoiceCard {
    position: relative !important;
    overflow: visible !important;
    padding: 26px 20px 20px !important;
}

/* X sits above the card, not over the title */
.hitmanDailySoft #closeMapChoiceButton,
.hitmanDailySoft .mapChoiceCloseButton {
    position: absolute !important;
    top: -52px !important;
    right: -8px !important;
    z-index: 100 !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 50% !important;
    line-height: 1 !important;
    transform: none !important;
}

/* Red title is full width and never has to share space with the X */
.hitmanDailySoft .mapChoiceCard h2 {
    width: 100% !important;
    margin: 0 0 10px !important;
    padding: 9px 12px !important;
    box-sizing: border-box !important;
}

/* Turn carousel into a stable positioning area */
.hitmanDailySoft .mapChoiceCarousel {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    padding: 0 58px !important;
    box-sizing: border-box !important;
}

/* Centre the preview in the available space */
.hitmanDailySoft .mapChoiceMapCard,
.hitmanDailySoft .mapChoicePreview,
.hitmanDailySoft .mapChoiceImageWrap,
.hitmanDailySoft .mapChoiceSelected {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* The arrows are no longer in document flow */
.hitmanDailySoft #previousMapButton,
.hitmanDailySoft #nextMapButton,
.hitmanDailySoft .mapChoiceArrowLeft,
.hitmanDailySoft .mapChoiceArrowRight {
    position: absolute !important;
    top: 50% !important;
    z-index: 50 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 50% !important;
    line-height: 1 !important;
    text-align: center !important;
    transform: translateY(-50%) !important;
}

.hitmanDailySoft #previousMapButton,
.hitmanDailySoft .mapChoiceArrowLeft {
    left: 0 !important;
}

.hitmanDailySoft #nextMapButton,
.hitmanDailySoft .mapChoiceArrowRight {
    right: 0 !important;
}

/* If old rules put arrows into grid cells, override that too */
.hitmanDailySoft .mapChoiceArrow:first-of-type,
.hitmanDailySoft .mapChoiceArrow:last-of-type {
    grid-column: auto !important;
    align-self: auto !important;
    justify-self: auto !important;
}

@media (max-width: 620px) {
    .hitmanDailySoft .mapChoiceCard {
        padding: 24px 14px 16px !important;
    }

    .hitmanDailySoft #closeMapChoiceButton,
    .hitmanDailySoft .mapChoiceCloseButton {
        top: -44px !important;
        right: 0 !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
    }

    .hitmanDailySoft .mapChoiceCarousel {
        padding: 0 44px !important;
    }

    .hitmanDailySoft #previousMapButton,
    .hitmanDailySoft #nextMapButton,
    .hitmanDailySoft .mapChoiceArrowLeft,
    .hitmanDailySoft .mapChoiceArrowRight {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
}


/* Mobile mini preview size fix */
@media (max-width: 700px) {
    #questionPreviewButton,
    #mapPreviewButton,
    .hitmanDailySoft #questionPreviewButton,
    .hitmanDailySoft #mapPreviewButton {
        width: 112px !important;
        max-width: 34vw !important;
        min-height: 62px !important;
        max-height: 82px !important;
        border-radius: 9px !important;
    }

    #questionPreviewButton {
        left: 8px !important;
        bottom: 8px !important;
    }

    #mapPreviewButton {
        left: 8px !important;
        bottom: 8px !important;
    }

    #questionPreviewHint,
    #mapPreviewHint,
    .hitmanDailySoft #questionPreviewHint,
    .hitmanDailySoft #mapPreviewHint {
        padding: 14px 6px 5px !important;
        font-size: 0.58rem !important;
        letter-spacing: 0.04em !important;
    }

    #mapPreviewPlaceholder {
        padding: 8px !important;
        font-size: 0.72rem !important;
        letter-spacing: 0.05em !important;
    }

    #questionPreviewResizeHandle,
    #mapPreviewResizeHandle {
        width: 18px !important;
    }

    #questionPreviewResizeHandle::after,
    #mapPreviewResizeHandle::after {
        right: 3px !important;
        bottom: 3px !important;
        width: 16px !important;
        height: 16px !important;
        font-size: 0.62rem !important;
    }
}

@media (max-width: 430px) {
    #questionPreviewButton,
    #mapPreviewButton,
    .hitmanDailySoft #questionPreviewButton,
    .hitmanDailySoft #mapPreviewButton {
        width: 96px !important;
        max-width: 30vw !important;
        min-height: 54px !important;
        max-height: 70px !important;
    }

    #questionPreviewHint,
    #mapPreviewHint,
    .hitmanDailySoft #questionPreviewHint,
    .hitmanDailySoft #mapPreviewHint {
        font-size: 0.52rem !important;
    }
}


/* Responsive floor selector scale-only fix */
#floorSelector {
    transform-origin: right bottom !important;
}

@media (max-width: 900px) {
    #floorSelector {
        transform: scale(0.88) !important;
    }
}

@media (max-width: 700px) {
    #floorSelector {
        transform: scale(0.72) !important;
        right: 8px !important;
        bottom: 8px !important;
    }
}

@media (max-width: 430px) {
    #floorSelector {
        transform: scale(0.58) !important;
        right: 6px !important;
        bottom: 6px !important;
    }
}


/* Daily title moved into red mission bar */
.visuallyHidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#dailyMissionBar.dailyMissionBar {
    margin-top: 0;
}


/* Compact daily header: menu button and round banner on one row */
.dailyCompactHeader {
    padding: 10px 16px;
}

.dailyHeaderRow {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.dailyHeaderMenuButton.smallNavLink {
    margin: 0;
    min-height: 42px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: #f8fafc;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    white-space: nowrap;
}

.dailyHeaderMenuButton.smallNavLink:hover {
    color: #fff;
    background: #ef0000;
}

#dailyMissionBar.dailyMissionBar {
    width: 100%;
    margin: 0;
    padding: 13px 16px;
    font-size: clamp(1rem, 2.1vw, 1.45rem);
    line-height: 1;
}

@media (max-width: 560px) {
    .dailyCompactHeader {
        padding: 8px 10px;
    }

    .dailyHeaderRow {
        gap: 8px;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dailyHeaderMenuButton.smallNavLink {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 0.72rem;
        letter-spacing: 0.03em;
    }

    #dailyMissionBar.dailyMissionBar {
        padding: 10px 8px;
        font-size: clamp(0.82rem, 4.2vw, 1.05rem);
        letter-spacing: 0.05em;
    }
}


/* Site disclaimer footer */
.siteDisclaimerFooter {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 8px 14px;
    background: rgba(2, 6, 23, 0.88);
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    backdrop-filter: blur(6px);
    text-align: center;
}

.siteDisclaimerFooter p {
    margin: 0;
    color: #cbd5e1;
    font-size: clamp(0.62rem, 1.5vw, 0.78rem);
    line-height: 1.35;
}

/* Make room for the footer */
.menuBody,
.dailyBody {
    padding-bottom: 44px;
}

/* Contact page */
#contactScreen {
    width: min(920px, 92vw);
    padding: 28px;
}

.contactCard {
    text-align: left;
}

.contactCard .menuEyebrow,
.contactCard h1,
.contactCard .hitmanMenuRankBar,
.contactCard .menuIntro {
    text-align: center;
}

.contactForm {
    margin: 26px auto 0;
    width: min(680px, 100%);
    display: grid;
    gap: 10px;
}

.contactForm label {
    color: #f8fafc;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contactForm label span {
    color: #94a3b8;
    font-size: 0.72rem;
}

.contactForm select,
.contactForm textarea,
.contactForm input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.92);
    color: #f8fafc;
    font: inherit;
    outline: none;
}

.contactForm select:focus,
.contactForm textarea:focus,
.contactForm input:focus {
    border-color: #ef0000;
}

.contactForm textarea {
    resize: vertical;
    min-height: 150px;
}

.contactSubmitButton {
    justify-self: end;
    margin-top: 10px;
    border-radius: 0;
}

.contactSuccessMessage {
    width: min(680px, 100%);
    margin: 18px auto 0;
    padding: 12px 14px;
    color: #111827;
    background: #f8fafc;
    border-left: 6px solid #ef0000;
    font-weight: 900;
    text-align: center;
}

@media (max-width: 650px) {
    .siteDisclaimerFooter {
        position: static;
        margin-top: 18px;
    }

    .menuBody,
    .dailyBody {
        padding-bottom: 0;
    }

    #contactScreen {
        padding: 18px;
    }

    .contactSubmitButton {
        justify-self: stretch;
    }
}


/* Final score emblem badge */
.hitmanBadgeCircle {
    overflow: hidden;
}

.hitmanBadgeEmblem {
    width: 76%;
    height: 76%;
    object-fit: contain;
    display: block;
}


/* Final score personal best flashes */
.personalBestFlash {
    margin-top: 7px;
    padding: 5px 7px;
    color: #fff;
    background: #ef0000;
    font-size: 0.68rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1.05;
}

.personalBestFlash.flashNow {
    animation: personalBestFlashPulse 0.75s ease-in-out 0s 5;
}

@keyframes personalBestFlashPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.25;
        transform: scale(1.04);
    }
}
