:root {
  --bg: #efeee8;
  --bg-elevated: #f6f5ef;
  --surface: #ffffff;
  --surface-2: #f6f5ef;
  --text: #1f251f;
  --text-muted: #646a62;
  --border: #dcdacd;
  --primary: #22a95e;
  --primary-contrast: #ffffff;
  --danger: #b42318;
  --warning: #8a4b00;
  --success: #0f6b3b;
  --shadow: 0 10px 26px rgba(30, 36, 28, 0.07);
  --cn-bg: #efeee8;
  --cn-surface: #ffffff;
  --cn-surface-soft: #f6f5ef;
  --cn-text: #1f251f;
  --cn-muted: #646a62;
  --cn-border: #dcdacd;
  --cn-primary: #22a95e;
  --cn-primary-strong: #1f8f50;
  --cn-accent: #188a4c;
  --cn-danger: #b42318;
  --cn-shadow: 0 10px 26px rgba(30, 36, 28, 0.07);
  --cn-radius: 16px;
  --cn-radius-sm: 12px;
  --cn-touch: 44px;
  /* Updated: 2026-03-16 17:04 UTC — canonical responsive scale tokens. */
  --bp-xs-max: 479px;
  --bp-sm-max: 767px;
  --bp-md-max: 1023px;
  --bp-lg-max: 1279px;
  --cn-gutter: clamp(0.8rem, 3.2vw, 1.3rem);
  --cn-section-gap: clamp(0.85rem, 2.4vw, 1.5rem);
  --cn-content-max: 1160px;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --bg-elevated: #16233f;
  --surface: #101a2f;
  --surface-2: #16233f;
  --text: #e6edf8;
  --text-muted: #a8b6ca;
  --border: #26344f;
  --primary: #1ea35a;
  --primary-contrast: #ffffff;
  --danger: #ef4444;
  --warning: #ffd9a8;
  --success: #b7e9c9;
  --shadow: 0 12px 28px rgba(1, 7, 18, 0.45);
  --cn-bg: #0b1220;
  --cn-surface: #101a2f;
  --cn-surface-soft: #16233f;
  --cn-text: #e6edf8;
  --cn-muted: #a8b6ca;
  --cn-border: #26344f;
  --cn-primary: #1ea35a;
  --cn-primary-strong: #188a4c;
  --cn-accent: #62b0ff;
  --cn-danger: #ef4444;
  --cn-shadow: 0 12px 28px rgba(1, 7, 18, 0.45);
}

:root {
  --cn-bg: var(--bg);
  --cn-surface: var(--surface);
  --cn-surface-soft: var(--surface-2);
  --cn-text: var(--text);
  --cn-muted: var(--text-muted);
  --cn-border: var(--border);
  --cn-primary: var(--primary);
  --cn-danger: var(--danger);
  --cn-shadow: var(--shadow);
}

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: clip;
}

