/* jawna-fawz-qtools: word mode + tool sheets inside the Quran reader (reader tokens only, same sheet look). */
html.qt-wbw #reader .qw,html.qt-wbw #reader .w{cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;border-radius:.28em;transition:background-color .15s ease,color .15s ease}
html.qt-wbw #reader{-webkit-user-select:none;user-select:none}
html.qt-wbw #reader .qt-hold,html.qt-wbw #reader .qt-held{background:color-mix(in srgb,var(--accent) 16%,transparent)}
html.qt-wbw #reader .qt-won{background:color-mix(in srgb,var(--accent) 24%,transparent);color:var(--accent)}
.qt-chip{position:fixed;left:50%;bottom:calc(var(--qt-lift,0px) + 12px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:9;display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 6px 0 12px;border:0;border-radius:999px;background:color-mix(in srgb,var(--card) 88%,transparent);-webkit-backdrop-filter:saturate(180%) blur(18px);backdrop-filter:saturate(180%) blur(18px);color:var(--ink);font:600 13px/1 var(--ui);box-shadow:0 0 0 .5px var(--line),0 6px 18px rgba(0,0,0,.14);cursor:pointer;transition:bottom .3s ease}
.qt-chip[hidden]{display:none}
.qt-chip>svg{width:16px;height:16px;fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round}
.qt-chip-x{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--s-fill,rgba(118,118,128,.14))}
.qt-chip-x svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round}
.qt-chip:active{opacity:.6}
.qt-back{position:fixed;inset:0;z-index:38;background:rgba(0,0,0,.32);opacity:0;transition:opacity .3s ease;touch-action:none}
.qt-back.in{opacity:1}
.qt-sheet{position:fixed;left:0;right:0;bottom:0;z-index:39;max-width:620px;margin:0 auto;background:var(--s-bg);color:var(--s-ink);border-radius:14px 14px 0 0;box-shadow:0 -1px 0 var(--s-sep),0 -12px 40px rgba(0,0,0,.18);transform:translateY(100%);transition:transform .45s var(--spring,cubic-bezier(.2,.9,.25,1));overscroll-behavior:contain}
.qt-sheet.in{transform:translateY(0)}
.qt-sheet.drag{transition:none}
.qt-grab{width:36px;height:5px;border-radius:3px;background:var(--s-sep);margin:6px auto 8px}
.qt-wsheet{max-height:86dvh;overflow:auto;padding:0 16px calc(16px + env(safe-area-inset-bottom));--j-surface:var(--s-cell);--j-label:var(--s-ink);--j-label-2:var(--s-ink2);--j-fill-3:var(--s-fill);--j-tint:var(--accent);--j-r-md:12px}
.qt-wsheet .w-word{text-align:center;margin:0 0 12px}
.qt-wtext{margin:0;font-family:var(--qfont,"Jawna Hafs"),serif;font-size:40px;line-height:1.6;color:var(--s-ink)}
.qt-where{margin:0;font:500 13px/1.4 var(--ui);color:var(--s-ink2)}
.qt-rows{list-style:none;margin:0;padding:0;border-radius:12px;overflow:hidden;background:var(--s-cell)}
.qt-rows li+li{border-top:.5px solid var(--s-sep)}
.qt-row{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:0 14px;border:0;background:none;color:var(--s-ink);font:500 16px/1.3 var(--ui);text-align:start;cursor:pointer}
.qt-row:active{background:var(--s-fill)}
.qt-row-ic{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--accent);flex:none}
.qt-row-ic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.qt-tsheet{top:calc(env(safe-area-inset-top) + 10px);display:flex;flex-direction:column;overflow:hidden;max-width:760px;padding-bottom:env(safe-area-inset-bottom)}
.qt-tbar{flex:none;touch-action:none;cursor:grab;padding:2px 0 2px}
.qt-tbar .qt-grab{margin:4px auto 6px}
.qt-frame{flex:1;width:100%;border:0;display:block;background:var(--s-bg);min-height:0}
.qt-tsheet.loading .qt-frame{opacity:0}
.qt-tsheet.loading::after{content:"";position:absolute;left:50%;top:40%;width:26px;height:26px;margin:-13px;border-radius:50%;border:2.5px solid var(--s-sep);border-top-color:var(--accent);animation:qt-spin .8s linear infinite}
@keyframes qt-spin{to{transform:rotate(360deg)}}


/* jawna-fawz-solidbars: room under the text while the word-by-word chip shows, so it never hides the last lines */
html:has(.qt-chip:not([hidden])) body:not(.paged) main{padding-bottom:calc(64px + env(safe-area-inset-bottom))!important}
/* fawz-wbwnoplayer: no reciter player while word by word is on */
html.qt-wbw #player{display:none!important}

/* fawz-wbwtajweed: word mode keeps tajweed colours (WebKit paints CSS highlights only on selectable text; selectstart is blocked by quran.js) */
html.qt-wbw.qt-ranges body.tj #reader .qw,html.qt-wbw.qt-ranges body.tj #reader .w,html.qt-wbw.qt-ranges body.tj #reader .w .f,html.qt-wbw.qt-ranges body.tj #reader .w .r{-webkit-user-select:text;user-select:text}
.qt-tj{margin:0 0 12px;padding:4px 14px;border-radius:12px;background:var(--s-cell)}
.qt-tj[hidden]{display:none}
.qt-tj-h{margin:8px 0 2px;font:600 12px/1.3 var(--ui);color:var(--s-ink2)}
.qt-tj-r{padding:8px 0}.qt-tj-r+.qt-tj-r{border-top:.5px solid var(--s-sep)}
.qt-tj-t{display:flex;align-items:center;gap:8px;margin:0;font:700 15px/1.35 var(--ui)}
.qt-tj-dot{flex:none;width:10px;height:10px;border-radius:50%}
.qt-tj-l{margin-inline-start:auto;font-family:var(--qfont,"Jawna Hafs"),serif;font-size:22px;line-height:1.2;font-weight:400}
.qt-tj-p{margin:3px 0 0;font:400 14px/1.45 var(--ui);color:var(--s-ink)}
.qt-tj-none{margin:8px 0;font:400 14px/1.45 var(--ui);color:var(--s-ink2)}

/* fawz500b36: Word by word chip no longer sits on the next-surah pill at the end of a surah (the end pill's -40px pull ate the chip room) */
html:has(.qt-chip:not([hidden])) body:not(.paged) .qr-end:not(.qr-end-top){margin-bottom:0}
