:root {
  --paper: #f3e6d8;
  --paper-deep: #ead8c6;
  --card: #fffaf4;
  --ink: #3a2a26;
  --muted: #6a514a;
  --rose: #8d4d45;
  --blush: #f6d7cf;
  --blush-line: #e7b2a8;
  --sage: #2f5e45;
  --sage-soft: #e5f0e8;
  --gold: #a67c45;
  --line: #ead9cb;
  --shadow: 0 16px 40px rgba(90, 52, 36, 0.08);
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 1.05rem;
  line-height: 1.5;
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(231, 178, 168, 0.55), transparent 60%),
    radial-gradient(700px 380px at 110% 0%, rgba(166, 124, 69, 0.18), transparent 55%),
    radial-gradient(500px 300px at 50% 120%, rgba(47, 94, 69, 0.08), transparent 50%);
}

.page {
  position: relative;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(48px + env(safe-area-inset-bottom));
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--card);
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus { top: 12px; z-index: 5; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.hero-photo {
  margin: 8px -18px 18px;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 0 0 28px 28px;
  background: #1c1c1c;
}

.mark {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 650;
  font-size: clamp(2.5rem, 11vw, 4.5rem);
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.eyebrow {
  margin: 18px 0 8px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--rose);
  font-size: 1.15rem;
}

.sub {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 520;
  font-size: clamp(1.6rem, 5vw, 2.15rem);
  color: var(--rose);
}

.lede {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 38rem;
}

.hero-links { margin: 14px 0 0; }
.hero-links a {
  color: var(--sage);
  font-weight: 700;
  text-underline-offset: 3px;
}

.banner {
  margin: 26px 0 8px;
  background: var(--blush);
  border-radius: 28px;
  padding: 18px 20px 16px;
  box-shadow: var(--shadow);
}

.banner-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c45b52;
  box-shadow: 0 0 0 0 rgba(196, 91, 82, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(196, 91, 82, 0.45); }
  100% { box-shadow: 0 0 0 12px rgba(196, 91, 82, 0); }
}

.banner-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 6px 0 0;
}

.banner-text {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  line-height: 1.1;
  font-weight: 650;
}

.banner-time {
  margin: 0;
  color: var(--rose);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.banner-time:empty {
  display: none;
}

.banner-note {
  margin: 8px 0 0;
  color: var(--rose);
  font-size: 0.92rem;
}

.block { margin-top: 32px; }

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 650;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.count { margin: 0; color: var(--muted); font-size: 0.95rem; }

.card, .update, .note {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.update, .note, .note-form, .admin {
  padding: 16px 16px 14px;
  margin-top: 12px;
}

.update time, .note time {
  display: block;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.prose {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.photos {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.photos.multi { grid-template-columns: 1fr 1fr; }

.shot {
  display: block;
  padding: 0;
  border: 0;
  background: var(--paper-deep);
  border-radius: 18px;
  overflow: hidden;
  cursor: zoom-in;
  width: 100%;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
.photos.single .shot img { aspect-ratio: 4 / 3; }

.card-actions, .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-top: 10px;
}

input, textarea, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

textarea { resize: vertical; min-height: 96px; }

button, .text-btn {
  font: inherit;
  cursor: pointer;
}

.primary, .secondary, .ghost, .danger {
  min-height: 48px;
  border-radius: 999px;
  padding: 12px 18px;
  border: 0;
  font-weight: 700;
}

.primary {
  background: var(--sage);
  color: #fffaf4;
  width: 100%;
  margin-top: 8px;
}
.primary.slim { width: auto; flex: 1; }
.secondary {
  background: var(--sage-soft);
  color: var(--sage);
}
.ghost, .text-btn {
  background: transparent;
  color: var(--sage);
  border: 0;
  font-weight: 700;
  min-height: 44px;
}
.danger {
  background: transparent;
  color: #8c3a36;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  border: 1px solid var(--blush-line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 40px;
  font: inherit;
  font-weight: 700;
}

.hint { margin: 6px 0 0; color: var(--muted); font-size: 0.88rem; }
.confirm { min-height: 1.2em; margin: 8px 0 0; color: var(--sage); font-weight: 700; }
.alert-form { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.alert-form h3 { margin: 8px 0 0; font-family: var(--serif); font-size: 1.35rem; }
.alert-list { list-style: none; padding: 0; margin: 12px 0 0; }
.alert-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.error { min-height: 1.2em; margin: 8px 0 0; color: #8c3a36; font-weight: 700; }
.empty { color: var(--muted); }

.note-name {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
}
.note-msg { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.admin h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
}
.signed-in { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }

.previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.preview {
  position: relative;
  width: 84px;
  height: 84px;
}
.preview img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 14px;
}
.preview button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(58, 42, 38, 0.78);
  color: white;
  font-weight: 700;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage);
  font-weight: 700;
}
.file-btn input { display: none; }

details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--sage);
  margin-top: 8px;
}

.foot {
  margin-top: 36px;
  text-align: center;
  color: var(--muted);
}
.foot p { margin: 0; }
.foot p:first-child {
  font-family: var(--serif);
  font-style: italic;
  color: var(--rose);
  font-size: 1.2rem;
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: calc(100% - 16px);
}
#signin[open] {
  display: flex;
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 16px;
  align-items: center;
  justify-content: center;
  background: rgba(58, 42, 38, 0.5);
  z-index: 30;
}
#signin .sheet { width: min(440px, calc(100vw - 24px)); }
[hidden] { display: none !important; }
dialog::backdrop { background: rgba(58, 42, 38, 0.45); }

.sheet {
  background: var(--card);
  border-radius: 28px;
  padding: 22px 18px 16px;
  box-shadow: var(--shadow);
}
.sheet h2 { font-size: 1.8rem; }
.sheet p { color: var(--muted); }

#lightbox {
  width: min(920px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  background: transparent;
}
#lightbox::backdrop { background: rgba(36, 28, 25, 0.84); }
.lb {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
#lb-img {
  width: 100%;
  max-height: 78vh;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  background: #241c19;
}
.lb-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.lb-nav, .lb-close {
  border: 0;
  background: #fffaf4;
  color: var(--ink);
  border-radius: 999px;
  min-width: 44px;
  min-height: 48px;
  padding: 0 16px;
  font-size: 1rem;
  font-weight: 700;
}

#toast {
  position: fixed;
  left: 50%;
  top: calc(12px + env(safe-area-inset-top));
  transform: translateX(-50%) translateY(-8px);
  background: var(--ink);
  color: #fffaf4;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-weight: 700;
  max-width: calc(100vw - 32px);
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.noscript {
  max-width: 40rem;
  margin: 12px auto;
  padding: 0 18px;
}

.removed { opacity: 0.35; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  #toast { transition: none; }
}

@media (min-width: 720px) {
  .page { padding-top: 36px; }
  .hero-photo { margin: 10px 0 22px; }
  .hero-photo img {
    max-height: 720px;
    border-radius: 28px;
  }
  .banner { padding: 22px 26px; }
  .update, .note, .note-form, .admin { padding: 20px 22px; }
}