body {
  font-family: "Nunito Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--cn-text);
  background:
    radial-gradient(1300px 460px at -12% -10%, #f4f2e8 0%, transparent 66%),
    radial-gradient(1000px 380px at 118% 0%, #e8efe6 0%, transparent 72%),
    var(--cn-bg);
  line-height: 1.5;
  font-size: 16px;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(1200px 420px at -10% -10%, rgba(21, 50, 38, 0.35) 0%, transparent 65%),
    radial-gradient(900px 360px at 120% 0%, rgba(22, 36, 62, 0.35) 0%, transparent 70%),
    var(--cn-bg);
}

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

a:hover {
  text-decoration: underline;
}

.button-link {
  display: inline-block;
  min-height: var(--cn-touch);
  background: linear-gradient(180deg, var(--cn-primary) 0%, var(--cn-primary-strong) 100%);
  color: #fff;
  font-weight: 700;
  padding: 0.64rem 1.02rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(19, 99, 56, 0.2);
  box-shadow: 0 7px 16px rgba(26, 133, 74, 0.16);
}

.button-link:hover {
  text-decoration: none;
  filter: brightness(0.97);
}

.container {
  width: min(var(--cn-content-max), calc(100% - (var(--cn-gutter) * 2)));
  margin: 0 auto;
}

.page-shell {
  padding: clamp(0.95rem, 2.8vw, 1.4rem) 0 clamp(1.4rem, 4vw, 2rem);
  min-height: 62vh;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

h1,
h2,
h3 {
  line-height: 1.18;
}

h1 {
  font-size: clamp(1.35rem, 1.06rem + 1.4vw, 2.1rem);
}

h2 {
  font-size: clamp(1.2rem, 1rem + 1vw, 1.65rem);
}

h3 {
  font-size: clamp(1.03rem, 0.94rem + 0.65vw, 1.26rem);
}

p,
li,
label,
input,
select,
textarea,
button {
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1rem);
}

input,
select,
textarea,
button,
.button-link,
a.button-link {
  min-height: var(--cn-touch);
}

.network-banner {
  position: sticky;
  top: 70px;
  z-index: 19;
  width: min(1160px, calc(100% - 2rem));
  margin: 0.6rem auto 0;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  box-shadow: var(--cn-shadow);
}

.network-banner.offline {
  background: #fff4e5;
  color: #8a4b00;
  border-color: #ffd9a8;
}

.network-banner.online {
  background: #e9f8ef;
  color: #0f6b3b;
  border-color: #b7e9c9;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5000;
  background: rgba(253, 253, 249, 0.94);
  border-bottom: 1px solid var(--cn-border);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .site-header {
  background: rgba(11, 18, 32, 0.92);
}

body.nav-fullscreen-active .site-header,
body.nav-fullscreen-active .network-banner {
  display: none !important;
}

body.nav-fullscreen-active .page-shell {
  padding-top: 0 !important;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--cn-text);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand img {
  border-radius: 10px;
  box-shadow: var(--cn-shadow);
  width: auto;
  max-width: 100%;
  height: 40px;
  object-fit: contain;
}

.site-nav {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(360px, calc(100vw - 1rem));
  /* Updated: 2026-03-16 16:31 UTC — allow user menu scrolling on small screens. */
  max-height: calc(100dvh - 84px);
  overflow-y: auto;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  padding: 0.58rem;
  background: #fbfbf8;
  border: 1px solid var(--cn-border);
  border-radius: 14px;
  box-shadow: var(--cn-shadow);
  z-index: 5100;
}

.section-stack,
.card-stack,
.panel-stack {
  display: grid;
  gap: var(--cn-section-gap);
}

.split-layout,
.content-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--cn-section-gap);
}

.action-bar,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll > table,
.card > table,
.panel > table,
.admin-card > table {
  min-width: 680px;
}

.table-scroll > table {
  width: 100%;
}

html[data-theme="dark"] .site-nav {
  background: #0f1a31;
}

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

.nav-toggle {
  display: inline-flex;
  width: auto;
  min-width: 46px;
  min-height: 42px;
  border-radius: 12px;
  padding: 0.35rem 0.55rem;
  align-items: center;
  justify-content: center;
}

.nav-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.38rem;
  border: 1px solid var(--cn-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.nav-bell-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--cn-border);
  border-radius: 12px;
  background: #fbfbf8;
  text-decoration: none;
}

html[data-theme="dark"] .nav-bell-link {
  background: #12203a;
}

html[data-theme="dark"] .nav-header-actions {
  background: rgba(18, 32, 58, 0.7);
}

.nav-bell-link:hover {
  background: var(--cn-surface-soft);
  text-decoration: none;
}

.nav-bell-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.nav-bell-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #b42318;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 5px;
  border: 2px solid #fff;
}

