.game-app button {
    font-family: "Ciname", sans-serif;
}

/* ---------------------------------------------------------------
   Shell — clay page, safe-area aware
--------------------------------------------------------------- */
.game-shell {
    width: min(96vw, 1160px);
    margin-inline: auto;
    padding: 10px 14px calc(18px + env(safe-area-inset-bottom));
}

.game-shell.play-screen {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px);
    min-height: calc(100svh - 100px);
}

/* ---------------------------------------------------------------
   Setup panel — chunky clay card
--------------------------------------------------------------- */
.panel {
    max-width: 820px;
    margin: 0 auto;
    background: var(--panel);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 22px 18px;
    box-shadow:
        inset 2px 2px 8px rgba(255, 255, 255, 0.07),
        inset -3px -3px 12px rgba(0, 0, 0, 0.3),
        var(--shadow);
}

body.light-theme .panel {
    border-color: rgba(109, 40, 217, 0.14);
    box-shadow:
        inset 2px 2px 8px rgba(255, 255, 255, 0.55),
        inset -3px -3px 12px rgba(70, 43, 124, 0.1),
        var(--shadow);
}

.setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.setup-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-family: "Nazanin", sans-serif;
}

.field-input,
.field-select {
    width: 100%;
    min-height: 52px;
    background: var(--bg-soft);
    border: 2px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 1rem;
    font-family: "Nazanin", sans-serif;
    outline: none;
    direction: rtl;
    box-shadow:
        inset 2px 2px 6px rgba(255, 255, 255, 0.05),
        inset -2px -2px 8px rgba(0, 0, 0, 0.22);
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.light-theme .field-input,
body.light-theme .field-select {
    border-color: rgba(109, 40, 217, 0.12);
    box-shadow:
        inset 2px 2px 6px rgba(255, 255, 255, 0.6),
        inset -2px -2px 8px rgba(70, 43, 124, 0.08);
}

.field-input:focus,
.field-select:focus {
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px rgba(167, 139, 250, 0.18),
        inset 2px 2px 6px rgba(255, 255, 255, 0.05),
        inset -2px -2px 8px rgba(0, 0, 0, 0.22);
}

/* ---------------------------------------------------------------
   Teams — big color swatch + input, ≥44px targets
--------------------------------------------------------------- */
.team-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.color-swatch {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.55);
    cursor: pointer;
    box-shadow:
        inset -2px -2px 6px rgba(0, 0, 0, 0.35),
        inset 2px 2px 6px rgba(255, 255, 255, 0.5),
        0 4px 10px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease-out;
    touch-action: manipulation;
}

body.light-theme .color-swatch {
    border-color: rgba(255, 255, 255, 0.9);
}

.color-swatch:active {
    transform: scale(0.92);
}

.team-name-row .field-input {
    flex: 1;
}

/* ---------------------------------------------------------------
   Category tiles — clay neubrut cards with check indicator
--------------------------------------------------------------- */
.cat-used-badge {
    margin-inline-start: auto;
    font-size: 0.7rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
    background: var(--panel);
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* ---------------------------------------------------------------
   Score panel — team cards with active highlight
--------------------------------------------------------------- */
.score-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.score-card {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 96px;
    padding: 8px 14px;
    border: 2px solid transparent;
    border-radius: 18px;
    background: var(--panel-strong);
    color: var(--text);
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.07),
        inset -2px -2px 8px rgba(0, 0, 0, 0.26),
        0 5px 14px rgba(0, 0, 0, 0.16);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.score-card.active {
    border-color: var(--accent);
    background: rgba(167, 139, 250, 0.14);
    box-shadow:
        0 0 16px rgba(167, 139, 250, 0.25),
        inset 2px 2px 5px rgba(255, 255, 255, 0.06),
        inset -2px -2px 8px rgba(0, 0, 0, 0.24);
}

.score-card .team-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.score-card .team-score-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.score-card .team-score-value {
    direction: ltr;
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--bg-soft);
    border-radius: 999px;
    padding: 2px 12px;
}

/* ---------------------------------------------------------------
   Category / level screens
--------------------------------------------------------------- */
.word-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    width: 100%;
}

.control-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 460px;
}

.level-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.level-note svg {
    width: 16px;
    height: 16px;
    color: #fbbf24;
}

/* ---------------------------------------------------------------
   Buttons — chunky clay, soft press ~200ms, ≥52px targets
--------------------------------------------------------------- */
.primary-btn,
.secondary-btn,
.word-confirm-btn {
    border: 0;
    min-height: 56px;
    padding: 12px 26px;
    border-radius: 18px;
    font-size: 1.05rem;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.2s ease-out, opacity 0.2s, box-shadow 0.2s;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #fff;
    font-weight: 700;
    box-shadow:
        inset -3px -3px 8px rgba(0, 0, 0, 0.26),
        inset 2px 2px 6px rgba(255, 255, 255, 0.28),
        0 8px 18px rgba(217, 119, 6, 0.28);
}

