@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,650..900,35&family=Manrope:wght@400;650;800&display=swap");

:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
  --ink: #10221d;
  --muted: #65756f;
  --paper: #f6f0df;
  --paper-strong: #fff8e7;
  --moss: #314f3f;
  --pine: #13251f;
  --forest: #314f3f;
  --ember: #ff8a45;
  --orange: #ff8a45;
  --gold: #e8bb56;
  --aqua: #4cb7a5;
  --danger: #b95337;
  --line: rgba(19, 37, 31, 0.16);
  --shadow: 0 26px 70px rgba(16, 34, 29, 0.18);
  color-scheme: light;
}

@media (max-width: 760px) {
  .progress-menu,
  .ride-primary-actions {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -8%, rgba(255, 138, 69, 0.34), transparent 28rem),
    radial-gradient(circle at 86% 12%, rgba(76, 183, 165, 0.25), transparent 34rem),
    linear-gradient(135deg, rgba(19, 37, 31, 0.06) 0 1px, transparent 1px 26px),
    linear-gradient(145deg, #f4ead0 0%, #ecdfbd 44%, #ddc28a 100%);
  font-family: var(--font-body);
}

button,
select,
a {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  position: relative;
  overflow: auto;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

body.is-authenticated .hero {
  display: none;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(19, 37, 31, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 37, 31, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.hero::after {
  position: absolute;
  right: -12rem;
  bottom: -9rem;
  z-index: -1;
  width: 38rem;
  height: 38rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 50%;
  content: "";
  background:
    repeating-radial-gradient(circle, rgba(19, 37, 31, 0.12) 0 1px, transparent 1px 34px),
    radial-gradient(circle, rgba(255, 248, 231, 0.4), transparent 70%);
}

.topbar,
.hero-grid,
.section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.language-switcher {
  display: inline-flex;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
  background: rgba(255, 248, 231, 0.54);
}

.lang-button {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.62rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.lang-button.active {
  color: var(--paper-strong);
  background: var(--pine);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  color: var(--paper-strong);
  background: var(--pine);
  border: 2px solid rgba(255, 248, 231, 0.6);
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.brand-mark svg {
  width: 2.25rem;
  height: 2.25rem;
}

.brand-mark path:first-child {
  fill: var(--gold);
}

.brand-mark circle {
  fill: none;
  stroke: var(--ember);
  stroke-width: 5;
}

.brand-mark path:last-child {
  fill: none;
  stroke: var(--aqua);
  stroke-width: 4;
  stroke-linecap: round;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  max-width: 15rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.ghost-link,
.secondary-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: rgba(255, 248, 231, 0.54);
  text-decoration: none;
}

.nav-button {
  color: var(--ink);
  cursor: pointer;
}

body:not(.is-authenticated) .nav-actions a.ghost-link {
  display: none;
}

body:not(.is-authenticated) #authOpenButton {
  display: none;
}

body.is-authenticated .nav-actions a.ghost-link {
  display: inline-flex;
}

.hero-grid {
  display: block;
  min-height: auto;
  padding: clamp(1.4rem, 5vw, 3rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.eyebrow,
.muted-label {
  margin: 0 0 0.45rem;
  color: var(--moss);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-copy > .eyebrow {
  max-width: 10ch;
  color: var(--pine);
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 8vw, 6.2rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.88;
  text-transform: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 10ch;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 6.8rem);
  letter-spacing: -0.08em;
  line-height: 0.86;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.lead {
  max-width: 38rem;
  color: #40514b;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.48;
}

.lead.small {
  font-size: 1rem;
}

.newbie-plan article {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1rem;
  background: rgba(255, 248, 231, 0.66);
}

.newbie-plan span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--paper-strong);
  background: var(--pine);
  font-weight: 900;
}

.hero-start-panel {
  max-width: 54rem;
  margin-top: 1.35rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.5rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 138, 69, 0.18), transparent 12rem),
    linear-gradient(135deg, rgba(255, 248, 231, 0.82), rgba(255, 248, 231, 0.56));
  box-shadow: 0 20px 55px rgba(16, 34, 29, 0.1);
}

.hero-start-copy p {
  max-width: 41rem;
  color: var(--muted);
  line-height: 1.45;
}

.hero-start-copy .eyebrow {
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-start-copy #mode-title {
  color: #40514b;
  font-size: clamp(1rem, 1.55vw, 1.15rem);
}

.hero-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.hero-flow article {
  min-height: 9rem;
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 1.05rem;
  padding: 0.82rem;
  background: rgba(255, 248, 231, 0.68);
}

.hero-flow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  color: var(--paper-strong);
  background: var(--pine);
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-flow strong {
  display: block;
  margin-bottom: 0.3rem;
}

.hero-flow p,
.reward-note span {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.reward-note {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 0.8rem;
  align-items: center;
  margin-top: 0.75rem;
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 1rem;
  padding: 0.82rem;
  background: rgba(202, 221, 198, 0.5);
}

.reward-note strong {
  color: var(--pine);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.hero-login-action {
  cursor: pointer;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.mission-brief {
  max-width: 43rem;
  margin-top: 1.4rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.35rem;
  padding: 1rem;
  background:
    linear-gradient(120deg, rgba(255, 248, 231, 0.86), rgba(255, 248, 231, 0.58)),
    repeating-linear-gradient(135deg, rgba(19, 37, 31, 0.05) 0 1px, transparent 1px 18px);
  box-shadow: 0 18px 45px rgba(16, 34, 29, 0.08);
}

.mission-brief ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission-brief li {
  border-left: 3px solid var(--ember);
  padding-left: 0.75rem;
}

.mission-brief strong,
.mission-brief span {
  display: block;
}

.mission-brief strong {
  margin-bottom: 0.25rem;
  font-size: 0.92rem;
}

.mission-brief span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.hero-proof span {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 248, 231, 0.62);
  color: var(--moss);
  font-size: 0.86rem;
  font-weight: 800;
}

.primary-action {
  display: inline-flex;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  color: var(--paper-strong);
  background: var(--pine);
  box-shadow: 0 12px 28px rgba(19, 37, 31, 0.25);
  cursor: pointer;
  text-decoration: none;
}

.primary-action.full {
  width: 100%;
  margin-top: 1rem;
}

.device-card {
  display: none;
  min-height: 29rem;
  border: 1px solid rgba(255, 248, 231, 0.48);
  border-radius: 2.2rem;
  padding: 1.2rem;
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 74% 10%, rgba(255, 138, 69, 0.9), transparent 10rem),
    linear-gradient(160deg, rgba(19, 37, 31, 0.95), rgba(49, 79, 63, 0.88)),
    repeating-linear-gradient(35deg, rgba(255, 248, 231, 0.06) 0 1px, transparent 1px 20px);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.newbie-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem 0 1.05rem;
}

.newbie-plan article {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem;
  background: rgba(255, 248, 231, 0.1);
}

.newbie-plan span {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  background: rgba(255, 248, 231, 0.18);
}

.newbie-plan p {
  margin: 0;
  color: var(--paper-strong);
  font-size: 0.84rem;
  line-height: 1.22;
}

.device-status,
.panel-header,
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.compact-action {
  padding: 0.52rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.device-status {
  margin-bottom: 7rem;
  color: rgba(255, 248, 231, 0.78);
}

.route-line {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.route-dot {
  display: block;
  width: 2.7rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 248, 231, 0.22);
}

.route-dot.active {
  background: var(--ember);
}

.device-card h2 {
  margin-bottom: 0.4rem;
  font-size: 2.7rem;
}

.intel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.intel-pills span,
.freshness,
.tag {
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 248, 231, 0.15);
  font-size: 0.78rem;
}

.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

main > .section {
  display: none;
}

body:not(.is-authenticated) main > .landing-section,
body.is-authenticated main > .app-zone {
  display: block;
}

body.is-authenticated .prototype {
  padding-top: 1rem;
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.value-grid,
.mode-grid,
.app-preview-grid,
.prototype-grid,
.quest-board,
.rules-grid,
.logo-options,
.onboarding-grid,
.utility-grid,
.earn-grid,
.quest-explainer,
.lore-section,
.scout-code {
  display: grid;
  gap: 1rem;
}

.lore-section {
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  align-items: stretch;
}

.lore-card {
  position: relative;
  min-height: 24rem;
  overflow: hidden;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.7rem;
  padding: clamp(1.2rem, 4vw, 2rem);
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 82% 12%, rgba(232, 187, 86, 0.42), transparent 10rem),
    radial-gradient(circle at 12% 78%, rgba(76, 183, 165, 0.26), transparent 12rem),
    linear-gradient(145deg, #13251f, #294738);
  box-shadow: var(--shadow);
}

.lore-card::after {
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(255, 248, 231, 0.16);
  border-radius: 34% 66% 58% 42%;
  content: "";
  background:
    repeating-linear-gradient(45deg, rgba(255, 248, 231, 0.08) 0 2px, transparent 2px 18px),
    rgba(255, 248, 231, 0.04);
  transform: rotate(-10deg);
}

.lore-card .eyebrow,
.lore-card p {
  color: rgba(255, 248, 231, 0.78);
}

.lore-card h2 {
  max-width: 12ch;
}

.scout-code {
  grid-template-columns: 1fr;
}

.scout-code article {
  border: 1px dashed rgba(19, 37, 31, 0.24);
  border-radius: 1.35rem;
  padding: 1.1rem;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 138, 69, 0.2), transparent 7rem),
    rgba(255, 248, 231, 0.76);
  box-shadow: 0 18px 45px rgba(16, 34, 29, 0.08);
}

.scout-code span {
  display: inline-grid;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1.5rem;
  place-items: center;
  border-radius: 50%;
  color: var(--paper-strong);
  background: var(--pine);
  font-weight: 900;
}

.scout-code strong {
  display: block;
  margin-bottom: 0.45rem;
}

.scout-code p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.compact-heading {
  max-width: 46rem;
}

.compact-heading p {
  color: var(--muted);
  line-height: 1.55;
}

.journey-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.journey-rail article {
  position: relative;
  min-height: 14rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.35rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 88% 8%, rgba(232, 187, 86, 0.24), transparent 7rem),
    rgba(255, 248, 231, 0.74);
  box-shadow: 0 18px 45px rgba(16, 34, 29, 0.08);
}

.journey-rail article:nth-child(3) {
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 138, 69, 0.7), transparent 8rem),
    linear-gradient(145deg, var(--pine), #294738);
}

.journey-rail article:nth-child(3) p {
  color: rgba(255, 248, 231, 0.75);
}

.journey-rail span {
  display: inline-flex;
  margin-bottom: 3rem;
  color: var(--ember);
  font-weight: 900;
}

.journey-rail article:nth-child(3) span {
  color: var(--gold);
}

.journey-rail strong {
  display: block;
  margin-bottom: 0.4rem;
}

.journey-rail p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.value-card,
.mode-card,
.app-preview-grid article,
.panel,
.map-panel,
.quest-card,
.rule-card,
.logo-card,
.onboarding-card,
.utility-card,
.earn-card,
.route-card,
.reward-card,
.why-profile-card {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.5rem;
  padding: 1.1rem;
  background: rgba(255, 248, 231, 0.68);
  box-shadow: 0 18px 45px rgba(16, 34, 29, 0.08);
}

.profile-reason-section {
  display: none;
  padding-top: 1rem;
}

.app-preview-section {
  display: none;
  padding-top: 0;
}

.app-preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-preview-grid article {
  min-height: 10rem;
}

.app-preview-grid strong,
.app-preview-grid span {
  display: block;
}

.app-preview-grid strong {
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
}

.app-preview-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.app-nav {
  display: none;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.7rem 0 1.2rem;
}

.app-nav-button {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 999px;
  padding: 0.62rem 0.8rem;
  background: rgba(255, 248, 231, 0.66);
  color: var(--moss);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
}

.app-nav-button.active {
  border-color: rgba(255, 138, 69, 0.5);
  color: var(--paper-strong);
  background: var(--pine);
}

.app-screen {
  display: none !important;
}

body.is-authenticated .app-screen.active {
  display: block !important;
}

body.is-authenticated .ride-screen.app-screen.active {
  display: grid !important;
}

body.is-authenticated .prototype-grid.app-screen.active,
body.is-authenticated .contribution-flow.app-screen.active {
  display: grid !important;
}

body.is-authenticated .trip-recommendations-panel.app-screen.active {
  display: grid !important;
}

.ride-screen {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ride-start-card,
.ride-progress-card {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.5rem;
  padding: 1.15rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(76, 183, 165, 0.25), transparent 9rem),
    rgba(255, 248, 231, 0.76);
  box-shadow: 0 18px 45px rgba(16, 34, 29, 0.08);
}

.ride-start-card[hidden] {
  display: none;
}

.ride-progress-card[hidden] {
  display: none;
}

.ride-start-card {
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 138, 69, 0.18), transparent 8rem),
    rgba(255, 248, 231, 0.82);
}

