/* =========================================================================
   Lightyears — "observatory logbook" theme
   A star-chart / instrument-panel look: deep ink, an amber lamp accent,
   hairline plates with corner reticles, and monospace catalog readouts.
   ========================================================================= */

:root {
  /* Ink — cold deep night, almost black, with a faint blue cast. */
  --ink-900: #05060c;
  --ink-800: #080a14;
  --ink-700: #0c0f1d;
  --ink-600: #121627;

  /* Text */
  --text: #e8e9f2;
  --text-soft: #9aa0bd;
  --text-faint: #5a607e;

  /* Accent — a warm observatory lamp amber, the signature colour. */
  --amber: #ffb347;
  --amber-soft: #ffd9a0;
  --amber-deep: #c8791f;

  /* A cold counter-accent used sparingly for "starlight". */
  --cold: #93b8ff;

  /* Plate (the chart panels) — flat, hairline-bordered, barely-there fill. */
  --plate: rgba(12, 15, 29, 0.72);
  --line: rgba(255, 179, 71, 0.22);
  --line-soft: rgba(154, 160, 189, 0.16);

  --max: 660px;
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--sans);
  color: var(--text);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(120% 80% at 50% -20%, #11162e 0%, var(--ink-800) 40%, var(--ink-900) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* A faint scanline/paper grain over everything — the "instrument" texture. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.05;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.5) 0,
    rgba(255, 255, 255, 0.5) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* ---------- Starfield (CSS placeholder / WebGL fallback) ---------------- */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.layer {
  position: absolute;
  inset: -50%;
  background-repeat: repeat;
}

.layer--far {
  background-image:
    radial-gradient(1px 1px at 20% 30%, #ffffff 50%, transparent),
    radial-gradient(1px 1px at 70% 60%, #cdd7ff 50%, transparent),
    radial-gradient(1px 1px at 40% 80%, #ffffff 50%, transparent),
    radial-gradient(1px 1px at 85% 15%, #e7ecff 50%, transparent),
    radial-gradient(1px 1px at 10% 70%, #ffffff 50%, transparent);
  background-size: 320px 320px;
  opacity: 0.45;
  animation: drift 240s linear infinite, twinkle 6s ease-in-out infinite;
}

.layer--mid {
  background-image:
    radial-gradient(1.6px 1.6px at 50% 20%, #ffffff 50%, transparent),
    radial-gradient(1.6px 1.6px at 15% 55%, #dfe6ff 50%, transparent),
    radial-gradient(1.6px 1.6px at 80% 75%, #ffffff 50%, transparent),
    radial-gradient(1.6px 1.6px at 35% 40%, #cdd7ff 50%, transparent);
  background-size: 480px 480px;
  opacity: 0.65;
  animation: drift 180s linear infinite reverse, twinkle 5s ease-in-out infinite;
}

.layer--near {
  background-image:
    radial-gradient(2.2px 2.2px at 60% 35%, #ffffff 60%, transparent),
    radial-gradient(2px 2px at 25% 75%, var(--amber-soft) 60%, transparent),
    radial-gradient(2px 2px at 90% 50%, #ffffff 60%, transparent);
  background-size: 700px 700px;
  opacity: 0.85;
  animation: drift 120s linear infinite, twinkle 4s ease-in-out infinite;
}

/* The signature backdrop: two faint amber/cold "lamp" washes, low and warm. */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.glow--one {
  width: 52vw;
  height: 52vw;
  top: -14vw;
  left: -12vw;
  background: radial-gradient(circle, rgba(255, 179, 71, 0.16), transparent 70%);
}

.glow--two {
  width: 46vw;
  height: 46vw;
  bottom: -16vw;
  right: -14vw;
  background: radial-gradient(circle, rgba(147, 184, 255, 0.12), transparent 70%);
}

@keyframes drift {
  to {
    transform: translate3d(-60px, -40px, 0);
  }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* ---------- 3D galaxy canvas -------------------------------------------- */
.galaxy-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.galaxy-canvas.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.galaxy-active .starfield {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.galaxy-hint {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: 7px 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: rgba(8, 10, 20, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  animation: rise 1.2s var(--ease) both;
}

/* ---------- Stage / layout ---------------------------------------------- */
.stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 22px 72px;
  text-align: left;
}

.galaxy-active .stage {
  pointer-events: none;
  justify-content: flex-end;
}

.galaxy-active .card,
.galaxy-active .footer,
.galaxy-active .timeline,
.galaxy-active .starpost {
  pointer-events: auto;
}

.galaxy-active .result {
  margin-bottom: 8px;
}

@media (min-width: 760px) {
  .galaxy-active .stage {
    align-items: flex-start;
    justify-content: center;
    padding-left: 5vw;
  }
  .galaxy-active .result {
    margin-bottom: 0;
  }
}

/* ---------- Hero --------------------------------------------------------- */
.hero {
  width: 100%;
  max-width: var(--max);
  animation: rise 1s var(--ease) both;
}

/* The eyebrow reads like a catalog header line. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--amber);
}

.title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.2rem, 14vw, 6.5rem);
  line-height: 0.92;
  margin: 0;
  letter-spacing: -0.025em;
  color: var(--text);
}

/* The amber underline tick under the wordmark — chart annotation feel. */
.title::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin-top: 18px;
  background: var(--amber);
  box-shadow: 0 0 16px rgba(255, 179, 71, 0.6);
}

.tagline {
  margin: 26px 0 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 3.2vw, 1.28rem);
  line-height: 1.55;
  color: var(--text-soft);
  font-weight: 300;
}

.tagline__accent {
  display: inline;
  color: var(--amber-soft);
  font-weight: 500;
}

/* ---------- Finder form -------------------------------------------------- */
.finder {
  margin-top: 44px;
}

.finder__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.finder__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.finder__input {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 16px 18px;
  font-size: 1rem;
  font-family: var(--mono);
  color: var(--text);
  background: var(--ink-700);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s;
  color-scheme: dark;
}

.finder__input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), 0 0 18px rgba(255, 179, 71, 0.18);
}

/* Primary button: a flat amber plate with an engraved label, no gradient. */
.btn-find {
  position: relative;
  flex: 0 0 auto;
  padding: 16px 28px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-900);
  border: 1px solid var(--amber);
  border-radius: 3px;
  cursor: pointer;
  background: var(--amber);
  transition: transform 0.18s var(--ease), box-shadow 0.22s, background 0.2s;
  overflow: hidden;
}

.btn-find:hover {
  transform: translateY(-2px);
  background: var(--amber-soft);
  box-shadow: 0 10px 30px rgba(255, 179, 71, 0.28);
}

.btn-find:active {
  transform: translateY(0);
}

.btn-find__spark {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120px 60px at var(--x, 50%) 50%,
    rgba(255, 255, 255, 0.55),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-find:hover .btn-find__spark {
  opacity: 1;
}

.finder__hint {
  margin: 18px 0 0;
  max-width: 46ch;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-faint);
}

.finder__error {
  margin: 12px 0 0;
  font-family: var(--mono);
  color: #ff8f8f;
  font-size: 0.85rem;
}

/* ---------- A reusable "chart plate" -------------------------------------
   Hairline-bordered panel with reticle ticks at the corners. Used by the
   result card, timeline, and starpost panels. */
.result {
  width: 100%;
  max-width: var(--max);
}

.card {
  position: relative;
  padding: 40px 32px 34px;
  border-radius: 4px;
  background: var(--plate);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: cardIn 0.9s var(--ease) both;
}

/* Corner reticle ticks (top-left + bottom-right) via the two pseudos. */
.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--amber);
  pointer-events: none;
}

.card::before {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
}

.card::after {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
}

.card__halo {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--star-color, #fff), transparent 65%);
  opacity: 0.18;
  filter: blur(24px);
  pointer-events: none;
}

.card__kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.card__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.3rem, 9vw, 3.6rem);
  margin: 10px 0 20px;
  line-height: 1.02;
  color: #fff;
  text-shadow: 0 0 40px var(--star-color, rgba(255, 255, 255, 0.4));
}

.card__dot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line-soft);
}

.card__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--star-color, #fff);
  box-shadow: 0 0 16px 3px var(--star-color, #fff);
  animation: pulse 2.6s ease-in-out infinite;
}

.card__meta {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-soft);
}

.card__line {
  margin: 0 0 16px;
  max-width: 40ch;
  font-size: clamp(1.05rem, 3.4vw, 1.28rem);
  line-height: 1.55;
  color: var(--text);
  font-weight: 300;
}

.card__line strong {
  font-weight: 600;
  color: var(--amber-soft);
}

.card__poem {
  margin: 0;
  max-width: 38ch;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.card__actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Secondary / ghost buttons ----------------------------------- */
.btn-soft {
  padding: 12px 20px;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-900);
  background: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s, box-shadow 0.22s;
}

.btn-soft:hover {
  transform: translateY(-2px);
  background: var(--amber-soft);
  box-shadow: 0 8px 24px rgba(255, 179, 71, 0.26);
}

.btn-ghost {
  padding: 12px 20px;
  font-size: 0.76rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--amber);
  background: rgba(255, 179, 71, 0.06);
}

/* ---------- Timeline — "The Universe Is Watching" ----------------------- */
.timeline {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin-top: 16px;
  padding: 24px 26px 26px;
  border-radius: 4px;
  background: var(--plate);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  text-align: left;
  animation: cardIn 0.7s var(--ease) both;
}

.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--amber);
  pointer-events: none;
}
.timeline::before {
  top: 12px;
  right: 12px;
  border-left: none;
  border-bottom: none;
}
.timeline::after {
  bottom: 12px;
  left: 12px;
  border-right: none;
  border-top: none;
}

