:root {
  --ink: #202521;
  --forest: #233a2d;
  --moss: #6f7d5d;
  --lake: #5f7c87;
  --copper: #9a6747;
  --paper: #f7f2e8;
  --mist: #eef2ed;
  --white: #fffdf8;
  --shadow: 0 20px 60px rgba(14, 24, 18, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  color: var(--white);
  background: linear-gradient(180deg, rgba(18, 28, 22, 0.82), rgba(18, 28, 22, 0));
}

.brand {
  flex: 0 0 3rem;
  display: inline-grid;
  place-items: center;
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  overflow: hidden;
  border: 1px solid rgba(255, 253, 248, 0.7);
  border-radius: 50%;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0;
  line-height: 1;
  white-space: nowrap;
  background: rgba(20, 29, 23, 0.42);
}

.brand::before {
  content: "J&H";
  font-size: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.nav a {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  text-decoration: none;
  background: rgba(20, 29, 23, 0.34);
  backdrop-filter: blur(12px);
}

.nav-rsvp {
  border: 1px solid rgba(255, 253, 248, 0.65);
}

.inline-logout {
  margin: 0;
}

.inline-logout button {
  min-height: 2.35rem;
  border: 1px solid rgba(255, 253, 248, 0.45);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  color: var(--white);
  background: rgba(20, 29, 23, 0.34);
  backdrop-filter: blur(12px);
  font: inherit;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 90svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 7rem clamp(1.25rem, 5vw, 5rem) 5rem;
  color: var(--white);
  background: #16241c;
}

.hero-art,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  object-fit: cover;
  object-position: center;
  opacity: 1;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(10, 21, 16, 0.9), rgba(13, 28, 21, 0.68) 31%, rgba(16, 31, 22, 0.22) 62%, rgba(16, 31, 22, 0.34)),
    radial-gradient(circle at 73% 20%, rgba(255, 222, 158, 0.24), rgba(255, 222, 158, 0) 35%),
    linear-gradient(180deg, rgba(10, 21, 16, 0.1), rgba(10, 21, 16, 0.5));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 52rem;
}

.eyebrow,
.kicker {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  text-transform: uppercase;
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(4rem, 12vw, 9.4rem);
}

.hero-copy {
  max-width: 40rem;
  margin: 1.25rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.25;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.button.primary {
  color: var(--white);
  background: var(--copper);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 253, 248, 0.72);
  background: rgba(255, 253, 248, 0.12);
}

.button.light {
  color: var(--forest);
  background: var(--paper);
}

.button.danger {
  color: var(--white);
  background: #8f3f32;
}

.button.full {
  width: 100%;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 5vw, 5rem);
}

.section-light {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(247, 242, 232, 0.95)),
    var(--paper);
}

.section-green {
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(35, 58, 45, 0.98), rgba(36, 68, 58, 0.96)),
    var(--forest);
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section h2,
.rsvp-note h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.12;
}

.section h2 {
  max-width: 14ch;
  font-size: clamp(2.35rem, 5vw, 4.25rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.detail-card,
.action-panel,
.rsvp-form,
.rsvp-note {
  border: 1px solid rgba(35, 58, 45, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.84);
  box-shadow: var(--shadow);
}

.detail-card,
.action-panel,
.rsvp-note {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.detail-card h3,
.action-panel h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
  text-transform: uppercase;
}

.detail-card p,
.action-panel p,
.registry-layout p,
.split-layout p {
  margin: 0;
}

.split-section {
  background:
    linear-gradient(90deg, rgba(238, 242, 237, 0.96), rgba(255, 253, 248, 0.98)),
    var(--mist);
}

.faq-section {
  background: var(--white);
}

.faq-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.faq-item {
  max-width: 760px;
  border-left: 4px solid var(--copper);
  padding: 0 0 0 1.25rem;
}

.faq-item h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.faq-item p {
  margin: 0;
  font-size: 1.08rem;
}

.split-layout,
.registry-layout,
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
  gap: clamp(1.25rem, 5vw, 4rem);
  align-items: start;
}

.split-layout > div:first-child p,
.registry-layout > div:first-child p {
  max-width: 42rem;
  margin-top: 1rem;
  font-size: 1.08rem;
}

.page-hero {
  position: relative;
  min-height: 48svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 8rem clamp(1.25rem, 5vw, 5rem) 4rem;
  color: var(--white);
  background: #16241c;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 21, 16, 0.86), rgba(13, 28, 21, 0.54) 48%, rgba(16, 31, 22, 0.24)),
    linear-gradient(180deg, rgba(10, 21, 16, 0.08), rgba(10, 21, 16, 0.34));
}

.page-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(4rem, 12vw, 8rem);
}

