@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Sora:wght@400;500;600;700&display=swap");

:root {
  --bg: #f7f8f2;
  --bg-soft: #edf1e5;
  --surface: #ffffff;
  --surface-2: #f2f5ef;
  --ink: #172028;
  --ink-soft: #4b5f70;
  --brand: #0d6a86;
  --brand-deep: #0a4f65;
  --accent: #be8b2d;
  --line: #d8dfd1;
  --ok: #1d7f4a;
  --danger: #a9413d;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 16px 38px rgba(17, 29, 40, 0.12);
  --viewer-height: clamp(410px, 56vh, 680px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 10% 10%, rgba(55, 132, 157, 0.14), transparent 46%),
    radial-gradient(circle at 85% 0%, rgba(198, 147, 56, 0.17), transparent 42%),
    var(--bg);
  color: var(--ink);
  font-family: "Sora", "Trebuchet MS", sans-serif;
  line-height: 1.52;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-deep);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0a7091;
  outline-offset: 2px;
}

.site-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.1rem 2.7rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(247, 248, 242, 0.89);
  border-bottom: 1px solid rgba(23, 32, 40, 0.08);
}

.product-status {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.38rem 1.1rem 0.5rem;
  font-size: 0.78rem;
  color: #365767;
  background: rgba(233, 244, 238, 0.82);
  border-bottom: 1px solid rgba(23, 32, 40, 0.08);
}

.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
  flex: 0 0 auto;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  gap: 0.18rem;
  align-items: center;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.site-nav a {
  padding: 0.36rem 0.46rem;
  border-radius: 10px;
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
}

.site-nav a.nav-cta {
  background: linear-gradient(145deg, #0f7392, #0b586f);
  color: #f7fdff;
}

.site-nav a.nav-cta-secondary {
  border: 1px solid var(--line);
  background: #f7fbff;
  color: var(--brand-deep);
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--ink);
  background: rgba(13, 106, 134, 0.12);
}

.site-nav a.nav-cta:hover,
.site-nav a.nav-cta.active {
  color: #ffffff;
  background: linear-gradient(145deg, #0f7392, #0b586f);
}

.site-nav a.nav-cta-secondary:hover,
.site-nav a.nav-cta-secondary.active {
  color: var(--brand-deep);
  background: #eaf6fc;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  color: var(--ink-soft);
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown.active > summary,
.nav-dropdown > summary:hover {
  color: var(--ink);
  background: rgba(13, 106, 134, 0.12);
}

.nav-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 190px;
  z-index: 45;
  display: grid;
  gap: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  padding: 0.4rem;
  box-shadow: var(--shadow);
}

.nav-dropdown-menu a {
  display: block;
  border-radius: 9px;
  padding: 0.4rem 0.56rem;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-weight: 600;
}

.tour-launch-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #f6fbff;
  cursor: pointer;
}

.tour-launch-btn:hover {
  background: #e9f6fb;
  color: #0b5f79;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #80b8c9;
  background: #eaf6fc;
  color: #0c5c75;
  padding: 0.2rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
}

body[data-mode="live"] .mode-badge {
  border-color: #85c8a0;
  background: #e7f7ed;
  color: #1b6d42;
}

.platform-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: auto;
  flex-wrap: nowrap;
  min-width: 0;
}

.platform-inline {
  display: inline-flex;
  align-items: center;
}

.platform-select {
  min-width: 78px;
  padding: 0.24rem 0.4rem;
  font-size: 0.82rem;
  border-radius: 999px;
}

.account-control {
  position: relative;
}

.account-menu {
  position: relative;
}

.account-menu > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.62rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #ffffff;
  white-space: nowrap;
}

.account-menu > summary::-webkit-details-marker {
  display: none;
}

.account-name {
  display: inline-block;
  max-width: 124px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.account-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 220px;
  z-index: 45;
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  padding: 0.6rem;
  box-shadow: var(--shadow);
}

.account-menu-panel .btn {
  width: 100%;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.36rem 0.2rem 0.56rem;
  background: rgba(255, 255, 255, 0.9);
  margin-left: 0;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.help-menu {
  position: relative;
  margin-left: 0;
  flex: 0 0 auto;
}

.help-menu > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.66rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #ffffff;
}

.help-menu > summary::-webkit-details-marker {
  display: none;
}

.help-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 180px;
  z-index: 45;
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  padding: 0.55rem;
  box-shadow: var(--shadow);
}

