/* ============================================================
   AL-HARAMEEN — home-plus.css (innovation round, Oct 2026)
   Three homepage components:
   1. .hp-tools  — the entry band to the new tools (static)
   2. .hp-dial-* — «يومك بين الصلوات», the 24-hour day dial (day-dial.js)
   3. .hp-wave   — «الأذان يطوف الأرض», the live world map (adhan-wave.js)
   Every block JS fills has its box reserved here (aspect-ratio / fixed heights):
   nothing moves when data arrives (CLS).
   ============================================================ */

.hp-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* times: digits never reorder; the 12-hour period sits where prayer-core puts it */
.hp-t { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hp-t .ap { font-size: .72em; font-weight: 600; opacity: .8; }
/* these sections sit inside the page's outer .wrap: no second gutter */
.wrap .hp-sec > .wrap { padding-inline: 0; }
.hp-sec .section-head { margin-bottom: 22px; }

/* ---------- 0. the hero's 12h | 24h control (review fix, 12 Oct 2026) ----------
   home.js adds the control under the big clock only once the city has loaded, and
   on wide screens that pushed the prayer row, the note and the featured strip
   24 px down (CLS 0.008–0.017 at 1280 px in every language). Its room is kept
   from the first paint, and released the moment the control is there. */
.panel-cell:has(#clockHM):not(:has(.fmt-toggle))::after { content: ""; display: block; height: 50px; }
@media (pointer: coarse) { .panel-cell:has(#clockHM):not(:has(.fmt-toggle))::after { height: 58px; } }

/* ---------- 1. tools band ---------- */
.hp-tools {
  position: relative; overflow: hidden; text-align: start;
  margin-top: 26px; padding: 22px 22px 20px; border-radius: 20px;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--panel) 72%);
  border: 1px solid var(--panel-line); color: var(--panel-ink); box-shadow: var(--shadow-lg);
}
.hp-tools::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23E8D493' stroke-opacity='.075' stroke-width='1'%3E%3Crect x='18' y='18' width='28' height='28'/%3E%3Crect x='18' y='18' width='28' height='28' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3Cpath d='M0 32h8M56 32h8M32 0v8M32 56v8'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 75%);
  mask-image: linear-gradient(100deg, #000 0%, transparent 75%);
}
html[dir="rtl"] .hp-tools::before { -webkit-mask-image: linear-gradient(260deg, #000 0%, transparent 75%); mask-image: linear-gradient(260deg, #000 0%, transparent 75%); }
.hp-tools::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 200px at 50% -40px, rgba(232,212,147,.13), transparent 70%);
}
.hp-tools-head { position: relative; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hp-badge {
  display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: 12px; line-height: 1;
  padding: 6px 11px 7px; border-radius: 999px; color: var(--green-950);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
}
.hp-tools-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(19px, 2.2vw, 23px); color: #fff; line-height: 1.3; }
.hp-tools-sub { flex-basis: 100%; color: var(--panel-soft); font-size: 14px; margin-top: -4px; }
.hp-tools-grid { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.hp-tool {
  display: flex; flex-direction: column; gap: 6px; min-height: 158px;
  padding: 16px 14px 13px; border-radius: 15px; color: inherit;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.085);
  transition: background .18s, border-color .18s, transform .18s;
}
.hp-tool:hover { background: rgba(255,255,255,.085); border-color: rgba(232,212,147,.55); transform: translateY(-2px); }
.hp-tool:focus-visible { outline: 2.5px solid var(--gold-300); outline-offset: 2px; }
.hp-tool-ic {
  flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  color: var(--gold-300); border: 1px solid rgba(232,212,147,.28);
  background: linear-gradient(145deg, rgba(232,212,147,.20), rgba(201,165,68,.05));
}
.hp-tool-ic svg { width: 24px; height: 24px; }
.hp-tool-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hp-tool-t { font-family: var(--font-head); font-weight: 800; font-size: 16.5px; color: #fff; line-height: 1.35; margin-top: 4px; }
.hp-tool-d { font-size: 13.5px; color: var(--panel-soft); line-height: 1.55; }
/* one glyph (→) on every page; right-to-left pages (ar, ur, ps) mirror it */
.hp-tool-go { align-self: flex-start; margin-top: auto; color: var(--gold-300); font-family: var(--font-head); font-weight: 800; font-size: 15px; line-height: 1; transition: transform .18s; }
.hp-tool:hover .hp-tool-go { transform: translateX(4px); }
html[dir="rtl"] .hp-tool-go { transform: scaleX(-1); }
html[dir="rtl"] .hp-tool:hover .hp-tool-go { transform: scaleX(-1) translateX(4px); }
@media (max-width: 1000px) {
  .hp-tools-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hp-tool { grid-column: span 2; min-height: 140px; }
  .hp-tool:nth-child(4), .hp-tool:nth-child(5) { grid-column: span 3; }
}
@media (max-width: 640px) {
  .hp-tools { padding: 18px 14px 14px; border-radius: 18px; }
  .hp-tools-grid { grid-template-columns: 1fr; gap: 8px; }
  .hp-tool, .hp-tool:nth-child(4), .hp-tool:nth-child(5) { grid-column: auto; }
  .hp-tool { flex-direction: row; align-items: center; gap: 12px; min-height: 0; padding: 12px; }
  .hp-tool-ic { width: 42px; height: 42px; }
  .hp-tool-t { margin-top: 0; font-size: 15.5px; }
  .hp-tool-d { font-size: 13px; }
  .hp-tool-go { margin-top: 0; margin-inline-start: auto; align-self: center; }
}

/* ---------- 2. the day dial ---------- */
.hp-dial-sec {
  --hp-dawn: #9483E6; --hp-morning: #F1D47E; --hp-noon: #DDB23F;
  --hp-asrseg: #E98F4C; --hp-dusk: #C95C84; --hp-night: #36588F;
}
.hp-dial-card {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 24px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 18px; box-shadow: var(--shadow-sm);
}
.hp-dial-box {
  position: relative; aspect-ratio: 460 / 400; border-radius: 18px; overflow: hidden;
  container-type: inline-size; color: var(--panel-ink);
  background:
    radial-gradient(circle at 50% 50%, rgba(232,212,147,.07) 0 27%, transparent 27.2%),
    radial-gradient(120% 100% at 50% 0%, #17382A 0%, var(--panel) 62%);
  border: 1px solid var(--panel-line);
}
.hp-dial-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hp-dial-ticks line { stroke: rgba(236,243,237,.28); stroke-width: 1.2; stroke-linecap: round; }
.hp-dial-ticks line.mj { stroke: rgba(232,212,147,.75); stroke-width: 2; }
.hp-dial-track { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 20; }
.hp-arc { fill: none; stroke-width: 18; stroke-linecap: butt; }
.hp-a-dawn { stroke: var(--hp-dawn); } .hp-a-morning { stroke: var(--hp-morning); } .hp-a-noon { stroke: var(--hp-noon); }
.hp-a-asrseg { stroke: var(--hp-asrseg); } .hp-a-dusk { stroke: var(--hp-dusk); } .hp-a-night { stroke: var(--hp-night); }
.hp-dial-progress { fill: none; stroke: var(--live); stroke-width: 3; stroke-linecap: round; opacity: .9; }
.hp-mk { fill: #fff; stroke: var(--panel); stroke-width: 2.4; }
.hp-mk.is-next { fill: var(--live); }
.hp-mk-night { fill: var(--gold-300); stroke: var(--panel); stroke-width: 1.6; }
.hp-lead { stroke: rgba(236,243,237,.22); stroke-width: 1; }
.hp-dial-hand line { stroke: #fff; stroke-width: 2.2; stroke-linecap: round; opacity: .9; }
.hp-sun-g .halo, .hp-moon-g .halo { fill: var(--panel); stroke: rgba(255,255,255,.18); stroke-width: 1; }
.hp-sun-g .core { fill: #FFD45C; }
.hp-sun-g .rays { stroke: #FFD45C; stroke-width: 1.8; stroke-linecap: round; }
.hp-moon-g .core { fill: #EDE7C8; }
.hp-dial-icons { fill: rgba(232,212,147,.5); }
.hp-dial-icons .ray { fill: none; stroke: rgba(232,212,147,.5); stroke-width: 1.4; stroke-linecap: round; }
.hp-dial-labels { position: absolute; inset: 0; pointer-events: none; }
.hp-dl {
  position: absolute; display: flex; flex-direction: column; align-items: center;
  padding: 2px 5px; line-height: 1.15; white-space: nowrap; text-align: center;
}
.hp-dl-n { font-size: clamp(10.5px, 2.5cqw, 13px); color: var(--panel-soft); font-weight: 700; }
.hp-dl-t { font-family: var(--font-head); font-weight: 700; font-size: clamp(12px, 3cqw, 16px); color: #fff; }
.hp-dl.is-night .hp-dl-n, .hp-dl.is-night .hp-dl-t { color: var(--gold-300); }
.hp-dl.is-next .hp-dl-n, .hp-dl.is-next .hp-dl-t { color: var(--live); }
.hp-dial-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 36cqw; text-align: center; line-height: 1.25;
}
.hp-dc-k { font-size: clamp(10px, 2.4cqw, 13px); color: var(--panel-soft); font-weight: 700; letter-spacing: .02em; }
.hp-dc-name { font-family: var(--font-head); font-weight: 800; font-size: clamp(17px, 5.4cqw, 28px); color: #fff; line-height: 1.25; }
.hp-dc-cd { font-family: var(--font-head); font-weight: 700; font-size: clamp(12px, 3.3cqw, 17px); color: var(--live); min-height: 1.25em; }
.hp-dc-lens { margin-top: 1.4cqw; padding-top: 1.2cqw; border-top: 1px solid rgba(255,255,255,.1); }
.hp-dc-len { font-size: clamp(10px, 2.35cqw, 12.5px); color: var(--panel-soft); white-space: nowrap; }
.hp-dc-len b { color: var(--panel-ink); font-weight: 700; }

.hp-dial-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hp-dial-city { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hp-dial-city > div { flex: 1; min-width: 0; }
.hp-dial-cityname { font-family: var(--font-head); font-weight: 800; font-size: 21px; color: var(--green-900); line-height: 1.35; min-height: 1.35em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-dial-date { font-size: 13.5px; color: var(--ink-faint); min-height: 1.6em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-dial-change { padding: 8px 14px; font-size: 13.5px; border-radius: 999px; }
.hp-nights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-nc {
  border-radius: 14px; padding: 12px 14px; color: var(--panel-ink);
  background: linear-gradient(150deg, var(--panel-2), var(--panel)); border: 1px solid var(--panel-line);
}
.hp-nc-k { font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--gold-300); }
.hp-nc-t { display: block; font-family: var(--font-head); font-weight: 800; font-size: 25px; line-height: 1.25; color: #fff; text-align: start; }
html[dir="rtl"] .hp-nc-t { text-align: right; }
.hp-nc p { font-size: 12.5px; color: var(--panel-soft); line-height: 1.5; margin-top: 2px; }
.hp-segs { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.hp-segs li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; min-width: 0; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.hp-segs li > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hp-segs li b { font-weight: 700; color: var(--ink); font-size: 12.5px; }
.hp-sw { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.hp-sw.dawn { background: var(--hp-dawn); } .hp-sw.morning { background: var(--hp-morning); } .hp-sw.noon { background: var(--hp-noon); }
.hp-sw.asrseg { background: var(--hp-asrseg); } .hp-sw.dusk { background: var(--hp-dusk); } .hp-sw.night { background: var(--hp-night); }
.hp-note { font-size: 12.5px; color: var(--ink-faint); line-height: 1.6; }
.hp-link { font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--green-700); align-self: flex-start; }
.hp-link:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .hp-dial-card { grid-template-columns: 1fr; gap: 16px; padding: 12px; }
}
@media (max-width: 420px) {
  .hp-dial-card { padding: 8px 8px 14px; border-radius: 18px; }
  .hp-dial-side { padding: 0 6px; }
  .hp-segs { grid-template-columns: 1fr; }
  .hp-nc { padding: 10px 12px; }
  .hp-nc-t { font-size: 22px; }
}

/* ---------- 3. the adhan wave map ---------- */
.hp-wave {
  --hp-fajr: #B3A6FF; --hp-sunrise: #FFB65C; --hp-dhuhr: #F6E7A6;
  --hp-asr: #62D895; --hp-maghrib: #FF8466; --hp-isha: #74BDFF;
}
.hp-map-box { position: relative; }
.hp-map-frame {
  direction: ltr; border-radius: 20px; overflow: hidden; position: relative;
  border: 1px solid var(--panel-line); box-shadow: var(--shadow-lg); background: #0A1D14;
}
.hp-map-frame:focus-visible { outline: 2.5px solid var(--green-600); outline-offset: 3px; }
.hp-map-stage {
  position: relative; width: 100%; aspect-ratio: 2 / 1; cursor: default; touch-action: pan-x pan-y;
  background: radial-gradient(140% 120% at 50% 0%, #0E2C1E 0%, #0A1D14 60%, #081710 100%);
}
.hp-map-stage.is-pointing { cursor: pointer; }
.hp-map-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hp-grat { fill: none; stroke: rgba(236,243,237,.055); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hp-grat .eq { stroke: rgba(232,212,147,.16); }
.hp-grat .tr { stroke: rgba(232,212,147,.09); stroke-dasharray: 3 5; }
.hp-land { fill: #234A33; stroke: #36694C; stroke-width: .7; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.hp-night path { fill: #00050A; fill-opacity: .23; }
.hp-line { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.hp-c-fajr { stroke: var(--hp-fajr); } .hp-c-sunrise { stroke: var(--hp-sunrise); } .hp-c-dhuhr { stroke: var(--hp-dhuhr); }
.hp-c-asr { stroke: var(--hp-asr); } .hp-c-maghrib { stroke: var(--hp-maghrib); } .hp-c-isha { stroke: var(--hp-isha); }
.hp-map-glow { pointer-events: none; filter: blur(3px); opacity: .5; will-change: opacity; animation: hp-breathe 4.6s ease-in-out infinite; }
.hp-map-glow path { fill: none; stroke-width: 9; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
@keyframes hp-breathe { 0%, 100% { opacity: .22; } 50% { opacity: .72; } }
.hp-map-dots, .hp-map-chips { position: absolute; inset: 0; pointer-events: none; }
.hp-dot {
  position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--gold-300); box-shadow: 0 0 0 1.5px rgba(5,22,14,.9); transition: transform .15s;
}
.hp-dot.is-makkah { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #fff; box-shadow: 0 0 0 2px var(--gold-500), 0 0 12px 2px rgba(232,212,147,.55); }
.hp-dot.is-live { background: var(--c, var(--live)); z-index: 2; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
.hp-dot.is-live::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--c, var(--live));
  animation: hp-pulse 1.9s cubic-bezier(.2,.6,.3,1) infinite; will-change: transform, opacity;
}
@keyframes hp-pulse { 0% { transform: scale(.45); opacity: 1; } 100% { transform: scale(2.1); opacity: 0; } }
.hp-dot.is-hover, .hp-dot.is-open { transform: scale(1.7); z-index: 3; }
.hp-dot.is-open { box-shadow: 0 0 0 1.5px rgba(5,22,14,.9), 0 0 0 4px rgba(255,255,255,.55); }
.hp-sun {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, #FFF8D6 0 26%, #FFD45C 28% 46%, rgba(255,212,92,.35) 50%, rgba(255,212,92,0) 72%);
}
.hp-tip {
  position: absolute; z-index: 4; transform: translate(-50%, calc(-100% - 11px));
  background: rgba(6,20,13,.94); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.3;
  padding: 3px 9px 4px; border-radius: 8px; white-space: nowrap; border: 1px solid rgba(255,255,255,.12);
}
.hp-chip {
  position: absolute; z-index: 2; font-family: var(--font-head); font-weight: 800; font-size: 12px; line-height: 1;
  padding: 5px 9px 6px; border-radius: 999px; color: #0A1A11; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.25);
}
.hp-chip[hidden] { display: none; }
.hp-bg-fajr { background: var(--hp-fajr); } .hp-bg-sunrise { background: var(--hp-sunrise); } .hp-bg-dhuhr { background: var(--hp-dhuhr); }
.hp-bg-asr { background: var(--hp-asr); } .hp-bg-maghrib { background: var(--hp-maghrib); } .hp-bg-isha { background: var(--hp-isha); }
.hp-map-status { position: absolute; inset: 0; display: grid; place-items: center; color: var(--panel-soft); font-size: 14px; pointer-events: none; }
.hp-wave:not(.is-ready) .hp-map-chips { visibility: hidden; }
.hp-wave.is-offscreen .hp-map-glow, .hp-wave.is-offscreen .hp-dot.is-live::after { animation-play-state: paused; }

/* the ~1,000 small city dots (canvas, drawn by adhan-wave.js every 2.5 s) */
.hp-map-cv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* the live ticker: a crawl of every adhan of the last 3 minutes, then the coming
   ones. Its height is fixed by CSS alone (also for the still, reduced-motion
   list), so nothing it shows can ever move the page. */
.hp-ticker {
  position: relative; display: flex; align-items: stretch; margin-top: 12px; height: 54px;
  border-radius: 14px; overflow: hidden; color: var(--panel-ink);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--panel-line); box-shadow: var(--shadow-sm);
}
.hp-tk-btn {
  flex: none; width: 46px; border: none; border-inline-end: 1px solid var(--panel-line); cursor: pointer;
  background: rgba(255,255,255,.04); color: var(--gold-300); display: grid; place-items: center;
}
.hp-tk-btn:hover { background: rgba(255,255,255,.1); }
.hp-tk-btn:focus-visible { outline: 2.5px solid var(--gold-300); outline-offset: -5px; }
.hp-tk-btn svg { width: 15px; height: 15px; fill: currentColor; }
.hp-tk-btn .i-play, .hp-ticker.is-paused .hp-tk-btn .i-pause { display: none; }
.hp-ticker.is-paused .hp-tk-btn .i-play { display: block; }
.hp-tk-view {
  position: relative; flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}
.hp-tk-track {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 0; display: flex; align-items: center;
  white-space: nowrap; will-change: transform;
}
.hp-tk-item {
  flex: none; position: relative; display: block; white-space: nowrap; line-height: 1.3;
  padding-inline: 14px 24px; font-family: var(--font-head); font-weight: 700; font-size: 14.5px; color: var(--panel-ink);
}
/* the separator: a small gold lozenge, drawn, never read aloud */
.hp-tk-item::after {
  content: ""; position: absolute; inset-inline-end: 8px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
  background: var(--gold-500); opacity: .75; transform: rotate(45deg);
}
.hp-tk-item.is-lead { color: var(--live); font-weight: 800; padding-inline-end: 6px; }
.hp-tk-item.is-lead::after, .hp-tk-item.is-note::after { display: none; }
.hp-tk-item.is-soon { color: var(--panel-soft); font-weight: 600; }
.hp-tk-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: .08em;
  margin-inline-end: 7px; background: var(--c); box-shadow: 0 0 0 3px rgba(255,255,255,.07);
}
.hp-tk-item.is-now .hp-tk-dot { box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 0 10px 1px var(--c); }
.hp-tk-city { color: #fff; }
.hp-tk-item.is-soon .hp-tk-city { color: var(--panel-ink); }
a.hp-tk-city { color: var(--gold-300); text-decoration: underline; text-decoration-color: rgba(232,212,147,.35); text-underline-offset: 3px; }
a.hp-tk-city:hover { text-decoration-color: currentColor; }
a.hp-tk-city:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 2px; border-radius: 3px; }
.hp-tk-m { display: inline-block; min-width: 2ch; text-align: center; color: var(--live); font-variant-numeric: tabular-nums; }
.hp-tk-more { color: var(--panel-soft); }
/* the still list (reduced motion): wrapped, cut to its box with "+N" */
.hp-ticker.is-static .hp-tk-view { -webkit-mask-image: none; mask-image: none; }
.hp-ticker.is-static .hp-tk-track { position: static; height: 100%; flex-wrap: wrap; align-content: center; row-gap: 3px; padding: 4px 6px; white-space: normal; }
.hp-ticker.is-static .hp-tk-item { white-space: normal; font-size: 14px; }
/* an item longer than the line wraps inside it instead of running out of the box
   (review, 12 Oct 2026: Russian at 375 px was cut at the right edge) */
.hp-ticker.is-static .hp-tk-item { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.hp-tk-cap { font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; text-align: center; text-wrap: balance; }
.hp-credit { font-size: 12px; color: var(--ink-faint); line-height: 1.6; }
.hp-credit-link { font-size: 12px; font-weight: 700; color: var(--green-700); align-self: flex-start; margin-top: -6px; }
.hp-credit-link:hover { text-decoration: underline; }
.hp-wave-foot { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px 26px; margin-top: 16px; align-items: start; }
.hp-legend { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
.hp-legend li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-soft); line-height: 1.45; min-width: 0; }
.hp-legend li b { display: block; font-family: var(--font-head); color: var(--ink); font-size: 13.5px; }
/* the swatch is a tiny piece of the map: the line's own colour on the map's own ground */
.hp-legend i { flex: none; width: 26px; height: 14px; border-radius: 5px; margin-top: 4px; background: linear-gradient(var(--c), var(--c)) center / 18px 3px no-repeat, var(--panel); }
.hp-legend .fajr { --c: var(--hp-fajr); } .hp-legend .sunrise { --c: var(--hp-sunrise); } .hp-legend .dhuhr { --c: var(--hp-dhuhr); }
.hp-legend .asr { --c: var(--hp-asr); } .hp-legend .maghrib { --c: var(--hp-maghrib); } .hp-legend .isha { --c: var(--hp-isha); }
.hp-wave-side { display: flex; flex-direction: column; gap: 10px; }
.hp-city-pick { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--green-900); }
.hp-city-select {
  width: 100%; font-family: var(--font-body); font-size: 15.5px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 12px; background: var(--card);
}
.hp-city-select:focus-visible { outline: 2.5px solid var(--green-600); outline-offset: 2px; }
.hp-city-select:disabled { opacity: .6; }

/* the city popover: floats beside its dot on wide screens, sits under the map on phones */
.hp-pop {
  position: relative; margin-top: 12px; padding: 14px 16px 12px; border-radius: 16px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.hp-pop.is-float { position: absolute; z-index: 6; width: 300px; margin: 0; }
/* adhan-wave.js scrolls the card into view: keep it clear of the sticky header */
.hp-pop { scroll-margin: 88px 0 14px; }
.hp-pop-x {
  position: absolute; top: 6px; inset-inline-end: 6px; width: 34px; height: 34px; border: none; border-radius: 9px;
  background: none; color: var(--ink-faint); font-size: 22px; line-height: 1;
}
.hp-pop-x:hover { background: var(--green-100); color: var(--green-700); }
.hp-pop-head { padding-inline-end: 34px; }
.hp-pop-city { display: block; font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--green-900); line-height: 1.3; }
.hp-pop-country { font-size: 13px; color: var(--ink-faint); }
.hp-pop-now { margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.hp-pop-now .hp-t { font-weight: 700; color: var(--ink); }
.hp-pop-gmt { font-size: 12px; color: var(--ink-faint); }
.hp-pop-k2 { margin-top: 10px; font-family: var(--font-head); font-weight: 700; font-size: 12.5px; color: var(--gold-500); letter-spacing: .03em; }
.hp-pop-times { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.hp-pop-times li { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 5px 4px 6px; text-align: center; line-height: 1.25; }
.hp-pop-times li.is-next { background: var(--green-100); border-color: var(--green-600); }
.hp-pop-n { display: block; font-size: 12px; color: var(--ink-soft); }
.hp-pop-times .hp-t { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--ink); }
.hp-pop-next { margin-top: 9px; font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--green-700); min-height: 1.4em; font-variant-numeric: tabular-nums; }
.hp-pop-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hp-pop-links a {
  font-family: var(--font-head); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--green-700);
}
.hp-pop-links a:hover { border-color: var(--green-600); background: var(--green-100); }

@media (max-width: 860px) {
  .hp-wave-foot { grid-template-columns: 1fr; }
}
/* phones: the map keeps a readable size and pans sideways inside its frame */
@media (max-width: 620px) {
  .hp-map-frame { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; border-radius: 16px; }
  .hp-map-stage { width: 680px; }
  .hp-legend { grid-template-columns: 1fr 1fr; }
  .hp-ticker { height: 50px; border-radius: 12px; }
  .hp-tk-btn { width: 42px; }
  .hp-tk-item { font-size: 14px; padding-inline: 12px 22px; }
  .hp-chip { font-size: 11.5px; padding: 4px 8px 5px; }
}
.hp-pan-hint { display: none; font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; text-align: center; }
@media (max-width: 620px) { .hp-pan-hint { display: block; } }

@media (prefers-reduced-motion: reduce) {
  .hp-ticker { height: 96px; }
  .hp-map-glow { animation: none; opacity: .45; }
  .hp-dot.is-live::after { animation: none; transform: scale(1.25); opacity: .8; }
  .hp-tool, .hp-tool-go, .hp-dot { transition: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 620px) {
  .hp-ticker { height: 124px; }
}
@media (forced-colors: active) {
  .hp-arc, .hp-line { forced-color-adjust: none; }
}
@media print {
  .hp-tools, .hp-wave, .hp-dial-sec { display: none !important; }
}
