:root {
  --experience-ink: #17211d;
  --experience-muted: #726d63;
  --experience-gold: #b77a2a;
  --experience-gold-soft: #e8c791;
  --experience-paper: #fbf6ec;
  --experience-line: rgba(43, 49, 43, 0.17);
  --experience-glass: rgba(255, 252, 244, 0.62);
  --experience-sans: "Manrope", "Segoe UI Variable", "Segoe UI", sans-serif;
  --experience-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --experience-mono: "DM Mono", Consolas, monospace;
}

body.prayer-experience {
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--experience-ink);
  background: var(--experience-paper);
  font-family: var(--experience-sans);
}

body.prayer-experience .site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border: 0;
  background: linear-gradient(180deg, rgba(252, 247, 237, 0.92), rgba(252, 247, 237, 0));
  backdrop-filter: none;
}

body.prayer-experience .site-header__inner {
  min-height: 78px;
  padding-block: 16px;
}

body.prayer-experience .site-brand img {
  width: 198px;
  max-height: 45px;
  object-fit: contain;
  object-position: left center;
}

body.prayer-experience .main-nav {
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(79, 70, 54, 0.16);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.74);
  box-shadow: 0 12px 32px rgba(83, 60, 27, 0.08);
  backdrop-filter: blur(14px);
}

body.prayer-experience .main-nav a,
body.prayer-experience .main-nav button {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: var(--experience-sans);
  font-size: 12px;
  font-weight: 700;
}

body.prayer-experience .main-nav a:first-child {
  color: #8a581d;
  background: rgba(226, 181, 112, 0.2);
}

body.prayer-experience .endorsement {
  color: #6b675f;
}

body.prayer-experience .endorsement__wordmark {
  border-color: rgba(23, 33, 29, 0.2);
  color: #fff;
  background: #17211d;
  box-shadow: none;
}

body.prayer-experience main,
body.prayer-experience #page-root {
  min-height: 100svh;
}

body.prayer-experience .site-footer {
  display: none;
}

.prayer-stage {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  background: #e9dfcd;
}

.prayer-stage::before {
  position: absolute;
  inset: -3%;
  z-index: -3;
  content: "";
  background-image: var(--state-mosque);
  background-position: center 42%;
  background-size: cover;
  filter: saturate(0.72) contrast(0.92);
  transform: scale(1.025);
}

.prayer-stage::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(90deg, rgba(252, 247, 237, 0.94), rgba(252, 247, 237, 0.71) 42%, rgba(252, 247, 237, 0.83)),
    linear-gradient(180deg, rgba(255, 252, 244, 0.52), rgba(255, 249, 238, 0.1) 43%, rgba(246, 238, 222, 0.84));
}

.prayer-stage__wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.52;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.9), transparent 32%),
    linear-gradient(rgba(81, 64, 41, 0.045) 1px, transparent 1px);
  background-size: auto, 100% 44px;
  pointer-events: none;
}