.page-hero p:last-child {
  max-width: 36rem;
  margin: 0.75rem 0 0;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
}

.rsvp-form {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.form-row,
fieldset {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
}

.form-help {
  margin: -0.25rem 0 1.15rem;
  color: var(--forest);
  font-size: 0.95rem;
  font-weight: 700;
}

fieldset {
  border: 0;
  padding: 0;
}

legend,
label {
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(35, 58, 45, 0.24);
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

textarea {
  resize: vertical;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(35, 58, 45, 0.16);
  border-radius: 8px;
  background: rgba(238, 242, 237, 0.65);
}

.choice input {
  width: auto;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rsvp-note {
  position: sticky;
  top: 6rem;
  white-space: pre-wrap;
}

.rsvp-note h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.rsvp-note p {
  margin: 1rem 0 0;
}

.small-note {
  padding-top: 1rem;
  border-top: 1px solid rgba(35, 58, 45, 0.14);
  color: var(--forest);
  font-weight: 700;
}

.site-footer {
  padding: 2rem clamp(1.25rem, 5vw, 5rem);
  color: var(--white);
  text-align: center;
  background: var(--ink);
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
}

.footer-code-link {
  color: rgba(255, 253, 248, 0.78);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 253, 248, 0.5);
}

.footer-code-link:hover,
.footer-code-link:focus-visible {
  color: var(--white);
  border-bottom-color: var(--white);
}

body.has-code-modal {
  overflow: hidden;
}

.code-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  background: rgba(9, 14, 12, 0.72);
  backdrop-filter: blur(10px);
}

.code-modal[hidden] {
  display: none !important;
}

.code-panel {
  width: min(720px, 100%);
  max-height: 92svh;
  overflow: auto;
  border: 1px solid rgba(255, 253, 248, 0.54);
  border-radius: 8px;
  padding: clamp(1.15rem, 4vw, 2rem);
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(238, 242, 237, 0.97)),
    var(--white);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.code-panel:focus {
  outline: none;
}

.code-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.code-panel-header .kicker {
  margin: 0;
  color: var(--copper);
}

.code-close {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.code-close:focus-visible,
.controller-button:focus-visible {
  outline: 3px solid rgba(95, 124, 135, 0.68);
  outline-offset: 3px;
}

.code-panel h2 {
  margin: 0.45rem 0 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
}

.nes-controller {
  position: relative;
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(8.5rem, 0.75fr) minmax(9.5rem, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  min-height: 12.5rem;
  overflow: hidden;
  border: 2px solid #8e8b84;
  border-radius: 18px;
  padding: clamp(1.2rem, 4vw, 2rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(176, 171, 162, 0.36)),
    #d8d4ca;
  box-shadow:
    inset 0 0 0 5px rgba(255, 253, 248, 0.35),
    inset 0 -12px 24px rgba(28, 30, 32, 0.12);
}

.nes-controller::before {
  content: "";
  position: absolute;
  inset: 18% 0 auto;
  height: 37%;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.08), rgba(255, 253, 248, 0)),
    #24282c;
}

.nes-controller > * {
  position: relative;
  z-index: 1;
}

.controller-dpad {
  display: grid;
  grid-template-columns: repeat(3, 3.1rem);
  grid-template-rows: repeat(3, 3.1rem);
  justify-self: start;
}

.dpad-space {
  display: block;
}

.controller-button {
  border: 0;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  transition: filter 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.dpad-button,
.dpad-center {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  color: var(--white);
  background: #15181b;
}

.dpad-button {
  box-shadow:
    inset 0 0 0 1px rgba(255, 253, 248, 0.08),
    0 7px 0 #07090a;
}

.dpad-up {
  border-radius: 6px 6px 0 0;
}

.dpad-left {
  border-radius: 6px 0 0 6px;
}

.dpad-right {
  border-radius: 0 6px 6px 0;
}

.dpad-down {
  border-radius: 0 0 6px 6px;
}

.dpad-center {
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, 0.08);
}

.controller-system {
  align-self: end;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  padding-bottom: 1.3rem;
}

.system-button {
  min-width: 4.15rem;
  min-height: 1.45rem;
  border-radius: 999px;
  padding: 0 0.65rem;
  color: #f6ead6;
  background: #24282c;
  box-shadow: 0 5px 0 #0c0e10;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.controller-actions {
  display: flex;
  align-items: end;
  justify-self: end;
  gap: 0.9rem;
  transform: rotate(-9deg);
}

.action-button {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  color: var(--white);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 30%),
    #982d3c;
  box-shadow:
    inset 0 -6px 0 rgba(54, 5, 14, 0.42),
    0 8px 0 #621724;
  font-size: 1.1rem;
}

