@font-face {
  font-family: Public Sans;
  src: url(./immutable/ffa0d5ca57754c071711/public-sans.ttf) format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Source Serif;
  src: url(./immutable/dbefd3f0577baae5ba49/source-serif-375.ttf) format('truetype');
  font-weight: 375;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
:root {
  font-family: 'Public Sans', system-ui, sans-serif;
  color-scheme: light dark;
  font-synthesis: none;
}
body {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  transition:
    background-color 0.96s,
    color 0.56s;
}
body[data-phase='rest'] {
  color-scheme: dark;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  min-height: 44px;
}
button:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
button:active {
  transform: translateY(1px);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
i svg,
button > svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}
i {
  display: inline-flex;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  z-index: 10;
  left: 12px;
  top: -80px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
}
.skip:focus {
  top: 8px;
}
header {
  border-bottom: 1px solid var(--rule);
}
.masthead,
main {
  width: min(100% - clamp(40px, 9vw, 176px), 1536px);
  margin-inline: auto;
}
.masthead {
  min-height: clamp(78px, 9.5vh, 108px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  font:
    375 2.45rem/1 'Source Serif',
    Georgia,
    serif;
  letter-spacing: -0.07em;
}
.wordmark svg {
  width: 2.35rem;
  height: 2.35rem;
}
nav,
nav button,
#leave,
.link {
  display: inline-flex;
  align-items: center;
}
nav {
  gap: clamp(0.3rem, 1.4vw, 1.5rem);
}
nav button,
#leave,
.link {
  gap: 0.55rem;
  font-weight: 550;
  font-size: 0.94rem;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
}
#ambient {
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding-inline: 1.05rem;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(255px, 1fr);
  gap: clamp(38px, 6.3vw, 112px);
  align-items: center;
  padding: clamp(36px, 7vh, 96px) 0 20px;
}
.plate {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 22px;
  background: #595d76;
  height: clamp(300px, min(34vw, 49vh), 560px);
  color: var(--period-cream);
}
#coast {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.coast-plate,
.shore-waves {
  display: block;
  width: 100%;
  height: 100%;
}
.coast-plate {
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .coast-landscape :is(path, rect, g, circle) {
    transition: fill 0.96s ease-out, stroke 0.96s ease-out, opacity 0.96s ease-out;
  }
  .coast-plate stop {
    transition: stop-color 0.96s ease-out, stop-opacity 0.96s ease-out;
  }
}
.folio {
  position: absolute;
  top: 8%;
  left: 5.4%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.folio span {
  font-size: clamp(0.76rem, 0.95vw, 1rem);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-weight: 700;
}
.folio strong {
  font-size: clamp(7rem, min(15vw, 26vh), 20rem);
  letter-spacing: -0.075em;
  font-weight: 800;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
  transition: color 0.96s;
}
body[data-phase='rest'] .folio strong {
  color: var(--period-rest);
}
.legend {
  position: absolute;
  inset: auto 5.4% 6.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: clamp(0.78rem, 0.95vw, 1rem);
  font-weight: 600;
  text-shadow: 0 1px 4px #22273c;
}
#daypart {
  display: flex;
  align-items: center;
  gap: 8px;
}
#daypart:before {
  content: '';
  height: 1px;
  width: 1.6rem;
  background: currentColor;
}
.cycle {
  margin-top: 1.4rem;
}
.cycle-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}
h2,
p {
  margin: 0;
}
.cycle-caption h2 {
  font:
    375 1.5rem 'Source Serif',
    Georgia,
    serif;
  letter-spacing: -0.045em;
}
#cycle-hint {
  font-size: 0.85rem;
  color: var(--muted-ink);
}
#scale {
  display: flex;
  margin-top: 0.7rem;
  overflow-x: auto;
  scrollbar-width: thin;
  gap: 6px;
}
.tick {
  border-top: 1px solid var(--rule);
  padding: 0.65rem 0 0.3rem;
  flex: 1 0 34px;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  color: var(--muted-ink);
}
.tick[aria-current] {
  border-top: 3px solid var(--ink);
  padding-top: calc(0.65rem - 2px);
  color: var(--ink);
  font-weight: 800;
}
#reading {
  min-width: 0;
  padding-bottom: clamp(0px, 6vh, 70px);
}
.phase-mark {
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.4rem;
}
.phase-mark svg {
  width: 1.55rem;
  height: 1.55rem;
}
.phase-mark span {
  width: 2.7rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}
