:root {
  --green: #0e2b1f;
  --green-soft: #214c38;
  --gold: #d3a43d;
  --gold-soft: #efd68d;
  --ivory: #fbf7ed;
}

* { box-sizing: border-box; }

html, body { width: 100%; min-height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--green);
  color: white;
  font-family: "Montserrat", Arial, sans-serif;
}

.screen {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(211, 164, 61, 0.18), transparent 27vw),
    radial-gradient(circle at 90% 85%, rgba(47, 100, 75, 0.5), transparent 34vw),
    var(--green);
}

.screen::before,
.screen::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(239, 214, 141, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.screen::before { width: 36vw; height: 36vw; top: -18vw; left: -15vw; }
.screen::after { width: 28vw; height: 28vw; right: -12vw; bottom: -14vw; }

header,
footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.4rem, 3vw, 2.5rem) clamp(1.4rem, 5vw, 5rem);
}

header a,
footer p {
  margin: 0;
  color: white;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 600;
  text-decoration: none;
}

header i,
footer i {
  color: var(--gold);
  font-family: "Alex Brush", cursive;
  font-size: 1.35em;
  font-weight: 400;
}

.header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.55rem; }

.header-actions span,
footer span {
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(0.62rem, 1vw, 0.8rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

button {
  border: 1px solid rgba(239, 214, 141, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  padding: 0.7rem 1rem;
}

button:hover,
button:focus-visible { border-color: var(--gold-soft); background: rgba(255, 255, 255, 0.12); }

button[aria-pressed="true"] { border-color: var(--gold); background: rgba(211, 164, 61, 0.18); }

.message-stage {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(86vw, 1300px);
  margin: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  margin: 0 0 clamp(1.5rem, 4vh, 3rem);
  color: var(--gold-soft);
  font-size: clamp(0.68rem, 1.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.message-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: min(54vh, 560px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 214, 141, 0.2);
  border-radius: clamp(1.5rem, 4vw, 3.5rem);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.24);
  padding: clamp(3rem, 8vw, 8rem);
  backdrop-filter: blur(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.message-card.changing { opacity: 0; transform: translateY(1.5rem) scale(0.985); }
.message-card.waiting blockquote { max-width: 760px; color: rgba(255, 255, 255, 0.7); font-size: clamp(1.8rem, 4vw, 3.5rem); }

.quote-mark {
  position: absolute;
  top: 0.08em;
  left: 0.4em;
  color: rgba(211, 164, 61, 0.2);
  font-family: Georgia, serif;
  font-size: clamp(8rem, 18vw, 20rem);
  line-height: 1;
}

blockquote {
  position: relative;
  max-width: 1050px;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 5vw, 5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.16;
}

#message-name {
  margin: clamp(1.6rem, 4vh, 3rem) 0 0;
  color: var(--gold-soft);
  font-size: clamp(0.85rem, 1.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.progress {
  width: min(18rem, 50vw);
  height: 2px;
  margin-top: 2rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

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

.progress span.running { animation: message-progress 10s linear forwards; }

.counter {
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes message-progress { from { width: 0; } to { width: 100%; } }

@media (max-width: 700px) {
  .header-actions span,
  footer span { display: none; }
  header { align-items: flex-start; }
  .header-actions { max-width: 15rem; }
  .header-actions button { font-size: 0.62rem; padding: 0.55rem 0.7rem; }
  .message-stage { width: calc(100vw - 2rem); }
  .message-card { min-height: 58vh; padding: 3rem 1.4rem; }
}

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