:root {
  color-scheme: light;
  --background: #faf8f5;
  --surface: #ffffff;
  --surface-warm: #f1ece5;
  --ink: #27231f;
  --body: #6f665d;
  --muted: #a49b91;
  --line: #e3ddd5;
  --accent: #ff6b5b;
  --accent-dark: #da4f42;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.hero {
  min-height: 34vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-bottom: 44px;
  color: var(--body);
  font-weight: 850;
}

.brand img {
  border-radius: 13px;
  box-shadow: 0 10px 26px rgba(39, 35, 31, 0.12);
}

.kicker {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.96;
}

h2 {
  font-size: 30px;
  line-height: 1.05;
}

.lead {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--body);
  font-size: 19px;
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(39, 35, 31, 0.08);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 18px 48px rgba(39, 35, 31, 0.08);
}

.section-title {
  margin-bottom: 22px;
}

.form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfb;
  color: var(--ink);
  outline: none;
  padding: 16px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

textarea {
  min-height: 170px;
  resize: vertical;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 500;
  text-transform: none;
}

input:focus,
textarea:focus {
  border-color: rgba(255, 107, 91, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 107, 91, 0.12);
}

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

button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  padding: 0 18px;
  font-weight: 900;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  background: #ded8d0;
  color: #a79f96;
  cursor: wait;
}

button.secondary {
  background: var(--ink);
}

button.secondary:hover {
  background: #15120f;
}

.notice {
  margin: 0;
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff1ef;
  color: #96352e;
  font-weight: 750;
}

.notice.success {
  background: #edf7ef;
  color: #28613a;
}

.wall {
  position: sticky;
  top: 18px;
}

.wall-list {
  display: grid;
  gap: 12px;
}

.contribution {
  border: 1px solid rgba(39, 35, 31, 0.08);
  border-radius: 8px;
  background: var(--surface-warm);
  padding: 15px;
}

.contribution strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 15px;
}

.contribution p {
  margin: 0;
  color: var(--body);
  line-height: 1.55;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--body);
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .shell {
    padding: 18px;
  }

  .hero {
    min-height: 28vh;
  }

  .brand {
    margin-bottom: 34px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .wall {
    position: static;
  }

  .actions button {
    width: 100%;
  }
}

