:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: #F97316;
  background: #FF7A45;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 10%, #cde4ff 0, transparent 32rem),
    radial-gradient(circle at 90% 90%, #d9c9ff 0, transparent 30rem),
    #f7f9fd;
}

.page-shell {
  width: min(100% - 2rem, 960px);
  padding: clamp(2.5rem, 9vw, 6.5rem) clamp(1.25rem, 6vw, 5rem);
  text-align: center;
}

.language-bar {
  display: flex;
  justify-content: flex-end;
  gap: .4rem;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.language-button {
  border: 1px solid #cbd6e8;
  border-radius: 999px;
  padding: .5rem .9rem;
  color: #52627b;
  background: rgb(255 255 255 / 58%);
  font: inherit;
  font-size: .86rem;
  cursor: pointer;
}

.language-button:hover,
.language-button:focus-visible { border-color: #1555b8; color: #1555b8; }

.language-button.active { color: #fff; background: #1555b8; border-color: #1555b8; }

.eyebrow {
  margin: 0 0 1rem;
  color: #FF7A45;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .18em;
}

h1 {
  margin: 0;
  display: grid;
  min-block-size: 2.2em;
  place-items: center;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  letter-spacing: -.045em;
  line-height: 1.1;
  text-wrap: balance;
}

/* English headings are longer than the Chinese equivalent. */
html[lang="en"] h1 {
  letter-spacing: -.03em;
}

.description, .target-date {
  color: #FF6B6B;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.description { margin: 1rem 0 3rem; }

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: calc(100vw - 2rem);
  margin-inline: auto;
  gap: clamp(.25rem, 1.2vw, 1.8rem);
  padding: clamp(1.1rem, 3vw, 2.2rem);
  border: 1px solid rgb(255 255 255 / 78%);
  border-radius: 28px;
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 20px 50px rgb(50 78 130 / 13%);
  backdrop-filter: blur(12px);
}

.time-unit {
  flex: 0 1 clamp(4.5rem, 10vw, 7.3rem);
  min-width: 0;
}

/* The day counter supports up to five digits (e.g. 99999). */
.time-unit:first-child {
  flex: 0 0 auto;
}

/* Keep the last day digit next to the first separator as the day count grows. */
.time-unit:first-child .number {
  text-align: right;
}

.time-unit:first-child .label {
  text-align: right;
}

.number {
  display: block;
  color: #1555b8;
  font-size: clamp(2.5rem, 8vw, 5.3rem);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: -.075em;
  line-height: .94;
}

.label {
  display: block;
  margin-top: .9rem;
  color: #71809a;
  font-size: clamp(.82rem, 2vw, 1rem);
  font-weight: 700;
}

.separator {
  color: #9baac0;
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 300;
  transform: translateY(-.4em);
  margin-inline: .8rem;
}

.target-date { margin: 1.6rem 0 0; }
.finished-message { margin: 1.4rem 0 0; color: #157347; font-weight: 700; }

@media (max-width: 480px) {
  .countdown { gap: .2rem; padding-inline: .7rem; border-radius: 20px; }
  /*.separator { display: none; }*/
  .separator { display: block; font-size: 1.8rem; margin-inline: .1rem; }
  .time-unit { min-width: 0; flex: 1; }
  .time-unit:first-child { flex: 1; }
}
