:root {
  --bg: #0c0a09;
  --bg-elevated: #1c1917;
  --surface: rgba(28, 25, 23, 0.72);
  --border: rgba(245, 158, 11, 0.18);
  --text: #fafaf9;
  --text-muted: #a8a29e;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-glow: rgba(245, 158, 11, 0.35);
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --radius: 14px;
  --radius-lg: 22px;
  --space: clamp(1rem, 3vw, 1.75rem);
  --max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(245, 158, 11, 0.12), transparent),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(180, 83, 9, 0.08), transparent);
}

/* Room for fixed points HUD on phones (bottom-right) + home indicator */
@media (max-width: 767px) {
  body {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 8px;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
}

code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 10, 9, 0.85);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo:hover {
  color: var(--accent);
}

.nav {
  display: none;
  gap: 1.75rem;
  align-items: center;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 var(--space) 1rem;
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--border);
  background: rgba(12, 10, 9, 0.98);
}

.nav-panel[hidden] {
  display: none;
}

.nav-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  -webkit-tap-highlight-color: transparent;
}

.nav-panel a:last-child {
  border-bottom: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-panel {
    display: none !important;
  }
}

.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 12vw, 7rem) var(--space) clamp(4rem, 10vw, 6rem);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: min(90vw, 520px);
  height: min(90vw, 520px);
  top: -20%;
  right: -15%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
  opacity: 0.6;
}

.eyebrow {
  position: relative;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  position: relative;
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 10vw, 4.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-title-accent {
  font-style: italic;
  color: var(--accent);
}

.hero-lead {
  position: relative;
  max-width: 36rem;
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #fbbf24;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-large {
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
}

.section {
  padding: clamp(3rem, 8vw, 5rem) var(--space);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-alt {
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.5) 0%, transparent 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(8px);
}

.card-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-value {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.card-note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .timeline-item {
    grid-template-columns: 8rem 1fr;
    gap: 2rem;
    align-items: start;
  }

  .timeline-itinerary .timeline-item {
    grid-template-columns: minmax(9.75rem, 11.5rem) 1fr;
  }
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-day {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-time {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.35;
}

.timeline-divider {
  list-style: none;
  padding: 1rem 0 0.25rem;
  margin: 0;
}

.timeline-divider .timeline-rule {
  margin: 0;
}

.timeline-rule {
  border: none;
  border-top: 1px solid var(--border);
  opacity: 0.9;
}

.itinerary-section-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.timeline-item-section-label {
  padding-top: 0.75rem;
  border-bottom-color: rgba(245, 158, 11, 0.12);
}

@media (min-width: 640px) {
  .timeline-item-section-label {
    grid-template-columns: 1fr;
  }
}

.timeline-item-unconfirmed .timeline-time {
  color: var(--text-muted);
}

.timeline-item-unconfirmed .timeline-body h3 {
  color: var(--text);
  font-weight: 600;
}

.timeline-muted {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Crew-only itinerary gate */
.itinerary-locked {
  max-width: 32rem;
}

.itinerary-locked-lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.itinerary-locked-lead strong {
  color: var(--text);
}

.itinerary-form {
  margin: 0;
}

.itinerary-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.itinerary-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.itinerary-input {
  flex: 1 1 12rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}

.itinerary-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.itinerary-error {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: #f87171;
}

.itinerary-hide-wrap {
  margin: 1.25rem 0 0;
}

.itinerary-hide-link {
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.itinerary-hide-link:hover {
  color: var(--accent);
}

.timeline-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.timeline-body h3:last-child {
  margin-bottom: 0;
}

.timeline-body p {
  margin: 0;
  color: var(--text-muted);
}

.prose {
  max-width: 42rem;
}

.prose p {
  margin: 0;
  color: var(--text-muted);
}

.section-cta {
  text-align: center;
}

.cta-inner {
  max-width: 36rem;
}

.cta-text {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
}

.site-footer {
  padding: 2rem var(--space);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
}

.nav a[aria-current="page"] {
  color: var(--accent);
}

/* Fixed points HUD */
.points-hud {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 60;
  pointer-events: none;
}

.points-hud-inner {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(12, 10, 9, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.points-hud-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.points-hud-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  min-width: 2ch;
  text-align: right;
}

@media (max-width: 767px) {
  .points-hud {
    top: auto;
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
}

/* Points game pages + cards */
.game-body {
  padding-bottom: 2rem;
}

.game-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--space);
}

.game-hero {
  padding: clamp(2rem, 6vw, 3.5rem) 0 2rem;
  max-width: 40rem;
}

.game-page-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.game-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.game-lead a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.game-lead a:hover {
  text-decoration: underline;
}

.game-list-wrap {
  padding-bottom: 3rem;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.game-card {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(8px);
}

.game-card-done {
  opacity: 0.88;
  border-color: rgba(245, 158, 11, 0.28);
}

.game-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.game-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.game-card-points {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.game-card-cost {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.game-card-desc {
  margin: 0 0 0.75rem;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.game-card-meta {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.game-card-meta-task {
  margin-top: 0.25rem;
}

.game-task-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}

.game-task-input {
  flex: 1 1 6rem;
  min-height: 44px;
  max-width: 8rem;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.game-task-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.game-task-input::placeholder {
  color: var(--text-muted);
}

.game-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-game {
  pointer-events: auto;
  min-height: 44px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.btn-game:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.game-badge {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

.game-badge-done {
  background: var(--accent-soft);
  color: var(--accent);
}

.game-badge-muted {
  background: rgba(168, 162, 158, 0.15);
  color: var(--text-muted);
}

.section-points-teaser .points-teaser-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .section-points-teaser .points-teaser-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
}

.points-teaser-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
}

.points-teaser-text {
  margin: 0;
  max-width: 36rem;
  color: var(--text-muted);
}

.points-teaser-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}
