
:root{--ibn-navy:#071D38;--ibn-royal:#0A2A5E;--ibn-blue:#1565C0;--ibn-gold:#D4AF37;--ibn-gold-soft:#E7C85A;--ibn-paper:#FAF8F2;--ibn-white:#fff;--ibn-ink:#132033;--ibn-soft:#5d6678;--ibn-border:rgba(212,175,55,.36);--ibn-shadow:0 22px 55px rgba(7,29,56,.16);--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body.ibn-quran-app{margin:0;direction:rtl;background:radial-gradient(circle at 4% 8%,rgba(212,175,55,.14),transparent 28%),linear-gradient(180deg,#eef3f8 0,#fbf8ef 360px,#faf8f2 100%);color:var(--ibn-ink);font-family:"Tajawal","IBM Plex Sans Arabic",Arial,sans-serif;font-weight:700;min-height:100vh;padding-bottom:105px}.ibn-page-shell{max-width:1280px;margin:0 auto;padding:28px 18px}.ibn-top-shell{position:sticky;top:0;z-index:1000;background:linear-gradient(135deg,var(--ibn-navy),var(--ibn-royal));border-bottom:3px solid var(--ibn-gold);box-shadow:0 14px 30px rgba(7,29,56,.18)}.ibn-brand-wrap{max-width:1280px;margin:0 auto;min-height:150px;padding:16px 18px;display:grid;grid-template-columns:90px 1fr 90px;align-items:center}.ibn-brand{text-align:center}.ibn-brand-logo{max-width:330px;width:min(330px,45vw);height:auto;filter:drop-shadow(0 18px 22px rgba(0,0,0,.32))}.ibn-menu-toggle,.ibn-quick-btn{width:56px;height:56px;border-radius:18px;border:1px solid rgba(212,175,55,.45);background:rgba(255,255,255,.08);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:22px;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}.ibn-menu-toggle span{display:block;width:22px;height:2px;background:#fff;margin:3px;border-radius:8px}.ibn-header-actions{display:flex;gap:10px;justify-content:flex-end}.ibn-main-nav{max-width:1280px;margin:0 auto;display:flex;justify-content:center;gap:12px;padding:0 18px 18px}.ibn-main-nav a{color:#fff;text-decoration:none;border:1px solid rgba(212,175,55,.38);background:rgba(255,255,255,.09);padding:11px 22px;border-radius:999px;transition:.2s}.ibn-main-nav a:hover{transform:translateY(-2px);background:rgba(212,175,55,.22)}.ibn-content-card,.card-custom{background:rgba(255,255,255,.97);border:1px solid var(--ibn-border);border-radius:28px;overflow:hidden;box-shadow:var(--ibn-shadow);margin-bottom:22px}.ibn-content-head,.card-header{background:linear-gradient(135deg,var(--ibn-royal),var(--ibn-navy));color:#fff;padding:20px 24px;border-bottom:3px solid var(--ibn-gold)}.ibn-content-head h1,.card-header h5{margin:0;color:#fff;font-size:28px}.ibn-content-body,.card-body{padding:24px}.breadcrumb{display:flex;flex-wrap:wrap;gap:10px;list-style:none;background:#fff;border:1px solid var(--ibn-border);border-radius:20px;padding:14px 18px;margin:0 0 18px}.breadcrumb a{color:var(--ibn-blue);text-decoration:none}.ibn-product-home{display:grid;gap:24px}.ibn-hero{position:relative;overflow:hidden;min-height:390px;border-radius:34px;background:linear-gradient(135deg,#06172d 0,var(--ibn-royal) 52%,#183b72 100%);color:#fff;border:1px solid var(--ibn-border);box-shadow:var(--ibn-shadow);display:grid;grid-template-columns:1.08fr .92fr;gap:24px;align-items:center;padding:42px}.ibn-hero::after{content:"";position:absolute;inset:auto -70px -100px auto;width:360px;height:360px;border-radius:50%;background:rgba(255,255,255,.13)}.ibn-hero h1{font-size:clamp(54px,7vw,96px);line-height:1.1;margin:0 0 20px;color:#fff;text-shadow:0 20px 44px rgba(0,0,0,.35)}.ibn-hero-actions{display:flex;gap:12px;flex-wrap:wrap}.ibn-btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 24px;border-radius:18px;border:0;background:linear-gradient(180deg,var(--ibn-gold-soft),var(--ibn-gold));color:var(--ibn-navy);font-weight:900;text-decoration:none;cursor:pointer;box-shadow:0 16px 26px rgba(212,175,55,.25)}.ibn-btn.secondary{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.22);box-shadow:none}.ibn-hero-visual{position:relative;z-index:1;display:grid;gap:16px;padding:24px;border-radius:28px;background:rgba(255,255,255,.08);border:1px solid rgba(212,175,55,.35);backdrop-filter:blur(18px)}.ibn-visual-card{border:1px solid rgba(255,255,255,.22);border-radius:20px;padding:18px;background:rgba(255,255,255,.1)}.ibn-visual-card span{display:block;color:var(--ibn-gold-soft);font-size:14px}.ibn-visual-card strong{font-size:28px}.ibn-resume,.ibn-section,.ibn-card{background:rgba(255,255,255,.96);border:1px solid var(--ibn-border);border-radius:28px;box-shadow:0 16px 35px rgba(7,29,56,.08)}.ibn-resume{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;padding:22px}.ibn-resume small{color:var(--ibn-gold);display:block;margin-bottom:6px}.ibn-resume strong{font-size:30px;color:var(--ibn-royal)}.ibn-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.ibn-card{min-height:150px;padding:22px;text-decoration:none;color:var(--ibn-royal);display:flex;flex-direction:column;justify-content:space-between;transition:.22s}.ibn-card:hover{transform:translateY(-5px);box-shadow:var(--ibn-shadow)}.ibn-card-icon{width:56px;height:56px;border-radius:18px;background:var(--ibn-royal);color:var(--ibn-gold);display:flex;align-items:center;justify-content:center;font-size:26px}.ibn-card b{font-size:23px}.ibn-card small{color:var(--ibn-soft);font-size:14px}.ibn-dashboard{display:grid;grid-template-columns:1.5fr .9fr;gap:24px}.ibn-section{padding:24px}.ibn-section-title{margin:0 0 18px;color:var(--ibn-royal);font-size:30px;display:flex;align-items:center;gap:12px}.ibn-section-title span{color:var(--ibn-gold)}.ibn-search-panel{display:grid;grid-template-columns:1fr auto;gap:12px}.ibn-search-panel input,.form-control,select,input[type=text],input[type=search]{border:1px solid var(--ibn-border)!important;border-radius:18px!important;padding:14px 16px!important;background:#fff!important;color:var(--ibn-ink)!important;min-height:48px}.ibn-surah-strip{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:16px}.ibn-surah-chip{text-decoration:none;border:1px solid rgba(212,175,55,.28);background:#fff;border-radius:18px;padding:14px;color:var(--ibn-royal);display:flex;gap:10px;align-items:center}.ibn-surah-chip em{font-style:normal;background:#f6edd0;border-radius:999px;min-width:34px;height:34px;display:flex;align-items:center;justify-content:center}.ibn-mini-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.ibn-stat{border:1px solid rgba(212,175,55,.3);border-radius:20px;padding:18px;text-align:center;background:#fff}.ibn-stat strong{display:block;font-size:34px;color:var(--ibn-gold)}.ibn-library-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.ibn-book{position:relative;min-height:380px;border:1px solid var(--ibn-border);border-radius:28px;padding:22px;background:linear-gradient(145deg,#ffffff,#fff8e4);box-shadow:0 18px 38px rgba(7,29,56,.09);overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.ibn-book::before{content:"";position:absolute;inset:16px auto 16px 16px;width:10px;border-radius:999px;background:linear-gradient(180deg,var(--ibn-gold-soft),var(--ibn-gold))}.ibn-book-cover{height:190px;border-radius:22px;background:linear-gradient(145deg,var(--ibn-royal),var(--ibn-navy));color:#fff;border:1px solid rgba(212,175,55,.45);display:flex;align-items:center;justify-content:center;text-align:center;font-size:30px;padding:20px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),0 18px 30px rgba(7,29,56,.18)}.ibn-book h3{margin:18px 0 8px;font-size:24px;color:var(--ibn-royal)}.ibn-book-tags{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.ibn-pill{display:inline-flex;align-items:center;min-height:30px;padding:5px 12px;border-radius:999px;background:#f6edd0;color:var(--ibn-royal);font-size:13px}.section-title h1,.royal-section-title h1{color:var(--ibn-royal)!important;font-size:30px}.royal-qbooks-grid,.royal-mushaf-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.royal-qbook-card,.royal-mushaf-card{background:#fff;border:1px solid var(--ibn-border);border-radius:28px;padding:22px;box-shadow:0 18px 38px rgba(7,29,56,.09)}.royal-qbook-icon,.royal-mushaf-cover{height:190px;border-radius:22px;background:linear-gradient(145deg,var(--ibn-royal),var(--ibn-navy));display:flex;align-items:center;justify-content:center;color:var(--ibn-gold);font-size:54px;margin-bottom:16px}.royal-qbook-btn,.royal-mushaf-btn,.btn,.btn-primary,.btn-success,.btn-warning{border-radius:16px!important;background:linear-gradient(180deg,var(--ibn-gold-soft),var(--ibn-gold))!important;color:var(--ibn-navy)!important;border:0!important;text-decoration:none!important;padding:11px 18px!important;display:inline-flex!important;align-items:center;justify-content:center;box-shadow:0 12px 22px rgba(212,175,55,.2)}.royal-mushaf-viewer,.royal-qbook-viewer{background:#fff;border:1px solid var(--ibn-border);border-radius:28px;box-shadow:var(--ibn-shadow);overflow:hidden}.royal-mushaf-viewer-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;background:linear-gradient(135deg,var(--ibn-royal),var(--ibn-navy));color:#fff;border-bottom:3px solid var(--ibn-gold)}.royal-mushaf-back,.royal-mushaf-external{color:#fff;text-decoration:none;border:1px solid rgba(212,175,55,.4);border-radius:16px;padding:10px 14px}.royal-mushaf-viewer-frame{position:relative;height:calc(100vh - 280px);min-height:620px;background:#eef3f8}.royal-mushaf-viewer-frame iframe{width:100%;height:100%;border:0;display:block}.royal-mushaf-iframe-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#fff;color:var(--ibn-royal);z-index:2}.listensora{position:relative;background:rgba(7,29,56,.06);border:1px solid var(--ibn-border);border-radius:24px;padding:18px;margin:18px 0}.changesoraform,.tafseer-controls,.tafseer-ayah-nav{background:#fff;border:1px solid var(--ibn-border);border-radius:22px;padding:14px;margin:14px 0;box-shadow:0 8px 18px rgba(7,29,56,.06)}.ibn-glass-player{position:fixed;left:50%;bottom:calc(96px + var(--safe-bottom));transform:translate(-50%,30px);width:min(760px,calc(100% - 28px));z-index:1200;background:linear-gradient(135deg,rgba(7,29,56,.94),rgba(10,42,94,.88));color:#fff;border:1px solid rgba(212,175,55,.45);border-radius:28px;padding:16px;box-shadow:0 28px 70px rgba(0,0,0,.32);backdrop-filter:blur(24px);opacity:0;pointer-events:none;transition:.25s}.ibn-glass-player.is-open{opacity:1;pointer-events:auto;transform:translate(-50%,0)}.ibn-player-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.ibn-player-meta small{color:var(--ibn-gold-soft)}.ibn-player-meta strong{display:block;font-size:22px}.ibn-player-close{width:40px;height:40px;border-radius:14px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.08);color:#fff}.ibn-wave{height:34px;display:flex;align-items:end;gap:4px;margin:12px 0}.ibn-wave i{display:block;width:4px;height:var(--h);background:var(--ibn-gold);border-radius:8px;opacity:.8;animation:ibnWave 1s ease-in-out infinite alternate;animation-delay:var(--d)}.ibn-glass-player:not(.is-playing) .ibn-wave i{animation:none;opacity:.35}@keyframes ibnWave{to{height:28px}}.ibn-progress{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}.ibn-progress input{accent-color:var(--ibn-gold)}.ibn-player-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:12px}.ibn-player-actions button{min-height:42px;border-radius:15px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.08);color:#fff;padding:8px 14px}.ibn-player-actions .ibn-play{width:64px;height:64px;border-radius:50%;background:linear-gradient(180deg,var(--ibn-gold-soft),var(--ibn-gold));color:var(--ibn-navy);border:0}.ibn-bottom-nav{position:fixed;left:24px;right:24px;bottom:calc(12px + var(--safe-bottom));height:76px;z-index:1100;background:linear-gradient(135deg,rgba(7,29,56,.96),rgba(10,42,94,.9));border:1px solid rgba(212,175,55,.35);border-radius:26px;display:grid;grid-template-columns:repeat(5,1fr);box-shadow:0 20px 46px rgba(0,0,0,.26);backdrop-filter:blur(20px)}.ibn-bottom-nav a,.ibn-bottom-nav button{border:0;background:transparent;color:#fff;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-weight:800}.ibn-bottom-nav span{font-size:12px}.ibn-footer{text-align:center;padding:32px;color:var(--ibn-gold);background:var(--ibn-navy);border-top:3px solid var(--ibn-gold);margin-top:34px}.ibn-command{position:fixed;inset:0;background:rgba(7,29,56,.55);z-index:2000;display:none;align-items:flex-start;justify-content:center;padding:80px 16px}.ibn-command.is-open{display:flex}.ibn-command-box{width:min(720px,100%);background:#fff;border-radius:28px;border:1px solid var(--ibn-border);box-shadow:var(--ibn-shadow);overflow:hidden}.ibn-command-head{padding:18px 20px;background:var(--ibn-navy);color:#fff}.ibn-command-body{padding:18px}.ibn-command-results a{display:flex;justify-content:space-between;text-decoration:none;padding:14px;border-bottom:1px solid #eee;color:var(--ibn-royal)}@media(max-width:980px){.ibn-hero{grid-template-columns:1fr;min-height:auto}.ibn-hero-visual{min-height:220px}.ibn-dashboard{grid-template-columns:1fr}.ibn-grid{grid-template-columns:repeat(2,1fr)}.ibn-library-grid,.royal-qbooks-grid,.royal-mushaf-grid{grid-template-columns:1fr 1fr}.ibn-surah-strip{grid-template-columns:repeat(3,1fr)}}@media(max-width:720px){body.ibn-quran-app{padding-bottom:92px}.ibn-brand-wrap{grid-template-columns:58px 1fr 58px;min-height:108px;padding:12px}.ibn-brand-logo{max-width:min(230px,62vw)}.ibn-header-actions{display:none}.ibn-main-nav{display:none}.ibn-main-nav.is-open{display:flex;position:absolute;left:12px;right:12px;top:100%;background:var(--ibn-navy);border:1px solid var(--ibn-border);border-radius:20px;padding:14px;flex-direction:column}.ibn-page-shell{padding:16px 12px}.ibn-hero{border-radius:26px;padding:24px;text-align:center}.ibn-hero h1{font-size:52px}.ibn-hero-actions{justify-content:center}.ibn-hero-visual{display:none}.ibn-resume{grid-template-columns:1fr}.ibn-resume .ibn-btn{width:100%}.ibn-grid{grid-template-columns:1fr 1fr;gap:12px}.ibn-card{min-height:128px;padding:14px}.ibn-card b{font-size:18px}.ibn-card small{display:none}.ibn-section{padding:16px;border-radius:24px}.ibn-library-grid,.royal-qbooks-grid,.royal-mushaf-grid{grid-template-columns:1fr}.ibn-mini-stats{grid-template-columns:1fr}.ibn-surah-strip{grid-template-columns:repeat(2,1fr)}.ibn-content-body,.card-body{padding:16px}.ibn-glass-player{bottom:calc(88px + var(--safe-bottom));border-radius:24px}.ibn-player-actions{gap:6px}.ibn-player-actions button{min-width:40px;height:42px;font-size:13px}.ibn-player-actions .ibn-play{width:58px;height:58px}.ibn-bottom-nav{left:8px;right:8px;height:74px;border-radius:24px}.ibn-bottom-nav span{font-size:11px}.royal-mushaf-viewer-frame{height:calc(100vh - 210px);min-height:520px}.ibn-book{min-height:320px}.ibn-book-cover{height:150px}}


/* === Final UX corrections: icons, spacing, search, book cards === */
body.ibn-quran-app{padding-bottom:220px!important;}
.ibn-page-shell{padding-bottom:190px!important;}
.card-body,.ibn-content-body{padding-bottom:110px;}
.ibn-bottom-nav{height:78px;max-width:980px;margin-inline:auto;left:50%!important;right:auto!important;transform:translateX(-50%);width:min(980px,calc(100% - 32px));}
.ibn-bottom-nav i,.ibn-card-icon i,.ibn-quick-btn i{font-size:20px;line-height:1;}
.ibn-bottom-nav a,.ibn-bottom-nav button{gap:6px;color:#fff!important;}
.ibn-card-icon{display:inline-flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:18px;background:linear-gradient(145deg,var(--ibn-royal),var(--ibn-navy));color:var(--ibn-gold);box-shadow:0 16px 28px rgba(7,29,56,.16);}
.ibn-card{position:relative;overflow:hidden;border:1px solid rgba(212,175,55,.42);background:linear-gradient(180deg,#fff,#fffdf7);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;}
.ibn-card:hover{transform:translateY(-4px);box-shadow:0 24px 48px rgba(7,29,56,.16);border-color:var(--ibn-gold);}
.ibn-book-premium{min-height:410px;padding:0;display:grid;grid-template-rows:250px auto;background:linear-gradient(180deg,#fff,#fffdf8);border:1px solid rgba(212,175,55,.45);border-radius:28px;overflow:hidden;box-shadow:0 18px 40px rgba(7,29,56,.12);}
.ibn-book-premium .ibn-book-cover{position:relative;display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;padding:28px;background:radial-gradient(circle at 50% 20%,rgba(231,200,90,.32),transparent 30%),linear-gradient(145deg,#071D38,#0A2A5E 58%,#143A72);color:#fff;border-bottom:3px solid var(--ibn-gold);}
.ibn-book-premium .ibn-book-cover::before{content:"";position:absolute;inset:18px;border:1px solid rgba(212,175,55,.55);border-radius:22px;}
.ibn-book-premium .ibn-book-cover strong{font-size:28px;line-height:1.6;color:#fff;text-shadow:0 10px 26px rgba(0,0,0,.28);}
.ibn-book-premium .ibn-book-seal{position:absolute;top:18px;right:18px;background:linear-gradient(180deg,var(--ibn-gold-soft),var(--ibn-gold));color:var(--ibn-navy);border-radius:999px;padding:7px 14px;font-size:13px;}
.ibn-book-premium .ibn-book-body{padding:22px;display:flex;align-items:center;justify-content:space-between;gap:16px;}
.ibn-book-premium h3{margin:0;color:var(--ibn-navy);font-size:24px;}
.royal-mushaf-viewer-frame{height:calc(100vh - 250px)!important;min-height:700px!important;width:100%!important;background:#fff;border-radius:22px;overflow:hidden;}
.royal-mushaf-viewer-frame iframe{width:100%!important;height:100%!important;border:0!important;display:block!important;}
.royal-search-form{max-width:1000px;margin:0 auto;}
.royal-search-input-wrap{display:grid!important;grid-template-columns:1fr auto!important;gap:12px!important;align-items:center!important;border:1px solid rgba(212,175,55,.38)!important;background:#fff!important;border-radius:22px!important;padding:12px!important;}
.royal-search-input-wrap>i{display:none!important;}
.royal-search-input-wrap input{width:100%!important;min-height:54px!important;border:0!important;outline:0!important;background:#fafafa!important;border-radius:16px!important;padding:0 18px!important;font-size:18px!important;text-align:right!important;}
.royal-search-go{min-height:54px!important;border:0!important;border-radius:16px!important;background:linear-gradient(180deg,var(--ibn-gold-soft),var(--ibn-gold))!important;color:var(--ibn-navy)!important;padding:0 24px!important;font-weight:900!important;}
.royal-search-scope-select{max-width:1000px;margin:12px auto 0!important;display:flex;gap:10px;justify-content:flex-end;align-items:center;}
.royal-search-section,.royal-search-summary{max-width:1100px;margin:22px auto;}
.royal-search-results{display:grid;gap:14px;}
.royal-search-result,.royal-search-surah-card{background:#fff;border:1px solid rgba(212,175,55,.32);border-radius:18px;padding:16px;text-decoration:none;color:var(--ibn-navy);box-shadow:0 10px 24px rgba(7,29,56,.08);}
.ibn-glass-player{bottom:calc(115px + var(--safe-bottom))!important;}
@media(max-width:720px){body.ibn-quran-app{padding-bottom:230px!important}.ibn-page-shell{padding-bottom:205px!important}.ibn-bottom-nav{width:calc(100% - 16px);height:78px}.royal-mushaf-viewer-frame{min-height:620px!important}.ibn-book-premium{grid-template-rows:210px auto}.ibn-book-premium .ibn-book-cover strong{font-size:24px}}


/* ===== Ibn Thani final UX corrections v2 — no Quran text selectors touched ===== */
body.ibn-quran-app{padding-bottom:260px!important;}
.ibn-page-shell{padding-bottom:260px!important;}
.ibn-bottom-nav{height:82px!important;max-width:980px!important;margin-inline:auto!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(980px,calc(100% - 28px))!important;z-index:1100!important;}
.ibn-bottom-nav i,.ibn-card-icon i,.ibn-quick-btn i,.ibn-menu-toggle i{font-size:20px!important;line-height:1!important;color:inherit!important;font-family:"Font Awesome 6 Free"!important;font-weight:900!important;}
.ibn-bottom-nav a,.ibn-bottom-nav button{color:#fff!important;opacity:.95!important;}
.ibn-bottom-nav a.is-active{background:rgba(255,255,255,.10)!important;color:var(--ibn-gold)!important;border-radius:18px!important;}
.ibn-glass-player{bottom:calc(112px + var(--safe-bottom))!important;z-index:1250!important;}
body:has(.royal-mushaf-viewer) .ibn-bottom-nav{display:none!important;}
body:has(.royal-mushaf-viewer) .ibn-page-shell{padding-bottom:40px!important;}
body:has(.royal-mushaf-viewer) .ibn-footer{display:none!important;}

/* Quran index page cards */
.quran-card{background:#fff!important;border:1px solid rgba(212,175,55,.34)!important;border-radius:18px!important;box-shadow:0 10px 24px rgba(7,29,56,.08)!important;margin:8px!important;overflow:hidden!important;transition:transform .18s ease,box-shadow .18s ease!important;}
.quran-card:hover{transform:translateY(-3px)!important;box-shadow:0 18px 34px rgba(7,29,56,.14)!important;}
.quran-card h5{margin:0!important;}
.quran-card a{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;text-decoration:none!important;color:var(--ibn-royal)!important;padding:18px!important;min-height:92px!important;}
.surah-card-main{display:grid!important;gap:6px!important;}
.surah-card-row{display:flex!important;align-items:center!important;gap:10px!important;}
.surah-card-name{font-size:22px!important;font-weight:900!important;color:var(--ibn-royal)!important;}
.surah-card-number{min-width:34px;height:34px;border-radius:999px;background:#f6edd0;color:var(--ibn-royal);display:inline-flex;align-items:center;justify-content:center;font-weight:900;}
.surah-card-meta{font-size:14px!important;color:#5d6678!important;}
.surah-card-icon{width:34px;height:34px;border-radius:12px;background:var(--ibn-royal);color:var(--ibn-gold);display:inline-flex;align-items:center;justify-content:center;font-size:14px;}

/* Search page */
.royal-search-page{max-width:1120px;margin-inline:auto;}
.royal-search-form{max-width:1000px;margin:0 auto 24px!important;}
.royal-search-input-wrap{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;border:1px solid rgba(212,175,55,.38)!important;background:#fff!important;border-radius:22px!important;padding:12px!important;box-shadow:0 14px 28px rgba(7,29,56,.08)!important;}
.royal-search-input-wrap>i{display:none!important;}
.royal-search-input-wrap input{width:100%!important;min-height:56px!important;border:0!important;outline:0!important;background:#fafafa!important;border-radius:16px!important;padding:0 18px!important;font-size:18px!important;text-align:right!important;}
.royal-search-go{min-height:56px!important;border:0!important;border-radius:16px!important;background:linear-gradient(180deg,var(--ibn-gold-soft),var(--ibn-gold))!important;color:var(--ibn-navy)!important;padding:0 24px!important;font-weight:900!important;}
.royal-search-scope-select{max-width:1000px;margin:12px auto 0!important;display:flex!important;gap:10px!important;justify-content:flex-end!important;align-items:center!important;}
.royal-search-section,.royal-search-summary{max-width:1100px;margin:22px auto!important;}
.royal-search-results{display:grid!important;gap:14px!important;}
.royal-search-result,.royal-search-surah-card{background:#fff!important;border:1px solid rgba(212,175,55,.32)!important;border-radius:18px!important;padding:16px!important;text-decoration:none!important;color:var(--ibn-navy)!important;box-shadow:0 10px 24px rgba(7,29,56,.08)!important;display:block!important;}
.royal-search-result-text{font-size:20px!important;line-height:2!important;color:#111!important;}
.royal-search-surah-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;}
.royal-search-empty,.royal-search-hint{background:#fff!important;border:1px solid rgba(212,175,55,.32)!important;border-radius:18px!important;padding:18px!important;color:var(--ibn-royal)!important;}

/* Book viewers and premium library */
.royal-mushaf-viewer,.royal-qbook-viewer{min-height:calc(100vh - 130px)!important;margin:0!important;border-radius:24px!important;}
.royal-mushaf-viewer-frame{height:calc(100vh - 150px)!important;min-height:720px!important;background:#fff!important;}
.royal-mushaf-viewer-frame iframe{width:100%!important;height:100%!important;border:0!important;display:block!important;background:#fff!important;}
.royal-mushaf-viewer-nav{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;padding:14px!important;background:#fff!important;}
.royal-mushaf-nav-btn{border:1px solid rgba(212,175,55,.35)!important;border-radius:16px!important;padding:12px!important;text-decoration:none!important;color:var(--ibn-royal)!important;background:#fff!important;}
.ibn-book-premium{min-height:430px!important;border-radius:30px!important;background:linear-gradient(145deg,#fff,#fff8df)!important;box-shadow:0 22px 50px rgba(7,29,56,.12)!important;}
.ibn-book-premium .ibn-book-cover{height:230px!important;position:relative!important;overflow:hidden!important;}
.ibn-book-premium .ibn-book-cover::after{content:"";position:absolute;inset:18px;border:1px solid rgba(212,175,55,.35);border-radius:18px;pointer-events:none;}
.ibn-book-premium .ibn-book-cover strong{font-size:28px!important;line-height:1.5!important;position:relative;z-index:1;}
.ibn-book-seal{position:absolute;top:16px;right:16px;background:var(--ibn-gold);color:var(--ibn-navy);border-radius:999px;padding:6px 12px;font-size:13px;font-weight:900;z-index:2;}

/* Keep controls around tafseer/surah shell modern, without touching Quran text */
.tafseer-controls,.tafseer-ayah-nav,.changesoraform,.listensora{border-radius:22px!important;border:1px solid rgba(212,175,55,.34)!important;background:#fff!important;box-shadow:0 10px 24px rgba(7,29,56,.06)!important;}

@media(max-width:720px){body.ibn-quran-app{padding-bottom:250px!important}.ibn-page-shell{padding-bottom:250px!important}.ibn-bottom-nav{width:calc(100% - 16px)!important;height:78px!important}.royal-search-input-wrap{grid-template-columns:1fr!important}.royal-search-go{width:100%!important}.royal-search-surah-grid{grid-template-columns:1fr 1fr!important}.royal-mushaf-viewer-frame{height:calc(100vh - 120px)!important;min-height:640px!important}.ibn-book-premium .ibn-book-cover{height:190px!important}}

/* === UX FIX PACK: unified controls, modern player, safe external shell only === */
.ibn-page-shell{transition:opacity .18s ease,transform .18s ease;}
.ibn-page-shell.is-transitioning{opacity:.28;transform:translateY(8px);pointer-events:none;}
body.ibn-has-player{padding-bottom:360px!important;}
body.ibn-has-player .ibn-page-shell{padding-bottom:420px!important;}
body.ibn-has-player .ibn-footer{margin-bottom:240px!important;}
.listensora,.changesoraform,.tafseer-controls,.tafseer-ayah-nav{background:rgba(255,255,255,.96)!important;border:1px solid rgba(212,175,55,.38)!important;border-radius:22px!important;box-shadow:0 12px 26px rgba(7,29,56,.08)!important;padding:16px!important;}
.listensora select,.changesoraform select,.tafseer-controls select,.tafseer-ayah-nav select,select.form-control,select{appearance:auto!important;border:1px solid rgba(212,175,55,.48)!important;border-radius:14px!important;min-height:42px!important;background:#fff!important;color:#071D38!important;font-weight:800!important;padding:8px 12px!important;}
.changesoraform input,.changesoraform button,.tafseer-controls button,.tafseer-controls a,.tafseer-ayah-nav a,.tafseer-ayah-nav span{border-radius:14px!important;}
.ibn-glass-player{position:fixed!important;left:50%!important;bottom:112px!important;transform:translate(-50%,calc(120% + 30px))!important;width:min(760px,calc(100% - 28px))!important;z-index:1200!important;background:linear-gradient(135deg,rgba(7,29,56,.96),rgba(10,42,94,.94))!important;border:1px solid rgba(212,175,55,.45)!important;border-radius:28px!important;box-shadow:0 30px 70px rgba(7,29,56,.38),inset 0 1px 0 rgba(255,255,255,.08)!important;padding:18px!important;color:#fff!important;transition:transform .34s cubic-bezier(.2,.8,.2,1),opacity .2s ease!important;opacity:0;}
.ibn-glass-player.is-open{transform:translate(-50%,0)!important;opacity:1!important;}
.ibn-player-top{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;margin-bottom:12px!important;}
.ibn-player-meta strong{display:block!important;color:#f7d85f!important;font-size:20px!important;line-height:1.5!important;}
.ibn-player-close{width:42px!important;height:42px!important;border-radius:14px!important;border:1px solid rgba(212,175,55,.45)!important;background:rgba(255,255,255,.08)!important;color:#fff!important;display:flex!important;align-items:center!important;justify-content:center!important;}
.ibn-wave{display:flex!important;align-items:end!important;gap:6px!important;height:34px!important;margin:4px 0 12px!important;overflow:hidden!important;}
.ibn-wave i{width:16px!important;height:var(--h)!important;border-radius:999px!important;background:linear-gradient(180deg,#f5d85c,#9f8430)!important;opacity:.85;animation:ibnWave 1s ease-in-out infinite alternate;animation-delay:var(--d)}
@keyframes ibnWave{from{transform:scaleY(.65);opacity:.55}to{transform:scaleY(1.15);opacity:1}}
.ibn-progress{display:grid!important;grid-template-columns:auto 1fr auto!important;gap:12px!important;align-items:center!important;margin:10px 0 16px!important;}
.ibn-progress span{font-weight:900!important;color:#f7d85f!important;min-width:58px!important;text-align:center!important;}
.ibn-progress input[type=range]{width:100%!important;accent-color:#d4af37!important;}
.ibn-player-actions{display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;flex-wrap:wrap!important;}
.ibn-player-actions button{border:1px solid rgba(212,175,55,.42)!important;background:rgba(255,255,255,.09)!important;color:#fff!important;border-radius:16px!important;min-height:48px!important;min-width:56px!important;padding:10px 14px!important;font-weight:900!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;cursor:pointer!important;transition:transform .16s ease,background .16s ease,box-shadow .16s ease!important;}
.ibn-player-actions button:hover{transform:translateY(-2px)!important;background:rgba(212,175,55,.18)!important;box-shadow:0 12px 22px rgba(0,0,0,.16)!important;}
.ibn-player-actions button.is-active{background:rgba(212,175,55,.28)!important;border-color:#d4af37!important;color:#ffe890!important;}
.ibn-player-actions .ibn-play{width:78px!important;height:78px!important;border-radius:50%!important;background:linear-gradient(180deg,#f1d45a,#d4af37)!important;color:#071D38!important;font-size:26px!important;box-shadow:0 14px 34px rgba(212,175,55,.28)!important;}
.ibn-seek-btn{position:relative!important;width:62px!important;height:52px!important;}
.ibn-seek-btn i{font-size:23px!important;}
.ibn-seek-btn b{position:absolute!important;font-size:12px!important;line-height:1!important;color:#fff!important;inset-inline-start:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;}
.ibn-secondary-actions button span{font-size:13px!important;}
.ibn-bottom-nav{z-index:1100!important;}
.royal-search-form{max-width:980px!important;margin:0 auto!important;}
.royal-search-input-wrap{display:grid!important;grid-template-columns:44px 1fr auto!important;gap:10px!important;align-items:center!important;background:#fff!important;border:1px solid rgba(212,175,55,.38)!important;border-radius:22px!important;padding:12px!important;box-shadow:0 12px 28px rgba(7,29,56,.08)!important;}
.royal-search-input-wrap input{border:0!important;box-shadow:none!important;min-height:48px!important;font-size:18px!important;}
.royal-search-go{min-height:48px!important;border-radius:16px!important;}
.royal-search-results,.royal-search-surah-grid{max-width:1050px!important;margin:18px auto!important;}
.royal-search-result-text mark{background:#fff0a6!important;border-radius:8px!important;padding:0 4px!important;}
@media(max-width:760px){body.ibn-has-player{padding-bottom:390px!important}.ibn-glass-player{bottom:92px!important;width:calc(100% - 16px)!important;padding:14px!important;border-radius:22px!important}.ibn-player-actions button span{display:none}.ibn-player-actions .ibn-play{width:66px!important;height:66px!important}.ibn-wave i{width:10px!important}.ibn-brand-wrap{min-height:100px!important}.ibn-brand-logo{width:min(260px,60vw)!important}.ibn-main-nav{overflow:auto;justify-content:flex-start}.ibn-grid,.ibn-library-grid,.royal-qbooks-grid,.royal-mushaf-grid{grid-template-columns:1fr 1fr!important}.ibn-hero{grid-template-columns:1fr!important;padding:28px!important}.ibn-dashboard{grid-template-columns:1fr!important}}


/* ===== Final challenge fixes: player, controls, spacing, search/book UI. No Quran text selectors. ===== */
:root{--safe-bottom:env(safe-area-inset-bottom,0px)}
body.ibn-quran-app{padding-bottom:390px!important;}
body.ibn-has-player{padding-bottom:430px!important;}
.ibn-page-shell{padding-bottom:430px!important;}
.card-custom,.ibn-content-card{margin-bottom:240px!important;}
.card-body,.ibn-content-body{padding-bottom:280px!important;}
.ibn-glass-player{bottom:calc(104px + var(--safe-bottom))!important;width:min(820px,calc(100% - 24px))!important;border-radius:30px!important;padding:18px 20px!important;box-shadow:0 36px 86px rgba(7,29,56,.45),0 0 0 1px rgba(212,175,55,.28) inset!important;}
.ibn-player-meta strong{font-size:20px!important;line-height:1.45!important;color:#fff!important;}
.ibn-player-actions{gap:10px!important;}
.ibn-player-actions button{min-width:48px;height:48px;border-radius:16px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;}
.ibn-primary-actions .ibn-play{width:70px!important;height:70px!important;border-radius:50%!important;font-size:22px!important;}
.ibn-seek-btn{position:relative;width:54px!important;min-width:54px!important;padding:0!important;border-radius:50%!important;}
.ibn-seek-btn svg{width:34px;height:34px;display:block;}
.ibn-seek-btn b{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:11px;line-height:1;color:#fff;font-weight:900;margin-top:2px;}
.ibn-seek-btn:hover{transform:translateY(-2px)}
.ibn-secondary-actions button.is-active{background:rgba(212,175,55,.22)!important;border-color:rgba(212,175,55,.72)!important;color:var(--ibn-gold-soft)!important;}
.ibn-bottom-nav{bottom:calc(10px + var(--safe-bottom))!important;height:78px!important;}
/* Modernise old option/control shells without touching Quran text */
.listensora,.changesoraform,.tafseer-controls,.tafseer-ayah-nav{border-radius:24px!important;border:1px solid rgba(212,175,55,.36)!important;background:linear-gradient(180deg,#fff,#fffaf0)!important;box-shadow:0 16px 30px rgba(7,29,56,.08)!important;padding:16px!important;margin:16px 0!important;}
.listensora select,.changesoraform select,.tafseer-controls select,.tafseer-ayah-nav select,select.form-control,select{appearance:auto!important;border:1px solid rgba(212,175,55,.55)!important;border-radius:16px!important;min-height:46px!important;background:#fff!important;color:#071D38!important;font-weight:800!important;padding:9px 13px!important;box-shadow:0 8px 18px rgba(7,29,56,.05)!important;}
.listensora button,.changesoraform button,.tafseer-controls button,.tafseer-controls a,.tafseer-ayah-nav a,.tafseer-ayah-nav span,.changesoraform input{border-radius:16px!important;}
/* Search route/page */
.royal-search-page{background:#fff;border:1px solid rgba(212,175,55,.34);border-radius:28px;padding:22px;box-shadow:0 18px 38px rgba(7,29,56,.08)}
.royal-search-input-wrap{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;background:#fff;border:1px solid rgba(212,175,55,.45);border-radius:22px;padding:10px;}
.royal-search-input-wrap input{border:0!important;box-shadow:none!important;min-height:48px!important;}
.royal-search-go{border:0!important;background:linear-gradient(180deg,var(--ibn-gold-soft),var(--ibn-gold))!important;color:var(--ibn-navy)!important;border-radius:16px!important;padding:12px 18px!important;font-weight:900!important;}
.royal-search-surah-grid,.royal-search-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:14px;}
.royal-search-surah-card,.royal-search-result{display:block;text-decoration:none;background:#fff;border:1px solid rgba(212,175,55,.32);border-radius:20px;padding:16px;color:var(--ibn-royal);box-shadow:0 12px 24px rgba(7,29,56,.06)}
.royal-search-result-text{font-size:20px;line-height:2;color:#1a1a1a;}
/* Books */
.ibn-book-premium{min-height:390px!important;border-radius:32px!important;transform:translateZ(0);transition:transform .22s ease,box-shadow .22s ease!important;}
.ibn-book-premium:hover{transform:translateY(-6px);box-shadow:0 28px 60px rgba(7,29,56,.16)!important;}
.ibn-book-cover{height:220px!important;border-radius:26px!important;position:relative;overflow:hidden;text-decoration:none!important;}
.ibn-book-cover::after{content:"";position:absolute;inset:18px;border:1px solid rgba(212,175,55,.38);border-radius:20px;pointer-events:none;}
.ibn-book-seal{position:absolute;top:16px;inset-inline-start:16px;background:rgba(212,175,55,.18);color:#fff;border:1px solid rgba(212,175,55,.45);border-radius:999px;padding:5px 12px;font-size:12px;}
.ibn-book-cover strong{font-size:28px;line-height:1.5;color:#fff;max-width:78%;}
.royal-mushaf-viewer-frame,.royal-qbook-viewer-frame{height:calc(100vh - 150px)!important;min-height:760px!important;background:#f6f3ea!important;}
body:has(.royal-mushaf-viewer),body:has(.royal-qbook-viewer){padding-bottom:0!important;}
body:has(.royal-mushaf-viewer) .ibn-bottom-nav,body:has(.royal-qbook-viewer) .ibn-bottom-nav,body:has(.royal-mushaf-viewer) .ibn-glass-player,body:has(.royal-qbook-viewer) .ibn-glass-player{display:none!important;}
@media(max-width:760px){body.ibn-quran-app{padding-bottom:420px!important}body.ibn-has-player .ibn-page-shell,.ibn-page-shell{padding-bottom:470px!important}.card-body,.ibn-content-body{padding-bottom:340px!important}.ibn-glass-player{bottom:86px!important;width:calc(100% - 14px)!important;padding:14px!important;border-radius:24px!important}.ibn-player-meta strong{font-size:16px!important}.ibn-player-actions button span{display:none!important}.ibn-seek-btn{width:50px!important;min-width:50px!important}.ibn-primary-actions .ibn-play{width:66px!important;height:66px!important}.royal-mushaf-viewer-frame,.royal-qbook-viewer-frame{height:calc(100vh - 110px)!important;min-height:680px!important}.ibn-library-grid,.royal-qbooks-grid,.royal-mushaf-grid{grid-template-columns:1fr!important}.ibn-grid{grid-template-columns:1fr 1fr!important}}


/* =========================================================
   FINAL LEAD FIX — shell/player/search/books only.
   No Quran text selectors are touched here.
   ========================================================= */
html{scroll-padding-bottom:360px!important;}
body.ibn-quran-app{padding-bottom:170px!important;}
body.ibn-player-open{padding-bottom:360px!important;}
body.ibn-player-open .ibn-bottom-nav{opacity:0!important;transform:translateX(-50%) translateY(120%)!important;pointer-events:none!important;}
body.ibn-player-open .card-custom,
body.ibn-player-open .ibn-content-card{margin-bottom:360px!important;}
body.ibn-player-open .card-body,
body.ibn-player-open .ibn-content-body{padding-bottom:360px!important;}
.ibn-top-shell{position:relative!important;top:auto!important;}
.ibn-brand-wrap{min-height:128px!important;grid-template-columns:72px 1fr 72px!important;}
.ibn-brand-logo{max-width:300px!important;width:min(300px,42vw)!important;}
.ibn-header-actions .ibn-quick-btn,.ibn-menu-toggle{font-size:0!important;}
.ibn-menu-toggle span{width:24px!important;height:2px!important;display:block!important;background:#fff!important;margin:4px auto!important;}
.ibn-quick-btn svg,.ibn-bottom-nav svg,.ibn-card-icon svg,.ibn-player-actions svg{width:22px;height:22px;display:block;}
.ibn-main-nav a{min-width:96px;text-align:center;}
.ibn-bottom-nav{bottom:calc(10px + var(--safe-bottom))!important;height:74px!important;max-width:860px!important;width:min(860px,calc(100% - 24px))!important;border-radius:24px!important;transition:opacity .22s ease,transform .22s ease!important;}
.ibn-bottom-nav a,.ibn-bottom-nav button{font-size:13px!important;}
.ibn-bottom-nav svg{color:var(--ibn-gold);}
.ibn-glass-player{bottom:calc(24px + var(--safe-bottom))!important;width:min(760px,calc(100% - 28px))!important;max-height:min(360px,calc(100vh - 120px))!important;overflow:auto!important;border-radius:28px!important;padding:16px!important;z-index:1400!important;}
.ibn-player-top{margin-bottom:8px!important;}
.ibn-player-meta{width:100%;text-align:center!important;}
.ibn-player-meta strong{font-size:19px!important;line-height:1.55!important;}
.ibn-player-close{position:absolute;inset-inline-start:16px;top:16px;font-size:0!important;}
.ibn-player-close::before{content:'×';font-size:26px;line-height:1;color:#fff;}
.ibn-wave{height:28px!important;gap:5px!important;margin:8px 0 10px!important;justify-content:center;}
.ibn-wave i{width:11px!important;min-width:6px!important;}
.ibn-progress{margin:8px 0 12px!important;}
.ibn-primary-actions{gap:9px!important;}
.ibn-secondary-actions{gap:8px!important;}
.ibn-player-actions button{min-width:48px!important;min-height:46px!important;padding:8px 12px!important;}
.ibn-primary-actions .ibn-play{width:68px!important;height:68px!important;}
.ibn-seek-btn{width:54px!important;min-width:54px!important;height:54px!important;border-radius:50%!important;position:relative!important;padding:0!important;}
.ibn-seek-btn svg{width:34px!important;height:34px!important;}
.ibn-seek-btn b{font-size:11px!important;position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;color:#fff!important;}
.ibn-secondary-actions button.is-active{background:rgba(212,175,55,.24)!important;border-color:var(--ibn-gold)!important;color:#ffe487!important;}
.listensora,.changesoraform,.tafseer-controls,.tafseer-ayah-nav{background:#fff!important;border:1px solid rgba(212,175,55,.38)!important;border-radius:22px!important;box-shadow:0 10px 24px rgba(7,29,56,.07)!important;margin:16px 0!important;}
.listensora select,.changesoraform select,.tafseer-controls select,.tafseer-ayah-nav select{border-radius:14px!important;min-height:44px!important;}
/* Tafseer page old link list: make it readable without touching tafseer text */
.card-body > a[href*="tafseer-"],.ibn-content-body > a[href*="tafseer-"]{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:42px!important;min-width:120px!important;margin:5px!important;padding:8px 14px!important;border-radius:14px!important;background:#fff!important;border:1px solid rgba(212,175,55,.35)!important;color:var(--ibn-royal)!important;text-decoration:none!important;box-shadow:0 8px 16px rgba(7,29,56,.05)!important;}
.royal-search-page{max-width:1120px!important;margin:0 auto!important;background:#fff!important;border-radius:28px!important;padding:24px!important;box-shadow:0 18px 42px rgba(7,29,56,.08)!important;border:1px solid rgba(212,175,55,.35)!important;}
.royal-search-input-wrap{grid-template-columns:1fr auto!important;gap:12px!important;}
.royal-search-input-wrap > i{display:none!important;}
.royal-search-go{min-width:120px!important;}
.royal-search-empty,.royal-search-hint{padding:18px!important;background:#fff8df!important;border:1px solid rgba(212,175,55,.34)!important;border-radius:16px!important;color:var(--ibn-royal)!important;font-weight:900!important;text-align:center!important;}
.royal-search-result,.royal-search-surah-card{transition:transform .18s ease,box-shadow .18s ease!important;}
.royal-search-result:hover,.royal-search-surah-card:hover{transform:translateY(-3px)!important;box-shadow:0 18px 35px rgba(7,29,56,.11)!important;}
.royal-mushaf-viewer-frame,.royal-qbook-viewer-frame{height:calc(100vh - 148px)!important;min-height:760px!important;background:#777!important;}
body:has(.royal-mushaf-viewer) .ibn-bottom-nav,body:has(.royal-qbook-viewer) .ibn-bottom-nav,body:has(.royal-mushaf-viewer) .ibn-glass-player,body:has(.royal-qbook-viewer) .ibn-glass-player{display:none!important;}
@media(max-width:760px){
  .ibn-brand-wrap{min-height:100px!important;grid-template-columns:54px 1fr 54px!important;}
  .ibn-brand-logo{width:min(250px,62vw)!important;}
  .ibn-glass-player{bottom:calc(14px + var(--safe-bottom))!important;width:calc(100% - 16px)!important;max-height:56vh!important;}
  body.ibn-player-open{padding-bottom:330px!important;}
  body.ibn-player-open .card-body,body.ibn-player-open .ibn-content-body{padding-bottom:330px!important;}
  .ibn-player-actions button span{display:none!important;}
  .ibn-primary-actions .ibn-play{width:62px!important;height:62px!important;}
  .ibn-bottom-nav{width:calc(100% - 16px)!important;height:72px!important;}
  .royal-search-input-wrap{grid-template-columns:1fr!important;}
  .royal-search-go{width:100%!important;}
}


/* STRICT UI REPAIR 2026-05-23 — interface only, no Quran/Tafseer text selectors */
body.ibn-quran-app{
  padding-bottom:0!important;
  background:#f8f6ee!important;
}
.ibn-page-shell{padding-bottom:32px!important;}
.ibn-bottom-nav{
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  width:min(960px,calc(100% - 32px))!important;
  max-width:960px!important;
  height:72px!important;
  margin:26px auto!important;
  border-radius:24px!important;
  z-index:10!important;
}
.ibn-glass-player{
  position:fixed!important;
  left:50%!important;
  top:50%!important;
  bottom:auto!important;
  width:min(680px,calc(100% - 28px))!important;
  transform:translate(-50%,-44%) scale(.98)!important;
  border-radius:24px!important;
  z-index:2200!important;
}
.ibn-glass-player.is-open{transform:translate(-50%,-50%) scale(1)!important;}
.listensora,.changesoraform,.tafseer-controls,.tafseer-ayah-nav{
  border:1px solid rgba(212,175,55,.35)!important;
  border-radius:20px!important;
  padding:16px!important;
  background:#fff!important;
  box-shadow:0 10px 26px rgba(7,29,56,.06)!important;
}
.listensora select,.changesoraform select,.tafseer-controls select,.tafseer-ayah-nav select,
.listensora input,.changesoraform input,.tafseer-controls input,.tafseer-ayah-nav input{
  width:100%!important;
  min-height:48px!important;
  border:1px solid rgba(7,29,56,.16)!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#071D38!important;
  padding:8px 12px!important;
  font-weight:800!important;
  direction:rtl!important;
  text-align:right!important;
}
.changesoraform button,.tafseer-controls button,.tafseer-ayah-nav a,.tafseer-ayah-nav button{
  min-height:48px!important;
  border-radius:14px!important;
  border:1px solid rgba(212,175,55,.55)!important;
  background:#d4af37!important;
  color:#071D38!important;
  font-weight:900!important;
  padding:8px 18px!important;
}
.quran-home-gateway{max-width:1180px;margin:0 auto;padding:24px 16px 42px;}
.quran-home-hero{background:linear-gradient(135deg,#071D38,#0A2A5E);border:1px solid rgba(212,175,55,.45);border-radius:34px;min-height:300px;display:flex;align-items:center;justify-content:center;text-align:center;box-shadow:0 22px 60px rgba(7,29,56,.18);}
.quran-home-kicker{color:#d4af37;font-weight:900;margin:0 0 8px;}
.quran-home-hero h1{color:#fff;font-size:clamp(42px,7vw,86px);margin:0 0 26px;font-weight:900;}
.quran-home-actions,.quran-gateway-grid,.quran-book-grid,.quran-mushaf-grid{display:grid;gap:16px;}
.quran-home-actions{display:flex;flex-wrap:wrap;justify-content:center;}
.quran-home-primary,.quran-home-secondary,.quran-gateway-card,.quran-book-tile,.quran-mushaf-tile{text-decoration:none!important;}
.quran-home-primary,.quran-home-secondary{border-radius:16px;padding:13px 28px;font-weight:900;}
.quran-home-primary{background:#d4af37;color:#071D38!important;}
.quran-home-secondary{border:1px solid rgba(255,255,255,.35);color:#fff!important;}
.quran-gateway-grid{grid-template-columns:repeat(6,1fr);margin:28px 0;}
.quran-gateway-card{min-height:116px;border:1px solid rgba(212,175,55,.35);border-radius:24px;background:#fff;color:#071D38!important;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:900;box-shadow:0 14px 32px rgba(7,29,56,.07);}
.quran-home-section{background:#fff;border:1px solid rgba(212,175,55,.35);border-radius:28px;margin:26px 0;padding:24px;box-shadow:0 12px 28px rgba(7,29,56,.06);}
.quran-section-head h2{margin:0 0 22px;color:#071D38;text-align:right;font-size:30px;font-weight:900;}
.quran-book-grid{grid-template-columns:repeat(4,1fr);}
.quran-book-tile{min-height:110px;border:1px solid rgba(212,175,55,.35);border-radius:20px;background:#fff;color:#071D38!important;display:flex;align-items:center;justify-content:center;text-align:center;padding:18px;font-size:19px;}
.quran-mushaf-grid{grid-template-columns:repeat(4,1fr);}
.quran-mushaf-tile{min-height:170px;border:1px solid rgba(212,175,55,.35);border-radius:20px;background:#fff;color:#071D38!important;display:grid;grid-template-columns:96px 1fr;gap:18px;align-items:center;padding:18px;}
.quran-mushaf-img{height:132px;display:flex;align-items:center;justify-content:center;background:#faf8ef;border-radius:16px;overflow:hidden;}
.quran-mushaf-img img{max-width:100%;max-height:100%;width:auto!important;height:auto!important;object-fit:contain!important;}
.quran-search-strip form{display:grid;grid-template-columns:1fr 150px;gap:12px;}
.quran-search-strip input,.quran-search-strip button{min-height:52px;border-radius:16px;border:1px solid rgba(7,29,56,.16);padding:8px 14px;font-weight:800;}
.quran-search-strip button{background:#d4af37;color:#071D38;border-color:#d4af37;}
.royal-mushaf-grid{grid-template-columns:repeat(3,1fr)!important;}
.royal-mushaf-card{min-height:250px!important;}
.royal-mushaf-cover{height:190px!important;overflow:hidden!important;}
.royal-mushaf-cover img{width:100%!important;height:100%!important;object-fit:contain!important;}
.royal-mushaf-viewer-frame{height:calc(100vh - 120px)!important;min-height:780px!important;width:100%!important;background:#fff!important;}
.royal-mushaf-viewer{border-radius:22px!important;overflow:hidden!important;}
body:has(.ibn-full-viewer) .ibn-top-shell,
body:has(.ibn-full-viewer) .ibn-bottom-nav,
body:has(.ibn-full-viewer) .ibn-footer,
body:has(.ibn-full-viewer) .breadcrumb,
body:has(.ibn-full-viewer) .breadcrumb-wrapper{display:none!important;}
body:has(.ibn-full-viewer) .ibn-page-shell{padding:0!important;max-width:none!important;width:100%!important;}
body:has(.ibn-full-viewer){background:#fff!important;}
.ibn-full-viewer{min-height:100vh!important;border-radius:0!important;border:0!important;}
.ibn-full-viewer .royal-mushaf-viewer-frame{height:calc(100vh - 76px)!important;min-height:calc(100vh - 76px)!important;}
@media(max-width:980px){.quran-gateway-grid,.quran-book-grid,.quran-mushaf-grid{grid-template-columns:repeat(2,1fr)}.royal-mushaf-grid{grid-template-columns:repeat(2,1fr)!important}}
@media(max-width:640px){.quran-gateway-grid,.quran-book-grid,.quran-mushaf-grid{grid-template-columns:1fr}.quran-mushaf-tile{grid-template-columns:82px 1fr}.quran-home-section{padding:16px}.quran-search-strip form{grid-template-columns:1fr}.ibn-bottom-nav{width:calc(100% - 16px)!important;height:68px!important}.ibn-bottom-nav span{font-size:11px!important}}