.help-menu-panel .btn {
  width: 100%;
}

.auth-status {
  font-size: 0.74rem;
  color: var(--ink-soft);
  white-space: nowrap;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-btn {
  font-size: 0.72rem;
  padding: 0.25rem 0.62rem;
}

.auth-role-select {
  width: auto;
  min-width: 104px;
  padding: 0.3rem 0.46rem;
  font-size: 0.84rem;
}

.auth-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  max-width: min(92vw, 420px);
  width: 100%;
}

.auth-dialog::backdrop {
  background: rgba(5, 14, 20, 0.48);
}

.auth-dialog-body {
  padding: 0.95rem;
  display: grid;
  gap: 0.6rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hero {
  margin-top: 1.4rem;
  background: linear-gradient(128deg, #f7fdfd, #e3ede7 40%, #eef0df 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 3.8vw, 3rem);
  overflow: hidden;
  position: relative;
  animation: fade-slide 480ms ease forwards;
}

.hero::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -52px;
  width: 210px;
  height: 210px;
  border-radius: 40px;
  transform: rotate(18deg);
  background: linear-gradient(140deg, rgba(13, 106, 134, 0.16), rgba(190, 139, 45, 0.24));
}

.trust-strip {
  margin-top: 1rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  background: #f6fbf9;
}

.trust-strip .mode-inline {
  font-weight: 700;
  color: #0f5f7a;
}

h1,
h2,
h3 {
  margin: 0 0 0.55rem;
  color: #121c25;
  line-height: 1.2;
}

h1,
h2 {
  font-family: "Fraunces", Georgia, serif;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  max-width: 20ch;
}

.lead {
  color: var(--ink-soft);
  max-width: 62ch;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(145deg, #0f7392, #0b586f);
  color: #f7fdff;
  box-shadow: 0 10px 24px rgba(13, 106, 134, 0.28);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.section {
  margin-top: 2rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.85);
}

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

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

.panel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.95rem;
}

.skeleton-card {
  height: 180px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, #eef3ed 25%, #f6faf4 40%, #eef3ed 55%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.1s linear infinite;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.hub-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: fade-slide 420ms ease both;
}

.hub-card-media {
  height: 130px;
  background-size: cover;
  background-position: center;
}

.ecosystem-media {
  background:
    radial-gradient(circle at 20% 20%, rgba(102, 170, 196, 0.42), transparent 48%),
    radial-gradient(circle at 82% 10%, rgba(188, 139, 62, 0.44), transparent 42%),
    linear-gradient(130deg, #0e3f57, #1f5e61 50%, #6f8d57);
}

.hub-card-body {
  padding: 1rem;
}

.hub-card-body h3 {
  margin: 0 0 0.45rem;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.hub-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.hub-layout--explore-priority {
  margin-top: 0.35rem;
}

.hub-layout.hub-layout--map-focus {
  grid-template-columns: minmax(0, 1.85fr) minmax(300px, 0.9fr);
}

.hub-layout.hub-layout--directory-focus {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.25fr);
}

.viewer-pane {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  min-height: var(--viewer-height);
  height: var(--viewer-height);
  background: #d9e3ee;
}

.map-view-toggle {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 12;
  display: inline-flex;
  gap: 0.34rem;
  padding: 0.26rem;
  border-radius: 999px;
  background: rgba(245, 250, 252, 0.9);
  border: 1px solid rgba(31, 66, 84, 0.2);
  backdrop-filter: blur(8px);
}

.btn-map-toggle {
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.76rem;
}

.btn-map-toggle.is-active {
  background: linear-gradient(145deg, #0f7392, #0b586f);
  color: #f7fdff;
  border-color: transparent;
}

.canvas-host {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.map2d-host {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.viewer-pane > .canvas-host,
.viewer-pane > .map2d-host {
  position: absolute;
  inset: 0;
}

.viewer-pane > .map2d-host {
  z-index: 4;
}

.viewer-pane > .canvas-host {
  z-index: 3;
}

.canvas-host.is-hidden,
.map2d-host.is-hidden {
  display: none;
}

.map2d-viewport {
  width: 100%;
  height: 100%;
}

.map2d-error {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #f6fbff;
  color: var(--ink-soft);
  text-align: center;
  padding: 1rem;
}

.engine-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  display: block;
  background: #0b0f14;
}

.viewer-overlay {
  position: absolute;
  inset: 0 auto auto 0;
  margin: 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.viewer-tools {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.viewer-tools .btn {
  font-size: 0.75rem;
  padding: 0.34rem 0.72rem;
}

.movement-help {
  max-width: 420px;
  background: rgba(8, 22, 31, 0.82);
  color: #f1fbff;
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
  font-size: 0.76rem;
  display: grid;
  gap: 0.3rem;
}

.movement-help p {
  margin: 0;
}

.mini-map-overlay {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 8;
  border-radius: 14px;
  background: rgba(8, 22, 31, 0.74);
  border: 1px solid rgba(144, 204, 222, 0.45);
  padding: 0.34rem;
}

#miniMapCanvas {
  display: block;
  width: 196px;
  height: 196px;
  border-radius: 10px;
}

.viewer-chip {
  width: fit-content;
  font-size: 0.82rem;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  background: rgba(6, 23, 33, 0.78);
  color: #f2fbff;
}

.viewer-chip-event {
  background: rgba(29, 108, 52, 0.9);
  color: #ecfff3;
}

.directory-pane {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: var(--viewer-height);
  height: var(--viewer-height);
  overscroll-behavior: contain;
}

.directory-head,
.runtime-tools,
.directory-tabs,
.directory-content,
.intent-panel,
.directory-filters,
.directory-list,
.directory-detail,
.paths-panel,
.paths-panel-head,
.paths-list,
.paths-detail {
  padding: 0.95rem;
}

.ecosystem-controls {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem;
  background: #f8fbf6;
}

.ecosystem-controls .eco-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: #1f5368;
}

.nav-controls {
  margin-top: 0.4rem;
}

.curator-panel {
  margin-top: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfef9;
  padding: 0.65rem;
}

.curator-panel h3 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

.curator-list {
  margin: 0.3rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.directory-content {
  display: grid;
  gap: 0;
  min-height: 0;
}

.directory-head {
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
}

.directory-content,
.paths-panel,
.runtime-tools {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

.directory-tabs {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7faf4;
  overflow-x: auto;
  overflow-y: hidden;
}

.tool-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

.tool-tab.is-active {
  color: #0b5f79;
  border-color: #84bfd1;
  background: #e9f6fb;
}

.runtime-tools {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fafcf7;
  display: grid;
  gap: 0.55rem;
}

.intent-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fdfefb;
  display: grid;
  gap: 0.55rem;
}

.intent-panel h3 {
  margin: 0;
  font-size: 0.98rem;
  font-family: "Fraunces", Georgia, serif;
}

.intent-panel-head {
  display: grid;
  gap: 0.25rem;
}

.intent-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.intent-chip {
  border: 1px solid #c8d6dc;
  background: #f7fbfe;
  color: #27576a;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.intent-chip.is-active {
  background: #dff2fb;
  border-color: #72b5cf;
  color: #0b5f79;
}

.runtime-tools h3 {
  margin: 0;
  font-size: 0.98rem;
  font-family: "Fraunces", Georgia, serif;
}

.ops-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #ffffff;
}

.ops-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #24576c;
}

.re-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.status-line {
  min-height: 1.1rem;
  margin: 0;
}

.status-line.warn {
  color: var(--danger);
}

.status-line.ok {
  color: var(--ok);
}

.btn.is-active {
  background: #e4f5ea;
  border-color: #8ac79d;
  color: #0f5732;
}

.btn.is-disabled {
  pointer-events: none;
  opacity: 0.7;
}

.directory-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.nearby-panel {
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0.95rem;
  display: grid;
  gap: 0.45rem;
  background: #fbfdf8;
}

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

.nearby-grid strong {
  font-size: 0.78rem;
  color: #1a5369;
}

.nearby-grid ul {
  margin: 0.34rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.55rem 0.68rem;
  font-family: inherit;
  font-size: 0.94rem;
  background: #fdfefd;
  color: var(--ink);
}

.directory-list {
  overflow: visible;
  padding-top: 0.2rem;
}

.directory-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.biz-list-item {
  margin-bottom: 0.5rem;
}

.biz-list-item button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.biz-list-item.active button {
  border-color: #7fb8ce;
  box-shadow: 0 0 0 2px rgba(16, 107, 137, 0.18);
}

.biz-name {
  display: block;
  font-weight: 600;
}

.biz-category {
  display: block;
  color: var(--ink-soft);
  font-size: 0.86rem;
  margin-top: 0.16rem;
}

.biz-intents {
  display: block;
  margin-top: 0.22rem;
  color: #45606d;
  font-size: 0.76rem;
}

.directory-detail {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.paths-panel {
  display: grid;
  gap: 0;
}

.paths-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fdfefb;
  display: grid;
  gap: 0.45rem;
  max-height: none;
  overflow: visible;
}

.feature-module .paths-list {
  max-height: none;
}

.path-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 0.65rem;
  display: grid;
  gap: 0.3rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.path-card.is-active {
  border-color: #7fb8ce;
  box-shadow: 0 0 0 2px rgba(16, 107, 137, 0.14);
}

.path-card h4 {
  margin: 0;
  font-size: 0.95rem;
  font-family: "Fraunces", Georgia, serif;
}

.path-steps {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.3rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.path-step.is-active {
  color: #0c5f78;
  font-weight: 600;
}

.badge-tour-stop {
  color: #0f5d73;
  background: #dff3fa;
}

.tour-stop-badge-marker {
  background: transparent;
  border: 0;
}

.tour-stop-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid #0a566f;
  background: #ffffff;
  color: #0a566f;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(8, 53, 70, 0.22);
}

.tour-stop-badge.is-active {
  background: #0a5d78;
  color: #ffffff;
  border-color: #083f53;
}

.tour-stop-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.tour-progress {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.tour-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #bad0d8;
  background: #edf5f8;
  overflow: hidden;
}

.tour-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #0f7392, #0b586f);
  transition: width 180ms ease;
}

.tour-directions-list {
  margin: 0;
  padding: 0 0 0 1rem;
  list-style: decimal;
  display: grid;
  gap: 0.5rem;
  color: var(--ink);
}

.tour-directions-list li {
  font-size: 0.88rem;
  line-height: 1.35;
}

.tour-stop-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfefc;
  padding: 0.62rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}

.tour-stop-row.is-active {
  border-color: #7ebdd3;
  box-shadow: 0 0 0 2px rgba(17, 113, 145, 0.16);
}

.tour-stop-row.is-complete {
  background: #f1faef;
  border-color: #a9d2af;
}

.tour-stop-row .cta-row {
  margin: 0;
}

.tour-stop-search {
  display: grid;
  gap: 0.42rem;
  max-height: 180px;
  overflow: auto;
  padding: 0.2rem 0.1rem;
}

.tour-builder-panel {
  display: grid;
  gap: 0.75rem;
}

.tour-stop-builder,
.tour-builder-existing {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdf9;
  padding: 0.65rem;
  display: grid;
  gap: 0.5rem;
}

.business-card h3 {
  margin-bottom: 0.18rem;
}

.business-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
}

