:root {
  --hybrid-ink: #f5f1e8;
  --hybrid-muted: rgba(245, 241, 232, 0.72);
  --hybrid-line: rgba(245, 241, 232, 0.24);
  --hybrid-accent: #d6ff58;
  --hybrid-night: #06110e;
  --experience-sans: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --experience-serif: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --experience-mono: Consolas, "Courier New", monospace;
}

body.prayer-experience {
  color: var(--hybrid-ink);
  background: var(--hybrid-night);
  font-family: var(--experience-sans);
}

body.prayer-experience .site-header {
  background: linear-gradient(
    180deg,
    rgba(3, 11, 9, 0.88),
    rgba(3, 11, 9, 0.38) 70%,
    transparent
  );
}

body.prayer-experience .site-brand img {
  content: url("/waktuso-logo-light.png");
}

body.prayer-experience .main-nav {
  min-height: 50px;
  padding: 5px;
  align-items: stretch;
  border-color: var(--hybrid-line);
  background: rgba(6, 17, 14, 0.62);
  box-shadow: none;
}

body.prayer-experience .main-nav a,
body.prayer-experience .main-nav button {
  min-width: 68px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hybrid-ink);
  line-height: 1;
  text-align: center;
}

body.prayer-experience .main-nav a:first-child {
  color: var(--hybrid-night);
  background: var(--hybrid-accent);
}

body.prayer-experience .header-location {
  border-color: var(--hybrid-line);
  color: var(--hybrid-ink);
  background: rgba(6, 17, 14, 0.62);
}

body.prayer-experience .header-location small,
body.prayer-experience .endorsement {
  color: var(--hybrid-muted);
}

body.prayer-experience .endorsement {
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
}

body.prayer-experience .endorsement__wordmark {
  padding: 0;
  border: 0;
  color: var(--hybrid-ink);
  background: transparent;
  font-family: Consolas, "Courier New", monospace;
  font-size: 16px;
  letter-spacing: 0.04em;
}

body.prayer-experience .endorsement__wordmark > span {
  color: var(--hybrid-accent);
}

.prayer-stage {
  background-color: var(--hybrid-night);
}

.prayer-stage::before {
  display: block;
  background-position: center 44%;
  filter: saturate(0.74) contrast(1.06) brightness(0.63);
}

.prayer-stage::after {
  background:
    linear-gradient(
      90deg,
      rgba(3, 10, 8, 0.8) 0%,
      rgba(3, 10, 8, 0.59) 48%,
      rgba(3, 10, 8, 0.38) 100%
    ),
    linear-gradient(
      180deg,
      rgba(2, 8, 6, 0.2) 0%,
      rgba(2, 8, 6, 0.04) 44%,
      rgba(2, 8, 6, 0.7) 100%
    );
}

.prayer-stage__wash {
  opacity: 0.17;
  background:
    radial-gradient(circle at 50% 25%, rgba(214, 255, 88, 0.1), transparent 31%),
    linear-gradient(rgba(245, 241, 232, 0.045) 1px, transparent 1px);
  background-size: auto, 100% 44px;
}

.prayer-intro__date,
.prayer-intro__label,
.prayer-intro__note,
.prayer-countdown p,
.timeline-event__name,
.timeline-event__time,
.source-line,
.mosque-credit,
.experience-footer {
  color: var(--hybrid-muted);
}

.prayer-intro__date,
.prayer-intro__label {
  font-family: var(--experience-mono);
}

