:root {
  --bg: #f6fbf9;
  --surface: #ffffff;
  --surface-soft: #f2f8f5;
  --surface-blue: #eef7fb;
  --ink: #102224;
  --muted: #5d7072;
  --soft-ink: #29484b;
  --faint: #dfe9e5;
  --faint-strong: #cadfd8;
  --emerald: #0f7a5c;
  --emerald-dark: #0a5f48;
  --sky: #2d7fa3;
  --gold: #bd7e25;
  --gold-soft: #fff3da;
  --red: #9f3d36;
  --red-soft: #fff0ee;
  --shadow: 0 22px 60px rgba(16, 34, 36, 0.13);
  --shadow-soft: 0 12px 34px rgba(16, 34, 36, 0.08);
  --radius: 8px;
  --theme-page-1: #f6fbf9;
  --theme-page-2: #e7f6f2;
  --theme-page-3: #fff8eb;
  --theme-hero-1: rgba(255, 255, 255, 0.98);
  --theme-hero-2: rgba(248, 253, 251, 0.92);
  --theme-hero-3: rgba(228, 243, 238, 0.7);
  --theme-accent: #0f7a5c;
  --theme-accent-soft: rgba(15, 122, 92, 0.14);
  --theme-warm: rgba(189, 126, 37, 0.7);
  --theme-grid: rgba(15, 122, 92, 0.08);
  --theme-image-opacity: 0.62;
  --theme-surface: rgba(238, 248, 244, 0.9);
  --theme-panel: rgba(237, 247, 243, 0.9);
  --theme-card: rgba(242, 250, 247, 0.94);
  --theme-control: rgba(255, 255, 255, 0.92);
  --theme-topbar: rgba(255, 255, 255, 0.86);
  --orb-display: block;
  --orb-size: 132px;
  --orb-x: 8vw;
  --orb-y: 92px;
  --orb-opacity: 0;
  --orb-gradient: radial-gradient(circle at 45% 42%, #fff8d8 0 30%, #ffd375 52%, rgba(245, 162, 61, 0.18) 73%, transparent 74%);
  --orb-shadow: 0 0 70px rgba(255, 200, 97, 0.45);
  --orb-blur: 0;
  --moon-cutout-left: 16%;
  --moon-cutout-width: 98%;
  --moon-cutout-opacity: 0.98;
  --moon-cutout-color: var(--theme-page-1);
}

body[data-theme="fajr"] {
  --surface: #122734;
  --surface-soft: #183544;
  --ink: #f4fbf7;
  --muted: #bad0cb;
  --soft-ink: #e7f2ee;
  --emerald-dark: #ffd089;
  --faint: rgba(199, 225, 219, 0.24);
  --faint-strong: rgba(222, 241, 235, 0.34);
  --theme-page-1: #070d17;
  --theme-page-2: #152737;
  --theme-page-3: #f09b4b;
  --theme-hero-1: rgba(8, 15, 25, 0.9);
  --theme-hero-2: rgba(23, 43, 56, 0.84);
  --theme-hero-3: rgba(239, 151, 73, 0.54);
  --theme-accent: #ffb45d;
  --theme-accent-soft: rgba(255, 180, 93, 0.2);
  --theme-warm: rgba(255, 160, 74, 0.8);
  --theme-grid: rgba(255, 219, 165, 0.08);
  --theme-image-opacity: 0.24;
  --theme-surface: rgba(14, 29, 41, 0.84);
  --theme-panel: rgba(12, 25, 37, 0.86);
  --theme-card: rgba(18, 39, 52, 0.86);
  --theme-control: rgba(12, 25, 36, 0.9);
  --theme-topbar: rgba(9, 19, 29, 0.86);
  --orb-size: 104px;
  --orb-x: 8vw;
  --orb-y: 56vh;
  --orb-opacity: 0.74;
  --orb-gradient: radial-gradient(circle at 34% 42%, #fffbe8 0 36%, #d8edf2 57%, rgba(216, 237, 242, 0.18) 73%, transparent 74%);
  --orb-shadow: 0 0 44px rgba(216, 237, 242, 0.34), 0 0 96px rgba(255, 168, 88, 0.28);
  --moon-cutout-color: #070d17;
}

body[data-theme="sunrise"] {
  --theme-page-1: #2a2736;
  --theme-page-2: #c46e45;
  --theme-page-3: #ffe0a1;
  --theme-hero-1: rgba(48, 38, 49, 0.94);
  --theme-hero-2: rgba(196, 110, 69, 0.72);
  --theme-hero-3: rgba(255, 205, 119, 0.58);
  --theme-accent: #98542c;
  --theme-accent-soft: rgba(255, 179, 89, 0.22);
  --theme-warm: rgba(255, 140, 58, 0.82);
  --theme-grid: rgba(255, 209, 141, 0.09);
  --theme-image-opacity: 0;
  --theme-surface: rgba(255, 229, 189, 0.86);
  --theme-panel: rgba(255, 235, 205, 0.9);
  --theme-card: rgba(255, 245, 224, 0.94);
  --theme-control: rgba(255, 255, 255, 0.93);
  --theme-topbar: rgba(255, 232, 195, 0.88);
  --orb-size: 150px;
  --orb-x: 9vw;
  --orb-y: 38vh;
  --orb-opacity: 0.92;
  --orb-gradient: radial-gradient(circle at 46% 44%, #fff5bf 0 26%, #ffbc5e 50%, rgba(239, 118, 45, 0.24) 72%, transparent 73%);
  --orb-shadow: 0 0 92px rgba(255, 174, 82, 0.68), 0 0 160px rgba(229, 94, 46, 0.32);
}

body[data-theme="dhuhr"] {
  --theme-page-1: #ffffff;
  --theme-page-2: #eaf8ff;
  --theme-page-3: #f8ffff;
  --theme-hero-1: rgba(255, 255, 255, 0.97);
  --theme-hero-2: rgba(235, 249, 255, 0.93);
  --theme-hero-3: rgba(204, 232, 247, 0.74);
  --theme-accent: #12799a;
  --theme-accent-soft: rgba(45, 127, 163, 0.14);
  --theme-warm: rgba(206, 164, 74, 0.58);
  --theme-grid: rgba(45, 127, 163, 0.07);
  --theme-image-opacity: 0;
  --theme-surface: rgba(232, 246, 254, 0.9);
  --theme-panel: rgba(225, 243, 253, 0.9);
  --theme-card: rgba(241, 250, 255, 0.94);
  --theme-control: rgba(255, 255, 255, 0.94);
  --theme-topbar: rgba(255, 255, 255, 0.88);
  --orb-size: 174px;
  --orb-x: calc(50vw - 87px);
  --orb-y: 36px;
  --orb-opacity: 0.92;
  --orb-gradient: radial-gradient(circle at 48% 48%, #fffddf 0 30%, #ffe081 49%, rgba(255, 220, 104, 0.18) 74%, transparent 75%);
  --orb-shadow: 0 0 96px rgba(255, 219, 100, 0.5);
}

body[data-theme="asr"] {
  --theme-page-1: #fffdf0;
  --theme-page-2: #f3e4b8;
  --theme-page-3: #fff7df;
  --theme-hero-1: rgba(255, 253, 244, 0.97);
  --theme-hero-2: rgba(250, 244, 221, 0.92);
  --theme-hero-3: rgba(218, 236, 226, 0.72);
  --theme-accent: #0f7159;
  --theme-accent-soft: rgba(165, 139, 58, 0.15);
  --theme-warm: rgba(179, 139, 55, 0.68);
  --theme-grid: rgba(15, 113, 89, 0.07);
  --theme-image-opacity: 0;
  --theme-surface: rgba(250, 241, 217, 0.9);
  --theme-panel: rgba(248, 237, 210, 0.9);
  --theme-card: rgba(255, 248, 232, 0.94);
  --theme-control: rgba(255, 255, 255, 0.93);
  --theme-topbar: rgba(255, 252, 243, 0.88);
  --orb-size: 162px;
  --orb-x: calc(72vw - 81px);
  --orb-y: 116px;
  --orb-opacity: 0.78;
  --orb-gradient: radial-gradient(circle at 48% 48%, #fff3bb 0 27%, #e3bd68 50%, rgba(179, 139, 55, 0.2) 73%, transparent 74%);
  --orb-shadow: 0 0 82px rgba(205, 166, 75, 0.46);
}

body[data-theme="maghrib"] {
  --theme-page-1: #442238;
  --theme-page-2: #d96b3a;
  --theme-page-3: #ffd096;
  --theme-hero-1: rgba(78, 35, 49, 0.9);
  --theme-hero-2: rgba(217, 107, 58, 0.76);
  --theme-hero-3: rgba(255, 194, 115, 0.58);
  --theme-accent: #a95834;
  --theme-accent-soft: rgba(208, 96, 54, 0.17);
  --theme-warm: rgba(214, 98, 47, 0.78);
  --theme-grid: rgba(255, 202, 130, 0.09);
  --theme-image-opacity: 0;
  --theme-surface: rgba(255, 231, 218, 0.9);
  --theme-panel: rgba(255, 226, 209, 0.9);
  --theme-card: rgba(255, 242, 232, 0.94);
  --theme-control: rgba(255, 255, 255, 0.93);
  --theme-topbar: rgba(255, 232, 214, 0.88);
  --orb-size: 176px;
  --orb-x: calc(84vw - 88px);
  --orb-y: 44vh;
  --orb-opacity: 0.88;
  --orb-gradient: radial-gradient(circle at 48% 48%, #ffe2a5 0 22%, #d96f3a 48%, rgba(208, 96, 54, 0.28) 72%, transparent 73%);
  --orb-shadow: 0 0 100px rgba(214, 98, 47, 0.54);
}

body[data-theme="isha"] {
  --surface: #0d1a21;
  --surface-soft: #10242b;
  --ink: #effaf8;
  --muted: #a9c4c0;
  --soft-ink: #ddece8;
  --emerald-dark: #91e0d4;
  --faint: rgba(189, 219, 213, 0.22);
  --faint-strong: rgba(217, 239, 234, 0.32);
  --theme-page-1: #02060b;
  --theme-page-2: #07131c;
  --theme-page-3: #101f2a;
  --theme-hero-1: rgba(4, 9, 15, 0.92);
  --theme-hero-2: rgba(8, 20, 29, 0.9);
  --theme-hero-3: rgba(20, 42, 52, 0.72);
  --theme-accent: #91e0d4;
  --theme-accent-soft: rgba(145, 224, 212, 0.16);
  --theme-warm: rgba(201, 174, 105, 0.36);
  --theme-grid: rgba(145, 224, 212, 0.06);
  --theme-image-opacity: 0.2;
  --theme-surface: rgba(9, 22, 30, 0.86);
  --theme-panel: rgba(8, 18, 26, 0.88);
  --theme-card: rgba(14, 32, 40, 0.86);
  --theme-control: rgba(8, 20, 28, 0.92);
  --theme-topbar: rgba(5, 13, 20, 0.9);
  --orb-size: 128px;
  --orb-x: calc(83vw - 64px);
  --orb-y: 76px;
  --orb-opacity: 0.86;
  --orb-gradient: radial-gradient(circle at 36% 42%, #fffdf0 0 36%, #dcebef 56%, rgba(190, 214, 219, 0.22) 72%, transparent 73%);
  --orb-shadow: 0 0 58px rgba(220, 238, 242, 0.48), 0 0 120px rgba(145, 224, 212, 0.12);
  --moon-cutout-color: #02060b;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, var(--theme-page-1) 0%, var(--theme-page-2) 42%, var(--theme-page-3) 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  transition: background 900ms ease, color 250ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, var(--theme-grid) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-grid) 70%, transparent) 1px, transparent 1px),
    radial-gradient(circle at var(--orb-x) var(--orb-y), color-mix(in srgb, var(--theme-warm) 44%, transparent), transparent 28%),
    radial-gradient(ellipse at 50% 88%, color-mix(in srgb, var(--theme-page-3) 82%, transparent), transparent 46%),
    radial-gradient(ellipse at 50% 34%, color-mix(in srgb, var(--theme-page-2) 72%, transparent), transparent 52%),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-page-1) 36%, transparent), color-mix(in srgb, var(--theme-page-3) 92%, transparent) 62%, var(--theme-page-3));
  background-size: 72px 72px, 72px 72px, auto, auto, auto;
  opacity: 0.9;
  transition: opacity 250ms ease;
}

.sky-orb {
  position: fixed;
  top: var(--orb-y);
  left: var(--orb-x);
  z-index: 0;
  display: var(--orb-display);
  width: var(--orb-size);
  height: var(--orb-size);
  pointer-events: none;
  background: var(--orb-gradient);
  border-radius: 50%;
  box-shadow: var(--orb-shadow);
  filter: blur(var(--orb-blur));
  opacity: var(--orb-opacity);
  transition:
    top 900ms ease,
    left 900ms ease,
    width 900ms ease,
    height 900ms ease,
    opacity 700ms ease,
    background 900ms ease,
    box-shadow 900ms ease;
}

.sky-orb::after {
  position: absolute;
  top: 0;
  left: var(--moon-cutout-left);
  width: var(--moon-cutout-width);
  height: 100%;
  content: "";
  background: var(--moon-cutout-color);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 22px var(--moon-cutout-color);
  transition:
    left 500ms ease,
    width 500ms ease,
    opacity 500ms ease,
    background 900ms ease;
}

body[data-theme="fajr"] .sky-orb::after,
body[data-theme="isha"] .sky-orb::after {
  opacity: var(--moon-cutout-opacity);
}

button,
select {
  font: inherit;
}

svg {
  display: block;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 10px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--theme-topbar);
  border: 1px solid rgba(223, 233, 229, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--theme-accent), #0b634d);
  box-shadow: 0 12px 26px rgba(15, 122, 92, 0.24);
  border-radius: var(--radius);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(178px, auto) minmax(124px, auto);
  align-items: end;
  gap: 10px;
  width: min(650px, 100%);
}

.control-field {
  display: grid;
  gap: 6px;
}

.control-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.location-field {
  min-width: 250px;
}

.asr-field {
  min-width: 178px;
}

.location-select {
  width: 100%;
  min-height: 42px;
  padding: 0 38px 0 14px;
  color: var(--ink);
  background: var(--theme-control);
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 34, 36, 0.05);
}

.method-select {
  display: none;
}

.asr-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  gap: 4px;
  min-height: 42px;
  padding: 4px;
  background: color-mix(in srgb, var(--theme-control) 64%, var(--theme-accent-soft));
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 34, 36, 0.05);
}

