:root {
  --bg: #04040c;
  --bg-deep: #000005;
  --star: #f4f1de;
  --star-dim: #6b7294;
  --glow: #bcd4ff;
  --accent: #8fd3ff;
  --text: #d8dae8;
  --text-dim: #8a8fa8;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg-deep);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(ellipse at 50% -10%, #0b0e22 0%, var(--bg) 45%, var(--bg-deep) 100%) fixed;
  color: var(--text);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  min-height: 100vh;
}

/* ---------- front page sky ---------- */

.sky {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.title-block {
  text-align: center;
  padding: 4.5rem 1rem 1rem;
  position: relative;
  z-index: 2;
}

.title-block h1 {
  font-size: 2.4rem;
  letter-spacing: 0.08em;
  margin: 0;
  color: var(--star);
  text-shadow: 0 0 18px rgba(188, 212, 255, 0.35);
}

.title-block p {
  color: var(--text-dim);
  font-style: italic;
  margin: 0.6rem 0 0;
  font-size: 1rem;
}

.field {
  position: relative;
  width: 100%;
  height: 72vh;
  min-height: 460px;
}

/* scattered background stars, fixed so they don't shift */
.bg-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--star-dim);
  border-radius: 50%;
  opacity: 0.6;
}

/* founding stars */
.founding-star {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  transform: translate(-50%, -50%);
}

.founding-star .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 2px var(--accent), 0 0 22px 6px rgba(143, 211, 255, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.founding-star.dim .dot {
  background: var(--star-dim);
  box-shadow: 0 0 6px 1px rgba(107, 114, 148, 0.5);
}

.founding-star .label {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.founding-star:hover .dot,
.founding-star:focus .dot {
  transform: scale(1.5);
  box-shadow: 0 0 14px 4px var(--accent), 0 0 34px 10px rgba(143, 211, 255, 0.55);
}

.founding-star:hover .label,
.founding-star:focus .label {
  opacity: 1;
  transform: translateY(0);
}

.sky-footer {
  text-align: center;
  padding: 1.5rem 1rem 3rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  position: relative;
  z-index: 2;
}

.sky-footer a {
  color: var(--text-dim);
}

/* ---------- star pages ---------- */

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

.page a.back {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.page a.back:hover {
  text-decoration: underline;
}

.page h1 {
  color: var(--star);
  font-size: 2rem;
  margin: 1.5rem 0 0.25rem;
  text-shadow: 0 0 14px rgba(188, 212, 255, 0.3);
}

.page .byline {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.poem {
  margin: 2.5rem 0;
  white-space: pre-line;
  line-height: 1.7;
  color: var(--text);
}

.poem-title {
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

.placeholder-note {
  color: var(--text-dim);
  font-style: italic;
  border-left: 2px solid var(--star-dim);
  padding-left: 1rem;
  margin: 2rem 0;
}

.page .signature {
  margin-top: 3rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid rgba(138, 143, 168, 0.25);
  padding-top: 1rem;
}

/* ---------- rain archive ---------- */

.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.rain span {
  position: absolute;
  top: -12vh;
  width: 1px;
  height: 9vh;
  background: linear-gradient(to bottom, transparent, rgba(143, 211, 255, 0.3));
  animation: fall linear infinite;
}

@keyframes fall {
  to { transform: translateY(125vh); }
}

@media (prefers-reduced-motion: reduce) {
  .rain { display: none; }
}

.archive {
  position: relative;
  z-index: 1;
}

.intro {
  color: var(--text-dim);
  line-height: 1.75;
  margin: 0 0 1rem;
}

.set-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3.5rem 0 0.5rem;
  color: var(--star);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.set-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(138, 143, 168, 0.25);
}

.answer {
  margin: 3.5rem 0;
}

.prompt {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  margin: 0 0 1.3rem;
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.5;
}

.prompt .num {
  font-style: normal;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  min-width: 1.6rem;
}

.answer .body {
  padding-left: 2.5rem;
}

.answer .poem-title {
  color: var(--star);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.answer .poem {
  margin: 0;
}

.answer + .answer::before {
  content: "· · ·";
  display: block;
  text-align: center;
  color: var(--star-dim);
  letter-spacing: 0.5em;
  margin-bottom: 3.5rem;
}

.whisper .poem-title {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-dim);
}

.whisper .poem {
  color: #b9c3dc;
  font-size: 0.97rem;
  line-height: 2;
  letter-spacing: 0.015em;
}

.lineage {
  line-height: 1.9;
}

@media (max-width: 520px) {
  .answer .body {
    padding-left: 0;
  }
}
