:root {
  /* —— Design system: light (مواقيت توداي) —— */
  --hue-brand: 156;
  --ink: #141a26;
  --ink-muted: #4d576a;
  --ink-faint: #7a8498;
  --bg: #f2f4f8;
  --bg-accent:
    linear-gradient(rgba(0, 148, 90, 0.028) 1px, transparent 1px) 0 0/26px 26px,
    linear-gradient(90deg, rgba(0, 148, 90, 0.028) 1px, transparent 1px) 0 0/26px 26px,
    radial-gradient(120% 80% at 50% -20%, rgba(0, 148, 90, 0.07), transparent 55%),
    var(--bg);
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-sunken: #e8ecf2;
  --surface-hover: #f5f7fa;
  --border: #e2e7ef;
  --border-strong: #cdd5e1;
  --brand: #00945a;
  --brand-bright: #00b86f;
  --brand-soft: rgba(0, 148, 90, 0.1);
  --on-brand: #ffffff;
  --on-accent: #ffffff;
  --shadow-sm: 0 1px 2px rgba(20, 26, 38, 0.05), 0 0 0 1px rgba(20, 26, 38, 0.04);
  --shadow-md: 0 6px 20px rgba(20, 26, 38, 0.07);
  --shadow-lg: 0 20px 50px rgba(20, 26, 38, 0.12);
  --fajr: #3b6fd9;
  --sunrise: #0d9488;
  --dhuhr: #ca8a04;
  --asr: #ea580c;
  --maghrib: #e11d5c;
  --isha: #7c3aed;
  /* Legacy aliases (used across components) */
  --head: var(--surface);
  --card: var(--surface);
  --card-2: var(--surface-sunken);
  --hover: var(--surface-hover);
  --line: var(--border);
  --line-2: var(--border-strong);
  --text: var(--ink);
  --muted: var(--ink-muted);
  --faint: var(--ink-faint);
  --green: var(--brand);
  --green-2: var(--brand-bright);
  --green-soft: var(--brand-soft);
  --on-green: var(--on-brand);
  --sans: "Alexandria", "Almarai", Tahoma, "Segoe UI", sans-serif;
  --display: "Alexandria", "Almarai", Tahoma, sans-serif;
  --max: 1280px;
  --radius: 16px;
  --tabbar: 62px;
  color-scheme: light;
  --surface-elevated: var(--surface);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef3fb;
  --ink-muted: #94a8c9;
  --ink-faint: #6f86ab;
  --bg: #0a1424;
  --bg-accent:
    radial-gradient(120% 90% at 50% -25%, rgba(69, 118, 207, 0.16), transparent 58%),
    radial-gradient(80% 60% at 100% 100%, rgba(184, 135, 27, 0.06), transparent 50%),
    var(--bg);
  --surface: #101e34;
  --surface-raised: #152843;
  --surface-sunken: #0c1729;
  --surface-hover: #1b2f4d;
  --surface-elevated: #152843;
  --border: #2a4268;
  --border-strong: #385880;
  --brand-soft: color-mix(in srgb, var(--brand-bright) 14%, transparent);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --head: var(--surface);
  --card: var(--surface);
  --card-2: var(--surface-sunken);
  --hover: var(--surface-hover);
  --line: var(--border);
  --line-2: var(--border-strong);
  --text: var(--ink);
  --muted: var(--ink-muted);
  --faint: var(--ink-faint);
}

html.theme-switching,
html.theme-switching * {
  transition: none !important;
  animation: none !important;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg-accent);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; right: -999px; }
.skip:focus { right: 1rem; top: 1rem; z-index: 80; background: var(--green); color: var(--on-green); padding: 0.4rem 0.7rem; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flag { width: 22px; height: 16px; flex: none; object-fit: cover; border-radius: 3px; background: var(--card-2); box-shadow: 0 0 0 1px var(--border); }
.flag-big { width: 60px; height: 42px; border-radius: 8px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line-strong, var(--line-2)); box-shadow: 0 1px 0 rgba(20, 26, 38, 0.04); }
.top-row { width: min(var(--max), calc(100% - 1.5rem)); margin-inline: auto; display: flex; align-items: center; gap: 1rem; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--display); font-size: 1.22rem; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; }
.brand-word { display: inline-flex; align-items: baseline; gap: 0.3rem; line-height: 1.1; }
.brand-ar { font-weight: 800; color: var(--ink); }
.brand-accent {
  font-weight: 800;
  font-size: 0.95em;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background:
    radial-gradient(circle at 78% 22%, var(--brand-bright) 0 5px, transparent 5.5px),
    conic-gradient(from 210deg, var(--brand-soft) 0 75%, transparent 75% 100%),
    var(--surface);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in srgb, var(--brand) 18%, var(--line));
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px 15px 15px 15px;
  border: 2px solid var(--brand);
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(35deg);
}
.nav { display: none; align-items: stretch; gap: 0.05rem; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.65rem;
  line-height: 58px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav a svg { width: 1.05rem; height: 1.05rem; flex: none; opacity: 0.88; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--green); }
.nav a[aria-current="page"] svg { color: var(--green); opacity: 1; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 0.65rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--green); }
.nav-more-wrap { position: relative; flex: none; align-self: stretch; display: flex; align-items: stretch; }
.nav-more-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 100%;
  padding: 0 0.65rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s;
}
.nav-more-btn svg { width: 1.05rem; height: 1.05rem; flex: none; opacity: 0.88; }
.nav-more-caret {
  width: 0.82rem !important;
  height: 0.82rem !important;
  opacity: 0.55;
  transition: transform 0.15s;
}
.nav-more-wrap.is-open .nav-more-caret { transform: rotate(180deg); opacity: 0.85; }
.nav-more-btn:hover { color: var(--text); }
.nav-more-wrap.is-active .nav-more-btn,
.nav-more-wrap.is-open .nav-more-btn { color: var(--green); }
.nav-more-wrap.is-active .nav-more-btn svg,
.nav-more-wrap.is-open .nav-more-btn svg { color: var(--green); opacity: 1; }
.nav-more-wrap.is-active .nav-more-btn::after {
  content: "";
  position: absolute;
  inset-inline: 0.65rem;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--green);
}
.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-start: auto;
  min-width: 0;
  flex-shrink: 0;
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--text); background: var(--hover); border-color: var(--line-2); }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-ic-sun { display: none; }
html[data-theme="dark"] .theme-ic-moon { display: none; }
html[data-theme="dark"] .theme-ic-sun { display: block; }
.nav-more-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  inset-inline-end: 0;
  z-index: 60;
  display: none;
  width: min(20rem, calc(100vw - 2rem));
  max-height: min(70vh, 28rem);
  overflow: auto;
  padding: 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 12px 40px rgba(20, 26, 38, 0.14);
}
.nav-more-wrap.is-open .nav-more-menu { display: grid; gap: 0.15rem; }
.nav-more-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}
.nav-more-link:hover { background: color-mix(in srgb, var(--green) 8%, transparent); }
.nav-more-link .ccard-ic { width: 1.65rem; height: 1.65rem; flex: none; }
.place-btn {
  margin-inline-start: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  border: 0;
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 99px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: none;
}
.place-btn svg { font-size: 1.05rem; flex: none; }
.place-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-btn:hover { background: var(--line-2); color: var(--text); }