.prayer-intro__name {
  color: var(--hybrid-ink);
  font-family: var(--experience-sans);
  font-weight: 900;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

.prayer-countdown time {
  color: var(--hybrid-accent);
  font-family: var(--experience-mono);
}

.prayer-timeline__track {
  right: 6.25%;
  left: 6.25%;
  background: var(--hybrid-line);
}

.prayer-timeline__track > span {
  position: relative;
  overflow: visible;
  background:
    linear-gradient(
      90deg,
      var(--hybrid-accent) 0%,
      var(--hybrid-accent) 72%,
      #efffb2 88%,
      var(--hybrid-accent) 100%
    );
  background-size: 180% 100%;
  box-shadow: 0 0 8px rgba(199, 255, 56, 0.22);
}

.prayer-timeline__track > span::before,
.prayer-timeline__track > span::after {
  position: absolute;
  z-index: 4;
  top: 50%;
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.prayer-timeline__track > span::before {
  right: 0;
  width: 72px;
  height: 8px;
  background: linear-gradient(90deg, transparent, rgba(239, 255, 178, 0.8), transparent);
  filter: blur(4px);
  transform: translateY(-50%);
  animation: timeline-leading-shimmer 2.2s ease-in-out infinite;
}

.prayer-timeline__track > span::after {
  right: -5px;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(6, 17, 14, 0.76);
  background: var(--hybrid-accent);
  box-shadow:
    0 0 0 5px rgba(199, 255, 56, 0.12),
    0 0 16px rgba(199, 255, 56, 0.8);
  transform: translateY(-50%);
  animation: timeline-head-pulse 1.45s ease-in-out infinite;
}

.prayer-timeline__track > span[data-urgency="soon"] {
  box-shadow: 0 0 14px rgba(199, 255, 56, 0.52);
}

.prayer-timeline__track > span[data-urgency="soon"]::before {
  width: 96px;
  animation-duration: 1.15s;
}

.prayer-timeline__track > span[data-urgency="soon"]::after {
  animation-duration: 0.95s;
}

@keyframes timeline-leading-shimmer {
  0%,
  100% {
    opacity: 0.2;
    transform: translate(-28px, -50%) scaleX(0.55);
  }
  50% {
    opacity: 0.92;
    transform: translate(4px, -50%) scaleX(1);
  }
}

@keyframes timeline-head-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(-50%) scale(0.82);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.18);
  }
}

.timeline-event[data-alert="soon"] .timeline-event__dot {
  animation: next-prayer-marker-pulse 1.35s ease-in-out infinite;
}

@keyframes next-prayer-marker-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(199, 255, 56, 0.08);
    filter: brightness(0.92);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(199, 255, 56, 0.18),
      0 0 20px rgba(199, 255, 56, 0.72);
    filter: brightness(1.22);
  }
}

.timeline-event.is-past .timeline-event__dot,
.timeline-event.is-current .timeline-event__dot {
  background: var(--hybrid-accent);
}

.timeline-event__dot {
  border-color: var(--hybrid-line);
  background: rgba(245, 241, 232, 0.25);
}

.daily-prayers {
  margin-top: 44px;
  border-color: var(--hybrid-line);
  background: rgba(6, 17, 14, 0.62);
  backdrop-filter: blur(14px);
}

.daily-prayer {
  border-color: var(--hybrid-line);
  color: var(--hybrid-ink);
  background: transparent;
}

.daily-prayer__name,
.daily-prayer__time {
  color: inherit;
}

.daily-prayer[data-state="next"] {
  color: var(--hybrid-night);
  background: var(--hybrid-accent);
}

.daily-prayer[data-state="current"] {
  color: var(--hybrid-ink);
  background: rgba(214, 255, 88, 0.12);
  box-shadow: inset 0 3px 0 var(--hybrid-accent);
}

.daily-prayer[data-alert="ending"] {
  background: rgba(199, 255, 56, 0.16);
}

.daily-prayer[data-alert="ending"] .daily-prayer__badge {
  padding: 0 6px;
  border-radius: 999px;
  color: var(--hybrid-night);
  background: rgba(199, 255, 56, 0.86);
}

.daily-prayer[data-alert="soon"] {
  position: relative;
  z-index: 2;
  animation: next-prayer-card-pulse 1.65s ease-in-out infinite;
}

body[data-countdown-phase="critical"] .daily-prayer[data-alert="soon"] {
  animation-duration: 1.05s;
}

body[data-countdown-phase="critical"] .daily-prayer[data-alert="ending"] {
  box-shadow:
    inset 0 3px 0 #ffdf64,
    inset 0 0 0 1px rgba(255, 223, 100, 0.45);
}

