/* ── Qibla: the compass (also used on the city prayer pages) and /اتجاه-القبلة/ ── */
:root { --qb-card: #fff; --qb-soft: #f4f9fd; --qb-ok: #13a26b; --qb-gold: #c9a227; }
body.dark { --qb-card: #1c1c1e; --qb-soft: #232327; --qb-ok: #3fd69a; --qb-gold: #e6c04f; }

.qb-compass { width: 100%; max-width: 300px; aspect-ratio: 1; display: block; margin: 0 auto; overflow: visible; }
.qb-dial { transition: transform .25s ease-out; }
.qb-ring { fill: var(--qb-card); stroke: var(--separator); stroke-width: 2; }
.qb-ticks line { stroke: var(--text-sec); stroke-width: 1.2; opacity: .55; }
.qb-ticks .qb-tick-l { stroke-width: 2.4; opacity: .9; }
.qb-compass text { font: 700 15px -apple-system, 'Segoe UI', Tahoma, sans-serif; text-anchor: middle; fill: var(--text-sec); }
.qb-compass .qb-n { fill: #e0483e; font-size: 17px; }
.qb-arrow { fill: var(--blue-dark, #0d88c4); }
.qb-hub { fill: var(--qb-card); stroke: var(--blue-dark, #0d88c4); stroke-width: 3; }
.qb-kaaba { fill: #111; }
.qb-band { fill: var(--qb-gold); }
body.dark .qb-kaaba { fill: #000; stroke: #555; stroke-width: 1; }
.qb-top { fill: var(--page-text); }

/* page */
.qb-wrap { max-width: 860px; margin: 0 auto; padding: 18px 16px 50px; display: grid; gap: 24px; color: var(--page-text); }
.qb-crumbs { font-size: 13px; color: var(--text-sec); display: flex; gap: 6px; flex-wrap: wrap; }
.qb-crumbs a { color: var(--blue-darker); text-decoration: none; }
body.dark .qb-crumbs a { color: var(--blue); }
.qb-head { text-align: center; }
.qb-head h1 { font-family: var(--font-quran); font-size: clamp(26px, 5vw, 38px); line-height: 1.4; }
.qb-head p { color: var(--text-sec); margin-top: 6px; line-height: 1.8; }

.qb-tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: center; background: var(--qb-card); border: 1px solid var(--separator); border-radius: 24px; padding: 22px; box-shadow: 0 12px 34px rgba(13,136,196,.1); transition: box-shadow .3s, border-color .3s; }
.qb-tool.is-aligned { border-color: var(--qb-ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--qb-ok) 25%, transparent), 0 12px 34px rgba(19,162,107,.2); }
.qb-tool.is-aligned .qb-arrow { fill: var(--qb-ok); }
.qb-tool.is-aligned .qb-hub { stroke: var(--qb-ok); }
.qb-stage { display: grid; gap: 10px; justify-items: center; }
.qb-aligned { color: var(--qb-ok); font-weight: 800; font-size: 18px; }
.qb-info { display: grid; gap: 10px; text-align: center; }
.qb-place { font-weight: 700; color: var(--text-sec); }
.qb-angle { display: grid; gap: 2px; }
.qb-angle b { font-size: clamp(40px, 9vw, 58px); line-height: 1.1; color: var(--blue-darker); font-variant-numeric: tabular-nums; direction: ltr; }
body.dark .qb-angle b { color: var(--blue); }
.qb-angle span { color: var(--text-sec); }
.qb-dist { font-size: 15px; }
.qb-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.qb-btn { font: 700 16px inherit; font-family: inherit; border-radius: 99px; padding: 11px 20px; cursor: pointer; border: 1.5px solid var(--blue-border, var(--separator)); background: var(--blue-bg); color: var(--blue-darker); }
body.dark .qb-btn { color: var(--blue); }
.qb-btn-main { background: linear-gradient(135deg, #2aa8ff, #0a74f0); color: #fff !important; border-color: transparent; box-shadow: 0 6px 18px rgba(10,116,240,.3); }
.qb-pick { display: grid; gap: 6px; text-align: start; }
.qb-pick > label { font-size: 13px; font-weight: 700; color: var(--text-sec); }
.qb-combo { position: relative; }
.qb-combo input { font: 600 16px inherit; font-family: inherit; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--separator); background: var(--qb-card); color: var(--page-text); width: 100%; }
.qb-combo input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-glow); }
.qb-list { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto;
  background: var(--qb-card); border: 1px solid var(--separator); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.14); }
.qb-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.qb-list li b { font-size: 16px; }
.qb-list li span { font-size: 12.5px; color: var(--text-sec); text-align: end; }
.qb-list li[aria-selected] { background: var(--blue-bg); }
.qb-list li[aria-selected] b { color: var(--blue-darker); }
body.dark .qb-list li[aria-selected] b { color: var(--blue); }
.qb-list .qb-none { cursor: default; color: var(--text-sec); font-size: 14px; line-height: 1.7; }
.qb-citylink { font-size: 14px; font-weight: 700; color: var(--blue-darker); text-decoration: none; }
body.dark .qb-citylink { color: var(--blue); }
.qb-msg { font-size: 14px; color: var(--text-sec); min-height: 1.4em; line-height: 1.7; }

.qb-section { display: grid; gap: 10px; }
.qb-section h2 { font-family: var(--font-quran); font-size: 24px; }
.qb-section > p { line-height: 1.9; color: var(--text-sec); }
.qb-steps, .qb-sun { display: grid; gap: 8px; padding-inline-start: 22px; line-height: 1.9; }
.qb-local { color: var(--text-sec); font-size: 14px; }
.qb-note { font-size: 14px; color: var(--text-sec); background: var(--qb-soft); border-radius: 12px; padding: 10px 14px; line-height: 1.8; }
.qb-table { overflow-x: auto; border: 1px solid var(--separator); border-radius: 14px; background: var(--qb-card); max-height: 560px; overflow-y: auto; }
.qb-table table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
.qb-table th { position: sticky; top: 0; background: var(--qb-soft); font-size: 13px; color: var(--text-sec); padding: 10px 12px; text-align: start; }
.qb-table td { padding: 9px 12px; border-top: 1px solid var(--separator); font-variant-numeric: tabular-nums; }
.qb-table td small { color: var(--text-sec); font-size: 12px; }
.qb-table a, .qb-more a { color: var(--blue-darker); font-weight: 700; text-decoration: none; }
body.dark .qb-table a, body.dark .qb-more a { color: var(--blue); }
.qb-faq details { background: var(--qb-card); border: 1px solid var(--separator); border-radius: 12px; padding: 0 14px; }
.qb-faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.qb-faq details p { padding-bottom: 12px; line-height: 1.85; color: var(--text-sec); }
.qb-more ul { display: grid; gap: 6px; padding-inline-start: 18px; }

@media (max-width: 640px) {
  .qb-tool { grid-template-columns: 1fr; padding: 18px 14px; }
  .qb-compass { max-width: 260px; }
}