.action-button:first-child {
  margin-bottom: -0.75rem;
}

.controller-button:hover,
.controller-button.is-pressed {
  filter: brightness(1.12);
  transform: translateY(2px);
  box-shadow: none;
}

.code-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.code-progress span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: rgba(35, 58, 45, 0.18);
}

.code-progress span.is-filled {
  background: var(--copper);
  box-shadow: 0 0 0 4px rgba(154, 103, 71, 0.14);
}

.code-status {
  min-height: 1.6rem;
  margin: 0.65rem 0 0;
  color: var(--forest);
  font-weight: 900;
  text-align: center;
}

.code-modal.is-unlocked .nes-controller {
  animation: controller-unlock 520ms ease both;
}

@keyframes controller-unlock {
  35% {
    filter: brightness(1.18);
    transform: scale(1.01);
  }

  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

.secret-page {
  min-height: 100svh;
  color: var(--white);
  background: #101412;
}

.secret-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 8rem clamp(1.25rem, 5vw, 5rem) 4rem;
}

.secret-hero-art,
.secret-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.secret-hero-art {
  object-fit: cover;
  object-position: center;
  opacity: 0.78;
  filter: saturate(0.78) contrast(1.08);
}

.secret-hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 10, 9, 0.92), rgba(12, 17, 18, 0.78) 42%, rgba(43, 23, 29, 0.5)),
    linear-gradient(180deg, rgba(7, 10, 9, 0.2), rgba(7, 10, 9, 0.84));
}

.secret-stage {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.secret-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  width: min(720px, 100%);
  margin: 0 0 1.6rem;
  border-top: 1px solid rgba(255, 253, 248, 0.34);
  border-bottom: 1px solid rgba(255, 253, 248, 0.34);
  padding: 0.6rem 0;
  color: #f1c35b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  font-weight: 800;
}

.secret-chip {
  display: inline-flex;
  margin: 0 0 1rem;
  padding: 0.35rem 0.7rem;
  color: var(--white);
  background: #982d3c;
  font-weight: 900;
  text-transform: uppercase;
}

.secret-stage h1 {
  max-width: 8ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.2rem, 13vw, 9rem);
  font-weight: 400;
  line-height: 0.95;
}

.secret-copy {
  max-width: 44rem;
  margin: 1.2rem 0 0;
  color: rgba(255, 253, 248, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 3vw, 2.1rem);
  line-height: 1.25;
}

.secret-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(8rem, 9.5rem));
  gap: 0.8rem;
  margin-top: 2rem;
}

.secret-scoreboard div {
  border: 1px solid rgba(255, 253, 248, 0.26);
  border-radius: 8px;
  padding: 0.85rem;
  background: rgba(255, 253, 248, 0.11);
  backdrop-filter: blur(12px);
}

.secret-scoreboard strong,
.secret-scoreboard span {
  display: block;
}

.secret-scoreboard strong {
  color: #f1c35b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1;
}

.secret-scoreboard span {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.secret-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.secret-band {
  padding: clamp(4rem, 8vw, 6.5rem) clamp(1.25rem, 5vw, 5rem);
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(238, 242, 237, 0.95)),
    var(--white);
}

.secret-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.secret-grid h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 5vw, 4.25rem);
  font-weight: 400;
  line-height: 1.1;
}

.secret-quest-list {
  display: grid;
  gap: 0.85rem;
}

.secret-quest {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 1rem;
  border-left: 4px solid var(--copper);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(238, 242, 237, 0.76);
}

.secret-quest span {
  color: var(--lake);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.secret-quest h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  text-transform: uppercase;
}

.secret-quest p {
  margin: 0;
}