body[data-countdown-phase="critical"] .daily-prayer[data-alert="ending"] .daily-prayer__badge {
  background: #ffdf64;
}

body[data-countdown-phase="critical"] .daily-prayer[data-alert="ending"] .daily-prayer__warning {
  color: #ffdf64;
}

@keyframes next-prayer-card-pulse {
  0%,
  100% {
    filter: brightness(1);
    box-shadow:
      inset 0 0 0 0 rgba(255, 255, 255, 0),
      0 0 0 rgba(199, 255, 56, 0);
  }
  50% {
    filter: brightness(1.1);
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 0.58),
      0 0 22px rgba(199, 255, 56, 0.28);
  }
}

.daily-prayer[data-state="next"] .daily-prayer__badge {
  color: var(--hybrid-night);
  background: rgba(6, 17, 14, 0.14);
}

.daily-prayer__time {
  font-family: var(--experience-mono);
}

.daily-prayer__warning {
  display: none;
  margin-top: 5px;
  color: var(--hybrid-accent);
  font-family: var(--experience-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.15;
  white-space: normal;
}

.daily-prayer[data-alert="ending"] .daily-prayer__warning {
  display: block;
}

.quiet-action {
  min-height: 38px;
  border-color: var(--hybrid-line);
  color: var(--hybrid-ink);
  background: rgba(6, 17, 14, 0.62);
}

.source-line i {
  background: var(--hybrid-accent);
}

.experience-footer {
  border-color: var(--hybrid-line);
}

.experience-footer a:hover {
  color: var(--hybrid-accent);
}

/* Compact, complete location browser. The scroll stays inside the locality
   list so the panel itself remains thin and easy to scan. */
body.prayer-experience .location-dialog,
body.timetable-experience .location-dialog {
  width: min(484px, calc(100% - 24px));
  max-height: min(760px, calc(100svh - 24px));
  border-radius: 20px;
}

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

.location-dialog .dialog-heading {
  align-items: flex-start;
}

.location-dialog .micro-label {
  margin-bottom: 3px;
  font-size: 10px;
}

.location-dialog h2 {
  max-width: 370px;
  margin: 0;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.location-dialog .icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 10px;
}

.location-search {
  min-height: 42px;
  margin: 14px 0 8px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 15px;
}

.location-dialog .button--dark {
  min-height: 40px;
  padding-block: 8px;
  border-radius: 10px;
}

.location-dialog__note {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.location-results {
  max-height: min(430px, 52svh);
  margin-top: 15px;
  padding-right: 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 33, 29, 0.48) transparent;
}

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

.location-group h3 {
  margin-bottom: 7px;
  font-size: 10px;
}

.location-group__choices {
  gap: 6px;
}

.location-group__choices button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12.5px;
  line-height: 1.1;
}

.location-group__choices small {
  margin-left: 3px;
  font-size: 8px;
}

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

.manual-zone summary {
  font-size: 13px;
}

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

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

