@font-face {
  font-family: Nunito;
  src: url("/nunito-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  font-family: Nunito, ui-rounded, system-ui, sans-serif;
  color: #24231c;
  background: #f9f4e7;
  line-height: 1.45;
  --paper: #fffdf7;
  --cream: #f6eedf;
  --ink: #24231c;
  --olive: #4c5b3b;
  --yellow: #f9c469;
  --muted: #635c4c;
  --border: #d9ccad;
  --radius: 28px;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--olive); }

.top { background: var(--paper); border-bottom: 1px solid #e7dcc1; }
.bar {
  max-width: 1140px;
  margin-inline: auto;
  padding: .65rem clamp(.875rem, 4vw, 2.25rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.bar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .94rem;
  font-weight: 850;
}
.bar a:last-child { flex-shrink: 0; }
.brand { gap: .65rem; color: var(--ink); text-decoration: none; line-height: 1.15; }
.brand img, .poster-logo { object-fit: contain; border-radius: 50%; flex-shrink: 0; }
.brand img { background: #fff; }

.guest-page { background: linear-gradient(#f7e9be, #f9f4e7 33rem); }
.layout {
  display: grid;
  grid-template-columns: minmax(235px, .92fr) minmax(0, 1.35fr);
  max-width: 1140px;
  margin: auto;
  padding: clamp(1rem, 4vw, 2.25rem);
  align-items: start;
  gap: clamp(.85rem, 2.7vw, 1.75rem);
}
.welcome {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  background: var(--olive);
  color: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 3.5vw, 2.5rem);
}
.welcome-copy { position: relative; z-index: 1; }
.eyebrow { font-size: .82rem; letter-spacing: .085em; font-weight: 900; }
.welcome .eyebrow { color: #ffdc8b; margin: 0 0 .5rem; }
.welcome h1 {
  font-size: clamp(2.4rem, 5vw, 4.65rem);
  line-height: .98;
  letter-spacing: -.052em;
  font-weight: 900;
  margin: 0;
  max-width: 8ch;
}
.welcome p:last-child { margin: .85rem 0 0; max-width: 28ch; }
.welcome-art {
  display: block;
  max-width: 100%;
  width: min(100%, 400px);
  height: auto;
  justify-self: end;
  margin-top: .5rem;
  aspect-ratio: 17 / 13;
  object-fit: contain;
}
.card {
  background: var(--paper);
  border: 1px solid #ecdfc2;
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.75rem);
  box-shadow: 0 6px 0 #9a641913;
  min-width: 0;
}
.card h1, .card h2, .camera-dialog h2 { margin: 0; line-height: 1.15; letter-spacing: -.037em; font-weight: 900; }
.card h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.card h2, .camera-dialog h2 { font-size: clamp(1.65rem, 3.5vw, 2.2rem); }
.muted { color: var(--muted); }
.intro { margin: .35rem 0 1rem; }

.form-group { background: var(--cream); border-radius: 21px; margin: 0 0 .75rem; padding: .9rem 1rem; }
.visit-group { background: #fbe7b7; }
.photo-group { background: #edf0e5; }
.form-group h3 { font-size: 1.18rem; line-height: 1.2; font-weight: 900; margin: 0 0 .65rem; }
.photo-group h3 { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .25rem; }
.optional { color: #46543b; background: #dce4d1; border-radius: 999px; padding: .16rem .5rem; font-size: .82rem; font-weight: 850; }
.photo-help { margin: 0 0 .65rem; font-size: .94rem; }

label { display: block; font-size: .94rem; font-weight: 800; min-width: 0; }
.form-group label + label, .form-group label + .pair, .form-group .pair + label { margin-top: .75rem; }
.form-group .pair label + label { margin-top: 0; }
.required { color: #9a3d10; }
input, textarea, select, button { font: inherit; }
input, textarea, select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--paper);
  margin-top: .25rem;
  padding: .55rem .7rem;
  font-size: 1rem;
}
input::placeholder, textarea::placeholder { color: #746957; opacity: 1; }
select {
  appearance: none;
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, #514934 50%), linear-gradient(135deg, #514934 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
textarea { resize: vertical; }
small { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; margin-top: .25rem; }
.pair, .photo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }

button {
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--paper);
  font-weight: 850;
  border-radius: 999px;
  padding: .6rem .95rem;
  min-height: 46px;
  cursor: pointer;
}
button:not(:disabled):hover { filter: brightness(.94); }
button:disabled { opacity: .5; cursor: default; }
button.secondary { background: var(--paper); color: var(--ink); border-color: #c5c9b9; }
button.guest-submit { width: 100%; min-height: 50px; font-size: 1.06rem; }
:focus-visible { outline: 3px solid #8b4c15; outline-offset: 3px; }
.welcome :focus-visible { outline-color: #ffdf97; }

.photo-selection { display: flex; align-items: center; gap: .75rem; margin-top: .65rem; }
.photo-selection img { display: block; flex: none; object-fit: cover; border-radius: 13px; }
.native-camera { margin-top: .6rem; }
.camera-dialog {
  color: var(--ink);
  background: var(--paper);
  width: min(calc(100% - 1.5rem), 31rem);
  max-height: calc(100% - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  border: 0;
  border-radius: var(--radius);
  padding: clamp(1rem, 4vw, 1.5rem);
}
.camera-dialog::backdrop { background: #24231cbd; }
.camera-dialog video { display: block; width: 100%; max-height: 50dvh; background: var(--ink); border-radius: 16px; margin: .65rem 0; }
.camera-dialog .photo-actions { margin-top: .75rem; }
.privacy { font-size: .9rem; margin: .7rem 0 .65rem; }
.error { color: #812819; background: #ffede4; padding: .65rem .8rem; border-radius: 12px; margin: .65rem 0 0; }

.staff { max-width: 1140px; margin: auto; padding: clamp(.85rem, 4vw, 2.25rem); }
.login { max-width: 430px; margin: auto; }
.login form button { margin-top: .85rem; }
.report-head, .filters, .pages { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.filters { margin-top: 1rem; align-items: end; justify-content: start; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .94rem; }
td, th { padding: .65rem .8rem; vertical-align: top; border-bottom: 1px solid #e8dcc0; overflow-wrap: anywhere; }
th { background: #f6ecd7; }
tbody tr:last-child td { border-bottom: 0; }
td small { margin: 0; }
.pages { margin-top: 1rem; }
.poster { max-width: 530px; margin: auto; text-align: center; }
.poster .eyebrow { color: var(--olive); }
.qr { display: block; max-width: 100%; height: auto; margin: auto; image-rendering: pixelated; }
.poster button { display: block; margin: 1.25rem auto 0; }

@media (max-width: 740px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .welcome { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); align-items: center; padding: 1.15rem; gap: .5rem; }
  .welcome h1 { font-size: clamp(2.1rem, 8vw, 3.4rem); }
  .welcome p:last-child { margin-top: .5rem; }
  .welcome-art { margin-top: 0; max-width: 265px; width: 100%; }
}
@media (max-width: 480px) {
  .bar { gap: .6rem; }
  .brand img { width: 35px; height: 35px; }
  .bar a { font-size: .86rem; }
  .layout { padding: .75rem; }
  .welcome { grid-template-columns: minmax(0, 1fr) minmax(0, .65fr); border-radius: 23px; }
  .welcome p:last-child { font-size: .91rem; }
  .card { border-radius: 23px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .form-group { padding: .75rem; }
  .photo-actions { gap: .45rem; }
  .photo-actions button { padding-inline: .45rem; font-size: .9rem; }
  .table-wrap table { min-width: 620px; }
}
@media print {
  body { background: #fff; }
  .top, .poster button { display: none; }
  .staff { padding: 0; }
  .poster { background: #fff; max-width: none; box-shadow: none; border: 0; }
  .poster h1 { font-size: 32pt; }
  .qr { width: 90mm; }
}
