:root {
  color-scheme: dark;
  --bg: #101612;
  --panel: #1a2420;
  --line: #314038;
  --text: #f4efe4;
  --muted: #a8b5a4;
  --accent: #e0a15c;
  --ink: #1a140c;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
button, input, select, textarea { font: inherit; }

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 100% 0%, #24352b 0%, transparent 60%),
    var(--bg);
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #101612;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, var(--bg) 0%, rgba(16, 22, 18, 0.55) 16%, rgba(16, 22, 18, 0.08) 36%, transparent 52%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #163024;
  mix-blend-mode: multiply;
  opacity: 0.1;
  pointer-events: none;
}

.hero .reel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero .reel-track {
  display: flex;
  height: 100%;
  width: 100%;
  margin: 0;
  transition: transform 0.7s ease;
}

.hero .reel-track figure {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
}

.hero .reel-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero .reel-track figcaption {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  max-width: min(18rem, 68%);
  color: var(--text);
  font-size: 0.72rem;
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.hero .reel-track figcaption a { color: var(--accent); }

.hero > .reel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.7rem;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}

.hero > .reel-dots button {
  width: 0.58rem;
  height: 0.58rem;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 239, 228, 0.55);
  cursor: pointer;
}

.hero > .reel-dots button:hover { color: var(--text); border-color: transparent; }
.hero > .reel-dots button[aria-current="true"],
.hero > .reel-dots button[aria-current="true"]:hover { background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .hero .reel-track { transition: none; }
}

.top, main {
  width: min(720px, calc(100% - 1.4rem));
  margin: 0 auto;
}

.top {
  position: relative;
  z-index: 2;
  padding: 1.5rem 0 1.8rem;
}

.brand { display: block; height: 36px; width: auto; }

.eyebrow {
  margin: 0.45rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
}

.links { margin: 0.45rem 0 0; }
.links a { color: var(--accent); margin-right: 0.8rem; }

h2 { margin: 0; font-weight: 650; font-size: 1rem; }

button, .tabs button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
}

button:hover, button.active { border-color: var(--accent); color: var(--accent); }

button.go {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  font-weight: 650;
}

button.go:hover { color: var(--ink); }

.tabs {
  display: flex;
  gap: 0.4rem;
  margin: 0.8rem 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.panel[hidden] { display: none; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.7rem;
}

input, select, textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font: inherit;
}

textarea {
  width: 100%;
  min-height: 5.5rem;
  border-radius: 16px;
  resize: vertical;
}

input[type="search"], input[type="text"], select { flex: 1; min-width: 8rem; }

.quiet, .status { color: var(--muted); margin: 0.4rem 0 0; line-height: 1.4; }

.pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
}

.cards { display: grid; gap: 0.45rem; margin-top: 0.7rem; }

.card {
  text-align: left;
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  width: 100%;
}

.card strong { display: block; }
.card span { color: var(--muted); font-size: 0.8rem; }

#map {
  height: 22rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.list { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.list li {
  border-top: 1px solid var(--line);
  padding: 0.65rem 0;
}
.list button { margin-top: 0.35rem; }
.note-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.note-body { white-space: pre-wrap; }
.note-photo { display: block; width: min(100%, 18rem); margin-top: 0.45rem; border-radius: 10px; }
#note-unit { margin-left: 0.4rem; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 0.35rem 0.5rem; }

.how-dialog {
  width: min(40rem, calc(100% - 1.4rem));
  max-height: min(78vh, 40rem);
  overflow: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
}

.how-dialog::backdrop { background: rgba(8, 12, 10, 0.72); }
.how-dialog p { line-height: 1.45; }

.field-link { display: inline-flex; align-items: center; gap: 0.35rem; }

.info-button {
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border-radius: 50%;
  font-family: Georgia, "Iowan Old Style", serif;
  font-style: italic;
  color: var(--accent);
  border-color: var(--accent);
}

.title { display: flex; align-items: center; gap: 0.45rem; }

.credit { color: var(--muted); font-size: 0.78rem; margin: 1rem 0 2rem; }

.beta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  width: min(24rem, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

button.beta-open {
  background: var(--accent);
  color: var(--ink);
  border: 0;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

button.beta-open:hover { color: var(--ink); background: #efb56d; }

.beta-panel {
  width: 100%;
  max-height: min(70vh, 34rem);
  overflow: auto;
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 0.95rem 1rem 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.beta-panel h2 { font-size: 1.15rem; }
.beta-panel label { display: block; margin-top: 0.7rem; }
.beta-panel textarea,
.beta-panel input {
  width: 100%;
  margin-top: 0.35rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}
.beta-panel textarea { min-height: 6.5rem; resize: vertical; }
.beta-actions { margin: 0.7rem 0 0; }
button.beta-send {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  font-weight: 700;
}
button.beta-send:hover { color: var(--ink); }
.beta-note { border-top: 1px solid var(--line); margin-top: 0.75rem; padding-top: 0.65rem; }
.beta-note p { margin: 0.25rem 0 0; white-space: pre-wrap; }
.beta-ref { color: var(--accent); font-weight: 700; letter-spacing: 0.04em; }