.ride-progress-card h3 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.05em;
}

.ride-start-card h3 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  letter-spacing: -0.05em;
}

.ride-start-card p,
.ride-progress-card p {
  color: var(--muted);
  line-height: 1.45;
}

.journey-form {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.journey-form label {
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-form input {
  width: 100%;
  border: 1px solid rgba(19, 37, 31, 0.16);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  color: var(--ink);
  background: rgba(255, 248, 231, 0.78);
  font: inherit;
  font-weight: 800;
}

.ride-journey-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.ride-journey-meta div,
.journey-total {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1rem;
  padding: 0.85rem;
  background: rgba(255, 248, 231, 0.72);
}

.ride-journey-meta span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ride-journey-meta strong {
  font-size: 1.15rem;
}

.ride-checkin-form {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.ride-checkin-form label {
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ride-checkin-form select {
  width: 100%;
  border: 1px solid rgba(19, 37, 31, 0.16);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  color: var(--ink);
  background: rgba(255, 248, 231, 0.78);
  font: inherit;
  font-weight: 800;
}

.journey-log {
  margin-top: 1rem;
}

.journey-log h4 {
  margin: 0 0 0.6rem;
}

.journey-latest-stop {
  display: grid;
  gap: 0.55rem;
}

.journey-latest-stop article {
  border: 1px solid rgba(255, 127, 80, 0.34);
  border-radius: 1rem;
  padding: 0.8rem 0.9rem;
  background: linear-gradient(135deg, rgba(255, 248, 231, 0.92), rgba(221, 239, 205, 0.78));
}

.journey-latest-stop strong,
.journey-latest-stop span,
.journey-latest-stop em {
  display: block;
}

.journey-latest-stop span,
.journey-latest-stop em {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
}

.journey-stops-menu {
  margin-top: 0.7rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1rem;
  padding: 0.25rem;
  background: rgba(255, 248, 231, 0.52);
}

.journey-stops-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
  list-style: none;
}

.journey-stops-menu summary::-webkit-details-marker {
  display: none;
}

.journey-stops-menu summary strong {
  min-width: 2rem;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  text-align: center;
  color: var(--cream);
  background: var(--pine);
}

.journey-log ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-log li {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 248, 231, 0.68);
}

.journey-log .journey-day-group {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
}

.journey-day-head {
  display: grid;
  gap: 0.15rem;
}

.journey-day-stops {
  display: grid;
  gap: 0.45rem;
}

.journey-day-stops article {
  border-radius: 0.8rem;
  padding: 0.65rem 0.7rem;
  background: rgba(255, 255, 255, 0.48);
}

.journey-log strong,
.journey-log span {
  display: block;
}

.journey-log span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.journey-total {
  margin-top: 1rem;
  color: var(--moss);
  font-weight: 900;
}

.secondary-action.full {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  cursor: pointer;
}

.ride-steps {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.ride-steps div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1rem;
  padding: 0.78rem 0.85rem;
  background: rgba(255, 248, 231, 0.72);
}

.ride-steps strong {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--paper-strong);
  background: var(--pine);
  font-size: 0.82rem;
}

.ride-steps span {
  font-weight: 900;
}

.ride-meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.1rem;
  padding: 0.9rem;
  background: rgba(255, 248, 231, 0.72);
}

.ride-meter span {
  color: var(--muted);
  font-weight: 800;
}

.ride-meter strong {
  font-size: 1.55rem;
}

.ride-reward-explainer {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.1rem;
  padding: 0.9rem;
  color: var(--ink);
  background: rgba(221, 234, 201, 0.62);
}

.ride-reward-explainer strong {
  font-weight: 950;
}

.ride-reward-explainer span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ride-reward-explainer small {
  color: rgba(49, 79, 63, 0.86);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.4;
}

.ride-primary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.ride-action-hint {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.explore-hidden {
  display: none !important;
}

.progress-screen {
  margin-top: 1rem;
}

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

.progress-menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.bottom-app-nav {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 20;
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  border: 1px solid rgba(255, 248, 231, 0.22);
  border-radius: 1.25rem;
  padding: 0.35rem;
  background: rgba(19, 37, 31, 0.93);
  box-shadow: 0 20px 50px rgba(16, 34, 29, 0.32);
  backdrop-filter: blur(16px);
}

body.is-authenticated .app-home-grid {
  display: none;
}

body.is-authenticated[data-app-view="ride"] .app-home-grid {
  display: grid;
}

.prototype .quick-actions,
.app-mode-tabs:empty {
  display: none;
}

body.is-authenticated .bottom-app-nav {
  display: grid;
}

.bottom-app-nav button {
  display: grid;
  gap: 0.15rem;
  justify-items: center;
  border: 0;
  border-radius: 0.95rem;
  padding: 0.55rem 0.25rem;
  color: rgba(255, 248, 231, 0.72);
  background: transparent;
  cursor: pointer;
}

.bottom-app-nav button.active {
  color: var(--paper-strong);
  background: rgba(255, 138, 69, 0.2);
}

.bottom-app-nav span {
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.bottom-app-nav strong {
  font-size: 0.68rem;
}

.app-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

body.is-authenticated .app-home-grid {
  display: none;
}

.app-status-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 12rem;
  border: 1px solid rgba(255, 248, 231, 0.28);
  border-radius: 1.5rem;
  padding: 1.15rem;
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 138, 69, 0.72), transparent 9rem),
    linear-gradient(145deg, var(--pine), #294738);
  box-shadow: var(--shadow);
}

.app-status-card .eyebrow,
.app-status-card p {
  color: rgba(255, 248, 231, 0.75);
}