h1,
.panel-head h2 {
  font:
    375 clamp(3rem, 5.8vw, 6.2rem)/1.03 'Source Serif',
    Georgia,
    serif;
  letter-spacing: -0.065em;
  margin: 0;
}
#reading:has(#clock:not([hidden])) h1 {
  font-size: clamp(2rem, 3.2vw, 3.9rem);
}
#clock {
  font-size: clamp(2.2rem, 5.3vw, 6rem);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.055em;
  margin: 0.4rem 0 0.85rem;
}
#clock.long {
  font-size: clamp(1.9rem, 4.3vw, 5rem);
}
#detail {
  color: var(--muted-ink);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0.8rem 0 1.5rem;
}
progress {
  display: block;
  appearance: none;
  width: 100%;
  height: 3px;
  border: 0;
  border-radius: 2px;
  margin: -0.6rem 0 1.3rem;
  background: var(--rule);
  color: var(--blue);
}
progress::-webkit-progress-bar {
  background: var(--rule);
}
progress::-webkit-progress-value {
  background: var(--blue);
}
progress::-moz-progress-bar {
  background: var(--blue);
}
#actions,
.stack {
  display: grid;
  gap: 0.6rem;
}
.primary,
.secondary,
.text-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 14px;
  min-height: 52px;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  line-height: 1.35;
}
.primary {
  background: var(--ink);
  color: var(--paper);
}
.primary:hover {
  background: color-mix(in srgb, var(--ink) 87%, var(--blue));
}
.secondary {
  border: 1px solid var(--rule);
}
.text-action,
.subtle {
  color: var(--muted-ink);
}
#alarm-shortcut {
  margin-top: 0.65rem;
}
#shore {
  color: var(--blue);
  width: 100%;
  height: clamp(106px, 19vh, 270px);
  position: relative;
  overflow: hidden;
  margin-top: auto;
  pointer-events: none;
}
.shore-boat {
  position: absolute;
  left: 30%;
  top: 36%;
  width: clamp(23px, 6%, 41px);
  height: auto;
  overflow: visible;
  transform: translate(-50%, -76%);
}
.credit {
  padding: 0.5rem 1rem max(0.75rem, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-ink);
}
.credit a {
  color: inherit;
  text-underline-offset: 0.18em;
}
#leave {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top));
  z-index: 2;
  background: var(--paper);
  border: 1px solid var(--rule);
}
body.ambient header,
body.ambient .credit,
body.ambient .cycle,
body.ambient #actions,
body.ambient #alarm-shortcut,
body.ambient #progress,
body.ambient #detail {
  display: none;
}
body.ambient main {
  flex: 1;
  padding-top: 70px;
  align-content: center;
}
body.ambient #reading {
  padding-bottom: 0;
}
body.ambient .plate {
  height: clamp(340px, 56vh, 680px);
}
body.ambient #clock {
  font-size: clamp(2.5rem, 6vw, 8rem);
}
#message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 540px);
  z-index: 5;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  border-radius: 12px;
}
#message:empty {
  display: none;
}
dialog {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 22px;
  width: min(92vw, 520px);
  max-height: 86svh;
  overscroll-behavior: contain;
  padding: 0;
  box-shadow: 0 20px 100px #14152034;
}
dialog::backdrop {
  background: #151b2c64;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 24px 26px 16px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 1;
  border-bottom: 1px solid var(--rule);
}
.panel-head h2 {
  font-size: 2.2rem;
}
#close {
  width: 44px;
  display: grid;
  place-content: center;
  border-radius: 100%;
}
#panel-content {
  padding: 24px 26px 30px;
}
#panel-content h3 {
  font:
    375 1.55rem 'Source Serif',
    Georgia,
    serif;
  letter-spacing: -0.045em;
  margin: 1.5rem 0 0.6rem;
}
#panel-content h3:first-child {
  margin-top: 0;
}
.row {
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  text-align: left;
  padding: 1rem 0;
  font-size: 1rem;
}
.row small,
small,
.help,
#panel-content p {
  color: var(--muted-ink);
  font-size: 0.92rem;
  line-height: 1.55;
}
.row small {
  display: block;
}
.row b {
  font-weight: 600;
}
.row .chevron {
  font-size: 1.35rem;
  color: var(--muted-ink);
}
.field {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.15rem;
  font-weight: 600;
}
input[type='number'],
select {
  width: 100%;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.7rem;
  min-height: 46px;
}
input[type='range'] {
  width: 100%;
  accent-color: var(--blue);
  min-height: 30px;
}
input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}
#panel-content .stack {
  margin-top: 1.25rem;
}
.history-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.history-item b {
  display: block;
  margin-bottom: 0.3rem;
}
#panel-status {
  color: var(--blue);
  margin-top: 0.6rem;
}
@keyframes arrive {
  from {
    opacity: 0.35;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.arrive {
  animation: arrive 0.48s ease-out;
}
@media (min-width: 1700px) {
  main {
    padding-top: 8vh;
  }
}
@media (max-width: 740px) {
  .masthead,
  main {
    width: min(100% - 36px, 570px);
  }
  .masthead {
    min-height: 68px;
  }
  .wordmark {
    font-size: 2rem;
  }
  .wordmark svg {
    width: 1.8rem;
  }
  nav {
    gap: 2px;
  }
  nav button,
  #ambient {
    padding: 10px;
    min-width: 44px;
    border: none;
    justify-content: center;
  }
  nav button span {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  main {
    display: block;
    padding: 20px 0;
  }
  .plate {
    height: clamp(220px, 34svh, 365px);
  }
  .folio strong {
    font-size: clamp(6.8rem, 18vh, 10rem);
  }
  .cycle {
    margin-top: 1rem;
  }
  .cycle-caption h2 {
    font-size: 1.25rem;
  }
  #reading {
    padding: 1.6rem 0 0;
  }
  .phase-mark {
    display: none;
  }
  h1 {
    font-size: 3.25rem;
  }
  #clock {
    font-size: 3.8rem;
  }
  #clock.long {
    font-size: 3rem;
  }
  #detail {
    margin: 0.4rem 0 1rem;
  }
  #shore {
    height: clamp(84px, 15vh, 180px);
  }
  body.ambient #reading {
    text-align: center;
    padding-top: 2rem;
  }
  body.ambient .plate {
    height: clamp(230px, 40svh, 450px);
  }
  body.ambient #clock {
    font-size: clamp(3.2rem, 12vw, 5.5rem);
  }
}
@media (max-width: 355px) {
  .cycle-caption {
    gap: 0.3rem;
  }
  .masthead,
  main {
    width: calc(100% - 28px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}

#clock span {
  display: inline-block;
}
#enable-sound {
  margin-top: 0.6rem;
}
body.ambient #enable-sound {
  display: none;
}

body[data-phase='rest'] .folio strong {
  font-size: clamp(5rem, min(11vw, 20vh), 14rem);
}
@media (max-width: 740px) {
  body[data-phase='rest'] .folio strong {
    font-size: clamp(5.1rem, 14vh, 7.5rem);
  }
}