.timeline__eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.timeline__headline {
  margin: 0 0 22px;
  font-size: clamp(1rem, 3.2vw, 1.2rem);
  line-height: 1.55;
  color: var(--text);
  font-weight: 300;
  min-height: 3.2em;
}

.timeline__headline strong {
  font-weight: 600;
  color: var(--amber-soft);
}

.timeline__sliderwrap {
  margin: 0 0 18px;
}

.timeline__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  border-radius: 0;
  background: linear-gradient(90deg, var(--amber), var(--cold));
  outline: none;
  cursor: pointer;
}

.timeline__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-900);
  border: 2px solid var(--amber);
  box-shadow: 0 0 12px 2px rgba(255, 179, 71, 0.7);
  cursor: pointer;
  transition: transform 0.15s;
}

.timeline__slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.timeline__slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-900);
  border: 2px solid var(--amber);
  box-shadow: 0 0 12px 2px rgba(255, 179, 71, 0.7);
  cursor: pointer;
}

.timeline__slider:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.25);
}

.timeline__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.timeline__events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tl-chip {
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  background: var(--ink-700);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s;
}

.tl-chip:hover {
  color: var(--text);
  border-color: var(--amber);
  background: rgba(255, 179, 71, 0.08);
  transform: translateY(-1px);
}