.primary-btn:hover {
    opacity: 0.92;
}

.primary-btn:active {
    transform: scale(0.96) translateY(1px);
    box-shadow:
        inset -2px -2px 6px rgba(0, 0, 0, 0.3),
        inset 3px 3px 8px rgba(0, 0, 0, 0.2),
        0 3px 8px rgba(0, 0, 0, 0.2);
}

.primary-btn:disabled,
.word-confirm-btn:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.secondary-btn {
    background: var(--panel-strong);
    color: var(--text);
    box-shadow:
        inset -3px -3px 8px rgba(0, 0, 0, 0.25),
        inset 2px 2px 6px rgba(255, 255, 255, 0.08),
        0 6px 14px rgba(0, 0, 0, 0.2);
}

.quit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 24px;
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    font-size: 1rem;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.2s ease-out, background 0.2s;
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.06),
        inset -2px -2px 8px rgba(0, 0, 0, 0.25);
}

.quit-btn:hover {
    background: rgba(239, 68, 68, 0.22);
}

.quit-btn:active {
    transform: scale(0.96) translateY(1px);
}

.back-cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--panel-strong);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 0.95rem;
    font-family: "Nazanin", sans-serif;
    cursor: pointer;
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 14px;
    touch-action: manipulation;
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.06),
        inset -2px -2px 8px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease-out, background 0.2s, box-shadow 0.2s, color 0.2s;
}

body.light-theme .back-cat-btn {
    border-color: rgba(109, 40, 217, 0.14);
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.6),
        inset -2px -2px 8px rgba(70, 43, 124, 0.09),
        0 4px 12px rgba(70, 43, 124, 0.08);
}

.back-cat-btn:hover {
    background: var(--panel);
}

.back-cat-btn:active {
    transform: scale(0.96) translateY(1px);
}

.back-cat-btn svg {
    width: 1.2em;
    height: 1.2em;
}

.setup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------------
   Word confirm screen
--------------------------------------------------------------- */
.word-confirm-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
    padding: 14px 0;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.word-confirm-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.92rem;
    color: var(--muted);
    font-family: "Nazanin", sans-serif;
    background: var(--panel-strong);
    border: 2px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    padding: 8px 18px;
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.06),
        inset -2px -2px 8px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.16);
}

body.light-theme .word-confirm-badge {
    border-color: rgba(109, 40, 217, 0.12);
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.55),
        inset -2px -2px 8px rgba(70, 43, 124, 0.08),
        0 4px 12px rgba(70, 43, 124, 0.08);
}

.word-confirm-dot {
    opacity: 0.4;
}

.word-confirm-card {
    position: relative;
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    background: linear-gradient(160deg, var(--panel-strong), var(--panel));
    overflow: hidden;
    box-shadow:
        inset 2px 2px 10px rgba(255, 255, 255, 0.08),
        inset -3px -3px 14px rgba(0, 0, 0, 0.32),
        0 16px 40px rgba(124, 58, 237, 0.18);
    animation: pantoCardIn 0.45s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

body.light-theme .word-confirm-card {
    border-color: rgba(109, 40, 217, 0.14);
    box-shadow:
        inset 2px 2px 10px rgba(255, 255, 255, 0.6),
        inset -3px -3px 14px rgba(70, 43, 124, 0.1),
        0 16px 40px rgba(70, 43, 124, 0.12);
}

@keyframes pantoCardIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(14px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.word-confirm-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at 50% 45%, rgba(167, 139, 250, 0.1), transparent 60%);
    pointer-events: none;
}

.word-confirm-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: clamp(32px, 9vw, 48px) clamp(18px, 6vw, 32px);
}

.word-confirm-word {
    font-size: clamp(2rem, 8vw, 3.4rem);
    font-weight: 700;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--accent), #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.word-confirm-hint {
    font-size: 0.98rem;
    color: var(--muted);
    font-family: "Nazanin", sans-serif;
    opacity: 0.85;
}

.word-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.word-confirm-btn.primary {
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #fff;
    font-weight: 700;
    box-shadow:
        inset -3px -3px 8px rgba(0, 0, 0, 0.26),
        inset 2px 2px 6px rgba(255, 255, 255, 0.28),
        0 8px 18px rgba(217, 119, 6, 0.28);
}