.app-status-card h3 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.05em;
}

.app-token-pill {
  display: grid;
  min-width: 6.8rem;
  border: 1px solid rgba(255, 248, 231, 0.18);
  border-radius: 1.15rem;
  padding: 0.85rem;
  background: rgba(255, 248, 231, 0.1);
  text-align: center;
}

.app-token-pill.impression-pill {
  background: rgba(242, 196, 91, 0.16);
}

.app-token-pill span {
  color: rgba(255, 248, 231, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.app-token-pill strong {
  font-size: 2rem;
}

.quick-actions,
.app-mode-tabs {
  display: grid;
  gap: 0.6rem;
}

.app-mode-tabs {
  display: none;
}

.quick-actions {
  grid-template-columns: 1fr;
}

.quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.1rem;
  padding: 0.85rem 1rem;
  color: var(--ink);
  background: rgba(255, 248, 231, 0.72);
  cursor: pointer;
  text-decoration: none;
  font-weight: 900;
}

.quick-action.primary {
  border: 0;
  color: var(--paper-strong);
  background: var(--pine);
  box-shadow: 0 12px 28px rgba(19, 37, 31, 0.2);
}

.app-mode-tabs {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-mode-tab {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.2rem;
  padding: 0.85rem;
  color: var(--ink);
  background: rgba(255, 248, 231, 0.68);
  cursor: pointer;
  text-align: left;
}

.app-mode-tab.active {
  border-color: rgba(255, 138, 69, 0.62);
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 138, 69, 0.62), transparent 6rem),
    var(--pine);
}

.app-mode-tab strong,
.app-mode-tab span {
  display: block;
}

.app-mode-tab span {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.app-mode-tab.active span {
  color: rgba(255, 248, 231, 0.7);
}

body[data-app-view="ride"] .app-home-grid {
  grid-template-columns: 1fr;
}

.mode-section {
  padding-top: clamp(1rem, 3vw, 1.6rem);
}

.mode-grid[hidden] {
  display: none;
}

.hero-mode-section {
  max-width: 58rem;
}

.mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.mode-card {
  position: relative;
  display: flex;
  min-height: 14rem;
  flex-direction: column;
  gap: 0.7rem;
  overflow: hidden;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.5rem;
  padding: 1rem;
  color: var(--ink);
  background: rgba(255, 248, 231, 0.68);
  box-shadow: 0 18px 45px rgba(16, 34, 29, 0.08);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mode-card::after {
  position: absolute;
  right: -3rem;
  bottom: -4rem;
  width: 11rem;
  height: 11rem;
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 42% 58% 61% 39%;
  content: "";
  background: rgba(76, 183, 165, 0.12);
  transform: rotate(-12deg);
}

.mode-card:hover,
.mode-card.active {
  border-color: rgba(255, 138, 69, 0.58);
  transform: translateY(-3px);
}

.mode-card.active {
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 138, 69, 0.7), transparent 8rem),
    linear-gradient(145deg, var(--pine), #294738);
}

.mode-card.active p,
.mode-card.active .mode-reward {
  color: rgba(255, 248, 231, 0.76);
}

.mode-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--moss);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mode-card.active .mode-card-head {
  color: var(--gold);
}

.mode-card h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  letter-spacing: -0.04em;
}

.mode-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.mode-reward {
  margin-top: auto;
  border-top: 1px solid rgba(19, 37, 31, 0.12);
  padding-top: 0.75rem;
  color: var(--moss);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.mode-card.active .mode-reward {
  border-color: rgba(255, 248, 231, 0.18);
}

.mode-reward-short {
  display: none;
}

.mode-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 248, 231, 0.62);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.mode-card.active .mode-link {
  border-color: rgba(255, 248, 231, 0.22);
  background: rgba(255, 248, 231, 0.92);
}

.mode-decision {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.85rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 248, 231, 0.7);
}

.mode-decision span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.mode-auth-action {
  margin-top: 0.85rem;
}

.landing-resume-card {
  display: grid;
  gap: 0.45rem;
  max-width: 34rem;
  margin-top: 0.75rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.15rem;
  padding: 0.9rem;
  background:
    radial-gradient(circle at 92% 0%, rgba(76, 183, 165, 0.22), transparent 7rem),
    rgba(255, 248, 231, 0.72);
}

.landing-resume-card[hidden] {
  display: none;
}

.landing-resume-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.landing-resume-card strong {
  font-size: 1rem;
}

.card-index {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--ember);
  font-weight: 900;
}

.onboarding-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.onboarding-card {
  min-height: 18rem;
  background:
    radial-gradient(circle at 86% 10%, rgba(76, 183, 165, 0.22), transparent 8rem),
    rgba(255, 248, 231, 0.72);
}

.onboarding-card.featured {
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 138, 69, 0.84), transparent 8rem),
    linear-gradient(145deg, var(--pine), #294738);
}

.onboarding-card.featured p {
  color: rgba(255, 248, 231, 0.78);
}

.onboarding-card span {
  display: inline-block;
  margin-bottom: 4rem;
  color: var(--ember);
  font-weight: 900;
}

.onboarding-card.featured span {
  color: var(--gold);
}

.utility-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.utility-card {
  min-height: 13rem;
  background:
    linear-gradient(180deg, rgba(255, 248, 231, 0.82), rgba(255, 248, 231, 0.56)),
    repeating-linear-gradient(135deg, rgba(19, 37, 31, 0.05) 0 1px, transparent 1px 16px);
}

.earn-section {
  position: relative;
}

.earn-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.earn-card {
  min-height: 15rem;
  background:
    radial-gradient(circle at 85% 12%, rgba(232, 187, 86, 0.28), transparent 8rem),
    rgba(255, 248, 231, 0.74);
}

.earn-card.featured {
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 82% 10%, rgba(76, 183, 165, 0.5), transparent 8rem),
    linear-gradient(145deg, var(--pine), #294738);
}

.earn-card.featured p {
  color: rgba(255, 248, 231, 0.75);
}

.earn-value {
  display: inline-flex;
  margin-bottom: 3.2rem;
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  color: var(--pine);
  background: var(--gold);
  font-weight: 900;
}

.economy-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.35rem;
  padding: 1rem;
  background: rgba(255, 248, 231, 0.72);
}

.economy-note strong {
  flex: 0 0 auto;
}

.economy-note p {
  margin: 0;
  color: var(--muted);
}

.quest-explainer {
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  align-items: stretch;
}

.route-card {
  min-height: 24rem;
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 138, 69, 0.35), transparent 6rem),
    radial-gradient(circle at 78% 70%, rgba(76, 183, 165, 0.3), transparent 8rem),
    linear-gradient(135deg, rgba(49, 79, 63, 0.16), rgba(255, 248, 231, 0.64)),
    repeating-linear-gradient(30deg, rgba(19, 37, 31, 0.08) 0 2px, transparent 2px 22px);
}

.route-stops {
  display: grid;
  gap: 0.6rem;
}

.route-stops span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1rem;
  padding: 0.75rem;
  background: rgba(255, 248, 231, 0.75);
  font-weight: 900;
}

.route-stops span::before {
  display: block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  content: "";
  background: var(--ember);
}

.reward-card {
  background: rgba(255, 248, 231, 0.76);
}

.reward-card ul {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.reward-card li {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.why-profile-card {
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 82% 12%, rgba(232, 187, 86, 0.45), transparent 8rem),
    var(--pine);
}

.why-profile-card .eyebrow,
.why-profile-card p {
  color: rgba(255, 248, 231, 0.72);
}

.prototype-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  align-items: stretch;
}

.cockpit-grid {
  gap: 1rem;
}

.cockpit-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid rgba(255, 248, 231, 0.28);
  border-radius: 1.5rem;
  padding: 1.1rem;
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 138, 69, 0.72), transparent 9rem),
    linear-gradient(145deg, var(--pine), #294738);
  box-shadow: var(--shadow);
}

.cockpit-card .eyebrow,
.cockpit-card p {
  color: rgba(255, 248, 231, 0.74);
}

.cockpit-card h3 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  letter-spacing: -0.05em;
}

.journey-hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.55fr);
  gap: 0.9rem;
  align-items: end;
}