.asr-option {
  min-height: 32px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
}

.asr-option[aria-pressed="true"] {
  color: var(--theme-accent);
  background: color-mix(in srgb, var(--theme-card) 74%, #fff);
  box-shadow: 0 5px 14px rgba(16, 34, 36, 0.09);
}

.asr-option:focus-visible {
  outline: 2px solid #9dccbb;
  outline-offset: 2px;
}

.focus-button {
  align-self: end;
  min-height: 42px;
  padding: 0 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--theme-accent), #0b634d);
  border: 1px solid rgba(10, 95, 72, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(15, 122, 92, 0.18);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 900;
}

.focus-button[aria-pressed="true"] {
  color: var(--theme-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-page-3) 70%, #fff), color-mix(in srgb, var(--theme-page-2) 62%, #fff));
  border-color: rgba(189, 126, 37, 0.48);
}

.focus-button:hover,
.focus-button:focus-visible,
.location-select:focus-visible {
  border-color: #9dccbb;
  outline: none;
}

.hero-band {
  position: relative;
  overflow: hidden;
  min-height: 278px;
  margin-top: 22px;
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, var(--theme-hero-1) 0%, var(--theme-hero-2) 52%, var(--theme-hero-3) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), var(--theme-accent-soft));
  box-shadow: var(--shadow);
  transition: background 700ms ease, box-shadow 250ms ease;
}

