/* Visual Fikr — التفاسير (v22: الميسر • السعدي • المختصر) — لوحة سفلية زمرّدية ذهبية */
.sel-tf { height: 36px !important; padding: 0 12px !important; font-size: 14px !important; gap: 5px !important; background: linear-gradient(160deg, #157a5f, var(--em) 60%, var(--deep)) !important; color: #fff3c4 !important; border: 1px solid var(--gold) !important;
  box-shadow: inset 0 1px 0 rgba(255,243,196,.35), 0 6px 14px -8px rgba(6,48,42,.7) !important; }
.sel-tf svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.tfs { z-index: 22; }
.tf-card { --tfs: 18px; position: relative; display: flex; flex-direction: column; gap: 9px; padding: 0 0 calc(env(safe-area-inset-bottom) + 10px); overflow: hidden; width: min(600px, 100%); max-height: 92dvh;
  background: linear-gradient(180deg, #fffdf7, #faf3df); border: 1px solid rgba(201,162,74,.55);
  box-shadow: 0 -18px 40px -18px rgba(4,20,17,.6), inset 0 1px 0 rgba(255,255,255,.8); animation: tf-up .28s cubic-bezier(.2,.8,.2,1); }
[data-theme="night"] .tf-card { background: linear-gradient(180deg, #10302a, #0a221e); }
@keyframes tf-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.tf-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--goldd), #f3d27a, var(--goldd)); }
.tf-h { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; color: #fff3c4;
  background: radial-gradient(120% 140% at 80% 0%, #1d8a6c 0%, var(--em) 50%, var(--deep) 100%); box-shadow: inset 0 -1px 0 rgba(227,199,125,.55), 0 8px 18px -12px rgba(4,20,17,.8); }
.tf-med { flex: 0 0 auto; width: 46px; height: 46px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); } .tf-med svg { width: 100%; height: 100%; display: block; }
.tf-ti { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.tf-card .tf-ti h2 { text-align: start; font-size: 19px; color: #f3d27a !important; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.tf-ti small { font-size: 13px; font-weight: 700; color: #e9dcb4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-h .ic.sm { background: rgba(255,248,230,.08); border-color: rgba(227,199,125,.5); color: #f3d27a; }
.tf-tools { display: flex; align-items: center; gap: 6px; padding: 0 12px; flex-wrap: wrap; }
.tf-tools .ic.sm { width: 36px; height: 36px; border-color: rgba(201,162,74,.5); background: linear-gradient(180deg, #fffdf7, #f4ead0); box-shadow: inset 0 1px 0 #fff, 0 3px 8px -5px rgba(6,48,42,.5); }
[data-theme="night"] .tf-tools .ic.sm { background: linear-gradient(180deg, #164036, #0d2b25); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.tf-tools .ic:disabled { opacity: .4; cursor: default; }
.tf-sp { flex: 1; }
.tf-chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(201,162,74,.6); background: rgba(201,162,74,.12); color: var(--goldd); font: 800 12.5px 'Tajawal', sans-serif; cursor: pointer; }
.tf-chip.on { background: linear-gradient(160deg, #157a5f, var(--em)); color: #fff3c4; border-color: var(--gold); }
[data-theme="night"] .tf-chip { color: var(--gold2); }
.tf-body { flex: 1 1 auto; min-height: 120px; margin: 0 12px; padding: 4px 2px; overflow: auto; overscroll-behavior: contain; text-align: start; }
.tf-blk + .tf-blk { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(201,162,74,.5); }
.tf-bh { margin: 0 0 6px; font: 800 13px 'Tajawal', sans-serif; color: var(--goldd); } [data-theme="night"] .tf-bh { color: var(--gold2); }
.tf-ay { position: relative; padding: 12px 14px; border-radius: 16px; font: 400 calc(var(--tfs) + 2px)/2.05 'Amiri Quran', 'Amiri', serif; color: var(--em); text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(243,234,210,.85)); border: 1px solid rgba(201,162,74,.55);
  box-shadow: inset 0 0 0 3px rgba(255,253,247,.9), inset 0 0 0 4px rgba(201,162,74,.35), 0 8px 18px -14px rgba(6,48,42,.6); }
[data-theme="night"] .tf-ay { color: #f1e4bd; background: linear-gradient(180deg, rgba(19,72,60,.9), rgba(10,40,34,.9)); box-shadow: inset 0 0 0 3px rgba(10,34,30,.9), inset 0 0 0 4px rgba(201,162,74,.35); }
.tf-n { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .2em; border-radius: 50%; font: 700 .62em/1 'Tajawal', sans-serif; color: #fff3c4; vertical-align: .25em;
  background: radial-gradient(circle at 40% 35%, #1d8a6c, var(--em) 65%, var(--deep)); box-shadow: 0 0 0 1.5px var(--gold), 0 2px 3px rgba(0,0,0,.3); }
.tf-orn { display: flex; align-items: center; gap: 8px; margin: 10px 4px 6px; } .tf-orn i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.tf-orn b { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px; background: linear-gradient(135deg, #f3d27a, var(--goldd)); box-shadow: 0 0 0 2px rgba(201,162,74,.25); }
.tf-tx { font: 500 var(--tfs)/2 'Tajawal', system-ui, sans-serif; color: var(--ink); text-align: justify; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.tf-tx .tq { color: var(--em3); font-weight: 700; } [data-theme="night"] .tf-tx .tq { color: var(--gold2); }
.tf-warn { margin: 8px 0 0 !important; padding: 8px 10px; border-radius: 10px; background: rgba(201,162,74,.12); color: var(--goldd) !important; font-size: 12.5px !important; line-height: 1.7 !important; text-align: start !important; }
.tf-err { padding: 18px 8px; color: var(--mut); text-align: center; } .tf-err small { color: var(--mut); }
.tf-load { display: flex; justify-content: center; gap: 6px; padding: 34px 0; } .tf-load i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); animation: tf-b 1s infinite ease-in-out; }
.tf-load i:nth-child(2) { animation-delay: .15s; } .tf-load i:nth-child(3) { animation-delay: .3s; }
@keyframes tf-b { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.tf-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px; } .tf-card .tf-nav .btn { height: 42px; font-size: 14.5px; } .tf-nav .btn:disabled { opacity: .4; cursor: default; }
.tf-ask { margin: 0 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--gold); background: linear-gradient(160deg, rgba(19,112,87,.1), rgba(201,162,74,.14)); box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.tf-ask[hidden] { display: none; }
.tf-card .tf-ask p { color: var(--ink); font-size: 14px; font-weight: 700; }
.tf-bar { height: 8px; margin: 10px 0 2px; border-radius: 99px; background: rgba(11,74,58,.12); overflow: hidden; } .tf-bar[hidden] { display: none; }
.tf-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--em3), var(--gold)); transition: width .2s; }
.tf-ab { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 10px; } .tf-card .tf-ab .btn { height: 42px; font-size: 14.5px; }
.tf-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; flex-wrap: wrap; }
.tf-card .tf-off { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; line-height: 1.5; text-align: start; }
.tf-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #b9b3a1; } .tf-dot.ok { background: #1f9a6e; box-shadow: 0 0 0 3px rgba(31,154,110,.18); }
.tf-dl { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--gold); background: transparent; color: var(--em); font: 800 12.5px 'Tajawal', sans-serif; cursor: pointer; } .tf-dl[hidden] { display: none; }
[data-theme="night"] .tf-dl { color: var(--gold2); }
.tf-card .tf-attr { margin: 0 14px; padding-top: 6px; text-align: center; border-top: 1px solid rgba(201,162,74,.35); font: 700 12px/1.6 'Tajawal', sans-serif; color: var(--em); }
[data-theme="night"] .tf-card .tf-attr { color: var(--gold2); }
.tf-attr small { display: block; font-size: 11px; font-weight: 500; color: var(--mut); }
@media (max-width: 380px) { .tf-tools { gap: 4px; } .tf-tools .ic.sm { width: 33px; height: 33px; } .tf-chip { padding: 0 9px; } .sel-tf { padding: 0 9px !important; } }
@media (min-width: 760px) { .tf-card { max-height: min(88dvh, 860px); } }
.tf-h, .tf-tools, .tf-nav, .tf-ask, .tf-foot, .tf-attr { flex: 0 0 auto; }
@media (max-width: 400px) { .selbar .sel-b { gap: 4px; flex-wrap: wrap; justify-content: flex-end; } .selbar .sel-b .ic.sm { width: 30px; height: 30px; } .selbar .sel-tf svg { display: none; }
  .selbar .sel-tf, .selbar .sel-sh { padding: 0 9px !important; font-size: 13.5px !important; height: 34px !important; } }
@media (max-width: 345px) { .selbar .sel-tf, .selbar .sel-sh { padding: 0 7px !important; font-size: 13px !important; } .selbar .sel-b { gap: 3px; } }
/* v22: اختيار التفسير + فقرات السعدي الطويلة + خيارات التنزيل لكل تفسير */
.tf-pick { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 12px; padding: 4px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(11,74,58,.10), rgba(201,162,74,.14)); border: 1px solid rgba(201,162,74,.5); box-shadow: inset 0 2px 4px rgba(6,48,42,.12); }
.tf-pick button { height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--em); font: 800 14px 'Tajawal', sans-serif; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.tf-pick button.on { color: #fff3c4; background: linear-gradient(160deg, #1d8a6c, var(--em) 55%, var(--deep));
  box-shadow: inset 0 1px 0 rgba(255,243,196,.35), 0 0 0 1px var(--gold), 0 6px 12px -7px rgba(6,48,42,.8); text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.tf-pick button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
[data-theme="night"] .tf-pick { background: linear-gradient(180deg, rgba(10,34,30,.9), rgba(19,72,60,.6)); } [data-theme="night"] .tf-pick button { color: var(--gold2); }
[data-theme="night"] .tf-pick button.on { color: #fff3c4; }
.tf-body { -webkit-overflow-scrolling: touch; scroll-behavior: smooth; scroll-padding-top: 8px; }
.tf-tx p { margin: 0 0 .7em; } .tf-tx p:last-child { margin-bottom: 0; }
.tf-tx p.hl { animation: tf-hl 2.4s ease-out; border-radius: 8px; }
@keyframes tf-hl { 0%, 35% { background: rgba(201,162,74,.22); box-shadow: 0 0 0 6px rgba(201,162,74,.22); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
.tf-an { display: inline-grid; place-items: center; min-width: 1.75em; height: 1.75em; padding: 0 .35em; border-radius: 999px; margin-inline-end: 2px; vertical-align: .08em;
  font: 800 .7em/1 'Tajawal', sans-serif; color: #fff3c4; background: radial-gradient(circle at 40% 35%, #1d8a6c, var(--em) 65%, var(--deep)); box-shadow: 0 0 0 1.5px var(--gold), 0 2px 3px rgba(0,0,0,.25); }
.tf-tx .th { color: var(--goldd); } [data-theme="night"] .tf-tx .th { color: #e9dcb4; }
.tf-intro { margin: 0 0 10px !important; padding: 8px 12px; border-radius: 12px; font-size: 13.5px !important; line-height: 1.8 !important; color: var(--em) !important;
  background: rgba(201,162,74,.12); border: 1px solid rgba(201,162,74,.35); text-align: start !important; } [data-theme="night"] .tf-intro { color: var(--gold2) !important; }
.tf-ayd { border-radius: 16px; } .tf-ayd > summary { list-style: none; cursor: pointer; padding: 10px 14px; border-radius: 14px; text-align: center; font: 800 14px 'Tajawal', sans-serif; color: var(--em);
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(243,234,210,.85)); border: 1px solid rgba(201,162,74,.55); box-shadow: 0 6px 14px -12px rgba(6,48,42,.6); }
.tf-ayd > summary::-webkit-details-marker { display: none; } .tf-ayd > summary::after { content: ' ▾'; color: var(--gold); } .tf-ayd[open] > summary::after { content: ' ▴'; }
.tf-ayd > summary small { font-weight: 600; color: var(--mut); } .tf-ayd[open] > summary { margin-bottom: 8px; }
[data-theme="night"] .tf-ayd > summary { color: #f1e4bd; background: linear-gradient(180deg, rgba(19,72,60,.9), rgba(10,40,34,.9)); }
.tf-ask-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .tf-ask-h .ic.sm { width: 30px; height: 30px; }
.tf-dls { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.tf-dr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; padding: 9px 10px; border-radius: 12px; background: rgba(255,253,247,.75); border: 1px solid rgba(201,162,74,.4); }
[data-theme="night"] .tf-dr { background: rgba(10,34,30,.6); }
.tf-dr.ok { border-color: rgba(31,154,110,.55); }
.tf-dn { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; } .tf-dn b { font: 800 14px 'Tajawal', sans-serif; color: var(--em); } [data-theme="night"] .tf-dn b { color: var(--gold2); }
.tf-dn small { font-size: 12px; font-weight: 600; color: var(--mut); }
.tf-card .tf-dr .tf-dg { height: 34px; padding: 0 14px; font-size: 13.5px; } .tf-dr .tf-dg:disabled { opacity: .65; cursor: default; }
.tf-dr .tf-bar { grid-column: 1 / -1; margin: 2px 0 0; }
.tf-card .tf-attr { font-size: 12px; } .tf-attr b { display: block; font-weight: 800; }
.tf-attr .tf-rep { margin-top: 1px; font-size: 10.5px; } .tf-attr a { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 380px) { .tf-pick button { font-size: 13px; height: 34px; } }
