:root {
  --ink: #24161f;
  --muted: #75646e;
  --wine: #6f2948;
  --wine-dark: #42172d;
  --rose: #c98a9c;
  --blush: #f3e7e5;
  --paper: #fffaf5;
  --cream: #f7f0e7;
  --gold: #b99055;
  --line: rgba(75, 31, 53, 0.14);
  --shadow: 0 28px 80px rgba(52, 20, 38, 0.15);
  --radius: 30px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--cream); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: var(--wine); }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, blockquote {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.primary-button {
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--wine), #8f3d5f);
  box-shadow: 0 12px 28px rgba(111, 41, 72, 0.22);
  font-weight: 750;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(111, 41, 72, 0.28); }
.primary-button:disabled { cursor: wait; opacity: 0.62; transform: none; }
.text-button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--wine);
  background: transparent;
}

.landing-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 25% 10%, rgba(201, 138, 156, 0.3), transparent 32%),
    radial-gradient(circle at 80% 90%, rgba(185, 144, 85, 0.2), transparent 30%),
    var(--cream);
}
.quiet-card {
  position: relative;
  width: min(720px, 100%);
  overflow: hidden;
  padding: clamp(40px, 8vw, 90px);
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 42px;
  text-align: center;
  background: rgba(255, 250, 245, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.quiet-card h1 { margin-bottom: 22px; font-size: clamp(40px, 7vw, 72px); line-height: 0.98; }
.quiet-card p { max-width: 480px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.7; }
.seal, .petal-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 34px auto 0;
  place-items: center;
  border: 1px solid rgba(185,144,85,0.5);
  border-radius: 50%;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 27px;
}

.invite-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(168, 82, 112, 0.14), transparent 26%),
    radial-gradient(circle at 85% 35%, rgba(185, 144, 85, 0.12), transparent 22%),
    #f8f1e9;
}
.stars { position: fixed; inset: 0; pointer-events: none; opacity: 0.5; background-image: radial-gradient(circle, rgba(185, 144, 85, 0.38) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, black, transparent 80%); }
.invite-shell { position: relative; z-index: 1; width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 70px; }
.invitation-card {
  display: flex;
  min-height: calc(100vh - 64px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 48px 24px;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 38px;
  text-align: center;
  background: rgba(255,250,245,0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.invitation-card h1 { max-width: 820px; margin-bottom: 24px; font-size: clamp(45px, 8vw, 86px); line-height: 0.97; }
.invitation-card > p { max-width: 540px; margin-bottom: 32px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.invitation-card small { margin-top: 16px; color: var(--muted); }
.cover { position: relative; overflow: hidden; transition: opacity 480ms ease, transform 480ms ease; }
.cover.opening { opacity: 0; transform: scale(1.02); }
.cover-orbit { display: grid; width: 112px; height: 112px; margin-bottom: 34px; place-items: center; border: 1px solid rgba(185,144,85,0.36); border-radius: 50%; color: var(--gold); font-size: 28px; animation: breathe 3.2s ease-in-out infinite; }
.cover-orbit::before, .cover-orbit::after { position: absolute; width: 76px; height: 76px; border: 1px solid rgba(201,138,156,0.23); border-radius: 50%; content: ""; transform: translate(-24px, 7px); }
.cover-orbit::after { transform: translate(23px, -7px); }
@keyframes breathe { 50% { transform: scale(1.06) rotate(5deg); } }

.story { display: grid; gap: 22px; animation: reveal 700ms ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(20px); } }
.section-panel { padding: clamp(30px, 6vw, 72px); border: 1px solid rgba(255,255,255,0.7); border-radius: var(--radius); background: rgba(255,250,245,0.9); box-shadow: 0 16px 50px rgba(52,20,38,0.08); }
.hero-section { display: grid; min-height: 70vh; align-items: center; gap: clamp(36px, 7vw, 84px); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); overflow: hidden; }
.hero-section:has(.photo-wrap.hidden) { grid-template-columns: 1fr; text-align: center; }
.hero-section:has(.photo-wrap.hidden) .hero-copy { max-width: 760px; margin: 0 auto; }
.photo-wrap { position: relative; overflow: hidden; min-height: 520px; border-radius: 200px 200px 22px 22px; background: #eadbd8; }
.photo-wrap::after { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,0.64); border-radius: inherit; content: ""; }
.photo-wrap img { width: 100%; height: 100%; min-height: 520px; object-fit: cover; }
.hero-copy h1 { margin-bottom: 24px; font-size: clamp(48px, 7.2vw, 92px); line-height: 0.94; }
.lead { color: var(--muted); font-size: clamp(17px, 2.1vw, 21px); line-height: 1.75; white-space: pre-line; }
.music-pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 11px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--wine); background: var(--paper); }
.music-pill.playing .music-icon { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.35); } }
.quote-section { position: relative; overflow: hidden; padding-top: clamp(50px, 9vw, 110px); padding-bottom: clamp(50px, 9vw, 110px); text-align: center; color: white; background: linear-gradient(145deg, var(--wine-dark), #7a3150); }
.quote-section::before { position: absolute; top: -90px; right: -40px; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,0.08); border-radius: 50%; content: ""; }
.quote-section blockquote { max-width: 820px; margin: 0 auto 22px; font-size: clamp(32px, 5vw, 57px); line-height: 1.12; }
.song-title { margin: 0; color: rgba(255,255,255,0.64); font-size: 14px; }
.date-section h2, .response-section h2, .calendar-section h2 { margin-bottom: 26px; font-size: clamp(36px, 5vw, 58px); }
.date-section { background: linear-gradient(135deg, rgba(255,250,245,0.94), rgba(243,231,229,0.93)); }
.date-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.date-tile { min-height: 145px; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,0.48); }
.date-tile span { display: block; margin-bottom: 28px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.date-tile strong { display: block; font-family: Georgia, serif; font-size: clamp(26px, 4vw, 40px); font-weight: 400; }
.date-tile small { display: block; margin-top: 7px; color: var(--wine); font-size: 15px; }
.plan { max-width: 760px; margin: 28px 0 0; color: var(--muted); font-size: 17px; line-height: 1.75; white-space: pre-line; }
.calendar-button { display: inline-flex; align-items: center; gap: 9px; margin-top: 26px; padding: 12px 17px; border: 1px solid var(--line); border-radius: 999px; color: var(--wine); background: rgba(255,255,255,0.58); font-size: 14px; font-weight: 750; text-decoration: none; transition: border-color 180ms ease, transform 180ms ease; }
.calendar-button:hover { border-color: var(--rose); transform: translateY(-2px); }
.calendar-button span { color: var(--gold); font-size: 18px; line-height: 1; }
.memory-section { display: grid; grid-template-columns: 0.55fr 1.45fr; gap: 50px; align-items: start; }
.memory-section p { margin: 0; font-family: Georgia, serif; font-size: clamp(25px, 4vw, 42px); line-height: 1.28; white-space: pre-line; }
.answer-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.answer-button { min-height: 82px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: rgba(255,255,255,0.52); transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.answer-button:hover { transform: translateY(-2px); border-color: var(--rose); }
.answer-button.selected { border-color: var(--wine); color: var(--wine); background: var(--blush); box-shadow: inset 0 0 0 1px var(--wine); }
.alternative-fields { margin-top: 22px; padding: 22px; border-radius: 20px; background: var(--blush); }
.alternative-fields p { color: var(--muted); line-height: 1.55; }
.message-field { display: block; margin: 24px 0 18px; }
.message-field textarea { margin-top: 9px; }
.response-section .primary-button { min-width: 230px; }
.form-status { margin: 13px 0 0; color: var(--wine); font-size: 14px; line-height: 1.5; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.calendar-glyph { color: var(--gold); font-family: Georgia, serif; font-size: 42px; }
.calendar-list { display: grid; gap: 12px; }
.calendar-item { display: grid; align-items: center; gap: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 20px; grid-template-columns: 68px minmax(0, 1fr) auto; }
.calendar-date { display: grid; width: 58px; height: 62px; place-items: center; align-content: center; border-radius: 16px; color: white; background: var(--wine); }
.calendar-date strong { font-family: Georgia, serif; font-size: 25px; font-weight: 400; line-height: 1; }
.calendar-date span { margin-top: 4px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.calendar-copy h3 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 21px; font-weight: 400; }
.calendar-copy p, .calendar-copy small { display: block; margin: 0; color: var(--muted); }
.calendar-copy small { margin-top: 5px; color: var(--wine); }
.calendar-status { padding: 7px 10px; border-radius: 999px; color: var(--wine); background: var(--blush); font-size: 12px; }
.story footer { padding: 30px; color: var(--muted); text-align: center; font-family: Georgia, serif; font-size: 17px; }
.story footer span { margin-left: 10px; color: var(--gold); }

.admin-page { background: #f4eee7; }
.admin-shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 36px 0 70px; }
.admin-card { border: 1px solid rgba(255,255,255,0.78); border-radius: 26px; background: rgba(255,250,245,0.88); box-shadow: 0 16px 48px rgba(52,20,38,0.07); }
.login-panel { width: min(520px, 100%); margin: 8vh auto 0; padding: clamp(32px, 6vw, 58px); }
.login-panel h1 { margin-bottom: 15px; font-size: 48px; line-height: 1; }
.login-panel > p { color: var(--muted); line-height: 1.6; }
.login-panel .primary-button { width: 100%; margin-top: 8px; }
.admin-brand { display: grid; width: 58px; height: 58px; margin-bottom: 34px; place-items: center; border-radius: 18px; color: white; background: var(--wine); font-family: Georgia, serif; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.admin-header h1 { margin: 0; font-size: clamp(42px, 6vw, 70px); line-height: 1; }
.admin-grid { display: grid; align-items: start; gap: 22px; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr); }
.editor-card, .preview-card, .history-card { padding: clamp(24px, 4vw, 40px); }
.editor-card h2, .history-card h2 { margin-bottom: 24px; font-size: 36px; }
.step-badge { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--wine); font-size: 12px; }
label { display: block; margin-bottom: 18px; color: #553e49; font-size: 13px; font-weight: 700; }
input, textarea { width: 100%; margin-top: 8px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; outline: none; color: var(--ink); background: rgba(255,255,255,0.72); transition: border-color 160ms ease, box-shadow 160ms ease; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(201,138,156,0.15); }
.two-columns { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upload-grid { display: grid; gap: 14px; margin: 8px 0 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upload-box { min-height: 108px; margin: 0; padding: 18px; border: 1px dashed rgba(111,41,72,0.28); border-radius: 18px; background: rgba(243,231,229,0.45); }
.upload-box span, .upload-box small { display: block; }
.upload-box small { margin: 5px 0 10px; color: var(--muted); font-weight: 400; line-height: 1.4; }
.upload-box input { margin: 0; padding: 0; border: 0; background: none; font-size: 12px; }
.editor-card .primary-button { width: 100%; }
.preview-card { position: sticky; top: 22px; overflow: hidden; }
.mini-preview { position: relative; overflow: hidden; min-height: 390px; margin-top: 22px; padding: 34px 28px; border-radius: 22px; color: white; background: linear-gradient(145deg, #3f172d, #78324f); }
.mini-preview::after { position: absolute; right: -70px; bottom: -100px; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,0.13); border-radius: 50%; content: ""; }
.mini-preview h2 { position: absolute; right: 28px; bottom: 80px; left: 28px; margin: 0; font-size: 38px; line-height: 1; }
.mini-preview p { position: absolute; right: 28px; bottom: 18px; left: 28px; color: rgba(255,255,255,0.65); font-size: 13px; line-height: 1.5; }
.mini-moon { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid rgba(255,255,255,0.27); border-radius: 50%; color: #e1bd83; font-family: Georgia, serif; font-size: 25px; }
.privacy-note { display: flex; gap: 13px; margin-top: 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.privacy-note > span { color: var(--gold); }
.privacy-note p { margin: 0; }
.history-card { margin-top: 22px; }
.admin-list { display: grid; gap: 12px; }
.admin-list-item { display: grid; align-items: center; gap: 18px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; grid-template-columns: 60px minmax(0, 1fr) auto; }
.admin-list-item.inactive { opacity: 0.58; }
.list-date { text-align: center; }
.list-date strong, .list-date span { display: block; }
.list-date strong { font-family: Georgia, serif; font-size: 29px; font-weight: 400; }
.list-date span { color: var(--wine); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; }
.list-main h3 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 20px; font-weight: 400; }
.list-meta, .list-response { margin: 3px 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.list-response { color: var(--wine); }
.list-main a { display: inline-block; margin-top: 5px; font-size: 12px; }
.list-actions { display: flex; flex-direction: column; gap: 7px; }
.copy-button, .toggle-button, .inline-copy { padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--wine); background: transparent; font-size: 12px; }
.inline-copy { display: inline-block; margin-left: 5px; }
.empty-state { padding: 34px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; }

@media (max-width: 820px) {
  .hero-section, .memory-section, .admin-grid { grid-template-columns: 1fr; }
  .photo-wrap, .photo-wrap img { min-height: 430px; }
  .preview-card { position: static; }
  .answer-grid { grid-template-columns: 1fr; }
  .memory-section { gap: 12px; }
  .admin-list-item { grid-template-columns: 52px minmax(0, 1fr); }
  .list-actions { grid-column: 1 / -1; flex-direction: row; }
}

@media (max-width: 560px) {
  .invite-shell, .admin-shell { width: min(100% - 20px, 1080px); padding-top: 10px; }
  .invitation-card { min-height: calc(100vh - 20px); border-radius: 24px; }
  .section-panel { border-radius: 22px; }
  .hero-section { min-height: auto; }
  .hero-copy h1 { font-size: 46px; }
  .photo-wrap, .photo-wrap img { min-height: 360px; }
  .date-grid, .two-columns, .upload-grid { grid-template-columns: 1fr; }
  .calendar-item { gap: 12px; grid-template-columns: 58px minmax(0, 1fr); }
  .calendar-status { grid-column: 2; justify-self: start; }
  .admin-header { align-items: center; }
  .admin-header h1 { font-size: 40px; }
}

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