:root {
  --bg: #17130f;
  --surface: #221b14;
  --surface-2: #2b2118;
  --line: #3d3122;
  --amber: #e2a53c;
  --amber-bright: #f4c35f;
  --red: #c1443c;
  --green: #7a9a5b;
  --cream: #f2e8d8;
  --muted: #a2937c;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- HERO ---------- */

.hero {
  position: relative;
  padding: 5rem 1.5rem 3.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(226,165,60,0.16), transparent 60%),
    var(--bg);
}

.hero__glow {
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 280px;
  background: radial-gradient(circle, rgba(244,195,95,0.35), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--amber);
  margin: 0 0 0.6rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 6rem);
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--amber-bright);
  text-shadow: 0 0 24px rgba(244,195,95,0.35), 0 0 2px rgba(244,195,95,0.6);
}

.hero__lede {
  max-width: 520px;
  margin: 1.1rem auto 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.rulesheet {
  margin: 2.75rem auto 0;
  max-width: 560px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
}

.rulesheet__title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0 0 0.9rem;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.rulesheet__title span {
  color: var(--muted);
  font-weight: 400;
}

.rulesheet__list {
  margin: 0;
  padding: 0 0 0 1.3rem;
  columns: 2;
  column-gap: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}
.rulesheet__list li { margin-bottom: 0.55rem; break-inside: avoid; }

/* ---------- PLACES ---------- */

.places {
  max-width: 880px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.card__header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.card__name {
  font-family: var(--font-display);
  font-size: 2.1rem;
  letter-spacing: 0.02em;
  color: var(--cream);
  margin: 0;
  flex: 1;
  min-width: 0;
}

.gauge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.gauge__score {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--amber-bright);
  line-height: 1;
  text-align: right;
}
.gauge__score small {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.12em;
  margin-top: 0.15rem;
}

.card__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.media-slot {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}
.media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-slot__tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  background: rgba(23,19,15,0.72);
  color: var(--amber-bright);
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.media-slot__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-align: center;
  padding: 1rem;
}
.media-slot__placeholder svg { opacity: 0.5; }

.card__map {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.card__map iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
  filter: grayscale(0.35) contrast(1.05);
}

.checklist {
  padding: 1.5rem 1.75rem 1.75rem;
}

.checklist__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.checklist__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.5rem;
}

.checklist__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--line);
}

.checklist__mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}
.checklist__item.is-hit .checklist__mark {
  background: rgba(193,68,60,0.16);
  color: var(--red);
  border: 1px solid rgba(193,68,60,0.4);
}
.checklist__item.is-miss .checklist__mark {
  background: rgba(122,154,91,0.12);
  color: var(--green);
  border: 1px solid rgba(122,154,91,0.3);
}
.checklist__item.is-hit .checklist__label { color: var(--cream); }
.checklist__item.is-miss .checklist__label { color: var(--muted); }

/* ---------- FOOTER ---------- */

.footer {
  text-align: center;
  padding: 2.5rem 1.5rem 3.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.footer code {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: var(--amber);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 620px) {
  .rulesheet__list { columns: 1; }
  .card__header { flex-wrap: wrap; }
  .card__media { grid-template-columns: 1fr; }
  .checklist__list { grid-template-columns: 1fr; }
}

/* ---------- BUTTONS ---------- */

.btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn--sm { padding: 0.4rem 0.75rem; font-size: 0.72rem; }

.btn--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: #1b1509;
  font-weight: 600;
}
.btn--amber:hover { background: var(--amber-bright); }

.btn--ghost {
  background: transparent;
  color: var(--muted);
}
.btn--ghost:hover { color: var(--cream); border-color: var(--muted); }

/* ---------- AUTH WIDGET ---------- */

.auth {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.75rem;
}

.auth__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}
.auth__user strong { color: var(--amber-bright); }

.auth__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.auth__form input {
  font-family: var(--font-body);
  font-size: 0.82rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--cream);
  padding: 0.45rem 0.6rem;
  width: 150px;
}
.auth__form input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }

.auth__actions { display: flex; gap: 0.5rem; }

.auth__msg {
  width: 100%;
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--amber);
}

/* ---------- CARD EDIT CONTROLS ---------- */

.card__header .delete-btn { margin-left: 0.25rem; }

.checklist__mark {
  font-family: var(--font-mono);
}
button.checklist__mark {
  cursor: pointer;
  transition: transform 0.1s ease;
}
button.checklist__mark:hover { transform: scale(1.08); }
button.checklist__mark:active { transform: scale(0.94); }

.media-slot__upload {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(23,19,15,0.78);
  border: 1px solid rgba(226,165,60,0.5);
  color: var(--amber-bright);
  padding: 0.32rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
}
.media-slot__upload:hover { background: rgba(23,19,15,0.92); }

/* ---------- ADD PLACE ---------- */

.add-place {
  max-width: 880px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.add-place__form {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
}
.add-place__form input {
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--cream);
  padding: 0.6rem 0.75rem;
  flex: 1 1 220px;
}
.add-place__actions { display: flex; gap: 0.6rem; }

.loading {
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 2rem 0;
}

@media (max-width: 620px) {
  .auth { justify-content: center; }
  .auth__form input { width: 100%; }
}
