:root {
  --chronoglass-page: #03040a;
  --chronoglass-panel-fallback: #0b0b14;
  --chronoglass-chrome-fallback: #090a12;
}

html {
  background: var(--chronoglass-page);
  color-scheme: dark;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background-color: var(--chronoglass-page);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 40, 210, 0.13), transparent 30rem),
    radial-gradient(circle at 88% 24%, rgba(0, 225, 255, 0.11), transparent 34rem),
    radial-gradient(circle at 54% 88%, rgba(105, 64, 255, 0.1), transparent 38rem),
    linear-gradient(
      117deg,
      transparent 0%,
      transparent 47.8%,
      rgba(0, 238, 255, 0.045) 48.7%,
      rgba(255, 56, 218, 0.035) 49.4%,
      transparent 50.3%,
      transparent 100%
    ),
    linear-gradient(180deg, #080712 0%, #03040b 48%, #020309 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}


.laser-atmosphere {
  position: fixed;
  z-index: -1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.laser-atmosphere--enhanced {
  opacity: 0.86;
}

html {
  scroll-padding-top: calc(var(--app-chrome-bottom, 11rem) + 0.75rem);
}


.time-slice-start {
  padding-top: var(--app-chrome-bottom, 11rem);
}

.time-slice-section,
.time-slice-input {
  scroll-margin-top: calc(var(--app-chrome-bottom, 11rem) + 0.75rem);
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: calc(var(--app-chrome-bottom, 13.5rem) + 0.75rem);
  }

  .time-slice-start {
    padding-top: var(--app-chrome-bottom, 13.5rem);
  }

  .time-slice-section,
  .time-slice-input {
    scroll-margin-top: calc(var(--app-chrome-bottom, 13.5rem) + 0.75rem);
  }
}


#dawn-section {
  --laser-a: #ff4fd8;
  --laser-b: #ffbd59;
  --laser-a-rgb: 255 79 216;
  --laser-b-rgb: 255 189 89;
  --panel-fill-rgb: 240 230 140;
  --panel-label: #9f3d38;
  --panel-ink: #4f155f;
  --time-editor-ink: var(--panel-ink);
  --time-editor-caret: #4f155f;
}

#morning-section {
  --laser-a: #ff6b8a;
  --laser-b: #42e8ff;
  --laser-a-rgb: 255 107 138;
  --laser-b-rgb: 66 232 255;
  --panel-fill-rgb: 255 218 185;
  --panel-label: #006f92;
  --panel-ink: #004f6d;
  --time-editor-ink: var(--panel-ink);
  --time-editor-caret: #004f6d;
}

#afternoon-section {
  --laser-a: #00eaff;
  --laser-b: #fff36a;
  --laser-a-rgb: 0 234 255;
  --laser-b-rgb: 255 243 106;
  --panel-fill-rgb: 135 206 235;
  --panel-label: #a52d20;
  --panel-ink: #7b1b13;
  --time-editor-ink: var(--panel-ink);
  --time-editor-caret: #7b1b13;
}

#evening-section {
  --laser-a: #ff3bd4;
  --laser-b: #795cff;
  --laser-a-rgb: 255 59 212;
  --laser-b-rgb: 121 92 255;
  --panel-fill-rgb: 106 90 205;
  --panel-label: #ffe0d8;
  --panel-ink: #fff;
  --time-editor-ink: var(--panel-ink);
  --time-editor-caret: #fff36a;
}

#twilight-section {
  --laser-a: #a855f7;
  --laser-b: #35e7ff;
  --laser-a-rgb: 168 85 247;
  --laser-b-rgb: 53 231 255;
  --panel-fill-rgb: 52 39 79;
  --panel-label: #fad4e4;
  --panel-ink: #f2e5ff;
  --time-editor-ink: var(--panel-ink);
  --time-editor-caret: var(--laser-b);
}

#night-section {
  --laser-a: #55ff9a;
  --laser-b: #3a7bff;
  --laser-a-rgb: 85 255 154;
  --laser-b-rgb: 58 123 255;
  --panel-fill-rgb: 0 0 34;
  --panel-label: #55ff9a;
  --panel-ink: #55ff9a;
  --time-editor-ink: var(--panel-ink);
  --time-editor-caret: var(--laser-a);
}

:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section {
  --chronoglass-panel-base: rgb(var(--panel-fill-rgb));
  position: relative;
  isolation: isolate;
  width: min(calc(100% - 2rem), 92rem);
  margin: 0.9rem auto;
  border: 1px solid transparent;
  border-radius: clamp(15px, 1.8vw, 24px);
  background-color: var(--chronoglass-panel-base);
  background-image:
    linear-gradient(
      rgb(var(--panel-fill-rgb)),
      rgb(var(--panel-fill-rgb))
    ),
    linear-gradient(
      112deg,
      var(--laser-a) 0%,
      rgba(255, 255, 255, 0.82) 15%,
      rgba(255, 255, 255, 0.13) 33%,
      var(--laser-b) 69%,
      var(--laser-a) 100%
    );
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.035),
    0 0 0 1px rgba(0, 0, 0, 0.58),
    0 8px 22px rgba(0, 0, 0, 0.32),
    0 0 15px rgb(var(--laser-a-rgb) / 0.105),
    0 0 24px rgb(var(--laser-b-rgb) / 0.065);
  transition:
    box-shadow 220ms ease,
    transform 220ms ease,
    filter 220ms ease;
}


:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 1px 0 0 rgba(255, 255, 255, 0.035);
}


:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: -2px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow:
    0 0 10px rgb(var(--laser-a-rgb) / 0.2),
    0 0 23px rgb(var(--laser-b-rgb) / 0.14),
    inset 0 0 13px rgb(var(--laser-a-rgb) / 0.07);
  transition: opacity 220ms ease;
}

:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section > * {
  position: relative;
  z-index: 1;
}

:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section:is(:focus-within, :has(.active-slice-input)) {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.055),
    0 0 0 1px rgba(255, 255, 255, 0.045),
    0 10px 26px rgba(0, 0, 0, 0.38),
    0 0 19px rgb(var(--laser-a-rgb) / 0.17),
    0 0 32px rgb(var(--laser-b-rgb) / 0.11);
}

:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section:is(:focus-within, :has(.active-slice-input))::after {
  opacity: 0.88;
  animation: chronoglass-focus-pulse 2.8s ease-in-out infinite;
}

@keyframes chronoglass-focus-pulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}


:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section :is(
  .time-slice-content,
  .time-slice-input-container,
  .time-slice-input,
  .time-slice-output
) {
  background-color: transparent;
}

:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section .time-slice-input {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--panel-ink);
}

:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section .label {
  color: var(--panel-label);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.92),
    0 0 8px rgb(var(--laser-a-rgb) / 0.24);
}

:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section .time-slice-output {
  color: var(--panel-ink);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 8px rgb(var(--laser-a-rgb) / 0.18);
}

:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section > .header-row .sunrise {
  filter:
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 8px rgb(var(--laser-a-rgb) / 0.2));
  transition: filter 220ms ease;
}

:is(
  #dawn-section,
  #morning-section,
  #afternoon-section,
  #evening-section,
  #twilight-section,
  #night-section
).time-slice-section:is(:focus-within, :has(.active-slice-input)) > .header-row .sunrise {
  filter:
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.75))
    drop-shadow(0 0 10px rgb(var(--laser-a-rgb) / 0.3))
    drop-shadow(0 0 16px rgb(var(--laser-b-rgb) / 0.15));
}


.menu-bar,
.glyph-bar {
  --chronoglass-chrome-base: var(--chronoglass-chrome-fallback);
  box-sizing: border-box;
  isolation: isolate;
  border-bottom: 1px solid rgba(130, 229, 255, 0.28);
  background-color: var(--chronoglass-chrome-base);
  background-image:
    linear-gradient(
      100deg,
      rgba(255, 59, 212, 0.075),
      rgba(255, 255, 255, 0.025) 38%,
      rgba(53, 231, 255, 0.075) 72%,
      rgba(85, 255, 154, 0.05)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 55%);
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.035),
    0 6px 18px rgba(0, 0, 0, 0.34),
    0 0 16px rgba(53, 231, 255, 0.055);
}

.menu-bar :is(span, div, button, time):focus-visible,
.glyph-bar :is(span, button):focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.82);
  outline-offset: 2px;
  box-shadow:
    0 0 8px rgba(53, 231, 255, 0.34),
    0 0 14px rgba(255, 59, 212, 0.22);
}


#information-section {
  --support-a: #b05cff;
  --support-b: #35e7ff;
  --support-a-rgb: 176 92 255;
  --support-b-rgb: 53 231 255;
}

.prayers-container {
  --support-a: #ffcb62;
  --support-b: #ff55d5;
  --support-a-rgb: 255 203 98;
  --support-b-rgb: 255 85 213;
}

