:root{--ink:#12223a;--muted:#637187;--teal:#08756d;--teal-dark:#075c57;--line:#d6e4e2;--cream:#fff9e9;--paper:#fff}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;color:var(--ink);background:radial-gradient(circle at 8% 0%,rgba(26,145,134,.13),transparent 25rem),linear-gradient(180deg,#f7fbfa,#eaf1f0);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,select{font:inherit}
[hidden]{display:none!important}
.studyPage{width:min(1180px,calc(100% - 28px));margin:18px auto 56px}
.studyNav{display:flex;gap:8px;overflow-x:auto;margin-bottom:14px;padding:5px 1px 8px;scrollbar-width:thin}
.studyNav a{flex:0 0 auto;padding:9px 12px;border:1px solid #c8dcda;border-radius:999px;background:rgba(255,255,255,.82);color:#315366;font-size:.86rem;font-weight:750;text-decoration:none}
.studyNav a[aria-current="page"]{border-color:var(--teal);background:#e3f5f1;color:var(--teal-dark)}
.studyHero{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:clamp(25px,5vw,48px);border-radius:27px;background:radial-gradient(circle at 88% 18%,rgba(255,255,255,.18),transparent 18rem),linear-gradient(135deg,#075e59,#0b8278);box-shadow:0 20px 60px rgba(19,59,55,.14);color:#fff}
.studyHero>div:first-child{max-width:790px}.studyHero>div:first-child>span{color:#c9fff6;font-size:.76rem;font-weight:900;letter-spacing:.1em}
.studyHero h1{margin:8px 0 12px;font-size:clamp(2rem,5vw,3.2rem);line-height:1.04}.studyHero p{margin:0;color:#e1fff9;font-size:1.04rem;line-height:1.55}
.studyHeroSide{display:grid;gap:12px;min-width:132px}.studyHeroCount{display:grid;width:106px;height:106px;place-content:center;border:1px solid rgba(255,255,255,.28);border-radius:50%;background:rgba(255,255,255,.12);text-align:center}.studyHeroCount strong{font-size:2.15rem;line-height:1}.studyHeroCount span{margin-top:5px;font-size:.78rem}
.studyHeroSide label{display:grid;gap:5px;color:#dcfff9;font-size:.76rem;font-weight:800}.studyHeroSide select{padding:8px;border:1px solid rgba(255,255,255,.42);border-radius:9px;background:#fff;color:#173d4b}
.studyTabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}
.studyTab{display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto;gap:2px 12px;min-height:86px;padding:13px 16px;border:1px solid var(--line);border-radius:17px;background:#fff;color:var(--ink);cursor:pointer;text-align:left}
.studyTab>span{grid-row:1/3;display:grid;width:48px;height:48px;align-self:center;place-items:center;border-radius:14px;background:#e8f2f3;color:#176579;font-size:1.25rem;font-weight:900}.studyTab b{align-self:end;font-size:1.03rem}.studyTab small{color:var(--muted);line-height:1.3}.studyTab.is-active{border-color:#17877e;background:#f0fbf9;box-shadow:0 8px 25px rgba(23,135,126,.1)}.studyTab.is-active>span{background:var(--teal);color:#fff}
.studyPanel{padding:clamp(16px,3vw,28px);border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.93);box-shadow:0 15px 45px rgba(28,67,64,.08)}
.sectionHeading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}.sectionHeading span{color:var(--teal);font-size:.73rem;font-weight:900;letter-spacing:.1em}.sectionHeading h2{margin:5px 0 0;font-size:clamp(1.45rem,3vw,2rem)}.sectionHeading p{max-width:460px;margin:0;color:var(--muted);line-height:1.45}
.wordGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.studyWordCard{overflow:hidden;border:1px solid #dce7e5;border-radius:18px;background:#fff;box-shadow:0 9px 25px rgba(23,61,58,.07)}
.wordVisual{display:block;width:100%;height:175px;padding:0;border:0;background:#e9f1ef;cursor:zoom-in}.wordVisual img{display:block;width:100%;height:100%;object-fit:cover}.wordCardBody{padding:14px}.wordCardBody h3{margin:0;color:#143e49;font-family:"Noto Naskh Arabic","Segoe UI",serif;font-size:2rem;line-height:1.3;text-align:right}.wordLatin{display:block;margin-top:2px;color:#28736d;font-size:.78rem;font-weight:800}.wordMeaning{display:block;min-height:42px;margin-top:5px;color:#4d5d70;line-height:1.35}.wordCardActions{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:11px}.wordCardActions button{min-height:40px;padding:8px 10px;border-radius:10px;cursor:pointer;font-size:.82rem;font-weight:800}.wordListen{border:0;background:var(--teal);color:#fff}.wordInspect{border:1px solid #bdd7d4;background:#f5fbfa;color:#195d59}
.studyTip{display:flex;align-items:flex-start;gap:12px;margin-bottom:18px;padding:14px 16px;border:1px solid #bfe1dc;border-radius:14px;background:#effaf8}.studyTip>span{font-size:1.45rem}.studyTip p{margin:0;color:#31545d;line-height:1.5}
.exampleList{display:grid;gap:18px}.exampleWordGroup{overflow:hidden;border:1px solid var(--line);border-radius:18px;background:#fff}.exampleWordHead{display:flex;align-items:center;gap:13px;padding:14px 16px;background:linear-gradient(90deg,#eaf8f5,#fff)}.exampleWordHead img{width:64px;height:64px;border-radius:13px;object-fit:cover}.exampleWordHead div{display:grid}.exampleWordHead b{font-family:"Noto Naskh Arabic","Segoe UI",serif;font-size:1.8rem;line-height:1.2}.exampleWordHead span{color:var(--muted)}.exampleCards{display:grid;gap:10px;padding:14px}.exampleCard{padding:13px;border:1px solid #e1e9e8;border-radius:13px;background:#fcfefd}.exampleTop{display:flex;align-items:flex-start;gap:9px}.exampleArabic{display:block;flex:1;color:#162d39;font-family:"Noto Naskh Arabic","Segoe UI",serif;font-size:1.45rem;line-height:1.85;text-align:right}.exampleToken{display:inline;padding:1px 3px;border:0;border-radius:5px;background:transparent;color:inherit;cursor:pointer;font:inherit}.exampleToken:hover,.exampleToken:focus-visible{background:#ffe7a8;outline:none}.exampleAudio{flex:0 0 auto;width:42px;height:42px;border:0;border-radius:11px;background:#e3f4f1;color:#08665f;cursor:pointer}.exampleActions{display:flex;justify-content:flex-end;margin-top:7px}.translationToggle{padding:6px 10px;border:1px solid #c9dcd9;border-radius:9px;background:#fff;color:#35636a;cursor:pointer;font-size:.78rem;font-weight:800}.exampleTranslation{margin:10px 0 0;padding:10px 12px;border-radius:10px;background:#f2f6f5;color:#425567;line-height:1.45}.exampleTranslation small{display:block;margin-top:4px;color:#72808e}
.visualDialog{width:min(650px,calc(100% - 24px));padding:14px;border:0;border-radius:21px;background:#fff;box-shadow:0 30px 100px rgba(9,38,35,.35);text-align:center}.visualDialog::backdrop{background:rgba(10,28,34,.68)}.visualDialog img{display:block;width:100%;max-height:60vh;border-radius:15px;object-fit:contain;background:#edf3f2}.visualDialog strong{display:block;margin-top:12px;font-family:"Noto Naskh Arabic","Segoe UI",serif;font-size:2.2rem}.visualDialog>span{color:var(--muted)}.dialogClose,.detailClose{position:absolute;top:9px;right:9px;display:grid;width:36px;height:36px;padding:0;place-items:center;border:0;border-radius:50%;background:#fff;color:#263d47;box-shadow:0 3px 12px rgba(0,0,0,.16);cursor:pointer;font-size:1.35rem}
.wordDetail{position:fixed;z-index:1200;right:18px;bottom:18px;overflow:auto;width:min(440px,calc(100vw - 28px));max-height:min(78vh,720px);padding:19px;border:1px solid #c8dcd9;border-bottom:6px solid var(--teal);border-radius:19px;background:#fff;box-shadow:0 25px 80px rgba(10,38,35,.28)}.wordDetail header{padding-right:35px}.wordDetail header b{display:block;color:#123a46;font-family:"Noto Naskh Arabic","Segoe UI",serif;font-size:2.25rem;line-height:1.25}.wordDetail header span{display:block;color:#263d4d;font-size:1.05rem;font-weight:850}.wordDetail header small{color:var(--muted)}.detailActions{margin:12px 0}.detailActions button{width:100%;min-height:43px;border:0;border-radius:11px;background:var(--teal);color:#fff;cursor:pointer;font-weight:850}.detailExplanation,.detailStructure,.detailConjugation{margin-top:10px;padding:11px;border-radius:11px;background:#f4f8f7;color:#3d5260;line-height:1.5}.detailStructure b,.detailConjugation b{color:#185b58}.detailStructure ul{margin:7px 0 0;padding-left:20px}.detailConjugation table{width:100%;margin-top:8px;border-collapse:collapse;font-size:.8rem}.detailConjugation th,.detailConjugation td{padding:6px;border-bottom:1px solid #dbe7e5;text-align:left}.detailConjugation td[lang="ar"]{font-family:"Noto Naskh Arabic","Segoe UI",serif;font-size:1rem;text-align:right}
.detailPronunciation{margin:8px 0 0!important;padding:7px 9px;border-radius:9px;background:#eaf7f4;color:#255b57!important;font-size:.88rem}
.wordDetail .detailPronunciation span{display:inline;color:inherit;font-size:inherit;font-weight:800}
.detailExamples{margin-top:10px;padding:11px;border:1px solid #cfe3df;border-radius:12px;background:#fff}
.detailExamples h4{margin:0 0 8px;color:#185b58}
.detailExamples>div{display:grid;gap:8px}
.detailExamples article{display:grid;grid-template-columns:minmax(0,1fr) 38px;align-items:center;gap:8px;padding:9px;border-radius:10px;background:#f3f8f7}
.detailExamples article div{display:grid;min-width:0}
.detailExamples article b{font-family:"Noto Naskh Arabic","Segoe UI",serif;font-size:1.25rem;line-height:1.55;text-align:right}
.detailExamples article span{color:#3d5260;font-size:.86rem}
.detailExamples article small{color:#71808c;font-size:.76rem}
.detailExamples article button{display:grid;width:38px;height:38px;padding:0;place-items:center;border:0;border-radius:10px;background:#dff3ef;color:#08665f;cursor:pointer}

@media(max-width:900px){.wordGrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.studyPage{width:min(100% - 16px,680px);margin-top:8px}.studyHero{align-items:flex-start;flex-direction:column}.studyHeroSide{grid-template-columns:auto 1fr;align-items:end;width:100%}.studyHeroCount{width:84px;height:84px}.studyTabs{grid-template-columns:1fr}.sectionHeading{align-items:flex-start;flex-direction:column}.wordGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.wordVisual{height:155px}.wordDetail{right:10px;bottom:10px;width:calc(100vw - 20px)}}
@media(max-width:430px){.wordGrid{grid-template-columns:1fr}.wordVisual{height:210px}.exampleWordHead img{width:54px;height:54px}.exampleArabic{font-size:1.3rem}}
