:root {
  color-scheme: light;
  --ink: #20242a;
  --muted: #68707c;
  --line: #d9dee5;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --green: #2f7d5b;
  --blue: #376bb3;
  --gold: #b86f25;
  --rose: #a94861;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

.app-top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  color: white;
  background:
    linear-gradient(rgba(32, 36, 42, 0.2), rgba(32, 36, 42, 0.82)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=900&q=80");
  background-position: center;
  background-size: cover;
}

.app-top-nav strong,
.topbar h2,
.section-heading h3,
.quest-card h4,
.empty-state h4,
.step-row h4,
.timeline h4 {
  margin: 0;
  letter-spacing: 0;
}

.app-top-nav strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.app-shell {
  min-height: calc(100vh - 86px);
}

.eyebrow {
  margin: 0 0 8px;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.74;
}

.nav-list {
  display: flex;
  gap: 10px;
}

.nav-link {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  color: white;
  text-decoration: none;
}

.nav-link span {
  font-weight: 900;
}

.nav-link small {
  font-size: 12px;
  opacity: 0.78;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.18);
}

.workspace {
  padding: 28px;
}

.screen {
  display: none;
}

.screen.active {
  display: grid;
  gap: 20px;
  align-content: start;
}

.creator-app .topbar h2,
.explorer-app .topbar h2,
.adventurer-app .topbar h2 {
  max-width: 11ch;
}

.topbar,
.section-heading,
.quest-meta,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.button-row {
  justify-content: end;
}

.topbar h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.maker-panel,
.quest-form,
.step-builder,
.quest-list,
.adventure-panel {
  display: grid;
  gap: 16px;
}

.template-mode-heading {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #f4faf6;
}

.template-mode-heading h4 {
  margin: 0;
}

.template-editor-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #cfe0d5;
  border-radius: 8px;
  background: #fbfffc;
}

.advanced-engine-controls {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed #9aa3ad;
  border-radius: 8px;
  background: #f6f7f8;
}

.advanced-engine-controls summary {
  cursor: pointer;
  font-weight: 900;
  color: #4f5965;
}

.advanced-engine-controls[open] {
  display: grid;
}

.advanced-engine-controls[open] > * + * {
  margin-top: 12px;
}

.discovery-panel {
  display: grid;
  gap: 18px;
}

.home-panel,
.account-panel {
  display: grid;
  gap: 18px;
}

.account-cloud-message,
.account-local-assurance {
  border: 1px solid rgba(83, 105, 76, 0.28);
  border-radius: 16px;
  background: rgba(250, 246, 226, 0.82);
  padding: 14px 16px;
  line-height: 1.45;
}

.account-local-assurance {
  display: grid;
  gap: 4px;
}

.account-auth-view,
.account-auth-form {
  display: grid;
  gap: 12px;
}

.account-auth-view[hidden],
.account-auth-form[hidden] {
  display: none;
}

.account-auth-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.account-auth-row input {
  flex: 1 1 260px;
  min-width: 0;
  border: 1px solid rgba(57, 69, 59, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
}

.cloud-status-local {
  background: #fff2b8;
  color: #5d4a00;
}

.cloud-status-backed-up {
  background: #d9f4dd;
  color: #1f5b2a;
}

.account-development-setup {
  border-top: 1px solid rgba(57, 69, 59, 0.18);
  padding-top: 14px;
}

.account-development-setup summary {
  cursor: pointer;
  font-weight: 800;
}

.text-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 4px 0;
  text-decoration: underline;
}

@media (max-width: 560px) {
  .account-auth-row > button {
    width: 100%;
  }
}

.home-panel h3 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.05;
}

.home-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.home-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.adventure-theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  padding-bottom: 0;
}

.adventure-theme-options .category-tab {
  width: 100%;
  min-height: 44px;
  white-space: normal;
}

.category-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ink);
  background: #f6f8f8;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.category-tab.active {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.map-layout {
  display: contents;
}

.list-card {
  order: 2;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.map-card {
  order: -2;
}

.explorer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.near-me-status {
  margin: 0;
  padding: 11px 13px;
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  color: var(--green);
  background: rgba(244, 234, 207, 0.7);
  font-weight: 750;
  line-height: 1.4;
}

.near-me-status[hidden] {
  display: none;
}

.near-me-status[data-status="success"] {
  border-left-color: var(--green);
  background: rgba(220, 232, 211, 0.72);
}

.near-me-status[data-status="error"] {
  border-left-color: var(--rust);
  color: #6d3428;
  background: rgba(244, 222, 209, 0.78);
}

.filter-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.filter-panel[hidden] {
  display: none !important;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.filter-actions {
  justify-content: flex-start;
}

.filters-active {
  background: var(--green);
}

.map-card,
.list-card {
  display: grid;
  gap: 14px;
}

.map-canvas {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.38) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.38) 1px, transparent 1px),
    radial-gradient(circle at 28% 42%, rgba(55, 107, 179, 0.28), transparent 18%),
    radial-gradient(circle at 60% 28%, rgba(47, 125, 91, 0.24), transparent 19%),
    radial-gradient(circle at 50% 60%, rgba(184, 111, 37, 0.22), transparent 16%),
    #e8efe7;
  background-size:
    44px 44px,
    44px 44px,
    auto,
    auto,
    auto,
    auto;
}

.map-canvas::before,
.map-canvas::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.map-canvas::before {
  inset: 19% 16% auto auto;
  width: 48%;
  height: 16%;
  border: 14px solid rgba(55, 107, 179, 0.2);
  transform: rotate(-16deg);
}

.map-canvas::after {
  left: 8%;
  bottom: 14%;
  width: 64%;
  height: 18%;
  border: 12px solid rgba(47, 125, 91, 0.18);
  transform: rotate(9deg);
}

.fallback-explorer-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(55, 107, 179, 0.1), rgba(47, 125, 91, 0.18));
}

