.statusbar{background:inherit}
.landing,.app,.reader{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--bg)}

/* ---------- landing: logo + search, nothing else ---------- */
.landing{overflow:hidden}
.landing .statusbar{background:transparent}
.landing::before{content:"";position:absolute;left:50%;top:-14%;width:680px;height:560px;transform:translateX(-50%);background:radial-gradient(closest-side,var(--glow),var(--glow2) 58%,transparent);pointer-events:none}
.landing .pat{position:absolute;inset:0;pointer-events:none;-webkit-mask-image:radial-gradient(ellipse 85% 42% at 50% 34%,#000 0,transparent 78%);mask-image:radial-gradient(ellipse 85% 42% at 50% 34%,#000 0,transparent 78%)}
.landing>*{position:relative}
.lc{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 22px 2vh;text-align:center}
.lc .tagline{margin:8px 0 0;max-width:320px;font-size:15px;line-height:1.75;color:var(--muted)}
.try{display:flex;justify-content:center;gap:8px;margin-top:16px}
.try .chip{height:36px;padding:0 14px;font-size:14px}
.try .chip.ur{font:500 22px/1.1 "Noto Nastaliq Urdu",serif;padding:0 16px 11px;display:inline-grid;place-items:center}
/* the invitation to send a naat (the /submit page): one plain line at the foot of the landing, no background */
.f-line{flex:0 0 auto;margin:0;padding:0 22px calc(20px + env(safe-area-inset-bottom));text-align:center;font-size:13.5px;line-height:1.7;color:var(--muted)}
.f-line a{color:var(--green-d);font-weight:600;text-decoration:none}

.lc .ur-w{display:block;font:600 84px/1.35 "Noto Nastaliq Urdu",serif;background:linear-gradient(180deg,var(--logo-a),var(--logo-b));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;padding-top:8px}
.lc h1{font:800 30px/1.3 var(--head);margin-top:-4px}
.fake{margin-top:22px;width:100%;max-width:420px;height:58px;display:flex;align-items:center;gap:12px;padding:0 20px;border-radius:29px;border:1.5px solid var(--green-line);background:var(--surface);box-shadow:0 8px 28px var(--sh1);color:var(--faint);font-size:17px;text-align:left;transition:.15s}
.fake svg{flex:0 0 auto;color:var(--green)}
.fake:active{transform:scale(.985);box-shadow:0 4px 16px var(--sh1)}
.tl{position:absolute;left:14px;top:calc(8px + env(safe-area-inset-top));z-index:2}
.tl .seg{background:var(--soft);border:1px solid var(--line);padding:3px}
.tl .seg button,.langsw.in-page button{height:32px;padding:0 12px;font-size:13px}
.tr{position:absolute;right:14px;top:calc(8px + env(safe-area-inset-top));display:flex;gap:8px;z-index:2}
.ico-r{width:42px;height:42px;border-radius:21px;background:var(--soft);border:1px solid var(--line);display:grid;place-items:center;color:var(--green-d)}
.theme-b svg{width:20px;height:20px}
.sv-top{height:42px;padding:0 14px;border-radius:21px;background:var(--soft);border:1px solid var(--line);font-size:14px;font-weight:600;color:var(--green-d);display:flex;align-items:center;gap:6px;z-index:2}
@media (min-width:821px){.tr,.tl{top:42px}}

/* ---------- app (search / browse / saved) ---------- */
.app{opacity:0;pointer-events:none;transform:translateY(18px);transition:opacity .22s ease,transform .28s cubic-bezier(.2,.8,.2,1);z-index:10}
.app.open{opacity:1;pointer-events:auto;transform:none}
.sh{flex:0 0 auto;display:flex;align-items:center;gap:4px;padding:6px 12px 8px 6px}
.sh .bk{flex:0 0 44px;height:44px;border-radius:50%;display:grid;place-items:center;color:var(--green);font-size:26px}
.sh .bk:active{background:var(--green-l)}
.sh .in{flex:1;position:relative}
.sh .in svg{position:absolute;left:15px;top:14px;color:var(--green);pointer-events:none}
.sh input{width:100%;height:50px;border:1.5px solid var(--green-line);border-radius:25px;background:var(--soft);padding:0 44px 0 46px;font-size:17px;outline:none;transition:.15s}
.sh input:focus{background:var(--bg);border-color:var(--green);box-shadow:0 0 0 4px var(--ring)}
.sh input::placeholder{color:var(--faint)}
.sh .clr{position:absolute;right:9px;top:10px;width:30px;height:30px;border-radius:50%;background:var(--green-l);color:var(--green-d);font-size:18px;line-height:28px}
.chips{flex:0 0 auto;display:flex;gap:8px;padding:2px 14px 10px;overflow-x:auto;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chips .chip{flex:0 0 auto}
.chip small{opacity:.7;margin-left:5px;font-size:12px}
.chips .sep{flex:0 0 1px;background:var(--line);margin:4px 2px}
.views{flex:1;position:relative;min-height:0}
.view{position:absolute;inset:0;display:none;flex-direction:column;background:var(--bg)}
.view.on{display:flex}
.meta{flex:0 0 auto;padding:2px 18px 8px;font-size:13px;color:var(--muted);display:flex;justify-content:space-between;align-items:center}
.meta b{color:var(--ink);font-weight:700}
.tlp{height:32px;padding:0 12px;border-radius:16px;background:var(--green-l);color:var(--green-d);font-size:12.5px;font-weight:700;display:inline-flex;gap:5px;align-items:center}
.list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;border-top:1px solid var(--line)}
.rec{display:flex;gap:8px;padding:12px 14px 4px;overflow-x:auto;scrollbar-width:none;align-items:center}
.rec::-webkit-scrollbar{display:none}
.rec small{flex:0 0 auto;font-size:12.5px;color:var(--muted);font-weight:600}
.rec .chip{height:34px;font-size:14px;flex:0 0 auto}
.row{display:flex;gap:10px;width:100%;text-align:left;padding:15px 16px;border-bottom:1px solid var(--line);align-items:flex-start;min-height:78px}
.row:active{background:var(--soft)}
.row .tx{flex:1;min-width:0}
.t1{font:700 17px/1.55 var(--head)}
.t1.ur{font:400 21px/2 "Noto Nastaliq Urdu"}
.t1.ro{font:600 16.5px/1.45 var(--ro)}
.t2{margin-top:2px;font-size:13.5px;color:var(--muted);line-height:1.5}
.t2.ur{font-size:17px;line-height:1.9}
.snip{margin-top:7px;padding:6px 10px;border-radius:10px;background:var(--soft);border:1px solid var(--line);font-size:14px;line-height:1.65;color:var(--ink2)}
.snip.ur{font-size:17px;line-height:1.95}
.tags{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.tags i{font-style:normal;background:var(--green-l);color:var(--green-d);border-radius:999px;padding:1px 10px;font-size:11.5px;font-weight:600}
.tags i.m{background:var(--soft2);color:var(--ink2);font-weight:500}
.chev{flex:0 0 auto;align-self:center;color:var(--faint);font-size:22px}
.more{display:block;width:calc(100% - 32px);margin:14px 16px 22px;height:48px;border-radius:12px;background:var(--green-l);color:var(--green-d);font-weight:700}
.empty{padding:54px 26px;text-align:center;color:var(--muted);line-height:1.9}
.empty b{display:block;font:800 19px var(--head);color:var(--ink)}
.tb{flex:0 0 auto;display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);background:var(--bg);padding:6px 8px calc(8px + env(safe-area-inset-bottom))}
.tb button{display:flex;flex-direction:column;align-items:center;gap:3px;height:52px;justify-content:center;color:var(--muted);font-size:12px;font-weight:600;border-radius:12px}
.tb button.on{color:var(--green)}
.tb svg{width:24px;height:24px}
.hd2{flex:0 0 auto;padding:14px 18px 6px;font:800 21px var(--head)}
.sec{padding:18px 18px 6px;font-weight:700;font-size:14px;color:var(--muted)}
.big{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:14px 18px;border-bottom:1px solid var(--line);min-height:66px}
.big b{flex:1;font-size:16.5px;font-weight:600}
.big small{display:block;color:var(--muted);font-size:13px;font-weight:400}
.big .c{font:700 15px Inter;color:var(--green)}
.big:active{background:var(--soft)}
/* the invitation to send a naat (the /submit page): the last thing in the Browse menu, a little highlighted */
.subm{display:flex;align-items:center;gap:14px;margin:28px 16px 24px;padding:13px 12px 13px 13px;border:1px solid var(--green-m);border-radius:18px;background:linear-gradient(135deg,var(--green-l),var(--soft2));color:var(--ink);text-decoration:none;box-shadow:0 1px 2px var(--sh1);-webkit-tap-highlight-color:transparent}
.subm-ic{flex:0 0 auto;display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:var(--green);color:var(--on-green)}
.subm-ic svg{width:22px;height:22px}
.subm-t{flex:1;min-width:0}
.subm-t b{display:block;font-size:16.5px;font-weight:700;line-height:1.3;color:var(--green-d)}
.subm-t small{display:block;margin-top:3px;font-size:12.5px;line-height:1.45;color:var(--muted)}
.subm .chev{color:var(--green)}
.subm:active{background:var(--green-l);border-color:var(--green)}
.tp{display:flex;flex-wrap:wrap;gap:8px;padding:4px 18px 14px}
.alpha{display:flex;flex-wrap:wrap;gap:8px;padding:6px 18px 24px}
.alpha button{width:46px;height:46px;border-radius:12px;background:var(--green-l);color:var(--green-d);font:700 16px Inter}
.alpha button:active{background:var(--green);color:var(--on-green)}

/* ---------- reader ---------- */
.reader{z-index:30;transform:translateX(104%);transition:transform .3s cubic-bezier(.2,.8,.2,1)}
.reader.open{transform:none}
.rtop{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:6px 10px;border-bottom:1px solid var(--line)}
.rtop .ib{width:44px;height:44px;border-radius:50%;font-size:24px;display:grid;place-items:center;color:var(--green)}
.rtop .ib:active{background:var(--green-l)}
.tags i.lt{background:var(--soft2);color:var(--ink2);font-weight:500}
.tags i.sm{background:transparent;border:1px dashed var(--green);color:var(--green-d)}
.fbn{flex:0 0 auto;margin:0 14px 4px;padding:8px 12px;border-radius:10px;background:var(--soft);border:1px dashed var(--green-line);color:var(--ink2);font-size:12.5px;line-height:1.6}
.rtop .ib{width:40px;height:40px}
.sz{flex:0 0 auto;display:flex;background:var(--soft2);border-radius:11px;padding:2px}
.sz button{width:36px;height:34px;border-radius:9px;font-weight:700;font-size:14px;color:var(--green-d)}
.sz button:active{background:var(--bg)}
.rtop .ib svg{width:21px;height:21px}
.scanpill{margin-top:10px;height:36px;padding:0 15px;border-radius:999px;border:1.5px solid var(--green);color:var(--green);font-weight:700;font-size:13.5px;display:inline-flex;gap:7px;align-items:center;background:var(--bg)}
.scanpill svg{width:17px;height:17px}
.scanpill:active{background:var(--green-l)}
.note .lnk{color:var(--green);font-weight:700;text-decoration:underline;text-underline-offset:3px}
.scanv{position:absolute;inset:0;z-index:40;display:flex;flex-direction:column;background:var(--bg);transform:translateY(104%);transition:transform .3s cubic-bezier(.2,.8,.2,1)}
.scanv.open{transform:none}
.sv-h{flex:0 0 auto;display:flex;align-items:center;gap:4px;padding:6px 8px;border-bottom:1px solid var(--line)}
.sv-h .ib2{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font-size:22px;color:var(--green)}
.sv-h .ib2:active{background:var(--green-l)}
.sv-h .ib2:disabled{opacity:.3}
.sv-h b{flex:1;text-align:center;font-size:14px;line-height:1.4}
.sv-body{flex:1;min-height:0;overflow:auto;background:var(--soft);padding:10px;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}
.sv-body img{display:block;width:var(--zw,100%);max-width:none;background:#fff;border-radius:4px;filter:var(--scan-filter);box-shadow:0 3px 14px var(--sh2)}
.sv-bar{flex:0 0 auto;display:flex;justify-content:center;align-items:center;gap:10px;padding:8px 10px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--bg)}
.sv-bar button{height:44px;min-width:60px;padding:0 18px;border-radius:12px;border:1px solid var(--line);font:700 20px/1 var(--ui);color:var(--green-d);background:var(--surface)}
.sv-bar button:active{background:var(--green-l)}
.sv-bar button:disabled{opacity:.3}
.sv-bar span{min-width:60px;text-align:center;font-size:12.5px;color:var(--muted)}
.mbar{flex:0 0 auto;display:flex;align-items:center;gap:8px;margin:0 14px 2px;padding:0 12px;height:38px;border-radius:10px;background:var(--soft);border:1px dashed var(--green-line);font-size:13px;color:var(--ink2);text-align:left}
.mbar svg{flex:0 0 auto;color:var(--green)}
.mbar span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mbar b{margin-left:auto;color:var(--green);font-weight:700;flex:0 0 auto}
.mbar.on{border-style:solid;background:var(--green-l);border-color:var(--green-m)}
.mbar:active{background:var(--green-l)}
.rtop .tt{flex:1;min-width:0;font:700 15px/1.4 var(--head);text-align:center}
.segw{flex:0 0 auto;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin:10px 14px 6px;background:var(--soft2);border-radius:14px;padding:4px}
.segw button{height:42px;border-radius:11px;font-size:15px;font-weight:600;color:var(--ink2)}
.segw button.u{font:500 19px/1.2 "Noto Nastaliq Urdu";padding:0 0 9px;display:grid;place-items:center}
.segw button.on{background:var(--seg-on);color:var(--green-d);box-shadow:0 1px 5px var(--sh3);font-weight:700}
.body{flex:1;min-height:0;overflow:auto;padding:6px 18px 24px;overscroll-behavior:contain}
.hdr{text-align:center;padding:14px 0 16px;border-bottom:1px solid var(--line);margin-bottom:4px}
.hdr .tags{justify-content:center;margin:0 0 10px}
.hdr .ur{font-size:calc(27px*var(--s));text-align:center;line-height:2.1}
.hdr .bn{font:800 calc(21px*var(--s))/1.55 var(--head)}
.hdr .ro{font:600 calc(19px*var(--s))/1.45 var(--ro)}
.hdr .sub{font-size:13.5px;color:var(--muted);margin-top:4px;line-height:1.6}
.sh2{position:relative;padding:12px 0;border-bottom:1px solid var(--line)}
.sh2 .no{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--green-l);color:var(--green-d);font-size:12px;font-weight:700;margin-bottom:4px}
.ln{padding:1px 8px;margin:0 -8px;border-radius:10px}
.ln.hit{background:var(--green-l);box-shadow:inset 3px 0 0 var(--green)}
.ln.ur{font-size:calc(25px*var(--s));text-align:center;line-height:2.2}
.ln.bn{font-size:calc(19px*var(--s));line-height:1.95}
.ln.ro{font:400 calc(17.5px*var(--s))/1.85 var(--ro)}
.ln.tri{text-align:center;padding:4px 8px}
.ln.tri .ur{font-size:calc(25px*var(--s));text-align:center;line-height:2.1}
.ln.tri .bn{font-size:calc(17.5px*var(--s));color:var(--green-d);font-weight:500;line-height:1.7}
.ln.tri .ro{font:400 calc(15px*var(--s))/1.6 var(--ro);color:var(--muted)}
.ln.tri+.ln.tri{border-top:1px dashed var(--green-m);margin-top:4px;padding-top:8px}
.note{margin-top:20px;font-size:12.5px;line-height:1.75;color:var(--muted);background:var(--soft);border:1px solid var(--line);padding:12px 14px;border-radius:12px}
.note a{color:var(--green);font-weight:700}
.rbar{flex:0 0 auto;display:grid;grid-template-columns:repeat(5,1fr);gap:2px;border-top:1px solid var(--line);padding:6px 10px calc(8px + env(safe-area-inset-bottom));background:var(--bg)}
.rbar button{height:50px;border-radius:12px;font-size:12px;font-weight:600;color:var(--ink2);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.rbar button b{font-size:19px;line-height:1;color:var(--green)}
.rbar button svg{width:22px;height:22px;color:var(--green)}
.rbar button:active{background:var(--green-l)}
.rbar button.on b{color:var(--heart)}
.rbar button:disabled{opacity:.3}
.toast{position:absolute;left:50%;bottom:90px;transform:translate(-50%,12px);background:var(--ink);color:var(--bg);padding:10px 18px;border-radius:999px;font-size:14px;opacity:0;pointer-events:none;transition:.2s;z-index:60;white-space:nowrap}
.toast.on{opacity:1;transform:translate(-50%,0)}