.pwa-install-notice {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(620px, calc(100vw - 1rem));
  background: #0b1d3a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  box-shadow: var(--cn-shadow);
  z-index: 7000;
  padding: 0.7rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.pwa-install-message {
  font-weight: 600;
}

.pwa-install-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pwa-install-btn,
.pwa-close-btn {
  width: auto;
  min-width: 92px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.pwa-close-btn {
  background: rgba(255, 255, 255, 0.14);
}

.nav-toggle-bars {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

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

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

.site-nav a {
  color: var(--cn-text);
  font-weight: 600;
  font-size: 0.93rem;
  padding: 0.54rem 0.75rem;
  border-radius: 10px;
  white-space: nowrap;
  width: 100%;
  background: #f5f6f0;
}

html[data-theme="dark"] .site-nav a {
  background: #14233f;
  color: var(--cn-text);
}

.site-nav a:hover {
  background: var(--cn-surface-soft);
  text-decoration: none;
}

.nav-logout-form {
  display: inline-flex;
  margin: 0;
}
.nav-logout-btn {
  width: auto;
  min-width: 84px;
  border-radius: 999px;
  padding: 0.38rem 0.65rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--cn-border);
  background: var(--cn-surface);
}

html[data-theme="dark"] .site-footer {
  background: #0f1a31;
}

.theme-toggle {
  width: auto;
  min-width: 95px;
  min-height: 40px;
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 700;
}

.theme-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-toggle-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.nav-impersonation-wrap {
  padding-top: 0.35rem;
}

.nav-impersonation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.76rem;
  background: #fff7e6;
  border-color: #efd39f;
}

.nav-impersonation-form {
  margin: 0;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .tile,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .map-controls,
html[data-theme="dark"] .flash,
html[data-theme="dark"] table,
html[data-theme="dark"] thead,
html[data-theme="dark"] tbody,
html[data-theme="dark"] tr,
html[data-theme="dark"] td,
html[data-theme="dark"] th {
  color: var(--cn-text);
  border-color: var(--cn-border);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .tile,
html[data-theme="dark"] .panel {
  background: var(--cn-surface);
  box-shadow: var(--cn-shadow);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0f1a31;
  color: var(--cn-text);
  border-color: var(--cn-border);
}

html[data-theme="dark"] .network-banner.offline {
  background: #3a2a10;
  color: #ffd9a8;
  border-color: #7a5729;
}

html[data-theme="dark"] .network-banner.online {
  background: #123222;
  color: #b7e9c9;
  border-color: #266343;
}

html[data-theme="dark"] .footer-shell p,
html[data-theme="dark"] .error-code {
  color: var(--cn-muted);
}

html[data-theme="dark"] .route-item {
  background: #101a2f;
  border-color: #2a3f66;
}

html[data-theme="dark"] .feed-metadata-card,
html[data-theme="dark"] .feed-comment-count,
html[data-theme="dark"] .feed-comment-panel {
  background: #12203a;
  border-color: #2a3f66;
}

html[data-theme="dark"] .feed-avatar,
html[data-theme="dark"] .feed-comment-avatar {
  border-color: #2a3f66;
}

html[data-theme="dark"] .feed-avatar-fallback,
html[data-theme="dark"] .feed-comment-avatar-fallback {
  background: #1a2b4a;
  color: #cfe3ff;
}

html[data-theme="dark"] .landing-highlight {
  background: #12203a;
  border-color: #2a3f66;
}

html[data-theme="dark"] .landing-highlight h3,
html[data-theme="dark"] .landing-highlight li {
  color: #dbe7ff;
}

html[data-theme="dark"] .profile-social-shell {
  background: linear-gradient(180deg, #14233a 0%, #101a2f 100%);
  border-color: #28466f;
}

html[data-theme="dark"] .profile-social-card {
  background: #0f1727;
  border-color: #2b4267;
}

html[data-theme="dark"] .profile-social-card strong {
  color: #b7d8ff;
}

html[data-theme="dark"] .landing-steps-grid article {
  background: #12203a;
  border-color: #2a3f66;
  box-shadow: 0 10px 22px rgba(1, 7, 18, 0.45);
}

html[data-theme="dark"] .timeline-row {
  background: #12203a;
  border-color: #2a3f66;
}

html[data-theme="dark"] .badge {
  background: #1a2b4a;
  color: #cfe3ff;
}

html[data-theme="dark"] .timeline-meta {
  color: #a8b6ca;
}

html[data-theme="dark"] .status-pill-saved {
  background: #113322;
  color: #86efac;
  border-color: #1f6a46;
}

html[data-theme="dark"] .status-pill-unsaved {
  background: #3e2f14;
  color: #fcd34d;
  border-color: #7c5b18;
}

html[data-theme="dark"] .status-pill-ended {
  background: #1d2c52;
  color: #c7d2fe;
  border-color: #3b4f84;
}

html[data-theme="dark"] .status-pill-active {
  background: #11363a;
  color: #99f6e4;
  border-color: #1f6b74;
}

html[data-theme="dark"] .status-pill-paused {
  background: #1f2937;
  color: #cbd5e1;
  border-color: #475569;
}

/* Dark-mode fallback for legacy inline light blocks */
html[data-theme="dark"] .card[style*="background:#f"],
html[data-theme="dark"] .card[style*="background: #f"],
html[data-theme="dark"] .admin-card[style*="background:#f"],
html[data-theme="dark"] .admin-card[style*="background: #f"],
html[data-theme="dark"] .planner-card-block[style*="background:#f"],
html[data-theme="dark"] .planner-card-block[style*="background: #f"] {
  background: #101a2f !important;
  border-color: #2a3f66 !important;
  color: var(--cn-text) !important;
}

html[data-theme="dark"] [style*="color:#52627a"],
html[data-theme="dark"] [style*="color: #52627a"],
html[data-theme="dark"] [style*="color:#41526c"],
html[data-theme="dark"] [style*="color: #41526c"],
html[data-theme="dark"] [style*="color:#6b7c94"],
html[data-theme="dark"] [style*="color: #6b7c94"],
html[data-theme="dark"] [style*="color:#374151"],
html[data-theme="dark"] [style*="color: #374151"],
html[data-theme="dark"] [style*="color:#4b5563"],
html[data-theme="dark"] [style*="color: #4b5563"] {
  color: var(--cn-muted) !important;
}

html[data-theme="dark"] #chat_messages,
html[data-theme="dark"] #sos_friend_search_output,
html[data-theme="dark"] #sos_friend_pending_output,
html[data-theme="dark"] #sos_friend_list_output {
  background: #12203a !important;
  border-color: #2a3f66 !important;
  color: #e6edf8 !important;
}

.footer-toggle-wrap {
  display: none;
  padding-top: 0.7rem;
}

.footer-toggle {
  width: auto;
  min-width: 140px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.footer-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.5fr 1fr;
  grid-template-areas:
    "brand links"
    "meta links";
  padding: 1rem 0 1.4rem;
}

.footer-shell p {
  margin: 0.35rem 0 0;
  color: var(--cn-muted);
}

.footer-shell > div:first-child {
  grid-area: brand;
}

.footer-links-column {
  grid-area: links;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.footer-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 0.45rem 0.85rem;
}

.footer-links-billing {
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.footer-meta {
  grid-area: meta;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  color: var(--cn-muted);
}

/* Updated: 2026-04-27 10:05 UTC — keep clickable build marker subtle and footer-consistent. */
.footer-build-link {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.12em;
}

.footer-build-link:hover,
.footer-build-link:focus-visible {
  text-decoration-color: currentColor;
}

.footer-stripe-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.12rem;
}

.footer-stripe-logo {
  display: block;
  width: 100%;
  max-width: 92px;
  height: auto;
  object-fit: contain;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  line-height: 1.2;
}

.card,
.route-card,
.trail-card,
table,
section {
  background: var(--cn-surface);
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius);
}

.card,
.route-card,
.trail-card,
section {
  padding: 1.08rem;
  box-shadow: var(--cn-shadow);
}

details.card > summary,
details.admin-card > summary,
details.admin-settings-section > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

details.card > summary::-webkit-details-marker,
details.admin-card > summary::-webkit-details-marker,
details.admin-settings-section > summary::-webkit-details-marker {
  display: none;
}

details.card > summary::before,
details.admin-card > summary::before,
details.admin-settings-section > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.45rem;
  transform: translateY(-1px);
}

details[open].card > summary::before,
details[open].admin-card > summary::before,
details[open].admin-settings-section > summary::before {
  content: "▾";
}


/* Updated: 2026-03-17 10:40 UTC - explicit opt-in container controls only. */
[data-collapsible="true"].ui-collapsible-container {
  position: relative;
}

[data-collapsible="true"] .container-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: .35rem;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--cn-surface-soft) 0%, rgba(34, 169, 94, 0.12) 100%);
  color: var(--cn-text);
  border: 1px solid var(--cn-border);
  box-shadow: none;
}

