﻿* {
            box-sizing: border-box;
        }

        html,
        body {
            margin: 0;
            min-height: 100%;
        }

        body {
            min-height: 100vh;
            direction: rtl;
            font-family: "Arimo", Arial, sans-serif;
            color: #1a1d2d;
            background: linear-gradient(
                to bottom,
                #f8f9fb 0%,
                #f1f3f6 100%
            );
        }

        button {
            font-family: inherit;
        }

        .game-page {
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding: 22px 10px 40px;
        }

        .game-container {
            width: 100%;
            max-width: 540px;
            margin: 0 auto;
        }

        .game-info {
            box-sizing: border-box;
            width: 100%;
            max-width: 100%;
            margin: 28px 0 0;
            padding: 0 4px 16px;
            color: #3a4258;
            line-height: 1.7;
            text-align: center;
        }

        .game-info h2,
        .game-info p {
            text-align: center;
        }

        .game-info h2 {
            margin: 28px 0 12px;
            color: #17204a;
            font-size: 1.25rem;
            font-weight: 700;
            line-height: 1.35;
        }

        .game-info h2:first-child {
            margin-top: 0;
        }

        .game-info p {
            margin: 0 0 14px;
            font-size: 0.98rem;
        }

        /* ׳›׳•׳×׳¨׳× */

        .page-heading {
            width: 100%;
            margin: 0 0 10px;
            color: #17204a;
            font-size: clamp(calc(1.05rem - 5px), calc(3.6vw - 5px), calc(1.35rem - 5px));
            font-weight: 700;
            line-height: 1.35;
            text-align: center;
        }

        .game-header {
            margin-bottom: 22px;
            text-align: center;
        }

        .title-line {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            direction: rtl;
        }

        .info-button {
            width: 27px;
            height: 27px;
            flex: 0 0 27px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            border: 1px solid #cfd4df;
            border-radius: 50%;
            color: #4d5570;
            background: #ffffff;
            font-family: Arial, sans-serif;
            font-size: 16px;
            font-weight: 700;
            font-style: normal;
            line-height: 1;
            cursor: pointer;
            box-shadow: 0 2px 0 #d6dae2, 0 4px 8px rgba(48, 55, 76, 0.09);
            transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
            margin-left: 6px;
            transform: translate(15px, 0);
        }

        .info-button:hover {
            transform: translate(15px, -1px);
            background: #f7f8fb;
        }

        .info-button:active {
            transform: translate(15px, 2px);
            box-shadow: 0 1px 0 #d6dae2, 0 2px 4px rgba(48, 55, 76, 0.08);
        }

        .challenge-id {
            color: #8f93aa;
            font-size: clamp(14px, 2.7vw, 20px);
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
            margin-right: 8px;
            transform: translate(-11px, 5px);
        }

        .game-title {
            margin: 0;
            color: #17204a;
            font-size: clamp(36px, 7.2vw, 58px);
            font-weight: 700;
            line-height: 1;
            letter-spacing: -1.5px;
        }

        /* ׳׳•׳— ׳”׳׳©׳—׳§ */

        .waffle-wrapper {
            width: 100%;
            display: flex;
            justify-content: center;
        }

        .waffle-board {
            width: min(100%, 468px);
            aspect-ratio: 1 / 1;
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            grid-template-rows: repeat(5, minmax(0, 1fr));
            gap: 13px;
            direction: rtl;
            user-select: none;
        }

        /* ׳׳©׳‘׳¦׳•׳× */

        .tile {
            position: relative;
            width: 100%;
            height: 100%;
            min-width: 0;
            min-height: 0;
            aspect-ratio: auto;
            appearance: none;
            -webkit-appearance: none;

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

            margin: 0;
            padding: 0;

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

            overflow: hidden;
            cursor: grab;
            touch-action: none;

            font-size: clamp(34px, 6.3vw, 50px);
            font-weight: 700;
            line-height: 1;

            transition:
                transform 0.15s ease,
                filter 0.15s ease,
                box-shadow 0.15s ease,
                border-color 0.15s ease,
                opacity 0.15s ease;
        }

        .tile:active {
            cursor: grabbing;
        }

        .tile::before {
            content: "";
            position: absolute;
            top: 2px;
            right: 3px;
            left: 3px;
            height: 44%;

            border-radius: 12px 12px 8px 8px;

            background: linear-gradient(
                to bottom,
                rgba(255, 255, 255, 0.24),
                rgba(255, 255, 255, 0.02)
            );

            pointer-events: none;
        }

        .tile::after {
            content: "";
            position: absolute;
            inset: 1px;

            border-radius: 13px;

            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.75),
                inset 0 -1px 0 rgba(0, 0, 0, 0.03);

            pointer-events: none;
        }

        .letter {
            position: relative;
            z-index: 2;

            width: 100%;
            height: 100%;

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

            pointer-events: none;
            transform: translateY(-1px);
        }

        .tile:hover {
            transform: translateY(-2px);
            filter: brightness(1.02);
        }

        /* ׳™׳¨׳•׳§ */

        .tile.correct {
            color: #ffffff;

            background: linear-gradient(
                145deg,
                #84cb69 0%,
                #73bb5c 55%,
                #69b053 100%
            );

            border-color: #68a752;

            text-shadow:
                0 2px 2px rgba(61, 104, 49, 0.24);

            box-shadow:
                0 4px 0 #5fa148,
                0 7px 12px rgba(84, 138, 67, 0.18);
        }

        /* ׳¦׳”׳•׳‘ */

        .tile.present {
            color: #ffffff;

            background: linear-gradient(
                145deg,
                #ffcb3d 0%,
                #f7bc28 56%,
                #ecb022 100%
            );

            border-color: #e2a621;

            text-shadow:
                0 2px 2px rgba(144, 98, 8, 0.23);

            box-shadow:
                0 4px 0 #d79c18,
                0 7px 12px rgba(179, 129, 26, 0.18);
        }

        /* ׳׳₪׳•׳¨ */

        .tile.normal {
            color: #22253a;

            background: linear-gradient(
                145deg,
                #fafbfc 0%,
                #eef1f5 52%,
                #e5e9ee 100%
            );

            border-color: #cdd3dc;

            text-shadow:
                0 1px 0 rgba(255, 255, 255, 0.9);

            box-shadow:
                0 4px 0 #c7cdd5,
                0 7px 12px rgba(87, 94, 109, 0.15),
                3px 0 6px rgba(87, 94, 109, 0.07),
                -3px 0 6px rgba(87, 94, 109, 0.07);
        }

        .tile.empty {
            visibility: hidden;
            pointer-events: none;
        }

        /* ׳‘׳—׳™׳¨׳” ׳•׳’׳¨׳™׳¨׳” */

        .tile.selected {
            z-index: 5;
            transform: translateY(-4px) scale(1.04);
            outline: 4px solid rgba(65, 98, 221, 0.2);
            outline-offset: 3px;
        }

        .tile.drop-target {
            z-index: 6;
            transform: translateY(-4px) scale(1.05);
            outline: 4px solid rgba(41, 92, 227, 0.28);
            outline-offset: 3px;
        }

        .tile.drag-source {
            opacity: 0.25;
            transform: scale(0.95);
        }

        .drag-ghost {
            position: fixed;
            z-index: 9999;
            margin: 0;
            pointer-events: none;
            opacity: 0.96;
            transform: scale(1.06) rotate(-2deg);
        }

        .tile.swap-pop {
            animation: swapPop 0.25s ease;
        }

        @keyframes swapPop {
            0% {
                transform: scale(0.9);
            }

            65% {
                transform: scale(1.08);
            }

            100% {
                transform: scale(1);
            }
        }

        /* ׳”׳“׳’׳©׳× ׳¨׳׳– */

        .tile.hinted {
            z-index: 10;
            animation: hintPulse 0.75s ease 3;
        }

        @keyframes hintPulse {
            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: translateY(-5px) scale(1.1);
                outline: 5px solid rgba(255, 193, 35, 0.42);
                outline-offset: 4px;
            }
        }

        /* ׳׳•׳ ׳” */

        .game-footer {
            margin-top: 31px;

            display: flex;
            align-items: baseline;
            justify-content: center;
            gap: 10px;

            direction: rtl;
        }

        .swaps-number {
            color: #18204b;
            font-size: clamp(31px, 5.4vw, 45px);
            font-weight: 700;
            line-height: 1;
        }

        .swaps-text {
            color: #9d9cad;
            font-size: clamp(20px, 4vw, 32px);
            font-weight: 400;
            line-height: 1;
        }

        /* ׳”׳•׳¨׳׳•׳× ׳׳×׳—׳× ׳׳׳©׳—׳§ */

        .game-instructions {
            width: 100%;
            max-width: 468px;
            margin: 18px auto 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            color: #555a70;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.4;
            text-align: center;
        }

        .game-report-link {
            width: 100%;
            max-width: 468px;
            margin: 14px auto 0;
            text-align: center;
        }

        .game-report-link a {
            color: #1f5fe0;
            font-size: 14px;
            font-weight: 700;
            text-decoration: none;
        }

        .game-report-link a:hover {
            text-decoration: underline;
        }

        /* ׳›׳₪׳×׳•׳¨׳™׳ ׳×׳—׳×׳•׳ ׳™׳ */

        .game-actions {
            width: 100%;
            max-width: 468px;

            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;

            margin: 17px auto 0;
        }

        .action-button {
            min-height: 49px;

            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;

            padding: 8px 9px;

            border: 1px solid #d8dce3;
            border-radius: 14px;

            color: #30354c;
            background: #ffffff;

            font-size: 13px;
            font-weight: 700;

            cursor: pointer;

            box-shadow:
                0 4px 0 #d2d6dd,
                0 7px 12px rgba(53, 60, 75, 0.1);

            transition:
                transform 0.15s ease,
                box-shadow 0.15s ease,
                filter 0.15s ease;
        }

        .action-button:hover {
            transform: translateY(-2px);
            filter: brightness(1.015);
        }

        .action-button:active {
            transform: translateY(3px);

            box-shadow:
                0 1px 0 #d2d6dd,
                0 3px 6px rgba(53, 60, 75, 0.1);
        }

        .action-icon {
            width: 26px;
            height: 26px;

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

            flex: 0 0 26px;

            border-radius: 9px;

            font-size: 13px;
            line-height: 1;
        }

        .history-button .action-icon {
            background: #edf1f7;
        }

        .hint-button {
            color: #765500;
            background: linear-gradient(
                145deg,
                #fff7d8,
                #ffefb3
            );

            border-color: #ead27b;

            box-shadow:
                0 4px 0 #d8bd60,
                0 7px 12px rgba(128, 96, 11, 0.12);
        }

        .hint-button .action-icon {
            background: rgba(255, 197, 37, 0.28);
        }

        .hint-button:disabled,
        .hint-button.used {
            color: #8a8fa3;
            background: #eef0f4;
            border-color: #d8dce3;
            box-shadow: 0 4px 0 #d2d6dd, 0 7px 12px rgba(53, 60, 75, 0.1);
            cursor: default;
            filter: none;
            transform: none;
        }

        .hint-button:disabled .action-icon,
        .hint-button.used .action-icon {
            background: #edf1f7;
        }

        .hint-button:disabled:hover,
        .hint-button.used:hover {
            transform: none;
            filter: none;
        }

        .more-button:disabled,
        .more-button.used {
            color: #8a8fa3;
            background: #eef0f4;
            border-color: #d8dce3;
            box-shadow: 0 4px 0 #d2d6dd, 0 7px 12px rgba(53, 60, 75, 0.1);
            cursor: default;
            filter: none;
            transform: none;
        }

        .more-button:disabled .action-icon,
        .more-button.used .action-icon {
            background: #edf1f7;
        }

        .more-button:disabled:hover,
        .more-button.used:hover {
            transform: none;
            filter: none;
        }

        .more-button {
            color: #ffffff;
            background: linear-gradient(
                145deg,
                #6479e6,
                #4d61ca
            );

            border-color: #4557bc;

            box-shadow:
                0 4px 0 #3d4fac,
                0 7px 12px rgba(55, 67, 148, 0.2);
        }

        .more-button .action-icon {
            background: rgba(255, 255, 255, 0.17);
        }

        /* ׳”׳•׳“׳¢׳” ׳§׳˜׳ ׳” */

        .toast {
            position: fixed;
            top: 50%;
            left: 50%;
            right: auto;
            bottom: auto;
            z-index: 50000;

            max-width: min(420px, calc(100vw - 32px));

            padding: 16px 22px;

            color: #ffffff;
            background: rgba(29, 32, 52, 0.96);

            border-radius: 14px;
            box-shadow: 0 12px 32px rgba(15, 20, 40, 0.35);

            font-size: 16px;
            font-weight: 700;
            text-align: center;
            line-height: 1.45;

            opacity: 0;
            pointer-events: none;

            transform: translate(-50%, calc(-50% + 12px));

            transition:
                opacity 0.2s ease,
                transform 0.2s ease;
        }

        .toast.show {
            opacity: 1;
            transform: translate(-50%, -50%);
        }

        /* ׳—׳׳•׳ ׳™׳× ׳™׳׳™׳ ׳§׳•׳“׳׳™׳ */

        .modal-overlay {
            position: fixed;
            inset: 0;
            z-index: 20000;

            display: none;
            align-items: center;
            justify-content: center;

            padding: 20px;

            background: rgba(23, 28, 48, 0.48);
            backdrop-filter: blur(4px);
        }

        .modal-overlay.open {
            display: flex;
        }

        .days-modal {
            width: 100%;
            max-width: 400px;

            padding: 20px;

            border: 1px solid #e1e4ea;
            border-radius: 22px;

            background: #ffffff;

            box-shadow:
                0 22px 60px rgba(25, 30, 49, 0.24);
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;

            margin-bottom: 18px;
        }

        .modal-title {
            margin: 0;
            color: #1d244a;
            font-size: 22px;
            font-weight: 700;
        }

        .modal-close {
            width: 34px;
            height: 34px;

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

            padding: 0;

            border: 0;
            border-radius: 11px;

            color: #363b4e;
            background: #eef0f4;

            font-size: 22px;
            line-height: 1;
            cursor: pointer;
        }

        .days-grid,
        .cal-grid {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 6px;
        }

        .day-button {
            min-height: 55px;

            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;

            padding: 7px;

            border: 1px solid #dfe3e9;
            border-radius: 12px;

            color: #34394d;
            background: #f6f7f9;

            cursor: pointer;
        }

        .day-button strong {
            color: #1d244a;
            font-size: 13px;
        }

        .day-button span {
            color: #9296a4;
            font-size: 11px;
        }

        .day-button:hover {
            border-color: #7384df;
            background: #f0f2ff;
        }

        .waffle-board.locked .tile:not(.empty) {
            cursor: default;
        }

        .info-modal-text {
            margin: 0;
            color: #555a70;
            font-size: 14px;
            font-weight: 500;
            line-height: 1.65;
            text-align: right;
        }

        .info-modal-text a {
            color: #1f5fe0;
            font-weight: 700;
            text-decoration: none;
        }

        .info-modal-text a:hover {
            text-decoration: underline;
        }

        .info-colors + .info-modal-text {
            margin-top: 16px;
        }

        .info-colors {
            display: grid;
            gap: 9px;
            margin-top: 16px;
        }

        .info-color-row {
            display: flex;
            align-items: center;
            gap: 9px;
            color: #464c61;
            font-size: 13px;
            font-weight: 600;
        }

        .color-dot {
            width: 18px;
            height: 18px;
            flex: 0 0 18px;
            border-radius: 6px;
            box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
        }

        .color-dot.green { background: #73bb5c; }
        .color-dot.yellow { background: #f7bc28; }
        .color-dot.gray { background: #e8ebef; border: 1px solid #cdd3dc; }

        /* ׳˜׳׳₪׳•׳ */

        @media (max-width: 650px) {
            html,
            body {
                min-height: 0;
            }

            .game-page {
                min-height: 0;
                padding: 12px 8px 35px;
            }

            .game-container {
                margin-top: 0;
            }

            .game-header {
                margin-top: 0;
                margin-bottom: 18px;
            }

            .title-line {
                gap: 8px;
            }

            .info-button {
                width: 24px;
                height: 24px;
                flex-basis: 24px;
                font-size: 14px;
                margin-left: 5px;
                transform: translate(13px, 0);
            }

            .challenge-id {
                font-size: clamp(13px, 3.7vw, 18px);
                margin-right: 6px;
                transform: translate(-9px, 4px);
            }

            .game-title {
                font-size: clamp(32px, 10.8vw, 47px);
            }

            .waffle-board {
                width: min(90vw, 378px);
                gap: 12px;
            }

            .tile {
                border-radius: 13px;
                font-size: clamp(31px, 9vw, 41px);
            }

            .game-footer {
                margin-top: 30px;
            }

            .game-actions {
                width: min(90vw, 378px);
                gap: 8px;
            }

            .action-button {
                min-height: 52px;
                padding: 8px 5px;
                gap: 5px;
                font-size: 12px;
                border-radius: 12px;
            }

            .action-icon {
                width: 24px;
                height: 24px;
                flex-basis: 24px;
                font-size: 13px;
            }
        }

        @media (max-width: 380px) {
            .waffle-board {
                width: min(90vw, 324px);
                gap: 10px;
            }

            .tile {
                font-size: 31px;
                border-radius: 11px;
            }

            .game-instructions {
                width: min(90vw, 378px);
                padding: 0 8px;
                font-size: 12px;
            }

            .game-actions {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                width: min(94vw, 360px);
                gap: 6px;
            }

            .action-button {
                min-width: 0;
                min-height: 48px;
                padding: 6px 2px;
                gap: 3px;
                font-size: 11px;
                white-space: nowrap;
            }

            .action-icon {
                width: 20px;
                height: 20px;
                flex-basis: 20px;
                font-size: 12px;
                border-radius: 7px;
            }

            .days-grid,
            .cal-grid {
                grid-template-columns: repeat(7, minmax(0, 1fr));
                gap: 5px;
            }
        }

/* Win modal + days pager + confetti */

.confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 25000;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.win-modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 28px 22px 22px;
    border: 1px solid #e1e4ea;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fc 100%);
    box-shadow: 0 22px 60px rgba(25, 30, 49, 0.24);
    text-align: center;
    overflow: hidden;
}

.win-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
}

.win-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 8px;
}

