.phonics-page {
    --ink: #173f4c;
    --muted: #496d78;
    --forest: #147b8f;
    --forest-dark: #075766;
    background:
        radial-gradient(circle at 8% 14%, rgba(74, 198, 216, .2) 0 70px, transparent 71px),
        radial-gradient(circle at 92% 38%, rgba(255, 255, 255, .55) 0 85px, transparent 86px),
        linear-gradient(145deg, #f3fdff 0%, #c9f0f4 54%, #8fd3dc 100%);
}

@media (min-width: 851px) {
    body.phonics-page {
        background:
            radial-gradient(circle at 3% 20%, rgba(255, 255, 255, .7) 0 22px, transparent 23px),
            radial-gradient(circle at 7% 33%, rgba(255, 255, 255, .55) 0 13px, transparent 14px),
            radial-gradient(circle at 95% 24%, rgba(255, 255, 255, .7) 0 25px, transparent 26px),
            linear-gradient(145deg, #f3fdff 0%, #c9f0f4 54%, #8fd3dc 100%);
    }
}

.phonics-page .level-buttons {
    background:
        radial-gradient(circle at 12% 24%, rgba(255,255,255,.62) 0 4px, transparent 5px),
        radial-gradient(circle at 20% 62%, rgba(255,255,255,.48) 0 6px, transparent 7px),
        radial-gradient(circle at 78% 24%, rgba(255,255,255,.55) 0 5px, transparent 6px),
        linear-gradient(180deg, #9ce2e7 0%, #59bdcc 48%, #2f95aa 100%);
}

.phonics-page .quest-trail-road {
    stroke: rgba(245, 255, 255, .95);
    stroke-width: 34;
}

.phonics-page .quest-trail-dashes {
    stroke: #a8e3ea;
    stroke-width: 5;
    stroke-dasharray: 6 14;
}

.phonics-page .quest-star {
    color: #f2a900;
    text-shadow: 0 3px 0 #d99000;
}

.phonics-page .quest-mark {
    color: rgba(255, 255, 255, .8);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.phonics-page .level-button {
    background: #f8ffff;
}

.phonics-page .level-button.active {
    border-color: #147b8f;
    background: #e4fbfd;
}

.phonics-page .level-button:disabled {
    opacity: .48;
    cursor: not-allowed;
    filter: saturate(.55);
}

.phonics-page .level-button:disabled:hover {
    box-shadow: none;
    transform: none;
}

.phonics-page .quest-link {
    color: var(--forest-dark);
}

.phonics-card {
    grid-template-columns: 1fr;
}

.phonics-page .challenge-panel {
    padding-inline: clamp(22px, 7vw, 76px);
}

.phonics-question {
    padding: 24px 0 10px;
}

.sound-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 9px 16px;
    border: 2px solid #147b8f;
    border-radius: 14px;
    color: #075766;
    background: #def6f8;
    cursor: pointer;
    font-weight: 800;
}

.sound-button:hover {
    background: #c7edf2;
}

.sound-button[hidden] {
    display: none;
}

.phonics-question h2 {
    max-width: 720px;
    margin: 24px auto 8px;
    font-size: clamp(1.8rem, 5vw, 2.65rem);
    line-height: 1.15;
}

.word-picture {
    margin: 18px auto 4px;
    font-size: clamp(6rem, 20vw, 9rem);
    line-height: 1.1;
}

.written-answer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.written-answer[hidden] {
    display: none;
}

.word-answer {
    width: min(300px, calc(100% - 82px));
    height: 68px;
    padding: 10px 16px;
    border: 3px dashed #82bdc7;
    border-radius: 18px;
    color: #075766;
    background: #f2fcfd;
    font-family: "Fredoka", sans-serif;
    font-size: clamp(1.7rem, 7vw, 2.25rem);
    font-weight: 600;
    text-align: center;
}

.word-answer:focus {
    border-style: solid;
    background: white;
}

.phonics-page.starter-picture .phonics-question h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.phonics-page.starter-picture .phonics-question {
    padding-top: 12px;
}

.sound-prompt {
    min-height: 36px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 1.18rem;
    font-weight: 800;
}

.answer-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.answer-options[hidden] {
    display: none;
}

.word-option {
    min-height: 96px;
    padding: 14px;
    border: 3px solid #9ccfd6;
    border-radius: 20px;
    color: #075766;
    background: white;
    box-shadow: 0 6px 0 #c6e7eb;
    cursor: pointer;
    font-family: "Fredoka", sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.word-option:hover:not(:disabled) {
    border-color: #147b8f;
    transform: translateY(-3px);
}

.word-option.correct {
    border-color: #28784d;
    background: #e4f4df;
}

.word-option.incorrect {
    border-color: #aa443e;
    background: #fff0ec;
}

.word-option:disabled {
    cursor: default;
}

.phonics-page .next-button {
    margin: 18px auto 6px;
    padding: 7px;
    background: linear-gradient(135deg, #4b86a0, #265d75);
    box-shadow: 0 8px 0 #174253, 0 12px 22px rgba(38, 93, 117, .22);
    font-family: "Nunito", sans-serif;
    font-size: .68rem;
    line-height: 1.05;
}

.written-answer .next-button {
    margin: 0;
}

.phonics-page .next-button:hover {
    box-shadow: 0 10px 0 #174253, 0 14px 25px rgba(38, 93, 117, .25);
}

.phonics-page .next-button:active {
    box-shadow: 0 2px 0 #174253;
}

.phonics-page .hint-box {
    border-color: #8ed3dc;
    background: #eefbfc;
    text-align: center;
}

.shared-results-summary {
    margin: 22px 0 8px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
    text-align: left;
}

@media (max-width: 680px) {
    .phonics-page .level-buttons::before {
        background: #d9f7f8;
    }

    .phonics-page .level-buttons::after {
        border-color: #f8ffff;
    }

    .answer-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .word-option {
        min-height: 62px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .word-option {
        transition: none;
    }
}
