/* Axis theme: qibla page as a PrayerAxis reference card. The head holds the bearing as a large figure with the facts and the
   live compass beside it, then a ruled bearing register for the region, the how-to rows, the map and the guide as chapters. */
.qb-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:28px;align-items:start}
.qb-hero .day-meta svg{flex:0 0 auto}
.qb-read{margin:18px 0 0;padding:14px 0 0;border-top:1px solid var(--line)}
.qb-deg{margin:0;font:500 72px/1 "Roboto",var(--font);color:var(--primary);letter-spacing:-.01em;text-align:start}
[dir=rtl] .qb-deg{text-align:right}
.qb-deg-u{font-size:.5em;vertical-align:top;margin-inline-start:2px}
.qb-deg-sub{margin:6px 0 0;color:var(--muted);font-size:15px}
.qb-mecca{margin-top:10px}
.qb-facts{margin-top:16px}
.qb-facts > div{grid-template-columns:180px minmax(0,1fr)}
.qb-facts dd{font:500 16px "Roboto",var(--font)}
[dir=rtl] .qb-facts dd[dir=ltr]{text-align:right}
.qb-rec{margin-top:16px}
.qb-find{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.qb-search{position:relative;display:flex;align-items:center;gap:8px;height:44px;flex:1 1 240px;min-width:0;padding:0 14px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--muted)}
.qb-search:focus-within{border-color:var(--focus);box-shadow:0 0 0 1px var(--focus)}
.qb-search input{flex:1;border:0;outline:0;background:transparent;color:var(--text);font:450 16px var(--font);min-width:0}
.qb-drop{position:absolute;inset-inline:0;top:calc(100% + 6px);background:var(--menu);border-radius:12px;border:1px solid var(--line);box-shadow:0 8px 24px rgba(0,0,0,.16);padding:6px 0;z-index:30;max-height:50vh;overflow-y:auto}
.qb-drop button{display:flex;flex-direction:column;align-items:flex-start;width:100%;border:0;background:transparent;color:var(--text);padding:10px 18px;font:inherit;text-align:start;cursor:pointer}
.qb-drop button:hover,.qb-drop button:focus{background:color-mix(in srgb,var(--text) 8%,transparent)}
.qb-drop button:focus-visible{outline:2px solid var(--focus);outline-offset:-2px;border-radius:0}
.qb-drop small{color:var(--muted);font-size:13px}
.qb-drop p{margin:0;padding:10px 18px;color:var(--muted)}
.qb-find .btn{display:inline-flex;align-items:center;gap:8px}
.qb-msg{margin:8px 0 0;min-height:1px;color:var(--red);font-size:15px}
.qb-msg:empty{display:none}
.qb-desc{margin-top:18px;padding-top:14px;border-top:1px solid var(--line);max-width:none}

/* compass: the dial turns with the phone, the needle keeps the qibla angle on the dial, the top mark is where the phone points */
.qb-card{display:flex;flex-direction:column;padding:16px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
.qb-card h2{margin:0;font-size:14px;font-weight:500;color:var(--muted)}
.qb-compass{position:relative;width:min(260px,100%);aspect-ratio:1/1;margin:22px auto 0}
.qb-dial{position:absolute;inset:0;transition:transform .2s ease-out;will-change:transform}
.qb-dial svg{display:block;width:100%;height:100%}
.qb-mark{position:absolute;top:-14px;left:50%;transform:translateX(-50%);z-index:2}
.qb-mark path{fill:var(--muted)}
.qb-ring{fill:var(--bg);stroke:var(--line);stroke-width:1.5}
.qb-tick{stroke:var(--muted);stroke-width:1.2;stroke-linecap:round}
.qb-tick-major{stroke:var(--text);stroke-width:2}
.qb-letter{fill:var(--muted);font:600 15px "Roboto",var(--font);text-anchor:middle;dominant-baseline:central}
.qb-letter-n{fill:var(--red)}
.qb-needle{fill:var(--primary)}
.qb-tail{fill:var(--line)}
.qb-kaaba{fill:var(--text)}
.qb-kaaba-band{fill:var(--amber)}
.qb-hub{fill:var(--bg);stroke:var(--text);stroke-width:2}
.qb-on .qb-needle,.qb-on .qb-mark path{fill:var(--green)}
.qb-on .qb-ring{stroke:var(--green);stroke-width:3}
.qb-hint{text-align:center;margin:14px 0 0;font-size:14px;font-weight:500;color:var(--muted);min-height:24px;line-height:1.6}
.qb-on .qb-hint{color:var(--green)}
.qb-sensor{align-self:center;margin-top:10px;display:inline-flex;align-items:center;gap:8px}

/* bearing register */
.qb-table .qb-zone th{background:var(--surface);color:var(--primary);font-size:13px;font-weight:500;padding-top:8px;padding-bottom:8px}
.qb-table tbody tr.qb-zone:nth-child(even){background:transparent}
.qb-table .hb-num .hb-sub{text-align:end}

/* map chapter */
.qb-map{position:relative;height:420px;border-radius:14px;overflow:hidden;background:var(--surface);z-index:0;border:1px solid var(--line)}
.qb-map-note{position:absolute;inset:0;display:grid;place-items:center;margin:0;color:var(--muted);font-size:15px;padding:16px;text-align:center}
.qb-map .leaflet-container{font:inherit}
/* the map keeps its own stacking layer, so its panes never cover the sticky top bar */
.leaflet-container{isolation:isolate;z-index:0}

/* guide chapters */
.qb .hb-idx > li{grid-template-columns:40px minmax(0,1fr)}
.qb .hb-idx-d{margin:0;color:var(--text);font-size:15px}
.qb-faq{border-top:1px solid var(--line)}
.qb-faq details{border-bottom:1px solid var(--line)}
.qb-faq summary{cursor:pointer;padding:12px 4px;font-weight:500;color:var(--text);line-height:1.6}
.qb-faq summary:hover{color:var(--primary)}
.qb-faq details p{margin:0;padding:0 4px 14px;color:var(--muted);line-height:1.8}

@media (max-width:900px){
  .qb-hero-grid{grid-template-columns:minmax(0,1fr)}
  .qb-card{max-width:360px;width:100%;justify-self:center}
  .qb-map{height:320px}
}
@media (max-width:640px){
  .qb-deg{font-size:56px}
  .qb-facts > div{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){.qb-dial{transition:none}}
