/*
GeoRankle UI 7.2

Controls, puzzle information, progress indicators,
comparison guide and disabled interface states.

Cache version: 7200
*/

/* =========================================================
   Sound control
   ========================================================= */

.game-topbar {
    display: grid;
    grid-template-columns:
        46px
        minmax(0, 1fr)
        46px;
    align-items: center;
    gap: 12px;

    width: 100%;
    margin: 0 0 28px;
}

.game-topbar .game-badge {
    grid-column: 2;
    grid-row: 1;

    margin: 0 auto;
}

.sound-toggle {
    position: relative;
    z-index: 8;

    grid-column: 3;
    grid-row: 1;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;

    border: 1px solid #dbeafe;
    border-radius: 15px;

    appearance: none;
    -webkit-appearance: none;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #edf7ff
        );

    color: #1f2937;
    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.09),
        inset 0 1px 0 #ffffff;

    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background-color 0.16s ease;
}

.sound-toggle:hover {
    border-color: #93c5fd;

    transform: translateY(-2px);

    box-shadow:
        0 11px 24px rgba(37, 99, 235, 0.14),
        inset 0 1px 0 #ffffff;
}

.sound-toggle:active {
    transform: translateY(1px);
}

.sound-toggle:focus-visible {
    outline: 3px solid rgba(18, 146, 242, 0.28);
    outline-offset: 3px;
}

.sound-toggle.is-muted {
    border-color: #e2e8f0;
    background: #f1f5f9;
    color: #64748b;
}

.sound-toggle-icon {
    display: block;

    font-size: 21px;
    line-height: 1;
}

/* =========================================================
   Guess controls
   ========================================================= */

.guess-section,
.game-controls,
.guess-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 14px;

    width: 100%;
    min-width: 0;
    margin: 0 0 22px;
}

.autocomplete-wrapper {
    position: relative;

    width: 100%;
    min-width: 0;

    color-scheme: light;
}

/* =========================================================
   Country input
   ========================================================= */

#countryInput,
.guess-section input,
.game-controls input,
.guess-controls input {
    display: block;

    width: 100%;
    min-width: 0;
    height: 58px;
    margin: 0;
    padding: 0 20px;

    border: 2px solid #dbeafe;
    border-radius: 18px;

    appearance: none;
    -webkit-appearance: none;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fbff 100%
        );

    color: #111827;
    caret-color: #1292f2;

    font-family:
        Nunito,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 17px;
    font-weight: 800;
    line-height: 1;

    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

#countryInput::placeholder,
.guess-section input::placeholder,
.game-controls input::placeholder,
.guess-controls input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

#countryInput:hover:not(:disabled),
.guess-section input:hover:not(:disabled),
.game-controls input:hover:not(:disabled),
.guess-controls input:hover:not(:disabled) {
    border-color: #bfdbfe;
}

#countryInput:focus,
#countryInput:focus-visible,
.guess-section input:focus,
.guess-section input:focus-visible,
.game-controls input:focus,
.game-controls input:focus-visible,
.guess-controls input:focus,
.guess-controls input:focus-visible {
    border-color: #1292f2;
    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(18, 146, 242, 0.14),
        0 14px 30px rgba(18, 146, 242, 0.14),
        inset 0 1px 0 #ffffff;
}

#countryInput.has-error,
#countryInput.has-error:focus,
#countryInput.has-error:focus-visible {
    border-color: #ef4444;

    box-shadow:
        0 0 0 4px rgba(239, 68, 68, 0.12),
        0 12px 26px rgba(239, 68, 68, 0.1),
        inset 0 1px 0 #ffffff;
}

#countryInput.is-invalid-shake {
    animation:
        geoRankleInputShake
        0.32s
        ease-out;
}

/* =========================================================
   Inline guess messages
   ========================================================= */

.guess-message {
    display: none;
    grid-column: 1 / -1;

    width: 100%;
    margin: -2px 0 0;
    padding: 10px 13px;

    border: 1px solid transparent;
    border-radius: 12px;

    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
    text-align: left;
}

.guess-message.is-visible {
    display: block;

    animation:
        geoRankleMessageEnter
        0.2s
        ease-out
        both;
}

.guess-message.is-error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

.guess-message.is-info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.guess-message.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

@keyframes geoRankleInputShake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-2px);
    }
}