[data-collapsible="true"] .container-collapse-toggle:hover {
  filter: none;
  border-color: var(--cn-primary);
}

[data-collapsible="true"] .container-collapse-body[hidden] {
  display: none !important;
}

[data-collapsible="true"].ui-collapsible-container.is-collapsed {
  padding-bottom: .8rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

th,
td {
  border: 1px solid var(--cn-border);
  padding: 0.55rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f1f5fb;
}

label {
  display: block;
  margin: 0.55rem 0;
  font-weight: 600;
}

input,
select,
textarea,
button {
  width: 100%;
  max-width: 100%;
  min-height: var(--cn-touch);
  padding: 0.58rem 0.65rem;
  border: 1px solid var(--cn-border);
  border-radius: 12px;
  background: #fff;
  color: var(--cn-text);
  font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
}

textarea {
  min-height: 120px;
}

button {
  background: linear-gradient(180deg, var(--cn-primary) 0%, var(--cn-primary-strong) 100%);
  color: #fff;
  border: 1px solid rgba(19, 99, 56, 0.2);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(26, 133, 74, 0.16);
}

button:hover {
  filter: brightness(0.97);
}

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

.install-app-btn {
  width: auto;
  min-width: 112px;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.92rem;
}

.stats-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 0.8rem 0 1rem;
}

.stats-grid > div {
  border: 1px solid var(--cn-border);
  border-radius: 10px;
  padding: 0.7rem;
  background: var(--cn-surface);
}

.stats-grid strong {
  display: block;
  font-size: 1.15rem;
}

.stats-grid span {
  color: var(--cn-muted);
  font-size: 0.9rem;
}

.map-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.map-controls label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.map-controls button,
.map-controls select,
.map-controls input,
.map-controls textarea {
  min-height: var(--cn-touch);
}

.page-intro {
  margin-bottom: 1rem;
}