.hero-band::after {
  position: absolute;
  right: 26px;
  bottom: 20px;
  width: 210px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--theme-warm), transparent);
}

.hero-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(58%, 690px);
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: var(--theme-image-opacity);
  mask-image: linear-gradient(90deg, transparent 0%, #000 32%);
  transition: opacity 700ms ease;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  min-height: 278px;
  padding: 38px;
}

.location-line,
.today-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
}

.icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--theme-accent);
}

.icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 13px;
  font-size: clamp(2.8rem, 6vw, 5.9rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 1rem;
  letter-spacing: 0;
}

.next-prayer-panel {
  display: grid;
  gap: 11px;
  min-width: 250px;
  padding: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-card) 92%, #fff), color-mix(in srgb, var(--theme-page-2) 42%, var(--theme-card))),
    color-mix(in srgb, var(--theme-panel) 82%, transparent);
  border: 1px solid rgba(202, 223, 216, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.current-prayer-block,
.next-prayer-block {
  display: grid;
  gap: 4px;
}

.panel-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--theme-accent) 28%, transparent), transparent);
}

.panel-label,
.method-chip {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.next-prayer-panel strong {
  color: var(--theme-accent);
  font-size: 1.35rem;
  line-height: 1.2;
}

.current-prayer-block strong {
  font-size: 1.12rem;
}

.next-prayer-time {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1;
}

.countdown-line {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.daily-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.summary-item {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 16px;
  background: var(--theme-surface);
  border: 1px solid rgba(223, 233, 229, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.summary-icon {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--theme-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent-soft) 74%, #fff), color-mix(in srgb, var(--theme-card) 76%, #fff));
  border: 1px solid #d3e7df;
  border-radius: var(--radius);
}

.summary-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.summary-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.summary-item strong,
.summary-item small {
  display: block;
}

.summary-item strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.2;
}

.summary-item small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.summary-item small + small {
  margin-top: 1px;
  color: var(--theme-accent);
}

.dashboard-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 20px;
  margin-top: 20px;
}

.panel,
.fasting-band {
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--theme-panel) 86%, #fff), color-mix(in srgb, var(--theme-page-2) 38%, var(--theme-panel))),
    var(--theme-panel);
  box-shadow: 0 18px 48px rgba(16, 34, 36, 0.08);
  backdrop-filter: blur(18px);
  transition: box-shadow 250ms ease, background 700ms ease;
}