/* Shared visual language with the mobile theme gallery. */
.shell { width: min(1120px, 100%); padding: clamp(18px, 4vw, 48px); }
.hero { min-height: 0; padding-top: 0; }
.brand { margin-bottom: 30px; letter-spacing: -.05em; font-size: 24px; }
.hero-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr); align-items: center; gap: 24px; }
.hero-copy { min-width: 0; }
.hero-art { width: 100%; height: auto; max-height: 380px; object-fit: contain; }
h1 { font-size: clamp(38px, 6vw, 66px); line-height: 1.06; overflow-wrap: anywhere; }
.kicker { color: var(--accent); line-height: 1.6; overflow-wrap: anywhere; }
.lead { font-size: 17px; opacity: .8; }
.write-link { display: inline-block; color: var(--ink); font-weight: 750; margin: 22px 0 8px; padding: 12px 0; text-underline-offset: 6px; }
.panel { border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); border-radius: 24px; padding: clamp(18px, 3vw, 28px); }
input, textarea { background: var(--background); border-color: color-mix(in srgb, var(--ink) 25%, transparent); }
input::placeholder, textarea::placeholder { color: var(--ink); opacity: .6; }
button { color: var(--button-ink, white); border-radius: 14px; padding: 12px 18px; }
button:hover { filter: brightness(.94); }
button.secondary { background: var(--accent); color: var(--button-ink, white); }
button.secondary:hover { background: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.contribution { background: var(--background); border-radius: 16px; overflow-wrap: anywhere; }
.contribution figure { margin: 16px 0 0; }
.contribution img { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; }
.contribution figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; }
.empty { color: var(--body); background: var(--background); line-height: 1.7; }
[data-theme="editorial_newspaper"] .brand { border-bottom: 3px double var(--ink); width: 100%; padding-bottom: 18px; }
[data-theme="editorial_newspaper"] .panel { border-radius: 2px; border-top: 3px double var(--ink); }
[data-theme="cinema_film"] { color-scheme: dark; }
[data-theme="cinema_film"] .panel { border-top: 5px dashed var(--accent); border-bottom: 5px dashed var(--accent); }
[data-theme="memory_scrapbook"] .contribution { border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); }
[data-theme="wish_garden"] .panel { border-radius: 36px 12px 36px 12px; }
.reveal-page .layout { display: block; }
.reveal-page .wall { position: static; }
@media (max-width: 600px) {
  .hero-content { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-art { max-height: 210px; grid-row: 1; }
  .brand { margin-bottom: 8px; }
  h1 { font-size: clamp(36px, 9vw, 52px); }
  .hero-copy { padding-top: 12px; }
  .lead { line-height: 1.6; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

label { color: var(--ink); opacity: .85; }

.hero-art.personal-cover-photo { object-fit: cover; aspect-ratio: 3 / 2; height: auto; border-radius: 18px; border: 1px solid var(--line); }
.cover-dedication { white-space: pre-wrap; overflow-wrap: anywhere; font-style: italic; line-height: 1.6; }

/* Each journey step gets the space it needs; the cover is a separate first page. */
[hidden] { display: none !important; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.topbar .brand { margin: 0; width: auto; border: 0; padding: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 720px; margin: 0 auto; }
.wall { position: static; }
.topbar .quiet, .quiet { background: transparent; color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.quiet:hover { background: var(--surface); }
.support { font-size: 15px; line-height: 1.6; font-weight: 400; color: var(--ink); opacity: .8; margin: 16px 0; }
.hero-actions { margin-top: 28px; }
.notice { margin-bottom: 22px; }
select { font: inherit; padding: 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--background); color: var(--ink); width: 100%; }
.wall-list { margin-top: 24px; }
#claimButton { margin-top: 28px; width: 100%; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 16px; }
.birthday-fields { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 10px; }
.birthday-fields input { min-width: 0; padding: 12px; }
.gift-link { display: grid; gap: 10px; padding: 22px; background: var(--background); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; }
.gift-link strong { font-family: Georgia, serif; font-size: 26px; }
.gift-link span { font-size: 14px; line-height: 1.6; }
#signOutButton { margin-top: 24px; }
.contribution p { white-space: pre-wrap; }
[data-stage="entry"] .hero { min-height: min(72vh, 720px); justify-content: center; }
@media (max-width: 600px) {
  .topbar { margin-bottom: 18px; }
  .hero-actions button { width: 100%; }
  .hero-art { max-height: 270px; }
  .birthday-fields { grid-template-columns: 1fr 1fr; }
  .birthday-fields label:last-child { grid-column: 1 / -1; }
}
/* Headings receive focus for screen readers, without a button-like outline. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

.feedback-panel{margin:24px 0;padding:20px;border:1px solid var(--border,#e7d9ca);border-radius:20px;background:rgba(255,255,255,.55)}.feedback-panel h3{margin-top:0}

.book-selection-row{display:flex;align-items:center;gap:8px;border-bottom:1px solid #e7ded1;padding:12px 0}.book-selection-row label{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.book-selection-row input[type=checkbox]{width:20px;height:20px;flex:none}.book-selection-row button{padding:8px 12px}#book input[type=checkbox]{width:20px;height:20px}#book [data-download],#book [data-open]{display:inline-block;padding:14px;color:var(--accent,#b74b36);font-weight:700}

.book-selection-row label span{font-size:14px;font-weight:500;line-height:1.5;text-transform:none;letter-spacing:0}#book [data-list]+label{display:flex;align-items:center;gap:10px;text-transform:none;letter-spacing:0;font-weight:600}#book [data-list]+label input{flex:none}

.audio-composer{padding:18px;border:1px solid var(--line,#decdbc);border-radius:20px;background:#fcf8f2;display:grid;gap:12px}.audio-composer[hidden]{display:none}.audio-composer h3,.audio-composer p{margin:0}.audio-composer audio,.contribution audio{width:100%;max-width:100%;margin:10px 0}.audio-play{width:100%;margin-top:12px}.audio-composer button{min-height:48px}