.page-intro.komoot-hero {
  background:
    radial-gradient(430px 170px at 0% 0%, #edf4e9 0%, transparent 76%),
    linear-gradient(180deg, #fcfcf8 0%, #f5f7f0 100%);
}

.page-intro p {
  color: var(--cn-muted);
  margin: 0.4rem 0 0;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.quick-links > * {
  min-height: var(--cn-touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stack-lg > * + * {
  margin-top: 1rem;
}

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

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

.route-list {
  display: grid;
  gap: 0.8rem;
}

.route-item {
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius-sm);
  padding: 0.9rem;
  background: #fff;
  box-shadow: 0 5px 12px rgba(23, 30, 21, 0.05);
}

.route-title {
  font-weight: 700;
  color: var(--cn-text);
  font-size: 1.02rem;
}

.route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.56rem;
  border-radius: 999px;
  background: #eff2e8;
  color: #2a3a2d;
  font-size: 0.82rem;
  font-weight: 600;
}

.community-layout {
  align-items: start;
}

.community-compose-card,
.community-timeline-card {
  position: relative;
}

.feed-list {
  gap: 0.95rem;
}

.feed-card {
  padding: 0.95rem;
  border-radius: 14px;
}

.feed-card-header {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.feed-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--cn-border);
  background: #f5f6f0;
  flex-shrink: 0;
}

.avatar-sm {
  width: 38px !important;
  height: 38px !important;
}

.feed-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #3b4a3d;
}

.feed-head-meta {
  min-width: 0;
}

.feed-rider-link {
  font-weight: 700;
  color: var(--cn-text);
}

.feed-head-chips {
  margin-top: 0.26rem;
}

.feed-title {
  margin-top: 0.62rem;
}

.feed-body {
  margin: 0.55rem 0 0;
  white-space: pre-wrap;
}

.feed-metadata-card {
  margin-top: 0.62rem;
  border: 1px solid var(--cn-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #f6f9f3 0%, #fefefa 100%);
  padding: 0.62rem 0.7rem;
  display: grid;
  gap: 0.24rem;
}

.feed-meta-line {
  margin: 0;
  color: var(--cn-muted);
}

.feed-image-wrap {
  margin-top: 0.64rem;
}

.feed-image {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--cn-border);
}

.feed-actions {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.5rem;
  align-items: center;
}

.feed-action-form {
  margin: 0;
}

.feed-comment-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--cn-touch);
  border-radius: 12px;
  border: 1px solid var(--cn-border);
  background: #f8f9f3;
  font-weight: 700;
  color: #41526c;
  padding: 0.2rem 0.55rem;
}

.dashboard-comment-trigger {
  cursor: pointer;
}

.feed-comment-panel {
  margin-top: 0.62rem;
  border: 1px solid var(--cn-border);
  border-radius: 12px;
  background: #fff;
  padding: 0.66rem;
}

.dashboard-comment-panel-default {
  display: none;
}

.dashboard-comment-panel-default.is-open-modal {
  display: block;
}

.feed-comment-label {
  margin-bottom: 0.45rem;
}

.feed-comments-preview {
  margin-top: 0.7rem;
}

.feed-comment-row {
  padding: 0.45rem 0;
  border-top: 1px solid var(--cn-border);
}

.feed-comment-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.feed-comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--cn-border);
}

.feed-comment-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff2e8;
  color: #3b4a3d;
  font-size: 0.78rem;
  font-weight: 800;
}

.feed-comment-time {
  color: #6b7c94;
  font-size: 0.84rem;
}

.feed-comment-body {
  margin-top: 0.26rem;
  white-space: pre-wrap;
}

.ui-modal-open {
  overflow: hidden;
}

.dashboard-lightbox,
.dashboard-comment-modal {
  position: fixed;
  inset: 0;
  z-index: 7600;
}

.dashboard-lightbox-backdrop,
.dashboard-comment-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 23, 0.7);
}

.dashboard-lightbox-content {
  position: relative;
  z-index: 1;
  width: min(90vw, 560px);
  max-height: 90vh;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 0.85rem;
}

.dashboard-lightbox-image {
  width: 100%;
  max-height: calc(90vh - 84px);
  object-fit: contain;
  border-radius: 10px;
  background: #0f172a;
}

.dashboard-lightbox-close {
  width: auto;
  min-width: 82px;
  margin-bottom: 0.55rem;
  border-radius: 999px;
}

.dashboard-comment-sheet {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 1;
  width: min(760px, calc(100vw - 1rem));
  max-height: 84vh;
  border-radius: 16px 16px 0 0;
  background: #fff;
  border: 1px solid var(--cn-border);
  box-shadow: 0 -14px 34px rgba(15, 23, 42, 0.22);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-comment-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--cn-border);
}

.dashboard-comment-close {
  width: auto;
  min-width: 78px;
  border-radius: 999px;
}

.dashboard-comment-sheet-body {
  overflow: auto;
  padding: 0.72rem 0.8rem 0.95rem;
}

.dashboard-comment-sheet-body .feed-comment-panel {
  margin-top: 0;
}

html[data-theme="dark"] .dashboard-comment-sheet {
  background: #0f1a31;
  border-color: #2a3f66;
}

html[data-theme="dark"] .dashboard-comment-sheet-head {
  border-color: #2a3f66;
}

.muted-text {
  color: var(--cn-muted);
}

.section-gap-sm {
  margin-top: 0.75rem;
}

