html { -webkit-text-size-adjust: 100%; }
html.cover-showing, html.cover-showing body { overflow: hidden; }
html.modal-open body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
body { min-width: 320px; }
img, video { max-width: 100%; }
button, input, select, textarea { touch-action: manipulation; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nav-btn { justify-content: center; }
.nav-btn, .tag-pill, .card-frame-link, .brand-link { position: relative; }
.nav-btn::after, .tag-pill::after, .card-frame-link::after, .brand-link::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  transform: translate(-50%, -50%);
}
.nav-btn:focus-visible, .tag-pill:focus-visible, .music-icon-btn:focus-visible, .book-cover-open:focus-visible {
  outline: 2px solid var(--ochre-500);
  outline-offset: 2px;
}
.nav-label-short { display: none; }
.contributor-select { max-width: 100%; }
@media (max-width: 1023px) {
  .contributor-select { min-height: 44px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  #trail-log section.mt-20 > div { flex-direction: column; align-items: stretch; text-align: center; }
  #trail-log section.mt-20 > div > div:first-child { text-align: center; }
  #trail-log section.mt-20 .max-w-xl { margin-left: auto; margin-right: auto; }
  #trail-log section.mt-20 .shrink-0 { justify-content: center; }
}
#tagFilterBar { overflow: visible; }

.book-cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--pine-950);
  color: var(--canvas-50);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.cover-opened .book-cover { display: none; }
.book-cover-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.book-cover-open {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  text-align: center;
  cursor: pointer;
}
.book-cover-date {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ochre-400);
}
.book-cover-title {
  font-size: clamp(56px, 15vw, 128px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.book-cover-line {
  font-size: clamp(20px, 4.6vw, 30px);
  font-style: italic;
  color: var(--canvas-200);
  max-width: 22ch;
}
.book-cover-cta {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 30px;
  border-radius: 999px;
  background: var(--ochre-600);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(184, 93, 59, 0.35);
  animation: coverPulse 2.8s ease-in-out infinite;
}
.book-cover-open:hover .book-cover-cta { background: var(--ochre-700); }
.book-cover.is-opening { opacity: 0; transform: translateY(-6%) scale(1.03); pointer-events: none; }
@keyframes coverPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(184, 93, 59, 0.35); }
  50% { box-shadow: 0 10px 40px rgba(216, 142, 92, 0.6); }
}
@media (prefers-reduced-motion: reduce) {
  .book-cover { transition: opacity 0.2s linear; }
  .book-cover.is-opening { transform: none; }
  .book-cover-cta { animation: none; }
  .ken-burns-active { animation: none; }
  .scrapbook-card, .scrapbook-card:hover { transition: none; }
}

.host-bar {
  position: relative;
  z-index: 41;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  padding: 8px 16px;
  background: var(--ochre-700);
  color: #FFFFFF;
  font-size: 13px;
  text-align: center;
}
.host-bar-btn {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-weight: 600;
}

.card-media {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  background: var(--pine-900);
  margin-bottom: 1rem;
  cursor: pointer;
  height: 240px;
}
.card-media img, .card-media video {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 12px;
  display: block;
}
.card-video { cursor: default; }
.card-video video { background: #0A110C; }
.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  max-width: calc(100% - 1.5rem);
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: rgb(15 25 18 / 0.8);
  color: var(--canvas-50);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.card-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
  text-align: center;
  background: var(--pine-800);
}
.card-note-title { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 24px; color: var(--canvas-50); line-height: 1.2; }
.card-note-by { font-size: 12px; letter-spacing: 0.14em; color: var(--ochre-400); }
.grid-empty { text-align: center; color: var(--pine-700); padding: 40px 0; grid-column: 1 / -1; }
.card-title, .card-caption { overflow-wrap: anywhere; }
.card-caption { white-space: pre-line; }
.card-foot { gap: 12px; }
.card-foot > span { overflow-wrap: anywhere; }
.card-frame-link { flex-shrink: 0; }
.scrapbook-card.is-hidden { opacity: 0.55; }
.host-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(138, 71, 32, 0.4);
}
.host-hidden-badge { font-size: 12px; font-weight: 700; color: var(--ochre-700); margin-right: auto; }
.host-btn {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(31, 51, 38, 0.25);
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  color: var(--pine-900);
}
.host-btn-danger { border-color: rgba(184, 93, 59, 0.5); color: var(--ochre-700); }

.modal-overlay { padding: 16px; }
.modal-sheet {
  background: #FAF8F3;
  color: #16241B;
  width: 100%;
  border-radius: 24px;
  padding: 28px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}