.journey-selector-wrap {
  display: grid;
  gap: 0.4rem;
  color: rgba(255, 248, 231, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-selector-wrap select,
.map-journey-form input {
  width: 100%;
  border: 1px solid rgba(255, 248, 231, 0.18);
  border-radius: 999px;
  padding: 0.78rem 0.9rem;
  color: var(--paper-strong);
  background: rgba(255, 248, 231, 0.12);
}

.journey-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.journey-details {
  border: 1px solid rgba(255, 248, 231, 0.14);
  border-radius: 1rem;
  background: rgba(255, 248, 231, 0.08);
}

.journey-details summary {
  cursor: pointer;
  padding: 0.85rem;
  color: var(--paper-strong);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.journey-details[open] summary {
  border-bottom: 1px solid rgba(255, 248, 231, 0.12);
}

.journey-details .journey-cards,
.journey-details .rewards-menu,
.journey-details .guild-chat,
.journey-details .compact-switch-form {
  margin: 0.85rem;
}

.compact-switch-form {
  background: rgba(255, 248, 231, 0.06);
}

.map-journey-form[hidden],
.journey-details[hidden],
.journey-selector-wrap[hidden],
.cockpit-stats[hidden],
.cockpit-actions[hidden] {
  display: none;
}

.journey-card,
.journey-empty-card {
  border: 1px solid rgba(255, 248, 231, 0.16);
  border-radius: 1rem;
  padding: 0.85rem;
  color: var(--paper-strong);
  background: rgba(255, 248, 231, 0.1);
}

.journey-card {
  cursor: pointer;
  text-align: left;
}

.journey-card.active {
  border-color: rgba(255, 199, 86, 0.72);
  background: rgba(255, 199, 86, 0.16);
}

.journey-card span,
.journey-card small,
.journey-card em,
.journey-empty-card span {
  display: block;
  color: rgba(255, 248, 231, 0.68);
}

.journey-card span {
  margin-bottom: 0.5rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.journey-card strong,
.journey-empty-card strong {
  display: block;
  margin-bottom: 0.28rem;
}

.journey-card em {
  margin-top: 0.65rem;
  font-style: normal;
  font-weight: 800;
}

.map-journey-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: end;
  border: 1px dashed rgba(255, 248, 231, 0.18);
  border-radius: 1rem;
  padding: 0.75rem;
}

.map-journey-form label {
  grid-column: 1 / -1;
  color: rgba(255, 248, 231, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cockpit-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(4.4rem, 1fr));
  gap: 0.5rem;
}

.cockpit-stats div {
  border: 1px solid rgba(255, 248, 231, 0.16);
  border-radius: 1rem;
  padding: 0.75rem;
  background: rgba(255, 248, 231, 0.1);
}

.cockpit-stats span,
.cockpit-stats strong {
  display: block;
}

.cockpit-stats span {
  color: rgba(255, 248, 231, 0.62);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cockpit-stats strong {
  margin-top: 0.25rem;
  font-size: 1.35rem;
}

.cockpit-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cockpit-actions .primary-action,
.cockpit-actions .secondary-action {
  min-width: 9rem;
}

.danger-action {
  border-color: rgba(255, 138, 69, 0.36);
}

.rewards-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.rewards-menu div,
.guild-chat {
  border: 1px solid rgba(255, 248, 231, 0.16);
  border-radius: 1rem;
  padding: 0.85rem;
  background: rgba(255, 248, 231, 0.1);
}

.rewards-menu span,
.rewards-menu strong {
  display: block;
}

.rewards-menu span {
  color: rgba(255, 248, 231, 0.64);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rewards-menu strong {
  margin-top: 0.25rem;
  font-size: 1.25rem;
}

.rewards-menu p,
.chat-list p {
  margin: 0.35rem 0 0;
  color: rgba(255, 248, 231, 0.68);
  font-size: 0.86rem;
  line-height: 1.35;
}

.guild-chat {
  display: grid;
  gap: 0.75rem;
}

.guild-chat h3 {
  margin-bottom: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.chat-list {
  display: grid;
  gap: 0.45rem;
}

.contribution-flow {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.flow-copy,
.active-location-card,
.contribution-result {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.5rem;
  padding: 1.1rem;
  background: rgba(255, 248, 231, 0.72);
  box-shadow: 0 18px 45px rgba(16, 34, 29, 0.08);
}

.active-location-card {
  background:
    radial-gradient(circle at 88% 12%, rgba(76, 183, 165, 0.28), transparent 8rem),
    rgba(255, 248, 231, 0.76);
}

.contribution-actions {
  display: grid;
  gap: 0.7rem;
}

.contribution-action {
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 0.85rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  text-align: left;
}

.contribution-action:hover {
  border-color: rgba(255, 138, 69, 0.5);
  background: rgba(255, 248, 231, 0.92);
}

.contribution-action.active {
  border-color: rgba(255, 138, 69, 0.76);
  background:
    radial-gradient(circle at 94% 0%, rgba(232, 187, 86, 0.38), transparent 5rem),
    rgba(255, 248, 231, 0.96);
  box-shadow: 0 14px 34px rgba(16, 34, 29, 0.12);
}

.contribution-action strong,
.contribution-action span,
.contribution-action em {
  display: block;
}

.contribution-action span {
  margin: 0.25rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.contribution-action em {
  color: var(--moss);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.contribution-result {
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 82% 10%, rgba(232, 187, 86, 0.46), transparent 8rem),
    var(--pine);
}

.contribution-result .eyebrow,
.contribution-result p {
  color: rgba(255, 248, 231, 0.76);
}

.contribution-result .tag {
  color: var(--paper-strong);
  background: rgba(255, 248, 231, 0.13);
}

.place-form-guide,
.place-form-similar,
.place-submit-result {
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 1.2rem;
  padding: 0.95rem;
  background: rgba(255, 248, 231, 0.12);
}

.place-form-guide h4,
.place-submit-result h3 {
  margin: 0.1rem 0 0;
}

.place-form-guide ol {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.15rem;
  color: rgba(255, 248, 231, 0.82);
  line-height: 1.38;
}

.place-form-similar {
  background: rgba(255, 248, 231, 0.08);
}

.place-form-similar.warning {
  border-color: rgba(255, 138, 69, 0.34);
  background: rgba(255, 138, 69, 0.1);
}

.place-form-similar strong {
  color: var(--paper-strong);
}

.place-form-similar p,
.place-submit-result p {
  margin: 0;
  color: rgba(255, 248, 231, 0.76);
  line-height: 1.42;
}

.similar-place-list {
  display: grid;
  gap: 0.45rem;
}

.similar-place-card {
  display: grid;
  gap: 0.15rem;
  border: 1px solid rgba(255, 248, 231, 0.14);
  border-radius: 0.9rem;
  padding: 0.65rem 0.75rem;
  color: var(--paper-strong);
  background: rgba(255, 248, 231, 0.1);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.similar-place-card span {
  font-weight: 900;
}

.similar-place-card small {
  color: rgba(255, 248, 231, 0.68);
  font-weight: 800;
}

.compact-pipeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.intel-form {
  display: grid;
  grid-column: 1 / -1;
  gap: 1rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.5rem;
  padding: 1.1rem;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 138, 69, 0.22), transparent 10rem),
    rgba(255, 248, 231, 0.76);
  box-shadow: 0 18px 45px rgba(16, 34, 29, 0.08);
}

.intel-form[data-action-kind="map-point"] {
  border-color: rgba(255, 138, 69, 0.34);
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 138, 69, 0.28), transparent 10rem),
    radial-gradient(circle at 8% 92%, rgba(188, 218, 190, 0.38), transparent 10rem),
    rgba(255, 248, 231, 0.86);
}

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

.intel-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intel-form select,
.intel-form input,
.intel-form textarea {
  width: 100%;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.intel-form textarea {
  resize: vertical;
}

.intel-form input[type="file"] {
  padding: 0.72rem;
  background: rgba(255, 255, 255, 0.52);
}

.photo-preview {
  display: grid;
  gap: 0.6rem;
  align-items: start;
}

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

.photo-preview img,
.place-photo {
  display: block;
  width: 100%;
  max-height: 17rem;
  object-fit: cover;
  border: 1px solid rgba(19, 37, 31, 0.14);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(16, 34, 29, 0.12);
}

.place-only-field {
  border: 1px solid rgba(255, 138, 69, 0.18);
  border-radius: 1.15rem;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.32);
}

.signal-only-field {
  border: 1px solid rgba(188, 218, 190, 0.3);
  border-radius: 1.15rem;
  padding: 0.65rem;
  background: rgba(188, 218, 190, 0.18);
}

.wide-field {
  grid-column: 1 / -1;
}

.review-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.review-pipeline span {
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 999px;
  padding: 0.65rem 0.75rem;
  background: rgba(19, 37, 31, 0.06);
  color: var(--moss);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.intel-note {
  margin-top: 0.8rem;
  border-top: 1px solid rgba(255, 248, 231, 0.18);
  padding-top: 0.8rem;
}

.profile-panel {
  background: var(--pine);
  color: var(--paper-strong);
}

.profile-panel .muted-label,
.profile-panel .stat-row span {
  color: rgba(255, 248, 231, 0.66);
}

.profile-name,
.profile-hint {
  color: rgba(255, 248, 231, 0.72);
  line-height: 1.45;
}

.profile-hint {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.avatar {
  display: grid;
  width: 4.2rem;
  height: 4.2rem;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 1.35rem;
  color: var(--pine);
  background: var(--gold);
  font-weight: 900;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 248, 231, 0.16);
  padding: 0.85rem 0;
}

.nearby-route-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.85fr) minmax(14rem, 0.45fr) minmax(0, 1.4fr);
  gap: 0.85rem;
  align-items: stretch;
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 1.5rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 92% 12%, rgba(76, 183, 165, 0.2), transparent 8rem),
    rgba(255, 248, 231, 0.74);
  box-shadow: 0 18px 45px rgba(16, 34, 29, 0.08);
}

.nearby-route-copy p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.nearby-route-controls {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.nearby-route-controls label {
  color: var(--moss);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nearby-route-controls select {
  max-width: none;
  width: 100%;
  min-height: 3rem;
  font-size: 1rem;
}

.route-time-select-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.route-duration-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 0.3rem;
  background: rgba(255, 248, 231, 0.72);
}

.route-duration-options button {
  min-height: 2.7rem;
  border: 0;
  border-radius: 0.9rem;
  background: transparent;
  color: var(--moss);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}

.route-duration-options button.active {
  background: var(--forest);
  color: var(--paper);
  box-shadow: 0 10px 24px rgba(16, 34, 29, 0.14);
}

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

.route-suggestion-card {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.5);
}

.route-suggestion-card.selected {
  border-color: rgba(255, 138, 69, 0.48);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 138, 69, 0.16), transparent 8rem),
    rgba(255, 255, 255, 0.64);
  box-shadow: 0 16px 36px rgba(16, 34, 29, 0.1);
}

.route-suggestion-card span,
.route-suggestion-card em {
  display: block;
  color: var(--moss);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-suggestion-card h4 {
  margin: 0.2rem 0;
}

.route-suggestion-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.route-suggestion-card ol {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.32;
}

.route-card-details,
.selected-route-details {
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 0.95rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 248, 231, 0.42);
}

.route-details-toggle {
  width: 100%;
  border: 0;
  padding: 0;
  color: var(--forest);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
}

.route-details-toggle::after {
  content: "+";
  float: right;
}

.route-details-toggle[aria-expanded="true"]::after {
  content: "−";
}

.route-details-content {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.route-details-content[hidden] {
  display: none;
}

.route-card-details article,
.selected-route-details article {
  display: grid;
  gap: 0.18rem;
}

.selected-route-details article {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
}

.selected-route-details article > span {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border-radius: 999px;
  color: var(--paper);
  background: var(--forest);
  font-size: 0.72rem;
  font-weight: 900;
}

.selected-route-details p {
  margin: 0.12rem 0;
}

.route-card-details article span,
.selected-route-details article small,
.selected-route-origin {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.trip-recommendations-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 0.85rem;
}

.trip-recommendations-panel.recommendations-at-page-end {
  margin-top: 1rem;
}

.recommendation-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.recommendation-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  color: var(--moss);
  background: rgba(255, 255, 255, 0.42);
  font-size: 0.8rem;
  font-weight: 900;
}

.recommendation-tab.active {
  border-color: rgba(19, 37, 31, 0.75);
  color: var(--paper);
  background: var(--pine);
}

.recommendation-intro {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.recommendation-pane[hidden] {
  display: none;
}

.recommendation-actions {
  justify-content: flex-start;
  margin-bottom: 0.75rem;
}

.verification-hint {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 1rem;
  padding: 0.8rem 0.9rem;
  background:
    radial-gradient(circle at 94% 10%, rgba(76, 183, 165, 0.18), transparent 7rem),
    rgba(255, 248, 231, 0.52);
}

.verification-hint strong {
  color: var(--pine);
}

.verification-hint p {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
}

.trip-recommendations-panel .nearby-route-panel {
  grid-column: auto;
  grid-template-columns: minmax(0, 0.85fr) minmax(12rem, 0.45fr) minmax(0, 1.25fr);
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.trip-recommendations-panel .route-suggestions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-panel {
  min-height: 38rem;
  padding: 0;
  overflow: hidden;
}

.map-toolbar {
  padding: 1rem;
}

.geo-status {
  margin: -0.35rem 1rem 0.85rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.geo-fallback {
  display: grid;
  gap: 0.55rem;
  margin: -0.35rem 1rem 0.85rem;
  border: 1px solid rgba(255, 138, 69, 0.28);
  border-radius: 1rem;
  padding: 0.75rem;
  background: rgba(255, 138, 69, 0.1);
}

.geo-fallback[hidden] {
  display: none;
}

.geo-fallback p {
  margin: 0;
  color: var(--moss);
  font-size: 0.82rem;
  line-height: 1.35;
}

.api-status {
  display: inline-flex;
  width: fit-content;
  margin: -0.55rem 1rem 0.85rem;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: var(--moss);
  background: rgba(232, 187, 86, 0.2);
  font-size: 0.74rem;
  font-weight: 900;
}

.api-status[data-status="online"] {
  color: #153d30;
  background: rgba(76, 183, 165, 0.22);
}

.api-status[data-status="offline"] {
  color: #6b3a25;
  background: rgba(255, 138, 69, 0.18);
}

select {
  max-width: 12rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  background: var(--paper-strong);
}

.map-canvas {
  position: relative;
  width: 100%;
  height: clamp(25rem, 58vh, 40rem);
  min-height: 31rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 138, 69, 0.28), transparent 7rem),
    radial-gradient(circle at 75% 74%, rgba(76, 183, 165, 0.34), transparent 9rem),
    linear-gradient(135deg, rgba(49, 79, 63, 0.16), rgba(255, 248, 231, 0.6)),
    repeating-linear-gradient(30deg, rgba(19, 37, 31, 0.06) 0 2px, transparent 2px 22px);
}

.map-canvas.real-map {
  z-index: 0;
  background: #dfe7d4;
}

.tile-map {
  isolation: isolate;
  cursor: grab;
  overscroll-behavior: contain;
  touch-action: none;
}

.tile-map:active {
  cursor: grabbing;
}

.tile-map-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: center center;
  will-change: transform;
}

.tile-map-img {
  position: absolute;
  z-index: 1;
  width: 256px;
  height: 256px;
  max-width: none;
  border: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.tile-route-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tile-route-line {
  fill: none;
  stroke: rgba(255, 112, 54, 0.88);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 9;
  filter:
    drop-shadow(0 1px 0 rgba(255, 248, 231, 0.9))
    drop-shadow(0 7px 10px rgba(16, 34, 29, 0.2));
}

.tile-route-stop {
  fill: var(--gold);
  stroke: var(--paper-strong);
  stroke-width: 3;
}

.tile-route-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 5;
  display: grid;
  max-width: min(18rem, calc(100% - 5.5rem));
  gap: 0.18rem;
  border: 1px solid rgba(19, 37, 31, 0.16);
  border-radius: 1rem;
  padding: 0.65rem 0.75rem;
  color: var(--paper);
  background: rgba(16, 34, 29, 0.86);
  box-shadow: 0 12px 30px rgba(16, 34, 29, 0.24);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.tile-route-focus {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  z-index: 5;
  max-width: min(24rem, calc(100% - 1.6rem));
  border: 1px solid rgba(19, 37, 31, 0.18);
  border-radius: 1rem;
  padding: 0.65rem 0.75rem;
  color: var(--pine);
  background: rgba(255, 248, 231, 0.9);
  box-shadow: 0 12px 30px rgba(16, 34, 29, 0.18);
  transform: translateX(-50%);
}

.tile-route-focus strong,
.tile-route-focus span {
  display: block;
}

.tile-route-focus span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.tile-route-badge strong {
  font-size: 0.82rem;
}

.tile-route-badge span,
.tile-route-badge small {
  color: rgba(255, 248, 231, 0.78);
  font-size: 0.68rem;
  line-height: 1.25;
}

.selected-route-panel {
  margin-top: 0.9rem;
}

.selected-route-card {
  display: grid;
  gap: 0.8rem;
  border: 1px solid rgba(19, 37, 31, 0.14);
  border-radius: 1.25rem;
  padding: 0.95rem;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 138, 69, 0.18), transparent 7rem),
    rgba(255, 255, 255, 0.54);
  box-shadow: 0 14px 32px rgba(16, 34, 29, 0.08);
}

