/* Ayah Studio v76 — reader UI inspired by familiar Qur'an apps, not reproduced artwork. */
#panel-quran .q76-header{margin:0 0 16px;color:#203329;background:#fff;border:1px solid #cadccd;border-radius:16px;overflow:hidden}
#panel-quran .q76-bar{display:flex;align-items:center;gap:11px;background:#538f59;color:#fff;padding:13px 16px}
#panel-quran .q76-bar>button{border:1px solid #e5f1e6a6;border-radius:9px;background:#ffffff14;color:#fff;min-width:42px;min-height:44px;font-size:23px}
#panel-quran .q76-title{display:grid;gap:2px;flex:1;min-width:0}
#panel-quran .q76-title label{font-size:10px;letter-spacing:.07em;opacity:.9}
#panel-quran .q76-title select{border:0;min-width:0;max-width:100%;width:100%;font:700 17px/1.25 system-ui;background:transparent;color:#fff;appearance:auto;padding:2px 0;outline-offset:3px}
#panel-quran .q76-title select option{color:#173b25;background:#fff}
#panel-quran .q76-title small{font-size:11px;color:#e8faed}
#panel-quran .q76-meta{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:10px 16px;background:#e5f1e7;color:#223c29;font-size:12px;line-height:1.55}
#panel-quran .q76-meta>span{flex:1;min-width:0}
#panel-quran .q76-meta button{flex:0 0 auto;border:0;background:transparent;color:#478c50;font-weight:750;font-size:11px;min-height:35px}
#panel-quran .q76-chapter{display:flex;gap:12px;align-items:center;padding:18px 16px;background:#fff;min-height:95px}
#panel-quran .q76-chapter-mark{display:grid;place-items:center;width:62px;height:64px;background:#eaf3ec;border-radius:13px;font:38px "Amiri",serif;color:#538f59}
#panel-quran .q76-chapter>div:nth-child(2){display:grid;gap:4px;flex:1;min-width:0}
#panel-quran .q76-chapter strong{font-size:19px;color:#1a271e}
#panel-quran .q76-chapter small{font-size:12px;color:#647267}
#panel-quran .q76-chapter button{border:0;background:transparent;color:#518d57;font-weight:700;font-size:12px;min-height:44px;padding:0 2px}
#panel-quran .q76-modes{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:11px 14px 14px;border-top:1px solid #e0ebe3;background:#fff}
#panel-quran .q76-modes button{min-height:43px;padding:10px;border:1px solid #dae7df;border-radius:10px;background:#f8faf9;color:#31503a;font-size:13px;font-weight:700}
#panel-quran .q76-modes button.active{background:#538f59;color:#fff;border-color:#538f59}
#panel-quran .q76-modes button:focus-visible,#panel-quran .q76-bar button:focus-visible,#panel-quran .q76-bar select:focus-visible{outline:3px solid #bde4bf;outline-offset:2px}
#panel-quran .q76-page{margin:14px 0 20px;border:1px solid #4c6f58;border-radius:14px;background:#fcfdf9;color:#28392a;padding:13px;overflow:hidden}
#panel-quran #q76Page[hidden],#panel-quran.q76-page-mode #qsReader{display:none!important}
#panel-quran .q76-page-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px}
#panel-quran .q76-page-nav strong{font-size:15px;color:#28673c}
#panel-quran .q76-page-nav button{border:1px solid #a8c8ac;border-radius:8px;background:#e9f5ec;color:#245b34;padding:9px 12px;min-height:42px;font-size:12px;font-weight:700}
#panel-quran .q76-page-nav button:disabled{opacity:.45}
#panel-quran #q76PageStatus{font-size:11px;text-align:center;color:#5a715f;line-height:1.55;padding:8px 0 14px}
#panel-quran .q76-mushaf-border{border:10px double #4c885c;border-radius:4px;padding:7px;background:#fcf9e9;box-shadow:inset 0 0 0 3px #cda35d}
#panel-quran .q76-mushaf-inner{min-height:440px;border:2px solid #5e8d65;padding:14px 12px 25px;text-align:center;background:radial-gradient(ellipse at center,#fffcf1,#f7f1dd);color:#211d18}
#panel-quran .q76-mushaf-title{margin:0 auto 18px;max-width:340px;border-block:2px solid #bba36d;font:700 29px/1.65 "Amiri Quran","Amiri",serif;color:#244c39}
#panel-quran #q76PageText{font:clamp(21px,3.4vw,33px)/2.25 "Amiri Quran","Amiri","Noto Naskh Arabic",serif;overflow-wrap:break-word;word-break:normal;unicode-bidi:plaintext;text-align:justify;text-align-last:center}
#panel-quran .q76-mushaf-surah{font:700 24px/1.7 "Amiri Quran","Amiri",serif;color:#396c4c;text-align:center;margin:16px 0 10px;padding:5px;border-block:1px solid #b9ae8b}
#panel-quran .q76-mushaf-ayah{display:inline;color:#151e16}
#panel-quran .q76-verse-marker{display:inline-block;color:#aa813a;font:700 .65em "Amiri",serif;white-space:nowrap;margin-inline:5px}
#panel-quran .q76-page-disclaimer{font-size:11px;line-height:1.65;color:#52695a;padding:12px 2px 3px}
#panel-quran .qs-ayah{display:flex;flex-direction:column;gap:6px;overflow:visible}
#panel-quran .qs-ayah .qs-verse-top{display:contents}
#panel-quran .qs-ayah .qs-verse-top>strong{order:0;display:block;color:inherit;font-weight:700;font-size:14px}
#panel-quran .qs-ayah .qs-arabic{order:1}
#panel-quran .qs-ayah .qs-meaning,#panel-quran .qs-ayah .r48-edition-meaning{order:2}
#panel-quran .qs-ayah .q76-words{order:3}
#panel-quran .qs-ayah .qs-actions{order:4;border-top:1px solid var(--qborder,#ccc);padding-top:10px;display:flex;flex-wrap:wrap;gap:7px}
#panel-quran .qs-actions button{min-height:39px;white-space:normal}
#panel-quran .qs-actions button.q76-more{font-size:22px;min-width:44px;min-height:40px;line-height:1}
#panel-quran .qs-actions button.q76-word-button{font-weight:700}
#panel-quran .q76-words{border:1px solid #bcd5c0;border-radius:12px;padding:10px;background:#f4faf4;color:#25402d}
#panel-quran .q76-word-grid{display:flex;flex-wrap:wrap;align-items:start;gap:9px;justify-content:flex-start}
#panel-quran .q76-word{display:grid;gap:3px;align-content:start;text-align:center;min-width:60px;max-width:135px;border-bottom:1px solid #cedccf;padding:7px 4px}
#panel-quran .q76-word strong{font:25px/1.7 "Amiri Quran","Amiri",serif;color:#1e311f}
#panel-quran .q76-word small{font:11px/1.5 system-ui;color:#4a6950;direction:ltr}
#panel-quran .q76-words-status,#panel-quran .q76-word-credit{font-size:11px;color:#52675a;line-height:1.6}
.q76-overlay{position:fixed;inset:0;z-index:99996;display:flex;justify-content:center;align-items:flex-end}
.q76-overlay[hidden]{display:none!important}
.q76-scrim{position:absolute;inset:0;background:#0009;border:0}
.q76-sheet{position:relative;z-index:1;width:min(100%,600px);max-height:min(88dvh,850px);overflow-y:auto;overscroll-behavior:contain;background:#fff;border-radius:28px 28px 0 0;color:#19241c;padding:7px 18px calc(15px + env(safe-area-inset-bottom));box-shadow:0 -9px 40px #0005;font:14px/1.5 system-ui,-apple-system,sans-serif}
.q76-sheet:focus{outline:none}
.q76-sheet .q76-handle{height:6px;width:55px;margin:3px auto 15px;background:#d7d9d7;border-radius:10px}
.q76-sheet h2{font-size:19px;font-weight:750;text-align:center;color:#18221b;margin:0 0 5px}
.q76-sheet .q76-ref{text-align:center;color:#63756a;font-size:12px;margin:0 0 10px}
.q76-action-items{display:grid;gap:2px}
.q76-action-items button{display:flex;align-items:center;gap:17px;background:transparent;border:0;color:#1f3125;min-height:57px;padding:9px 13px;text-align:left;font:600 15px system-ui;border-radius:10px}
.q76-action-items button:first-letter{color:#58945d}
.q76-action-items button:hover,.q76-action-items button:focus-visible{background:#e9f3e9}
.q76-cancel{width:100%;min-height:48px;margin-top:13px;border:0;border-top:1px solid #e9eeea;background:white;color:#4b5850;font-size:14px;font-weight:750}
.q76-info-sheet{padding-bottom:calc(20px + env(safe-area-inset-bottom))}
.q76-info-lines{display:grid;gap:5px;margin:17px 0 12px}
.q76-info-line{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;min-height:43px;padding:11px 4px;border-bottom:1px solid #e7eee8}
.q76-info-line strong{font-size:13px;color:#45664c;font-weight:700}
.q76-info-line span{max-width:63%;text-align:right;overflow-wrap:anywhere;color:#182c1f;font-size:13px}
.q76-audio-sheet{padding-bottom:calc(22px + env(safe-area-inset-bottom))}
.q76-audio-sheet .q76-field{display:grid;gap:5px;padding:9px 2px;font-size:12px;font-weight:700;color:#34493a}
.q76-audio-sheet select{width:100%;min-height:43px;border:1px solid #c0d2c3;background:#fafffa;color:#1b3320;border-radius:10px;padding:9px;font:600 13px system-ui}
.q76-audio-sheet select:disabled{opacity:.48;background:#eee}
.q76-range{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.q76-checkbox{display:flex;gap:12px;align-items:center;justify-content:space-between;font:600 13px system-ui;min-height:49px;padding:6px 4px;border-bottom:1px solid #e8eeea}
.q76-checkbox input{accent-color:#538f59;min-width:20px;min-height:20px}
.q76-audio-note{font-size:11px;line-height:1.6;color:#5a7260;margin:8px 0}
.q76-audio-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:17px}
.q76-audio-actions button{min-height:48px;border-radius:999px;border:1px solid #5b9564;background:#fff;color:#478852;font:700 14px system-ui}
.q76-audio-actions button:last-child{color:#fff;background:#538f59}
body.q76-modal-open{overflow:hidden!important}
.q76-dock{display:none}
body.q76-reader-active:not(.r48-open):not(.q76-modal-open) .q76-dock{display:flex;position:fixed;inset:auto 0 0;z-index:80;align-items:stretch;justify-content:space-around;background:#538f59;color:white;padding:5px 5px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -5px 18px #061c1450}
.q76-dock button{display:grid;justify-items:center;align-content:center;gap:1px;flex:1;min-width:0;min-height:53px;background:transparent;border:0;color:white;font-size:21px;cursor:pointer;border-radius:7px}
.q76-dock button span{font-size:10px;line-height:1.5;white-space:nowrap}
.q76-dock button.active,.q76-dock button:focus-visible{background:#316c3a}
body.q76-reader-active #panel-quran{padding-bottom:88px}
@media(min-width:720px){
 .q76-overlay{align-items:center}
 .q76-sheet{border-radius:20px;max-height:87vh;padding-bottom:20px}
 body.q76-reader-active:not(.r48-open):not(.q76-modal-open) .q76-dock{width:min(620px,100%);left:50%;transform:translateX(-50%);border-radius:15px 15px 0 0}
}
@media(max-width:420px){
 #panel-quran .q76-header{border-radius:12px}
 #panel-quran .q76-bar{padding:10px 9px;gap:6px}
 #panel-quran .q76-bar>button{min-width:38px;min-height:42px}
 #panel-quran .q76-title select{font-size:15px}
 #panel-quran .q76-meta{padding:8px 11px;font-size:11px}
 #panel-quran .q76-chapter{padding:13px 10px}
 #panel-quran .q76-chapter-mark{width:52px;height:58px}
 #panel-quran .q76-mushaf-border{border-width:6px;padding:4px}
 #panel-quran .q76-mushaf-inner{padding:10px 7px}
 #panel-quran #q76PageText{font-size:clamp(20px,6vw,26px)}
 .q76-sheet{padding-left:13px;padding-right:13px}
 .q76-dock button{font-size:19px}
 .q76-dock button span{font-size:9px}
}
@media(prefers-reduced-motion:reduce){
 #panel-quran .q76-header *{scroll-behavior:auto!important}
}