@media (max-width: 900px) {
  .prayer-stage::after {
    background:
      linear-gradient(180deg, rgba(3, 10, 8, 0.67), rgba(3, 10, 8, 0.43) 38%, rgba(2, 8, 6, 0.82)),
      linear-gradient(90deg, rgba(3, 10, 8, 0.52), rgba(3, 10, 8, 0.24));
  }

  .prayer-stage__content {
    width: calc(100% - 28px);
  }

  body.prayer-experience .location-dialog__panel,
  body.timetable-experience .location-dialog__panel {
    padding: 17px 16px 15px;
  }

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

@media (max-width: 520px) {
  body.prayer-experience .location-dialog,
  body.timetable-experience .location-dialog {
    width: calc(100% - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 17px;
  }

  .location-dialog h2 {
    font-size: 27px;
  }

  .location-group__choices button {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prayer-timeline__track > span::before,
  .prayer-timeline__track > span::after,
  .timeline-event[data-alert="soon"] .timeline-event__dot,
  .daily-prayer[data-alert="soon"] {
    animation: none;
  }

  .prayer-timeline__track > span::before {
    opacity: 0.7;
    transform: translateY(-50%);
  }

  .prayer-timeline__track > span::after {
    opacity: 1;
    transform: translateY(-50%);
  }
}

/* The latest entered time remains the timeline anchor; the next prayer is only a target. */
.timeline-event[data-state="current"] {
  color: var(--hybrid-ink);
}

.timeline-event[data-state="current"] .timeline-event__dot {
  width: 17px;
  height: 17px;
  margin-top: 12px;
  background: var(--hybrid-accent);
  box-shadow: 0 0 0 7px rgba(199, 255, 56, 0.14);
}

.timeline-event[data-state="next"] {
  color: var(--hybrid-accent);
}

.timeline-event[data-state="next"] .timeline-event__dot {
  width: 11px;
  height: 11px;
  margin-top: 15px;
  border: 2px solid var(--hybrid-accent);
  background: rgba(199, 255, 56, 0.12);
  box-shadow: none;
}

/* Support pages share the warm Takwim visual system. */
body.support-experience {
  min-height: 100svh;
  color: var(--experience-ink);
  background:
    linear-gradient(rgba(251, 246, 236, 0.9), rgba(247, 238, 220, 0.96)),
    var(--state-mosque) center 28% / cover fixed;
  font-family: var(--experience-sans);
}

body.support-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.86);
  backdrop-filter: blur(18px);
}

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

body.support-experience .main-nav a[aria-current="page"],
body.support-experience .main-nav .nav-more.is-active {
  color: #6f430e;
  background: #f4e5cc;
}

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

.support-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: 34px;
  background:
    linear-gradient(100deg, rgba(255, 251, 242, 0.92), rgba(255, 248, 235, 0.55)),
    var(--state-mosque) center 43% / cover;
  box-shadow: 0 24px 70px rgba(74, 52, 24, 0.1);
}

.support-hero h1 {
  max-width: 870px;
  margin: 4px 0 12px;
  font: 500 clamp(48px, 6vw, 78px) / 0.98 var(--experience-serif);
  letter-spacing: -0.045em;
}

.support-hero__intro {
  max-width: 720px;
  margin: 0;
  color: #676158;
  font-size: 16px;
  line-height: 1.65;
}

.support-hero__meta {
  display: grid;
  min-width: 220px;
  padding: 16px 18px;
  border: 1px solid rgba(78, 65, 47, 0.19);
  border-radius: 15px;
  gap: 4px;
  color: #303631;
  background: rgba(255, 252, 246, 0.82);
  backdrop-filter: blur(12px);
}

.support-hero__meta span,
.support-hero__meta small {
  color: #7c756b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.support-hero__meta b {
  font-size: 14px;
}

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

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

.support-card__bar {
  display: flex;
  min-height: 52px;
  padding: 13px 30px;
  border-bottom: 1px solid rgba(75, 62, 44, 0.11);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #756e64;
  background: rgba(246, 237, 221, 0.62);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.support-card__bar span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.support-card__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c8933a;
  box-shadow: 0 0 0 5px rgba(200, 147, 58, 0.12);
}

body.support-experience .article-layout {
  display: grid;
  padding: 34px 36px 54px;
  grid-template-columns: 220px minmax(0, 820px);
  justify-content: space-between;
  gap: clamp(34px, 6vw, 82px);
}

body.support-experience .article-index {
  position: sticky;
  top: 110px;
  display: grid;
  height: fit-content;
  padding: 20px;
  border: 1px solid rgba(75, 62, 44, 0.13);
  border-radius: 16px;
  gap: 7px;
  color: #26342e;
  background: #f7efe2;
}