@keyframes geoRankleMessageEnter {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Guess button
   ========================================================= */

#guessButton {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 150px;
    min-height: 58px;
    margin: 0;
    padding: 0 28px;

    overflow: hidden;

    border: 2px solid #f2c600;
    border-radius: 18px;

    appearance: none;
    -webkit-appearance: none;

    background:
        linear-gradient(
            180deg,
            #ffe96b 0%,
            #ffd400 58%,
            #ffc400 100%
        );

    color: #2b2400;

    font-family:
        Nunito,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.1px;
    text-align: center;

    cursor: pointer;

    box-shadow:
        0 10px 0 #dcae00,
        0 16px 28px rgba(255, 196, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);

    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4);

    transform: translateY(0);

    transition:
        transform 0.14s ease,
        box-shadow 0.14s ease,
        border-color 0.14s ease,
        filter 0.14s ease;
}

#guessButton::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            110deg,
            transparent 0%,
            rgba(255, 255, 255, 0.42) 45%,
            transparent 72%
        );

    transform: translateX(-130%);

    transition:
        transform 0.35s ease;
}

#guessButton:hover:not(:disabled) {
    border-color: #e8bb00;

    filter:
        saturate(1.06)
        brightness(1.02);

    transform:
        translateY(-2px);

    box-shadow:
        0 12px 0 #dcae00,
        0 20px 34px rgba(255, 196, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

#guessButton:hover:not(:disabled)::before {
    transform:
        translateX(130%);
}

#guessButton:active:not(:disabled) {
    transform:
        translateY(7px);

    box-shadow:
        0 3px 0 #dcae00,
        0 8px 16px rgba(255, 196, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#guessButton:focus,
#guessButton:focus-visible {
    outline: none;

    box-shadow:
        0 10px 0 #dcae00,
        0 0 0 4px rgba(18, 146, 242, 0.24),
        0 16px 28px rgba(255, 196, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* =========================================================
   Autocomplete isolation
   ========================================================= */

/*
Autocomplete suggestions may be rendered as buttons inside
.guess-section. They must never inherit the large yellow
Guess-button appearance.
*/

#autocompleteBox,
.autocomplete-box {
    color-scheme: light;
}

.guess-section .autocomplete-item,
.game-controls .autocomplete-item,
.guess-controls .autocomplete-item,
#autocompleteBox .autocomplete-item {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    min-width: 0;
    min-height: 50px;
    margin: 0;
    padding: 10px 13px;

    overflow: hidden;

    border: 1px solid transparent;
    border-radius: 12px;

    appearance: none;
    -webkit-appearance: none;

    background: #ffffff;
    color: #263548;

    font-family:
        Nunito,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;

    cursor: pointer;

    box-shadow: none;
    filter: none;
    text-shadow: none;
    transform: none;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.guess-section .autocomplete-item::before,
.game-controls .autocomplete-item::before,
.guess-controls .autocomplete-item::before,
#autocompleteBox .autocomplete-item::before {
    display: none;
    content: none;
}

.guess-section .autocomplete-item:hover:not(:disabled),
.game-controls .autocomplete-item:hover:not(:disabled),
.guess-controls .autocomplete-item:hover:not(:disabled),
#autocompleteBox .autocomplete-item:hover:not(:disabled) {
    border-color: #f3df84;

    background:
        linear-gradient(
            90deg,
            #fffdf2 0%,
            #fff9d8 100%
        );

    box-shadow:
        0 4px 12px rgba(245, 196, 0, 0.09);

    filter: none;

    transform:
        translateX(1px);
}

.guess-section .autocomplete-item.active,
.guess-section .autocomplete-item[aria-selected="true"],
.game-controls .autocomplete-item.active,
.game-controls .autocomplete-item[aria-selected="true"],
.guess-controls .autocomplete-item.active,
.guess-controls .autocomplete-item[aria-selected="true"],
#autocompleteBox .autocomplete-item.active,
#autocompleteBox .autocomplete-item[aria-selected="true"] {
    border-color: #efd052;

    background:
        linear-gradient(
            90deg,
            #fff9d2 0%,
            #fffdf3 100%
        );

    box-shadow:
        inset 4px 0 0 #ffd400,
        0 5px 14px rgba(245, 196, 0, 0.12);
}

/* =========================================================
   Puzzle number
   ========================================================= */