.section-gap-md {
  margin-top: 1rem;
}

.soft-panel {
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius);
  background: linear-gradient(180deg, #fefefa 0%, #f7f7f1 100%);
  box-shadow: var(--cn-shadow);
}

.split-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.row-card {
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius-sm);
  background: #fff;
  padding: 0.82rem 0.9rem;
}

.status-ok {
  color: #0f6b3b;
  font-weight: 700;
}

.status-error {
  color: var(--cn-danger);
  font-weight: 700;
}

.panel-title {
  margin-bottom: 0.3rem;
}

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0 0.75rem;
}

.nav-activity-card {
  margin-bottom: 0.85rem;
}

.nav-activity-title {
  margin-top: 0;
}

.timeline-filters .button-link[aria-current="page"] {
  outline: 2px solid #99baf3;
  outline-offset: 1px;
}

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

.timeline-row {
  border: 1px solid var(--cn-border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #f9fbff;
}

.timeline-title {
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  color: var(--cn-muted);
  font-size: 0.88rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
}

.status-pill-saved {
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #a7f3d0;
}

.status-pill-unsaved {
  background: #fef3c7;
  color: #7c2d12;
  border: 1px solid #fde68a;
}

.status-pill-ended {
  background: #e0e7ff;
  color: #1e3a8a;
  border: 1px solid #c7d2fe;
}

.status-pill-active {
  background: #cffafe;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.status-pill-paused {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.muted {
  color: var(--cn-muted);
}

.friends-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 0.8rem;
}

.friends-chat-messages {
  min-height: 260px;
  max-height: 420px;
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: start;
}

.profile-avatar {
  max-width: 120px;
  border-radius: 12px;
  border: 1px solid #d8e1ef;
}

.profile-avatar-fallback {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 1px solid #d8e1ef;
  background: #f3f6fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.profile-health-note {
  margin-top: -0.2rem;
}

.profile-health-grid {
  margin-top: 0.8rem;
}

.profile-social-shell {
  background: linear-gradient(180deg, #f3f8ff 0%, #ffffff 100%);
  border-color: #cfe0ff;
}

.profile-social-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.profile-social-card {
  border: 1px solid #d8e4f6;
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem;
  display: grid;
  gap: 0.12rem;
}

.profile-social-card strong {
  font-size: 1.2rem;
  color: #0f3d7a;
}

.profile-social-card span {
  color: var(--cn-muted);
  font-size: 0.84rem;
}

.profile-social-note {
  margin: 0.7rem 0 0;
}

#sos_group_members {
  min-width: 0;
}

pre,
code {
  font-family: Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  overflow: auto;
  background: #0f172a;
  color: #e5edf8;
  padding: 0.7rem;
  border-radius: 10px;
}

.error {
  color: var(--cn-danger);
  font-weight: 600;
}

.field-required-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  border: 1px solid #f3c2bf;
  background: #fff1f0;
  color: #9f1b14;
  font-size: 0.72rem;
  font-weight: 700;
}

.field-help-text {
  display: block;
  margin-top: 0.3rem;
  color: var(--cn-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 3000;
  width: min(92vw, 360px);
  display: grid;
  gap: 0.6rem;
}

.toast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: start;
  border-radius: 12px;
  border: 1px solid var(--cn-border);
  box-shadow: var(--cn-shadow);
  padding: 0.7rem 0.8rem;
  background: #fff;
}

.toast-success {
  border-color: #b8e9c7;
  background: #edf9f1;
}

.toast-error {
  border-color: #f4c2c0;
  background: #fff0f0;
}

.toast-warning {
  border-color: #ffd9a8;
  background: #fff7e9;
}

.toast-info {
  border-color: #c9d9fb;
  background: #f2f7ff;
}

.toast-message {
  color: var(--cn-text);
  font-size: 0.92rem;
  line-height: 1.35;
}

.toast-close {
  width: auto;
  min-width: 62px;
  padding: 0.24rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 8px;
}

html[data-theme="dark"] .toast {
  background: #101a2f;
  border-color: #2a3f66;
}

html[data-theme="dark"] .toast-success {
  background: #123222;
  border-color: #266343;
}

html[data-theme="dark"] .toast-error {
  background: #3a1f1f;
  border-color: #7f2f2f;
}

html[data-theme="dark"] .toast-warning {
  background: #3a2a10;
  border-color: #7a5729;
}

html[data-theme="dark"] .toast-info {
  background: #162744;
  border-color: #2f4f84;
}

html[data-theme="dark"] .toast-message {
  color: #e6edf8;
}

.landing-kicker {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cn-primary);
  margin-bottom: 0.45rem;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.landing-hero p {
  color: var(--cn-muted);
}

.landing-highlight {
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius-sm);
  padding: 0.9rem;
  background: linear-gradient(180deg, #f4fbf9 0%, #ffffff 100%);
}