.panel {
  padding: 26px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.method-chip {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--theme-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent-soft) 72%, #fff), color-mix(in srgb, var(--theme-card) 86%, #fff));
  border: 1px solid #cce2d9;
  border-radius: 999px;
}

.prayer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.text-button {
  min-height: 33px;
  padding: 0 12px;
  color: var(--theme-accent);
  background: var(--theme-control);
  border: 1px solid #b8d9cb;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
}

.text-button:hover,
.text-button:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.selected-day-panel {
  display: grid;
  gap: 3px;
  margin-bottom: 14px;
  padding: 15px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-accent-soft) 58%, #fff), color-mix(in srgb, var(--theme-page-2) 42%, #fff)),
    linear-gradient(90deg, rgba(189, 126, 37, 0.24), transparent);
  border: 1px solid #c8e0d7;
  border-radius: var(--radius);
}

.selected-day-panel strong {
  font-size: 1.05rem;
}

.selected-day-panel span:last-child {
  color: var(--muted);
  font-weight: 700;
}

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prayer-card {
  display: grid;
  grid-template-columns: auto minmax(76px, 1fr) minmax(104px, auto);
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 17px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-card) 84%, #fff), color-mix(in srgb, var(--theme-page-2) 42%, var(--theme-card)));
  border: 1px solid rgba(223, 233, 229, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(16, 34, 36, 0.04);
}