.puzzle-number,
#gameNumber {
    display: block;

    width: 100%;
    margin: 0 0 18px;
    padding: 12px 18px;

    border: 1px solid #dbeafe;
    border-radius: 16px;

    background:
        linear-gradient(
            180deg,
            #f2f9ff 0%,
            #e3f2ff 100%
        );

    color: #1f2937;

    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;

    box-shadow:
        0 8px 20px rgba(30, 64, 175, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/*
Inside the small GeoRankle badge, the puzzle number
must remain inline.
*/

.game-badge #gameNumber,
.game-badge .puzzle-number {
    display: inline;

    width: auto;
    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
    color: inherit;

    font: inherit;
    line-height: inherit;
    text-align: inherit;

    box-shadow: none;
}

/* =========================================================
   Remaining guesses
   ========================================================= */

.guesses-left,
#guessesLeft {
    display: block;

    width: 100%;
    margin: 16px 0 18px;
    padding: 12px 16px;

    border: 1px solid #f5c900;
    border-radius: 16px;

    background:
        linear-gradient(
            180deg,
            #ffe866 0%,
            #ffd400 100%
        );

    color: #272100;

    font-size: 17px;
    font-weight: 900;
    line-height: 1.3;
    text-align: center;

    box-shadow:
        0 8px 20px rgba(255, 208, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

#guessesLeft.is-revealing {
    border-color: #93c5fd;

    background:
        linear-gradient(
            180deg,
            #eaf6ff,
            #dbeeff
        );

    color: #155e9b;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#guessesLeft.is-win {
    border-color: #86efac;

    background:
        linear-gradient(
            180deg,
            #dcfce7,
            #bbf7d0
        );

    color: #166534;

    box-shadow:
        0 8px 20px rgba(34, 197, 94, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#guessesLeft.is-loss {
    border-color: #fecaca;

    background:
        linear-gradient(
            180deg,
            #fff1f2,
            #ffe4e6
        );

    color: #b91c1c;

    box-shadow:
        0 8px 20px rgba(239, 68, 68, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

/* =========================================================
   Guess progress
   ========================================================= */

.guess-progress,
#guessProgress {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    width: 100%;
    min-height: 22px;
    margin: 18px 0;
    padding: 0;

    list-style: none;
}

.guess-dot {
    display: block;
    flex: 0 0 auto;

    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;

    border: 2px solid #cbd5e1;
    border-radius: 7px;

    background: #ffffff;

    box-shadow:
        0 3px 8px rgba(15, 23, 42, 0.07);

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.guess-dot.empty,
.guess-dot.pending {
    border-color: #cbd5e1;
    background: #ffffff;
}

.guess-dot.green,
.guess-dot.correct {
    border-color: #16a34a;
    background: #22c55e;
}

.guess-dot.yellow,
.guess-dot.close {
    border-color: #eab308;
    background: #facc15;
}

.guess-dot.orange,
.guess-dot.far {
    border-color: #f97316;
    background: #fb923c;
}

.guess-dot.red,
.guess-dot.very-far {
    border-color: #dc2626;
    background: #ef4444;
}

.guess-dot.green,
.guess-dot.yellow,
.guess-dot.orange,
.guess-dot.red,
.guess-dot.correct,
.guess-dot.close,
.guess-dot.far,
.guess-dot.very-far {
    animation:
        geoRankleProgressPop
        0.28s
        cubic-bezier(0.18, 1.25, 0.35, 1)
        both;
}

.guess-dot.current {
    border-color: #64748b;

    box-shadow:
        0 0 0 3px rgba(100, 116, 139, 0.14),
        0 3px 8px rgba(15, 23, 42, 0.08);
}

@keyframes geoRankleProgressPop {
    from {
        opacity: 0.45;

        transform:
            scale(0.65);
    }

    to {
        opacity: 1;

        transform:
            scale(1);
    }
}

/* =========================================================
   Status text
   ========================================================= */

.ui-status,
.game-status {
    margin: 0;

    color: #475569;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

/* =========================================================
   Disabled interface states
   ========================================================= */

.game-controls.is-disabled,
.guess-controls.is-disabled,
.guess-section.is-disabled {
    opacity: 0.72;
}

.game-controls.is-disabled input,
.guess-controls.is-disabled input,
.guess-section.is-disabled input,
#guessButton:disabled {
    cursor: not-allowed;
}

#countryInput:disabled {
    border-color: #cbd5e1;

    background:
        linear-gradient(
            180deg,
            #f8fafc 0%,
            #eef2f7 100%
        );

    color: #64748b;
    opacity: 1;

    box-shadow:
        inset 0 1px 3px rgba(15, 23, 42, 0.04);
}

#countryInput:disabled::placeholder {
    color: #94a3b8;
}

#guessButton:disabled {
    cursor: not-allowed;

    border-color: #d7c46a;

    background:
        linear-gradient(
            180deg,
            #e7dda7 0%,
            #d6c66c 100%
        );

    color: #6f6535;

    filter:
        saturate(0.55);

    opacity: 0.68;

    box-shadow:
        0 5px 0 #b7a64f,
        0 8px 16px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);

    transform: none;
}