.selected-route-card[data-route-status="active"] {
  border-color: rgba(255, 112, 54, 0.42);
}

.selected-route-card[data-route-status="finished"] {
  background:
    radial-gradient(circle at 92% 0%, rgba(76, 183, 165, 0.22), transparent 7rem),
    rgba(255, 255, 255, 0.58);
}

.selected-route-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.selected-route-head h4 {
  margin: 0.16rem 0 0;
  font-size: clamp(1.1rem, 5vw, 1.45rem);
}

.selected-route-head strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  color: var(--paper);
  background: var(--forest);
  font-size: 0.82rem;
}

.selected-route-card p,
.selected-route-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.selected-route-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.selected-route-stats span {
  border-radius: 999px;
  padding: 0.45rem 0.58rem;
  color: var(--forest);
  background: rgba(49, 79, 63, 0.08);
  font-size: 0.78rem;
  font-weight: 850;
}

.selected-route-progress {
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(19, 37, 31, 0.1);
}

.selected-route-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  transition: width 180ms ease;
}

.selected-route-points {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selected-route-points li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 0.9rem;
  padding: 0.45rem;
  background: rgba(255, 248, 231, 0.54);
}

.selected-route-points li.done {
  background: rgba(207, 229, 199, 0.72);
}

.selected-route-points li.next {
  border-color: rgba(255, 112, 54, 0.52);
  box-shadow: 0 0 0 3px rgba(255, 112, 54, 0.08);
}

.selected-route-points span {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border-radius: 999px;
  color: var(--paper);
  background: var(--moss);
  font-size: 0.76rem;
  font-weight: 900;
}

.selected-route-points button {
  min-width: 0;
  border: 0;
  padding: 0.2rem 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.selected-route-points button:focus-visible,
.route-details-toggle:focus-visible,
.recommendation-tab:focus-visible {
  outline: 3px solid rgba(255, 138, 69, 0.42);
  outline-offset: 3px;
}

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

.tile-user-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 8;
  width: 1.05rem;
  height: 1.05rem;
  border: 3px solid var(--paper-strong);
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 0.42rem rgba(232, 187, 86, 0.28),
    0 10px 24px rgba(16, 34, 29, 0.28);
  transform: translate(-50%, -50%);
}