.prayer-card.next {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-accent-soft) 58%, #fff), color-mix(in srgb, var(--theme-card) 96%, #fff)),
    linear-gradient(90deg, var(--theme-accent-soft), transparent);
  border-color: #9dccbb;
  box-shadow:
    inset 4px 0 0 var(--theme-accent),
    0 12px 28px color-mix(in srgb, var(--theme-accent) 12%, transparent);
}

.prayer-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--theme-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent-soft) 78%, #fff), color-mix(in srgb, var(--theme-card) 74%, #fff));
  border-radius: var(--radius);
}

.prayer-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.prayer-name {
  display: block;
  font-weight: 850;
}

.prayer-meta {
  display: block;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 650;
}

.prayer-time {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.source-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  color: var(--muted);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-page-2) 68%, #fff), color-mix(in srgb, var(--theme-page-3) 70%, var(--theme-card)));
  border: 1px solid #dbecea;
  border-radius: var(--radius);
}

.source-note p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.calendar-heading {
  align-items: center;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: var(--theme-control);
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--theme-accent);
  border-color: #aed4c5;
  outline: none;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day,
.calendar-empty {
  min-height: 92px;
  padding: 9px;
  border-radius: var(--radius);
}

.calendar-empty {
  background: color-mix(in srgb, var(--theme-card) 56%, transparent);
}