:is(#information-section, .prayers-container) {
  box-sizing: border-box;
  width: min(calc(100% - 2rem), 92rem);
  margin: 0.9rem auto;
  padding: 1rem 1.25rem 1.35rem;
  border: 1px solid transparent;
  border-radius: clamp(15px, 1.8vw, 24px);
  background-color: rgba(7, 8, 18, 0.92);
  background-image:
    linear-gradient(130deg, rgb(var(--support-a-rgb) / 0.12), transparent 35%, rgb(var(--support-b-rgb) / 0.09)),
    linear-gradient(145deg, rgba(9, 9, 21, 0.92), rgba(3, 4, 11, 0.86)),
    linear-gradient(115deg, var(--support-a), rgba(255, 255, 255, 0.7), var(--support-b));
  background-clip: padding-box, padding-box, border-box;
  background-origin: padding-box, padding-box, border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 8px 22px rgba(0, 0, 0, 0.32),
    0 0 18px rgb(var(--support-a-rgb) / 0.09),
    0 0 24px rgb(var(--support-b-rgb) / 0.06);
  color: #f7f5ff;
}

:is(#information-section, .prayers-container) > .header-row {
  margin-bottom: 0.5rem;
}

:is(#information-section, .prayers-container) > .header-row .sunrise {
  font-size: clamp(3.25rem, 6vw, 5rem);
  line-height: 1;
  filter:
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 9px rgb(var(--support-a-rgb) / 0.22));
}

:is(#information-section, .prayers-container) .label {
  color: #fff;
  font-size: 1.5rem;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 9px rgb(var(--support-b-rgb) / 0.26);
}

.prayers-container textarea {
  border: 1px solid rgb(var(--support-a-rgb) / 0.38);
  border-radius: 12px;
  background: rgba(2, 3, 10, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 12px rgb(var(--support-b-rgb) / 0.08);
  color: #fff8e7;
}


@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .menu-bar,
  .glyph-bar {
    --chronoglass-chrome-base: rgba(6, 7, 16, 0.74);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
  }

  .prayers-container {
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    backdrop-filter: blur(12px) saturate(130%);
  }
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  :is(
    #dawn-section,
    #morning-section,
    #afternoon-section,
    #evening-section,
    #twilight-section,
    #night-section
  ).time-slice-section {
    width: calc(100% - 0.8rem);
    margin: 0.55rem auto;
    padding: 0.7rem 0.85rem;
    border-radius: 16px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.13),
      inset 0 -1px 0 rgba(255, 255, 255, 0.03),
      0 6px 16px rgba(0, 0, 0, 0.3),
      0 0 12px rgb(var(--laser-a-rgb) / 0.09),
      0 0 18px rgb(var(--laser-b-rgb) / 0.055);
  }

  :is(
    #dawn-section,
    #morning-section,
    #afternoon-section,
    #evening-section,
    #twilight-section,
    #night-section
  ).time-slice-section:is(:focus-within, :has(.active-slice-input)) {
    transform: none;
  }

  :is(#information-section, .prayers-container) {
    width: calc(100% - 0.8rem);
    margin: 0.55rem auto;
    padding: 0.85rem;
    border-radius: 16px;
  }

  :is(#information-section, .prayers-container) > .header-row .sunrise {
    font-size: 3rem;
  }

  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .menu-bar,
    .glyph-bar {
      -webkit-backdrop-filter: blur(14px) saturate(135%);
      backdrop-filter: blur(14px) saturate(135%);
    }
  }
}

@media (max-width: 480px) {
  :is(
    #dawn-section,
    #morning-section,
    #afternoon-section,
    #evening-section,
    #twilight-section,
    #night-section
  ).time-slice-section {
    width: calc(100% - 0.5rem);
    margin-block: 0.42rem;
    border-radius: 13px;
  }

  :is(#information-section, .prayers-container) {
    width: calc(100% - 0.5rem);
    margin-block: 0.42rem;
    border-radius: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(
    #dawn-section,
    #morning-section,
    #afternoon-section,
    #evening-section,
    #twilight-section,
    #night-section
  ).time-slice-section,
  :is(
    #dawn-section,
    #morning-section,
    #afternoon-section,
    #evening-section,
    #twilight-section,
    #night-section
  ).time-slice-section::after,
  :is(
    #dawn-section,
    #morning-section,
    #afternoon-section,
    #evening-section,
    #twilight-section,
    #night-section
  ).time-slice-section > .header-row .sunrise,
  .menu-bar,
  .glyph-bar {
    transition: none;
  }

  :is(
    #dawn-section,
    #morning-section,
    #afternoon-section,
    #evening-section,
    #twilight-section,
    #night-section
  ).time-slice-section:is(:focus-within, :has(.active-slice-input))::after {
    animation: none;
    opacity: 0.88;
  }

  .laser-atmosphere {
    transition: none;
  }

  .laser-atmosphere--enhanced {
    opacity: 0.62;
  }
}