.compact-header {
  background: linear-gradient(180deg, rgba(18, 28, 22, 0.88), rgba(18, 28, 22, 0.58));
  box-shadow: 0 10px 28px rgba(14, 24, 18, 0.12);
  backdrop-filter: blur(16px);
}

.photo-share-page,
.gallery-page {
  min-height: 100svh;
  background:
    linear-gradient(180deg, rgba(238, 242, 237, 0.94), rgba(255, 253, 248, 0.98)),
    var(--mist);
}

.photo-share-page {
  position: relative;
  overflow-x: hidden;
}

.photo-share-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(16, 27, 21, 0.72), rgba(16, 27, 21, 0.28) 45%, rgba(247, 242, 232, 0.82)),
    url("woodland-hero-drawn.png") center / cover no-repeat;
}

.photo-share-page::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  z-index: -1;
  height: 36svh;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0), rgba(255, 253, 248, 0.94));
}

.photo-upload-main,
.gallery-main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 7rem clamp(1rem, 4vw, 2rem) 2rem;
}

.photo-upload-main {
  min-height: 100svh;
  display: grid;
  place-items: center start;
}

.photo-upload-card {
  position: relative;
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 253, 248, 0.72);
  border-radius: 8px;
  padding: clamp(1.2rem, 4vw, 2.25rem);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(247, 242, 232, 0.94)),
    var(--white);
  box-shadow: 0 24px 70px rgba(14, 24, 18, 0.28);
}

.photo-upload-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.35rem;
  background: linear-gradient(90deg, var(--copper), var(--lake), var(--moss));
}

.photo-upload-card h1,
.admin-hero h1,
.admin-tools h2,
.empty-gallery h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.08;
}

.photo-upload-card h1 {
  max-width: 11ch;
  color: var(--forest);
  font-size: clamp(2.55rem, 10vw, 4.7rem);
}

.upload-intro {
  max-width: 31rem;
  margin: 0.8rem 0 1.35rem;
  color: var(--forest);
  font-size: 1.08rem;
  font-weight: 700;
}

.optional-label {
  color: var(--moss);
  font-size: 0.85em;
  font-weight: 700;
}

.table-pill {
  display: inline-flex;
  margin: 0 0 1rem;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--white);
  background: var(--lake);
  font-weight: 800;
}

.upload-choice-grid {
  display: grid;
  gap: 0.8rem;
  margin: 1.35rem 0 0.85rem;
}

.upload-choice-button {
  min-height: 5.9rem;
  display: grid;
  grid-template-columns: 3.35rem minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  border: 1px solid rgba(255, 253, 248, 0.24);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.14), rgba(255, 253, 248, 0)),
    var(--copper);
  box-shadow: 0 14px 28px rgba(154, 103, 71, 0.22);
  font-size: clamp(1.08rem, 5vw, 1.35rem);
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.upload-choice-button:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.14), rgba(255, 253, 248, 0)),
    var(--forest);
  box-shadow: 0 14px 28px rgba(35, 58, 45, 0.22);
}

.upload-choice-button span:first-child {
  display: grid;
  place-items: center;
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.18);
  font-size: 1.75rem;
}

.upload-choice-button:hover,
.upload-choice-button:focus-within {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(14, 24, 18, 0.24);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.photo-upload-card input[type="file"].visually-hidden {
  border: 0;
  padding: 0;
}

.upload-form:not(.is-enhanced) input[type="file"].visually-hidden {
  position: static;
  width: 100%;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
}

.upload-form:not(.is-enhanced) .upload-choice-button {
  margin-top: 0.4rem;
}

.selected-file-summary {
  min-height: 1.5rem;
  margin: 0.2rem 0 0.9rem;
  color: var(--forest);
  font-weight: 800;
}

.share-choice {
  margin-top: 0.7rem;
  background: rgba(238, 242, 237, 0.82);
}

.upload-form.is-enhanced .upload-submit {
  display: flex;
  margin-top: 1rem;
}

.upload-form.is-enhanced .upload-submit .button {
  min-height: 3.25rem;
}

.upload-form.is-uploading .upload-choice-button {
  opacity: 0.55;
  pointer-events: none;
}

.button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.upload-progress {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--forest);
  font-weight: 800;
}

.upload-progress progress {
  width: 100%;
  height: 0.85rem;
  accent-color: var(--copper);
}