.calendar-day {
  display: flex;
  flex-direction: column;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  gap: 6px;
  background: var(--theme-card);
  border: 1px solid rgba(223, 233, 229, 0.96);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.calendar-day:hover,
.calendar-day:focus-visible {
  border-color: #9dccbb;
  box-shadow: 0 10px 24px rgba(16, 34, 36, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.calendar-day.today {
  border-color: var(--theme-accent);
  box-shadow:
    inset 0 0 0 1px var(--theme-accent),
    0 8px 18px color-mix(in srgb, var(--theme-accent) 12%, transparent);
}

.calendar-day.selected {
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent-soft) 58%, #fff), color-mix(in srgb, var(--theme-page-3) 78%, #fff));
  border-color: var(--gold);
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 10px 24px rgba(189, 126, 37, 0.12);
}

.calendar-number-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.gregorian-day {
  font-weight: 850;
}

.hijri-day {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.tag-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}

.day-tag,
.legend {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 850;
  line-height: 1.1;
}

.fast {
  color: #0f5f4a;
  background: #e4f3ee;
}

.white-days {
  color: #23657f;
  background: #e7f4fa;
}

.ramadan {
  color: #684610;
  background: var(--gold-soft);
}

.special {
  color: #74420c;
  background: #ffead0;
}

.shawwal {
  color: #19666c;
  background: #e4f8f9;
}

.eid {
  color: var(--red);
  background: var(--red-soft);
}

.more-tag {
  color: var(--muted);
  background: #f1f5f3;
}

.fasting-band {
  margin-top: 20px;
  padding: 26px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-panel) 86%, #fff), color-mix(in srgb, var(--theme-page-3) 80%, var(--theme-panel))),
    radial-gradient(circle at 8% 15%, var(--theme-accent-soft), transparent 30%);
}

.legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.info-panel {
  padding: 18px 18px 12px;
  background: color-mix(in srgb, var(--theme-card) 76%, transparent);
  border: 1px solid rgba(223, 233, 229, 0.92);
  border-radius: var(--radius);
}

.info-panel h3 {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 8px;
  color: var(--soft-ink);
}

.event-list {
  display: grid;
  gap: 0;
}

.event-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 14px 0;
  border-top: 1px solid var(--faint);
}

.event-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.event-title {
  display: block;
  margin-bottom: 2px;
  font-weight: 850;
}