.tile-map-controls {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 12;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(19, 37, 31, 0.14);
  border-radius: 0.9rem;
  background: rgba(255, 248, 231, 0.94);
  box-shadow: 0 10px 26px rgba(16, 34, 29, 0.14);
}

.tile-map-controls button {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tile-map-controls button + button {
  border-top: 1px solid rgba(19, 37, 31, 0.12);
}

.map-info-card {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  left: 0.8rem;
  z-index: 16;
  display: grid;
  gap: 0.25rem;
  max-width: 24rem;
  border: 1px solid rgba(19, 37, 31, 0.14);
  border-radius: 1.2rem;
  padding: 0.9rem 2.7rem 0.9rem 1rem;
  color: var(--ink);
  background: rgba(255, 248, 231, 0.96);
  box-shadow: 0 18px 40px rgba(16, 34, 29, 0.18);
  pointer-events: auto;
}

.map-info-card p,
.map-info-card h4,
.map-info-card span,
.map-info-card em {
  margin: 0;
}

.map-info-card p {
  color: var(--moss);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-info-card h4 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.map-info-card span {
  color: rgba(19, 37, 31, 0.74);
  font-size: 0.9rem;
  line-height: 1.35;
}

.map-info-card em {
  width: fit-content;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  color: var(--pine);
  background: rgba(188, 218, 190, 0.68);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.map-info-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.leaflet-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  touch-action: pan-x pan-y;
}

.map-canvas.leaflet-container {
  height: clamp(25rem, 58vh, 40rem);
  min-height: 31rem;
}

.leaflet-pane,
.leaflet-layer,
.leaflet-tile-container,
.leaflet-tile,
.leaflet-zoom-animated,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer {
  position: absolute;
  top: 0;
  left: 0;
}

.leaflet-pane {
  z-index: 400;
}

.leaflet-map-pane canvas {
  z-index: 100;
}

.leaflet-map-pane svg {
  z-index: 200;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-shadow-pane {
  z-index: 500;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}

.leaflet-container .leaflet-tile {
  width: auto;
  height: auto;
  max-width: none !important;
  max-height: none !important;
  border: 0;
  padding: 0;
  opacity: 1;
  visibility: visible;
  user-select: none;
  -webkit-user-drag: none;
}

.leaflet-container img.leaflet-tile {
  mix-blend-mode: plus-lighter;
}

.leaflet-safari .leaflet-tile-container {
  width: 1600px;
  height: 1600px;
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
}

.leaflet-tile-loaded {
  visibility: visible;
}

.leaflet-zoom-animated {
  transform-origin: 0 0;
}

.leaflet-control-container {
  pointer-events: none;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top {
  top: 0;
}

.leaflet-right {
  right: 0;
}

.leaflet-bottom {
  bottom: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-control {
  position: relative;
  z-index: 800;
  margin: 0.65rem;
  pointer-events: auto;
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(19, 37, 31, 0.18);
  border-radius: 0.75rem;
  background: rgba(255, 248, 231, 0.9);
  box-shadow: 0 8px 24px rgba(16, 34, 29, 0.14);
}

.leaflet-control-zoom a {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.leaflet-control-zoom a + a {
  border-top: 1px solid rgba(19, 37, 31, 0.12);
}

.leaflet-control-attribution {
  border-radius: 999px;
  padding: 0.25rem 0.45rem;
  color: var(--muted);
  background: rgba(255, 248, 231, 0.86);
  font-size: 0.65rem;
}

.leaflet-control-attribution a {
  color: var(--moss);
}

.leaflet-signal-marker {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 3px solid var(--paper-strong);
  border-radius: 50% 50% 50% 0;
  color: var(--paper-strong);
  background: var(--moss);
  box-shadow: 0 8px 20px rgba(16, 34, 29, 0.26);
  transform: rotate(-45deg);
}

.leaflet-signal-marker span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  transform: rotate(45deg);
  font-size: 0.76rem;
  font-weight: 900;
}

.leaflet-signal-marker.event {
  background: var(--ember);
}

.leaflet-signal-marker.safety {
  background: var(--danger);
}

.leaflet-signal-marker.service {
  background: var(--aqua);
}

.leaflet-signal-marker.active {
  outline: 4px solid rgba(232, 187, 86, 0.45);
}

.leaflet-popup-content {
  margin: 0.75rem 0.85rem;
  color: var(--ink);
}

.leaflet-popup-content p {
  margin: 0.35rem 0;
}

.map-pin {
  position: absolute;
  z-index: 6;
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid var(--paper-strong);
  border-radius: 50% 50% 50% 0;
  color: var(--paper-strong);
  background: var(--moss);
  box-shadow: 0 8px 20px rgba(16, 34, 29, 0.26);
  transform: translate(-50%, -50%) rotate(-45deg);
  cursor: pointer;
}

.map-pin span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  transform: rotate(45deg);
  font-size: 0.78rem;
  font-weight: 900;
}

.map-pin.event {
  background: var(--ember);
}

.map-pin.safety {
  background: var(--danger);
}

.map-pin.service {
  background: var(--aqua);
}

.map-pin.active {
  outline: 4px solid rgba(232, 187, 86, 0.45);
}

.map-pin.route-active {
  z-index: 10;
  color: var(--pine);
  background: var(--gold);
  outline: 5px solid rgba(255, 138, 69, 0.42);
  box-shadow:
    0 0 0 0.3rem rgba(255, 248, 231, 0.86),
    0 12px 26px rgba(16, 34, 29, 0.3);
}

.local-map-marker {
  position: absolute;
  z-index: 7;
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border: 3px solid var(--paper-strong);
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 8px 20px rgba(16, 34, 29, 0.22);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.local-map-marker span {
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.local-map-marker.map-point,
.local-map-marker.signal {
  width: 2.15rem;
  height: 2.15rem;
  border-style: dashed;
  border-radius: 50% 50% 50% 0;
  color: var(--paper-strong);
  background: var(--pine);
  transform: translate(-50%, -50%) rotate(-45deg);
}

.local-map-marker.map-point span,
.local-map-marker.signal span {
  transform: rotate(45deg);
}

.local-map-marker.signal {
  background: var(--moss);
}

.moderation-panel {
  grid-column: 1 / -1;
}

.moderation-note,
.empty-moderation {
  color: var(--muted);
  line-height: 1.45;
}

.moderation-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.moderation-card {
  display: grid;
  gap: 0.55rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.1rem;
  padding: 0.95rem;
  background: rgba(255, 248, 231, 0.72);
}

.moderation-card h4,
.moderation-card p {
  margin: 0;
}

.moderation-card small {
  color: var(--muted);
  font-weight: 800;
}

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

.intel-panel {
  min-height: 38rem;
}

.freshness {
  color: var(--moss);
  background: rgba(76, 183, 165, 0.18);
  font-weight: 800;
}

.intel-list {
  display: grid;
  gap: 0.75rem;
}

.intel-card {
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.44);
}

.intel-card[data-place-card] {
  cursor: pointer;
}

.intel-card[data-place-card]:focus-visible {
  outline: 3px solid rgba(232, 187, 86, 0.8);
  outline-offset: 3px;
}

.intel-card.active {
  border-color: rgba(255, 138, 69, 0.42);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 138, 69, 0.16), transparent 12rem),
    rgba(255, 255, 255, 0.58);
}

.intel-card h4 {
  margin: 0 0 0.35rem;
}

.intel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.tag {
  background: rgba(19, 37, 31, 0.08);
}

.place-details {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.9rem;
  border-top: 1px solid rgba(19, 37, 31, 0.12);
  padding-top: 0.9rem;
}

.place-verification {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.place-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.place-facts article,
.place-status-card {
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 0.95rem;
  padding: 0.7rem;
  background: rgba(255, 248, 231, 0.62);
}

.place-facts span,
.place-status-card p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.place-facts strong,
.place-status-card strong {
  display: block;
  margin-top: 0.12rem;
  color: var(--pine);
  font-size: 0.9rem;
  line-height: 1.25;
}

.place-verification-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

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

.place-rating-summary article {
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 0.95rem;
  padding: 0.7rem;
  background: rgba(221, 239, 205, 0.48);
}

.place-rating-summary span,
.place-rating-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.place-rating-summary strong {
  display: block;
  margin: 0.15rem 0;
  color: var(--pine);
  font-size: 1.15rem;
}

.place-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.place-review-prompt {
  display: grid;
  gap: 0.65rem;
  border: 1px solid rgba(255, 138, 69, 0.36);
  border-radius: 1rem;
  padding: 0.8rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 138, 69, 0.14), transparent 8rem),
    rgba(255, 248, 231, 0.78);
}

.place-review-prompt strong {
  color: var(--pine);
}

.place-review-prompt p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.place-review-prompt label {
  display: grid;
  gap: 0.35rem;
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.place-review-prompt textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  resize: vertical;
  text-transform: none;
}

.review-quick-notes,
.place-review-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.review-quick-notes button {
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 999px;
  padding: 0.42rem 0.62rem;
  color: var(--moss);
  background: rgba(19, 37, 31, 0.07);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

.place-comments {
  display: grid;
  gap: 0.55rem;
}

.place-comments h5 {
  margin: 0.2rem 0 0;
  color: var(--pine);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.place-comment {
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 0.9rem;
  padding: 0.7rem;
  background: rgba(255, 248, 231, 0.58);
}

.place-comment div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.place-comment strong {
  color: var(--pine);
}

.place-comment span {
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  color: var(--moss);
  background: rgba(19, 37, 31, 0.08);
  font-size: 0.74rem;
  font-weight: 900;
}

.place-comment p {
  margin: 0;
}

.place-comment-photo {
  display: block;
  width: 100%;
  max-height: 13rem;
  object-fit: cover;
  border: 1px solid rgba(19, 37, 31, 0.1);
  border-radius: 0.85rem;
}

.place-comment .place-comment-ratings {
  gap: 0.35rem;
}

.place-comment-form {
  display: grid;
  gap: 0.65rem;
}

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

.place-comment-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.place-comment-form textarea,
.place-comment-form select,
.place-comment-form input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  text-transform: none;
}

.place-comment-form textarea {
  resize: vertical;
}

.place-comment-photo-preview {
  margin-top: -0.2rem;
}

.place-route-link {
  text-decoration: none;
  text-align: center;
}

.place-review-status,
.place-comment-status {
  min-height: 1.1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.place-review-status[data-status="success"],
.place-comment-status[data-status="success"] {
  border-radius: 0.85rem;
  padding: 0.55rem 0.65rem;
  background: rgba(76, 183, 165, 0.16);
}

.place-review-status[data-status="pending"],
.place-comment-status[data-status="pending"] {
  color: var(--moss);
}

.place-review-status[data-status="success"],
.place-comment-status[data-status="success"] {
  color: var(--pine);
}

.place-review-status[data-status="error"],
.place-comment-status[data-status="error"] {
  color: #a24b2a;
}

.place-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(8, 20, 17, 0.08), rgba(8, 20, 17, 0.68)),
    rgba(8, 20, 17, 0.18);
  backdrop-filter: blur(5px);
}

.place-modal-backdrop[hidden] {
  display: none;
}

.place-modal-sheet {
  position: relative;
  width: min(100%, 42rem);
  max-height: min(78dvh, 44rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 1.5rem 1.5rem 1rem 1rem;
  background:
    radial-gradient(circle at 88% 4%, rgba(255, 138, 69, 0.18), transparent 10rem),
    linear-gradient(160deg, rgba(255, 248, 231, 0.98), rgba(232, 238, 213, 0.96));
  box-shadow: 0 -1.4rem 4rem rgba(8, 20, 17, 0.28);
}

.place-modal-sheet::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 50%;
  width: 3.5rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(19, 37, 31, 0.18);
  transform: translateX(-50%);
}

.place-modal-close {
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
}

.place-modal-body {
  display: grid;
  gap: 0.8rem;
  max-height: inherit;
  overflow: auto;
  padding: 2rem 1rem 1rem;
  -webkit-overflow-scrolling: touch;
}

.place-modal-head {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  justify-content: space-between;
  padding-right: 2.1rem;
}

.place-modal-head h2 {
  margin: 0.15rem 0 0;
  color: var(--pine);
  font-family: var(--display-font);
  font-size: clamp(1.75rem, 8vw, 2.6rem);
  line-height: 0.95;
}

.place-modal-body > p {
  margin: 0;
}

.place-modal-body .place-details {
  margin-top: 0.1rem;
}

.place-modal-open .bottom-app-nav {
  transform: translateY(120%);
  pointer-events: none;
}

@media (max-width: 640px) {
  .place-facts,
  .place-rating-summary,
  .place-rating-form-grid {
    grid-template-columns: 1fr;
  }
}

.quest-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quest-progress {
  height: 0.7rem;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(19, 37, 31, 0.1);
}

.quest-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ember), var(--gold));
}