.prayer-stage__content {
  position: relative;
  display: flex;
  min-height: 100svh;
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 84px 0 22px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.prayer-intro {
  width: 100%;
  flex: 0 0 auto;
  text-align: center;
}

.prayer-intro__date,
.prayer-intro__label {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.prayer-intro__date {
  color: #706a60;
  font: 700 13px/1.4 var(--experience-sans);
}

.prayer-intro__label {
  margin-top: 15px;
  color: #756d61;
  font: 700 14px/1.4 var(--experience-sans);
}

.prayer-intro__name {
  margin: 2px 0 0;
  color: #171b1a;
  font: 400 clamp(72px, 8vw, 105px) / 0.96 var(--experience-serif);
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.prayer-intro__note {
  min-height: 23px;
  margin: 8px 0 0;
  color: #69635a;
  font-size: 14px;
}

.prayer-countdown {
  display: flex;
  flex: 0 0 auto;
  margin-top: 8px;
  align-items: baseline;
  gap: 17px;
}

.prayer-countdown time {
  color: var(--experience-gold);
  font: 700 clamp(38px, 4.6vw, 58px) / 1 var(--experience-mono);
  letter-spacing: -0.075em;
  white-space: nowrap;
}

.prayer-countdown time b {
  margin-left: 2px;
  font-size: 0.26em;
  letter-spacing: 0;
  text-transform: uppercase;
}

.prayer-countdown p {
  margin: 0;
  color: #6d665d;
  font-size: 14px;
  white-space: nowrap;
}

.prayer-timeline {
  position: relative;
  display: grid;
  width: 100%;
  flex: 0 0 auto;
  margin-top: 18px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.prayer-timeline__track {
  position: absolute;
  top: 42px;
  right: 5%;
  left: 5%;
  height: 1px;
  overflow: visible;
  background: rgba(58, 51, 43, 0.2);
}

.prayer-timeline__track span {
  display: block;
  width: 0;
  height: 2px;
  margin-top: -1px;
  background: var(--experience-gold);
  transition: width 0.5s ease;
}

.timeline-event {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0 5px;
  grid-template-rows: 22px 40px 20px;
  justify-items: center;
  color: #80786e;
  text-align: center;
}

.timeline-event__name {
  font-size: 13px;
}

.timeline-event__dot {
  position: relative;
  z-index: 2;
  width: 9px;
  height: 9px;
  margin-top: 16px;
  border: 2px solid rgba(255, 252, 244, 0.86);
  border-radius: 50%;
  background: #d5cec1;
  box-shadow: 0 0 0 1px rgba(55, 47, 38, 0.09);
}

.timeline-event__time {
  font: 700 12px/1.2 var(--experience-mono);
  white-space: nowrap;
}

.timeline-event[data-state="passed"] {
  color: #9b6527;
}

.timeline-event[data-state="passed"] .timeline-event__dot {
  background: var(--experience-gold);
}

.timeline-event[data-state="next"] {
  color: #1d211f;
}

.timeline-event[data-state="next"] .timeline-event__dot {
  width: 17px;
  height: 17px;
  margin-top: 12px;
  background: var(--experience-gold);
  box-shadow: 0 0 0 7px rgba(183, 122, 42, 0.14);
}

.daily-prayers {
  display: grid;
  width: 100%;
  flex: 0 0 auto;
  margin-top: 10px;
  overflow: hidden;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border: 1px solid rgba(72, 61, 47, 0.16);
  border-radius: 20px;
  background: rgba(255, 252, 246, 0.57);
  box-shadow: 0 20px 70px rgba(77, 56, 27, 0.08);
  backdrop-filter: blur(13px);
}

.daily-prayer {
  position: relative;
  min-width: 0;
  min-height: 92px;
  padding: 14px 14px 12px;
  border-right: 1px solid rgba(72, 61, 47, 0.14);
  background: transparent;
}

.daily-prayer:last-child {
  border-right: 0;
}

.daily-prayer__name {
  display: block;
  color: #49463f;
  font-size: 13px;
}

.daily-prayer__badge {
  position: absolute;
  top: 15px;
  right: 10px;
  min-height: 17px;
  color: #fff;
  font: 700 8px/17px "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.06em;
}

.daily-prayer__time {
  display: block;
  margin-top: 12px;
  color: #242725;
  font: 700 clamp(18px, 2vw, 27px) / 1 var(--experience-mono);
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.daily-prayer__time small {
  font-size: 0.54em;
  letter-spacing: 0;
}

.daily-prayer[data-state="next"] {
  background: rgba(183, 122, 42, 0.16);
}

.daily-prayer[data-state="next"] .daily-prayer__badge {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--experience-gold);
}

.daily-prayer[data-state="current"] {
  box-shadow: inset 0 3px 0 var(--experience-gold);
}

.prayer-stage__actions {
  display: flex;
  width: 100%;
  flex: 0 0 auto;
  margin-top: 8px;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.quiet-action {
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid rgba(67, 57, 44, 0.18);
  border-radius: 999px;
  color: #383831;
  background: rgba(255, 252, 246, 0.5);
  font-family: var(--experience-sans);
  font-weight: 700;
  cursor: pointer;
}

.quiet-action:hover {
  border-color: rgba(183, 122, 42, 0.65);
  color: #89591f;
}

.source-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #7a746a;
  font: 700 10px/1.4 var(--experience-sans);
  letter-spacing: 0.06em;
}

.source-line i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #7fa53c;
  box-shadow: 0 0 0 4px rgba(127, 165, 60, 0.13);
}

.prayer-experience .data-notice {
  width: min(600px, 100%);
  margin: 12px auto 0;
  padding: 9px 14px;
  border-radius: 12px;
  color: #704e22;
  background: rgba(255, 241, 210, 0.8);
  font-size: 12px;
  text-align: center;
}

.mosque-credit {
  position: absolute;
  right: 0;
  bottom: 25px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: rgba(61, 57, 50, 0.7);
  font-size: 10px;
}

.mosque-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.location-chip {
  position: fixed;
  top: 90px;
  right: 28px;
  z-index: 45;
}

.location-chip button {
  display: flex;
  min-width: 184px;
  padding: 10px 14px;
  border: 1px solid rgba(71, 62, 49, 0.18);
  border-radius: 999px;
  align-items: center;
  gap: 9px;
  color: #35362f;
  background: rgba(255, 252, 246, 0.62);
  text-align: left;
  box-shadow: 0 10px 35px rgba(83, 60, 27, 0.07);
  backdrop-filter: blur(13px);
  cursor: pointer;
}

.location-chip button > span:first-child {
  color: var(--experience-gold);
  font-size: 19px;
}

.location-chip b,
.location-chip small {
  display: block;
}

.location-chip b {
  font-size: 12px;
}

.location-chip small {
  margin-top: 1px;
  color: #787168;
  font: 700 8px/1.3 "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.experience-footer {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 20;
  display: flex;
  width: min(1180px, calc(100% - 64px));
  justify-content: space-between;
  transform: translateX(-50%);
  color: rgba(65, 61, 54, 0.68);
  font: 700 10px/1.3 var(--experience-sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.experience-footer a {
  color: inherit;
}

.mobile-dock,
.mobile-more-sheet,
.experience-toast {
  display: none;
}

@media (min-width: 901px) {
  body.prayer-experience {
    height: 100vh;
    overflow: hidden;
  }

  body.prayer-experience main,
  body.prayer-experience #page-root,
  .prayer-stage,
  .prayer-stage__content {
    height: 100vh;
    min-height: 0;
  }
}

body.prayer-experience .location-dialog {
  width: min(610px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--experience-ink);
  background: #fffdf8;
  box-shadow: 0 30px 100px rgba(33, 28, 20, 0.28);
}

body.prayer-experience .location-dialog::backdrop {
  background: rgba(27, 28, 25, 0.52);
  backdrop-filter: blur(7px);
}

body.prayer-experience .location-dialog__panel {
  padding: 34px;
}

body.prayer-experience .location-dialog .button--dark {
  color: #fff;
  background: #26342e;
}

body.prayer-experience .location-dialog .button--lime {
  color: #fff;
  background: var(--experience-gold);
}

body.prayer-experience .location-dialog select {
  border-color: rgba(78, 66, 49, 0.23);
  border-radius: 13px;
  background: #fffdf8;
}

@media (max-width: 900px) {
  body.prayer-experience .site-header__inner {
    width: calc(100% - 28px);
    min-height: 66px;
    padding-block: 12px;
  }

  body.prayer-experience .site-brand img {
    width: 152px;
    max-height: 39px;
  }

  body.prayer-experience .main-nav,
  body.prayer-experience .endorsement {
    display: none;
  }

  .location-chip {
    top: 13px;
    right: 14px;
  }

  .location-chip button {
    min-width: 0;
    max-width: 185px;
    min-height: 41px;
    padding: 7px 11px;
    background: rgba(255, 253, 248, 0.76);
  }

  .location-chip button > span:first-child {
    font-size: 16px;
  }

  .location-chip b {
    overflow: hidden;
    max-width: 108px;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .location-chip small {
    font-size: 7px;
  }

  .prayer-stage::before {
    background-position: center center;
  }

  .prayer-stage::after {
    background:
      linear-gradient(180deg, rgba(253, 249, 240, 0.93), rgba(253, 249, 240, 0.66) 38%, rgba(253, 249, 240, 0.88));
  }

  .prayer-stage__content {
    min-height: 100svh;
    width: calc(100% - 34px);
    padding: 82px 0 92px;
    justify-content: flex-start;
  }

  .prayer-intro__date {
    min-height: 16px;
    margin-top: 7px;
    padding-inline: 20px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .prayer-intro__label {
    margin-top: 17px;
    font-size: 12px;
    letter-spacing: 0.18em;
  }

  .prayer-intro__name {
    margin-top: 2px;
    font-size: clamp(59px, 19vw, 78px);
    line-height: 0.98;
  }

  .prayer-intro__note {
    margin-top: 3px;
    font-size: 13px;
  }

  .prayer-countdown {
    display: block;
    margin-top: 12px;
    text-align: center;
  }

  .prayer-countdown time {
    display: block;
    font-size: clamp(28px, 9.2vw, 40px);
    letter-spacing: -0.07em;
  }

  .prayer-countdown time b {
    font-size: 0.28em;
  }

  .prayer-countdown p {
    margin-top: 4px;
    font-size: 11px;
  }

  .prayer-timeline {
    display: flex;
    width: min(340px, 100%);
    margin-top: 19px;
    padding: 4px 0;
    flex-direction: column;
  }

  .prayer-timeline__track {
    top: 14px;
    bottom: 14px;
    left: 12px;
    width: 1px;
    height: auto;
    background: rgba(58, 51, 43, 0.18);
  }

  .prayer-timeline__track span {
    width: 2px !important;
    height: var(--mobile-progress, 0%);
    margin: 0 0 0 -1px;
  }

  .timeline-event {
    display: grid;
    min-height: 34px;
    padding: 0 0 0 33px;
    grid-template: "dot name time" 34px / 0 1fr auto;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .timeline-event__dot {
    position: absolute;
    left: 8px;
    width: 9px;
    height: 9px;
    margin: 0;
  }

  .timeline-event__name {
    grid-area: name;
    color: #4d4b45;
    font-size: 13px;
  }

  .timeline-event__time {
    grid-area: time;
    color: #373a35;
    font-size: 13px;
  }

  .timeline-event[data-state="next"] {
    min-height: 40px;
    margin: 1px 0;
    border-radius: 12px;
    background: rgba(183, 122, 42, 0.12);
  }

  .timeline-event[data-state="next"] .timeline-event__dot {
    left: 4px;
    width: 17px;
    height: 17px;
    margin: 0;
  }

  .timeline-event[data-state="next"] .timeline-event__name,
  .timeline-event[data-state="next"] .timeline-event__time {
    color: #8b591c;
    font-weight: 800;
  }

  .daily-prayers {
    display: none;
  }

  .prayer-stage__actions {
    margin-top: 13px;
  }

  .quiet-action {
    min-height: 35px;
    padding-inline: 13px;
    font-size: 12px;
  }

  .source-line,
  .mosque-credit,
  .experience-footer {
    display: none;
  }

  .mobile-dock {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    display: grid;
    height: 68px;
    padding: 5px 8px max(5px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid rgba(69, 59, 44, 0.15);
    background: rgba(255, 252, 246, 0.92);
    box-shadow: 0 -10px 40px rgba(75, 55, 25, 0.08);
    backdrop-filter: blur(16px);
  }

  .mobile-dock a,
  .mobile-dock button {
    display: flex;
    border: 0;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    color: #777168;
    background: transparent;
    font: 700 10px/1.2 var(--experience-sans);
    cursor: pointer;
  }

  .mobile-dock span {
    color: #8d7961;
    font: 700 19px/1 system-ui, sans-serif;
  }

  .mobile-dock [aria-current="page"],
  .mobile-dock [aria-current="page"] span {
    color: var(--experience-gold);
  }

  .mobile-more-sheet {
    position: fixed;
    right: 12px;
    bottom: 76px;
    left: 12px;
    z-index: 80;
    display: grid;
    max-height: calc(100svh - 98px);
    padding: 25px;
    overflow: auto;
    grid-template-columns: 1fr;
    border: 1px solid rgba(66, 57, 43, 0.18);
    border-radius: 22px;
    background: #fffdf8;
    box-shadow: 0 24px 90px rgba(33, 29, 23, 0.23);
  }

  .mobile-more-sheet[hidden] {
    display: none;
  }

  .mobile-more-sheet p {
    margin: 0 0 12px;
    color: #9a6828;
    font: 800 10px/1.3 "IBM Plex Mono", Consolas, monospace;
    letter-spacing: 0.14em;
  }

  .mobile-more-sheet a {
    padding: 11px 0;
    border-bottom: 1px solid rgba(72, 62, 48, 0.12);
    color: #2f342f;
    font-weight: 700;
  }

  .mobile-more-sheet__close {
    position: absolute;
    top: 12px;
    right: 13px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #343731;
    background: #f2eadc;
    font-size: 22px;
  }

  .experience-toast {
    position: fixed;
    right: 20px;
    bottom: 82px;
    left: 20px;
    z-index: 90;
    display: block;
    padding: 12px 16px;
    border-radius: 14px;
    color: #fff;
    background: #26342e;
    font-size: 12px;
    text-align: center;
    box-shadow: 0 16px 45px rgba(30, 34, 30, 0.22);
  }

  .experience-toast[hidden] {
    display: none;
  }

  body.prayer-experience .location-dialog__panel {
    padding: 26px 20px 22px;
  }
}

@media (max-width: 420px) and (max-height: 760px) {
  .prayer-stage__content {
    padding-top: 70px;
  }

  .prayer-intro__label {
    margin-top: 10px;
  }

  .prayer-intro__name {
    font-size: 54px;
  }

  .prayer-countdown {
    margin-top: 7px;
  }

  .prayer-timeline {
    margin-top: 10px;
  }

  .timeline-event {
    min-height: 29px;
    grid-template-rows: 29px;
  }

  .timeline-event[data-state="next"] {
    min-height: 34px;
  }

  .prayer-stage__actions {
    margin-top: 6px;
  }
}

/* 4014.2 — navigation, location and Takwim refinement */
body.prayer-experience .site-header__inner,
body.timetable-experience .site-header__inner {
  display: grid;
  width: min(1240px, calc(100% - 48px));
  grid-template-columns: auto minmax(330px, 1fr) auto auto;
  align-items: center;
  gap: 15px;
}

body.prayer-experience .main-nav,
body.timetable-experience .main-nav {
  justify-self: center;
  gap: 4px;
  border-color: rgba(79, 70, 54, 0.16);
  background: rgba(255, 253, 248, 0.76);
  box-shadow: 0 12px 34px rgba(83, 60, 27, 0.08);
}

body.prayer-experience .main-nav a:first-child,
body.timetable-experience .main-nav a[href="/takwim/"] {
  color: #8a581d;
  background: rgba(226, 181, 112, 0.22);
}

body.timetable-experience .main-nav a:first-child {
  color: inherit;
  background: transparent;
}

.header-location {
  display: inline-flex;
  min-width: 150px;
  min-height: 46px;
  padding: 7px 13px;
  border: 1px solid rgba(79, 70, 54, 0.2);
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  color: #343932;
  background: rgba(255, 253, 248, 0.84);
  text-align: left;
  box-shadow: 0 9px 30px rgba(83, 60, 27, 0.05);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

body:not(.prayer-experience):not(.timetable-experience) .header-location {
  display: none;
}

.header-location__pin {
  color: var(--experience-gold);
  font-size: 18px;
}

.header-location b,
.header-location small {
  display: block;
}

.header-location b {
  overflow: hidden;
  max-width: 118px;
  font-family: var(--experience-sans);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-location small {
  margin-top: 1px;
  color: #777068;
  font: 700 9px/1.3 var(--experience-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.prayer-experience .endorsement,
body.timetable-experience .endorsement {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  white-space: nowrap;
}

body.prayer-experience .endorsement > span,
body.timetable-experience .endorsement > span {
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.18em;
}

body.prayer-experience .endorsement a,
body.timetable-experience .endorsement a {
  padding: 0;
  border: 0;
  background: transparent;
}

body.prayer-experience .endorsement__wordmark,
body.timetable-experience .endorsement__wordmark {
  display: inline-flex;
  min-height: 0;
  padding: 0;
  border: 0;
  align-items: center;
  overflow: visible;
  color: #17211d;
  background: transparent;
  font-family: var(--experience-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.045em;
}

body.prayer-experience .endorsement__wordmark > span,
body.timetable-experience .endorsement__wordmark > span {
  color: #91b72c;
  text-shadow: 0 0 10px rgba(145, 183, 44, 0.42);
}

.prayer-stage::before {
  filter: saturate(0.94) contrast(0.94);
}

.prayer-stage::after {
  background:
    linear-gradient(90deg, rgba(252, 247, 237, 0.78), rgba(252, 247, 237, 0.5) 42%, rgba(248, 239, 221, 0.65)),
    linear-gradient(180deg, rgba(255, 249, 236, 0.32), rgba(255, 249, 238, 0.06) 45%, rgba(236, 222, 194, 0.68));
}

.daily-prayers {
  margin-top: 42px;
}

.prayer-stage__actions {
  margin-top: 11px;
}

.quiet-action {
  min-height: 34px;
  padding: 0 13px;
  font-size: 11px;
}

.mosque-credit {
  right: 0;
  bottom: 45px;
}

.experience-footer {
  align-items: center;
}

.experience-footer nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.experience-footer a:hover {
  color: #8b591c;
}

body.prayer-experience .location-dialog,
body.timetable-experience .location-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: min(780px, calc(100svh - 28px));
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--experience-ink);
  background: #fffdf8;
  box-shadow: 0 30px 100px rgba(33, 28, 20, 0.3);
}

body.prayer-experience .location-dialog::backdrop,
body.timetable-experience .location-dialog::backdrop {
  background: rgba(27, 28, 25, 0.58);
  backdrop-filter: blur(8px);
}

body.prayer-experience .location-dialog__panel,
body.timetable-experience .location-dialog__panel {
  padding: 30px;
}

.location-search {
  display: flex;
  min-height: 48px;
  margin: 18px 0 10px;
  padding: 0 14px;
  border: 1px solid rgba(78, 66, 49, 0.2);
  border-radius: 13px;
  align-items: center;
  gap: 8px;
  background: #fff;
}

.location-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #27302b;
  background: transparent;
  font: inherit;
}

.location-results {
  max-height: min(330px, 38svh);
  margin-top: 17px;
  padding-right: 5px;
  overflow: auto;
}

.location-group + .location-group {
  margin-top: 15px;
}

.location-group h3 {
  margin: 0 0 8px;
  color: #8b7455;
  font: 800 10px/1.3 "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.location-group__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.location-group__choices button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(72, 61, 47, 0.18);
  border-radius: 999px;
  color: #464640;
  background: #fffdf8;
  cursor: pointer;
}

.location-group__choices button:hover {
  border-color: var(--experience-gold);
  color: #80531d;
  background: #fbf0dc;
}

.location-group__choices small {
  color: #989187;
  font: 700 8px/1 "IBM Plex Mono", Consolas, monospace;
}

.manual-zone {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid rgba(72, 61, 47, 0.14);
}

.manual-zone summary {
  color: #6d665c;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.manual-zone .field {
  margin-top: 12px;
}

.manual-zone .button {
  margin-top: 13px;
}

/* Takwim is a separate, scrollable reference page. */
body.timetable-experience {
  min-height: 100svh;
  color: var(--experience-ink);
  background:
    linear-gradient(rgba(251, 246, 236, 0.78), rgba(247, 238, 220, 0.9)),
    var(--state-mosque) center 28% / cover fixed;
  font-family: var(--experience-sans);
}

body.timetable-experience .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(74, 64, 48, 0.13);
  background: rgba(252, 247, 237, 0.82);
  backdrop-filter: blur(18px);
}

body.timetable-experience .site-footer {
  display: block;
}

.timetable-hero {
  padding: 68px 0 38px;
}

.timetable-hero__inner {
  display: flex;
  min-height: 230px;
  padding: 48px;
  border: 1px solid rgba(79, 65, 45, 0.14);
  border-radius: 28px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  background:
    linear-gradient(100deg, rgba(255, 251, 242, 0.91), rgba(255, 248, 235, 0.55)),
    var(--state-mosque) center 43% / cover;
  box-shadow: 0 24px 70px rgba(74, 52, 24, 0.1);
}

.timetable-hero h1 {
  margin: 4px 0 8px;
  font: 400 clamp(56px, 7vw, 92px) / 0.98 var(--experience-serif);
  letter-spacing: -0.05em;
}

.timetable-hero p {
  max-width: 680px;
  margin-bottom: 0;
  color: #676158;
}

.timetable-location {
  display: flex;
  min-width: 210px;
  padding: 12px 15px;
  border: 1px solid rgba(78, 65, 47, 0.19);
  border-radius: 15px;
  align-items: center;
  gap: 10px;
  color: #303631;
  background: rgba(255, 252, 246, 0.78);
  text-align: left;
  cursor: pointer;
}

.timetable-location b,
.timetable-location small {
  display: block;
}

.timetable-location small {
  margin-top: 2px;
  color: #7c756b;
}

.timetable-section {
  padding: 0 0 78px;
}

.timetable-card {
  overflow: hidden;
  border: 1px solid rgba(74, 63, 47, 0.16);
  border-radius: 25px;
  background: rgba(255, 253, 248, 0.89);
  box-shadow: 0 22px 65px rgba(68, 49, 23, 0.1);
  backdrop-filter: blur(18px);
}

.timetable-card__heading {
  display: flex;
  padding: 28px 30px 18px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.timetable-card__heading h2 {
  margin: 3px 0 0;
  font: 700 clamp(29px, 4vw, 44px) / 1.06 var(--experience-sans);
}

.timetable-calendar-toggle {
  display: flex;
  padding: 4px;
  border: 1px solid rgba(75, 62, 44, 0.16);
  border-radius: 999px;
  background: #f7efe2;
}

.timetable-calendar-toggle button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #6d665c;
  background: transparent;
  cursor: pointer;
}

.timetable-calendar-toggle button[aria-pressed="true"] {
  color: #fff;
  background: #8b591c;
}

.timetable-controls {
  display: grid;
  padding: 0 30px 20px;
  grid-template-columns: 44px minmax(160px, 1fr) minmax(130px, 0.65fr) 44px;
  gap: 8px;
}

.timetable-controls label {
  display: grid;
  gap: 5px;
  color: #756e64;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.timetable-controls select,
.timetable-step {
  min-height: 44px;
  border: 1px solid rgba(75, 62, 44, 0.17);
  border-radius: 12px;
  color: #30342f;
  background: #fffdf8;
  font: inherit;
}

.timetable-step {
  align-self: end;
  font-size: 21px;
  cursor: pointer;
}

.timetable-source {
  display: flex;
  padding: 13px 30px;
  border-block: 1px solid rgba(75, 62, 44, 0.11);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(246, 237, 221, 0.57);
}

.timetable-source p {
  max-width: 590px;
  margin: 0;
  color: #756e64;
  font-size: 11px;
  text-align: right;
}

.timetable-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.timetable-table th,
.timetable-table td {
  padding: 13px 11px;
  border-bottom: 1px solid rgba(75, 62, 44, 0.1);
  text-align: left;
  white-space: nowrap;
}

.timetable-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #fff;
  background: #26342e;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timetable-table tr[data-today="true"] td {
  color: #6f430e;
  background: rgba(225, 178, 104, 0.2);
  font-weight: 800;
}

.timetable-card[data-calendar-mode="masihi"] .timetable-table th:nth-child(2),
.timetable-card[data-calendar-mode="masihi"] .timetable-table td:nth-child(2) {
  color: #8c8275;
}

.timetable-card[data-calendar-mode="hijri"] .timetable-table th:first-child,
.timetable-card[data-calendar-mode="hijri"] .timetable-table td:first-child {
  color: #8c8275;
}

.timetable-card .table-scroll {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.islamic-events-card {
  display: grid;
  margin-top: 22px;
  padding: 28px 30px;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  gap: 32px;
  border: 1px solid rgba(74, 63, 47, 0.16);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.84);
  backdrop-filter: blur(16px);
}

.islamic-events-card h2 {
  margin: 4px 0 8px;
}

.islamic-events-card p {
  margin: 0;
  color: #716a61;
  font-size: 13px;
}

.islamic-events-list {
  display: grid;
  gap: 8px;
}

.islamic-events-list article {
  display: grid;
  padding: 12px 14px;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(75, 62, 44, 0.12);
  border-radius: 14px;
  background: rgba(255, 251, 243, 0.76);
}

.islamic-events-list time {
  color: #976529;
  font-weight: 800;
}

.islamic-events-list b,
.islamic-events-list span {
  display: block;
}

.islamic-events-list span {
  color: #777066;
  font-size: 12px;
}

@media (max-width: 1150px) {
  body.prayer-experience .site-header__inner,
  body.timetable-experience .site-header__inner {
    grid-template-columns: auto 1fr auto;
  }

  body.prayer-experience .endorsement,
  body.timetable-experience .endorsement {
    display: none;
  }
}

@media (max-width: 900px) {
  body.prayer-experience .site-header__inner,
  body.timetable-experience .site-header__inner {
    width: calc(100% - 28px);
    min-height: 67px;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  body.prayer-experience .main-nav,
  body.timetable-experience .main-nav,
  body.prayer-experience .endorsement,
  body.timetable-experience .endorsement {
    display: none;
  }

  .header-location {
    min-width: 0;
    max-width: 158px;
    min-height: 40px;
    padding: 6px 10px;
    background: rgba(255, 253, 248, 0.79);
  }

  .header-location b {
    max-width: 96px;
  }

  .prayer-stage::after {
    background:
      linear-gradient(180deg, rgba(253, 249, 240, 0.83), rgba(253, 249, 240, 0.58) 38%, rgba(246, 235, 214, 0.78));
  }

  .prayer-stage__content {
    padding-top: 76px;
  }

  .prayer-timeline {
    margin-top: 25px;
  }

  .prayer-stage__actions {
    margin-top: 15px;
  }

  body.prayer-experience .location-dialog__panel,
  body.timetable-experience .location-dialog__panel {
    padding: 24px 18px 20px;
  }

  .location-results {
    max-height: 34svh;
  }

  body.timetable-experience .site-header {
    position: sticky;
  }

  .timetable-hero {
    padding: 24px 0 20px;
  }

  .timetable-hero__inner {
    min-height: 0;
    padding: 28px 22px;
    border-radius: 20px;
    align-items: flex-start;
    flex-direction: column;
  }

  .timetable-hero h1 {
    font-size: 54px;
  }

  .timetable-location {
    width: 100%;
  }

  .timetable-section {
    padding-bottom: 92px;
  }

  .timetable-card__heading {
    padding: 22px 18px 15px;
    align-items: flex-start;
    flex-direction: column;
  }

  .timetable-controls {
    padding: 0 18px 17px;
    grid-template-columns: 40px minmax(130px, 1fr) minmax(100px, 0.7fr) 40px;
  }

  .timetable-source {
    padding: 12px 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .timetable-source p {
    text-align: left;
  }

  .table-scroll {
    overflow-x: auto;
  }

  .timetable-table {
    min-width: 1020px;
  }

  .islamic-events-card {
    padding: 22px 18px;
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 520px) {
  .timetable-controls {
    grid-template-columns: 38px 1fr 88px 38px;
  }

  .timetable-controls select {
    padding-inline: 8px;
  }

  .location-group__choices button {
    font-size: 12px;
  }
}
