:root {
  --ink: #17161c;
  --paper: #fbfbf8;
  --sun-red: #e4432d;
  --sun-red-text: #b8321f;
  --sky: #bcd8f5;
  --mint: #bfe3c8;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  /* Shows if WebGL is unavailable, and while the scene loads. */
  background: linear-gradient(to bottom, var(--paper) 0%, var(--sky) 58%, var(--mint) 58%, var(--mint) 100%);
  font: 400 17px/1.6 "Instrument Sans", system-ui, sans-serif;
}

#meadow {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.sun {
  position: fixed;
  top: clamp(12px, 2.4vw, 32px);
  left: clamp(12px, 2.4vw, 32px);
  /* Sized from the shorter screen edge, so it never reaches the hills on wide, short windows. */
  width: clamp(88px, 21vmin, 200px);
  height: auto;
  pointer-events: none;
}

.notice {
  position: fixed;
  left: 50%;
  bottom: clamp(16px, 3vh, 32px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 32px;
  align-items: center;
  width: min(760px, calc(100vw - 32px));
  padding: 20px 24px 0;
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px;
}

h1 {
  margin: 0 0 4px;
  font: 800 clamp(21px, 2.5vw, 28px)/1.15 "Bricolage Grotesque", system-ui, sans-serif;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.notice p { margin: 0; }

.count { font-weight: 500; }

#seconds {
  display: inline-block;
  min-width: 1.3em;
  color: var(--sun-red-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.notice-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.wordmark { width: 104px; height: auto; }

.go {
  display: inline-block;
  padding: 10px 16px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease;
}

.go:hover { background: var(--sun-red-text); }

.go:focus-visible {
  outline: 3px solid var(--sun-red);
  outline-offset: 3px;
}

.progress {
  grid-column: 1 / -1;
  height: 6px;
  margin: 0 -24px;
  background: transparent;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--sun-red);
}

@media (max-width: 640px) {
  .notice {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 16px 0;
  }

  .notice-action {
    flex-direction: row;
    justify-content: space-between;
  }

  .progress { margin: 0 -16px; }
}