body.support-experience .article-index span {
  color: #9a6729;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

body.support-experience .article-index strong {
  font-size: 13px;
  line-height: 1.35;
}

body.support-experience .article-index small {
  color: #756e64;
  font-size: 12px;
  line-height: 1.5;
}

body.support-experience .article {
  max-width: 820px;
  color: #4f564f;
  font-size: 17px;
  line-height: 1.8;
}

body.support-experience .article h2 {
  margin: 54px 0 12px;
  padding-top: 0;
  color: #26342e;
  font: 700 clamp(28px, 3.4vw, 40px) / 1.1 var(--experience-sans);
  letter-spacing: -0.035em;
}

body.support-experience .article h2:first-child {
  margin-top: 0;
}

body.support-experience .article p,
body.support-experience .article li {
  color: #596159;
}

body.support-experience .article a {
  color: #6f430e;
  text-decoration-color: #c8933a;
}

body.support-experience .faq-list {
  gap: 12px;
}

body.support-experience .faq-item {
  border: 1px solid rgba(75, 62, 44, 0.15);
  border-radius: 16px;
  background: #fffdf8;
}

body.support-experience .faq-item summary::after {
  color: #fff;
  background: #26342e;
}

body.support-experience .contact-card {
  border-color: rgba(75, 62, 44, 0.16);
  background: #fffdf8;
  box-shadow: none;
}

body.support-experience .button--lime {
  color: #fff;
  background: #26342e;
}

@media (max-width: 820px) {
  .timeline-event[data-state="next"] {
    min-height: 34px;
    margin: 0;
    background: transparent;
  }

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

  .timeline-event[data-state="current"] {
    min-height: 40px;
    margin: 1px 0;
    border-radius: 12px;
    background: rgba(199, 255, 56, 0.1);
  }

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

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

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

  .support-hero h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .support-hero__intro {
    font-size: 15px;
  }

  .support-hero__meta {
    min-width: 0;
    width: 100%;
  }

  .support-section {
    padding-bottom: 54px;
  }

  .support-card {
    border-radius: 20px;
  }

  .support-card__bar {
    padding: 13px 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  body.support-experience .article-layout {
    padding: 24px 20px 38px;
    grid-template-columns: 1fr;
    gap: 26px;
  }

  body.support-experience .article-index {
    position: static;
  }

  body.support-experience .article {
    font-size: 16px;
  }

  body.support-experience .article h2 {
    margin-top: 42px;
    font-size: 29px;
  }

  body.support-experience .location-dialog__panel {
    padding: 17px 16px 15px;
  }
}

@media (max-width: 520px) {
  body.support-experience .location-dialog {
    width: calc(100% - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 17px;
  }
}

@keyframes timeline-leading-shimmer-mobile {
  0%,
  100% {
    opacity: 0.2;
    transform: translate(50%, -26px) scaleY(0.55);
  }
  50% {
    opacity: 0.92;
    transform: translate(50%, 4px) scaleY(1);
  }
}

@keyframes timeline-head-pulse-mobile {
  0%,
  100% {
    opacity: 0.72;
    transform: translateX(50%) scale(0.82);
  }
  50% {
    opacity: 1;
    transform: translateX(50%) scale(1.18);
  }
}

@media (max-width: 820px) {
  .prayer-timeline__track {
    top: 21px;
    right: auto;
    bottom: 21px;
    left: 12px;
  }

  .prayer-timeline__track > span::before {
    top: auto;
    right: 50%;
    bottom: 0;
    width: 8px;
    height: 72px;
    background: linear-gradient(180deg, transparent, rgba(239, 255, 178, 0.8), transparent);
    transform: translateX(50%);
    animation-name: timeline-leading-shimmer-mobile;
  }

  .prayer-timeline__track > span::after {
    top: auto;
    right: 50%;
    bottom: -5px;
    transform: translateX(50%);
    animation-name: timeline-head-pulse-mobile;
  }

  .prayer-timeline__track > span[data-urgency="soon"]::before {
    width: 8px;
    height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prayer-timeline__track > span::before,
  .prayer-timeline__track > span::after,
  .timeline-event[data-alert="soon"] .timeline-event__dot,
  .daily-prayer[data-alert="soon"] {
    animation: none;
  }

  .prayer-timeline__track > span::before {
    opacity: 0.7;
  }

  .prayer-timeline__track > span::after {
    opacity: 1;
  }
}