.word-confirm-btn.primary:active {
    transform: scale(0.96) translateY(1px);
    box-shadow:
        inset -2px -2px 6px rgba(0, 0, 0, 0.3),
        inset 3px 3px 8px rgba(0, 0, 0, 0.2),
        0 3px 8px rgba(0, 0, 0, 0.2);
}

.word-confirm-btn.swap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--panel-strong);
    color: var(--text);
    box-shadow:
        inset -3px -3px 8px rgba(0, 0, 0, 0.25),
        inset 2px 2px 6px rgba(255, 255, 255, 0.08),
        0 6px 14px rgba(0, 0, 0, 0.2);
}

.wcb-icon {
    display: inline-flex;
}

.wcb-icon svg {
    width: 1.25em;
    height: 1.25em;
}

.word-confirm-btn.link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    min-height: auto;
    padding: 8px 14px;
    color: var(--muted);
    font-family: "Nazanin", sans-serif;
    font-size: 0.92rem;
    opacity: 0.75;
    box-shadow: none;
}

.word-confirm-btn.link:hover {
    opacity: 1;
    color: var(--accent);
}

.word-confirm-btn.link svg {
    width: 15px;
    height: 15px;
}

.word-confirm-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    font-size: 0.85rem;
    color: #fbbf24;
    font-family: "Nazanin", sans-serif;
    opacity: 0.9;
}

.word-confirm-note svg {
    width: 15px;
    height: 15px;
    color: #fbbf24;
}

/* ---------------------------------------------------------------
   Play screen — word card, timer, actions
--------------------------------------------------------------- */
.play-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 6px 0;
    width: 100%;
}

.word-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1 / 0.78;
}

.word-card {
    position: relative;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(167, 139, 250, 0.28);
    border-radius: 30px;
    background: linear-gradient(160deg, var(--panel-strong), var(--panel));
    overflow: hidden;
    animation: pantoCardGlow 5s ease-in-out infinite;
}

@keyframes pantoCardGlow {
    0%, 100% {
        box-shadow:
            inset 2px 2px 10px rgba(255, 255, 255, 0.08),
            inset -3px -3px 14px rgba(0, 0, 0, 0.32),
            0 14px 36px rgba(124, 58, 237, 0.2),
            0 0 20px rgba(167, 139, 250, 0.25);
    }
    50% {
        box-shadow:
            inset 2px 2px 10px rgba(255, 255, 255, 0.08),
            inset -3px -3px 14px rgba(0, 0, 0, 0.32),
            0 14px 36px rgba(124, 58, 237, 0.2),
            0 0 30px rgba(249, 115, 22, 0.22);
    }
}

body.light-theme .word-card {
    border-color: rgba(109, 40, 217, 0.3);
}

.word-card-glow {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    background: radial-gradient(circle at 50% 20%, rgba(167, 139, 250, 0.1), transparent 65%);
    pointer-events: none;
}

.word-card-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.word-level-badge {
    font-size: 0.8rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 4px 14px;
}

.word-card-content h2 {
    font-size: clamp(2rem, 7.5vw, 3.4rem);
    margin: 6px 0;
    line-height: 1.2;
    word-break: break-word;
}

.word-card-hint {
    font-size: 0.9rem;
    color: var(--muted);
    font-family: "Nazanin", sans-serif;
    background: var(--panel);
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 6px 14px;
    max-width: 90%;
    opacity: 0.88;
}

.word-category-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-family: "Nazanin", sans-serif;
    opacity: 0.72;
}

.timer-section {
    width: 100%;
    max-width: 520px;
}

.timer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.timer-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--muted);
    font-family: "Nazanin", sans-serif;
    opacity: 0.85;
}

.timer-label svg {
    width: 15px;
    height: 15px;
    color: var(--accent);
}

.timer-seconds {
    font-size: 1.55rem;
    font-weight: 700;
    direction: ltr;
    min-width: 2.6ch;
    text-align: center;
    margin-inline-start: auto;
    transition: color 0.3s linear;
}

.timer-pause {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 46px;
    padding: 6px 14px;
    border: 2px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: var(--panel-strong);
    color: var(--muted);
    font-size: 0.85rem;
    font-family: "Nazanin", sans-serif;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.2s ease-out, background 0.2s, color 0.2s;
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.07),
        inset -2px -2px 8px rgba(0, 0, 0, 0.26),
        0 4px 12px rgba(0, 0, 0, 0.18);
}

.timer-pause:hover {
    background: var(--panel);
    color: var(--text);
}

.timer-pause:active {
    transform: scale(0.95);
}

.timer-pause svg {
    width: 17px;
    height: 17px;
}