.event-date {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.event-item .day-tag {
  justify-self: end;
  white-space: nowrap;
}

.calendar-help {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.today-focus .daily-strip,
.today-focus .calendar-panel,
.today-focus .fasting-band {
  display: none;
}

.today-focus .dashboard-grid {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.today-focus .prayer-panel {
  width: 100%;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 28px 0 38px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--emerald-dark);
  font-weight: 800;
  text-decoration: none;
}

.loading,
.error {
  color: var(--muted);
  padding: 12px;
  background: color-mix(in srgb, var(--theme-card) 86%, #fff);
  border: 1px solid var(--faint);
  border-radius: var(--radius);
}

.error {
  color: var(--red);
  background: var(--red-soft);
}

@media (max-width: 920px) {
  .topbar,
  .hero-content,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
    padding: 16px 0;
    margin-top: 0;
    border-radius: 0;
    border-right: 0;
    border-left: 0;
  }

  .topbar-actions,
  .location-select,
  .focus-button {
    width: 100%;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .location-field,
  .asr-field {
    min-width: 0;
    width: 100%;
  }

  .asr-toggle {
    width: 100%;
  }

  .hero-content {
    min-height: 330px;
    justify-content: flex-end;
    padding: 24px;
  }

  .hero-art {
    width: 100%;
    opacity: 0.46;
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  }

  .next-prayer-panel {
    min-width: 0;
  }

  .dashboard-grid,
  .info-grid,
  .daily-strip {
    grid-template-columns: 1fr;
  }

  .method-chip {
    align-self: flex-start;
  }

  .prayer-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  html {
    scroll-behavior: auto;
  }

  body {
    background:
      linear-gradient(160deg, var(--theme-page-1), var(--theme-page-2) 52%, var(--theme-page-3));
    transition: none;
  }

  body::before {
    display: block;
    background:
      radial-gradient(circle at var(--orb-x) var(--orb-y), color-mix(in srgb, var(--theme-warm) 32%, transparent), transparent 36%),
      radial-gradient(ellipse at 50% 92%, color-mix(in srgb, var(--theme-page-3) 78%, transparent), transparent 48%),
      linear-gradient(180deg, color-mix(in srgb, var(--theme-page-1) 34%, transparent), color-mix(in srgb, var(--theme-page-2) 52%, transparent) 48%, var(--theme-page-3));
    background-size: auto;
    opacity: 0.82;
  }

  .sky-orb {
    width: calc(var(--orb-size) * 0.72);
    height: calc(var(--orb-size) * 0.72);
    transition: opacity 450ms ease, background 450ms ease;
  }

  .site-shell {
    width: 100%;
  }

  .topbar {
    gap: 12px;
    min-height: auto;
    padding: 14px 12px 16px;
    background: color-mix(in srgb, var(--theme-topbar) 92%, #fff);
    box-shadow: 0 1px 0 rgba(16, 34, 36, 0.08);
  }

  .brand {
    gap: 10px;
    font-size: 0.96rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    box-shadow: none;
  }

  .topbar-actions {
    gap: 9px;
  }

  .control-field {
    gap: 5px;
  }

  .control-label {
    font-size: 0.76rem;
  }

  .location-select,
  .focus-button {
    min-height: 48px;
    font-size: 0.96rem;
  }

  .asr-toggle {
    min-height: 48px;
    padding: 4px;
    background: color-mix(in srgb, var(--theme-control) 72%, var(--theme-accent-soft));
    box-shadow: none;
  }

  .asr-option {
    min-height: 38px;
    font-size: 0.92rem;
  }

  .asr-option[aria-pressed="true"] {
    box-shadow: 0 1px 5px rgba(16, 34, 36, 0.1);
  }

  .focus-button {
    margin-top: 2px;
    box-shadow: none;
  }

  .hero-band,
  .daily-strip,
  .dashboard-grid,
  .fasting-band,
  .footer {
    margin-right: 10px;
    margin-left: 10px;
  }

  .panel,
  .fasting-band,
  .summary-item,
  .topbar,
  .next-prayer-panel {
    backdrop-filter: none;
    box-shadow: none;
  }

  .panel,
  .fasting-band {
    padding: 16px;
  }

  .hero-content {
    min-height: 244px;
    padding: 18px;
  }

  .hero-band {
    min-height: 244px;
    margin-top: 12px;
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--theme-hero-1) 78%, var(--theme-page-1)), color-mix(in srgb, var(--theme-page-2) 88%, var(--theme-page-3)));
    box-shadow: none;
    transition: none;
  }

  .hero-band::after,
  .hero-art {
    display: none;
  }

  h1 {
    margin-bottom: 10px;
    font-size: clamp(2.15rem, 14vw, 3.35rem);
    line-height: 0.98;
  }

  h2 {
    font-size: 1.28rem;
  }

  .location-line,
  .today-line {
    font-size: 0.9rem;
  }

  .next-prayer-panel {
    gap: 4px;
    padding: 15px;
  }

  .next-prayer-time {
    font-size: 1.78rem;
  }

  .daily-strip {
    gap: 8px;
  }

  .summary-item {
    min-height: 76px;
    padding: 13px;
  }

  .panel,
  .fasting-band,
  .summary-item,
  .next-prayer-panel,
  .prayer-card,
  .calendar-day,
  .calendar-empty,
  .info-panel,
  .source-note,
  .selected-day-panel {
    transition: none;
  }

  .prayer-grid {
    grid-template-columns: 1fr;
  }

  .prayer-card {
    grid-template-columns: auto minmax(70px, 1fr) minmax(98px, auto);
    min-height: 82px;
    padding: 14px;
    box-shadow: none;
  }

  .prayer-time {
    font-size: 1.42rem;
  }

  .calendar-day,
  .calendar-empty {
    min-height: 70px;
    padding: 5px;
  }

  .calendar-day:hover,
  .calendar-day:focus-visible {
    box-shadow: none;
    transform: none;
  }

  .calendar-day.today,
  .calendar-day.selected {
    box-shadow: inset 0 0 0 1px currentColor;
  }

  .calendar-heading {
    flex-direction: row;
    align-items: center;
  }

  .calendar-heading h2 {
    font-size: 1.35rem;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 4px;
  }

  .calendar-weekdays {
    font-size: 0.66rem;
  }

  .gregorian-day {
    font-size: 0.92rem;
  }

  .hijri-day {
    font-size: 0.62rem;
  }

  .calendar-day .day-tag {
    width: 12px;
    min-height: 12px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    border-radius: 999px;
    text-indent: -999px;
  }

  .calendar-panel,
  .fasting-band {
    content-visibility: auto;
    contain-intrinsic-size: 760px;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