.rules-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rule-card {
  position: relative;
  min-height: 17rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(232, 187, 86, 0.3), transparent 7rem),
    rgba(255, 248, 231, 0.72);
}

.rule-card::after {
  position: absolute;
  right: -1.8rem;
  bottom: -1.8rem;
  width: 7rem;
  height: 7rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 50%;
  content: "";
}

.rule-card span {
  display: inline-flex;
  margin-bottom: 3rem;
  color: var(--ember);
  font-weight: 900;
}

.logo-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.logo-card {
  background: rgba(255, 248, 231, 0.72);
}

.logo-card.selected {
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 138, 69, 0.7), transparent 8rem),
    var(--pine);
}

.logo-card.selected p {
  color: rgba(255, 248, 231, 0.74);
}

.logo-symbol {
  display: grid;
  width: 7rem;
  height: 7rem;
  margin-bottom: 1.2rem;
  place-items: center;
  border-radius: 2rem;
  color: var(--paper-strong);
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 900;
}

.route-symbol {
  background:
    radial-gradient(circle at 70% 30%, transparent 0 1.1rem, var(--ember) 1.15rem 1.45rem, transparent 1.5rem),
    linear-gradient(150deg, var(--pine), #294738);
}

.route-symbol::after {
  width: 4.6rem;
  height: 1rem;
  margin-top: -1.2rem;
  border-bottom: 0.28rem solid var(--aqua);
  border-radius: 50%;
  content: "";
}

.compass-symbol {
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 43%, rgba(255, 248, 231, 0.3) 44% 56%, transparent 57%),
    var(--moss);
}

.terrain-symbol {
  background:
    repeating-linear-gradient(160deg, rgba(255, 248, 231, 0.16) 0 5px, transparent 5px 12px),
    var(--ember);
}

.account-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 1rem;
}

.account-card {
  background: rgba(19, 37, 31, 0.9);
  color: var(--paper-strong);
}

.account-card .muted-label {
  color: rgba(255, 248, 231, 0.68);
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.account-stats div {
  border: 1px solid rgba(255, 248, 231, 0.14);
  border-radius: 1rem;
  padding: 0.85rem;
  background: rgba(255, 248, 231, 0.08);
}

.account-stats .empty-journal {
  grid-column: 1 / -1;
  border-style: dashed;
  padding: 1rem;
}

.empty-journal strong,
.empty-journal span {
  display: block;
}

.empty-journal span {
  margin-top: 0.35rem;
  color: rgba(255, 248, 231, 0.68);
  line-height: 1.45;
}

.account-stats span,
.account-stats strong {
  display: block;
}

.account-stats span {
  color: rgba(255, 248, 231, 0.66);
  font-size: 0.78rem;
}

.account-stats strong {
  margin-top: 0.25rem;
  font-size: 1.35rem;
}

.badge-list {
  display: grid;
  gap: 0.7rem;
}

.badge-item {
  border: 1px solid var(--line);
  border-radius: 999px 999px 1.2rem 1.2rem;
  padding: 0.8rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 187, 86, 0.24), transparent 4rem),
    rgba(255, 255, 255, 0.32);
}

.badge-item strong,
.badge-item span {
  display: block;
}

.badge-item span {
  margin: 0.2rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.badge-item.unlocked {
  border-color: rgba(232, 187, 86, 0.6);
  background: rgba(232, 187, 86, 0.18);
}

.badge-item.unlocked span {
  color: var(--moss);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  overflow-y: auto;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(19, 37, 31, 0.58);
  backdrop-filter: blur(10px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-backdrop[hidden] {
  display: none;
}

.auth-modal {
  position: relative;
  width: min(38rem, 100%);
  max-height: min(92dvh, 54rem);
  overflow: auto;
  border: 1px solid rgba(255, 248, 231, 0.42);
  border-radius: 1.7rem;
  padding: clamp(1.2rem, 4vw, 2rem);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 138, 69, 0.2), transparent 15rem),
    var(--paper-strong);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

body.auth-modal-open {
  overflow: hidden;
}

.auth-modal h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 6vw, 3.2rem);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.auth-form.compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--moss);
  font-size: 0.86rem;
  font-weight: 800;
}

.auth-form input,
.auth-form select {
  width: 100%;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.76);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.4rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  flex: 1;
  height: 1px;
  content: "";
  background: var(--line);
}

.full-button {
  display: inline-flex;
  justify-content: center;
  cursor: pointer;
}

.form-message {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  color: var(--danger);
  font-weight: 800;
}

.quick-login-card {
  display: grid;
  gap: 0.45rem;
  border: 1px solid rgba(19, 37, 31, 0.12);
  border-radius: 1.15rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 90% 0%, rgba(76, 183, 165, 0.22), transparent 7rem),
    rgba(255, 248, 231, 0.76);
}

.quick-login-card[hidden] {
  display: none;
}

.quick-login-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-login-card strong {
  font-size: 1.05rem;
}

.export-button {
  width: 100%;
  margin-top: 0.7rem;
  cursor: pointer;
}

.mobile-tabbar {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 12;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  border: 1px solid rgba(255, 248, 231, 0.22);
  border-radius: 1.35rem;
  padding: 0.35rem;
  background: rgba(19, 37, 31, 0.92);
  box-shadow: 0 20px 50px rgba(16, 34, 29, 0.32);
  backdrop-filter: blur(16px);
}