/* ---------- Layout ---------- */
.shell { width: min(var(--max), calc(100% - 1.5rem)); margin-inline: auto; padding: 1.25rem 0 2.75rem; }
.wrap { min-width: 0; }

.card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.card-title { margin: 0; padding: 0.85rem 1rem 0.55rem; font-size: 0.95rem; font-weight: 700; }

.wrap > * { animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.wrap > *:nth-child(2) { animation-delay: 0.04s; }
.wrap > *:nth-child(3) { animation-delay: 0.08s; }
.wrap > *:nth-child(n+4) { animation-delay: 0.12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.35rem; color: var(--faint); font-size: 0.8rem; margin-bottom: 0.6rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }
.page-head { margin-bottom: 0.9rem; }
.page-head.has-flag { display: flex; align-items: center; gap: 0.9rem; background: var(--card); border-radius: var(--radius); padding: 1rem; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.kicker { margin: 0; color: var(--green); font-size: 0.82rem; font-weight: 600; }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 3.2vw, 1.45rem); line-height: 1.35; margin: 0.1rem 0 0.25rem; letter-spacing: -0.01em; }
.lede { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* ---------- Place hero (flat — no gradient band) ---------- */
.place-hero,
.place-stage.mh {
  position: relative;
  margin: 0 0 0.75rem;
  border-radius: 0;
  overflow: visible;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.place-hero-bg,
.place-stage-bg,
.place-hero-bg::after,
.place-stage-bg::after {
  display: none !important;
}
.place-hero-inner,
.place-stage-body {
  position: relative;
  padding: 0.25rem 0 0.75rem;
}
.place-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.35rem;
  margin: 0 0 0.65rem;
  color: color-mix(in srgb, var(--hero-c, var(--brand)) 55%, var(--muted));
  font-size: 0.76rem;
  font-weight: 600;
}
.place-crumbs a {
  color: color-mix(in srgb, var(--hero-c, var(--brand)) 72%, var(--ink-muted));
}
.place-crumbs a:hover { color: var(--ink); }
.place-crumbs .is-here { color: var(--ink); font-weight: 700; }
.place-crumbs-sep { color: var(--faint); font-weight: 500; }
.place-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
}
.place-hero-flag { flex: none; line-height: 0; }
.place-hero-flag .flag-big {
  width: 66px;
  height: 46px;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(20, 26, 38, 0.12);
}
.place-hero-text { min-width: 0; flex: 1; }
.place-hero-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--hero-c, var(--brand)) 75%, var(--ink-muted));
}
.place-hero-text h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.28rem, 4vw, 1.72rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.place-hero-lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 52rem;
}
.page-flow {
  display: grid;
  gap: 0.85rem;
}
.page-flow > .sheet,
.page-flow > .card,
.page-flow > .note,
.page-flow > .days,
.page-flow > .tabs,
.page-flow > .table-wrap {
  margin-bottom: 0;
}
.page-flow > .section-title {
  margin: 0.35rem 0 0;
  padding: 0 0.1rem;
  font-size: 1rem;
}