.landing-highlight ul {
  margin: 0.6rem 0 0;
  padding-left: 1rem;
}

.landing-highlight li {
  color: var(--cn-muted);
}

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

.landing-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.button-link-ghost {
  background: #fff;
  color: var(--cn-primary-strong);
  border: 1px solid var(--cn-border);
}

.button-link-ghost:hover {
  background: #f8fbff;
}

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

.landing-steps {
  margin-bottom: 1rem;
}

.landing-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
}

.landing-steps-grid article {
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius-sm);
  background: var(--cn-surface-soft);
  padding: 0.75rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.landing-step-index {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: var(--cn-primary);
  color: #fff;
  margin-bottom: 0.35rem;
}

.landing-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}

.landing-card p {
  color: var(--cn-muted);
  margin: 0 0 0.55rem;
}

.text-link {
  font-weight: 700;
}

.landing-showcase {
  margin-bottom: 1rem;
}

.landing-spotlight {
  margin-bottom: 1rem;
}

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

.landing-spotlight-grid article {
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius-sm);
  padding: 0.75rem;
  background: var(--cn-surface-soft);
}

.landing-shots {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.landing-shots article {
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius-sm);
  padding: 0.7rem;
}

.shot-frame {
  width: 100%;
  min-height: 150px;
  height: 170px;
  border-radius: 10px;
  border: 1px solid #c8d5ea;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.1), rgba(15, 118, 110, 0.16)),
    repeating-linear-gradient(45deg, #f8fbff 0 14px, #eef4ff 14px 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e3a5f;
  font-weight: 700;
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.shot-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-expandable {
  cursor: zoom-in;
}

.landing-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(2, 8, 23, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.landing-lightbox[hidden] {
  display: none !important;
}

.landing-lightbox-inner {
  position: relative;
  width: min(1100px, 96vw);
  max-height: 94vh;
  background: #0b1220;
  border: 1px solid #243247;
  border-radius: 12px;
  padding: 0.9rem;
}

.landing-lightbox-inner img {
  width: 100%;
  max-height: calc(94vh - 100px);
  object-fit: contain;
  border-radius: 8px;
  background: #0b1220;
}

.landing-lightbox-caption,
#landing_lightbox_caption {
  margin: 0.55rem 0 0;
  color: #dbe7ff;
  font-weight: 600;
}

.landing-lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: auto;
  min-width: 44px;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
}

.landing-feature-list {
  margin-bottom: 1rem;
}

.landing-social-proof {
  margin-bottom: 1rem;
}

.landing-social-proof-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.landing-social-proof-grid article {
  border: 1px solid var(--cn-border);
  border-radius: var(--cn-radius-sm);
  background: var(--cn-surface-soft);
  padding: 0.8rem;
}

.landing-social-proof-grid p {
  margin-bottom: 0;
}

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

.feature-columns ul {
  margin: 0;
  padding-left: 1rem;
}

.landing-bottom-cta {
  text-align: center;
}

.error-shell {
  max-width: 680px;
  margin: 1.2rem auto;
  text-align: center;
}

.error-code {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--cn-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.error-actions {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .footer-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "links"
      "meta";
  }

  .page-shell {
    padding-top: 1rem;
  }

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

  .landing-hero,
  .landing-steps-grid,
  .landing-grid,
  .landing-shots,
  .landing-social-proof-grid,
  .feature-columns,
  .landing-spotlight-grid {
    grid-template-columns: 1fr;
  }

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

  .friends-chat-inbox {
    order: 1;
  }

  .friends-chat-panel {
    order: 2;
  }

  .friends-chat-messages {
    min-height: 220px;
    max-height: 320px;
  }

  .friends-chat-compose {
    grid-template-columns: 1fr;
  }

  .profile-summary-grid {
    grid-template-columns: 1fr;
  }

  .profile-social-grid {
    grid-template-columns: 1fr 1fr;
  }

  .map-controls {
    grid-template-columns: 1fr;
  }

  .quick-links > * {
    width: 100%;
  }

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

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

@media (min-width: 768px) {
  .split-layout,
  .content-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  /* Updated: 2026-03-16 17:04 UTC — mobile-first shell hardening for nav/actions/overlays. */
  .network-banner {
    top: 64px;
    width: min(var(--cn-content-max), calc(100% - (var(--cn-gutter) * 2)));
  }

  .nav-shell {
    min-height: 64px;
  }

  .site-nav {
    position: fixed;
    left: var(--cn-gutter);
    right: var(--cn-gutter);
    top: 70px;
    width: auto;
    max-height: calc(100dvh - 80px);
    border-radius: 14px;
  }

  .pwa-install-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .pwa-install-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .action-bar > *,
  .page-actions > * {
    flex: 1 1 100%;
  }

  .table-scroll > table,
  .card > table,
  .panel > table,
  .admin-card > table {
    min-width: 560px;
  }
}

@media (min-width: 1536px) {
  .container {
    width: min(1360px, calc(100% - (var(--cn-gutter) * 2)));
  }
}

@media (max-width: 1024px) {
  .container {
    width: calc(100% - 1rem);
  }

  .nav-shell {
    min-height: 64px;
    padding: 0.45rem 0;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .network-banner {
    width: calc(100% - 1rem);
    top: 64px;
  }

  .site-nav {
    width: calc(100vw - 1rem);
    right: 0.5rem;
    left: 0.5rem;
  }

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

  .site-footer.footer-collapsible .footer-toggle-wrap { display: block; }
  .site-footer.footer-collapsible .footer-shell { display: none; }
  .site-footer.footer-collapsible.footer-open .footer-shell { display: grid; }

  th,
  td {
    padding: 0.45rem;
    font-size: 0.92rem;
  }

  .quick-links a,
  .button-link {
    width: 100%;
    text-align: center;
  }

  .toast-stack {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    width: auto;
  }
}

@media (display-mode: standalone) {
  .site-footer.footer-collapsible .footer-toggle-wrap { display: block; }
  .site-footer.footer-collapsible .footer-shell { display: none; }
  .site-footer.footer-collapsible.footer-open .footer-shell { display: grid; }

  .site-header {
    padding-top: env(safe-area-inset-top, 0);
  }

  .site-footer {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}


/* Updated: 2026-03-16 16:20 UTC — landing page early access banner styles. */
.landing-early-access-banner {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid color-mix(in oklab, var(--brand, #2563eb) 30%, transparent);
  background: color-mix(in oklab, var(--surface, #fff) 85%, #2563eb 15%);
}

.landing-early-access-banner p {
  margin: 0;
}


/* 2026-03-18 mobile redesign tokens and shell */
:root {
  --cg-mobile-bg: #efeee8;
  --cg-mobile-panel: #faf8f2;
  --cg-mobile-soft: #e9e0cd;
  --cg-mobile-olive: #4d681b;
  --cg-mobile-olive-strong: #3f5616;
  --cg-mobile-line: #d9d1bd;
}

@media (max-width: 767px) {
  body {
    background:
      radial-gradient(780px 310px at -15% -8%, #f4f0e2 0%, transparent 70%),
      radial-gradient(640px 280px at 112% 0%, #eaf1e4 0%, transparent 72%),
      var(--cg-mobile-bg);
  }

  .page-shell {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .card,
  .route-item,
  .feed-card,
  .planner-card-block,
  .settings-card {
    border-radius: 18px !important;
    border-color: var(--cg-mobile-line) !important;
    background: var(--cg-mobile-panel) !important;
    box-shadow: 0 8px 24px rgba(34, 32, 23, 0.08) !important;
  }

  .button-link,
  button,
  .quick-links a {
    border-radius: 14px !important;
    background: linear-gradient(180deg, var(--cg-mobile-olive) 0%, var(--cg-mobile-olive-strong) 100%) !important;
    border-color: rgba(54, 76, 16, 0.35) !important;
  }

  .badge,
  .m-chip {
    border-radius: 999px;
    background: var(--cg-mobile-soft);
    border: 1px solid var(--cg-mobile-line);
    color: #32401f;
  }

  .map-controls {
    gap: 0.45rem;
  }

  .map-controls > * {
    border-radius: 12px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6400;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
    padding: 0.55rem 0.6rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--cg-mobile-line);
    background: rgba(250, 248, 242, 0.96);
    backdrop-filter: blur(8px);
  }

  .mobile-bottom-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid var(--cg-mobile-line);
    background: #ece5d4;
    color: #2f3b22;
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 700;
  }

  .onboarding-premium-shell {
    background: linear-gradient(180deg, #fcfbf6 0%, #f4f2e9 100%);
  }

  .onboarding-slides {
    display: grid;
    gap: 0.7rem;
  }

  .onboarding-slide {
    border: 1px solid var(--cg-mobile-line);
    border-radius: 16px;
    padding: 0.85rem;
    background:
      radial-gradient(180px 60px at 0% 0%, #eff4e6 0%, transparent 80%),
      #fffdf8;
  }

  .onboarding-slide p {
    color: #65685c;
    margin: 0.3rem 0 0;
  }

  .onboarding-form-card {
    margin-top: 0.8rem;
  }

  .onboarding-trial-card {
    margin-top: 0.7rem;
    background: #fffdf7 !important;
  }

  .nav-map-actions,
  .dashboard-quick-nav-controls,
  .planner-map-controls-grid {
    border-radius: 14px;
  }
}

.mobile-bottom-nav { display: none; }