.mobile-tabbar a {
  display: grid;
  gap: 0.18rem;
  justify-items: center;
  border-radius: 1rem;
  padding: 0.55rem 0.35rem;
  color: rgba(255, 248, 231, 0.76);
  text-decoration: none;
}

.mobile-tabbar a:nth-child(3) {
  color: var(--paper-strong);
  background: rgba(255, 138, 69, 0.18);
}

.mobile-tabbar span {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-tabbar strong {
  font-size: 0.78rem;
}

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

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .hero-grid,
  .prototype-grid,
  .value-grid,
  .mode-grid,
  .app-preview-grid,
  .app-home-grid,
  .quest-board,
  .account-grid,
  .contribution-flow,
  .rules-grid,
  .logo-options,
  .onboarding-grid,
  .utility-grid,
  .earn-grid,
  .form-grid,
  .quest-explainer,
  .lore-section,
  .journey-rail {
    grid-template-columns: 1fr;
  }

  .device-card {
    transform: none;
  }

  .prototype-grid {
    align-items: start;
  }

  .cockpit-card {
    grid-template-columns: 1fr;
  }

  .app-mode-tabs {
    grid-template-columns: 1fr;
  }

  .intel-panel {
    min-height: auto;
  }

  .map-canvas {
    height: clamp(24rem, 58vh, 34rem);
    min-height: 24rem;
  }

  .map-canvas.leaflet-container {
    height: clamp(24rem, 58vh, 34rem);
    min-height: 24rem;
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: 1.5rem;
  }

  body.is-authenticated {
    padding-bottom: 6rem;
  }

  .modal-backdrop {
    align-items: start;
    place-items: start center;
    padding: max(0.5rem, env(safe-area-inset-top)) 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  }

  .auth-modal {
    width: 100%;
    max-height: calc(100dvh - max(1rem, env(safe-area-inset-top)) - env(safe-area-inset-bottom));
    border-radius: 1.2rem;
    padding: 1rem;
  }

  .auth-modal h2 {
    padding-right: 2.4rem;
    font-size: clamp(1.65rem, 9vw, 2.4rem);
    letter-spacing: -0.055em;
  }

  .auth-form {
    gap: 0.7rem;
  }

  .auth-form input,
  .auth-form select {
    min-height: 3rem;
    border-radius: 0.9rem;
    font-size: 1rem;
  }

  .mobile-tabbar {
    display: none;
  }

  .app-nav {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .nav-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-actions a.ghost-link {
    display: none;
  }

  .nav-actions .ghost-link {
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
  }

  .hero {
    padding: 0.75rem;
  }

  .topbar,
  .hero-grid,
  .section {
    width: min(100% - 1rem, 1180px);
  }

  .hero-grid {
    min-height: auto;
    padding: 1.1rem 0 1.6rem;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(2.25rem, 12vw, 3.4rem);
    letter-spacing: -0.075em;
  }

  h2 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .lead {
    font-size: 1rem;
    line-height: 1.45;
  }

  .hero-copy > .eyebrow {
    max-width: 9ch;
    font-size: clamp(2.45rem, 14vw, 4rem);
  }

  .hero-start-panel {
    margin-top: 1rem;
    border-radius: 1.25rem;
    padding: 0.8rem;
  }

  .hero-start-copy #mode-title {
    font-size: 0.95rem;
  }

  .hero-flow,
  .reward-note {
    grid-template-columns: 1fr;
  }

  .hero-flow article {
    display: grid;
    min-height: auto;
    grid-template-columns: auto 1fr;
    gap: 0 0.65rem;
    padding: 0.7rem;
  }

  .hero-flow span {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .hero-flow p,
  .reward-note span {
    font-size: 0.8rem;
  }

  .hero-cta-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-proof {
    gap: 0.4rem;
  }

  .hero-proof span {
    padding: 0.45rem 0.58rem;
    font-size: 0.78rem;
  }

  .device-card {
    display: none;
  }

  .device-status {
    margin-bottom: 3.4rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .mission-brief,
  .lore-section,
  .journey-section,
  .onboarding-section,
  .utility-section,
  .earn-section,
  .first-quest-section,
  .app-preview-section,
  .profile-reason-section {
    display: none;
  }

  .mode-section {
    padding-top: 1.2rem;
  }

  .hero-mode-section .section-heading {
    display: none;
  }

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

  .compact-heading h2 {
    max-width: 10ch;
  }

  .mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .mode-card {
    min-height: 6.4rem;
    gap: 0.35rem;
    border-radius: 1rem;
    padding: 0.65rem 0.55rem;
  }

  .mode-card::after,
  .mode-card p,
  .mode-link {
    display: none;
  }

  .mode-card-head {
    gap: 0.25rem;
    align-items: flex-start;
    flex-direction: column;
    font-size: 0.62rem;
  }

  .mode-card h3 {
    font-size: 0.92rem;
    letter-spacing: -0.02em;
  }

  .mode-reward {
    display: block;
    margin-top: auto;
    border: 0;
    padding-top: 0;
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .mode-reward-full {
    display: none;
  }

  .mode-reward-short {
    display: inline;
  }

  .mode-decision {
    margin-top: 0.55rem;
    padding: 0.7rem 0.8rem;
  }

  .mode-decision span {
    font-size: 0.84rem;
  }

  .mode-auth-action {
    width: 100%;
    margin-top: 0.65rem;
  }

  .journey-rail article,
  .onboarding-card,
  .earn-card {
    min-height: auto;
  }

  .journey-rail span,
  .onboarding-card span,
  .earn-value {
    margin-bottom: 1.4rem;
  }

  .map-panel,
  .intel-panel,
  .trip-recommendations-panel {
    min-height: auto;
  }

  .app-home-grid {
    gap: 0.7rem;
    margin-bottom: 0.75rem;
  }

  .prototype {
    padding-top: 1.2rem;
  }

  .prototype .section-heading {
    display: none;
  }

  .cockpit-card {
    border-radius: 1.25rem;
    padding: 1rem;
  }

  .journey-hub,
  .journey-cards,
  .map-journey-form,
  .rewards-menu,
  .selected-route-actions,
  .nearby-route-panel,
  .trip-recommendations-panel .nearby-route-panel,
  .trip-recommendations-panel .route-suggestions,
  .route-suggestions {
    grid-template-columns: 1fr;
  }

  .trip-recommendations-panel .panel-header {
    align-items: flex-start;
  }

  .recommendation-tabs {
    width: 100%;
    justify-content: flex-start;
  }

  .recommendation-tab {
    flex: 1 1 auto;
    min-width: 6.2rem;
  }

  .map-journey-form .primary-action,
  .nearby-route-controls .primary-action {
    width: 100%;
  }

  .journey-card,
  .journey-empty-card,
  .nearby-route-panel,
  .rewards-menu div,
  .guild-chat {
    padding: 0.75rem;
  }

  .newbie-plan {
    grid-template-columns: 1fr;
  }

  .newbie-plan article {
    padding: 0.55rem;
  }

  .cockpit-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ride-journey-meta {
    grid-template-columns: 1fr;
  }

  .cockpit-stats div {
    padding: 0.65rem;
  }

  .cockpit-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cockpit-actions .primary-action,
  .cockpit-actions .secondary-action {
    width: 100%;
  }

  .app-status-card {
    min-height: auto;
    border-radius: 1.25rem;
    padding: 1rem;
  }

  .app-status-card h3 {
    font-size: 1.45rem;
  }

  .app-token-pill {
    min-width: 5.4rem;
    padding: 0.65rem;
  }

  .app-token-pill strong {
    font-size: 1.45rem;
  }

  .quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .quick-action {
    border-radius: 0.9rem;
    padding: 0.65rem 0.45rem;
    font-size: 0.78rem;
  }

  .app-mode-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .ride-progress-card {
    border-radius: 1.25rem;
    padding: 1rem;
  }

  .ride-meter {
    padding: 0.75rem;
  }

  .app-mode-tab {
    border-radius: 0.9rem;
    padding: 0.6rem 0.55rem;
  }

  .app-mode-tab strong {
    font-size: 0.78rem;
  }

  .app-mode-tab span {
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .tile-route-badge {
    top: auto;
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    max-width: none;
    padding: 0.55rem 0.65rem;
  }

  .tile-route-badge small {
    display: none;
  }

  .prototype .section-heading h2,
  .account-section .section-heading h2 {
    font-size: clamp(2.05rem, 11vw, 3.1rem);
  }

  .profile-panel .stat-row {
    padding: 0.62rem 0;
  }

  .empty-journal {
    grid-column: 1 / -1;
  }

  .map-canvas {
    height: min(58vh, 28rem);
    min-height: 18rem;
    max-height: calc(100dvh - 18rem);
  }

  .map-canvas.leaflet-container {
    height: min(58vh, 28rem);
    min-height: 18rem;
    max-height: calc(100dvh - 18rem);
  }

  .contribution-flow {
    margin-top: 0.75rem;
  }

  .map-toolbar,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-controls {
    width: 100%;
    justify-content: stretch;
  }

  .map-controls .secondary-action {
    flex: 1;
  }

  select {
    width: 100%;
    max-width: none;
  }

  .auth-form.compact {
    grid-template-columns: 1fr;
  }

  .mission-brief ol {
    grid-template-columns: 1fr;
  }

  .economy-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-pipeline {
    grid-template-columns: 1fr;
  }
}