.business-meta {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.offer-panel {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.engagement-row {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.engagement-chip {
  font-size: 0.75rem;
  padding: 0.3rem 0.72rem;
}

.engagement-chip.is-active {
  border-color: #7fb8ce;
  background: #e7f6fc;
  color: #0a5671;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0;
}

.link-button:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

.ecosystem-line {
  margin: 0.5rem 0 0;
}

.relationship-block {
  margin-top: 0.45rem;
}

.review-panel {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem;
  background: #fbfdf9;
}

.review-badges {
  justify-content: flex-start;
  margin-top: 0.35rem;
}

.review-comments ul {
  margin-top: 0.4rem;
}

.review-form {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.45rem;
}

.review-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.review-tag-option {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.customization-panel {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem;
  background: #f7fbff;
}

.customization-form {
  display: grid;
  gap: 0.45rem;
}

.customization-form input[type="color"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.customization-form input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.48rem 0.6rem;
}

.color-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: var(--swatch, #66b6ff);
  vertical-align: -0.12rem;
  margin-right: 0.2rem;
}

.offer-result {
  border: 1px dashed #9ab7c3;
  border-radius: 10px;
  padding: 0.65rem;
  background: #ecf7fb;
}

.offer-code {
  margin: 0 0 0.5rem;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-featured {
  color: #4f3500;
  background: linear-gradient(150deg, #f5d693, #edba5f);
}

.badge-showcase {
  color: #103f52;
  background: #dff1f8;
}

.badge-tier {
  color: #0a4f65;
  background: #d8eef8;
}

.badge-local {
  color: #145b35;
  background: #d7f2e2;
}

.badge-path {
  color: #124f63;
  background: #daf1f9;
}

.badge-event {
  color: #155d35;
  background: #d9f1e2;
}

.badge-soft {
  color: #445a66;
  background: #e9eff2;
}

.badge-curated {
  color: #0d5f79;
  background: #dff2fb;
  border: 1px solid #9bc7d8;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.ranking-help {
  margin: 0.35rem 0 0;
}

.dev-menu {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.dev-menu label {
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.52rem;
  background: #f5faf4;
}

.app-error-banner {
  margin: 0.9rem 0 0;
  border: 1px solid #e1b2ae;
  background: #fff6f4;
  color: #7b2b27;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
}

.walkthrough-overlay {
  position: fixed;
  z-index: 90;
  max-width: min(360px, calc(100vw - 24px));
  pointer-events: auto;
}

.walkthrough-card {
  position: relative;
  border: 1px solid #98c8d8;
  background: #f8fdff;
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: var(--shadow);
  max-height: min(72vh, 520px);
  overflow-y: auto;
}

.walkthrough-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  line-height: 1;
  font-size: 0.78rem;
  font-weight: 700;
  color: #3b5d6c;
  background: #ffffff;
  cursor: pointer;
}

.walkthrough-label {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  color: #1e5f75;
  font-weight: 700;
}

.walkthrough-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.walkthrough-card p {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.walkthrough-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.walkthrough-highlight {
  box-shadow: 0 0 0 3px rgba(24, 136, 174, 0.26);
  border-radius: 10px;
}

.feature-module {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.65rem;
}

.feature-module h3 {
  margin: 0;
}

.event-ribbon {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.event-ribbon .badge {
  font-size: 0.76rem;
}

.what-is-panel {
  margin-top: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefb;
  padding: 0.55rem 0.7rem;
}

.what-is-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: #1d5c73;
}

.what-is-panel ul {
  margin: 0.5rem 0 0;
  padding-left: 1.05rem;
}

.footer-tagline {
  margin: 0.4rem 0 0;
  font-weight: 600;
  color: #0f4f66;
}

.admin-form-grid {
  margin-top: 0.8rem;
}

.subtle {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.footer-links {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer-links a {
  font-weight: 600;
}

.share-shell {
  margin-top: 1rem;
}

.share-bar {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.75rem 0.85rem;
}

.share-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.share-chip {
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
}

.share-status {
  margin: 0.55rem 0 0;
  min-height: 1.1rem;
}

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

.ecosystem-directory-content {
  grid-template-rows: auto auto auto auto 1fr auto;
}

.ecosystem-path-controls {
  margin-top: 0.2rem;
}

.city-form {
  display: grid;
  gap: 0.55rem;
}

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

.editor-span-2 {
  grid-column: span 2;
}

.editor-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.editor-check input[type="checkbox"] {
  width: auto;
}

.city-form-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.city-input-wrap {
  flex: 1 1 260px;
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes skeleton-wave {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: 0 0;
  }
}

@media (max-width: 980px) {
  :root {
    --viewer-height: clamp(260px, 50vh, 520px);
  }

  .hub-layout {
    grid-template-columns: 1fr;
  }

  .directory-pane {
    min-height: 0;
    height: auto;
    display: block;
    overflow: visible;
  }

  .directory-head {
    max-height: none;
    overflow: visible;
  }

  .directory-content,
  .paths-panel,
  .runtime-tools {
    overflow: visible;
  }

  .directory-list {
    max-height: 260px;
  }

  .badge-row {
    justify-content: flex-start;
  }

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

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

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

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

  .editor-span-2 {
    grid-column: auto;
  }

  #miniMapCanvas {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 1260px) {
  .auth-status {
    display: none;
  }
}

@media (max-width: 740px) {
  .site-header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }

  .platform-controls {
    order: 2;
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    margin-left: 0;
  }

  .help-menu {
    margin-left: 0;
    order: 2;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    right: 1rem;
    top: 3.7rem;
    flex-direction: column;
    align-items: stretch;
    min-width: 190px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 0.45rem;
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .account-menu-panel,
  .help-menu-panel {
    right: 0;
    left: auto;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown > summary {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    border: 0;
    padding: 0.25rem 0 0;
    min-width: 0;
  }

  .tour-launch-btn {
    width: 100%;
    text-align: left;
  }
}
