
:root {
  --ink: #2a1c18;
  --ink-soft: #5a463c;
  --wine: #7a3045;
  --gold: #c4a36a;
  --gold-dim: #a88850;
  --paper: #f4ead8;
  --night: #1a1012;
  --night-2: #2a181c;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--night);
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.55;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(122, 48, 69, 0.28), transparent 46%),
    radial-gradient(ellipse at 80% 90%, rgba(196, 163, 106, 0.08), transparent 40%),
    linear-gradient(180deg, var(--night-2), var(--night) 55%, #120c0d);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stage {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.progress li {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244, 234, 216, 0.22);
}

.progress li.is-on {
  background: var(--gold);
}

.frame {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28), transparent 18%),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(122,48,69,0.06) 47px, rgba(122,48,69,0.06) 48px),
    var(--paper);
  border: 1px solid rgba(196, 163, 106, 0.35);
  box-shadow: var(--shadow);
  padding: 44px 36px 40px;
}

.frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(196, 163, 106, 0.45);
  pointer-events: none;
}

.frame.is-in {
  animation: rise 0.42s ease;
}

.frame.is-out {
  animation: leave 0.22s ease forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes leave {
  to { opacity: 0; transform: translateY(-12px) scale(0.99); }
}

.kicker {
  margin: 0 0 18px;
  text-align: center;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold-dim);
  font-family: "Italiana", serif;
}

h1, h2 {
  font-family: "Italiana", serif;
  font-weight: 400;
  text-align: center;
  letter-spacing: 0.01em;
  margin: 0;
}

h1 {
  font-size: clamp(34px, 8vw, 50px);
  line-height: 1.12;
}

h2 {
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.15;
  margin-bottom: 26px;
}

.rule {
  width: 72px;
  height: 1px;
  margin: 28px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.letter p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

.sign {
  margin-top: 8px !important;
  font-style: italic;
  color: var(--ink) !important;
}

.cta {
  display: block;
  width: 100%;
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid var(--wine);
  background: var(--wine);
  color: #f7efe6;
  font-family: "Italiana", serif;
  font-size: 20px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.cta:hover { background: #632536; }

.back {
  display: block;
  margin: -8px 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold-dim);
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.menu {
  display: flex;
  flex-direction: column;
}

.menu-item {
  display: flex;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid rgba(42, 28, 24, 0.1);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: rgba(122, 48, 69, 0.06);
}

.menu-item .num {
  width: 28px;
  font-family: "Italiana", serif;
  color: var(--gold-dim);
}

.menu-item strong { display: block; font-weight: 500; }
.menu-item em { font-size: 16px; color: var(--ink-soft); }

.datebook-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.datebook-head h3 {
  margin: 0;
  font-family: "Italiana", serif;
  font-weight: 400;
  font-size: 22px;
}

.nav {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(42, 28, 24, 0.16);
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.nav:disabled { opacity: 0.3; cursor: not-allowed; }

.dow,
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.dow {
  margin-bottom: 8px;
  color: var(--gold-dim);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-align: center;
}

.day {
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  cursor: pointer;
}

.day[aria-disabled="true"] {
  opacity: 0.28;
  cursor: default;
}

.day.is-weekend:not([aria-disabled="true"]) { color: var(--wine); }

.day:hover:not([aria-disabled="true"]) {
  background: rgba(122, 48, 69, 0.1);
}

.time-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.time {
  width: 100%;
  border: 1px solid rgba(42, 28, 24, 0.16);
  background: transparent;
  padding: 14px 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  cursor: pointer;
}

.time:hover { background: rgba(122, 48, 69, 0.08); }

.summary {
  margin: -8px 0 20px;
  text-align: center;
  font-style: italic;
  color: var(--wine);
}

.note {
  display: block;
  font-size: 16px;
  color: var(--ink-soft);
}

.note textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(42, 28, 24, 0.16);
  background: rgba(255,255,255,0.35);
  font: inherit;
  color: var(--ink);
  resize: vertical;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.hint {
  margin: 12px 0 0;
  color: var(--wine);
  font-size: 16px;
}

.decline {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-style: italic;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stub {
  margin: 8px 0 24px;
  padding: 22px 8px;
  border-top: 1px dashed rgba(42, 28, 24, 0.2);
  border-bottom: 1px dashed rgba(42, 28, 24, 0.2);
  text-align: center;
}

.stub-kicker {
  margin: 0 0 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold-dim);
}

.stub-names {
  margin: 0;
  font-family: "Italiana", serif;
  font-size: 32px;
}

.stub-meta {
  margin: 10px 0 0;
  font-style: italic;
  color: var(--ink-soft);
}

.after {
  text-align: center;
  color: var(--ink-soft);
}

@media (max-width: 520px) {
  .frame { padding: 34px 22px 30px; }
  body { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .frame.is-in,
  .frame.is-out { animation: none; }
}