#guessButton:disabled::before {
    display: none;
}

#guessButton.is-busy:disabled {
    cursor: wait;

    border-color: #93c5fd;

    background:
        linear-gradient(
            180deg,
            #e8f5ff,
            #cfeaff
        );

    color: #155e9b;
    filter: none;
    opacity: 1;

    box-shadow:
        0 5px 0 #93c5fd,
        0 9px 18px rgba(37, 99, 235, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* =========================================================
   Country comparison guide
   ========================================================= */

/*
The icons and labels now exist in index.html.

No icons or explanatory text are generated with pseudo-elements.
This prevents duplicated icons and ensures that Area is included.
*/

.stats-grid,
.clue-guide {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;

    width: 100%;
    min-width: 0;
    margin: 14px 0 18px;
    padding: 0;
}

.stat-card {
    position: relative;

    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;

    min-width: 0;
    min-height: 66px;
    margin: 0;
    padding: 10px 11px;

    overflow: hidden;

    border: 1px solid #dce7f2;
    border-radius: 15px;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f4f8fc 100%
        );

    color: #273548;

    text-align: left;

    box-shadow:
        0 6px 16px rgba(15, 23, 42, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);

    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.stat-card::before,
.stat-card::after {
    display: none;
    content: none;
}

.stat-card:hover {
    border-color: #c9d8e7;

    box-shadow:
        0 9px 20px rgba(15, 23, 42, 0.075),
        inset 0 1px 0 #ffffff;

    transform:
        translateY(-1px);
}

/* =========================================================
   Comparison guide icons
   ========================================================= */

.stat-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border: 1px solid #d7e4ef;
    border-radius: 12px;

    background:
        linear-gradient(
            180deg,
            #fbfdff 0%,
            #edf4fb 100%
        );

    font-size: 18px;
    line-height: 1;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 3px 8px rgba(15, 23, 42, 0.045);
}

/* =========================================================
   Comparison guide text
   ========================================================= */

.stat-card-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;

    min-width: 0;
}

.stat-card-text strong {
    display: block;

    min-width: 0;

    color: #273548;

    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;

    overflow-wrap: anywhere;
}

.stat-card-text small {
    display: block;

    min-width: 0;

    color: #718096;

    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;

    overflow-wrap: anywhere;
}

.stat-card-text small span {
    display: inline;
}

/* =========================================================
   Tablet layout
   ========================================================= */

@media (max-width: 900px) {
    .stats-grid,
    .clue-guide {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 9px;
    }

    .stat-card {
        min-height: 62px;
    }
}

@media (max-width: 768px) {
    .guess-section,
    .game-controls,
    .guess-controls {
        grid-template-columns:
            minmax(0, 1fr);

        gap: 11px;

        margin-bottom: 18px;
    }

    #countryInput,
    .guess-section input,
    .game-controls input,
    .guess-controls input {
        height: 54px;
        padding: 0 17px;

        border-radius: 16px;

        font-size: 16px;
    }

    #guessButton {
        width: 100%;
        min-width: 0;
        min-height: 54px;
        padding: 0 22px;

        border-radius: 16px;

        font-size: 17px;

        box-shadow:
            0 8px 0 #dcae00,
            0 13px 24px rgba(255, 196, 0, 0.26),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }

    #guessButton:hover:not(:disabled) {
        transform: none;

        box-shadow:
            0 8px 0 #dcae00,
            0 13px 24px rgba(255, 196, 0, 0.26),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }

    #guessButton:active:not(:disabled) {
        transform:
            translateY(5px);

        box-shadow:
            0 3px 0 #dcae00,
            0 7px 14px rgba(255, 196, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }

    .puzzle-number,
    #gameNumber {
        margin-bottom: 15px;
        padding: 11px 14px;

        border-radius: 14px;

        font-size: 18px;
    }

    .game-badge #gameNumber,
    .game-badge .puzzle-number {
        display: inline;

        width: auto;
        margin: 0;
        padding: 0;

        border: 0;
        border-radius: 0;

        background: transparent;

        font: inherit;

        box-shadow: none;
    }

    .guesses-left,
    #guessesLeft {
        margin: 14px 0 16px;
        padding: 11px 13px;

        border-radius: 14px;

        font-size: 16px;
    }

    .guess-progress,
    #guessProgress {
        gap: 8px;

        margin: 16px 0;
    }

    .guess-dot {
        width: 20px;
        height: 20px;

        border-radius: 6px;
    }

    .stats-grid,
    .clue-guide {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        margin: 13px 0 16px;
    }

    .stat-card {
        min-height: 60px;
        padding: 9px 11px;

        border-radius: 14px;
    }

    .stat-card-text strong {
        font-size: 13px;
    }

    .stat-card-text small {
        font-size: 10px;
    }
}