.win-badge {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(145deg, #84cb69, #69b053);
    box-shadow: 0 3px 0 #5fa148, 0 8px 14px rgba(84, 138, 67, 0.22);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    animation: winPop 0.45s ease;
}

.win-title {
    margin: 0;
    color: #17204a;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.win-subtitle {
    margin: 0 0 8px;
    color: #008000;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.win-swaps {
    margin: 0 0 22px;
    color: #1d244a;
    font-size: 18px;
    font-weight: 700;
}

.win-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.win-overlay.open {
    align-items: flex-start;
    padding-top: max(28px, 8vh);
}

.win-mini-board {
    display: grid;
    grid-template-columns: repeat(5, 24px);
    grid-template-rows: repeat(5, 24px);
    gap: 4px;
    width: fit-content;
    margin: 18px auto 0;
    direction: rtl;
}

.win-mini-cell {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: #73bb5c;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 0 #5fa148;
    user-select: none;
}

.win-mini-cell.empty {
    background: transparent;
    box-shadow: none;
}

.win-history-button,
.win-more-games {
    width: 50%;
    max-width: 50%;
    text-decoration: none;
}

.lose-more-button {
    width: 100%;
    text-decoration: none;
}

.lose-title {
    margin-top: 12px;
}

.lose-ad-text {
    margin: 0 0 18px;
    color: #555a70;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

@keyframes winPop {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

.days-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -6px 0 14px;
}

.days-nav-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe3e9;
    border-radius: 11px;
    color: #34394d;
    background: #f6f7f9;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.days-nav-button:hover:not(:disabled) {
    border-color: #7384df;
    background: #f0f2ff;
}

.days-nav-button:disabled {
    opacity: 0.35;
    cursor: default;
}

.days-page-label {
    color: #1d244a;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    min-width: 0;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.cal-weekdays span {
    text-align: center;
    color: #9aa0b4;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.cal-grid .day-button {
    min-height: 48px;
    padding: 4px 2px 5px;
    border-radius: 11px;
    gap: 1px;
}

.cal-grid .day-button strong {
    font-size: 14px;
}

.cal-grid .day-button span {
    font-size: 9px;
    font-weight: 700;
}

.cal-cell {
    min-height: 48px;
    border-radius: 11px;
}

.cal-cell.empty {
    visibility: hidden;
}

.cal-cell.muted {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c5c9d6;
    background: #fafbfc;
    border: 1px dashed #e6e9ef;
    font-size: 13px;
    font-weight: 700;
}

.day-button.current {
    border-color: #7384df;
    background: #eef1ff;
}

.day-button.solved {
    background: #00d24d;
    border-color: #00b842;
}

.day-button.solved strong,
.day-button.solved span {
    color: #ffffff;
}

.days-empty {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    color: #555a70;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 380px) {
    .cal-grid .day-button,
    .cal-cell {
        min-height: 42px;
        border-radius: 9px;
    }

    .cal-grid .day-button strong {
        font-size: 13px;
    }
}

/* Ad loading overlay (Google Ad Breaks) */
#ad-loading {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 40000;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    text-align: center;
}