.timer-pause.danger {
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.timer-pause.danger:hover {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.progress-track {
    position: relative;
    width: 100%;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    background: var(--bg-soft);
    overflow: hidden;
    direction: ltr;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    position: relative;
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s linear, background 0.3s linear;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.35);
}

.progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 20%, rgba(255, 255, 255, 0.25) 50%, transparent 80%);
    border-radius: 999px;
}

.play-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 480px;
}

.play-actions .primary-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 66px;
    padding: 14px 12px;
    border-radius: 22px;
    font-size: 1.05rem;
}

.correct-action {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    box-shadow:
        inset -3px -3px 8px rgba(0, 0, 0, 0.26),
        inset 2px 2px 6px rgba(255, 255, 255, 0.24),
        0 8px 20px rgba(34, 197, 94, 0.32);
}

.wrong-action {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow:
        inset -3px -3px 8px rgba(0, 0, 0, 0.26),
        inset 2px 2px 6px rgba(255, 255, 255, 0.22),
        0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-points {
    font-size: 0.85rem;
    opacity: 0.85;
}

.time-bonus-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--accent);
    font-family: "Nazanin", sans-serif;
    opacity: 0.9;
}

.time-bonus-note svg {
    width: 15px;
    height: 15px;
    color: #fbbf24;
}

/* ---------------------------------------------------------------
   Toast
--------------------------------------------------------------- */
.toast-container {
    position: fixed;
    top: calc(84px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.panto-toast {
    background: var(--bg-soft);
    border: 2px solid rgba(167, 139, 250, 0.3);
    color: var(--text);
    font-family: "Nazanin", sans-serif;
    font-size: 0.95rem;
    padding: 10px 22px;
    border-radius: 999px;
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.4),
        inset 2px 2px 6px rgba(255, 255, 255, 0.08),
        inset -2px -2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: min(90vw, 420px);
    text-align: center;
}

.panto-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------------------------------------
   Loading
--------------------------------------------------------------- */
.game-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60svh;
    font-size: 1.2rem;
    color: var(--muted);
}

/* ---------------------------------------------------------------
   Accessibility: visible keyboard focus
--------------------------------------------------------------- */
.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.word-confirm-btn:focus-visible,
.timer-pause:focus-visible,
.quit-btn:focus-visible,
.back-cat-btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* ---------------------------------------------------------------
   Motion preferences
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .word-card,
    .word-confirm-card {
        animation: none;
    }
    .primary-btn,
    .secondary-btn,
    .word-confirm-btn,
    .timer-pause,
    .quit-btn,
    .color-swatch {
        transition: none;
    }
}

/* ---------------------------------------------------------------
   Tablet (≥641px)
--------------------------------------------------------------- */
@media (min-width: 641px) {
    .game-shell {
        padding: 16px 24px calc(24px + env(safe-area-inset-bottom));
    }
    .panel {
        padding: 28px;
    }
    .setup-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }
}

/* ---------------------------------------------------------------
   Desktop (≥1024px)
--------------------------------------------------------------- */
@media (min-width: 1024px) {
    .game-shell {
        padding: 20px 28px calc(28px + env(safe-area-inset-bottom));
    }
    .word-card-wrapper {
        aspect-ratio: 1 / 0.68;
    }
    .play-stage {
        gap: 18px;
    }
}

/* ---------------------------------------------------------------
   Phones in landscape: compact
--------------------------------------------------------------- */
@media (orientation: landscape) and (max-width: 1023px) {
    .game-shell.play-screen {
        min-height: calc(100svh - 72px);
    }
    .word-card-wrapper {
        max-width: 440px;
        aspect-ratio: 1 / 0.6;
    }
    .play-stage {
        gap: 10px;
    }
    .score-card {
        min-width: 84px;
        padding: 6px 10px;
    }
}

/* ---------------------------------------------------------------
   Short portrait phones (e.g. 375×667): tighten vertical rhythm
--------------------------------------------------------------- */
@media (max-width: 1023px) and (orientation: portrait) and (max-height: 700px) {
    .game-shell {
        padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
    }
    .panel {
        padding: 18px 14px;
    }
    .setup-grid {
        gap: 10px;
        margin-bottom: 18px;
    }
    .word-card-wrapper {
        aspect-ratio: 1 / 0.6;
    }
    .word-card-content h2 {
        font-size: clamp(1.7rem, 6vw, 2.4rem);
    }
    .play-stage {
        gap: 10px;
    }
    .play-actions .primary-btn {
        min-height: 58px;
    }
}

/* ---------------------------------------------------------------
   Small phones: icon-only timer buttons
--------------------------------------------------------------- */
@media (max-width: 640px) {
    .timer-pause span {
        display: none;
    }
    .timer-pause {
        padding: 6px 12px;
    }
}