/* =========================================================
   Mobile layout
   ========================================================= */

@media (max-width: 480px) {
    .game-topbar {
        grid-template-columns:
            42px
            minmax(0, 1fr)
            42px;
        gap: 8px;

        margin-bottom: 20px;
    }

    .sound-toggle {
        width: 42px;
        height: 42px;

        border-radius: 13px;
    }

    .sound-toggle-icon {
        font-size: 19px;
    }

    .guess-section,
    .game-controls,
    .guess-controls {
        gap: 9px;

        margin-bottom: 16px;
    }

    #countryInput,
    .guess-section input,
    .game-controls input,
    .guess-controls input {
        height: 50px;
        padding: 0 15px;

        border-radius: 14px;

        font-size: 15px;
    }

    #guessButton {
        min-height: 50px;

        border-radius: 14px;

        font-size: 16px;
    }

    .puzzle-number,
    #gameNumber {
        padding: 10px 12px;

        font-size: 17px;
    }

    .game-badge #gameNumber,
    .game-badge .puzzle-number {
        display: inline;

        width: auto;
        margin: 0;
        padding: 0;

        border: 0;
        border-radius: 0;

        background: transparent;

        font: inherit;

        box-shadow: none;
    }

    .guesses-left,
    #guessesLeft {
        padding: 10px 12px;

        font-size: 15px;
    }

    .guess-progress,
    #guessProgress {
        gap: 7px;
    }

    .guess-dot {
        width: 19px;
        height: 19px;
    }

    .stats-grid,
    .clue-guide {
        gap: 8px;

        margin: 12px 0 15px;
    }

    .stat-card {
        grid-template-columns:
            34px minmax(0, 1fr);

        column-gap: 8px;

        min-height: 56px;
        padding: 8px 9px;

        border-radius: 12px;
    }

    .stat-card-icon {
        width: 34px;
        height: 34px;

        border-radius: 10px;

        font-size: 16px;
    }

    .stat-card-text {
        gap: 2px;
    }

    .stat-card-text strong {
        font-size: 12px;
    }

    .stat-card-text small {
        font-size: 9px;
    }
}

@media (max-width: 350px) {
    .stats-grid,
    .clue-guide {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .stat-card {
        min-height: 54px;
    }

    .stat-card-text strong {
        font-size: 13px;
    }

    .stat-card-text small {
        font-size: 10px;
    }
}

/* =========================================================
   Increased contrast
   ========================================================= */

@media (prefers-contrast: more) {
    .sound-toggle,
    .guess-message {
        border-width: 2px;
    }

    #countryInput,
    .guess-section input,
    .game-controls input,
    .guess-controls input {
        border-width: 3px;
        border-color: #2563eb;
    }

    #guessButton {
        border-width: 3px;
        border-color: #7a6200;
    }

    .puzzle-number,
    #gameNumber {
        border-width: 2px;
        border-color: #2563eb;
    }

    .game-badge #gameNumber,
    .game-badge .puzzle-number {
        border: 0;
    }

    .guesses-left,
    #guessesLeft {
        border-width: 2px;
        border-color: #9a7b00;
    }

    .guess-dot {
        border-width: 3px;
    }

    .stat-card {
        border-width: 2px;
        border-color: #64748b;
    }

    .stat-card-icon {
        border-width: 2px;
        border-color: #64748b;
    }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    #countryInput,
    #guessButton,
    .guess-section input,
    .game-controls input,
    .guess-controls input,
    .autocomplete-item,
    .guess-dot,
    .stat-card,
    .sound-toggle {
        transition: none;
    }

    #countryInput.is-invalid-shake,
    .guess-message.is-visible {
        animation: none;
    }

    #guessButton::before {
        display: none;
    }

    .guess-dot.green,
    .guess-dot.yellow,
    .guess-dot.orange,
    .guess-dot.red,
    .guess-dot.correct,
    .guess-dot.close,
    .guess-dot.far,
    .guess-dot.very-far {
        animation: none;
    }
}
