:root {
  --ink: #f6f0df;
  --muted: #c8c0aa;
  --green-950: #07140f;
  --green-900: #10251d;
  --green-800: #19372a;
  --gold: #c8a95c;
  --gold-light: #ead79e;
  --panel: rgba(15, 34, 26, 0.92);
  --line: rgba(234, 215, 158, 0.24);
  --danger: #e3a39a;
  --radius: 18px;
  --shadow: 0 20px 55px rgba(0,0,0,.32);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 10%, rgba(200,169,92,.12), transparent 35%),
    linear-gradient(180deg, var(--green-900), var(--green-950));
  font-family: Georgia, "Times New Roman", serif;
}

button, select, input { font: inherit; }

button { cursor: pointer; }

.noscript {
  padding: 1rem;
  background: #5a201d;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: max(1rem, env(safe-area-inset-top)) 1rem 1rem;
  background: rgba(7,20,15,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header h1 {
  margin: .15rem 0 0;
  font-size: clamp(1.6rem, 6vw, 2.5rem);
  line-height: 1;
}

.brand, .date, .eyebrow, .stage-kicker, .stop-number, .gps-label {
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.brand {
  margin: 0;
  color: var(--gold-light);
  font-size: .68rem;
  font-weight: 700;
}

.date {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .7rem;
}

main {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem calc(4rem + env(safe-area-inset-bottom));
}

.gps-panel, .stop-panel, .dev-panel {
  padding: 1.15rem;
  margin-bottom: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-heading h2 {
  margin: .2rem 0 1rem;
}

.eyebrow, .stage-kicker, .stop-number {
  color: var(--gold-light);
  font-size: .7rem;
  font-weight: 700;
}

.gps-grid {
  display: grid;
  grid-template-columns: 1.4fr .7fr;
  gap: .75rem;
  margin: 1rem 0;
}

.gps-grid > div {
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}

.gps-label {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .62rem;
}

.button-row {
  display: flex;
  gap: .7rem;
  margin-top: 1rem;
}

.wrap { flex-wrap: wrap; }

.primary-button, .secondary-button, .ghost-button {
  min-height: 48px;
  padding: .8rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  letter-spacing: .045em;
}

.primary-button {
  width: 100%;
  color: #182017;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.secondary-button {
  flex: 1;
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.ghost-button {
  color: var(--gold-light);
  background: transparent;
  border-color: var(--line);
}

.status-text, .photo-tip {
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .85rem;
  line-height: 1.45;
}

.stop-panel > h2 {
  margin: .35rem 0;
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1;
}

.stop-panel > p {
  color: var(--muted);
  line-height: 1.55;
}

.progress-track {
  height: 7px;
  margin: 1.2rem 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.progress-bar {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width .35s ease;
}

.stage-card {
  padding: 1.1rem;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.035);
}

.stage-card h3 {
  margin: .35rem 0 .65rem;
  font-size: 1.5rem;
}

.stage-card p {
  color: var(--muted);
  line-height: 1.55;
}

model-viewer {
  width: 100%;
  height: min(54vh, 440px);
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: radial-gradient(circle, #385344, #13281e);
  overflow: hidden;
}

.ar-launch-button {
  width: auto;
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  white-space: nowrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(0,0,0,.94);
}

.modal[hidden] { display: none; }

.modal-inner {
  position: relative;
  width: min(920px, 100%);
}

.modal video {
  width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  background: #000;
}

.modal-close {
  position: absolute;
  right: -.4rem;
  top: -3rem;
  width: 44px;
  height: 44px;
  color: white;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  font-size: 1.7rem;
}

.video-counter {
  margin: .7rem 0 0;
  color: var(--muted);
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 200;
  transform: translateX(-50%);
  width: min(90%, 480px);
  padding: .9rem 1rem;
  color: var(--ink);
  background: #142d22;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

code {
  color: var(--gold-light);
}

@media (max-width: 520px) {
  .gps-grid { grid-template-columns: 1fr; }
  .button-row { flex-direction: column; }
  .site-header { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
