/* farsi.css — «فارسی و املا» روی رشدگاه (مکملِ edu-math.css) */

.fh { max-width: 1000px; margin: 0 auto; padding: 18px 14px 90px; }
.fh__head { margin-bottom: 14px; }
.fh__title { margin: 0 0 6px; font-size: 1.6rem; font-weight: 800; color: #0f172a; }
.fh__sub { margin: 0; color: #475569; font-size: .95rem; line-height: 1.9; }

.fh__grades {
    display: grid; gap: 8px; margin-bottom: 16px;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}
.fh__grade {
    font: inherit; cursor: pointer; padding: 10px 8px; border-radius: 14px;
    border: 1px solid #cbd5e1; background: #fff; color: #0f172a;
    display: grid; gap: 2px; justify-items: center;
}
.fh__grade:hover { background: #f1f5f9; }
.fh__grade.is-on { background: #0f766e; border-color: #0f766e; color: #fff; }
.fh__grade-num { font-size: 1.1rem; font-weight: 800; }
.fh__grade-name { font-size: 12px; }

.fh__cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fh__card {
    font: inherit; text-align: start; cursor: pointer; padding: 16px;
    border-radius: 18px; border: 1px solid #e2e8f0; background: #fff;
    display: grid; gap: 6px; color: #0f172a;
}
.fh__card b { font-size: 1.05rem; }
.fh__card small { color: #475569; font-size: .86rem; line-height: 1.8; }
.fh__card-ico { font-size: 1.5rem; }
.fh__card--emla { border-color: #99f6e4; background: linear-gradient(135deg, #f0fdfa, #fff); }
.fh__card--grammar { border-color: #c7d2fe; background: linear-gradient(135deg, #eef2ff, #fff); }
.fh__card--info { cursor: default; border-style: dashed; }

/* ── بازی املا ── */
.eh { display: grid; gap: 12px; }
.eh__bar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0;
}
.eh__score { margin-inline-start: auto; font-size: 12.5px; color: #475569; }
.eh__btn {
    font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 10px;
    border: 1px solid #cbd5e1; background: #fff; color: #0f172a; cursor: pointer;
}
.eh__btn:hover { background: #f1f5f9; }
.eh__btn--new { background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 700; }
.eh__btn--play { background: #e0f2fe; border-color: #7dd3fc; }
.eh__stage {
    padding: 20px 16px; border-radius: 18px; background: #fff; border: 1px solid #e2e8f0;
    display: grid; gap: 12px; justify-items: center;
}
.eh__hint { margin: 0; color: #475569; font-size: .95rem; }
.eh__in {
    font: inherit; font-size: 1.6rem; font-weight: 700; text-align: center;
    inline-size: min(100%, 420px); padding: 12px 14px; border-radius: 14px;
    border: 2px solid #cbd5e1; background: #fff; color: #0f172a;
}
.eh__in:focus { outline: 3px solid #0f766e33; border-color: #0f766e; }
.eh__in.is-no { border-color: #dc2626; color: #dc2626; }
.eh__say { margin: 0; min-block-size: 1.6em; font-weight: 700; color: #0f766e; text-align: center; }
.eh__note { margin: 0; font-size: 12px; color: #94a3b8; text-align: center; }

/* ── دستور زبان ── */
.gh { display: grid; gap: 12px; }
.gh__bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0;
}
.gh__btn {
    font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 10px;
    border: 1px solid #cbd5e1; background: #fff; color: #0f172a; cursor: pointer;
}
.gh__btn:hover { background: #f1f5f9; }
.gh__note { font-size: 12.5px; color: #475569; }
.gh__list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gh__item {
    font: inherit; text-align: start; cursor: pointer; padding: 12px 14px;
    border-radius: 14px; border: 1px solid #c7d2fe; background: #fff; color: #0f172a;
    display: grid; gap: 4px;
}
.gh__item:hover { background: #eef2ff; }
.gh__item small { color: #64748b; font-size: 12px; }
.gh__ico { font-size: 1.2rem; }
.gh__quiz { display: grid; gap: 12px; }
.gh__q { margin: 0; font-size: 1.05rem; font-weight: 700; color: #0f172a; line-height: 2; }
.gh__opts { display: grid; gap: 8px; }
.gh__opt {
    font: inherit; text-align: start; cursor: pointer; padding: 12px 14px;
    border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; color: #0f172a;
}
.gh__opt:hover { background: #f8fafc; }
.gh__opt.is-ok { border-color: #16a34a; background: #f0fdf4; color: #15803d; font-weight: 700; }
.gh__opt.is-no { border-color: #dc2626; background: #fef2f2; color: #b91c1c; }
.gh__say { margin: 0; min-block-size: 1.6em; font-weight: 700; color: #0f766e; }
.gh__done { display: grid; gap: 10px; justify-items: start; }

/* ── قاعدهٔ حرف‌ها (منطقِ آماریِ املا) ── */
.rh { display: grid; gap: 12px; }
.rh__bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0;
}
.rh__btn {
    font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 10px;
    border: 1px solid #cbd5e1; background: #fff; color: #0f172a; cursor: pointer;
}
.rh__btn:hover { background: #f1f5f9; }
.rh__btn--new { background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 700; }
.rh__btn--play { background: #e0f2fe; border-color: #7dd3fc; }
.rh__note, .rh__score, .rh__prog { font-size: 12.5px; color: #475569; }
.rh__score, .rh__prog { margin-inline-start: auto; }
.rh__modes { display: flex; gap: 8px; flex-wrap: wrap; }
.rh__mode {
    font: inherit; font-size: 13px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid #cbd5e1; background: #fff; color: #334155;
}
.rh__mode.is-on { background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 700; }
.rh__groups { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rh__g {
    font: inherit; text-align: start; cursor: pointer; padding: 10px 12px; border-radius: 14px;
    border: 1px solid #99f6e4; background: #fff; color: #0f172a; display: grid; gap: 2px;
}
.rh__g:hover { background: #f0fdfa; }
.rh__g b { font-size: 1.2rem; }
.rh__g small { color: #64748b; font-size: 11.5px; }
.rh__stage { display: grid; gap: 10px; }
.rh__hint { margin: 0; color: #64748b; font-size: 13px; line-height: 1.9; }
.rh__play { display: grid; gap: 10px; }
.rh__playbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 8px 12px; border-radius: 12px; background: #f0fdfa; border: 1px solid #99f6e4;
    font-size: 13.5px;
}
.rh__host { display: block; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid #e2e8f0; }
.rh__ctx {
    margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #f8fafc;
    border: 1px dashed #cbd5e1; color: #334155; font-size: .95rem; line-height: 2; text-align: center;
}
.rh__mount { display: block; }
.rh__write { display: grid; gap: 10px; justify-items: center; }
.rh__in {
    font: inherit; font-size: 1.5rem; font-weight: 700; text-align: center;
    inline-size: min(100%, 380px); padding: 12px 14px; border-radius: 14px;
    border: 2px solid #cbd5e1; background: #fff; color: #0f172a;
}
.rh__in:focus { outline: 3px solid #0f766e33; border-color: #0f766e; }
.rh__say { margin: 0; min-block-size: 1.6em; font-weight: 700; color: #0f766e; text-align: center; }
.rh__done { display: grid; gap: 10px; justify-items: start; }
.rh__done p { margin: 0; font-weight: 700; color: #0f172a; }
.rh__donebtns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── قاعدهٔ حرف‌ها: دسته‌های هم‌صدا + فهرستِ واژه‌ها ── */
.rh { display: grid; gap: 14px; }
.rh__bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0;
}
.rh__btn {
    font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 10px;
    border: 1px solid #cbd5e1; background: #fff; color: #0f172a; cursor: pointer;
}
.rh__btn:hover { background: #f1f5f9; }
.rh__btn--new { background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 700; }
.rh__btn--play { background: #e0f2fe; border-color: #7dd3fc; }
.rh__note, .rh__score, .rh__prog { font-size: 12.5px; color: #475569; }
.rh__score, .rh__prog { margin-inline-start: auto; }
.rh__modes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rh__modelabel { font-size: 12.5px; color: #475569; }
.rh__mode {
    font: inherit; font-size: 13px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid #cbd5e1; background: #fff; color: #334155;
}
.rh__mode.is-on { background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 700; }

.rh__cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.rh__card {
    display: grid; gap: 10px; padding: 16px; border-radius: 18px;
    background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.rh__cardhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rh__sound { font-weight: 800; font-size: 1.05rem; color: #0f172a; }
.rh__default {
    font-size: 12px; color: #0f766e; background: #f0fdfa;
    border: 1px solid #99f6e4; border-radius: 999px; padding: 3px 10px;
}
.rh__default b { font-size: 1.05rem; }
.rh__bar-track {
    block-size: 26px; border-radius: 999px; background: #f1f5f9;
    border: 1px solid #e2e8f0; overflow: hidden; position: relative;
}
.rh__bar-fill {
    display: grid; place-items: center; block-size: 100%;
    background: linear-gradient(90deg, #0f766e, #14b8a6);
    color: #fff; font-size: 12px; font-weight: 700; border-start-end-radius: 999px;
}
.rh__hint { margin: 0; color: #64748b; font-size: 13px; line-height: 1.9; }
.rh__hint.small { font-size: 12.5px; }
.rh__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rh__chip {
    font: inherit; cursor: pointer; display: grid; gap: 1px; justify-items: center;
    padding: 8px 14px; border-radius: 14px; border: 1px solid #99f6e4; background: #fff; color: #0f172a;
}
.rh__chip:hover { background: #f0fdfa; }
.rh__chip b { font-size: 1.35rem; line-height: 1; }
.rh__chip span { font-size: 11.5px; color: #475569; }
.rh__chip em { font-size: 10.5px; color: #0f766e; font-style: normal; }

.rh__detail { display: grid; gap: 12px; }
.rh__detailbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0;
}
.rh__detailtitle { font-size: 15px; }
.rh__stats {
    display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 14px;
    border-radius: 14px; background: #f8fafc; border: 1px dashed #cbd5e1;
    font-size: 12.5px; color: #334155;
}
.rh__search input {
    font: inherit; font-size: 14px; inline-size: 100%; padding: 10px 14px;
    border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; color: #0f172a;
}
.rh__wordlist {
    margin: 0; padding: 0; list-style: none; display: grid; gap: 8px;
    max-block-size: 60vh; overflow: auto;
}
.rh__row { padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #e2e8f0; }
.rh__rowhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rh__word { font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.rh__word mark, .rh__ctx-line mark { background: #fef3c7; color: #92400e; border-radius: 4px; padding: 0 2px; }
.rh__meta { font-size: 11.5px; color: #64748b; white-space: nowrap; }
.rh__ctx-line { margin: 6px 0 0; font-size: .92rem; line-height: 2; color: #334155; }
.rh__empty { padding: 14px; color: #64748b; }
.rh__play { display: grid; gap: 10px; }
.rh__playbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 8px 12px; border-radius: 12px; background: #f0fdfa; border: 1px solid #99f6e4; font-size: 13.5px;
}
.rh__host { display: block; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid #e2e8f0; }
.rh__ctx {
    margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #f8fafc;
    border: 1px dashed #cbd5e1; color: #334155; font-size: .95rem; line-height: 2; text-align: center;
}
.rh__mount { display: block; }
.rh__write { display: grid; gap: 10px; justify-items: center; }
.rh__in {
    font: inherit; font-size: 1.5rem; font-weight: 700; text-align: center;
    inline-size: min(100%, 380px); padding: 12px 14px; border-radius: 14px;
    border: 2px solid #cbd5e1; background: #fff; color: #0f172a;
}
.rh__in:focus { outline: 3px solid #0f766e33; border-color: #0f766e; }
.rh__say { margin: 0; min-block-size: 1.6em; font-weight: 700; color: #0f766e; text-align: center; }
.rh__done { display: grid; gap: 10px; justify-items: start; }
.rh__done p { margin: 0; font-weight: 700; color: #0f172a; }
.rh__donebtns { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 640px) {
    .fh { padding: 12px 10px 90px; }
    .fh__title { font-size: 1.35rem; }
    .fh__grades { grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); }
    .fh__grade { padding: 8px 6px; }
    .eh__bar .eh__score { inline-size: 100%; margin: 0; text-align: center; }
    .eh__btn { flex: 1 1 auto; }
    .eh__in { font-size: 1.35rem; }
    .gh__list { grid-template-columns: 1fr 1fr; }
}