.tl-chip__emoji {
  margin-right: 4px;
}

.tl-chip--you {
  color: var(--ink-900);
  background: var(--amber);
  border-color: var(--amber);
  font-weight: 600;
}

.tl-chip--you:hover {
  color: var(--ink-900);
  background: var(--amber-soft);
}

.timeline-active .timeline {
  pointer-events: auto;
}

@media (min-width: 760px) {
  .timeline-active .stage {
    align-items: flex-start;
  }
}

/* ---------- Starpost — pin a message + share card ----------------------- */
.starpost {
  width: 100%;
  max-width: var(--max);
  margin-top: 16px;
  animation: cardIn 0.7s var(--ease) both;
}

.starpost__composer,
.starpost__output {
  position: relative;
  padding: 24px 26px 26px;
  border-radius: 4px;
  background: var(--plate);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.starpost__composer::before,
.starpost__output::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 14px;
  height: 14px;
  border: 1px solid var(--amber);
  border-right: none;
  border-bottom: none;
  pointer-events: none;
}

.starpost__label {
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.starpost__label span {
  color: var(--amber-soft);
  font-weight: 600;
}

.starpost__textarea {
  width: 100%;
  resize: vertical;
  min-height: 80px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--ink-700);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.starpost__textarea::placeholder {
  color: var(--text-faint);
}

.starpost__textarea:focus-visible {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), 0 0 16px rgba(255, 179, 71, 0.16);
}

.starpost__composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.starpost__count {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

/* --- the share card we rasterise to PNG --- */
.starpost__output {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sharecard {
  --star-color: var(--amber-soft);
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(130% 80% at 50% -10%, #16203f 0%, #0a0e1f 45%, #05060c 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

/* A thin inner frame so the card reads like a printed plate. */
.sharecard::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 179, 71, 0.25);
  border-radius: 3px;
  pointer-events: none;
  z-index: 2;
}

.sharecard__sky {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 22%, #ffffff, transparent),
    radial-gradient(1px 1px at 70% 16%, #cdd7ff, transparent),
    radial-gradient(1.5px 1.5px at 82% 64%, #ffffff, transparent),
    radial-gradient(1px 1px at 33% 78%, #bcd0ff, transparent),
    radial-gradient(1px 1px at 52% 44%, #ffffff, transparent),
    radial-gradient(1.5px 1.5px at 12% 60%, var(--amber-soft), transparent),
    radial-gradient(1px 1px at 90% 38%, #ffffff, transparent),
    radial-gradient(1px 1px at 60% 88%, #cdd7ff, transparent);
  opacity: 0.85;
}

.sharecard__sky::after {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--star-color);
  box-shadow:
    0 0 18px 6px var(--star-color),
    0 0 48px 18px color-mix(in srgb, var(--star-color) 45%, transparent);
}

.sharecard__inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 30px 30px;
  text-align: left;
}

.sharecard__brand {
  position: absolute;
  top: 26px;
  left: 30px;
  right: 30px;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.36em;
  color: var(--amber);
}

.sharecard__kicker {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.sharecard__name {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  line-height: 1.05;
  color: #fff;
}

.sharecard__meta {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--amber-soft);
}

.sharecard__message {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 4.4vw, 1.2rem);
  line-height: 1.5;
  color: var(--text);
}

.sharecard__foot {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--text-faint);
}

.starpost__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}

.btn-share {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 16px;
  border-radius: 3px;
  border: 1px solid var(--line-soft);
  background: var(--ink-700);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-share:hover {
  transform: translateY(-1px);
}

.btn-share--whatsapp:hover {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.12);
}

.btn-share--twitter:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.btn-share:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.starpost__hint {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  text-align: center;
}

.galaxy-active .starpost__output {
  align-items: center;
}

/* ---------- Footer ------------------------------------------------------- */
.footer {
  margin-top: 48px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.footer a {
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.footer a:hover {
  color: var(--amber);
  border-color: var(--amber);
}

/* ---------- Animations --------------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.25); opacity: 1; }
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .layer,
  .card__dot,
  .hero,
  .card {
    animation: none !important;
  }
}
