:root {
  --bg: #1a0e16;
  --paper: #f6f0e4;
  --line: rgba(36, 18, 16, 0.16);
  --gold: #e23b6a;
  --gold-strong: #24120f;
  --ember: #ef5b2a;
  --text: #24120f;
  --muted: #6a534c;
  --sage: #2f6b45;
  --danger: #9d243c;
  --shadow: 0 16px 40px rgba(26, 14, 22, 0.28);
  --serif: Newsreader, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  color-scheme: light;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.08rem;
  line-height: 1.5;
  background: var(--bg);
}

.sky { display: none; }

.moon {
  position: absolute;
  top: 8vh;
  right: max(4vw, 24px);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff8ea, #e7c98a 42%, #c9a36a 70%, #8d6b3e);
  box-shadow: 0 0 40px rgba(231, 201, 138, 0.28);
}

.moon::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--bg);
  top: -6px;
  right: -18px;
}

.card {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 2rem));
  margin: 2.25rem auto 3rem;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  padding-top: calc(clamp(1.6rem, 4vw, 2.6rem) + 6px);
  background: var(--paper);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #e23b6a 0%, #ef5b2a 58%, #f0b429 100%);
  pointer-events: none;
}

.card-wide { width: min(920px, calc(100% - 1.5rem)); }

.hero, .section, .footer, .admin-header { position: relative; }

.picado {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: calc(-1 * clamp(1.6rem, 4vw, 2.6rem) + 2px) calc(-1 * clamp(1.6rem, 4vw, 2.6rem)) 1.15rem;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.flag {
  display: block;
  width: 36px;
  height: 58px;
  flex: none;
}

.mast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 0 0.15rem;
}

.mast .eyebrow { margin: 0; }

.mark { display: block; flex: none; overflow: visible; }

.mark-flower {
  width: 58px;
  height: 58px;
  transform: rotate(-8deg);
}

.mark-skull {
  width: 40px;
  height: 49px;
  transform: rotate(7deg);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 12vw, 5.6rem);
  font-weight: 500;
  line-height: 0.9;
  color: var(--text);
}

h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 500;
  color: var(--text);
}

h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
}

.lede {
  margin: 0.8rem 0 0;
  max-width: 36rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.15rem);
  font-style: italic;
  line-height: 1.2;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  margin: 1.4rem 0 0;
  padding: 0.9rem 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.facts li { padding: 0; }

.facts span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.facts a,
.facts strong {
  display: block;
  margin-top: 0.1rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.facts .fact-address {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.section { margin-top: 2.6rem; }

.offers { display: block; }

.offer {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.offer-index { display: none; }

.offer h3,
.offer p { display: inline; }

.offer p::before { content: " — "; }

.offer p, .quiet, .hint, .price-note { margin: 0.25rem 0 0; color: var(--muted); }

.price-block { text-align: left; }

.price { margin: 0; }

.price span {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 10vw, 4.6rem);
  font-weight: 500;
  line-height: 0.9;
  color: var(--text);
}

.price-note { font-size: 1.05rem; }

.rules {
  margin: 0;
  padding-left: 1.2rem;
}

.rules li { margin: 0; padding: 0.28rem 0; }

.ask-line { margin: 0 0 1.1rem; }

.capacity-note, #capacity-note { margin-top: 1rem; }

.field { display: grid; gap: 0.35rem; margin-bottom: 0.95rem; }

label { font-size: 0.92rem; font-weight: 500; }

.optional { color: var(--muted); font-weight: 400; }

input[type="checkbox"] { accent-color: #e23b6a; }

input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.7rem;
  color: var(--text);
  font: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(36, 18, 16, 0.35);
  border-radius: 0;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0.4rem 0 1rem;
}

.check input { width: 1.1rem; height: 1.1rem; margin-top: 0.25rem; }

.button {
  appearance: none;
  border: 0;
  border-radius: 2px;
  padding: 0.75rem 1.15rem;
  background: var(--gold);
  color: #fffaf6;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button:hover { background: #c42858; }

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

.button:focus-visible, .chip:focus-visible, .text-link:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 3px;
}

.button-quiet {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(36, 18, 16, 0.28);
}

.button-quiet:hover { background: rgba(36, 18, 16, 0.05); }

.form-error {
  margin: 0 0 0.8rem;
  color: var(--danger);
}

.success {
  padding: 1.2rem 0 0.2rem;
  border-top: 1px solid var(--line);
}

.success h3 { margin: 0.2rem 0 0.6rem; font-size: 2.2rem; }

.footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 2.4rem;
}

.text-link, .footer a {
  color: var(--muted);
  font-size: 0.92rem;
}

.banner {
  position: relative;
  margin: 0 0 1.4rem;
  padding: 0.75rem 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.4rem;
}

.admin-header h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); }

.stack { max-width: 28rem; }

.toolbar, .toolbar-actions, .filters, .guest-actions, .guest-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.toolbar { justify-content: space-between; margin-bottom: 0.8rem; }

.toolbar p, .meter p, .mail-line { margin: 0; color: var(--muted); }

.meter { margin: 0.4rem 0 1rem; }

.meter-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0;
  background: var(--gold);
}

.meter.over .meter-fill { background: var(--ember); }

.filters { margin: 1rem 0; }

.chip {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.35rem 0.7rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.chip.is-selected {
  color: #fffaf6;
  background: var(--gold);
  border-color: var(--gold);
}

.guest-card {
  margin-top: 0.8rem;
  padding: 0.9rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.guest-head { justify-content: space-between; }

.guest-body { overflow-wrap: anywhere; }
.guest-body p { margin: 0.35rem 0; }

.guest-actions { margin-top: 0.8rem; }

.pill {
  border-radius: 2px;
  padding: 0.1rem 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill-pending { color: #fffaf6; background: var(--ember); }
.pill-accepted { color: #fffaf6; background: var(--sage); }
.pill-inside { color: #fffaf6; background: var(--gold-strong); }
.pill-declined { color: var(--muted); border: 1px solid var(--line); }

a.button { display: inline-block; text-decoration: none; text-align: center; }

.header-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.code-panel img {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin: 0.6rem 0 0.8rem;
  background: #fff;
}

.camera {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #24120f;
  margin-bottom: 0.8rem;
}

.scan-result { margin-top: 1rem; padding: 1.1rem 1rem 1.2rem; }
.scan-result h2 {
  margin: 0.15rem 0 0.45rem;
  color: inherit;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
}
.scan-result p { margin: 0.2rem 0; }
.scan-result .eyebrow { color: inherit; }
.scan-result .button { margin-top: 1rem; background: #fffaf6; color: #24120f; }
.scan-welcome { background: #2f6b45; color: #fffaf6; }
.scan-already { background: #ef5b2a; color: #fffaf6; }
.scan-bad { background: #9d243c; color: #fffaf6; }

.footer-links { margin-top: 1.4rem; }
.footer-links .text-link {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

::selection { background: rgba(226, 59, 106, 0.22); }

@media (min-width: 700px) {
  .facts li { min-width: 9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .card { margin-top: 1.25rem; }
  .admin-header { align-items: flex-start; flex-direction: column; }
  .header-links { align-items: flex-start; }
}