/* ---------- Countries sidebar ---------- */
.sn-search { display: flex; align-items: center; gap: 0.55rem; background: var(--card); border-radius: 12px; padding: 0 0.85rem; color: var(--faint); }
.sn-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 0.7rem 0; outline: none; color: var(--text); }
.sn-search input::placeholder { color: var(--faint); }
.sn-search:focus-within { box-shadow: 0 0 0 1px var(--green); }
.sn-card { padding-bottom: 0.35rem; }
.sn-row { display: flex; align-items: center; padding-inline-end: 0.45rem; font-size: 0.9rem; font-weight: 500; transition: background 0.12s, color 0.12s; }
.sn-row > a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0 0.5rem 0.2rem; padding-inline-start: 1rem; }
.sn-row > a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-row:hover { background: var(--hover); }
.sn-row[aria-current] { color: var(--green); background: var(--green-soft); box-shadow: inset -3px 0 0 var(--green); font-weight: 700; }
.sn-pin { margin-inline-start: auto; color: var(--green); }
.sn-star { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--faint); cursor: pointer; opacity: 0; transition: opacity 0.12s, color 0.12s, transform 0.15s; }
.sn-row:hover .sn-star, .sn-star:focus-visible, .sn-star.is-on { opacity: 1; }
.sn-star:hover { color: var(--text); }
.sn-star.is-on { color: #ffc93c; }
.sn-star.is-on svg { fill: currentColor; }
.sn-star:active { transform: scale(0.85); }
@media (hover: none) { .sn-star { opacity: 1; } }
.sn-cities { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.35rem 1rem 0.7rem; }
.sn-cities a { padding: 0.2rem 0.65rem; border-radius: 99px; background: var(--card-2); color: var(--muted); font-size: 0.78rem; font-weight: 600; transition: color 0.12s, background 0.12s; }
.sn-cities a:hover { color: var(--text); }
.sn-cities a[aria-current] { background: var(--green); color: var(--on-green); }
.sn-group summary { list-style: none; display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: background 0.12s; }
.sn-group summary::-webkit-details-marker { display: none; }
.sn-group summary:hover { background: var(--hover); }
.sn-group summary small { margin-inline-start: auto; color: var(--faint); font-weight: 500; }
.sn-group summary .chev { color: var(--faint); transition: transform 0.2s; }
.sn-group[open] summary .chev { transform: rotate(-90deg); }
.sn-group .sn-row { padding-inline-start: 1.5rem; }

/* ---------- Day bar and filters ---------- */
.datebar { display: flex; align-items: center; background: var(--card); border-radius: var(--radius); padding: 0.3rem; margin-bottom: 0.7rem; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.db-arrow { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; cursor: pointer; font-size: 1.25rem; transition: background 0.12s; }
.db-arrow:hover { background: var(--hover); }
.db-label { flex: 1; display: grid; justify-items: center; border: 0; background: none; cursor: pointer; line-height: 1.3; }
.db-label b { font-size: 1rem; }
.db-label small { color: var(--muted); font-size: 0.76rem; }
.pills { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; margin-bottom: 0.9rem; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; border: 0; background: var(--card); padding: 0.42rem 1rem; border-radius: 99px; font-size: 0.86rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.pill:hover { background: var(--card-2); }
.pill.is-on { background: var(--green); color: var(--on-green); box-shadow: var(--shadow-sm); }

/* ---------- Closest adhan ticker ---------- */
.ticker-wrap { margin-bottom: 0.8rem; }
.tk-title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.tk-rail { position: relative; }
.ticker { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px 1px; overscroll-behavior-x: contain; cursor: grab; user-select: none; -webkit-user-select: none; }
.ticker::-webkit-scrollbar { display: none; }
.ticker.is-drag { cursor: grabbing; scroll-snap-type: none; }
.ticker.is-drag .tk { pointer-events: none; }
.ticker img { -webkit-user-drag: none; }
.tk-rail.can-prev .ticker { -webkit-mask-image: linear-gradient(to left, transparent, #000 56px); mask-image: linear-gradient(to left, transparent, #000 56px); }
.tk-rail.can-next .ticker { -webkit-mask-image: linear-gradient(to right, transparent, #000 56px); mask-image: linear-gradient(to right, transparent, #000 56px); }
.tk-rail.can-prev.can-next .ticker { -webkit-mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.tk-nav { position: absolute; top: 50%; z-index: 2; width: 36px; height: 36px; margin-top: -18px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); font-size: 1.15rem; cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: opacity 0.15s, background 0.15s, transform 0.15s; }
.tk-nav:hover { background: var(--line-2); transform: scale(1.06); }
.tk-prev { right: -6px; }
.tk-next { left: -6px; }
.tk-rail.can-prev .tk-prev, .tk-rail.can-next .tk-next { opacity: 1; visibility: visible; }
@media (hover: none) { .tk-nav { display: none; } .ticker { cursor: auto; } }
.tk { flex: none; scroll-snap-align: start; display: flex; align-items: center; gap: 0.6rem; min-width: 172px; padding: 0.55rem 0.75rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); transition: background 0.15s, transform 0.15s, box-shadow 0.15s; }
.tk:hover { background: var(--hover); transform: translateY(-2px); }
.tk-t { display: grid; min-width: 0; line-height: 1.3; }
.tk-t b { font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-t small { color: var(--muted); font-size: 0.72rem; white-space: nowrap; }
.tk-w { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.5rem; border-radius: 8px; background: var(--card-2); font-family: var(--display); font-size: 0.82rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk.is-soon { box-shadow: inset 0 0 0 1px rgba(0, 196, 106, 0.55); }
.tk.is-soon .tk-w { background: var(--green); color: var(--on-green); }
.tk.is-soon .pulse { background: var(--on-green); }

/* ---------- Adhan race: world map ---------- */
.wm { margin-bottom: 0.9rem; }
.wm-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding-inline-end: 1rem; }
.wm-utc { color: var(--muted); font-family: var(--display); font-size: 0.8rem; font-variant-numeric: tabular-nums; direction: ltr; }
.wm-box { position: relative; margin: 0 0.6rem; }
.wm-box canvas { display: block; width: 100%; border-radius: 12px; background: #dce4ee; cursor: crosshair; touch-action: pan-y; box-shadow: inset 0 0 0 1px var(--line); }
.wm-tip { position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, -115%); min-width: 150px; padding: 0.5rem 0.7rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); font-size: 0.8rem; line-height: 1.5; white-space: nowrap; }
.wm-tip.is-low { transform: translate(-50%, 18px); }
.wm-tip b { display: block; font-size: 0.88rem; }
.wm-tip span { color: var(--muted); }
.wm-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; padding: 0.65rem 1rem 0.85rem; color: var(--muted); font-size: 0.76rem; font-weight: 600; }
.wm-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.wm-legend i { width: 14px; height: 3px; border-radius: 2px; background: var(--c); }
.wm-legend .wm-l-night i { width: 12px; height: 12px; border-radius: 3px; background: #3d4a5e; box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- Adhan race: standings ---------- */
.race { margin-bottom: 1.2rem; padding-bottom: 0.4rem; }
.rc-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding-inline-end: 0.8rem; }
.seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--card-2); }
.seg button { border: 0; background: none; padding: 0.3rem 0.85rem; border-radius: 99px; color: var(--muted); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s; }
.seg button[aria-pressed="true"] { background: var(--green); color: var(--on-green); }
.rc-tabs { padding: 0 1rem; margin-bottom: 0.7rem; }
.rc-tabs .pill { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--card-2); }
.rc-tabs .pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.rc-tabs .pill.is-on { background: var(--c); color: var(--on-accent); }
.rc-tabs .pill.is-on i { background: var(--on-accent); }
.rc-lead { display: flex; align-items: center; gap: 0.85rem; margin: 0 1rem 0.6rem; padding: 0.85rem 1rem; border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), color-mix(in srgb, var(--c) 6%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); }
.rc-lead-t { flex: 1; min-width: 0; display: grid; line-height: 1.45; }
.rc-lead-t small { color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.rc-lead-t b { font-family: var(--display); font-size: 1.1rem; }
.rc-lead-t em { font-style: normal; color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-lead-n { color: var(--c); font-family: var(--display); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-list { display: grid; }
.rc-row { display: grid; grid-template-columns: 1.8rem auto 1fr auto 5.2rem; align-items: center; gap: 0.6rem; padding: 0.55rem 1rem; border-top: 1px solid var(--line); transition: background 0.12s; }
.rc-row:hover { background: var(--hover); }
.rc-pos { color: var(--muted); font-family: var(--display); font-size: 0.85rem; font-weight: 600; text-align: center; }
.rc-pos svg { width: 16px; height: 16px; fill: none; stroke: var(--green); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.rc-name { min-width: 0; display: grid; line-height: 1.35; }
.rc-name b { font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-name small { color: var(--muted); font-size: 0.74rem; }
.rc-local { padding: 0.15rem 0.5rem; border-radius: 8px; background: var(--card-2); font-family: var(--display); font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-st { justify-self: end; color: var(--muted); font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-row.is-done { opacity: 0.55; }
.rc-row.is-lead .rc-pos, .rc-row.is-lead .rc-st { color: var(--green); }
.rc-row.is-lead { background: var(--brand-soft); }
.rc-more { display: block; width: calc(100% - 2rem); margin: 0.5rem 1rem 0.6rem; padding: 0.6rem; border: 0; border-radius: 10px; background: var(--card-2); color: var(--text); font-weight: 600; cursor: pointer; }
.rc-more:hover { background: var(--line-2); }

/* ---------- Adhan race: time-zone groups ---------- */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.7rem; margin-bottom: 1.4rem; }
.grp { padding-bottom: 0.3rem; }
.grp-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.9rem 0.5rem; }
.grp-head b { font-size: 0.88rem; }
.grp-head span { color: var(--muted); font-family: var(--display); font-size: 0.75rem; }
.grp-head em { margin-inline-start: auto; font-style: normal; padding: 0.1rem 0.5rem; border-radius: 99px; background: var(--card-2); color: var(--muted); font-size: 0.74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.grp.is-live .grp-head em { background: var(--green); color: var(--on-green); }
.grp.is-done .grp-head em { color: var(--green); }
.grp-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 0.55rem; align-items: center; padding: 0.4rem 0.9rem; border-top: 1px solid var(--line); transition: background 0.12s; }
.grp-row:hover { background: var(--hover); }
.grp-row .flag { grid-row: span 2; }
.grp-row span { font-size: 0.86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-row time { font-family: var(--display); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.grp-row small { grid-column: 2 / 4; color: var(--muted); font-size: 0.72rem; }
.grp-row.is-done { opacity: 0.5; }
@media (max-width: 560px) {
  .rc-row { grid-template-columns: 1.5rem auto 1fr auto; padding-inline: 0.8rem; }
  .rc-st { grid-column: 3 / 5; justify-self: start; margin-top: -0.35rem; font-size: 0.72rem; }
  .rc-lead { margin-inline: 0.7rem; padding: 0.7rem; }
  .rc-lead-n { font-size: 1.25rem; }
  .wm-box { margin: 0 0.4rem; }
}

/* ---------- Your table toolbar and edit mode ---------- */
.fx-bar { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.6rem; }
.fx-title { margin: 0; margin-inline-end: auto; font-size: 1rem; font-weight: 700; }
.fx-title small { color: var(--faint); font-size: 0.8rem; font-weight: 500; }
.fx-edit, .fx-link { border: 0; border-radius: 99px; padding: 0.38rem 1rem; font-size: 0.84rem; font-weight: 700; cursor: pointer; transition: background 0.15s, color 0.15s; }
.fx-edit { background: var(--card-2); }
.fx-edit:hover { background: var(--line-2); }
.fx-edit.is-on { background: var(--green); color: var(--on-green); }
.fx-link { background: none; color: var(--muted); font-weight: 600; }
.fx-link:hover { color: var(--text); }
.fx-add { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.6rem; padding: 0 0.9rem; border-radius: 12px; background: var(--card); color: var(--green); box-shadow: inset 0 0 0 1px rgba(0, 196, 106, 0.35); }
.fx-add input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 0.7rem 0; color: var(--text); }
.fx-add input::placeholder { color: var(--muted); }
.fx-card.is-edit { margin-bottom: 0.45rem; animation: rise 0.25s both; }
.fx-card.is-edit .fx-head { border-bottom: 0; padding-block: 0.5rem; }
.fx-n { width: 1.4rem; color: var(--faint); font-family: var(--display); font-size: 0.85rem; text-align: center; }
.fx-ctl { margin-inline-start: auto; display: flex; gap: 0.25rem; }
.fx-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--card-2); color: var(--text); font-size: 1.05rem; cursor: pointer; transition: background 0.12s, color 0.12s, transform 0.12s; }
.fx-btn:hover { background: var(--line-2); }
.fx-btn:active { transform: scale(0.9); }
.fx-btn:disabled { opacity: 0.3; cursor: default; }
.fx-btn.is-hide:hover { background: rgba(255, 90, 90, 0.16); color: #ff6b6b; }
.fx-tray { margin-top: 0.8rem; padding-bottom: 0.4rem; }
.fx-tray .chips { padding: 0 1rem 0.5rem; margin: 0; }
.fx-tray .chip { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--card-2); }
.fx-tray .chip svg { color: var(--green); }

/* ---------- Fixtures (country cards with city rows) ---------- */
.fx-card { margin-bottom: 0.8rem; }
.side .fx-card { margin-bottom: 0; }
.fx-head { display: flex; align-items: center; gap: 0.65rem; padding: 0.75rem 1rem; font-weight: 700; font-size: 0.93rem; border-bottom: 1px solid var(--line); transition: background 0.12s; }
.fx-head:hover { background: var(--hover); }
.fx-head small { color: var(--faint); font-size: 0.78rem; font-weight: 500; }
.fx-head .chev { margin-inline-start: auto; color: var(--faint); }
.fx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.8rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); transition: background 0.12s; }
.fx-row:last-child { border-bottom: 0; }
.fx-row:hover { background: var(--hover); }
.fx-city { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-time { display: grid; justify-items: center; min-width: 92px; padding: 0.2rem 0.65rem; border-radius: 10px; background: var(--card-2); line-height: 1.25; }
.fx-time small { color: var(--muted); font-size: 0.7rem; font-weight: 600; }
.fx-time b { font-family: var(--display); font-size: 0.98rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-st { justify-self: end; display: inline-flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.fx-row.is-soon .fx-time { background: var(--green); color: var(--on-green); }
.fx-row.is-soon .fx-time small { color: color-mix(in srgb, var(--on-green) 75%, transparent); }
.fx-row.is-soon .fx-st { color: var(--green); font-family: var(--display); font-size: 0.9rem; }
.fx-row.is-done .fx-time b, .fx-row.is-done .fx-st { color: var(--faint); }
.fx-more { display: block; text-align: center; padding: 0.65rem; color: var(--green); font-weight: 600; font-size: 0.86rem; border-top: 1px solid var(--line); }
.fx-more:hover { background: var(--hover); }
.side .fx-row { grid-template-columns: minmax(0, 1fr) auto; }
.side .fx-st { display: none; }

/* ---------- Featured city ---------- */
.feat-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.8rem 1rem 0.2rem; }
.feat-top a { display: flex; align-items: center; gap: 0.55rem; min-width: 0; font-weight: 700; font-size: 0.93rem; }
.feat-top a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat-change { flex: none; border: 0; background: var(--card-2); border-radius: 99px; padding: 0.25rem 0.8rem; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.feat-change:hover { background: var(--line-2); }
.feat .count { margin: 0; padding: 0.7rem 1rem 1rem; background: radial-gradient(110% 90% at 50% 0%, rgba(0, 196, 106, 0.16), transparent 70%); }
.feat .count-clock .u { min-width: 3.6rem; }
.feat .count-clock b { font-size: 1.9rem; }
.feat .times { padding: 0.2rem 0.45rem 0.5rem; }

/* ---------- Countdown ---------- */
.count { display: grid; justify-items: center; text-align: center; gap: 0.65rem; margin: 0 0 0.9rem; }
.wrap > .count, .sheet > .count, .countdown-page > .count { padding: 1.2rem 1rem; border-radius: var(--radius); background: radial-gradient(110% 120% at 50% -10%, var(--brand-soft), transparent 65%), var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.countdown-page > .count { margin-top: 0.35rem; }
.count[data-event="ramadan"] { background: radial-gradient(110% 120% at 50% -10%, color-mix(in srgb, var(--isha) 18%, transparent), transparent 65%), var(--card); }
.count[data-event="fitr"] { background: radial-gradient(110% 120% at 50% -10%, var(--brand-soft), transparent 65%), var(--card); }
.count[data-event="adha"] { background: radial-gradient(110% 120% at 50% -10%, color-mix(in srgb, var(--asr) 16%, transparent), transparent 65%), var(--card); }
.count[data-event="ramadan"] .pulse, .count[data-event="ramadan"] .track span { background: var(--isha); }
.count[data-event="ramadan"] .count-k, .count[data-event="ramadan"] .count-clock .u:last-child b { color: var(--isha); }
.count[data-event="fitr"] .pulse, .count[data-event="fitr"] .track span { background: var(--green); }
.count[data-event="adha"] .pulse, .count[data-event="adha"] .track span { background: var(--asr); }
.count[data-event="adha"] .count-k, .count[data-event="adha"] .count-clock .u:last-child b { color: var(--asr); }
.countdown-place { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.75rem; margin: 0.5rem 0 0.75rem; padding: 0.55rem 0.85rem; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 600; font-size: 0.88rem; }
.countdown-place .btn { margin-inline-start: auto; font-size: 0.78rem; padding: 0.32rem 0.75rem; }
.countdown-tabs { margin-bottom: 0.65rem; }
.countdown-hub-grid { grid-template-columns: repeat(3, 1fr); }
.countdown-card[data-event="ramadan"] .ccard-ic { background: color-mix(in srgb, var(--isha) 14%, white); color: var(--isha); }
.countdown-card[data-event="fitr"] .ccard-ic { background: var(--brand-soft); color: var(--green); }
.countdown-card[data-event="adha"] .ccard-ic { background: color-mix(in srgb, var(--asr) 14%, white); color: var(--asr); }
.countdown-page .facts { margin-top: 0.85rem; }
.countdown-page .links { margin-top: 0.85rem; }
@media (max-width: 720px) {
  .countdown-hub-grid { grid-template-columns: 1fr; }
  .countdown-place .btn { width: 100%; margin-inline-start: 0; text-align: center; }
  .facts { grid-template-columns: 1fr; }
}
.count-head { display: grid; justify-items: center; gap: 0.05rem; }
.count-k { margin: 0; display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; font-size: 0.9rem; }
.pulse { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--green); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 196, 106, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(0, 196, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 196, 106, 0); } }
.count-sub { margin: 0; display: inline-flex; gap: 0.4rem; color: var(--muted); font-size: 0.84rem; font-weight: 600; }
.count-sub b { color: var(--text); font-variant-numeric: tabular-nums; }
.count-sub span::before { content: "·"; margin-inline-end: 0.4rem; }
.count-clock { margin: 0; display: flex; gap: 0.4rem; direction: ltr; justify-content: center; }
.count-clock .u { display: grid; justify-items: center; min-width: 4.2rem; padding: 0.45rem 0.45rem 0.3rem; border-radius: 12px; background: var(--card-2); }
.count-clock b { font-family: var(--display); font-size: clamp(1.8rem, 8vw, 2.5rem); font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.count-clock .u:last-child b { color: var(--green-2); }
.count-clock small { color: var(--muted); font-size: 0.68rem; font-weight: 600; direction: rtl; }
.count-clock .done b { font-size: 1.5rem; color: var(--green); }
.track { width: 100%; height: 5px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.track span { display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width 1s linear; }
.track-ends { width: 100%; display: flex; justify-content: space-between; margin-top: -0.4rem; color: var(--muted); font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- City header (match header) ---------- */
.mh:not(.place-stage) {
  margin-bottom: 0.8rem;
  padding: 0.85rem 1rem 1rem;
  border-radius: var(--radius);
  background: radial-gradient(80% 120% at 50% -30%, var(--brand-soft), transparent 65%), var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.place-stage.mh { --c: var(--hero-c, var(--brand)); background: transparent; border: 0; }
.mh-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.8rem; color: var(--muted); font-size: 0.8rem; }
.mh-change {
  border: 1px solid color-mix(in srgb, var(--hero-c, var(--brand)) 28%, var(--line));
  background: color-mix(in srgb, #fff 82%, var(--brand-soft));
  border-radius: 99px;
  padding: 0.28rem 0.75rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--hero-c, var(--brand)) 70%, var(--ink));
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.mh-change:hover { background: #fff; border-color: color-mix(in srgb, var(--hero-c, var(--brand)) 45%, var(--line)); }
.mh-loc { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); font-weight: 600; min-width: 0; }
.mh-loc span { display: grid; gap: 0.05rem; min-width: 0; }
.mh-loc b { font-size: 0.92rem; }
.mh-loc small { color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.mh-date { flex: none; font-weight: 600; font-size: 0.78rem; text-align: end; }
.mh-title {
  display: grid;
  gap: 0.15rem;
  text-align: center;
  margin: 0.75rem 0 0.95rem;
  line-height: 1.25;
}
.mh-title-k {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--hero-c, var(--brand)) 72%, var(--muted));
}
.mh-title-place {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.25rem, 4.5vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: none;
  -webkit-text-fill-color: unset;
  color: var(--ink);
}
.mh-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.6rem; }
.mh-team { display: grid; justify-items: center; gap: 0.1rem; text-align: center; }
.mh-ic { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 0.2rem; border-radius: 50%; background: var(--card-2); font-size: 1.55rem; transition: transform 0.2s; }
.mh-team:hover .mh-ic { transform: scale(1.06); }
.mh-team b { font-size: 0.98rem; }
.mh-team time { font-family: var(--display); font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mh-team small { color: var(--faint); font-size: 0.72rem; font-weight: 600; }
.mh-team.is-prev { opacity: 0.6; }
.mh-team.is-next .mh-ic { background: var(--green); color: var(--on-green); box-shadow: 0 0 0 6px var(--green-soft); }
.mh-team.is-next small { color: var(--green); }
.mh-mid { display: grid; justify-items: center; gap: 0.3rem; }
.mh-countdown-well {
  width: 100%;
  max-width: 20.5rem;
  padding: 0.9rem 1rem 0.75rem;
  border-radius: 18px;
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--hero-c, var(--brand)) 88%, #0c1a12),
    color-mix(in srgb, var(--hero-c, var(--brand)) 62%, #122238)
  );
  color: #fff;
  box-shadow:
    0 14px 36px color-mix(in srgb, var(--hero-c, var(--brand)) 32%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
}
.mh-countdown-well .mh-live { color: color-mix(in srgb, #fff 88%, var(--hero-c)); }
.mh-countdown-well .count-clock .u + .u::before,
.mh-countdown-well .count-clock b { color: #fff; }
.mh-countdown-well .count-clock .u:last-child b { color: color-mix(in srgb, #fff 72%, #bff5d8); }
.mh-now {
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.12rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: color-mix(in srgb, #fff 75%, transparent);
}
.mh-now time {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.mh-live { margin: 0; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--green); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.mh .count-clock { gap: 0; }
.mh .count-clock .u { display: flex; align-items: baseline; min-width: 0; padding: 0; background: none; }
.mh .count-clock small { display: none; }
.mh .count-clock b, .mh .count-clock .u + .u::before { font-size: clamp(2rem, 8.5vw, 2.9rem); color: var(--text); }
.mh .count-clock .u + .u::before { content: ":"; font-family: var(--display); font-weight: 700; color: var(--faint); padding: 0 0.12rem; }
.mh .count-clock .u:last-child b { color: var(--green-2); }
.mh .track { margin-top: 1rem; height: 4px; }
.place-stage.mh .prayer-rail {
  margin-top: 0.65rem;
  padding: 0.25rem 0.05rem 0.1rem;
  margin-inline: -0.15rem;
}
@media (max-width: 560px) {
  .mh-score { grid-template-columns: 1fr; gap: 0.75rem; }
  .mh-team { display: none; }
  .mh-countdown-well { max-width: none; }
}

/* ---------- Prayer rail (compact day strip) ---------- */
.prayer-rail {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
}
.prayer-rail::-webkit-scrollbar { height: 4px; }
.pr-card {
  flex: 0 0 5.75rem;
  scroll-snap-align: start;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.62rem 0.4rem 0.55rem;
  text-align: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, #fff 92%, var(--brand-soft));
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
}
a.pr-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pr-ic {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card-2);
  color: var(--c, var(--muted));
  font-size: 1.1rem;
}
.pr-name { font-size: 0.72rem; font-weight: 800; color: var(--ink-muted); line-height: 1.25; }
.pr-time {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.pr-badge { font-size: 0.62rem; font-weight: 800; color: var(--c, var(--green)); line-height: 1.2; }
.pr-card.is-next {
  border-color: color-mix(in srgb, var(--c, var(--green)) 48%, var(--line));
  background: color-mix(in srgb, var(--c, var(--green)) 11%, #fff);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--c, var(--green)) 16%, transparent);
  transform: translateY(-2px);
}
.pr-card.is-next .pr-ic { background: var(--c, var(--green)); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.pr-card.is-passed { opacity: 0.48; }

/* ---------- Prayer list ---------- */
.sheet {
  background: var(--card);
  border-radius: 16px;
  padding: 0.35rem 0.4rem;
  margin: 0;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.sheet-title {
  margin: 0;
  padding: 0.65rem 0.75rem 0.45rem;
  font-size: 0.95rem;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, white), transparent);
}
.times { display: grid; gap: 0.1rem; }
.time-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 0.7rem; padding: 0.55rem 0.6rem; border-radius: 12px; transition: background 0.12s; }
a.time-row:hover { background: var(--hover); }
.t-ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--card-2); color: var(--muted); font-size: 1.05rem; }
.t-name { font-weight: 600; font-size: 0.92rem; }
.t-st { order: 3; display: inline-flex; align-items: center; gap: 0.3rem; font-style: normal; font-size: 0.74rem; font-weight: 600; color: var(--faint); white-space: nowrap; }
.time-row time { order: 4; min-width: 4.6rem; text-align: center; padding: 0.15rem 0.5rem; border-radius: 8px; background: var(--card-2); font-family: var(--display); font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.time-row.is-passed { opacity: 0.5; }
.time-row.is-later .t-st { color: var(--muted); }
.time-row.is-next { background: var(--green-soft); }
.time-row.is-next .t-ic { background: var(--green); color: var(--on-green); }
.time-row.is-next time { background: var(--green); color: var(--on-green); }
.time-row.is-next .t-st { color: var(--green); }
.time-row.is-focus { background: var(--green-soft); }
.time-row.is-focus time { background: var(--green); color: var(--on-green); }

/* ---------- Prayer colours ---------- */
[data-slot="fajr"], [data-next="fajr"], [data-p="fajr"], [data-p="imsak"], [data-next="imsak"] { --c: var(--fajr); }
[data-slot="sunrise"], [data-next="sunrise"], [data-p="sunrise"] { --c: var(--sunrise); }
[data-slot="dhuhr"], [data-next="dhuhr"], [data-p="dhuhr"] { --c: var(--dhuhr); }
[data-slot="asr"], [data-next="asr"], [data-p="asr"] { --c: var(--asr); }
[data-slot="maghrib"], [data-next="maghrib"], [data-p="maghrib"], [data-p="iftar"], [data-next="iftar"] { --c: var(--maghrib); }
[data-slot="isha"], [data-next="isha"], [data-p="isha"] { --c: var(--isha); }
.t-ic { color: var(--c, var(--muted)); }
.time-row.is-next, .time-row.is-focus { background: color-mix(in srgb, var(--c, var(--green)) 13%, transparent); }
.time-row.is-next .t-ic, .time-row.is-next time, .time-row.is-focus time { background: var(--c, var(--green)); color: var(--on-accent); }
.time-row.is-next .t-st { color: var(--c, var(--green)); }
.feat[data-next] .count { background: radial-gradient(110% 90% at 50% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%); }
.wrap > .count[data-p]:not([data-p=""]), .sheet > .count[data-p]:not([data-p=""]) { background: radial-gradient(110% 120% at 50% -10%, color-mix(in srgb, var(--c) 20%, transparent), transparent 65%), var(--card); }
.feat[data-next] .count-clock .u:last-child b, .count[data-p] .count-clock .u:last-child b, .mh[data-next] .count-clock .u:last-child b { color: var(--c, var(--green-2)); }
.feat[data-next] .track span, .count[data-p] .track span, .mh[data-next] .track span { background: var(--c, var(--green)); }
.feat[data-next] .pulse, .count[data-p] .pulse, .mh[data-next] .mh-live .pulse { background: var(--c, var(--green)); animation: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--green)) 25%, transparent); }
.mh[data-next]:not(.place-stage) { background: radial-gradient(80% 120% at 50% -30%, color-mix(in srgb, var(--c) 24%, transparent), transparent 65%), var(--card); }
.mh[data-next] .mh-live { color: var(--c); }
.mh-team .mh-ic { color: var(--c, var(--text)); }
.mh-team.is-next .mh-ic { background: var(--c, var(--green)); color: var(--on-accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c, var(--green)) 20%, transparent); }
.mh-team.is-next small { color: var(--c, var(--green)); }

.home-imsak { margin-top: 1rem; padding-bottom: 0.5rem; }
.home-imsak-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1rem; padding: 1rem 1rem 0.25rem; }
.home-imsak-head .section-title { margin: 0; padding: 0; }
.home-imsak-head .lede { margin: 0.25rem 0 0; }
.home-imsak .table-wrap { margin: 0.5rem 1rem 0; border-radius: 12px; overflow: hidden; }
.home-imsak-more { margin: 0.65rem 1rem 0.85rem; font-size: 0.88rem; font-weight: 600; }
.home-imsak-more a { color: var(--green); }
.home-imsak-more a:hover { color: var(--green-2); }
.home-events { margin-top: 0.85rem; }

/* ---------- Portal / country pick ---------- */
.portal {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 0.85rem;
}
.portal .place-hero.portal-hero {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.portal-hero-inner {
  padding: 1.2rem 1.15rem 1.25rem;
}
.portal-hero-main {
  justify-content: center;
}
.portal .place-hero-text {
  flex: 1 1 auto;
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}
.portal .place-hero-text h1 {
  font-size: clamp(1.35rem, 4.2vw, 1.85rem);
}
.portal .place-hero-lede {
  margin-inline: auto;
}
.portal-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  max-width: 28rem;
  margin: 0.75rem auto 0;
  padding: 0.7rem 1rem;
  background: color-mix(in srgb, #fff 88%, var(--brand-soft));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.portal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1rem 1.05rem;
  box-shadow: var(--shadow-sm);
}
.portal-panel .section-title {
  margin-top: 0;
}
.portal-search-inline {
  max-width: none;
  margin: 0 0 0.85rem;
}
.portal-list-lede {
  margin: -0.35rem 0 0.65rem;
  font-size: 0.88rem;
}
.home-times-flow {
  margin-bottom: 0.15rem;
}
.home-city-more {
  margin: 0.5rem 0 0;
  text-align: center;
}
.home-city-more .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.15rem;
  border-radius: 12px;
}
.home-place-hint {
  margin: 0;
  padding: 0.65rem 0.85rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 14px;
}
.home-place-hint strong { color: var(--ink); }
.home-place-pick {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 800;
  color: var(--green);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.portal-search:focus-within {
  border-color: color-mix(in srgb, var(--green) 40%, var(--line));
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.portal-search svg { width: 1.2rem; height: 1.2rem; flex: none; color: var(--faint); stroke-width: 2; }
.portal-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.1rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.portal-search input::placeholder { color: var(--faint); font-weight: 500; }
.portal-subtitle { margin: 1.65rem 0 0.7rem; font-size: 1.05rem; font-weight: 800; }
.portal-subtitle-table { margin-top: 2rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.portal-foot {
  margin: 0;
  padding: 0.85rem 0.5rem 0.25rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
}
.portal-foot a { color: var(--green); }
.portal-empty {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-sunken);
  border-radius: 8px;
  font-size: 0.88rem;
}
.pick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 520px) {
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  min-height: 0;
  padding: 0.95rem 0.75rem 0.85rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s, transform 0.12s;
}
.pick:active { transform: scale(0.985); }
.pick-kw { min-height: 0; }
.pick:hover {
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  background: color-mix(in srgb, var(--brand-soft) 65%, var(--surface));
  box-shadow: var(--shadow-md);
}
.pick.is-here {
  border-color: var(--green);
  background: var(--brand-soft);
}
.pick-flag { display: flex; line-height: 0; flex: none; }
.pick-flag .flag { width: 52px; height: 36px; border-radius: 6px; }
.pick-flag .flag-big { width: 56px; height: 38px; border-radius: 7px; }
.pick-name {
  display: block;
  width: 100%;
  padding: 0 0.2rem;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
  text-wrap: balance;
}
.pick-kw .pick-name { font-size: 0.95rem; color: var(--ink); }
.pick-country .pick-cap { display: none; }

.ccard-section { margin-top: 1.25rem; }
.ccard-section .section-title { margin: 0 0 0.65rem; padding: 0 0.15rem; }
.ccard-section-tier { margin-top: 1.5rem; }
.ccard-section-tier .section-title {
  font-size: 0.92rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
  margin-bottom: 0.55rem;
}
.ccard-section-tier.is-you .section-title { color: var(--green); }
.ccard-country .ccard-body > small { color: var(--muted); font-size: 0.76rem; font-weight: 500; }
.ccard-section.is-suggest { margin-top: 1.5rem; padding-top: 0.25rem; border-top: 1px solid var(--line); }
.ccard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.ccard-grid-local { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ccard {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  padding: 1.05rem 1.15rem;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  min-height: 100%;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.ccard:hover { border-color: var(--line-2); background: var(--hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ccard.is-here { border-color: color-mix(in srgb, var(--green) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 25%, transparent); }
.ccard .flag { width: 40px; height: 28px; border-radius: 5px; flex: none; }
.ccard-nav .flag-big { width: 52px; height: 36px; }
.ccard-body { display: grid; gap: 0.2rem; min-width: 0; flex: 1; }
.ccard-nav .ccard-body b { font-size: 1.05rem; font-weight: 700; line-height: 1.45; }
.ccard-body b { font-size: 0.92rem; font-weight: 700; line-height: 1.25; }
.ccard-body > small { color: var(--muted); font-size: 0.76rem; font-weight: 500; }
.ccard-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin-top: 0.35rem; color: var(--faint); font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ccard-next { margin-top: 0.25rem; color: var(--green); font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ccard-nav { min-height: 88px; }
.ccard-ic {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--green);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 18%, transparent);
}
.ccard-ic svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ccard-ic-prayers { background: color-mix(in srgb, var(--dhuhr) 14%, white); color: var(--dhuhr); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dhuhr) 28%, transparent); }
.ccard-ic-imsakiya { background: color-mix(in srgb, var(--sunrise) 14%, white); color: var(--sunrise); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sunrise) 28%, transparent); }
.ccard-ic-ramadan { background: color-mix(in srgb, var(--isha) 14%, white); color: var(--isha); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--isha) 28%, transparent); }
.ccard-ic-fitr { background: color-mix(in srgb, var(--green) 14%, white); color: var(--green); }
.ccard-ic-adha { background: color-mix(in srgb, var(--asr) 14%, white); color: var(--asr); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--asr) 28%, transparent); }
.ccard-ic-place { background: color-mix(in srgb, var(--fajr) 12%, white); color: var(--fajr); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fajr) 26%, transparent); }
.ccard-ic-globe, .ccard-ic-countdown { background: var(--surface-sunken); color: var(--ink-muted); }
.ccard-country .flag-big { width: 52px; height: 36px; border-radius: 8px; }
.ccard-city .ccard-body > small { color: var(--muted); font-size: 0.74rem; }

.hub-strip {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 0 1.1rem;
  padding: 0.15rem 0.1rem 0.35rem;
}
.hub-strip::-webkit-scrollbar { display: none; }
.hub-chip {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 5.6rem;
  padding: 0.65rem 0.55rem 0.55rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.25;
  transition: transform 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.hub-chip:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hub-chip .ccard-ic { width: 44px; height: 44px; border-radius: 12px; }
.hub-chip .ccard-ic svg { width: 22px; height: 22px; }
.hub-chip span { display: block; max-width: 6.5rem; }
.ccard-more { margin: 0.65rem 0 0; font-size: 0.88rem; font-weight: 600; }
.ccard-more a { color: var(--green); }

.fx-time small { color: var(--c, var(--muted)); }
.fx-row.is-soon .fx-time { background: var(--c, var(--green)); color: var(--on-accent); }
.fx-row.is-soon .fx-time small { color: color-mix(in srgb, var(--on-accent) 72%, transparent); }
.fx-row.is-soon .fx-st { color: var(--c, var(--green)); }
.std th[data-p] { color: var(--c); box-shadow: inset 0 -2px 0 var(--c); }

/* ---------- Tabs and day strip ---------- */
.tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0;
  padding: 0.25rem;
  gap: 0.2rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-sunken) 100%);
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative;
  flex: none;
  padding: 0.62rem 0.95rem;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.tabs a:hover { color: var(--text); background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.tabs a[aria-current="page"] {
  color: var(--on-green);
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  box-shadow: var(--shadow-sm);
}
.tabs a[aria-current="page"]::after { content: none; }
.days { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; margin: 0 0 0.8rem; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 1 0 3.6rem; display: grid; justify-items: center; padding: 0.45rem 0.4rem; border: 0; background: var(--card); border-radius: 12px; cursor: pointer; line-height: 1.3; transition: background 0.15s; }
.day:hover { background: var(--card-2); }
.day small { color: var(--muted); font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
.day b { font-family: var(--display); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.day.is-on { background: var(--green); color: var(--on-green); }
.day.is-on small { color: color-mix(in srgb, var(--on-green) 75%, transparent); }

/* ---------- Sections ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-head a { color: var(--green); font-weight: 600; font-size: 0.86rem; }
.section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 800;
  margin: 1.25rem 0 0.65rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.section-title::before {
  content: "";
  width: 5px;
  height: 1em;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-soft) 80%, transparent);
}
.home-imsak-head .section-title::before,
.place-hero .section-title::before { display: none; }

/* Side cards */
.stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.stats div { background: var(--card); padding: 0.65rem 1rem; }
.stats dt { color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.stats dd { margin: 0; font-family: var(--display); font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.75rem; padding: 0.65rem 1rem; border-top: 1px solid var(--line); transition: background 0.12s; }
.ev-row:hover { background: var(--hover); }
.ev-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ev, var(--green)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ev, var(--green)) 18%, transparent); }
.ev-t { display: grid; line-height: 1.35; }
.ev-t b { font-size: 0.9rem; }
.ev-t small { color: var(--muted); font-size: 0.76rem; }
.ev-left { display: grid; justify-items: center; line-height: 1.15; }
.ev-left b { font-family: var(--display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ev-left small { color: var(--muted); font-size: 0.7rem; }
.ev-ramadan { --ev: #b583ff; }
.ev-fitr { --ev: #00c46a; }
.ev-adha { --ev: #ff9f43; }

/* Event cards */
.events { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.event { position: relative; overflow: hidden; display: grid; gap: 0.1rem; padding: 0.85rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm), inset 0 3px 0 var(--ev); transition: background 0.15s, box-shadow 0.15s; }
.event:hover { background: var(--hover); }
.ev-art { position: absolute; left: -0.4rem; bottom: -0.6rem; font-size: 4.4rem; color: var(--ev); opacity: 0.14; stroke-width: 1.2; }
.ev-name { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.ev-n { display: flex; align-items: baseline; gap: 0.3rem; }
.ev-n b { font-family: var(--display); font-size: 1.8rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--ev); }
.ev-n small { color: var(--muted); font-weight: 600; font-size: 0.78rem; }
.ev-date { color: var(--muted); font-size: 0.76rem; }

/* Link lists */
.links { display: grid; background: var(--card); border-radius: var(--radius); margin: 0; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.links a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); transition: background 0.12s; }
.links a:last-child { border-bottom: 0; }
.links a:hover { background: var(--hover); }
.links a span { font-weight: 600; font-size: 0.92rem; }
.links a small { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

/* Chips, buttons, inputs */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0.8rem; }
.chip, .btn { border: 0; background: var(--card); border-radius: 99px; padding: 0.36rem 0.9rem; cursor: pointer; font-weight: 600; font-size: 0.86rem; transition: background 0.15s, color 0.15s; }
.chip:hover, .btn:hover { background: var(--card-2); }
.chip.is-on { background: var(--green); color: var(--on-green); }
.btn.primary { background: var(--green); color: var(--on-green); }
.tools { margin: 0.2rem 0 0.8rem; }
.search { width: 100%; border: 0; background: var(--card); border-radius: 12px; padding: 0.7rem 0.95rem; box-shadow: inset 0 0 0 1px var(--line); }
.search::placeholder { color: var(--faint); }
.search:focus { outline: none; box-shadow: 0 0 0 1px var(--green); }

/* Tables */
.table-wrap { overflow: auto; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
th, td { padding: 0.62rem 0.8rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 0.74rem; font-weight: 700; background: var(--card); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }
tr.is-past td { color: var(--faint); }
tr.is-here td { background: var(--green-soft); font-weight: 700; }
tr.is-here td:first-child { box-shadow: inset -3px 0 0 var(--green); }
td a { font-weight: 700; }
td a:hover { color: var(--green); }
.std td.std-n { color: var(--faint); width: 2.2rem; }
.std td.is-next { color: var(--c, var(--green)); font-weight: 700; }
.std td.is-past { color: var(--faint); }

.note { color: var(--muted); margin: 1rem 0.1rem; font-size: 0.84rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; margin: 0.6rem 0; }
.fact { background: var(--card); border-radius: var(--radius); padding: 0.75rem 0.9rem; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.fact span { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.fact b { display: block; font-family: var(--display); font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--green); }
.empty { padding: 1rem; color: var(--muted); }

/* Picker */
dialog { width: min(480px, calc(100% - 1.4rem)); border: 0; border-radius: 18px; background: var(--card); color: var(--text); padding: 1rem 1rem 0.4rem; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
dialog[open] { animation: pop 0.2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
dialog::backdrop { background: rgba(20, 26, 38, 0.42); }
.picker-head { display: flex; justify-content: space-between; align-items: center; }
.picker-head h2 { font-size: 1.05rem; margin: 0; }
.picker-list { max-height: min(60vh, 420px); overflow: auto; margin-top: 0.4rem; }
.picker-list button { width: 100%; display: flex; justify-content: space-between; gap: 1rem; text-align: right; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 0.75rem 0.4rem; cursor: pointer; font-weight: 600; }
.picker-list button:hover { background: var(--hover); color: var(--green); }
.picker-list button small { color: var(--muted); font-weight: 500; }
dialog .search { margin-top: 0.8rem; background: var(--card-2); }

/* Footer and tab bar */
.foot { background: var(--head); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; }
.foot-grid { width: min(var(--max), calc(100% - 1.5rem)); margin-inline: auto; display: grid; gap: 1.2rem; padding: 1.6rem 0 1.9rem; }
.foot p { margin: 0.35rem 0 0; }
.foot .brand { font-size: 1.1rem; color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.45rem 1.1rem; align-content: start; }
.foot-links a { color: var(--text); font-weight: 600; }
.foot-links a:hover { color: var(--green); }
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--head) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -4px 24px rgba(20, 26, 38, 0.06); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; color: var(--faint); font-size: 0.68rem; font-weight: 600; }
.tabbar svg { font-size: 1.4rem; }
.tabbar a[aria-current="page"] { color: var(--green); }

/* ---------- Breakpoints ---------- */
@media (max-width: 899px) {
  .theme-toggle { width: 2.15rem; height: 2.15rem; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .nav { display: flex; }
  .place-btn { min-width: 200px; }
  .ccard-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; }
  .ccard-nav .ccard-body b { font-size: 1.12rem; }
  .foot-grid { grid-template-columns: 1.3fr 1fr; }
}
@media (max-width: 560px) {
  .events { grid-template-columns: 1fr; }
  .fx-time { min-width: 80px; }
  .fx-row { gap: 0.5rem; padding-inline: 0.85rem; }
  .mh-ic { width: 46px; height: 46px; font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .top, .tabbar, .foot, .side, .noprint, .crumbs, .tabs { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .shell { display: block; }
  .table-wrap, .card, .sheet { background: #fff; }
  th, td { color: #000; border-color: #ccc; }
}
