:root {
  color-scheme: dark;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  background: #07090d;
  color: #ece9e2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(52, 65, 87, .18), transparent 42%),
    linear-gradient(155deg, #090c12 0%, #05070a 68%, #090b10 100%);
}

.gate {
  width: min(100%, 1080px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(48px, 8vh, 84px);
}

.sky {
  position: relative;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
}

.orbit {
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(211, 190, 153, .13);
  border-radius: 50%;
  transform: rotate(-24deg) scaleY(.42);
}

.orbit::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  top: 20px;
  right: 25px;
  border-radius: 50%;
  background: #d7c29d;
  box-shadow: 0 0 12px rgba(215, 194, 157, .65);
}

.star {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff8e8;
  box-shadow:
    0 0 8px 2px rgba(255, 238, 198, .7),
    0 0 30px 8px rgba(220, 194, 145, .22),
    0 0 78px 24px rgba(142, 163, 193, .08);
  animation: breathe 5s ease-in-out infinite;
}

.star::before,
.star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 245, 217, .7), transparent);
  transform: translate(-50%, -50%);
}

.star::before { width: 74px; height: 1px; }
.star::after { width: 1px; height: 74px; background: linear-gradient(transparent, rgba(255, 245, 217, .7), transparent); }

.panel { width: min(100%, 340px); text-align: center; }

.date {
  margin: 0 0 14px;
  color: #a89f90;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .3em;
}

h1 {
  margin: 0 0 48px;
  padding-left: .28em;
  font-size: clamp(38px, 6vh, 54px);
  font-weight: 400;
  letter-spacing: .28em;
  line-height: 1.2;
}

form { text-align: left; }

label {
  display: block;
  margin: 0 0 10px;
  color: #b9b4aa;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: .16em;
}

input {
  display: block;
  width: 100%;
  height: 52px;
  border: 1px solid #363a40;
  border-radius: 3px;
  outline: none;
  padding: 0 16px;
  background: rgba(15, 18, 24, .76);
  color: #f4f0e8;
  caret-color: #dbc49c;
  font: 18px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .08em;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input:focus {
  border-color: #9a8767;
  background: rgba(18, 22, 29, .94);
  box-shadow: 0 0 0 3px rgba(174, 147, 103, .1);
}

input[aria-invalid="true"] { border-color: #a86f68; }

.message {
  min-height: 22px;
  margin: 10px 0 16px;
  color: #d1a39a;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  line-height: 22px;
}

.entries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

button {
  min-width: 0;
  min-height: 48px;
  border-radius: 3px;
  padding: 0 14px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

button:active { transform: translateY(1px); }
button:focus-visible { outline: 2px solid #d8c29d; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .5; }

.primary {
  border: 1px solid #c4ad86;
  background: #c4ad86;
  color: #111318;
}

.primary:hover { background: #d4be98; }

.secondary {
  border: 1px solid #3d4148;
  background: transparent;
  color: #d4d0c8;
}

.secondary:hover { border-color: #777269; background: rgba(255, 255, 255, .025); }

form[aria-busy="true"] .entries { opacity: .72; }

@keyframes breathe {
  0%, 100% { opacity: .82; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (min-width: 800px) and (min-height: 620px) {
  .gate { grid-template-columns: 280px 340px; gap: 100px; }
  .sky { width: 240px; height: 240px; }
}

@media (max-height: 650px) {
  .gate { gap: 24px; padding-top: 24px; padding-bottom: 24px; }
  .sky { width: 100px; height: 100px; }
  h1 { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