#ad-loading.show {
    display: flex;
}

#ad-loading .ad-loading-title {
    color: #fff;
    font-size: clamp(1.35rem, 4.5vw, 1.85rem);
    font-weight: 900;
    line-height: 1.35;
    margin: 0;
    max-width: 18em;
}

#ad-loading .ad-loading-timer {
    color: #93c5fd;
    font-size: clamp(2.4rem, 10vw, 3.4rem);
    font-weight: 900;
    margin: 0;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    min-width: 1.4em;
}

#ad-loading p {
    color: #fff;
    font-weight: 800;
    margin: 0;
}

.ad-ring {
    width: 54px;
    height: 54px;
    border: 5px solid rgba(147, 197, 253, 0.32);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: waffleAdSpin 0.8s linear infinite;
}

@keyframes waffleAdSpin {
    to { transform: rotate(360deg); }
}

/* "מילים חדשות בעוד X" countdown (עד חצות 00:00) */
.new-words-counter {
    color: #1a1d2d;
    width: fit-content;
    max-width: 100%;
    margin: 14px auto 0;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    direction: rtl;
}

.new-words-counter-win {
    margin-top: 10px;
}

.new-words-counter .counter-time {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    font-size: 20px;
    display: inline-block;
    margin: 0 6px;
    min-width: 9ch;
}

/* במסך הנצחון: כפתור "משחקים קודמים" ירוק */
.win-history-button {
    background: linear-gradient(145deg, #73bb5c, #00b842) !important;
    border-color: #00b842 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 0 #5fa148, 0 7px 12px rgba(84, 138, 67, 0.18) !important;
}

.win-history-button .action-icon {
    background: rgba(255, 255, 255, 0.18) !important;
}