.upload-sheet { max-width: 600px; }
.pdf-sheet { max-width: 900px; }
.modal-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.modal-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ochre-600); font-weight: 700; }
.modal-title { margin: 2px 0 0; font-size: 28px; font-weight: 700; line-height: 1.1; }
.modal-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: var(--canvas-200);
  color: var(--pine-900);
  font-size: 18px;
}
.upload-form { display: flex; flex-direction: column; gap: 16px; }
.upload-form .modal-actions { background: #FAF8F3; box-shadow: 0 -12px 12px -12px rgba(22, 36, 27, 0.18); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pine-800); }
.upload-form input[type="text"], .upload-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(31, 51, 38, 0.25);
  background: #FFFFFF;
  font-size: 16px;
  color: var(--pine-900);
}
.upload-form textarea { min-height: 110px; resize: vertical; }
.upload-form input:focus, .upload-form textarea:focus {
  outline: none;
  border-color: var(--ochre-500);
  box-shadow: 0 0 0 3px rgba(198, 118, 66, 0.25);
}
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 120px;
  padding: 18px;
  border-radius: 14px;
  border: 2px dashed var(--ochre-600);
  background: var(--canvas-100);
  color: var(--ochre-700);
  text-align: center;
  cursor: pointer;
}
.drop-zone.is-drag, .drop-zone:hover { background: var(--canvas-200); }
#inputMediaFile:focus-visible + .upload-queue, .drop-zone:focus-within { outline: 2px solid var(--ochre-500); }
.drop-zone-title { font-weight: 700; font-size: 15px; color: var(--pine-900); }
.drop-zone-hint { font-size: 12px; color: var(--pine-700); max-width: 34ch; }
.upload-queue { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid rgba(31, 51, 38, 0.14);
}
.upload-item.is-failed, .upload-item.is-invalid { border-color: rgba(184, 93, 59, 0.6); background: #FFF6EE; }
.upload-item.is-done { border-color: rgba(83, 100, 86, 0.5); }
.upload-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--pine-800);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--canvas-100);
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-info { flex: 1; min-width: 0; }
.upload-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-line { font-size: 12px; color: var(--pine-700); margin-top: 2px; }
.upload-item.is-failed .upload-line, .upload-item.is-invalid .upload-line { color: var(--ochre-700); font-weight: 600; }
.upload-item.is-done .upload-line { color: var(--sage-600, #536456); font-weight: 600; }
.upload-bar { height: 6px; margin-top: 6px; border-radius: 999px; background: var(--canvas-200); overflow: hidden; }
.upload-bar span { display: block; height: 100%; background: var(--ochre-600); border-radius: 999px; transition: width 0.25s ease; }
.upload-item.is-done .upload-bar span { background: #536456; }
.upload-item.is-invalid .upload-bar { display: none; }
.upload-item-btn {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(31, 51, 38, 0.2);
  background: var(--canvas-50);
  font-size: 13px;
  font-weight: 700;
  color: var(--pine-900);
}
.upload-item-btn[data-retry] { background: var(--ochre-600); border-color: var(--ochre-600); color: #FFFFFF; }
.tag-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.tag-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--canvas-200);
  font-size: 13px;
  cursor: pointer;
}
.tag-choice input { width: 18px; height: 18px; accent-color: var(--ochre-600); }
.upload-status { flex-basis: 100%; font-size: 13px; font-weight: 600; color: var(--pine-800); margin: 0; }
.upload-status.is-error { color: var(--ochre-700); }
.modal-actions {
  position: sticky;
  bottom: -28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 0 4px;
  background: linear-gradient(to top, #FAF8F3 75%, rgba(250, 248, 243, 0));
}
.modal-actions .nav-btn { min-width: 110px; }
.modal-actions .nav-btn:disabled { opacity: 0.75; cursor: progress; }
.upload-pill {
  position: fixed;
  left: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 46;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 0;
  background: var(--pine-800);
  color: var(--canvas-50);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  max-width: calc(100vw - 32px);
}
.upload-pill.is-error { background: var(--ochre-700); }

.music-dock {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 45;
  width: 340px;
  max-width: calc(100vw - 32px);
  color: var(--canvas-50);
}
.music-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--pine-800);
  border: 1px solid rgba(216, 142, 92, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.music-icon-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--canvas-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.music-icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.music-play { background: var(--ochre-600); }
.music-play:hover { background: var(--ochre-700); }
.music-play .icon-pause { display: none; }
.music-dock[data-state="playing"] .music-play .icon-play { display: none; }
.music-dock[data-state="playing"] .music-play .icon-pause { display: block; }
.music-now {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.music-now-kicker { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ochre-400); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-now-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  background: var(--pine-900);
  border: 1px solid rgba(216, 142, 92, 0.35);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.music-dock.is-open .music-panel { opacity: 1; transform: none; pointer-events: auto; }
.music-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.music-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ochre-400); font-weight: 700; }
.music-panel-title { margin: 0; font-size: 20px; font-weight: 700; }
.music-source { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.music-source-btn {
  min-height: 44px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--canvas-200);
  font-size: 13px;
  font-weight: 600;
}
.music-source-btn[aria-checked="true"] { background: var(--ochre-600); color: #FFFFFF; }
.music-hint { margin: 8px 0 10px; font-size: 12px; color: var(--canvas-200); opacity: 0.85; min-height: 1em; }
.music-stage { border-radius: 12px; overflow: hidden; background: var(--pine-950); }
.music-stage-youtube { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.music-stage-youtube iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.music-stage-spotify iframe { display: block; width: 100%; height: 152px; border: 0; }
.music-panel-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; }
.music-count { color: var(--canvas-200); opacity: 0.8; }
.music-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ochre-400); font-weight: 700; }

.frame-modal { padding: 0 !important; background: #0A110C !important; }
.frame-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.frame-top {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 24px 16px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent);
  color: var(--canvas-50);
}
.frame-top-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.frame-brand { font-size: 24px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-counter { flex-shrink: 0; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.15); }
.frame-top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.frame-btn { border-radius: 999px; padding: 8px 16px; background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }
.frame-btn-music { background: rgba(184, 93, 59, 0.9); }
.frame-btn-exit { background: rgba(255, 255, 255, 0.22); }
.frame-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 84px 40px 170px;
}
.frame-media {
  max-width: min(88vw, 100%);
  max-height: min(68vh, 100%);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  border: 4px solid rgba(250, 248, 243, 0.9);
  background: #0A110C;
}
.frame-bottom {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 32px max(28px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45), transparent);
  color: var(--canvas-50);
}
.frame-nav { flex-shrink: 0; padding: 12px 18px; }
.frame-plaque { max-width: 760px; text-align: center; margin: 0 auto; min-width: 0; }
.frame-meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ochre-400); font-weight: 700; }
.frame-title { font-size: 32px; font-weight: 700; margin: 4px 0 6px; line-height: 1.15; }
.frame-caption {
  font-size: 16px;
  color: var(--canvas-200);
  margin: 0 auto;
  max-width: 680px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.frame-author { font-size: 12px; color: var(--ochre-400); margin-top: 8px; font-weight: 600; }

.nav-btn-rsvp { background-color: var(--pine-700); color: #FFFFFF; }
.nav-btn-rsvp:hover { background-color: var(--pine-800); }

.rsvp-sheet {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 1040px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  background: var(--canvas-50);
  color: var(--pine-900);
  border-radius: 16px;
  border: 1px solid rgba(31, 51, 38, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.rsvp-poster {
  position: relative;
  flex: 0 0 auto;
  height: min(calc(100dvh - 32px), 700px);
  aspect-ratio: 1122 / 1402;
  container-type: inline-size;
  background: #F3E7D0;
}
.rsvp-poster img { display: block; width: 100%; height: 100%; }
.rsvp-poster-details {
  position: absolute;
  left: 4.635%;
  top: 46.55%;
  margin: 0;
  font-family: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  font-weight: 500;
  font-size: 2.29cqw;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #10191F;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.rsvp-body {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 44px;
}
.rsvp-form-wrap { width: 100%; max-width: 440px; margin: 0 auto; }
.rsvp-kicker {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(198, 118, 66, 0.15);
  color: var(--ochre-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.rsvp-title { font-size: 48px; font-weight: 700; line-height: 1; margin: 0 0 8px; color: var(--pine-900); }
.rsvp-when { font-size: 16px; font-weight: 500; color: var(--pine-700); margin: 0 0 28px; }
.rsvp-form { display: flex; flex-direction: column; gap: 18px; }
.rsvp-form input[type="text"], .rsvp-form input[type="number"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(31, 51, 38, 0.2);
  background: #FFFFFF;
  font-size: 16px;
  color: var(--pine-900);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.rsvp-form input:focus { outline: none; border-color: var(--ochre-500); box-shadow: 0 0 0 3px rgba(198, 118, 66, 0.25); }
.rsvp-food {
  margin: 6px 0 0;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(31, 51, 38, 0.1);
  background: var(--canvas-100);
}
.rsvp-food legend { float: left; width: 100%; margin-bottom: 12px; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--pine-900); }
.rsvp-food-options { clear: both; display: flex; flex-wrap: wrap; gap: 10px; }
.rsvp-submit { width: 100%; min-height: 52px; margin-top: 8px; border-radius: 12px; font-size: 15px; font-weight: 700; }
.rsvp-submit:disabled { opacity: 0.75; cursor: progress; }
.rsvp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.8);
  color: var(--pine-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.rsvp-success { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 8px; }
.rsvp-success[hidden] { display: none !important; }
.rsvp-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #536456;
  background: rgba(143, 163, 146, 0.2);
  border: 1px solid rgba(110, 130, 113, 0.3);
}
.rsvp-success-title { font-size: 40px; font-weight: 700; margin: 0 0 12px; color: var(--pine-900); }
.rsvp-success-text { max-width: 24rem; margin: 0 auto 32px; font-size: 16px; line-height: 1.6; color: var(--pine-700); }
.rsvp-success-close { border-radius: 999px; padding: 12px 32px; }

.is-host [contenteditable="true"] {
  outline: 1px dashed rgba(184, 93, 59, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
}
.is-host [contenteditable="true"]:focus { outline: 2px solid var(--ochre-500); background: rgba(255, 255, 255, 0.6); }
.is-host .card-badge[contenteditable="true"] { pointer-events: auto; outline-color: rgba(250, 248, 243, 0.6); min-width: 60px; }
.is-host .card-badge[contenteditable="true"]:focus { background: rgba(15, 25, 18, 0.95); }
.is-host .card-caption:empty::before { content: attr(data-placeholder); color: rgba(31, 51, 38, 0.45); font-style: italic; }
.host-save-state { font-weight: 600; min-width: 4em; }
.host-save-state.is-error { color: #FFE2D2; text-decoration: underline; }
a.host-bar-btn { display: inline-flex; align-items: center; }
.host-controls { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 10px; text-align: left; }
.host-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.host-flag { display: inline-flex; padding: 2px 8px; border-radius: 999px; background: rgba(43, 70, 53, 0.12); color: var(--pine-800); font-size: 11px; font-weight: 700; }
.host-hidden-badge { margin-right: 0; }
.host-tags { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--pine-800); }
.host-tags input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(31, 51, 38, 0.2); background: #FFFFFF; font-size: 16px; font-weight: 400; }
.host-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.host-replace { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; font-weight: 600; color: var(--pine-800); }
.host-replace .upload-bar { flex: 1 1 100%; margin: 0; }
.host-panel {
  margin: 0 0 48px;
  padding: 24px;
  border-radius: 20px;
  background: #FFFFFF;
  border: 2px dashed rgba(138, 71, 32, 0.35);
}
.host-panel[hidden] { display: none !important; }
.host-panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.host-panel-title { margin: 2px 0 0; font-size: 32px; font-weight: 700; }
.host-panel-summary { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 600; color: var(--pine-700); }
.host-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.host-table-wrap { overflow-x: auto; }
.host-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.host-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pine-700); padding: 8px 10px; border-bottom: 1px solid rgba(31, 51, 38, 0.15); }
.host-table td { padding: 10px; border-bottom: 1px solid rgba(31, 51, 38, 0.08); vertical-align: middle; overflow-wrap: anywhere; }
.host-empty { text-align: center; color: var(--pine-700); padding: 24px 10px; }
.host-event { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(31, 51, 38, 0.1); display: flex; flex-direction: column; gap: 10px; }
.host-event input { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(31, 51, 38, 0.25); background: var(--canvas-50); font-size: 16px; }

.pdf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pdf-book { padding: 32px; }
.pdf-cover-title { font-size: 48px; }
.pdf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.pdf-card { border: 1px solid rgba(31, 51, 38, 0.15); border-radius: 12px; padding: 14px; background: #FAF8F3; }
.pdf-card-img { width: 100%; height: 190px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.pdf-card-meta { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ochre-600); font-weight: 700; }
.pdf-card-title { font-size: 20px; margin: 2px 0 6px; color: var(--pine-900); }
.pdf-card-caption { font-size: 12px; color: var(--pine-700); line-height: 1.45; margin: 0 0 8px; white-space: pre-line; }
.pdf-card-author { font-size: 11px; font-weight: 700; color: var(--pine-900); }

.footer-meta { flex-wrap: wrap; justify-content: center; text-align: center; }

@media (max-width: 1023px) {
  .nav-btn .nav-label { display: none; }
  .header-actions .nav-btn { padding: 10px 12px; min-width: 44px; }
  .header-actions .nav-btn-ochre .nav-label-short { display: inline; }
}
@media (max-width: 899px), (max-height: 560px) and (orientation: portrait) {
  .rsvp-sheet { flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  .rsvp-poster { height: auto; width: min(100%, 560px); margin: 0 auto; }
  .rsvp-body { overflow: visible; padding: 28px 20px 32px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .rsvp-poster { height: calc(100dvh - 16px); width: auto; }
  .rsvp-sheet { flex-direction: row; max-height: calc(100dvh - 16px); }
  .rsvp-body { overflow-y: auto; padding: 20px 24px; justify-content: flex-start; }
  .rsvp-title { font-size: 34px; }
}
@media (max-width: 767px) {
  .host-table thead { display: none; }
  .host-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid rgba(31, 51, 38, 0.12); }
  .host-table td { padding: 2px 0; border: 0; }
  .host-table td[data-label]::before { content: attr(data-label) ': '; color: var(--pine-700); font-size: 12px; }
  .host-table td:last-child { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
  .host-panel { padding: 18px 14px; }
  .rsvp-sheet { border-radius: 22px 22px 0 0; max-height: calc(100dvh - 44px); }
  .rsvp-title { font-size: 38px; }
  .rsvp-success-title { font-size: 32px; }
}
@media (max-width: 479px) {
  .header-actions .nav-btn-dark, .header-actions .nav-btn-light { display: none; }
}
@media (max-width: 767px) {
  .site-header-inner { height: 64px; padding: 0 12px; gap: 8px; }
  .brand-link { gap: 10px; min-width: 0; flex-shrink: 1; }
  .brand-emblem { width: 38px; height: 38px; }
  .brand-title { font-size: 22px; }
  .brand-date { font-size: 10px; letter-spacing: 0.12em; }
  .header-actions { gap: 6px; }
  .header-actions .nav-btn { gap: 6px; }
  .hero-section { padding: 44px 16px 64px; }
  .hero-section h2 { font-size: 34px !important; line-height: 1.1 !important; }
  .hero-section p.font-serif { font-size: 19px !important; }
  .hero-section .nav-btn { width: 100%; }
  .hero-section > .hero-container > div:first-child > .inline-flex { font-size: 10px; letter-spacing: 0.12em; }
  #trail-log section.mt-20 { padding: 28px 20px !important; }
  #trail-log section.mt-20 .nav-btn { width: 100%; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-sheet {
    border-radius: 22px 22px 0 0;
    padding: 20px 16px 0;
    max-height: calc(100vh - 44px);
    max-height: calc(100dvh - 44px);
    min-height: 60vh;
  }
  .modal-actions { bottom: 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .modal-actions .nav-btn { flex: 1; }
  .modal-title { font-size: 24px; }
  .field-row { grid-template-columns: 1fr; }
  .frame-top { padding: max(10px, env(safe-area-inset-top)) 12px 10px; }
  .frame-brand { font-size: 18px; }
  .frame-brand-extra, .frame-btn-label { display: none; }
  .frame-btn { padding: 8px 12px; min-width: 44px; }
  .frame-stage { padding: 70px 12px 190px; }
  .frame-bottom { flex-wrap: wrap; padding: 16px 12px max(16px, env(safe-area-inset-bottom)); gap: 10px; }
  .frame-plaque { order: -1; flex-basis: 100%; }
  .frame-title { font-size: 22px; }
  .frame-caption { font-size: 14px; -webkit-line-clamp: 2; }
  .frame-nav { flex: 1; }
  .pdf-book { padding: 14px; }
  .pdf-cover-title { font-size: 36px; }
  .pdf-grid { grid-template-columns: 1fr; gap: 16px; }
  .music-dock { width: auto; left: max(16px, env(safe-area-inset-left)); }
  .music-dock .music-panel { max-height: calc(100dvh - 120px); overflow-y: auto; }
  .upload-pill { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 64px); }
}
@media (max-width: 380px) {
  .brand-date { display: none; }
  .header-actions .nav-btn-dark, .header-actions .nav-btn-light { padding: 10px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .frame-top { padding-top: 8px; padding-bottom: 8px; }
  .frame-stage { padding: 56px 120px 76px; }
  .frame-bottom { flex-wrap: nowrap; padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .frame-plaque { order: 0; flex-basis: auto; }
  .frame-caption, .frame-author { display: none; }
  .frame-title { font-size: 18px; margin: 0; }
  .frame-nav { flex: 0 0 auto; }
  .modal-sheet { min-height: 0; }
  .book-cover-open { gap: 8px; }
  .book-cover-title { font-size: 56px; }
  .book-cover-cta { margin-top: 10px; }
}
@media print {
  .music-dock, .upload-pill, .host-bar, .book-cover { display: none !important; }
}