.upload-status,
.upload-success {
  margin-top: 1rem;
  border-radius: 8px;
  padding: 1rem;
  font-weight: 800;
}

.upload-status ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  font-weight: 700;
}

.upload-status.success,
.upload-success {
  color: #193323;
  background: rgba(111, 125, 93, 0.2);
}

.upload-status.error {
  color: #5b2219;
  background: rgba(154, 103, 71, 0.18);
}

.upload-success p {
  margin: 0;
}

.admin-lock {
  margin: min(12vh, 6rem) auto 0;
}

.admin-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-top: 1rem;
}

.admin-hero h1 {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
}

.admin-hero p {
  margin: 0.75rem 0 0;
  color: var(--forest);
  font-weight: 800;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.admin-actions .button {
  flex: 0 0 auto;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}

.admin-stat-grid article,
.admin-filter-form,
.rsvp-admin-card {
  border: 1px solid rgba(35, 58, 45, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 12px 32px rgba(14, 24, 18, 0.08);
}

.admin-stat-grid article {
  display: grid;
  gap: 0.15rem;
  padding: 1rem;
}

.admin-stat-grid strong {
  color: var(--forest);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1;
}

.admin-stat-grid span {
  color: var(--moss);
  font-weight: 900;
  text-transform: uppercase;
}

.admin-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: end;
  padding: 1rem;
}

.admin-filter-form label {
  flex: 1 1 11rem;
  display: grid;
  gap: 0.35rem;
}

.admin-filter-form label span,
.copy-field span {
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-rsvp-form h2 {
  margin: 0 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.admin-tools {
  margin: 0 0 1.5rem;
}

.qr-panel {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  border: 1px solid rgba(35, 58, 45, 0.14);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.qr-image {
  width: 100%;
  border-radius: 8px;
  background: var(--white);
}

.admin-tools h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.copy-field {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.empty-gallery {
  border: 1px dashed rgba(35, 58, 45, 0.28);
  border-radius: 8px;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: rgba(255, 253, 248, 0.68);
}

.empty-gallery h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.empty-gallery p {
  margin: 0.75rem 0 0;
  color: var(--forest);
  font-weight: 700;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  align-items: start;
}

.media-card {
  overflow: hidden;
  border: 1px solid rgba(35, 58, 45, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 12px 32px rgba(14, 24, 18, 0.12);
}

.media-card figure {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  background: var(--ink);
}

.media-preview-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.media-preview-link::after {
  content: "Open";
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  color: var(--white);
  background: rgba(14, 24, 18, 0.58);
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0;
  transition: opacity 160ms ease;
}

.media-preview-link:hover::after,
.media-preview-link:focus-visible::after {
  opacity: 1;
}

.media-card img,
.media-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card-body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.delete-media-form {
  margin: 0;
}

.share-toggle-form {
  margin: 0;
}

.share-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  border: 1px solid rgba(35, 58, 45, 0.14);
  border-radius: 8px;
  padding: 0.75rem;
  background: rgba(238, 242, 237, 0.72);
  cursor: pointer;
}

.share-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.share-toggle span {
  position: relative;
  width: 2.65rem;
  height: 1.45rem;
  border-radius: 999px;
  background: rgba(35, 58, 45, 0.26);
  transition: background 160ms ease;
}

.share-toggle span::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.22rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(14, 24, 18, 0.2);
  transition: transform 160ms ease;
}

.share-toggle input:checked + span {
  background: var(--moss);
}

.share-toggle input:checked + span::after {
  transform: translateX(1.16rem);
}

.share-toggle input:focus-visible + span {
  outline: 3px solid rgba(95, 124, 135, 0.45);
  outline-offset: 3px;
}

.share-toggle strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.media-card h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.25;
}

.media-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.media-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.media-meta div {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  gap: 0.5rem;
}

.media-meta dt {
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.media-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.public-media-grid .media-card h2 {
  display: none;
}

body.has-media-lightbox {
  overflow: hidden;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  background: rgba(14, 24, 18, 0.86);
}

.media-lightbox-panel {
  position: relative;
  width: min(1040px, 100%);
  display: grid;
  gap: 0.8rem;
}

.media-lightbox img {
  width: 100%;
  max-height: 78svh;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 253, 248, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.media-lightbox-copy {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--forest);
  background: var(--white);
}

.media-lightbox-copy p {
  margin: 0;
}

.media-lightbox-caption {
  font-weight: 800;
}

.media-lightbox-credit {
  color: var(--moss);
  font-size: 0.95rem;
  font-weight: 900;
}

.media-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(255, 253, 248, 0.5);
  border-radius: 50%;
  color: var(--white);
  background: rgba(14, 24, 18, 0.68);
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.media-lightbox-nav {
  position: absolute;
  top: 50%;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 253, 248, 0.5);
  border-radius: 50%;
  color: var(--white);
  background: rgba(14, 24, 18, 0.68);
  font: inherit;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.media-lightbox-prev {
  left: 0.75rem;
}

.media-lightbox-next {
  right: 0.75rem;
}

.rsvp-admin-list {
  display: grid;
  gap: 0.8rem;
}

.rsvp-admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
}

.rsvp-admin-card h2,
.rsvp-admin-card p {
  margin: 0;
}

.rsvp-admin-card h2 {
  font-size: 1.2rem;
}

.qr-print-card h2,
.qr-print-card p {
  margin-top: 0;
}

@media (max-width: 800px) {
  .site-header {
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }

  .brand {
    width: 2.7rem;
    min-width: 2.7rem;
    height: 2.7rem;
    flex-basis: 2.7rem;
  }

  .brand::before {
    font-size: 0.94rem;
  }

  .nav {
    gap: 0.35rem;
  }

  .nav a {
    min-height: 2.2rem;
    padding: 0.38rem 0.65rem;
    font-size: 0.92rem;
  }

  .hero {
    min-height: 86svh;
    padding-top: 7.5rem;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 19vw, 5.8rem);
  }

  .detail-grid,
  .split-layout,
  .registry-layout,
  .form-layout,
  .two-column,
  .secret-grid {
    grid-template-columns: 1fr;
  }

  .nes-controller {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .controller-dpad,
  .controller-system,
  .controller-actions {
    justify-self: center;
  }

  .controller-system {
    padding-bottom: 0;
  }

  .secret-hero {
    min-height: 92svh;
    align-items: end;
    padding-top: 7rem;
  }

  .secret-scoreboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rsvp-note {
    position: static;
  }

  .photo-upload-main,
  .gallery-main {
    padding-top: 6rem;
  }

  .photo-upload-main {
    place-items: center;
  }

  .admin-hero,
  .qr-panel,
  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    display: grid;
  }

  .admin-actions {
    justify-content: stretch;
  }

  .admin-actions .button {
    flex: 0 0 auto;
  }

  .rsvp-admin-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .site-header {
    position: absolute;
  }

  .hero-actions,
  .form-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .code-panel {
    padding: 1rem;
  }

  .controller-dpad {
    grid-template-columns: repeat(3, 2.75rem);
    grid-template-rows: repeat(3, 2.75rem);
  }

  .dpad-button,
  .dpad-center {
    width: 2.75rem;
    height: 2.75rem;
  }

  .action-button {
    width: 3.55rem;
    height: 3.55rem;
  }

  .secret-hud {
    font-size: 0.78rem;
  }

  .secret-scoreboard {
    grid-template-columns: 1fr;
  }

  .secret-quest {
    grid-template-columns: 1fr;
  }

  .admin-actions .button {
    flex: 1 1 100%;
  }

  .photo-upload-main,
  .gallery-main {
    padding-right: 0.8rem;
    padding-left: 0.8rem;
  }

  .photo-share-page .site-header {
    position: fixed;
  }

  .photo-upload-card h1 {
    max-width: 10ch;
  }

  .upload-choice-button {
    min-height: 5.4rem;
  }

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

  .media-meta div {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }

  .media-lightbox-nav {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 2rem;
  }
}

@media print {
  body {
    background: var(--white);
  }

  .site-header,
  .admin-hero,
  .admin-stat-grid,
  .admin-filter-form,
  .admin-actions,
  .upload-status,
  .media-grid,
  .rsvp-admin-list,
  .empty-gallery {
    display: none !important;
  }

  .gallery-main {
    width: 100%;
    padding: 0;
  }

  .qr-print-area,
  .qr-print-card {
    display: block;
    box-shadow: none;
    border: 0;
  }

  .qr-print-card {
    width: 7.5in;
    margin: 0 auto;
    text-align: center;
  }

  .qr-print-card .qr-image {
    width: 4.8in;
    margin: 0 auto 0.35in;
  }
}
