.spelling-hero { margin-bottom: 1rem; }

.spelling-levels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin-bottom: 1rem;
}

.spelling-level {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .85rem;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    background: #fff;
    color: #334155;
    text-decoration: none;
}

.spelling-level strong {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border-radius: 999px;
    background: #ecfeff;
    color: #0f766e;
}

.spelling-level span { font-size: .9rem; font-weight: 700; }
.spelling-level.active { border-color: #0f766e; box-shadow: 0 0 0 2px #ccfbf1; }
.spelling-level.active strong { background: #0f766e; color: #fff; }

.spelling-stage {
    padding: clamp(1rem, 4vw, 1.5rem);
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
    scroll-margin-top: 1rem;
}

.spelling-stage-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.spelling-stage-header h2 { margin: .45rem 0 .25rem; }
.spelling-stage-header p { margin: 0; color: #64748b; }

.spelling-score { display: flex; gap: .55rem; }
.spelling-score div {
    min-width: 4.4rem;
    padding: .65rem .55rem;
    border-radius: 14px;
    background: #f8fafc;
    text-align: center;
}
.spelling-score strong { display: block; font-size: 1.25rem; color: #0f172a; }
.spelling-score span { display: block; margin-top: .1rem; font-size: .72rem; color: #64748b; }

.spelling-feedback {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 1rem;
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 14px;
    font-size: .9rem;
}
.spelling-feedback.correct { background: #ecfdf5; color: #166534; }
.spelling-feedback.wrong { background: #fff7ed; color: #9a3412; }
.spelling-feedback div { display: grid; gap: .25rem; }
.spelling-feedback p { margin: 0; }

.spelling-task {
    display: grid;
    gap: .6rem;
    margin: 2rem 0 1.4rem;
    text-align: center;
}
.spelling-task span { color: #64748b; font-size: .85rem; font-weight: 700; }
.spelling-task strong {
    font-size: clamp(1.65rem, 6vw, 2.7rem);
    line-height: 1.2;
    letter-spacing: -.025em;
    color: #0f172a;
}

.spelling-answer-form { max-width: 30rem; margin: 0 auto; }
.spelling-answer-form label span {
    display: block;
    margin-bottom: .4rem;
    font-size: .82rem;
    font-weight: 700;
    color: #475569;
}
.spelling-answer-form input {
    width: 100%;
    min-height: 4rem;
    box-sizing: border-box;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
}
.spelling-answer-form input:focus { outline: 3px solid #ccfbf1; border-color: #0f766e; }
.spelling-check { display: block; width: 100%; margin-top: 1rem; min-height: 3.2rem; }

.spelling-help {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: .8rem .2rem;
    color: #64748b;
    font-size: .86rem;
}
.spelling-help strong { color: #334155; }

@media (max-width: 720px) {
    .spelling-levels { grid-template-columns: 1fr 1fr; }
    .spelling-level { padding: .7rem; }
    .spelling-stage-header { display: block; }
    .spelling-score { margin-top: 1rem; }
    .spelling-score div { flex: 1; min-width: 0; }
    .spelling-feedback { grid-template-columns: 1fr; }
    .spelling-help { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
    .spelling-levels { grid-template-columns: 1fr; }
    .spelling-task { margin-top: 1.4rem; }
}
