:root {
  --ink: #0c0c0c;
  --panel: rgba(0, 0, 0, 0.78);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f7f4ef;
  --muted: rgba(247, 244, 239, 0.72);
  --orange: #f47745;
  --yellow: #f3c95f;
  --blue: #4f88ff;
  --paper: #f7f4ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #111;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 22px;
  background: #000;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  color: var(--yellow);
  transform: rotate(180deg);
}

nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

nav a,
footer a {
  color: var(--muted);
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.82));
}

.hero-content {
  position: relative;
  width: min(940px, calc(100% - 32px));
  margin: 0 auto 54px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.96;
}

h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.02;
}

h3 {
  margin: 12px 0 8px;
  font-size: 22px;
}

.lede {
  max-width: 680px;
  font-size: 20px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.primary {
  background: var(--orange);
  color: #fff;
}

.secondary {
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid var(--line);
}

.danger {
  background: rgba(255, 70, 55, 0.18);
  border: 1px solid rgba(255, 120, 110, 0.54);
  color: #fff;
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.sign-out-button {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.sign-out-button:hover,
.sign-out-button:focus-visible {
  background: #fff;
  border-color: #fff;
}

#signOutButton {
  background: #fff;
  border: 2px solid var(--yellow);
  color: #000;
  box-shadow: 0 0 0 3px rgba(243, 201, 95, 0.24);
}

.hero-actions,
.download {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.section {
  padding: 72px 22px;
  max-width: 1120px;
  margin: 0 auto;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.feature-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.admin-grid article,
.legal-card,
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.feature-card p,
.admin-grid p,
.section p {
  color: var(--muted);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(244, 119, 69, 0.18);
  color: var(--yellow);
  font-weight: 900;
}

.app-preview,
.download {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 32px;
  align-items: center;
}

.phone-frame {
  border: 10px solid #050505;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  min-height: 520px;
}

.phone-map {
  position: relative;
  min-height: 520px;
  background:
    linear-gradient(135deg, rgba(33, 80, 47, 0.86), rgba(105, 98, 78, 0.86)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
}

.pin {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.pin::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #fff;
}

.pin-blue {
  left: 42%;
  top: 38%;
  background: var(--blue);
}

.pin-orange {
  left: 55%;
  top: 45%;
  background: var(--orange);
}

.pin-yellow {
  left: 48%;
  top: 54%;
  background: var(--yellow);
}

.dashboard-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 6px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.82);
  border-radius: 8px;
}

.grabber {
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  margin: 0 auto 8px;
}

.admin-band {
  background: #000;
  max-width: none;
  padding-left: max(22px, calc((100vw - 1120px) / 2));
  padding-right: max(22px, calc((100vw - 1120px) / 2));
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 34px 22px;
  border-top: 1px solid var(--line);
  background: #000;
  color: var(--muted);
}

.page {
  min-height: 100vh;
  padding: 52px 22px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.88)),
    url("https://images.unsplash.com/photo-1524661135-423995f22d0b?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-attachment: fixed;
}

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

.legal-card {
  white-space: pre-wrap;
  color: var(--text);
}

.admin-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

.account-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}

.profile-card {
  grid-column: span 1;
}

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

.sms-consent-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  margin: 16px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.sms-consent-row input {
  width: auto;
  margin-top: 3px;
}

.sms-consent-row a {
  color: var(--yellow);
  font-weight: 900;
}

.hunt-builder-card {
  grid-column: 1 / -1;
}

.hunt-list-card {
  grid-column: 1 / -1;
}

.section-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.section-row p {
  margin: 8px 0 0;
  color: var(--muted);
}

.hunt-map-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin: 18px 0 12px;
}

.hunt-map-header h3,
.hunt-map-header p {
  margin: 0;
}

.hunt-map-header p {
  color: var(--muted);
}

.map-coordinate {
  max-width: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-align: right;
}

.hunt-map-shell {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050505;
}

.hunt-map {
  width: 100%;
  min-height: 620px;
}

.sponsor-map-card {
  grid-column: 1 / -1;
}

.leaderboard-card {
  grid-column: 1 / -1;
}

.leaderboard-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.event-board {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(243, 201, 95, 0.34);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.46);
}

.event-board-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.event-board-heading h3,
.event-board-heading p {
  margin: 0;
}

.event-board-heading h3 {
  font-size: 28px;
}

.event-board-heading strong {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
}

.leaderboard-list {
  display: grid;
  gap: 10px;
}