.fallback-explorer-map::before {
  content: "USA";
  position: absolute;
  inset: 15% 10% 13%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(55, 107, 179, 0.22);
  border-radius: 42% 38% 46% 36%;
  color: rgba(55, 107, 179, 0.12);
  background: rgba(255, 255, 255, 0.48);
  font-size: clamp(70px, 15vw, 180px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.fallback-map-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(32, 36, 42, 0.1);
}

.fallback-map-label span {
  color: var(--muted);
  font-size: 12px;
}

.fallback-map-pin {
  z-index: 4;
  padding: 0;
}

.fallback-map-empty {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.map-label {
  position: absolute;
  z-index: 1;
  color: rgba(32, 36, 42, 0.48);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-label.top {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.map-label.bottom {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.map-label.left {
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
}

.map-label.right {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.map-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid white;
  border-radius: 50% 50% 50% 4px;
  background: #9b563d;
  box-shadow: 0 10px 18px rgba(32, 36, 42, 0.24);
  transform: translate(-50%, -100%) rotate(-45deg);
  cursor: pointer;
}

.map-pin span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.map-pin.active {
  width: 38px;
  height: 38px;
  background: var(--blue);
}

.pin-preview {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.pin-preview h4 {
  margin: 0;
  font-size: 22px;
}

.pin-preview p {
  margin: 0;
  color: var(--muted);
}

.adventure-list {
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.adventure-card.selected {
  border-color: var(--blue);
  box-shadow: inset 4px 0 0 var(--blue);
}

.card-actions {
  justify-content: start;
  flex-wrap: wrap;
}

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

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: white;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--green);
}

.secondary-button {
  background: var(--blue);
}

.danger-button {
  background: #8f2f3f;
  color: #fff;
}

.icon-button {
  background: var(--rose);
}

.status-pill,
.quest-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  background: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.live {
  background: var(--green);
}

.status-pill.active-run {
  background: var(--blue);
}

.steps,
.timeline {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.step-row,
.timeline li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.step-fields {
  display: grid;
  gap: 12px;
}

.completion-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e4d4bc;
  border-radius: 8px;
  background: #fffaf2;
}

.adventure-card-editor {
  background: #f6f9fb;
  border-color: #cbd8e3;
}

.adventure-card-list,
.creator-card-row {
  display: grid;
  gap: 12px;
}

.creator-card-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.creator-image-preview {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.sticker-builder {
  background: #fffaf2;
  border-color: #ead8bd;
}

.sticker-builder-list {
  display: grid;
  gap: 10px;
}

.sticker-builder-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bottom-builder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.bottom-builder-actions .primary-button {
  min-width: min(100%, 240px);
}

.builder-publish-bar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #b9d5c6;
  border-radius: 10px;
  background: rgba(244, 250, 246, 0.96);
  box-shadow: 0 10px 28px rgba(32, 36, 42, 0.14);
  backdrop-filter: blur(10px);
}

.builder-publish-bar p {
  margin: 3px 0 0;
}

.start-card-details-heading {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.map-pin-builder {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #c9d9e8;
  border-radius: 8px;
  background: #f4f8fc;
}

.map-pin-builder h4,
.map-pin-builder p {
  margin: 0;
}

.map-pin-coordinate-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-pin-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.creator-library-list {
  gap: 8px;
}

.creator-adventure-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(200px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.creator-adventure-row.is-editing {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
  background: #f6fbf8;
}

.creator-adventure-summary {
  min-width: 0;
}

.creator-adventure-summary .eyebrow {
  margin-bottom: 3px;
}

.creator-adventure-summary h4 {
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-adventure-summary > p:last-child {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-adventure-meta {
  gap: 6px;
}

.creator-adventure-meta span {
  padding: 4px 8px;
  font-size: 11px;
}

.creator-adventure-actions {
  gap: 6px;
}

.creator-adventure-actions button {
  min-height: 36px;
  padding: 0 11px;
  font-size: 12px;
}

.quiet-button {
  color: var(--blue);
  background: #eaf0f8;
}

.step-number {
  display: grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  background: var(--rose);
  font-size: 13px;
  font-weight: 900;
}

.timeline h4 {
  margin-bottom: 4px;
  font-size: 15px;
}

.step-summary {
  margin: 4px 0 8px !important;
  color: var(--ink) !important;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.4;
}

.mystery-step-summary-field {
  padding: 12px;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: #fff8ed;
}

.timeline p,
.quest-card p,
.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.completion-result {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: #fffaf2;
}

.current-objective {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
  background: #eef4fb;
}

.current-objective p {
  margin: 0;
}

.objective-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.objective-prompt {
  flex-basis: 100%;
  font-weight: 800;
}

.objective-actions input {
  min-height: 44px;
  min-width: min(100%, 220px);
}

.photo-capture {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: min(100%, 260px);
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #2e855f;
  border-radius: 8px;
  background: #2e855f;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.photo-capture input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice-list {
  display: grid;
  flex-basis: 100%;
  gap: 8px;
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.choice-option input {
  min-height: auto;
  min-width: auto;
}

.scavenger-actions {
  display: grid;
  gap: 14px;
}

.scavenger-section,
.scavenger-photo-panel {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid #cfe0d5;
  border-radius: 8px;
  background: #fbfffc;
}

.bonus-finds {
  border-color: #ead8bd;
  background: #fffaf2;
}

.scavenger-list {
  display: grid;
  gap: 8px;
}

.scavenger-check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.scavenger-check-row input {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: var(--green);
}

.scavenger-check-row.checked {
  border-color: #9bc7ad;
  background: #edf7f1;
}

.scavenger-check-row.checked span {
  text-decoration: line-through;
  color: var(--muted);
}

.journal-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.journal-photo-grid figure {
  margin: 0;
}

.journal-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.journal-photo-grid figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.photo-preview {
  flex-basis: 100%;
  width: min(100%, 320px);
  max-height: 220px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.completion-result strong {
  color: var(--ink);
}

.completed-summary {
  border-left-color: var(--green);
  background: #f1f8f4;
}

.test-mode .current-objective,
.test-mode .completion-result,
.test-mode .gps-panel {
  border-color: #9b6bd3;
  background: #f6f0ff;
}

.test-mode .completion-result {
  border-left-color: #7d4bc2;
}

.test-mode .objective-tag,
.test-mode .active-run {
  border-color: #7d4bc2;
  background: #efe4ff;
  color: #43236f;
}

.trail-guide-theme .adventure-intro-card,
.trail-guide-theme .timeline li,
.trail-guide-theme .current-objective,
.trail-guide-theme .collected-items-panel,
.trail-guide-card {
  border-color: #8a6a36;
  background:
    linear-gradient(rgba(242, 255, 239, 0.34), rgba(244, 255, 238, 0.48)),
    url("./theme-packs/trail-guide-v001/backgrounds/trail-guide-square.png");
  background-size: cover;
  background-position: center;
}

.trail-guide-theme .step-number,
.trail-guide-theme .objective-tag,
.trail-guide-card .primary-button {
  background: #2f7d5b;
  color: #fffaf0;
}

.trail-guide-theme .current-objective {
  border-left-color: #2f7d5b;
}

.trail-guide-theme .completion-result,
.trail-guide-theme .completed-summary {
  border-left-color: #b99145;
  background:
    linear-gradient(rgba(255, 250, 234, 0.74), rgba(255, 250, 234, 0.82)),
    url("./theme-packs/trail-guide-v001/backgrounds/trail-guide-square.png");
  background-size: cover;
  background-position: center;
}

.trail-guide-card {
  box-shadow: 0 22px 60px rgba(64, 47, 23, 0.24);
}

.trail-guide-card::before {
  content: "";
  display: none;
}

.asset-picker-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d7e4d8;
  border-radius: 8px;
  background: #f2f8f3;
}

.intro-meta {
  margin: 12px 0;
}

.locked-objective {
  opacity: 0.72;
}

.objective-tag {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quest-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.quest-card h4 {
  font-size: 24px;
}

.quest-meta {
  justify-content: start;
  flex-wrap: wrap;
}

.quest-meta span {
  background: #eef2f6;
  color: var(--ink);
}

.timeline {
  list-style: none;
}

.adventure-intro-card {
  border-color: #c7d7df;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8f9 100%);
}

.adventure-intro-card h4 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
}

.intro-card-body {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.intro-welcome {
  color: rgba(255, 255, 255, 0.56);
  font-size: clamp(32px, 7vw, 66px);
  font-weight: 900;
  line-height: 0.95;
  text-shadow: 0 1px 0 rgba(47, 125, 91, 0.32);
}

.intro-copy {
  max-width: 680px;
  color: var(--ink) !important;
  font-size: clamp(22px, 4vw, 36px);
  line-height: 1.3;
}

.intro-ready {
  color: var(--ink) !important;
  font-size: clamp(20px, 3vw, 30px);
}

.intro-summary {
  margin: 16px 0;
}

.intro-planning-details {
  width: min(100%, 760px);
  padding: 16px;
  border: 1px solid #cddce3;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  text-align: left;
}

.intro-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.intro-filter-grid div {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #eef3f5;
}

.intro-filter-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.intro-filter-grid strong {
  font-size: 14px;
}

.accessibility-detail {
  margin: 12px 0 0;
  color: var(--ink) !important;
}

.builder-note {
  width: min(100%, 760px);
  padding: 16px 18px;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: #fff7e9;
  color: var(--ink);
  text-align: left;
}

.builder-note p:last-child {
  margin: 0;
  white-space: pre-wrap;
}

.adventure-intro-card .intro-summary {
  width: min(100%, 680px);
  text-align: left;
}

.intro-start-button {
  min-width: min(100%, 360px);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #d99bb4 0%, #bd718e 52%, #8d4d63 100%);
  box-shadow:
    inset 0 4px 12px rgba(255, 255, 255, 0.38),
    inset 0 -5px 10px rgba(60, 20, 34, 0.34),
    0 8px 18px rgba(58, 35, 43, 0.24);
  color: #070707;
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 900;
  text-transform: uppercase;
}

.timeline li:has(.current-objective) {
  border-color: #b8cbe7;
  box-shadow: 0 12px 30px rgba(55, 107, 179, 0.08);
}

.reward-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(32, 36, 42, 0.58);
}

.reward-card {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid #ead8bd;
  border-radius: 8px;
  background: #fffaf2;
  box-shadow: 0 24px 70px rgba(32, 36, 42, 0.3);
}

.reward-card.has-theme-background {
  background:
    linear-gradient(rgba(255, 250, 242, 0.86), rgba(255, 250, 242, 0.92)),
    var(--card-bg-image) center / cover no-repeat,
    #fffaf2;
}

.reward-card.has-theme-shell {
  border-width: 2px;
  background:
    linear-gradient(rgba(255, 250, 242, 0.78), rgba(255, 250, 242, 0.92)),
    var(--card-shell-image) center / cover no-repeat,
    #fffaf2;
}

.reward-card.has-theme-shell.has-theme-background {
  background:
    linear-gradient(rgba(255, 250, 242, 0.7), rgba(255, 250, 242, 0.9)),
    var(--card-shell-image) center / cover no-repeat,
    var(--card-bg-image) center / cover no-repeat,
    #fffaf2;
}

.reward-card-theme-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.reward-card-decoration {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 82px;
  max-width: 22%;
  opacity: 0.9;
  pointer-events: none;
}

.reward-card h3 {
  margin: 0;
  font-size: clamp(28px, 6vw, 46px);
  line-height: 1.05;
}

.reward-card-section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-left: 5px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: #fff;
}

.reward-card-section p {
  margin: 0;
  line-height: 1.5;
}

.reward-image-note {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fcfcfb;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.reward-card-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.decorated-image-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.decorated-image-frame .reward-card-image {
  display: block;
}

.creator-sticker {
  position: absolute;
  z-index: 2;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 5px 8px rgba(32, 36, 42, 0.16));
}

.sticker-small {
  width: 14%;
  max-width: 70px;
}

.sticker-medium {
  width: 22%;
  max-width: 110px;
}

.sticker-large {
  width: 32%;
  max-width: 160px;
}

.sticker-top-left {
  left: 4%;
  top: 4%;
}

.sticker-top-right {
  right: 4%;
  top: 4%;
}

.sticker-middle-left {
  left: 3%;
  top: 50%;
  transform: translateY(-50%);
}

.sticker-middle-right {
  right: 3%;
  top: 50%;
  transform: translateY(-50%);
}

.sticker-bottom-left {
  left: 4%;
  bottom: 4%;
}

.sticker-bottom-right {
  right: 4%;
  bottom: 4%;
}

.sticker-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.journal-card-actions {
  display: grid;
  gap: 10px;
}

.journal-card-actions textarea {
  min-height: 90px;
}

.collected-items-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e6c7d1;
  border-radius: 8px;
  background: #fff3f6;
}

.collected-item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.collected-item-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d899aa;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.progression-panel {
  border-color: #cbd8e3;
  background: #f8fbfc;
}

.progression-entry {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.progression-entry h4 {
  font-size: 18px;
}

.current-progress {
  border-color: #b8cbe7;
  background: #eef4fb;
}

.reward-card-discovery .reward-card-section {
  border-left-color: var(--gold);
  background: #fffaf2;
}

.reward-card-clue .reward-card-section {
  border-left-color: var(--blue);
  background: #eef4fb;
}

.reward-card-journal .reward-card-section {
  border-left-color: var(--green);
  background: #f1f8f4;
}

.reward-card-item .reward-card-section {
  border-left-color: var(--rose);
  background: #fff3f6;
}

.test-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.visibility-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.adventure-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.mode-description {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.visibility-switcher[hidden] {
  display: none !important;
}

.adventure-tabs[hidden] {
  display: none !important;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

[hidden] {
  display: none !important;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.zoom-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.zoom-controls .primary-button,
.zoom-controls .secondary-button {
  min-height: 36px;
  padding: 0 12px;
}

.map-canvas {
  min-height: 420px;
  background: #dfe9ed;
}

.map-canvas::before,
.map-canvas::after {
  content: none;
}

.leaflet-container {
  font: inherit;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.map-fallback {
  display: grid;
  place-content: center;
  min-height: 560px;
  padding: 24px;
  text-align: center;
}

.map-fallback h4,
.map-fallback p {
  margin: 0;
}

.adventure-details {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

.adventure-details[hidden] {
  display: none !important;
}

.adventure-map-panel {
  display: grid;
  gap: 14px;
}

.adventure-map-panel[hidden] {
  display: none !important;
}

.adventure-map {
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dfe9ed;
}

.gps-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.gps-panel:has(#gpsPanelTitle) {
  scroll-margin-top: 16px;
}

.gps-panel h4 {
  margin: 0;
}

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

.gps-grid > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.gps-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gps-grid strong {
  overflow-wrap: anywhere;
}

.gps-warning {
  margin: 0;
  padding: 10px;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: #fffaf2;
  color: var(--ink);
}

.quest-step-marker {
  display: grid;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  box-shadow: 0 8px 18px rgba(32, 36, 42, 0.28);
  font-size: 13px;
  font-weight: 900;
}

.quest-step-marker span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.current-step-marker {
  background: var(--blue);
}

.completed-step-marker {
  background: var(--green);
}

.locked-step-marker {
  background: var(--muted);
}

.player-location-marker {
  display: grid;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(184, 111, 37, 0.2), 0 8px 18px rgba(32, 36, 42, 0.28);
}

.player-location-marker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

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

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

.details-grid > div {
  padding: 12px;
  border: 1px solid #e4d4bc;
  border-radius: 8px;
  background: white;
}

.details-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .app-shell,
  .form-grid,
  .map-layout {
    grid-template-columns: 1fr;
  }

  body {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .workspace {
    padding: 16px;
  }

  .map-canvas {
    min-height: 55vh;
  }

  .app-top-nav {
    padding: 10px 14px;
  }

  .app-top-nav strong {
    font-size: 22px;
  }

  .nav-list {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    background: rgba(32, 36, 42, 0.94);
    box-shadow: 0 12px 30px rgba(32, 36, 42, 0.28);
  }

  .nav-link {
    min-height: 56px;
    justify-items: center;
    align-content: center;
    padding: 7px 4px;
    text-align: center;
  }

  .nav-link span {
    font-size: 12px;
  }

  .nav-link small {
    display: none;
  }

  .panel {
    padding: 16px;
  }

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

  .explorer-actions #nearMeButton {
    grid-column: 1 / -1;
  }

  .home-actions {
    display: grid;
  }

  .topbar,
  .button-row,
  .map-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .creator-adventure-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .creator-adventure-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creator-adventure-actions button {
    min-height: 42px;
    width: 100%;
  }

  .builder-publish-bar {
    bottom: calc(88px + env(safe-area-inset-bottom));
    align-items: stretch;
    flex-direction: column;
  }

  .start-card-filter-grid,
  .intro-filter-grid,
  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .icon-button {
    min-height: 48px;
    width: 100%;
  }

  input,
  select,
  textarea {
    min-height: 48px;
    font-size: 16px;
  }

  .adventure-map {
    min-height: 48vh;
  }

  .gps-grid {
    grid-template-columns: 1fr;
  }

  .sticker-builder-row {
    grid-template-columns: 1fr;
  }

  .visibility-switcher,
  .test-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .step-row,
  .timeline li {
    grid-template-columns: 34px 1fr;
  }

  .icon-button,
  .objective-tag {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .creator-adventure-actions {
    grid-template-columns: 1fr;
  }

  .start-card-filter-grid label,
  .filter-grid label {
    gap: 5px;
    font-size: 11px;
  }

  .start-card-filter-grid input,
  .start-card-filter-grid select,
  .filter-grid input,
  .filter-grid select {
    min-height: 42px;
    padding: 8px 6px;
    font-size: 12px;
  }
}

/* RambleBound V60: locked visual direction — warm doorway, vivid adventures. */
:root {
  --ink: #26332d;
  --muted: #667066;
  --line: #d7c8aa;
  --paper: #ede3cf;
  --surface: #faf5e9;
  --green: #1f4034;
  --green-deep: #17362c;
  --moss: #687a58;
  --sage: #dce5d5;
  --blue: #426c78;
  --gold: #c69a45;
  --rust: #a75d3a;
  --rose: #9a4f43;
  --paper-shadow: 0 12px 32px rgba(60, 45, 24, 0.12);
  --soft-shadow: 0 6px 18px rgba(48, 38, 23, 0.1);
  --serif: Georgia, "Times New Roman", serif;
}

html {
  background: var(--paper);
}

body {
  background:
    linear-gradient(rgba(233, 221, 197, 0.87), rgba(233, 221, 197, 0.87)),
    url("./theme-packs/trail-guide-v001/backgrounds/trail-guide-desktop-landscape.png") center top / cover fixed;
  color: var(--ink);
  forced-color-adjust: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 4%, rgba(104, 122, 88, 0.12), transparent 22%),
    repeating-radial-gradient(ellipse at 85% 12%, transparent 0 27px, rgba(66, 108, 120, 0.055) 28px 29px, transparent 30px 48px);
}

h1,
h2,
h3,
h4,
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.app-top-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  width: 260px;
  height: 100vh;
  flex-direction: column;
  justify-content: flex-start;
  gap: 28px;
  padding: 28px 20px 22px;
  color: #f9f1df;
  background:
    radial-gradient(circle at 50% 10%, rgba(198, 154, 69, 0.15), transparent 24%),
    linear-gradient(165deg, #254b3d, #1f4034 42%, #142f27 100%);
  border-right: 3px solid rgba(198, 154, 69, 0.52);
  box-shadow: 10px 0 30px rgba(30, 45, 37, 0.14);
}

.brand-lockup {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.brand-mascot {
  width: 166px;
  height: 166px;
  object-fit: cover;
  object-position: 50% 16%;
  border: 3px solid rgba(237, 227, 207, 0.76);
  border-radius: 50%;
  background: #f8f2e7;
  box-shadow: 0 10px 24px rgba(8, 26, 20, 0.3);
}

.brand-name,
.brand-tagline {
  margin: 0;
}

.brand-name {
  color: #fff8e9;
  font-size: 31px;
  line-height: 1;
}

.brand-tagline {
  margin-top: 6px;
  color: #d8c88d;
  font-family: var(--serif);
  font-size: 14px;
}

.nav-list {
  position: fixed;
  top: 314px;
  left: 20px;
  z-index: 61;
  display: grid;
  width: 220px;
  gap: 7px;
}

.nav-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 11px 12px;
  border: 1px solid rgba(218, 198, 150, 0.38);
  border-radius: 13px;
  color: #dfcf9f;
  background: rgba(255, 250, 232, 0.025);
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.nav-link.active {
  border-color: #c69a45;
  color: #fff9e9;
  background: #596b4d;
  box-shadow: 0 7px 16px rgba(9, 29, 22, 0.25);
}

.brand-copy *,
.nav-link *,
.home-welcome .eyebrow,
.home-welcome h2,
.home-welcome p,
.section-heading h3,
.section-heading .text-button,
.home-adventure-copy h4,
.home-adventure-copy p,
.home-current-content h3,
.home-current-content p {
  background-color: transparent !important;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400 !important;
  line-height: 1;
}

.nav-copy {
  display: grid;
  gap: 1px;
}

.nav-copy > span {
  font-size: 15px;
  font-weight: 800;
}

.nav-copy small {
  color: inherit;
  font-size: 11px;
  opacity: 0.72;
}

.app-shell {
  min-height: 100vh;
  margin-left: 260px;
}

.workspace {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 34px clamp(22px, 3vw, 52px) 60px;
}

.screen.active {
  gap: 22px;
}

.topbar {
  min-height: 82px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid rgba(124, 99, 57, 0.2);
}

.topbar h2 {
  max-width: 22ch !important;
  color: var(--green);
  font-size: clamp(32px, 4vw, 55px);
  line-height: 1.02;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--moss);
  font-size: 11px;
  letter-spacing: 0.13em;
  opacity: 1;
}

.panel,
.filter-panel,
.pin-preview,
.template-editor-panel,
.creator-adventure-row,
.step-row,
.timeline li,
.creator-card-row,
.map-pin-builder {
  border-color: var(--line);
  border-radius: 16px;
  background: rgba(250, 245, 233, 0.97);
  box-shadow: var(--soft-shadow);
}

.panel {
  padding: 24px;
}

.section-heading h3 {
  color: var(--green);
  font-size: clamp(21px, 2.4vw, 28px);
}

.leaf-heading {
  justify-content: flex-start;
}

.leaf-heading::before {
  content: "";
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  background: url("./theme-packs/trail-guide-v001/decorations/small-leaf.png") center / contain no-repeat;
  transform: rotate(-18deg);
}

.leaf-heading .text-button {
  margin-left: auto;
}

.home-section > .section-heading .text-button {
  color: #8a5d21;
}

.home-section > .section-heading .text-button:hover {
  color: #6f4617;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.text-button,
.category-tab {
  border-radius: 12px;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button {
  color: #fffaf0;
  background: #526846;
  box-shadow: 0 6px 14px rgba(49, 68, 43, 0.24);
}

.secondary-button {
  border: 1px solid #9cac8e;
  color: var(--green);
  background: var(--sage);
  box-shadow: 0 4px 10px rgba(67, 78, 58, 0.1);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(38, 51, 45, 0.2);
}

.text-button {
  min-height: 36px;
  border: 0;
  padding: 6px 4px;
  color: var(--green);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}

.text-button:hover {
  color: var(--rust);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(198, 154, 69, 0.65);
  outline-offset: 3px;
}

input,
select,
textarea {
  border-color: #cdbd9e;
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 252, 244, 0.94);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--moss);
}

.status-pill,
.quest-meta span {
  color: #fffaf0;
  background: var(--moss);
}

.status-pill {
  background: var(--gold);
}

.category-tab {
  border-color: #cabb9e;
  color: var(--green);
  background: rgba(255, 251, 241, 0.74);
}

.category-tab.active,
.filters-active {
  color: #fffaf0;
  border-color: var(--green);
  background: var(--green);
}

.quest-card {
  border-radius: 15px;
  background: #faf5e9;
  box-shadow: 0 7px 18px rgba(58, 43, 22, 0.12);
}

.quest-card h4 {
  color: var(--green);
  font-size: 22px;
}

.adventure-card.selected {
  border-color: var(--moss);
  box-shadow: inset 5px 0 0 var(--moss), var(--soft-shadow);
}

.builder-publish-bar {
  border-color: #b8c5a5;
  border-radius: 16px;
  background: rgba(238, 240, 222, 0.96);
  box-shadow: var(--paper-shadow);
}

.creator-adventure-row.is-editing {
  border-color: var(--moss);
  background: #f1f5e9;
  box-shadow: inset 5px 0 0 var(--moss), var(--soft-shadow);
}

.map-pin-builder,
.template-mode-heading {
  border-color: #c5d0b8;
  background: rgba(233, 239, 223, 0.72);
}

.advanced-engine-controls {
  border-color: #b9aa90;
  border-radius: 14px;
  background: rgba(231, 224, 210, 0.7);
}

.map-canvas,
.adventure-map {
  border-color: #bba98a;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.home-app {
  position: relative;
}

.home-welcome {
  position: relative;
  display: flex;
  min-height: 146px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(124, 99, 57, 0.2);
}

.home-welcome::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 4%;
  width: 118px;
  height: 118px;
  background: url("./theme-packs/trail-guide-v001/decorations/fern.png") center / contain no-repeat;
  opacity: 0.12;
  transform: rotate(14deg);
  pointer-events: none;
}

.home-welcome::before {
  content: "";
  position: absolute;
  right: 13%;
  bottom: 30px;
  width: 148px;
  height: 48px;
  border-top: 2px dashed rgba(128, 103, 55, 0.2);
  border-radius: 50%;
  transform: rotate(7deg);
  pointer-events: none;
}

.home-welcome h2 {
  margin: 0;
  color: var(--green);
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.98;
}

.home-welcome .eyebrow {
  margin-bottom: 2px;
}

.home-welcome p:last-child {
  max-width: 590px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.home-compass {
  position: absolute;
  top: -17px;
  right: 19%;
  z-index: 0;
  width: 154px;
  height: 154px;
  background: url("./theme-packs/trail-guide-v001/icons/compass.png") center / contain no-repeat;
  opacity: 0.09;
  transform: rotate(-8deg);
  filter: sepia(0.28) saturate(0.75);
  pointer-events: none;
}

.home-ladybug {
  position: absolute;
  right: calc(22% + 14px);
  bottom: 12px;
  z-index: 3;
  width: 19px;
  height: 16px;
  border: 1px solid #3b211b;
  border-radius: 52% 52% 48% 48%;
  background:
    radial-gradient(circle at 27% 34%, #241b18 0 1.6px, transparent 1.9px),
    radial-gradient(circle at 72% 34%, #241b18 0 1.6px, transparent 1.9px),
    radial-gradient(circle at 28% 72%, #241b18 0 1.5px, transparent 1.8px),
    radial-gradient(circle at 71% 72%, #241b18 0 1.5px, transparent 1.8px),
    linear-gradient(90deg, #bf4b38 0 48%, #3b211b 48% 52%, #b84332 52% 100%);
  box-shadow: 0 2px 4px rgba(40, 25, 15, 0.28);
  transform: rotate(16deg);
  pointer-events: none;
}

.home-ladybug::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -6px;
  width: 8px;
  height: 7px;
  border-radius: 55% 55% 35% 35%;
  background: #2d211d;
  box-shadow:
    -4px -3px 0 -3px #2d211d,
    4px -3px 0 -3px #2d211d;
}

.home-ladybug::after {
  content: "";
  position: absolute;
  left: 4px;
  top: -9px;
  width: 11px;
  height: 7px;
  border-left: 1px solid #493027;
  border-right: 1px solid #493027;
  border-radius: 50%;
}

.home-current-card {
  display: grid;
  min-height: 345px;
  grid-template-columns: minmax(0, 1.28fr) minmax(330px, 0.72fr);
  overflow: hidden;
  border: 1px solid #c9b894;
  border-radius: 22px;
  background: #faf5e9;
  box-shadow: var(--paper-shadow);
}

.home-current-photo,
.home-adventure-photo {
  background-color: #345d4a;
  background-position: center;
  background-size: cover;
}

.home-image-river .home-current-photo,
.home-image-river.home-adventure-photo,
.home-image-nature .home-current-photo,
.home-image-nature.home-adventure-photo {
  background-image:
    linear-gradient(12deg, rgba(18, 48, 37, 0.1), transparent 52%),
    url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=1400&q=82");
}

.home-image-woods .home-current-photo,
.home-image-woods.home-adventure-photo,
.home-image-fantasy .home-current-photo,
.home-image-fantasy.home-adventure-photo {
  background-image:
    linear-gradient(12deg, rgba(28, 52, 37, 0.08), transparent 52%),
    url("https://images.unsplash.com/photo-1511497584788-876760111969?auto=format&fit=crop&w=1400&q=82");
}

.home-image-lighthouse .home-current-photo,
.home-image-lighthouse.home-adventure-photo,
.home-image-historical .home-current-photo,
.home-image-historical.home-adventure-photo {
  background-image:
    linear-gradient(12deg, rgba(43, 58, 48, 0.12), transparent 52%),
    url("https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?auto=format&fit=crop&w=1400&q=82");
}

.home-image-mystery .home-current-photo,
.home-image-mystery.home-adventure-photo {
  background-image:
    linear-gradient(12deg, rgba(25, 42, 35, 0.18), transparent 52%),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1400&q=82");
}

.home-current-content {
  display: grid;
  align-content: center;
  gap: 13px;
  padding: clamp(26px, 4vw, 48px);
}

.home-current-content h3 {
  margin: 0;
  color: var(--green);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 0.98;
}

.home-current-content > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.home-next-stop {
  display: grid;
  gap: 4px;
}

.home-next-stop span {
  color: var(--moss);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-next-stop strong {
  color: var(--ink);
  font-size: 18px;
}

.home-location {
  font-size: 14px;
}

.home-progress {
  display: grid;
  gap: 6px;
}

.home-progress > span {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ded1b5;
}

.home-progress > span > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--moss);
}

.home-progress small {
  color: var(--muted);
}

.home-continue-button {
  width: 100%;
  min-height: 54px;
  margin-top: 3px;
  background: #153c2f;
  font-size: 16px;
}

.home-section {
  display: grid;
  gap: 14px;
}

.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-adventure-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cdbd9e;
  border-radius: 18px;
  background: #faf5e9;
  box-shadow: 0 8px 20px rgba(57, 45, 27, 0.14);
}

.home-adventure-photo {
  position: relative;
  min-height: 190px;
}

.home-adventure-photo > span {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fffaf0;
  background: rgba(31, 64, 52, 0.9);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

.home-adventure-copy {
  display: grid;
  gap: 8px;
  padding: 16px 17px 13px;
}

.home-adventure-copy h4,
.home-adventure-copy p {
  margin: 0;
}

.home-adventure-copy h4 {
  color: var(--green);
  font-size: 22px;
  line-height: 1.08;
}

.home-adventure-copy p,
.home-adventure-meta {
  color: var(--muted);
  font-size: 13px;
}

.home-adventure-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.home-adventure-copy .text-button {
  justify-self: start;
}

.home-memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-memory-grid.new-rambler {
  grid-template-columns: 1fr;
}

.home-memory-card[hidden] {
  display: none;
}

.home-why-card {
  min-height: 150px;
  border-left: 5px solid var(--gold);
}

.home-why-content {
  grid-template-columns: 58px minmax(0, 1fr);
}

.home-why-content > div {
  display: grid;
  gap: 8px;
}

.home-memory-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 170px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid #d1c2a4;
  border-radius: 18px;
  background: rgba(250, 245, 233, 0.96);
  box-shadow: var(--soft-shadow);
}

#homeJournalPreview::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -18px;
  width: 112px;
  height: 112px;
  z-index: 0;
  background: url("./theme-packs/trail-guide-v001/icons/field-journal.png") center / contain no-repeat;
  opacity: 0.075;
  transform: rotate(7deg);
  pointer-events: none;
}

#homeJournalPreview > * {
  position: relative;
  z-index: 1;
}

.home-memory-card .section-heading h3 {
  font-size: 21px;
}

.home-memory-content {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.home-memory-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.visit-location-actions {
  align-items: stretch;
}

.visit-confirmation-panel {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(138, 93, 33, 0.34);
  border-radius: 14px;
  background: rgba(244, 234, 207, 0.58);
}

.visit-confirmation-panel h4,
.visit-confirmation-panel p {
  margin: 0;
}

.visit-location-marker {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50% 50% 50% 8px;
  color: #fff8e6;
  background: var(--green);
  transform: rotate(-45deg);
}

.visit-location-marker::first-letter {
  display: inline-block;
  transform: rotate(45deg);
}

.visit-location-status {
  margin-top: 5px !important;
  color: var(--muted);
  font-weight: 750;
}

.home-memory-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  color: #f8f0dc;
  background: var(--moss);
  font-family: var(--serif);
  font-size: 27px;
}

.empty-state {
  border-color: #b9aa8f;
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.55);
}

.account-app .account-panel:first-of-type .empty-state {
  padding: 24px;
  border-style: solid;
  border-left: 5px solid var(--gold);
}

@media (max-width: 1120px) {
  .app-top-nav {
    width: 226px;
    padding-inline: 15px;
  }

  .nav-list {
    left: 15px;
    width: 196px;
  }

  .app-shell {
    margin-left: 226px;
  }

  .brand-mascot {
    width: 142px;
    height: 142px;
  }

  .brand-name {
    font-size: 27px;
  }

  .home-current-card {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

@media (max-width: 860px) {
  body {
    padding-top: 104px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    background:
      linear-gradient(rgba(233, 221, 197, 0.87), rgba(233, 221, 197, 0.87)),
      url("./theme-packs/trail-guide-v001/backgrounds/trail-guide-phone-portrait.png") center top / cover fixed;
  }

  .app-top-nav {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    height: 90px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(198, 154, 69, 0.28);
    background: rgba(250, 245, 233, 0.96);
    box-shadow: 0 6px 20px rgba(36, 49, 42, 0.12);
    backdrop-filter: blur(12px);
  }

  .brand-lockup {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
  }

  .brand-mascot {
    width: 82px;
    height: 82px;
    margin-top: 14px;
    margin-left: -8px;
    border-width: 2px;
    box-shadow: 0 7px 18px rgba(47, 57, 44, 0.16);
  }

  .brand-name {
    color: var(--green);
    font-size: clamp(24px, 7vw, 31px);
  }

  .brand-tagline {
    color: var(--moss);
    font-size: 11px;
  }

  .nav-list {
    position: fixed;
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(6px + env(safe-area-inset-bottom));
    z-index: 70;
    display: grid;
    width: auto;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 5px;
    border: 1px solid #cdbd9e;
    border-radius: 24px;
    background: rgba(250, 245, 233, 0.98);
    box-shadow: 0 12px 30px rgba(40, 48, 38, 0.2);
    backdrop-filter: blur(12px);
  }

  .nav-link {
    display: grid;
    min-width: 0;
    min-height: 54px;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: 2px;
    padding: 4px 2px;
    border-color: rgba(104, 122, 88, 0.34);
    color: var(--green);
    background: rgba(250, 245, 233, 0.34);
    text-align: center;
  }

  .nav-link:hover {
    transform: none;
  }

  .nav-link.active {
    color: #fff9e9;
    border-color: var(--gold);
    background: var(--green);
    box-shadow: 0 5px 13px rgba(23, 54, 44, 0.22);
  }

  .nav-icon {
    width: 23px;
    height: 23px;
    font-size: 22px;
  }

  .nav-copy {
    display: block;
  }

  .nav-copy > span {
    font-size: 9px;
  }

  .nav-copy small {
    display: none;
  }

  .app-shell {
    min-height: calc(100vh - 90px);
    margin-left: 0;
  }

  .workspace {
    width: 100%;
    padding: 16px 14px 30px;
  }

  .screen.active {
    gap: 16px;
  }

  .home-welcome {
    min-height: 124px;
    padding: 16px 8px 20px;
  }

  .home-welcome h2 {
    font-size: clamp(38px, 12vw, 55px);
  }

  .home-welcome p:last-child {
    font-size: 14px;
  }

  .home-welcome::after {
    top: 12px;
    right: -20px;
    width: 92px;
    height: 92px;
    opacity: 0.1;
  }

  .home-welcome::before {
    right: 10%;
    bottom: 18px;
    width: 96px;
    height: 32px;
    opacity: 0.75;
  }

  .home-ladybug {
    right: 6%;
    bottom: 11px;
  }

  .home-compass {
    top: 4px;
    right: 18%;
    width: 88px;
    height: 88px;
    opacity: 0.075;
  }

  .home-current-card {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .home-current-photo {
    min-height: clamp(220px, 54vw, 320px);
  }

  .home-current-content {
    gap: 11px;
    padding: 22px;
  }

  .home-current-content h3 {
    font-size: clamp(32px, 9vw, 44px);
  }

  .home-featured-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 12px;
  }

  .home-adventure-card {
    width: min(79vw, 350px);
    flex: 0 0 min(79vw, 350px);
    scroll-snap-align: start;
  }

  .home-adventure-photo {
    min-height: 180px;
  }

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

  .home-memory-card {
    min-height: 190px;
    padding: 15px;
  }

  .home-memory-content {
    grid-template-columns: 1fr;
  }

  .home-memory-icon {
    width: 46px;
    height: 46px;
  }

  .topbar {
    min-height: 72px;
    align-items: flex-start;
  }

  .topbar h2 {
    font-size: clamp(32px, 10vw, 45px);
  }

  .topbar .button-row {
    width: auto;
    align-items: flex-end;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .icon-button {
    width: auto;
  }

  .home-continue-button {
    width: 100%;
  }

  .panel {
    padding: 17px;
    border-radius: 15px;
  }

  .filter-grid,
  .start-card-filter-grid,
  .intro-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .adventure-theme-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .explorer-actions .primary-button,
  .explorer-actions .secondary-button,
  .filter-actions .secondary-button,
  .test-controls .primary-button,
  .test-controls .secondary-button {
    width: 100%;
  }

  .builder-publish-bar {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .brand-tagline {
    display: none;
  }

  .brand-mascot {
    width: 78px;
    height: 78px;
  }

  .brand-name {
    font-size: 25px;
  }

  .home-memory-grid {
    grid-template-columns: 1fr;
  }

  .home-memory-card {
    min-height: 0;
  }

  .home-memory-content {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .topbar {
    display: grid;
  }

  .topbar .button-row {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar .button-row button {
    width: 100%;
  }

  .filter-grid,
  .start-card-filter-grid,
  .intro-filter-grid {
    gap: 7px;
  }

  .filter-grid label,
  .start-card-filter-grid label,
  .intro-filter-grid > div {
    min-width: 0;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
.evidence-camera {
  display: block;
  width: 100%;
  max-height: 26rem;
  border: 1px solid rgba(48, 66, 55, 0.28);
  border-radius: 1rem;
  background: #101814;
  object-fit: cover;
}

.evidence-camera[hidden] {
  display: none;
}

.qr-capture-preview {
  display: block;
  width: 100%;
  max-height: 26rem;
  margin-top: 0.75rem;
  border: 2px solid rgba(48, 66, 55, 0.4);
  border-radius: 1rem;
  background: #f4f1e8;
  object-fit: contain;
}

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

.migration-preview-panel {
  display: grid;
  gap: 1rem;
}

.migration-target,
.migration-map-summary,
.migration-backup-box {
  border: 1px solid rgba(52, 80, 59, 0.24);
  border-radius: 16px;
  background: rgba(250, 248, 229, 0.78);
  padding: 1rem 1.15rem;
}

.migration-map-summary,
.migration-backup-box {
  display: grid;
  gap: 0.55rem;
}

.migration-map-summary span {
  color: var(--muted, #5f685f);
}

.migration-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.migration-summary-card {
  border: 1px solid rgba(52, 80, 59, 0.2);
  border-radius: 14px;
  background: #fffdf5;
  padding: 0.9rem;
}

.migration-summary-card strong,
.migration-summary-card span {
  display: block;
}

.migration-summary-card strong {
  color: #254936;
  font-size: 1.45rem;
}

.migration-quarantine {
  border: 1px solid rgba(171, 122, 30, 0.35);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.migration-quarantine-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

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

.migration-choice-message {
  margin: 0;
  color: #465247;
}

.migration-choice-message[data-kind="success"] {
  color: #245f3b;
  font-weight: 700;
}

.migration-choice-message[data-kind="warning"] {
  color: #8a5b0b;
  font-weight: 700;
}

@media (max-width: 720px) {
  .migration-choice-grid {
    grid-template-columns: 1fr;
  }
}
.creator-library-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.creator-library-status,
.creator-library-toggle {
  border: 1px solid rgba(45, 78, 58, 0.35);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-weight: 800;
  line-height: 1;
}

.creator-library-status {
  background: #f0e4bd;
  color: #5b4a20;
}

.creator-library-status.is-published {
  background: #dce8d6;
  color: #244936;
}

.creator-library-toggle {
  background: #eef3e9;
  color: #244936;
  cursor: pointer;
}

.creator-library-toggle.is-active {
  background: #536f49;
  color: #fffdf5;
}

.creator-library-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
