@font-face{font-family:Arabic;src:url('../assets/Cairo-Regular.ttf') format('truetype');font-weight:100 900;font-display:swap}
@font-face{font-family:MushafiCairo;src:url('../assets/Cairo-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:Kufi;src:url('../assets/title.ttf') format('truetype');font-weight:700;font-display:swap}
:root{color-scheme:light;--paper:#faf9f3;--card:#fffef9;--green:#154e3d;--ink:#163f35;--gold:#b18a43;--line:#e0e4d7;--muted:#64776a}
*{box-sizing:border-box}html{min-height:100%;background:var(--paper);scroll-behavior:auto}body{margin:0;color:var(--ink);font-family:Arabic,system-ui,sans-serif;font-size:17px;line-height:1.8;background:radial-gradient(ellipse at 0 0,var(--night-bg-f4efdf,#f4efdf),transparent 50%),var(--paper)}button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{font:inherit;color:inherit;cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:3px solid var(--gold);outline-offset:4px}button:active,a:active{filter:brightness(.94)}.icon{width:28px;height:28px;flex:none;vertical-align:middle}.app-shell{width:min(100%,640px);margin:0 auto;min-height:100dvh;padding:0 22px max(20px,env(safe-area-inset-bottom));display:flex;flex-direction:column}.top{padding-top:max(12px,env(safe-area-inset-top));margin-bottom:22px}.top-row{height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;gap:10px;align-items:center;font-family:Kufi,Arabic,sans-serif;font-size:27px;line-height:1.6}.brand .icon{color:var(--gold);width:33px;height:33px}.round-button{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);background:var(--card);border-radius:50%;padding:10px}.round-button .icon{width:23px;height:23px}.review-mark{font-size:17px;color:var(--night-fg-8c743f,#8c743f);text-align:center;line-height:20px}.content{flex:1;width:100%;min-width:0}.home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.tile{height:145px;display:flex;flex-direction:column;gap:13px;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:22px;background:var(--card);box-shadow:0 2px 3px #23402a03;padding:13px;text-align:center}.tile>.icon{width:42px;height:42px;color:var(--night-fg-23614d,#23614d)}.card-label{font-size:17px;font-weight:700;line-height:1.5}.tile.selected,.tile:active{background:var(--theme-action,var(--green));color:var(--night-fg-fffdf4,#fffdf4);border-color:var(--green);box-shadow:0 5px 15px #173e2e15}.tile.selected>.icon,.tile:active>.icon{color:var(--night-fg-d5b879,#d5b879)}.council-banner{display:flex;align-items:center;gap:14px;background:var(--night-bg-f1ead8,#f1ead8);border:1px solid var(--night-border-e2d5b5,#e2d5b5);border-radius:20px;min-height:87px;padding:15px 20px;margin-top:15px;font-size:20px;font-weight:700}.banner-icon{display:grid;place-items:center;width:52px;height:52px;color:var(--green);background:var(--night-bg-fff9e8,#fff9e8);border-radius:16px}.banner-icon .icon{width:33px;height:33px}.chevron{margin-inline-start:auto;width:20px;height:20px;color:var(--night-fg-839382,#839382)}.footer{display:flex;gap:15px;justify-content:space-between;align-items:center;padding:24px 2px 0;font-size:17px;color:var(--muted);flex-wrap:wrap}.footer a{min-height:44px;display:flex;align-items:center;text-decoration:underline;text-underline-offset:5px}.home-content+.footer{justify-content:center}.page-heading{display:flex;gap:14px;align-items:center;margin:6px 0 22px}.page-heading h1{font-size:27px;line-height:1.55;font-weight:700;margin:0;overflow-wrap:anywhere}.section-icon{width:51px;height:51px;border-radius:17px;background:var(--night-bg-efeadd,#efeadd);color:var(--night-fg-a5833e,#a5833e);display:grid;place-items:center;flex:none}.page-note{font-size:17px;color:var(--muted);margin:-7px 0 22px;line-height:1.9}.route-list{display:flex;flex-direction:column;gap:12px}.route-card{display:flex;gap:16px;align-items:center;padding:19px 18px;border:1px solid var(--line);background:var(--card);border-radius:19px;min-height:80px}.route-card>.icon:first-child{width:31px;height:31px;color:var(--night-fg-4f705b,#4f705b)}.route-card .card-label{font-size:17px}.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.action{min-height:48px;border:1px solid var(--line);border-radius:14px;background:var(--card);padding:9px 20px;display:flex;align-items:center;justify-content:center;gap:9px;font-size:17px;font-weight:600;flex:1 1 auto}.action.accent{background:var(--theme-action,var(--green));color:var(--night-fg-fffdf4,#fffdf4);border-color:var(--green)}.feature-panel{display:flex;flex-direction:column;align-items:center;gap:12px;padding:24px 18px;background:var(--card);border:1px solid var(--line);border-radius:22px;margin-bottom:20px;text-align:center}.feature-panel p{margin:0;font-size:17px;color:var(--muted)}.feature-panel small{font-size:17px;color:var(--muted)}.large-symbol{width:70px;height:70px;background:var(--night-bg-f1eddc,#f1eddc);border-radius:25px;display:grid;place-items:center;color:var(--gold)}.large-symbol .icon{width:40px;height:40px}.feature-panel strong{font-size:20px}.badges{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap}.badge{background:var(--night-bg-efeee5,#efeee5);border-radius:20px;line-height:1.8;padding:2px 9px;font-size:17px;color:var(--night-fg-69705c,#69705c)}.badge.available{background:var(--night-bg-e4efdd,#e4efdd);color:var(--night-fg-3d693f,#3d693f)}.badge.busy{background:var(--night-bg-f1e9d4,#f1e9d4);color:var(--night-fg-8f6e30,#8f6e30)}.filter-row{display:flex;gap:8px;margin-bottom:7px}.chip{padding:6px 14px;min-height:44px;display:grid;place-items:center;border:1px solid var(--line);border-radius:14px;background:var(--card);flex:1;font-size:17px}.chip.selected{background:var(--theme-action,var(--green));color:var(--night-fg-fffdf4,#fffdf4);border-color:var(--green)}.quiet-note{font-size:17px;color:var(--muted);margin:0 0 16px}.councils-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.council-card{aspect-ratio:1;min-height:0;display:flex;align-items:flex-start;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:21px;padding:12px;position:relative}.council-card>.icon{position:absolute;inset-inline-end:15px;top:15px;color:var(--gold);width:24px;height:24px}.council-card h2{font-size:17px;margin:0 0 8px;padding-inline-end:23px;line-height:1.6}.council-card p{font-size:17px;margin:0 0 6px}.council-card .badges{justify-content:flex-start;gap:4px}.council-card .badge{font-size:17px;padding:1px 7px}.gender-label{font-size:17px;color:var(--night-fg-71836e,#71836e)}.participants{border-top:1px solid var(--night-border-e9ecdf,#e9ecdf);padding-top:6px;margin-top:auto;font-size:17px;color:var(--night-fg-6b7e65,#6b7e65);width:100%;display:flex;align-items:center;gap:4px;min-height:27px}.participants .icon{width:14px;height:14px}.join-bar{position:sticky;bottom:0;background:var(--paper);padding:16px 0 max(10px,env(safe-area-inset-bottom));display:flex;gap:12px;margin-top:24px;border-top:1px solid var(--line);z-index:2}.join-bar a{display:flex;align-items:center;justify-content:center;gap:8px;min-height:56px;flex:1;border-radius:16px;font-size:17px;font-weight:700;color:var(--night-fg-fffdf4,#fffdf4)}.join-bar .icon{width:22px;height:22px}.join-reader{background:var(--theme-action,var(--green))}.join-teacher{background:var(--night-bg-2d6489,#2d6489)}.with-join .footer{padding-top:6px}.privacy-note{padding:12px;border-radius:13px;font-size:17px;background:var(--night-bg-f3f0e5,#f3f0e5)}.queue-row{display:flex;gap:18px;align-items:center;justify-content:space-between;width:100%;padding-top:16px;border-top:1px solid var(--line)}.timer{font:400 30px/1.6 ui-monospace,monospace;direction:ltr;letter-spacing:3px}.wave{height:45px;display:flex;align-items:center;gap:5px}.wave i{width:4px;height:10px;background:var(--night-bg-a5bfa9,#a5bfa9);border-radius:3px}.wave .wave-1{height:20px}.wave .wave-2{height:36px}.wave .wave-3{height:28px}.wave .wave-4{height:15px}.verse-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:var(--night-bg-f7f0dc,#f7f0dc);border:1px solid var(--night-border-d9ccab,#d9ccab);outline:1px solid var(--night-border-d9ccab,#d9ccab);outline-offset:-7px;border-radius:20px;padding:40px 15px;margin-bottom:23px;min-height:200px;color:var(--night-fg-8a774a,#8a774a)}.verse-placeholder .icon{width:46px;height:46px}.verse-placeholder small{font-size:17px}.profile-panel{align-items:stretch;text-align:start}.field-title{font-size:17px;color:var(--muted)}.sample-value{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:13px;background:var(--night-bg-f5f4eb,#f5f4eb);border:1px solid var(--line);border-radius:12px}.mock-options{display:flex;gap:12px}.mock-options>*{flex:1;text-align:center;justify-content:center}.mock-options button{min-height:50px;border:1px solid var(--line);border-radius:12px;background:var(--night-bg-fffdf4,#fffdf4)}.retention-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;width:min(100%,270px)}.retention-grid i{height:31px;border-radius:6px;background:var(--night-bg-dce9d5,#dce9d5)}.retention-grid .level-1{background:var(--night-bg-b6ceb0,#b6ceb0)}.retention-grid .level-2{background:var(--night-bg-698f6c,#698f6c)}.retention-grid .level-3{background:var(--night-bg-e8d29d,#e8d29d)}.garden{min-height:240px;background:radial-gradient(ellipse at bottom,var(--night-bg-e7efd9,#e7efd9),transparent 70%),var(--card)}dialog{border:1px solid var(--line);border-radius:24px;background:var(--card);color:var(--ink);padding:28px;width:min(88vw,360px);text-align:center;box-shadow:0 15px 70px #12332928}dialog::backdrop{background:var(--night-bg-143b3066,#143b3066)}dialog h2{font-size:23px;margin:12px 0}dialog p{font-size:17px;line-height:2;color:var(--muted)}dialog .action{width:100%;margin-top:23px}.dialog-symbol{color:var(--gold)}.dialog-symbol .icon{width:37px;height:37px}.sr-only,.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip:focus{position:fixed;top:5px;right:5px;padding:12px;background:var(--theme-white-surface,white);z-index:100}.notice[hidden]{display:none}
@media(min-width:700px){.app-shell{padding-top:15px}.top{margin-bottom:30px}.tile{height:170px}.card-label{font-size:20px}.council-card{padding:20px}.council-card h2{font-size:21px}.council-card p{font-size:17px}.council-card .badge,.gender-label{font-size:17px}.participants{font-size:17px}.council-banner{min-height:97px}}
@media(max-width:360px){.app-shell{padding-inline:15px}.top{margin-bottom:15px}.tile{height:132px;gap:9px}.tile>.icon{width:36px;height:36px}.card-label{font-size:17px}.councils-grid{gap:9px}.council-card{padding:10px}.council-card h2{font-size:17px;margin-bottom:4px}.council-card>.icon{width:20px;height:20px;inset-inline-end:10px;top:11px}.council-card p{font-size:17px;margin-bottom:4px}.page-heading h1{font-size:23px}.join-bar a{font-size:17px;gap:5px}.council-banner{font-size:18px}}
@media(orientation:landscape) and (max-height:500px){.top{margin-bottom:12px}.tile{height:120px}.app-shell{max-width:740px}.page-heading{margin-bottom:14px}.join-bar{position:static}.home-grid{gap:12px}}
@media(prefers-reduced-motion:no-preference){.tile,.route-card,.action,.round-button{transition:background-color .15s,box-shadow .15s}dialog[open]{animation:appear .15s ease-out}@keyframes appear{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}}

.real-recording{display:flex;align-items:center;gap:14px;margin-top:20px;padding:17px;border:1px solid var(--night-border-b8cdb3,#b8cdb3);background:var(--night-bg-edf4e8,#edf4e8);border-radius:18px;min-height:82px}.real-recording strong{display:block;font-size:17px}.real-recording small{display:block;font-size:17px;color:var(--night-fg-54734d,#54734d);line-height:1.8}.real-recording>.icon{color:var(--night-fg-326743,#326743)}

/* One RTL navigation header. Reader/header rules must not turn this into a flex row. */
.top{display:block;width:100%;max-width:none;margin-inline:0;padding-inline:0}.top-row{display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;gap:8px;height:60px}.brand{min-width:0;justify-content:center;font-size:clamp(20px,5.8vw,27px);white-space:nowrap}.top .round-button{min-width:44px;width:44px;height:44px;margin:0}.review-mark{display:block;width:max-content;max-width:100%;white-space:nowrap;margin:4px auto 0;padding:0 11px;line-height:21px;background:var(--night-bg-f1ead8,#f1ead8);border-radius:20px;font-size:17px}.home-content{padding-bottom:20px}

/* Home keeps two balanced controls around the centered title. */
.home-top-row{grid-template-columns:44px minmax(0,1fr) 44px}.detail-top-row [data-back]{grid-column:4}.tile{position:relative}.tile.selected::after{content:"✓";position:absolute;top:9px;inset-inline-end:12px;font-size:17px;color:var(--night-fg-e1cb90,#e1cb90)}.council-banner{min-height:110px;padding-block:18px}.home-return-wrap{display:flex;justify-content:center;padding-top:18px}.home-return{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:180px;max-width:100%;padding:8px 18px;border:1px solid var(--night-border-b9c9b7,#b9c9b7);border-radius:8px;background:var(--night-bg-fffef9,#fffef9);font-size:17px;color:var(--night-fg-2f5847,#2f5847);font-weight:600}.home-return:active{background:var(--theme-action,var(--green));color:var(--night-fg-fffdf4,#fffdf4)}

/* Secondary council options stay available without filling the main screen. */
.council-simple .page-heading{margin-bottom:14px}
.council-simple .council-card{aspect-ratio:auto;min-height:128px;gap:3px}
.council-simple .council-card h2{margin-bottom:3px}
.council-simple .council-card .badges{margin-top:auto}
.council-options{border:1px solid var(--line);border-radius:14px;background:var(--card);margin:12px 0;padding:0 14px}
.council-options>summary{cursor:pointer;min-height:48px;padding:12px 2px;font-size:17px;font-weight:600}
.council-options>summary:focus-visible{outline:3px solid var(--green);outline-offset:2px;border-radius:6px}
.council-options .route-list,.council-options .actions{margin:0 0 14px}
.council-options p{font-size:17px;line-height:1.8;color:var(--muted)}
.council-options .route-card{min-height:52px;padding:10px 12px;border-radius:12px}
.council-options .route-card .card-label{font-size:17px}
.council-simple .feature-panel{padding:18px 14px;gap:8px}
.council-simple .large-symbol{width:48px;height:48px;border-radius:16px}
.council-simple .large-symbol .icon{width:28px;height:28px}
.council-filter .filter-row{margin:0 0 12px}

/* Compact daily and memorization flow */
.compact-learning{max-width:760px;margin:auto;padding:18px;color:var(--ink,var(--night-fg-243b33,#243b33));direction:rtl}.compact-top{display:flex;align-items:center;gap:18px;margin-bottom:24px}.compact-top h1{font-size:1.4rem;margin:0}.compact-learning button,.compact-learning input,.compact-learning select{font:inherit;min-height:46px;border:1px solid var(--night-border-bac9bf,#bac9bf);border-radius:12px;padding:10px 14px;background:var(--paper,var(--night-bg-fffdf8,#fffdf8));color:inherit}.compact-learning button{cursor:pointer}.compact-learning button:disabled{opacity:.6;cursor:default}.compact-learning :focus-visible{outline:3px solid var(--night-border-b58e45,#b58e45);outline-offset:3px}.compact-form{display:grid;grid-template-columns:1fr 1fr;gap:16px}.compact-form label{display:flex;flex-direction:column;gap:8px}.compact-form label:first-child,.compact-primary{grid-column:1/-1}.compact-form input,.compact-form select{width:100%;box-sizing:border-box;min-width:0}.compact-learning .compact-primary{background:var(--night-bg-195a46,#195a46);color:white;border-color:var(--night-border-195a46,#195a46)}.compact-range{font-size:1.2rem;font-weight:700;line-height:1.8}.compact-details{margin-top:18px;border-top:1px solid var(--night-border-ccd5cd,#ccd5cd);padding-top:16px}.compact-details summary{cursor:pointer;min-height:44px;display:list-item}.compact-details button{margin:5px}.compact-details small{display:block;padding:3px 8px}.compact-hint,.compact-status{font-size:17px;line-height:1.7}.compact-verses{display:flex;flex-wrap:wrap;align-items:start;gap:12px;padding-block:18px}.compact-verse:has(p){flex:1 0 100%}.compact-quran{font-size:1.65rem;line-height:2.3;white-space:pre-wrap;margin:10px 0 20px}.compact-actions{display:flex;flex-wrap:wrap;gap:8px}.compact-actions button{flex:1 1 135px}[data-theme=night] .compact-learning{color:var(--night-fg-f1eadb,#f1eadb)}[data-theme=night] .compact-learning button,[data-theme=night] .compact-learning input,[data-theme=night] .compact-learning select{background:var(--night-bg-232c28,#232c28);color:var(--night-fg-f1eadb,#f1eadb);border-color:var(--night-border-687a70,#687a70)}@media(max-width:360px){.compact-learning{padding:12px}.compact-actions button{flex-basis:100%}}

.spatial-stage{max-width:630px;margin:8px auto 20px;background:var(--night-bg-fffdf5,#fffdf5);border:1px solid var(--night-border-d8cba9,#d8cba9);border-radius:12px;overflow:hidden}.spatial-page{width:100%;height:auto;display:block;aspect-ratio:auto;touch-action:pan-y}.spatial-word-hit{cursor:pointer}.spatial-marker-hit{stroke:transparent;stroke-width:4;cursor:pointer}.spatial-page [role=button]:focus-visible{outline:none}.spatial-page [role=button]:focus-visible .spatial-marker-hit{stroke:#a56811;stroke-width:7}.spatial-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;margin:10px 0}.correction-levels{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:6px;border:1px solid var(--night-border-d7dcd3,#d7dcd3);border-radius:13px;background:var(--paper,var(--night-bg-faf8f0,#faf8f0));font-size:17px}.correction-levels>span{padding:0 6px}.compact-learning .correction-levels button{font-size:17px;min-height:44px;padding:6px 12px;border:1px solid transparent;background:transparent;border-radius:9px}.compact-learning .correction-levels button[aria-pressed=true]{background:var(--night-bg-195a46,#195a46);color:var(--night-fg-ffffff,#ffffff);border-color:var(--night-border-195a46,#195a46)}.correction-levels small{font-size:17px;padding:0 5px;color:var(--night-fg-6c7168,#6c7168)}.spatial-actions,.spatial-pagination{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px;flex-wrap:wrap}.spatial-actions button{font-size:17px;flex:1;white-space:nowrap}.spatial-pagination button{font-size:17px}.spatial-pagination span{font-size:17px}[data-theme=night] .spatial-stage{background:var(--night-bg-fffdf5,#fffdf5)}[data-theme=night] .correction-levels{background:var(--night-bg-232c28,#232c28);border-color:var(--night-border-687a70,#687a70)}[data-theme=night] .correction-levels small{color:var(--night-fg-d0d6cf,#d0d6cf)}@media(max-width:400px){.correction-levels>span{flex-basis:100%;text-align:center}.correction-levels{justify-content:center}.spatial-actions{gap:4px;padding:7px}.spatial-actions button{padding:8px;font-size:17px}}

.voice-recitation{padding:0;border:0;margin:8px 0}.voice-recitation label{display:block;padding:6px 0}.voice-settings{font-size:17px}.voice-settings p{margin:8px 0}.voice-settings input{min-width:22px;min-height:22px;vertical-align:middle}.voice-dock{position:fixed;right:max(20px,calc((100vw - 760px)/2 + 20px),env(safe-area-inset-right));bottom:calc(24px + env(safe-area-inset-bottom));z-index:1100;display:flex;align-items:center;gap:10px;direction:rtl;pointer-events:none;max-width:calc(100vw - 40px)}.voice-recitation .voice-mic{position:relative;pointer-events:auto;display:grid;place-items:center;width:64px;height:64px;min-width:64px;padding:17px;margin:0;border:2px solid var(--night-border-ffffff,#ffffff);border-radius:50%;background:var(--mushafi-mic-idle,var(--night-bg-66523b,#66523b));color:var(--night-fg-ffffff,#ffffff);box-shadow:0 4px 18px #133f3440;touch-action:manipulation;cursor:pointer}.voice-mic svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.voice-mic:focus-visible{outline:3px solid var(--night-border-b18a43,#b18a43);outline-offset:4px}.voice-status{pointer-events:none;margin:0!important;padding:8px 13px;border:1px solid var(--night-border-d7dfd4,#d7dfd4);border-radius:20px;background:var(--night-bg-fffef9f5,#fffef9f5);color:var(--night-fg-154e3d,#154e3d);font-size:17px!important;line-height:1.5;max-width:min(65vw,270px);box-shadow:0 2px 10px #133f3415}.voice-status[hidden]{display:none}.voice-recitation[data-state=preparing] .voice-mic{background:var(--mushafi-mic-idle,var(--night-bg-66523b,#66523b))}.voice-recitation[data-state=preparing] .voice-mic:after{content:"";position:absolute;width:72px;height:72px;border:3px solid transparent;border-top-color:var(--mushafi-mic-idle,#66523b);border-radius:50%;animation:mic-load 1s linear infinite}.voice-recitation[data-state=recording] .voice-mic{background:var(--mushafi-mic-active,var(--night-bg-1c704d,#1c704d));box-shadow:0 0 0 6px #1c704d25,0 4px 18px #133f3440}.voice-recitation[data-warning] .voice-status{border-color:var(--night-border-b23c30,#b23c30);color:var(--night-fg-962d22,#962d22)}.compact-learning{padding-bottom:112px}.voice-recitation[data-state=recording] .voice-mic svg{opacity:.9}@keyframes mic-load{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.voice-recitation[data-state=preparing] .voice-mic:after{animation:none}}

.voice-recitation[data-state=recording] .voice-mic{box-shadow:0 0 0 calc(5px + var(--voice-level,0)*12px) #b23c3025,0 4px 18px #133f3440;transition:box-shadow .15s}.voice-recitation[data-hearing] .voice-mic{border-color:var(--night-border-ffffff,#ffffff)}.spatial-stage{scroll-margin-top:8px}

/* The standalone review follows the same compact Cairo certificate design. */
.reading-assessment:has(.recitation-certificate){padding:0;background:transparent;border:0}
.recitation-certificate{position:relative;box-sizing:border-box;text-align:center;padding:16px 18px 14px;background:linear-gradient(150deg,var(--night-bg-fffcf2,#fffcf2),var(--night-bg-f7f4e9,#f7f4e9));border:2px solid var(--night-border-b69b59,#b69b59);box-shadow:inset 0 0 0 6px #faf7ed,inset 0 0 0 7px #d8cda8,0 4px 20px #174d3e14;border-radius:16px;color:var(--night-fg-174d3e,#174d3e);font-family:MushafiCairo,system-ui,sans-serif;line-height:1.45}
.recitation-certificate h3{font-size:21px;line-height:1.6;margin:0 0 7px;font-weight:700}.recitation-certificate h4{font-size:21px;line-height:1.5;margin:8px 0 0}.recitation-certificate p{font-size:14px;line-height:1.65;margin:5px 0}.recitation-certificate .certificate-brand{font-size:13px;color:var(--night-fg-94753d,#94753d)}.recitation-certificate .certificate-star{display:block;color:var(--night-fg-a78a47,#a78a47);font-size:23px;line-height:1.3}.certificate-score{display:flex;flex-direction:column;align-items:center;justify-content:center;width:76px;height:76px;border:1px solid var(--night-border-b69b59,#b69b59);border-radius:50%;margin:12px auto 10px;background:var(--night-bg-fbf9f0,#fbf9f0)}.certificate-score strong{font-size:31px;line-height:1.2;font-variant-numeric:tabular-nums}.certificate-score span{font-size:12px}.recitation-certificate .certificate-dua{font-size:12px;line-height:1.8;margin:8px 0}.recitation-certificate small{display:block;font-size:11px;line-height:1.6;color:var(--night-fg-637267,#637267);margin-top:5px}.certificate-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 6px}.certificate-actions button{flex:1 1 105px;min-height:36px;border:1px solid var(--night-border-b6c8bb,#b6c8bb);border-radius:11px;padding:6px 9px;background:var(--night-bg-f5f7ef,#f5f7ef);color:var(--night-fg-174d3e,#174d3e);font:inherit;font-size:13px}.certificate-actions button:first-child{background:var(--night-bg-174d3e,#174d3e);color:var(--night-fg-ffffff,#ffffff)}.certificate-actions button:disabled{opacity:.5}.certificate-share-status{font-size:12px!important;line-height:1.5;margin:6px 0!important;color:var(--night-fg-637267,#637267)}

/* Store sections: calm square navigation, shared by the inline and standalone views. */
.store-section .route-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.store-section .route-list>.route-card{aspect-ratio:1;min-height:0;min-width:0;flex-direction:column;justify-content:center;gap:16px;padding:16px 10px;text-align:center;border-radius:22px;box-shadow:0 3px 12px #154e3d05}
.store-section .route-list>.route-card>.icon:first-child{width:42px;height:42px;color:var(--green)}
.store-section .route-list>.route-card>.chevron{display:none}
.store-section .route-list>.route-card .card-label{font-size:17px;line-height:1.6;overflow-wrap:anywhere}
.store-section .route-list>.route-card:focus-visible{outline:3px solid var(--gold);outline-offset:4px}
@media(hover:hover){.store-section .route-list>.route-card:hover{background:var(--night-bg-f1f5ea,#f1f5ea);border-color:var(--night-border-b6cbbd,#b6cbbd)}}
@media(min-width:600px){.store-section .route-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
.top-row{height:auto;min-height:64px}
.section-title{min-width:0;margin:0;text-align:center;font-family:Kufi,Arabic,sans-serif;font-size:clamp(18px,5vw,25px);line-height:1.7;overflow-wrap:anywhere}
.detail-top-row{grid-template-columns:44px 44px minmax(0,1fr) 44px 44px;gap:4px}
.detail-top-row>.section-title{grid-column:3;grid-row:1}
.detail-top-row>.round-button:first-child{grid-column:1;grid-row:1}
.detail-top-row>.round-button:not(:first-child):not([data-back]){grid-column:4;grid-row:1}
.detail-top-row>[data-back]{grid-column:5;grid-row:1}
/* Route announcements focus the heading, not an interactive control. */
.section-title[tabindex="-1"]:focus{outline:none}


/* Consistent navigation: back right, account and settings left. */
.top-row.detail-top-row{display:grid;grid-template-columns:48px 48px minmax(0,1fr) 48px 48px;gap:4px;min-height:64px;height:auto;direction:rtl}
.top-row.detail-top-row>.section-title{grid-column:3;grid-row:1;text-align:center;min-width:0}
.top-row.detail-top-row>[data-back]{grid-column:1;grid-row:1}
.top-row.detail-top-row>.round-button:first-child{grid-column:5;grid-row:1}
.top-row.detail-top-row>.round-button:not(:first-child):not([data-back]){grid-column:4;grid-row:1}
.top-row .round-button{width:48px;height:48px;min-width:48px;padding:11px;border-radius:50%}
.top-row .round-button .icon{width:24px;height:24px}

.top .public-presence-badge{width:max-content;max-width:100%;margin:4px auto 12px;padding:4px 12px;border:1px solid var(--night-border-d6e0d2,#d6e0d2);border-radius:20px;background:var(--night-bg-edf3e9,#edf3e9);color:var(--night-fg-386351,#386351);font:13px/1.6 system-ui,sans-serif;text-align:center}.public-presence-badge[hidden]{display:none!important}

.account-live{margin-block:16px 24px}.account-live form{display:grid;gap:18px;padding:22px;border:1px solid var(--line);border-radius:22px;background:var(--card);text-align:start}.account-live label{display:grid;gap:8px}.account-live input,.account-live select{box-sizing:border-box;width:100%;min-width:0;min-height:52px;border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:12px;font:inherit;color:var(--ink)}.account-live button{min-height:48px;padding:12px 20px;border:1px solid var(--line);border-radius:12px;background:var(--theme-action,var(--green));color:white;font:inherit;cursor:pointer}.account-live button:disabled{opacity:.6;cursor:wait}.account-live [hidden]{display:none!important}.account-live .council-login-secondary{display:flex;flex-wrap:wrap;gap:10px}.account-live .feature-panel{gap:18px}.account-live h2,.account-live h3{margin:0}.account-live [role=status]{overflow-wrap:anywhere}

.family-live{width:100%;text-align:start;display:grid;gap:16px}.family-live header,.family-live .family-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.family-live h2,.family-live h3{margin:0}.family-live .family-card,.family-live .family-empty,.family-live .family-settings{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:22px;min-width:0}.family-live .family-card{display:grid;gap:12px}.family-live p{margin:0;overflow-wrap:anywhere}.family-live small,.family-live .family-muted{color:var(--muted)}.family-live button{font:inherit;min-height:46px;padding:10px 18px;border:1px solid var(--line);border-radius:13px;background:var(--night-bg-eef3e9,#eef3e9);color:var(--ink);cursor:pointer}.family-live button:disabled{opacity:.55}.family-live .family-primary{background:var(--theme-action,var(--green));color:white}.family-live input{box-sizing:border-box;width:100%;min-width:0;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--paper);font:inherit;color:var(--ink)}.family-live form,.family-live label{display:grid;gap:10px}.family-live details{border-top:1px solid var(--line);padding-top:14px}.family-live details>*:not(summary){margin-top:12px}.family-live summary{cursor:pointer;font-weight:700;padding:6px 0}.family-live .family-work{border:1px solid var(--line);border-radius:14px;padding:14px}.family-live .family-cheer{border-inline-start:4px solid var(--gold);padding:16px;background:var(--night-bg-f4efdf,#f4efdf);border-radius:12px}.family-live .family-request{border-color:var(--gold)}.family-live .family-code{justify-items:center;text-align:center}.family-live .teaching-qr{width:min(100%,260px);height:auto}.family-live audio{max-width:100%;width:100%;margin-top:12px}.family-live .family-status:empty{display:none}.family-live .family-status{color:var(--green)}.family-live .family-back{margin-block:10px}
.family-scanner-host:empty{display:none}.family-qr-scanner{display:grid;gap:9px;padding:12px;border:1px solid var(--night-border-cfdbc9,#cfdbc9);border-radius:16px;background:var(--night-bg-f1f5ed,#f1f5ed);text-align:center}.family-qr-scanner[hidden]{display:none!important}.family-qr-scanner video{display:block;width:100%;max-height:340px;aspect-ratio:1.2;object-fit:cover;background:var(--night-bg-233d35,#233d35);border:2px solid var(--night-border-b99d61,#b99d61);border-radius:13px}.family-qr-scanner p{font-size:14px;line-height:1.6;color:var(--night-fg-315f4d,#315f4d)}.family-qr-scanner button{justify-self:center;min-height:42px}
+
/* Family hub, invitation carousel, child dashboard and random memorization. */
.family-live .family-home-hero{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.family-live .family-home-hero button{display:flex;flex-direction:column;align-items:flex-start;text-align:right;gap:6px;min-height:142px;padding:18px;background:linear-gradient(145deg,var(--night-bg-f7f8ef,#f7f8ef),var(--night-bg-ebf3e9,#ebf3e9));border:1px solid var(--night-border-bacdbd,#bacdbd);border-radius:22px;box-shadow:0 4px 15px #21452c10}
.family-live .family-home-hero .family-hero-invite{background:linear-gradient(145deg,var(--night-bg-fdf7e7,#fdf7e7),var(--night-bg-f4ead2,#f4ead2));border-color:var(--night-border-d4bd87,#d4bd87)}
.family-hero-icon{font-size:29px;color:var(--night-fg-276747,#276747);line-height:1}.family-home-hero strong{font-size:20px;color:var(--night-fg-214e37,#214e37)}.family-home-hero small{font-size:12px;line-height:1.5}
.family-live .family-rail-heading{margin:8px 0 0}
.family-live .family-child-rail{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;padding:4px 2px 14px;scrollbar-width:thin}
.family-live .family-child-rail .family-child-tile{scroll-snap-align:start;flex:0 0 166px;min-height:157px;padding:15px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:right;border:1px solid var(--night-border-d9ddc5,#d9ddc5);border-radius:19px;background:var(--night-bg-fcfbf4,#fcfbf4);box-shadow:0 3px 14px #193d2911;white-space:normal}
.family-child-tile strong{font-size:16px;color:var(--night-fg-245438,#245438)}.family-child-tile small{font-size:12px;line-height:1.55}.family-child-tile .family-tile-symbol{display:grid;place-items:center;width:34px;height:34px;background:var(--night-bg-ebf3ea,#ebf3ea);border-radius:12px;color:var(--night-fg-39704f,#39704f);font-size:23px}.family-child-tile .family-tile-next{font-size:11px;color:var(--night-fg-8a7145,#8a7145);margin-top:auto}.family-live .family-child-rail .family-child-add{border-style:dashed}.family-live .family-child-rail .family-child-invite{background:var(--night-bg-fbf5e8,#fbf5e8);border-color:var(--night-border-cbb785,#cbb785)}
.family-live .family-dash-head{text-align:center;display:grid;justify-items:center;gap:7px;padding:18px;border:1px solid var(--night-border-d6ddcb,#d6ddcb);border-radius:22px;background:linear-gradient(var(--night-bg-edf4eb,#edf4eb),var(--night-bg-fffef9,#fffef9))}
.family-dash-head .family-dash-avatar{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:var(--night-bg-d5e8d6,#d5e8d6);color:var(--night-fg-1e5c3b,#1e5c3b);font-size:32px}.family-dash-head h3{font-size:22px}.family-dash-head p{color:var(--night-fg-667568,#667568);font-size:13px}
.family-live .family-dash-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.family-live .family-dash-stat{display:flex;flex-direction:column;align-items:center;gap:6px;background:var(--night-bg-fffdf7,#fffdf7);border:1px solid var(--night-border-e1ddc8,#e1ddc8);padding:16px 6px;border-radius:17px}.family-dash-stat strong{font-size:26px;color:var(--night-fg-205a3c,#205a3c);font-variant-numeric:tabular-nums}.family-dash-stat small{font-size:12px;text-align:center}
.family-live .family-invitations{display:grid;gap:15px;min-width:0}.family-invite-intro{display:grid;justify-items:center;text-align:center;gap:7px;padding:22px 14px;background:var(--night-bg-fcf8ed,#fcf8ed);border:1px solid var(--night-border-dfd0aa,#dfd0aa);border-radius:22px}.family-invite-intro .family-invite-ornament{font-size:33px;color:var(--night-fg-af8b41,#af8b41)}.family-invite-intro h3{font-size:23px;color:var(--night-fg-235c3f,#235c3f)}.family-invite-intro p{font-size:13px;line-height:1.8;color:var(--night-fg-617266,#617266)}
.family-invite-rail{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:5px 3px 15px;scrollbar-width:thin}.family-live .family-invite-person{scroll-snap-align:start;flex:0 0 148px;min-height:159px;display:flex;flex-direction:column;align-items:center;gap:8px;justify-content:center;background:var(--night-bg-fffdf6,#fffdf6);border-radius:20px;border:1px solid var(--night-border-d9d9c5,#d9d9c5);box-shadow:0 3px 12px #16402e12;padding:14px 8px;min-width:0}.family-live .family-invite-person[aria-pressed=true]{border:2px solid var(--night-border-c39b4a,#c39b4a);background:var(--night-bg-f5f8ed,#f5f8ed)}.family-invite-avatar{display:grid;place-items:center;width:45px;height:45px;border-radius:50%;background:var(--night-bg-e6efdf,#e6efdf);color:var(--night-fg-1a6546,#1a6546);font-size:23px}.family-invite-person strong{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.family-invite-person small{font-size:10px;direction:ltr}.family-invite-choice{font-size:11px;color:var(--night-fg-537554,#537554)}.family-invite-placeholder{display:grid;place-items:center;gap:8px;min-height:139px;flex:0 0 180px;border:1px dashed var(--night-border-adbd9e,#adbd9e);border-radius:20px;background:var(--night-bg-f5f7ed,#f5f7ed);text-align:center;padding:12px}.family-invite-placeholder small{font-size:11px;line-height:1.5}.family-invite-plus{font-size:28px;color:var(--night-fg-557955,#557955)}.family-live .family-invite-form{display:grid;grid-template-columns:1fr 1fr;gap:10px}.family-live .family-invite-form button{grid-column:1/-1}.family-invite-feedback{font-size:13px;color:var(--night-fg-315c40,#315c40);overflow-wrap:anywhere}
.random-practice-entry{width:100%;min-height:55px;font-size:18px}.random-practice-subtitle{text-align:center;color:var(--night-fg-6c756e,#6c756e);font-size:13px}.random-practice-intro,.random-practice-summary{display:grid;justify-items:center;gap:12px;padding:24px 18px;border:1px solid var(--night-border-d5c595,#d5c595);border-radius:23px;background:linear-gradient(160deg,var(--night-bg-fbf8eb,#fbf8eb),var(--night-bg-f0f6ef,#f0f6ef));text-align:center}.random-practice-intro h2,.random-practice-summary h2{margin:0;color:var(--night-fg-24583c,#24583c)}.random-practice-intro p{line-height:1.9;font-size:14px}.random-practice-icon{font-size:33px;color:var(--night-fg-bc9743,#bc9743)}.random-practice-form{margin-block:15px}.random-practice-step{display:grid;gap:8px;text-align:center;padding:13px;border:1px solid var(--night-border-dcd8c4,#dcd8c4);border-radius:16px;background:var(--night-bg-f7f8ef,#f7f8ef)}.random-practice-step strong{color:var(--night-fg-326747,#326747)}.random-practice-step p{margin:0}.random-practice-step small{font-size:12px;color:var(--night-fg-647565,#647565)}.random-practice-next{width:100%;margin-top:15px}.random-practice-summary p{font-size:14px;line-height:1.75}.random-practice-summary small{font-size:12px;color:var(--night-fg-626c62,#626c62)}
@media(max-width:420px){.family-live .family-home-hero button{min-height:130px;padding:13px}.family-live .family-home-hero strong{font-size:18px}.family-live .family-invite-form{grid-template-columns:1fr}}
+
/* Clean family hub: one card rail and no repeated page heading. */
.family-live .family-inner-header{display:flex;justify-content:flex-end;min-height:44px;margin-bottom:-7px}
.family-live .family-inner-header:has(h2){justify-content:space-between}
.family-live .family-inner-header .family-refresh{min-height:36px;padding:6px 13px;font-size:13px;border-radius:12px;background:var(--night-bg-ecf2e8,#ecf2e8)}
.family-live .family-overview{display:grid;gap:13px;min-width:0;background:linear-gradient(165deg,var(--night-bg-fffdf8,#fffdf8),var(--night-bg-f3f6ec,#f3f6ec));border:1px solid var(--night-border-d6d9c4,#d6d9c4);border-radius:24px;padding:18px 15px;box-shadow:0 6px 28px #21432a0b}
.family-live .family-overview-intro{display:grid;gap:5px;padding-inline:4px}.family-live .family-overview-intro h3{font-size:22px;color:var(--night-fg-205941,#205941)}
.family-live .family-overview-intro p{font-size:12px;color:var(--night-fg-697a6a,#697a6a);line-height:1.7}
.family-live .family-overview .family-child-rail{gap:10px;margin-inline:-2px;padding:3px 2px 12px}
.family-live .family-overview .family-child-tile{flex:0 0 clamp(150px,43vw,186px);min-height:157px;background:var(--night-bg-fffefb,#fffefb);border:1px solid var(--night-border-d0dbc9,#d0dbc9);border-radius:20px;box-shadow:0 4px 16px #1f4b3110}
.family-live .family-overview .family-child-invite{background:var(--night-bg-fdf8ec,#fdf8ec);border-color:var(--night-border-d9c48e,#d9c48e)}
.family-live .family-dash-details{gap:16px}.family-live .family-dash-details h3{font-size:18px;color:var(--night-fg-235a40,#235a40)}
.family-live .family-settings{padding:13px 17px;border-radius:16px}.family-live .family-settings summary{font-size:14px}
.family-live .family-back{font-size:13px;min-height:40px;background:transparent}
@media(min-width:640px){.family-live .family-dash-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* Compact mode selection and a readable, verified context ayah. */
.memorization-mode-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:5px;background:var(--night-bg-e7eee4,#e7eee4);border:1px solid var(--night-border-d5dfd1,#d5dfd1);border-radius:18px;margin:9px 0 22px}
.compact-learning .memorization-mode-switch button{min-width:0;min-height:48px;padding:9px 7px;border:0;border-radius:14px;background:transparent;color:var(--night-fg-557160,#557160);font-size:15px}
.compact-learning .memorization-mode-switch button[aria-pressed=true]{background:var(--night-bg-fffdf6,#fffdf6);color:var(--night-fg-1c5c44,#1c5c44);font-weight:700;box-shadow:0 2px 11px #345a3b21}
.memorization-section-heading{font-size:18px;font-weight:700;color:var(--night-fg-275b40,#275b40);margin:4px 0 16px}
.random-practice-intro{padding:18px 18px 20px;gap:7px}.random-practice-intro h2{font-size:21px}.random-practice-intro p{font-size:13px;color:var(--night-fg-617364,#617364);margin:0}.random-practice-intro .random-practice-icon{font-size:23px}
.compact-learning .random-practice-form{display:grid;grid-template-columns:1fr;gap:14px;max-width:100%;border:1px solid var(--night-border-dedfcb,#dedfcb);border-radius:22px;padding:17px 15px;background:var(--night-bg-fffefa,#fffefa)}
.compact-learning .random-practice-form>label,.compact-learning .random-practice-form>.random-practice-limits,.compact-learning .random-practice-form>.random-count-choices{grid-column:1/-1}
.random-practice-limits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.random-count-label{font-size:15px;font-weight:700;color:var(--night-fg-28543d,#28543d);margin:2px 0 0}
.random-count-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.compact-learning .random-count-choice{min-width:0;min-height:52px;padding:8px 3px;background:var(--night-bg-f7f8f0,#f7f8f0);border:1px solid var(--night-border-ccd7c9,#ccd7c9);border-radius:14px;font-size:15px;color:var(--night-fg-2b5e44,#2b5e44)}
.compact-learning .random-count-choice[aria-pressed=true]{background:var(--night-bg-215e48,#215e48);border-color:var(--night-border-215e48,#215e48);color:white;box-shadow:0 2px 10px #215e4829}
.random-practice-active .teaching-assignment-caption{display:none}.random-practice-active .teaching-passage-surface[hidden]{display:none!important}
.random-cue-host{width:100%}.random-cue-card{display:grid;gap:0;overflow:hidden;background:var(--night-bg-fffefa,#fffefa);border:1px solid var(--night-border-d7d1ba,#d7d1ba);border-radius:23px;box-shadow:0 9px 30px #2d4d3220;margin:5px 0 19px;padding:17px}
.random-cue-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:1px 2px 12px;border-bottom:1px solid var(--night-border-ece8dd,#ece8dd)}
.random-cue-top strong{font-size:17px;color:var(--night-fg-215b42,#215b42)}.random-cue-progress{font-size:13px;background:var(--night-bg-eeeede,#eeeede);color:var(--night-fg-5e665a,#5e665a);padding:5px 13px;border-radius:18px;font-variant-numeric:tabular-nums}
.random-cue-previous{display:grid;gap:8px;padding:16px 6px 18px;border-bottom:1px dashed var(--night-border-e0ddcf,#e0ddcf)}.random-cue-previous small,.random-cue-target small{color:var(--night-fg-64786a,#64786a);font-size:12px}
.random-cue-verse{margin:2px 0 0;text-align:right;font-family:MushafiQuranCue,'Traditional Arabic',serif;font-size:clamp(22px,5.8vw,31px);font-weight:400;line-height:2.1;color:var(--night-fg-23392d,#23392d);overflow-wrap:anywhere}
.random-cue-ayah-number{font-size:12px;color:var(--night-fg-9b824f,#9b824f);text-align:left}
.random-cue-target{display:grid;gap:14px;padding:16px 6px 12px}
.random-cue-masks{display:flex;flex-wrap:wrap;align-items:center;gap:10px 7px;min-height:85px;padding:3px 0;direction:rtl}
.random-cue-word{display:inline-block;width:var(--word-width,50px);height:18px;max-width:24%;border-radius:7px;background:var(--night-bg-dfe2db,#dfe2db);transition:background-color .18s ease,opacity .18s ease}
.random-cue-word.current{background:var(--night-bg-c6bfdb,#c6bfdb)}.random-cue-word.matched{background:var(--night-bg-8fcaab,#8fcaab)}.random-cue-word.review{background:var(--night-bg-f1d57d,#f1d57d)}
.random-cue-loading{font-size:13px;color:var(--night-fg-687b70,#687b70)}.random-cue-steps{display:flex;gap:5px;justify-content:center;padding-top:13px;border-top:1px solid var(--night-border-ece8dd,#ece8dd)}
.random-cue-steps span{width:18px;max-width:30px;height:5px;border-radius:7px;background:var(--night-bg-d8ded3,#d8ded3);flex:1}.random-cue-steps span.active{background:var(--night-bg-ba9f61,#ba9f61)}
.random-practice-active .teaching-reading{padding-block:0}.random-practice-active .voice-recitation{margin-block:12px}
.random-practice-active .random-practice-next{margin-top:12px}
@font-face{font-family:MushafiQuranCue;src:url('../assets/metadata-naskh.ttf') format('truetype');font-display:swap}
@media(max-width:380px){.compact-learning .random-count-choice{font-size:13px}.random-cue-card{padding:12px}.random-cue-masks{gap:8px 5px}}

/* Complete random passages and always-visible family navigation. */
.family-live .family-section-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:4px 0 18px}
.family-live .family-section-tabs button{min-height:52px;border:1px solid var(--night-border-cbb785,#cbb785);border-radius:14px;background:var(--night-bg-fcfaf3,#fcfaf3);color:var(--night-fg-28543d,#28543d);font-size:17px;font-weight:700}
.family-live .family-section-tabs button[aria-pressed=true]{background:var(--night-bg-215e48,#215e48);border-color:var(--night-border-215e48,#215e48);color:var(--night-fg-ffffff,#ffffff)}
.random-count-help{grid-column:1/-1;color:var(--night-fg-64786a,#64786a);line-height:1.8}
.random-cue-following{display:grid;gap:8px;border-top:1px dashed var(--night-border-e0ddcf,#e0ddcf);padding:16px 6px}
.random-cue-following small{color:var(--night-fg-64786a,#64786a);font-size:12px}
.random-cue-passage{display:grid;gap:14px}
.random-cue-ayah{display:grid;gap:6px;padding-block:5px;border-bottom:1px solid var(--night-border-efede3,#efede3)}
.random-cue-ayah .random-cue-masks{min-height:45px}
.random-cue-word.revealed{width:auto;max-width:none;height:auto;background:transparent;color:var(--night-fg-226447,#226447);font-family:MushafiQuranCue,'Traditional Arabic',serif;font-size:26px;line-height:1.8}
.random-cue-word.revealed.review{background:var(--night-bg-fff0ba,#fff0ba);color:var(--night-fg-6c501b,#6c501b)}

.mushafi-review .family-live,.family-live{align-content:start;grid-auto-rows:max-content;min-height:0!important;height:auto!important}
.family-live .family-inner-header{margin:0;position:sticky;top:0;z-index:3;background:var(--paper,var(--night-bg-faf8ef,#faf8ef));padding-block:8px}
.family-live .family-overview .family-child-tile{flex-basis:clamp(220px,68vw,300px);min-height:205px;padding:22px}
.family-live .family-invite-person{flex-basis:220px;min-height:200px}
.family-child-tile strong{font-size:20px}.family-child-tile small{font-size:14px}
.family-invite-rail[hidden],.family-invite-send[hidden],.family-contact-pick[hidden]{display:none!important}
.compact-learning .random-count-choices{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch}
.compact-learning .random-count-choices input{width:100%;min-width:0;text-align:center;padding:10px 4px;min-height:48px;border:1px solid var(--night-border-becfbd,#becfbd);border-radius:14px;font:inherit}
.compact-learning .random-count-choice{padding:10px 3px;font-size:14px}
.random-practice-active{padding-bottom:calc(200px + env(safe-area-inset-bottom));touch-action:pan-y}
.random-cue-word.revealed,.random-cue-verse{font-size:clamp(30px,7.5vw,38px);line-height:2.15;color:var(--night-fg-193d2e,#193d2e)}
.random-cue-ayah,.random-cue-word{scroll-margin-block:120px 200px}
.random-cue-card{overflow:visible}.random-cue-masks{gap:8px 9px}

/* Wrapping child cards and stable recitation layout. */
.family-live .family-overview .family-child-rail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;gap:10px;scroll-snap-type:none}
.family-live .family-overview .family-child-tile{width:100%;min-width:0;min-height:145px;padding:14px;box-sizing:border-box}
.family-live .family-child-tile strong{font-size:16px;overflow-wrap:anywhere}.family-live .family-child-tile small{font-size:12px}
@media(min-width:700px){.family-live .family-overview .family-child-rail{grid-template-columns:repeat(3,minmax(0,1fr))}}
.random-cue-host,.random-cue-card{overflow-anchor:none}

/* Family dashboard: readable cards, no sticky content overlap. */
.family-live .family-inner-header{position:static;padding:0;background:transparent}
.family-live .family-invite-tile{background:linear-gradient(145deg,var(--night-bg-f8e6ad,#f8e6ad),var(--night-bg-eee0bc,#eee0bc));border-color:var(--night-border-c6a552,#c6a552);color:var(--night-fg-4b4025,#4b4025)}
.family-live .family-invite-tile .family-tile-symbol{background:var(--night-bg-fff4ce,#fff4ce);color:var(--night-fg-876d23,#876d23)}
.family-live .family-invite-tile small,.family-live .family-invite-tile .family-tile-next{color:var(--night-fg-6b582c,#6b582c)}
.family-live .family-dash-details{padding:0;border:0;background:transparent;box-shadow:none}
.family-daily-grid{display:grid;gap:12px;margin-block:16px}
.family-info-card,.family-encouragement{padding:20px;border:1px solid var(--night-border-d9dfcf,#d9dfcf);border-radius:22px;background:var(--paper,var(--night-bg-fffdf6,#fffdf6))}
.family-info-card h3,.family-encouragement h3{margin:0 0 12px;font-size:1.15rem}
.family-info-card p{margin:8px 0;line-height:1.7}.family-info-card small{display:block;line-height:1.8;color:var(--night-fg-6c7d70,#6c7d70)}
.family-encouragement{background:linear-gradient(145deg,var(--night-bg-f6f5df,#f6f5df),var(--night-bg-edf4e8,#edf4e8));margin-block:20px}
.family-cheer-types{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.family-cheer-types button{padding:12px 6px;min-height:64px;font-size:.9rem;white-space:normal}
.family-cheer-types [aria-pressed=true]{background:var(--night-bg-205b47,#205b47);color:white;border-color:var(--night-border-205b47,#205b47)}
.family-encouragement label{display:grid;gap:8px;margin-block:14px;font-weight:600}
.family-encouragement textarea,.family-encouragement input{box-sizing:border-box;width:100%;min-width:0;padding:13px;border:1px solid var(--night-border-c8d3c5,#c8d3c5);border-radius:14px;background:var(--night-bg-fffef8,#fffef8);color:var(--night-fg-214f40,#214f40);font:inherit;line-height:1.7;resize:vertical}
.family-star-picker{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap;margin-block:16px}
.family-star-picker span{width:100%;text-align:center;font-size:.9rem;color:var(--night-fg-6c715c,#6c715c)}
.family-star-picker button{padding:4px;min-width:40px;min-height:44px;font-size:2rem;border:0;background:transparent;color:var(--night-fg-b1b6a9,#b1b6a9)}
.family-star-picker [aria-pressed=true],.family-stars-display{color:var(--night-fg-ae7b13,#ae7b13)}
.family-stars-display{font-size:1.8rem;letter-spacing:5px}
.family-cheer-preview{background:var(--night-bg-fffdf4,#fffdf4);border:1px dashed var(--night-border-c2a867,#c2a867);padding:18px;border-radius:17px;margin-block:16px;overflow-wrap:anywhere}
.family-cheer-content p{white-space:pre-wrap;line-height:1.8;margin:10px 0}
.family-cheer-preview>small{color:var(--night-fg-71806e,#71806e)}.family-cheer-content small{display:block;margin-block:8px}
.family-cheer-suggestions button{display:block;width:100%;text-align:right;margin-block:8px;font-size:.95rem;white-space:normal}
.family-cheer-ideas{display:flex;flex-wrap:wrap;gap:6px}.family-cheer-ideas button{font-size:.85rem;padding:8px}
.family-cheer-history .family-cheer-content{padding-block:12px;border-bottom:1px solid var(--night-border-d9dfcf,#d9dfcf)}
.family-encouragement .family-primary{width:100%;min-height:52px}.family-cheer-status:empty{display:none}
.voice-mic-help{position:relative;margin:16px;padding:16px;border:1px solid var(--night-border-ccb975,#ccb975);background:var(--paper,var(--night-bg-fffdf6,#fffdf6));border-radius:16px;line-height:1.8;z-index:5;max-width:520px}
@media(min-width:680px){.family-daily-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.family-encouragement>button{display:block;width:100%;margin-block:8px;white-space:normal}

.family-live .family-overview .family-child-rail .family-child-tile.family-invite-tile{background:var(--night-bg-f2e7cc,#f2e7cc);border:1px solid var(--night-border-b99a4e,#b99a4e);box-shadow:0 3px 14px #96772d12}
.family-week-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-block:14px}
.family-week-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:108px;padding:14px 8px;background:var(--night-bg-fffdf5,#fffdf5);border:1px solid var(--night-border-dedbc4,#dedbc4);border-radius:18px;text-align:center}
.family-week-tile strong{font-size:28px;color:var(--night-fg-215b47,#215b47);font-variant-numeric:tabular-nums}.family-week-tile small{font-size:13px;color:var(--night-fg-637469,#637469)}
.family-week-note{padding:12px 16px;background:var(--night-bg-edf2e7,#edf2e7);border-radius:14px;font-size:14px}

/* A bounded reading surface keeps the dock separate from moving ayahs. */
.compact-learning.random-practice-running{box-sizing:border-box;height:calc(100dvh - 105px - env(safe-area-inset-top));min-height:320px;display:flex;flex-direction:column;overflow:hidden;padding-bottom:0;gap:6px}
.random-practice-running .random-cue-host{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding-bottom:24px}
.random-practice-running .random-cue-card{margin:0;padding-bottom:24px}
.random-practice-running .teaching-trial-body{flex:none;padding:0;margin:0}
.random-practice-running .voice-dock{position:relative;inset:auto;max-width:100%;justify-content:flex-start;min-height:72px;padding:5px 0}
.random-practice-running .voice-settings,.random-practice-running .teaching-reading>button,.random-practice-running>.compact-status,.random-practice-running>.compact-exit{display:none}
.random-practice-running .random-practice-next:disabled{display:none}
.random-practice-running>button{flex:none;margin:0;min-height:36px;padding:5px 12px}
.random-cue-ayah button.random-cue-ayah-number{display:block;min-width:44px;min-height:44px;padding:5px;border:1px solid var(--night-border-d9cba0,#d9cba0);border-radius:12px;background:var(--night-bg-faf6e9,#faf6e9);color:var(--night-fg-8f7439,#8f7439);font:inherit;cursor:pointer}
.random-cue-ayah button.random-cue-ayah-number[aria-expanded=true]{background:var(--night-bg-efe2b8,#efe2b8)}
.random-practice-summary,.voice-recitation .reading-assessment:not([hidden]){position:fixed!important;z-index:1400;inset:auto!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%);box-sizing:border-box;width:min(430px,calc(100vw - 32px))!important;max-height:calc(100dvh - 48px)!important;overflow:auto;padding:20px!important;background:var(--night-bg-fffaf0,#fffaf0)!important;border:1px solid var(--night-border-b99a4e,#b99a4e)!important;border-radius:22px;box-shadow:0 0 0 100vmax #153e3455,0 12px 45px #173c3440}
.reading-assessment[hidden]{display:none!important}

/* Space to center the final ayah without moving the fixed controls. */
.random-practice-running .random-cue-card::after{content:"";display:block;height:35dvh;flex:none;pointer-events:none}

.voice-engine-choice{display:block;font-size:14px;padding:8px;background:var(--night-bg-fffaf0,#fffaf0);border:1px solid var(--night-border-b99a4e,#b99a4e);border-radius:12px}.voice-engine-choice select{max-width:100%;font:inherit}.text-recitation-trial details{font-size:14px;background:var(--night-bg-fffaf0,#fffaf0);padding:8px;border-radius:12px}.text-trial-matched{font-size:22px;line-height:2}.reader-voice-session .voice-engine-choice{position:fixed;z-index:1102;top:calc(12px + env(safe-area-inset-top));right:12px;max-width:calc(100vw - 24px)}.reader-voice-session .text-recitation-trial details{position:fixed;z-index:1102;top:calc(70px + env(safe-area-inset-top));right:12px;max-width:min(340px,calc(100vw - 24px));max-height:35vh;overflow:auto}

.voice-recitation .reading-assessment .assessment-close{position:absolute;inset-inline-end:7px;top:7px;display:grid;place-items:center;width:40px;height:40px;min-width:40px;min-height:40px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--night-fg-174d3e,#174d3e);font:26px/1 sans-serif;z-index:2;cursor:pointer}.voice-recitation .reading-assessment .assessment-close:hover{background:var(--night-bg-174d3e10,#174d3e10)}.voice-recitation .reading-assessment .assessment-close:focus-visible{outline:2px solid var(--night-border-94753d,#94753d);outline-offset:-4px}
.reader-voice-session:has(.reading-assessment[hidden]) .voice-dock{display:flex}

/* Recitation settings remain reachable beside the floating microphone. */
.voice-dock .voice-settings{display:block;position:relative;pointer-events:auto;margin:0;padding:0;border:0;background:transparent;font-size:15px}
.voice-dock .voice-settings>summary{display:block;list-style:none;cursor:pointer;padding:11px 14px;min-height:44px;box-sizing:border-box;border:1px solid var(--night-border-b89a60,#b89a60);border-radius:22px;background:var(--night-bg-fffaf0,#fffaf0);color:var(--night-fg-174f40,#174f40);font-weight:700;white-space:nowrap;box-shadow:0 2px 10px #133f3415}
.voice-dock .voice-settings>summary::-webkit-details-marker{display:none}
.voice-dock .voice-settings>summary:focus-visible{outline:3px solid var(--night-border-b18a43,#b18a43);outline-offset:3px}
.voice-dock .voice-settings-panel{position:fixed;right:max(20px,calc((100vw - 760px)/2 + 20px),env(safe-area-inset-right));bottom:calc(100px + env(safe-area-inset-bottom));width:min(320px,calc(100vw - 40px));max-height:55dvh;overflow:auto;box-sizing:border-box;padding:14px 18px;border:1px solid var(--night-border-d2bd91,#d2bd91);border-radius:16px;background:var(--night-bg-fffdf6,#fffdf6);color:var(--night-fg-174f40,#174f40);box-shadow:0 8px 28px #133f3430;direction:rtl}
.voice-dock .voice-settings-panel label{font-size:16px}
.voice-dock .voice-status{position:absolute;right:0;bottom:calc(100% + 8px);max-width:min(270px,calc(100vw - 40px))}
.voice-dock:has(.voice-settings[open]) .voice-status{display:none}
.reader-voice-session .voice-dock .voice-settings{display:none}
.reader-voice-session .voice-settings-panel{bottom:calc(235px + env(safe-area-inset-bottom))}
.random-practice-running .voice-dock .voice-settings{display:block}

.certificate-primary-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 10px;position:sticky;top:0;z-index:2;background:var(--night-bg-faf7ed,#faf7ed);padding:8px;border-radius:13px}.certificate-primary-actions button{min-width:0;min-height:48px;padding:10px 6px;border:1px solid var(--night-border-b6c8bb,#b6c8bb);border-radius:11px;background:var(--night-bg-f5f7ef,#f5f7ef);color:var(--night-fg-174d3e,#174d3e);font:inherit;font-size:14px}.certificate-primary-actions button:last-child{background:var(--night-bg-174d3e,#174d3e);color:white}.certificate-primary-actions button:disabled{opacity:.55}.certificate-send-hint{font-size:12px!important;text-align:center;color:var(--night-fg-637267,#637267)}
.family-approval-dialog{box-sizing:border-box;width:min(420px,calc(100vw - 32px));max-height:85dvh;overflow:auto;border:1px solid var(--night-border-b69b59,#b69b59);border-radius:22px;padding:24px;background:var(--night-bg-faf7ed,#faf7ed);color:var(--night-fg-174d3e,#174d3e);font-family:MushafiCairo,system-ui,sans-serif;text-align:start;position:fixed;inset:0;margin:auto;z-index:10000;box-shadow:0 12px 60px #0003}.family-approval-dialog::backdrop{background:var(--night-bg-142e25a6,#142e25a6)}.family-approval-dialog h3{margin:0 0 12px}.family-approval-dialog p{line-height:1.7;overflow-wrap:anywhere}.family-approval-dialog button{font:inherit;min-height:46px;padding:10px 16px;border:1px solid var(--night-border-bdc9b8,#bdc9b8);border-radius:12px;background:var(--night-bg-eef3e9,#eef3e9);color:var(--night-fg-174d3e,#174d3e);margin:4px}.family-approval-dialog .family-primary{background:var(--night-bg-174d3e,#174d3e);color:white}.family-approval-dialog [role=status]{color:var(--night-fg-77452a,#77452a)}.family-request{scroll-margin-top:20px}

.voice-recitation .reading-assessment:has(.certificate-primary-actions){padding-top:48px!important}

/* Compact phone notification entry, adjacent to settings. */
.top-row .mobile-notifications-link{display:none!important}
@media(max-width:899px){
 .top .page-reader-nav .notifications-text-link{display:none!important}
 .top .top-row .mobile-notifications-link{display:grid!important}
 .top .top-row.home-top-row{grid-template-columns:44px minmax(0,1fr) 44px 44px!important;gap:6px}
 .top .top-row.detail-top-row{grid-template-columns:64px minmax(0,1fr) 44px 44px 44px!important;gap:4px}
 .top .top-row.detail-top-row>.round-button:first-child{grid-column:5!important}
 .top .top-row.detail-top-row>.mobile-notifications-link{grid-column:4!important;grid-row:1}
 .top .top-row .round-button{width:44px!important;min-width:44px;height:44px!important;padding:10px}
 .top .top-row>[data-back]{width:64px!important;min-width:64px}
}

/* Keep the daily sections compact and give recitation councils a full entry card. */
.home-grid{gap:10px}.home-grid .tile{height:120px;gap:8px;padding:12px}.home-grid .tile>.icon{width:36px;height:36px}.council-banner{min-height:126px;margin-top:12px;padding:20px;font-size:22px}.council-banner .banner-icon{width:60px;height:60px;flex-shrink:0}
@media(min-width:700px){.home-grid .tile{height:145px}}
@media(max-width:360px),(orientation:landscape) and (max-height:500px){.home-grid .tile{height:108px}.council-banner{min-height:110px;font-size:20px}}

/* Primary council entry: larger than the daily service cards. */
.desktop-home .council-banner{min-height:164px;padding:24px;gap:18px;border-color:var(--night-border-c7ad69,#c7ad69);box-shadow:0 6px 20px #173e2e0a}
.desktop-home .council-banner .banner-icon{width:72px;height:72px;border-radius:20px}
.desktop-home .council-banner .banner-icon .icon{width:42px;height:42px}
.council-banner-copy{display:flex;flex-direction:column;gap:5px;min-width:0}
.council-banner-copy strong{font-size:24px;line-height:1.6}
.council-banner-copy small{font-size:14px;font-weight:400;line-height:1.8;color:var(--night-fg-65725e,#65725e)}
@media(max-width:360px),(orientation:landscape) and (max-height:500px){.desktop-home .council-banner{min-height:144px;padding:18px;gap:12px}.council-banner-copy strong{font-size:22px}}
@media(min-width:700px){.desktop-home .council-banner{min-height:184px}}

.certificate-sync-status{font-size:13px!important;line-height:1.8;color:var(--night-fg-174d3e,#174d3e);background:var(--night-bg-eee8d6,#eee8d6);padding:10px;border-radius:9px}.certificate-rewards-link{display:block;text-align:center;background:var(--night-bg-195943,#195943);color:var(--night-fg-ffffff,#ffffff);padding:10px;border-radius:9px;margin:8px 0;text-decoration:none}.certificate-rewards-link[hidden]{display:none}

.top-row .account-role-entry{position:relative;overflow:visible}.account-role-entry small{position:absolute;top:calc(100% + 3px);white-space:nowrap;font-size:10px;line-height:1.2;color:var(--ink,var(--night-fg-526e59,#526e59));font-weight:600}.top:has(.account-role-entry){padding-bottom:12px}

.random-cue-word[role="button"]{cursor:pointer;touch-action:manipulation}.random-cue-word[role="button"]:focus-visible{outline:2px solid var(--night-border-b39542,#b39542);outline-offset:3px}

/* Keep short async pages anchored at the top; reader header/main auto margins must not absorb free height. */
.mushafi-review .app-shell>.top,.app-shell>.top{margin-block-start:0;flex-shrink:0}
.mushafi-review .app-shell>main,.app-shell>main.wird-dashboard{margin-block:0;align-self:stretch}

/* Compact family progress and private performance recordings. */
.family-live .family-mastery-compact{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:14px 16px;background:var(--card);border:1px solid var(--line);border-radius:16px;font-size:14px}
.family-mastery-compact strong{margin-inline-start:auto;font-variant-numeric:tabular-nums}.family-mastery-compact progress{width:100%;height:6px;accent-color:var(--green);border:0;border-radius:6px;overflow:hidden}.family-mastery-compact progress::-webkit-progress-bar{background:var(--line)}.family-mastery-compact progress::-webkit-progress-value{background:var(--green)}
.family-live .family-recording-card{display:grid;gap:10px;padding:16px;border-radius:18px;background:var(--card)}
.family-recording-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.family-recording-head>strong{font-size:16px;min-width:0;overflow-wrap:anywhere}.family-live .family-work-state{flex-shrink:0;padding:3px 8px;border-radius:7px;font-size:11px;background:var(--paper)}.family-live .family-work-state.is-done{color:var(--green);background:var(--night-bg-edf2e7,#edf2e7)}
.family-live .family-recording-passage,.family-recording-meta{font-size:13px;color:var(--muted)}.family-recording-meta{display:flex;align-items:center;justify-content:space-between;gap:10px}.family-recording-score{color:var(--green);font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}.family-live .family-recording-note{font-size:13px;border-inline-start:2px solid var(--gold);padding-inline-start:10px}
.family-recording-bar{display:flex;align-items:center;gap:12px;padding:10px;border-radius:12px;background:var(--night-bg-edf2e7,#edf2e7)}.family-live .family-recording-play{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:12px;background:var(--green);color:white;font-size:18px}.family-recording-track{min-width:0;flex:1;display:grid;gap:5px}.family-recording-label{font-size:12px;color:var(--muted)}.family-live .family-recording-seek{width:100%;height:20px;min-height:20px;padding:0;margin:0;accent-color:var(--green);border:0;background:transparent}.family-recording-time{font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}.family-live .family-recording-status{font-size:12px;margin-top:6px}.family-recording-status:empty{display:none}.family-records-caption,.family-recording-unavailable{display:block;font-size:12px}.family-live .family-recording-media{display:none}

/* Student page: one identity, age-appropriate presentation. */
.student-home{font-family:Cairo,sans-serif;display:grid;gap:16px}.student-home-hero{padding:22px;border:1px solid #d5d9ca;border-radius:24px;background:linear-gradient(125deg,#e9efe4,#faf6ea);color:#205645}.student-home-hero h3{font-size:1.6rem;margin:8px 0}.student-home-eyebrow{font-size:.85rem;color:#627866}.student-home-settings{margin-top:12px}.student-home-settings summary{cursor:pointer;padding:12px}.student-home-nav,.student-home-links{display:flex;gap:8px;flex-wrap:wrap}.student-home-nav>button{flex:1;min-height:46px}.teaching-trial .student-home-nav button[aria-pressed=true]{background:#205645;color:#fff}.student-next-task{display:grid;gap:8px;background:#edf2e8;border:1px solid #c9d6c6;border-radius:20px;padding:20px;margin:12px 0}.student-next-task p{margin:0}.student-work-progress{font-size:.9rem;color:#597365}.student-home[data-age-band=child] .student-home-hero{border-bottom:4px solid #b39b54}.student-home[data-age-band=child] .student-next-task strong{font-size:1.3rem}.student-home[data-age-band=child] button{min-height:52px}.student-home[data-age-band=youth] .student-home-hero{border-inline-start:4px solid #759b83}.student-home-links>a{text-decoration:none;padding:10px 14px}.student-home .teaching-trial-form{padding:12px}.student-home [role=status]:empty{display:none}

/* Personal record: compact hierarchy, isolated from council and reader typography. */
.app-shell:has(.my-record)>.top{margin-bottom:12px}
.my-record.council-entry-content{display:grid!important;gap:14px!important;margin:0!important;padding:0!important;min-height:0!important;text-align:start;font-family:MushafiCairo,Arabic,sans-serif;font-size:15px;line-height:1.6}
.my-record .record-board{display:grid;gap:14px;margin:0;padding:0;min-height:0}
.my-record .record-identity{display:grid;gap:2px;margin:0;padding:12px 0;border-bottom:1px solid var(--line);text-align:start}
.my-record .record-identity h2{font:700 21px/1.5 MushafiCairo,Arabic,sans-serif;margin:0;padding:0}
.my-record .record-identity p{font:400 14px/1.6 MushafiCairo,Arabic,sans-serif;color:var(--muted);margin:0;padding:0}
.my-record .record-role{display:flex;gap:12px;align-items:center;font-size:13px;margin:0}
.my-record select{font:600 14px/1.5 MushafiCairo,Arabic,sans-serif;color:var(--ink);background:var(--card);border:1px solid var(--line);border-radius:10px;min-height:44px;padding:8px;max-width:100%;min-width:0}
.my-record .record-role select{flex:1}
.my-record .action{font:600 14px/1.5 MushafiCairo,Arabic,sans-serif;min-height:44px;padding:10px 12px;border-radius:12px;margin:0;width:auto;flex:none}
.my-record .record-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.my-record .record-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:center;padding:12px 0;margin:0}
.my-record .record-controls label{grid-column:1/-1;display:flex;align-items:center;gap:12px;font:500 13px/1.5 MushafiCairo,Arabic,sans-serif;margin:0}
.my-record .record-controls select{flex:1}
.my-record .record-status:empty{display:none}
.my-record .record-metric{display:grid;gap:3px;padding:14px 10px;border:1px solid var(--line);border-radius:14px;background:var(--card);text-align:center;min-height:90px;align-content:center}
.my-record .record-metric strong{font:800 27px/1.3 MushafiCairo,Arabic,sans-serif;font-variant-numeric:tabular-nums}
.my-record .record-metric span{font:500 12px/1.6 MushafiCairo,Arabic,sans-serif}
.my-record h3{font:700 17px/1.5 MushafiCairo,Arabic,sans-serif;margin:6px 0 12px;text-align:start}
.my-record details{padding:10px 0;margin:0;font-size:13px}
.my-record summary{cursor:pointer;min-height:44px;display:list-item;align-content:center;font-size:14px;text-align:start}
.my-record .record-achievement{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin:0 0 8px;border:1px solid var(--line);border-radius:14px;background:var(--card);text-align:start}
.my-record .record-achievement-info{display:grid;gap:4px;min-width:0}
.my-record .record-achievement-info strong{font:700 15px/1.6 MushafiCairo,Arabic,sans-serif;overflow-wrap:anywhere}
.my-record .record-achievement-info small{font:400 12px/1.5 MushafiCairo,Arabic,sans-serif;color:var(--muted)}
.my-record .record-score{display:grid;gap:0;text-align:center;flex:0 0 58px;padding:6px;border-radius:10px;background:var(--soft,#e9eddf)}
.my-record .record-score strong{font:800 21px/1.4 MushafiCairo,Arabic,sans-serif;direction:ltr}
.my-record .record-score small{font:400 10px/1.4 MushafiCairo,Arabic,sans-serif}

/* Compact disclosure rows: keep closed sections at their content height. */
.my-record .record-sections,.my-record .record-report-content{display:grid!important;gap:8px!important;align-content:start!important;grid-auto-rows:max-content;min-height:0!important;margin:0!important;padding:0!important}
.my-record .record-disclosure{display:block!important;box-sizing:border-box;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;border:1px solid var(--line);border-radius:12px;background:var(--card);overflow:hidden}
.my-record .record-disclosure>summary{display:flex!important;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box;min-height:48px!important;height:auto!important;margin:0!important;padding:12px 14px!important;font:600 14px/1.6 MushafiCairo,Arabic,sans-serif;list-style:none;cursor:pointer}
.my-record .record-disclosure>summary::-webkit-details-marker{display:none}
.my-record .record-disclosure>summary::after{content:'';width:7px;height:7px;flex:0 0 7px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .15s}
.my-record .record-disclosure[open]>summary::after{transform:rotate(225deg)}
.my-record .record-disclosure[open]>summary{border-bottom:1px solid var(--line)}
.my-record .record-disclosure>summary:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}
.my-record .record-disclosure>:not(summary){margin:0!important;padding:12px 14px;box-sizing:border-box}
.my-record .record-method-note{display:block;font:400 12px/1.8 MushafiCairo,Arabic,sans-serif;color:var(--muted)}
.my-record .record-achievements{margin:8px 0 0!important;padding:0!important;min-height:0!important}
.my-record .record-achievements>h3{font:700 17px/1.6 MushafiCairo,Arabic,sans-serif;margin:0 0 10px!important;padding:0!important}

/* Settings selects must not impose their option text width on a phone. */
.reader-settings-form,.reader-settings-form>*{min-width:0;max-width:100%;box-sizing:border-box}
.reader-settings-form label,.reader-settings-form .source-panel{display:block;min-width:0;width:100%}
.reader-settings-form select{box-sizing:border-box;min-width:0;max-width:100%;width:100%;text-overflow:ellipsis}
.reader-settings-form p{overflow-wrap:anywhere;margin-block:10px}
.reader-settings-form .riwaya-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.reader-settings-form .riwaya-actions>*{max-width:100%;white-space:normal}
.riwaya-reader-note{padding:12px;border:1px solid #d5d7c7;border-radius:12px;font-size:14px;line-height:1.8}
.app-shell:has(.reader-settings-form){min-width:0;max-width:100%;overflow-x:clip}
.app-shell:has(.reader-settings-form) .section-title{white-space:normal;overflow-wrap:anywhere}
@media(max-width:480px){.reader-settings-form{padding:16px!important;gap:16px!important;margin-block:16px!important}}