.leaderboard-list p {
  margin: 0;
  color: var(--muted);
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(92px, auto);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.leaderboard-row.is-highlighted {
  border-color: rgba(243, 201, 95, 0.66);
  background: rgba(243, 201, 95, 0.14);
}

.leaderboard-rank {
  display: grid;
  width: 58px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.leaderboard-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.leaderboard-text strong,
.leaderboard-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-text strong {
  color: #fff;
  font-size: 22px;
}

.leaderboard-text span {
  color: var(--muted);
  font-weight: 700;
}

.leaderboard-score {
  display: grid;
  justify-items: end;
  gap: 0;
  min-width: 92px;
}

.leaderboard-score strong {
  color: var(--yellow);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.leaderboard-score span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.sponsor-filter-bar {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.sponsor-filter {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.sponsor-filter.is-active {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #050505;
}

.sponsor-map-shell {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050505;
}

.sponsor-map {
  width: 100%;
  min-height: 620px;
}

.sponsor-pin-strip {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.84);
}

.sponsor-pin-strip-list {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.sponsor-pin-strip-list p {
  margin: 0;
  color: var(--muted);
}

.sponsor-pin-chip {
  display: grid;
  flex: 0 0 150px;
  gap: 4px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.sponsor-pin-chip strong,
.sponsor-pin-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sponsor-pin-chip span {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
}

.sponsor-editor {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.sponsor-editor h3,
.sponsor-selected-pin,
.sponsor-save-target,
.sponsor-existing-list p {
  margin: 0;
}

.sponsor-selected-pin,
.sponsor-save-target,
.sponsor-existing-list {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.sponsor-existing-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.map-zoom-controls {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 10px;
  z-index: 2;
}

.map-zoom-controls button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.76);
  color: #fff;
  font: inherit;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.hunt-pin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.hunt-edit-actions,
.pin-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.draft-pins-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
}

.draft-pins-list p {
  margin: 0;
  color: var(--muted);
}

.draft-pin-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, auto);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.draft-pin-row input {
  margin: 0;
}

.draft-pin-fields {
  display: grid;
  gap: 8px;
}

.draft-pin-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draft-pin-media-button {
  min-height: 42px;
  padding: 9px 12px;
}

.draft-pin-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.draft-pin-coordinates {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-align: right;
}

.draft-pin-remove {
  min-height: 40px;
  padding: 8px 12px;
}

.draft-pin-media {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

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

.hunts-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.hunts-list p,
.sponsors-list p {
  margin: 0;
  color: var(--muted);
}

.sponsors-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.sponsor-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.sponsor-row h3 {
  margin: 0;
}

.sponsor-row a {
  color: var(--yellow);
  overflow-wrap: anywhere;
}

.sponsor-details,
.sponsor-contact {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.sponsor-contact {
  color: var(--muted);
}

.sponsor-meta {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.hunt-row {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  text-align: left;
}

.hunt-row:hover,
.hunt-row:focus-within {
  border-color: rgba(243, 201, 95, 0.72);
  background: rgba(255, 255, 255, 0.1);
}

.hunt-row h3,
.hunt-row p {
  margin: 0;
}

.hunt-row p {
  color: var(--muted);
}

.hunt-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.hunt-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hunt-row-action {
  min-width: 118px;
  white-space: nowrap;
}

.hunt-preview {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.hunt-preview[hidden] {
  display: none;
}

.hunt-preview-map {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #050505;
}

.hunt-edit-panel,
.hunt-current-pins,
.pin-edit-list {
  display: grid;
  gap: 10px;
}

.hunt-edit-panel,
.hunt-current-pins {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.hunt-current-pins h3 {
  margin: 0;
}

.pin-edit-list {
  margin-top: 4px;
}

.pin-edit-list p {
  margin: 0;
  color: var(--muted);
}

.pin-edit-row {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.pin-edit-row h4 {
  margin: 0;
}

.pin-edit-actions .button {
  min-height: 42px;
  padding: 9px 12px;
}

.pin-edit-meta {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.pin-info-window {
  max-width: 260px;
  color: #111;
  font: 14px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pin-info-window strong {
  display: block;
  margin-bottom: 6px;
  color: #000;
  font-size: 15px;
}

.pin-info-window p {
  margin: 0 0 8px;
  color: #222;
}

.pin-info-sponsored {
  margin: 8px 0;
  padding: 8px;
  border-radius: 8px;
  background: #fff4c2;
  color: #111;
  font-weight: 800;
}

.pin-info-sponsored a {
  color: #7c3f00;
}

.pin-info-muted,
.pin-info-coordinates {
  margin-top: 6px;
  color: #555;
  font-size: 12px;
}

.pin-info-coordinates {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 92px;
}

.status {
  color: var(--yellow);
  font-weight: 800;
}

@media (max-width: 840px) {
  .feature-grid,
  .admin-grid,
  .app-preview,
  .download,
  .admin-layout,
  .account-layout,
  .leaderboard-layout,
  .two-column-fields {
    grid-template-columns: 1fr;
  }

  nav {
    justify-content: flex-end;
  }

  .hunt-map-header,
  .section-row,
  .hunt-pin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-coordinate {
    max-width: 100%;
    text-align: left;
  }

  .hunt-map-shell,
  .hunt-map,
  .sponsor-map-shell,
  .sponsor-map {
    min-height: 520px;
  }

  .draft-pin-row {
    grid-template-columns: 1fr;
  }

  .draft-pin-actions {
    justify-items: stretch;
  }

  .draft-pin-coordinates,
  .draft-pin-media {
    text-align: left;
  }

  .leaderboard-row {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .leaderboard-rank {
    width: 50px;
    height: 50px;
  }

  .leaderboard-score {
    grid-column: 1 / -1;
    justify-items: start;
    padding-left: 64px;
  }
}
