:root {
  --bg: #f4efe4;
  --panel: rgba(255, 251, 245, 0.88);
  --panel-strong: #fffaf2;
  --line: rgba(54, 42, 30, 0.14);
  --text: #1e1b18;
  --muted: #665f56;
  --accent: #d25f2d;
  --accent-deep: #8f3310;
  --bonus: #0f766e;
  --shadow: 0 18px 48px rgba(44, 27, 10, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(210, 95, 45, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.18), transparent 26%),
    linear-gradient(180deg, #fbf6ee 0%, var(--bg) 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

input,
select {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.app-shell {
  width: min(1160px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.hero-copy,
.hero-panel,
.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.hero-copy {
  padding: 2rem;
}

.hero-copy h1 {
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
  margin: 0.4rem 0 1rem;
  letter-spacing: -0.04em;
}

.hero-panel,
.card {
  padding: 1.4rem;
}

.status-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.status-label,
.metric-label,
.task-type,
.eyebrow,
.checkpoint-order {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stack {
  display: grid;
  gap: 0.9rem;
}

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

.coords {
  display: grid;
  gap: 0.35rem;
}

.hidden {
  display: none;
}

.team-code-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px dashed var(--line);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.score-grid strong {
  display: block;
  font-size: 2rem;
  margin-top: 0.25rem;
}

.button-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button-list button {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 1rem;
}

.checkpoint-list {
  display: grid;
  gap: 1rem;
}

.checkpoint {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.2rem;
}

.checkpoint.is-nearby {
  outline: 2px solid rgba(210, 95, 45, 0.45);
}

.checkpoint.is-complete {
  opacity: 0.78;
}

.checkpoint-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.badge {
  border-radius: 999px;
  background: rgba(210, 95, 45, 0.12);
  color: var(--accent-deep);
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
}

.task-block {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: white;
}

.bonus-task .task-type {
  color: var(--bonus);
}

@media (max-width: 900px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100vw - 1rem, 100%);
    padding-top: 0.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.3rem, 12vw, 4rem);
  }
}
