#clockApp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100dvw;
  height: 100dvh;
  padding: 6vh 5vw;
}

#clockShell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  row-gap: 4vh;
  width: var(--display-width, min(90vw, 1680px));
  max-width: min(90vw, 1680px);
  height: min(88vh, 980px);
}

#timeStage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

#timeText {
  display: inline-grid;
  grid-template-columns: 2ch 0.34em 2ch;
  align-items: center;
  width: max-content;
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--time-size, 28vw);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
  text-align: center;
  white-space: nowrap;
}

#hourText {
  text-align: right;
}

#minuteText {
  text-align: left;
}

#colonText {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 0.34em;
  height: 0.66em;
  gap: 0.16em;
  animation: blink 1s steps(1) infinite;
}

#colonText::before,
#colonText::after {
  content: '';
  display: block;
  width: 0.105em;
  height: 0.105em;
  border-radius: 50%;
  background: currentColor;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

#infoRow {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: start;
  justify-content: space-between;
  column-gap: var(--info-gap, 64px);
  position: relative;
  width: 100%;
  font-size: var(--info-size, clamp(2rem, 4vw, 4.8rem));
}

#infoRow.has-warning-overlay #dateBlock,
#infoRow.has-warning-overlay #weatherBlock {
  visibility: hidden;
}

#dateBlock,
#weatherBlock {
  display: flex;
  flex-direction: column;
  gap: 0.75vh;
}

#dateBlock {
  align-items: flex-start;
  min-width: 0;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

#weatherBlock {
  align-items: flex-start;
  justify-self: end;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  white-space: nowrap;
}

#weatherBlock[hidden] {
  display: none;
}

.weather-line[hidden] {
  display: none;
}

#dateText,
#lunarText {
  white-space: nowrap;
}

#dateText {
  color: white;
  font-weight: 500;
}

#lunarText {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9em;
  font-weight: 300;
}

.weather-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8vw;
  color: white;
}

.material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 0.92em;
  line-height: 1;
  vertical-align: middle;
}

.weather-cjk {
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-weight: 500;
}

.warning-overlay {
  position: absolute;
  inset: -0.4em 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: white;
  opacity: 1;
  pointer-events: none;
}

.warning-overlay[hidden] {
  display: none;
}

.warning-overlay-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: black;
}

.warning-overlay-card {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  max-width: calc(100% - 0.6em);
  gap: 0.38em;
  padding: 0.32em 0.5em;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: rgba(18, 18, 18, 0.98);
  font-size: clamp(34px, 3.2vw, 62px);
}

.warning-overlay-card.is-pulsing {
  animation: warning-border-pulse 1s steps(1) 15;
}

.warning-overlay-icon {
  flex: 0 0 auto;
  font-size: 0.98em;
  line-height: 1;
}

.warning-overlay-items {
  display: flex;
  flex-direction: column;
  gap: 0.32em;
  min-width: 0;
}

.warning-overlay-item {
  display: flex;
  flex-direction: column;
  gap: 0.08em;
}

.warning-overlay-title {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.28em;
  row-gap: 0.04em;
  font-family: 'JetBrains Mono', 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 0.82em;
  font-weight: 500;
  line-height: 1.08;
}

.warning-overlay-time {
  color: rgba(255, 255, 255, 0.84);
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 0.48em;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

@keyframes warning-border-pulse {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 1);
  }

  50% {
    border-color: rgba(255, 255, 255, 0.56);
  }
}
