:root {
  --bg-deep: #eef6f1;
  --bg: #f6faf7;
  --bg-elevated: #ffffff;
  --bg-soft: #e8f3ec;
  --ink: #142c26;
  --ink-muted: #5a7168;
  --line: rgba(20, 44, 38, 0.09);
  --accent: #0fad7a;
  --accent-strong: #0b9470;
  --accent-glow: rgba(15, 173, 122, 0.18);
  --warm: #e8843a;
  --warm-soft: rgba(232, 132, 58, 0.14);
  --danger: #e85d4c;
  --success: #0fad7a;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(20, 44, 38, 0.04), 0 10px 28px rgba(20, 44, 38, 0.06);
  --shadow-hover: 0 2px 6px rgba(20, 44, 38, 0.05), 0 18px 40px rgba(20, 44, 38, 0.1);
  --shadow-pop: 0 8px 10px rgba(20, 44, 38, 0.04), 0 24px 48px rgba(20, 44, 38, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.18s;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --map-claimed: #12b886;
  --map-claimed-mid: #0fad7a;
  --map-claimed-deep: #0b8f68;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, #f8fbf9 0%, var(--bg) 100%);
  background-attachment: fixed;
  line-height: 1.55;
  letter-spacing: 0.005em;
  font-weight: 450;
  overflow-x: clip;
  max-width: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    linear-gradient(rgba(15, 173, 122, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 173, 122, 0.1) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 18%, transparent 72%);
  z-index: 0;
  transition: opacity 0.35s var(--ease);
}

body.is-landing {
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(15, 173, 122, 0.22), transparent 58%),
    radial-gradient(900px 460px at 96% 4%, rgba(232, 132, 58, 0.14), transparent 52%),
    radial-gradient(700px 380px at 50% 100%, rgba(15, 173, 122, 0.08), transparent 60%),
    linear-gradient(180deg, #fcfefd 0%, #eef8f2 48%, #f7faf8 100%);
}

body.is-landing::before {
  opacity: 0.28;
  animation: gridDrift 28s linear infinite;
}

body.is-landing::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(420px 420px at 18% 22%, rgba(15, 173, 122, 0.12), transparent 70%),
    radial-gradient(360px 360px at 82% 18%, rgba(232, 132, 58, 0.1), transparent 72%);
  animation: orbFloat 18s ease-in-out infinite alternate;
}

body.is-map {
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(15, 173, 122, 0.07), transparent 55%),
    #f3f7f4;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 251, 249, 0.82);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(20, 44, 38, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

body.is-landing .site-chrome {
  background: rgba(251, 253, 251, 0.72);
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.7rem 1.5rem;
  max-width: none;
  margin: 0 auto;
  width: 90%;
  box-sizing: border-box;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 3.35rem;
  width: auto;
  max-width: min(52vw, 15rem);
  object-fit: contain;
}

.brand-mark {
  width: 1.45rem;
  height: 1.45rem;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 48%, var(--accent) 48%, var(--accent) 52%, transparent 52%),
    linear-gradient(45deg, transparent 48%, var(--warm) 48%, var(--warm) 52%, transparent 52%);
  box-shadow: 0 0 0 3px rgba(15, 173, 122, 0.1);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 0;
}

.site-nav a {
  opacity: 1;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent-strong);
}

.nav-set {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-set[hidden] {
  display: none !important;
}

.nav-set > .nav-link,
.nav-set > .nav-user-label,
.nav-set > .nav-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.48rem 0.82rem;
  white-space: nowrap;
  border-radius: 999px;
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 0.005em;
  transition:
    background var(--duration) var(--ease),
    color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.nav-set > .nav-dropdown {
  padding: 0;
}

.site-header-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  margin-left: 0.35rem;
}

.site-header-auth {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.site-header-tools .nav-menu {
  margin-left: 0;
}

.site-header-tools .nav-flyout {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  min-width: 15rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
}

.nav-user-label {
  font-weight: 700;
  color: var(--ink-muted);
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-label:empty {
  display: none;
}

.nav-set > .btn {
  margin-left: 0.15rem;
  flex: none;
}

.nav-link,
.text-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 400;
  color: inherit;
  cursor: pointer;
  opacity: 0.82;
}

.nav-link:hover,
.nav-link.is-active,
.text-link {
  opacity: 1;
  color: var(--accent-strong);
}

.nav-set > .nav-link:hover,
.nav-set > .nav-link:focus-visible {
  background: rgba(20, 44, 38, 0.05);
  color: var(--ink);
}

.nav-set > .nav-link.is-active {
  background: var(--accent-glow);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.nav-set > .btn {
  margin-left: 0.35rem;
}

.text-link {
  color: var(--accent);
  opacity: 1;
}

.view {
  display: none;
  position: relative;
  z-index: 1;
}

.view.is-on {
  display: block;
  animation: viewIn 0.42s var(--ease) both;
}

.lightbox {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  inset: 0;
  z-index: 10000 !important;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  width: 100% !important;
  height: 100% !important;
  min-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  box-sizing: border-box;
  flex: none !important;
  align-self: stretch;
  pointer-events: auto;
  transform: none !important;
}

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

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(14, 32, 28, 0.38);
  backdrop-filter: blur(14px) saturate(1.15);
  animation: fadeIn 0.28s ease;
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(92vh, 880px);
  overflow: auto;
  padding: 2.75rem 1.7rem 1.75rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(20, 44, 38, 0.08);
  box-shadow: var(--shadow-pop);
  animation: lbIn 0.24s var(--ease) both;
}

.lightbox-panel.is-wide {
  width: min(920px, 100%);
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  float: none;
  margin: 0;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(247, 251, 248, 0.96);
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 48, 40, 0.08);
}

.lightbox-close:hover {
  border-color: var(--accent);
}

.lb-pane {
  display: none;
}

.lb-pane.is-on {
  display: block;
  padding-top: 0.35rem;
}

.lightbox-panel > .lb-pane.is-on > h1:first-child {
  padding-right: 2.5rem;
}

.lightbox-panel h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0.15rem 0 0.4rem;
  line-height: 1.2;
}

.lightbox-panel .lede {
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0 0 1.35rem;
}

#lb-race-create label,
.PlaceSuggestWrap {
  position: relative;
}

.PlaceSuggest,
.RaceCitySuggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.2rem);
  z-index: 24;
  display: grid;
  max-height: 14rem;
  overflow: auto;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
}

.trip-inline.PlaceSuggestWrap {
  position: relative;
}

.trip-inline.PlaceSuggestWrap .PlaceSuggest {
  grid-column: 1 / -1;
}

.PlaceSuggest[hidden],
.RaceCitySuggest[hidden] {
  display: none !important;
}

.PlaceSuggestItem,
.RaceCitySuggestItem {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.92rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}

.PlaceSuggestItem:hover,
.PlaceSuggestItem:focus,
.RaceCitySuggestItem:hover,
.RaceCitySuggestItem:focus {
  background: rgba(15, 173, 122, 0.1);
}

.PlaceSuggestEmpty,
.RaceCitySuggestEmpty {
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

body.lb-open {
  overflow: hidden;
}

html:has(body.lb-open) {
  overflow: hidden;
}

body.lb-open .lightbox:not([hidden]) {
  display: grid !important;
  place-items: center;
}

.clickable-row {
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lbIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 0.5rem 0 0.4rem;
  line-height: 1.12;
}

.page-title .accent {
  background: linear-gradient(120deg, #0b9470 0%, #12c88a 42%, #1ed4a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--ink-muted);
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 40rem;
}

.PageHead {
  margin: 0.55rem 0 1.55rem;
}

.PageHead .page-title,
.PageHead > h1.page-title {
  margin: 0 0 0.42rem;
}

.PageHead .lede {
  margin: 0;
}

.PageToolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: -0.35rem 0 1.45rem;
}

.page > .card-grid + .hero-actions {
  margin-top: 1.35rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.quest-card {
  padding: 1.15rem 1.2rem;
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(135deg, rgba(15, 173, 122, 0.08), var(--bg-elevated) 48%);
  border: 1px solid rgba(15, 173, 122, 0.2);
  box-shadow: var(--shadow);
  transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.QuestCardIcon {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(15, 173, 122, 0.2), rgba(255, 138, 61, 0.14));
  color: var(--accent-strong);
  font-size: 1.18rem;
  box-shadow: inset 0 0 0 1px rgba(15, 173, 122, 0.14);
}

.QuestCardBody {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.SportSelectWrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
}

.SportSelectIcon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(15, 173, 122, 0.1);
  color: var(--accent-strong);
  flex: none;
  font-size: 1rem;
}

.SportChipIcon {
  opacity: 0.88;
}

.quest-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(15, 173, 122, 0.28);
  transform: translateY(-1px);
}

.quest-card h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(22, 48, 40, 0.1);
  overflow: hidden;
  margin: 0.7rem 0 0.35rem;
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  transition: width 0.2s ease;
}

.import-progress {
  margin-top: 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(247, 251, 248, 0.9);
}

.import-progress--floating {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1200;
  width: min(420px, calc(100vw - 2rem));
  margin: 0;
  transform: translateX(-50%);
  box-shadow: 0 16px 40px rgba(22, 48, 40, 0.18);
  backdrop-filter: blur(8px);
}

.import-progress--floating .import-progress-title {
  margin: 0 0 0.55rem;
  font-weight: 600;
  color: var(--ink);
}

.settings-activity-list .activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem 0.75rem;
  align-items: start;
}

.settings-activity-list .activity-item label.check-row {
  margin: 0;
  align-items: flex-start;
}

.settings-activity-list .activity-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-section-title {
  margin: 1.1rem 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.settings-section-title:first-child {
  margin-top: 0;
}

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

.chip-row {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  cursor: pointer;
  border: 1px solid var(--line);
}

.chip-btn.is-active {
  border-color: var(--accent);
  background: rgba(18, 184, 134, 0.16);
}

.sport-run.is-active { border-color: #0fad7a; background: rgba(15, 173, 122, 0.16); }
.sport-ride.is-active { border-color: #e8843a; background: rgba(232, 132, 58, 0.18); }
.sport-walk.is-active { border-color: #4a90e2; background: rgba(74, 144, 226, 0.18); }
.sport-hike.is-active { border-color: #388e70; background: rgba(56, 142, 112, 0.18); }
.sport-swim.is-active { border-color: #26a6ba; background: rgba(38, 166, 186, 0.18); }
.sport-water.is-active { border-color: #2078b4; background: rgba(32, 120, 180, 0.18); }
.sport-winter.is-active { border-color: #6e96be; background: rgba(110, 150, 190, 0.2); }
.trip-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.trip-finish-mode {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.trip-finish-mode legend {
  padding: 0 0.35rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.trip-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
}

.trip-mode-hint {
  margin: 0 0 0.85rem;
}

.trip-options-grid {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: start;
}

.trip-prefs-row {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: end;
  margin-top: 0.25rem;
}

.trip-radio-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.35;
  margin: 0;
  padding: 0.35rem 0;
  min-height: 1.5rem;
}

.trip-radio-row input[type="radio"] {
  position: static;
  opacity: 1;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  pointer-events: auto;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.trip-radio-row::before,
.trip-radio-row::after {
  content: none !important;
  display: none !important;
}

.trip-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.35;
  margin: 0;
  padding: 0.35rem 0;
  min-height: 1.5rem;
  user-select: none;
}

.trip-toggle-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.trip-toggle-track {
  display: block;
  width: 2.1rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(22, 48, 40, 0.18);
  position: relative;
  flex: 0 0 auto;
  transition: background 0.15s ease;
}

.trip-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(22, 48, 40, 0.35);
  transition: transform 0.15s ease;
}

.trip-toggle-row:has(input[type="checkbox"]:checked) .trip-toggle-track {
  background: #12b886;
}

.trip-toggle-row:has(input[type="checkbox"]:checked) .trip-toggle-thumb {
  transform: translateX(0.95rem);
}

.trip-toggle-row:has(input[type="checkbox"]:focus-visible) .trip-toggle-track {
  outline: 2px solid var(--accent, #12b886);
  outline-offset: 2px;
}

.suggest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.suggest-item {
  display: grid;
  gap: 0.35rem;
  text-align: left;
}

.suggest-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.suggest-item-actions .btn {
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .trip-options-grid,
  .trip-prefs-row {
    grid-template-columns: 1fr;
  }
}

.record-push-option {
  display: grid;
  gap: 0.45rem;
}

.record-push-option .check-row {
  margin: 0;
}

.record-push-connect {
  margin: 0;
  padding: 0.7rem 0.8rem 0.8rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(20, 44, 38, 0.1);
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.record-push-connect[hidden] {
  display: none !important;
}

.record-push-connect:not([hidden]) {
  display: grid !important;
}

.record-push-connect .meta {
  margin: 0;
}

.record-push-connect .btn {
  min-height: 2.2rem;
}

.sport-wheel.is-active { border-color: #b45aa0; background: rgba(180, 90, 160, 0.18); }
.sport-yoga.is-active { border-color: #9678c8; background: rgba(150, 120, 200, 0.18); }
.sport-gym.is-active { border-color: #786e64; background: rgba(120, 110, 100, 0.18); }
.sport-other.is-active { border-color: #8b6bc4; background: rgba(139, 107, 196, 0.18); }

.map-tools-flyout .sport-sheet {
  max-height: 11rem;
  overflow: auto;
}

.share-layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.share-preview-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.share-preview-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
}

.table-wrap { overflow: auto; }

.mini-board { margin: 0.6rem 0; }

.suggest-item {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

@media (max-width: 800px) {
  .share-layout { grid-template-columns: 1fr; }
  .site-header { flex-wrap: wrap; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.25rem;
  min-height: 2.75rem;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
  transition:
    transform var(--duration) var(--ease),
    background var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    opacity var(--duration) var(--ease);
}

button.btn,
a.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-warm,
.btn-danger,
.btn-sm,
.btn-google,
.chip-btn,
.CalSeg button,
.LeaderboardFilters .btn {
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: capitalize;
}

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

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, #12c88a 0%, var(--accent) 48%, #0a9f6c 100%);
  color: #ffffff;
  box-shadow:
    0 1px 2px rgba(20, 44, 38, 0.06),
    0 10px 28px rgba(15, 173, 122, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-primary:hover,
.btn-primary:visited,
a.btn-primary {
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #14d695 0%, var(--accent-strong) 52%, #0b9470 100%);
  box-shadow:
    0 2px 6px rgba(20, 44, 38, 0.08),
    0 16px 36px rgba(15, 173, 122, 0.34);
}

.btn-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  color: var(--ink);
  border: 1px solid rgba(20, 44, 38, 0.16);
  box-shadow:
    0 1px 2px rgba(20, 44, 38, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  border-color: rgba(15, 173, 122, 0.38);
  box-shadow: var(--shadow-hover);
  color: var(--ink);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-muted);
  border: 1px solid rgba(20, 44, 38, 0.14);
  box-shadow:
    0 1px 2px rgba(20, 44, 38, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: rgba(15, 173, 122, 0.38);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-hover);
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  min-height: 2.35rem;
  font-size: 0.9rem;
}

.btn-warm {
  background: #f4f0ea;
  color: #6b3d12;
  border: 1px solid rgba(232, 132, 58, 0.35);
  box-shadow: none;
}

.btn-warm:hover {
  background: #efe6da;
  border-color: rgba(232, 132, 58, 0.5);
}

.page {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: none;
  margin: 0 auto 3rem;
}

.privacy-page {
  max-width: 42rem;
  padding: 1.5rem 0 3rem;
}

.privacy-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.privacy-page h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 1.75rem 0 0.55rem;
}

.privacy-page ul {
  padding-left: 1.2rem;
}

.privacy-page li + li {
  margin-top: 0.35rem;
}

.nav-set > a.nav-link {
  text-decoration: none;
  color: inherit;
}

.hero {
  display: grid;
  gap: 1.75rem;
  padding: 2rem 0 3rem;
  min-height: 0;
  align-content: start;
  position: relative;
}

.hero-copy {
  max-width: 38rem;
  animation: rise 0.9s var(--ease) both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  margin-bottom: 1rem;
  padding: 0.38rem 0.72rem 0.38rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 173, 122, 0.18);
  box-shadow: 0 1px 2px rgba(20, 44, 38, 0.04);
}

.hero-kicker-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 173, 122, 0.16);
  animation: pulseDot 2.4s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 6.8vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 0 0 1.1rem;
}

.hero h1 .accent {
  background: linear-gradient(120deg, #0b9470 0%, #12c88a 42%, #1ed4a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--ink-muted);
  font-size: 1.08rem;
  max-width: 34rem;
  margin: 0 0 1.25rem;
  line-height: 1.65;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.45rem;
}

.hero-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(20, 44, 38, 0.08);
  font-size: 0.82rem;
  color: var(--ink-muted);
  box-shadow: 0 1px 2px rgba(20, 44, 38, 0.04);
  animation: rise 0.8s var(--ease) both;
}

.hero-stat:nth-child(1) { animation-delay: 0.12s; }
.hero-stat:nth-child(2) { animation-delay: 0.16s; }
.hero-stat:nth-child(3) { animation-delay: 0.2s; }
.hero-stat:nth-child(4) { animation-delay: 0.24s; }

.hero-stat strong {
  color: var(--ink);
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.85s var(--ease) 0.16s both;
}

.hero-visual {
  position: relative;
  min-height: 280px;
  max-height: 420px;
  border-radius: calc(var(--radius-lg) + 2px);
  overflow: hidden;
  border: 1px solid rgba(15, 173, 122, 0.16);
  background: linear-gradient(145deg, #dcefe4 0%, #c8e6d6 100%);
  box-shadow:
    var(--shadow-pop),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  animation: rise 0.85s var(--ease) 0.1s both;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-visual.is-live {
    animation: rise 0.85s var(--ease) 0.1s both, heroFloat 7s ease-in-out 1s infinite;
  }
}

.hero-visual-glow {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(18, 200, 138, 0.28), transparent 42%),
    radial-gradient(circle at 70% 70%, rgba(232, 132, 58, 0.16), transparent 40%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero-map-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem 0.55rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 44, 38, 0.08);
  box-shadow: 0 8px 24px rgba(20, 44, 38, 0.12);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease);
}

.hero-map-badge.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-map-badge-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 173, 122, 0.18);
  animation: pulseDot 2s ease-in-out infinite;
}

.hero-map-badge-copy {
  display: grid;
  gap: 0.05rem;
  line-height: 1.15;
}

.hero-map-badge-copy strong {
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.hero-map-badge-copy span,
#heroMapMeta {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.grid-demo {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 3px;
  padding: 18px;
}

.grid-demo span {
  background: rgba(238, 244, 240, 0.04);
  border: 1px solid rgba(238, 244, 240, 0.05);
  transition: background 0.4s ease, transform 0.4s ease;
}

.grid-demo span.claimed {
  background: rgba(61, 154, 120, 0.55);
  border-color: rgba(61, 154, 120, 0.8);
  box-shadow: inset 0 0 18px rgba(61, 154, 120, 0.35);
}

.grid-demo span.hot {
  background: rgba(212, 146, 58, 0.55);
  border-color: rgba(212, 146, 58, 0.75);
}

.grid-demo span.pulse {
  animation: claimPulse 1.8s ease infinite;
}

@keyframes claimPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.03); filter: brightness(1.15); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes featureIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes heroGlow {
  from { opacity: 0.65; transform: scale(1); }
  to { opacity: 1; transform: scale(1.06); }
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}

@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -12px, 0); }
}

@keyframes btnShimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(220%); }
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.features {
  display: grid;
  gap: 1.5rem;
  margin-top: 0.5rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid rgba(20, 44, 38, 0.08);
  position: relative;
}

.features-intro {
  max-width: 42rem;
}

.features-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.features h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0 0 0.55rem;
  max-width: 20ch;
}

.features-intro > p:last-child {
  color: var(--ink-muted);
  margin: 0;
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 1.6;
}

.features > p {
  color: var(--ink-muted);
  margin: 0 0 1.75rem;
  max-width: 42rem;
}

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

.feature {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1.3rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.78) 100%);
  border: 1px solid rgba(20, 44, 38, 0.08);
  box-shadow: 0 1px 2px rgba(20, 44, 38, 0.04);
  backdrop-filter: blur(8px);
  transition:
    background var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    box-shadow 0.28s var(--ease),
    transform 0.28s var(--ease);
  opacity: 0;
  animation: featureIn 0.65s var(--ease) both;
}

.feature:nth-child(1) { animation-delay: 0.04s; }
.feature:nth-child(2) { animation-delay: 0.08s; }
.feature:nth-child(3) { animation-delay: 0.12s; }
.feature:nth-child(4) { animation-delay: 0.16s; }
.feature:nth-child(5) { animation-delay: 0.2s; }
.feature:nth-child(6) { animation-delay: 0.24s; }
.feature:nth-child(7) { animation-delay: 0.28s; }
.feature:nth-child(8) { animation-delay: 0.32s; }
.feature:nth-child(9) { animation-delay: 0.36s; }
.feature:nth-child(10) { animation-delay: 0.4s; }
.feature:nth-child(11) { animation-delay: 0.44s; }
.feature:nth-child(12) { animation-delay: 0.48s; }

.feature-icon--instagram {
  color: #e1306c;
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.12), rgba(253, 29, 29, 0.08));
}

.feature:nth-child(odd),
.feature:nth-child(even) {
  padding: 1.25rem 1.3rem;
  border-right: 0;
}

.feature:hover {
  border-color: rgba(15, 173, 122, 0.28);
  transform: translateY(-3px);
  background: #ffffff;
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(15, 173, 122, 0.18), rgba(15, 173, 122, 0.06));
  border: 1px solid rgba(15, 173, 122, 0.18);
  color: var(--accent-strong);
  font-size: 1rem;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.feature:hover .feature-icon {
  transform: scale(1.06);
  box-shadow: 0 8px 18px rgba(15, 173, 122, 0.16);
}

.feature-copy {
  min-width: 0;
}

.feature h3 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.02rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.feature p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .feature-list {
    grid-template-columns: 1fr;
  }

  .feature:nth-child(odd),
  .feature:nth-child(even) {
    padding: 1.15rem 1.2rem;
    border-right: 1px solid rgba(20, 44, 38, 0.08);
  }
}

.auth-shell {
  min-height: calc(100vh - 5rem);
  display: grid;
  place-items: center;
  padding: 1rem 0 3rem;
}

.auth-card {
  width: min(440px, 100%);
  padding: 2rem 1.6rem;
  border-radius: calc(var(--radius) + 2px);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: rise 0.5s var(--ease) both;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
}

.auth-card .lede {
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
}

.form-stack {
  display: grid;
  gap: 0.95rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

input {
  width: 100%;
  border: 1px solid rgba(20, 44, 38, 0.12);
  background: #ffffff;
  color: var(--ink);
  border-radius: 12px;
  padding: 0.78rem 0.95rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus {
  border-color: rgba(18, 184, 134, 0.7);
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.18);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.form-footer a {
  color: var(--accent);
  font-weight: 700;
}

.alert {
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  line-height: 1.4;
}

.alert[hidden] {
  display: none !important;
}

.alert:not([hidden]) {
  display: block;
}

.alert-error {
  background: #fde8e4;
  border: 1px solid #e85d4c;
  color: #9b1c10;
}

.alert-warn,
.alert-warning,
.alert-info {
  background: #fff1e4;
  border: 1px solid #e8843a;
  color: #9a4b0f;
}

.alert-success {
  background: #e3f7ee;
  border: 1px solid #0fad7a;
  color: #0b5c43;
}

.alert .text-link {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
}

.app-shell {
  width: 90%;
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  min-height: calc(100vh - 6rem);
}

.MapTerritoryStats {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.85rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.MapTerritoryStats .ActivityCardStats {
  gap: 0.75rem 1.75rem;
}

.side-panel {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: box-shadow var(--duration) var(--ease);
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  font-weight: 600;
}

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

.panel-primary {
  position: sticky;
  top: 0.65rem;
  z-index: 2;
  box-shadow: var(--shadow-hover);
}

.panel-fold {
  padding: 0;
  overflow: hidden;
}

.panel-fold > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--ink-muted);
  font-weight: 650;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-body);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.panel-fold > summary::-webkit-details-marker {
  display: none;
}

.panel-fold > summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.18s ease;
  flex: none;
}

.panel-fold[open] > summary {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.panel-fold[open] > summary::after {
  transform: rotate(-135deg);
}

.panel-fold-body {
  padding: 0.85rem 1rem 1rem;
}

.panel-fold:not([open]) {
  background: rgba(255, 255, 255, 0.72);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.PbSectionTitle {
  margin: 1.25rem 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.stat {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.stat .label {
  display: block;
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.stat .value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  display: block;
}

.stat .meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.map-stage {
  position: relative;
  min-height: 70vh;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  background: #dcefe4;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  background: #dcefe4;
}

.map-overlay {
  position: absolute;
  z-index: 500;
  top: max(0.75rem, env(safe-area-inset-top));
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
}

.map-overlay > * {
  pointer-events: auto;
}

.map-overlay-status,
.map-overlay-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.map-overlay-controls {
  margin-left: auto;
}

.map-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: min(100%, 24rem);
  min-width: 0;
}

.RoutesFocusBar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(20, 44, 38, 0.88);
  color: #f4faf7;
  font-size: 0.82rem;
  line-height: 1.2;
  max-width: min(100%, 28rem);
}

.RoutesFocusBar[hidden] {
  display: none !important;
}

.RoutesFocusBarText {
  min-width: 0;
}

.RoutesFocusBar .btn {
  color: #e8f3ec;
  border-color: transparent;
  background: transparent;
  padding: 0.15rem 0.45rem;
}

.map-status-chip #gridChip,
.map-status-chip #syncChip {
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-status-sep {
  opacity: 0.45;
}

.map-stage .leaflet-top.leaflet-right {
  top: auto;
  bottom: 12px;
  right: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition:
    background var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.chip-btn:hover,
.chip.chip-btn:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(15, 173, 122, 0.28);
}

.activity-list,
.badge-list,
.leader-list {
  display: grid;
  gap: 0.35rem;
  max-height: 280px;
  overflow: auto;
}

.activity-item,
.badge-item,
.leader-item {
  display: grid;
  gap: 0.18rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(20, 44, 38, 0.08);
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.activity-item:last-child,
.badge-item:last-child,
.leader-item:last-child {
  border-bottom-color: rgba(20, 44, 38, 0.08);
}

.activity-item:hover,
.leader-item:hover {
  background: #fff;
  border-color: rgba(15, 173, 122, 0.22);
  box-shadow: var(--shadow);
}

.activity-item strong,
.badge-item strong,
.leader-item strong {
  font-size: 0.92rem;
}

.meta {
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.leader-item {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
}

.leader-item.is-you {
  border-color: rgba(61, 154, 120, 0.45);
  background: rgba(61, 154, 120, 0.12);
}

.rank {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--warm);
  min-width: 1.5rem;
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: #06351f;
  overflow: hidden;
}

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

.toast-stack {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  right: auto;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 9999;
  display: grid;
  gap: 0.5rem;
  width: min(340px, calc(100% - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.85rem 0.75rem 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-hover);
  animation: toastIn var(--duration) var(--ease) both;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast strong {
  display: block;
  margin-bottom: 0.15rem;
}

.toast span {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.toast-dismiss {
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.toast-dismiss:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

.toast--ok {
  border-left-color: var(--accent-strong);
}

.toast--warn {
  border-left-color: var(--warm);
  background: #fffaf5;
}

.toast--error {
  border-left-color: var(--danger);
  background: #fff7f6;
}

.toast--info {
  border-left-color: #4aa3c7;
}

.toast--out {
  animation: toastOut 0.25s ease both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.empty {
  color: var(--ink-muted);
  font-size: 0.92rem;
  padding: 0.4rem 0;
}

.empty-state {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.empty-state .btn {
  margin-top: 0.15rem;
}

.empty--loading {
  position: relative;
  padding-left: 1.35rem;
}

.empty--loading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 2px solid rgba(18, 184, 134, 0.25);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.leaderboard-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 0.5rem 0 0.35rem;
}

.leaderboard-page .lede {
  color: var(--ink-muted);
  margin: 0 0 1.25rem;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.leaderboard-table th,
.leaderboard-table td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.leaderboard-table th {
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(248, 251, 249, 0.9);
}

.leaderboard-table td:nth-child(1),
.leaderboard-table th:nth-child(1),
.leaderboard-table td:nth-child(3),
.leaderboard-table th:nth-child(3),
.leaderboard-table td:nth-child(4),
.leaderboard-table th:nth-child(4) {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.leaderboard-table td:nth-child(2),
.leaderboard-table th:nth-child(2) {
  text-align: left;
  width: auto;
}

.leaderboard-table tbody tr {
  transition: background var(--duration) var(--ease);
}

.leaderboard-table tbody tr:hover {
  background: rgba(15, 173, 122, 0.05);
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.leaderboard-table tr.is-you {
  background: rgba(15, 173, 122, 0.1);
}

.leaderboard-table tr.is-you:hover {
  background: rgba(15, 173, 122, 0.14);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.leaflet-container {
  font: inherit;
  background: #dcefe4;
}

.leaflet-popup-content-wrapper {
  background: #ffffff;
  color: var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.leaflet-popup-tip {
  background: #ffffff;
}

.leaflet-control-zoom a {
  background: #ffffff !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

#mapStatsToggle {
  display: none;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(62vh, 1fr) auto;
  }

  .view-map .app-shell {
    display: flex;
    flex-direction: column;
  }

  .view-map .MapTerritoryStats {
    order: -2;
  }

  .view-map .map-stage {
    order: -1;
    min-height: 62vh;
    position: sticky;
    top: 3.4rem;
    z-index: 2;
  }

  .view-map .side-panel {
    order: 1;
    max-height: none;
  }

  .view-map:not(.map-stats-open) .side-panel {
    display: none;
  }

  .map-stage,
  #map {
    min-height: 62vh;
  }

  #mapStatsToggle {
    display: inline-flex;
  }
}

.map-tools {
  position: relative;
  display: inline-block;
}

.map-tools > summary {
  list-style: none;
  cursor: pointer;
}

.map-tools > summary::-webkit-details-marker {
  display: none;
}

.map-tools-flyout {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 13.5rem;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
}

.map-tools-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

.map-tools-flyout .chip-row {
  margin: 0;
}

.map-tools-flyout .chip-btn {
  justify-content: flex-start;
}

body.kids-mode .adult-only,
body.kids-mode .map-tools .adult-only {
  display: none !important;
}

#clubMapMode:not([hidden]) {
  background: rgba(255, 138, 61, 0.18);
  border-color: rgba(255, 138, 61, 0.45);
  cursor: pointer;
}

.ChatbotRoot {
  bottom: max(18px, env(safe-area-inset-bottom));
  right: max(18px, env(safe-area-inset-right));
}

.view-map .ChatbotRoot {
  bottom: max(72px, calc(18px + env(safe-area-inset-bottom)));
}

@media (max-width: 640px) {
  .site-header {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.5rem 1.15rem;
  }

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

select {
  width: 100%;
  border: 1px solid rgba(20, 44, 38, 0.12);
  background: #ffffff;
  color: var(--ink);
  border-radius: 12px;
  padding: 0.78rem 0.95rem;
  font: inherit;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.35;
  position: relative;
  padding-left: 3.1rem;
  min-height: 1.5rem;
  margin: 0.55rem 0;
}

.form-stack > .check-row,
.form-stack > label.check-row {
  margin: 0.35rem 0;
}

.form-stack > .check-row + .check-row,
.form-stack > label.check-row + label.check-row {
  margin-top: 0.85rem;
}

.check-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.check-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2.55rem;
  height: 1.4rem;
  border-radius: 999px;
  background: rgba(22, 48, 40, 0.18);
  border: 1px solid rgba(22, 48, 40, 0.12);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.check-row::after {
  content: "";
  position: absolute;
  left: 0.18rem;
  top: 0.26rem;
  width: 1.08rem;
  height: 1.08rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(22, 48, 40, 0.22);
  transition: transform 0.18s ease;
}

.check-row:has(input[type="checkbox"]:checked)::before {
  background: var(--accent);
  border-color: var(--accent-strong);
}

.check-row:has(input[type="checkbox"]:checked)::after {
  transform: translateX(1.15rem);
}

.check-row:has(input[type="checkbox"]:focus-visible)::before {
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.28);
}

.check-row:has(input[type="checkbox"]:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.heat-cal {
  display: grid;
  grid-template-rows: repeat(7, 9px);
  grid-auto-flow: column;
  gap: 3px;
  max-height: 90px;
  overflow: hidden;
}

.heat-full {
  max-height: none;
  grid-template-rows: repeat(7, 11px);
}

.heat-cell {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: block;
}

.heat-full .heat-cell {
  width: 11px;
  height: 11px;
}

.CalendarToolbar {
  display: none;
}

.CalControl {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.35rem;
  margin: 0 0 1.15rem;
  padding: 0.95rem 1.15rem 1.05rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
}

.CalControlGroup {
  display: grid;
  gap: 0.38rem;
  flex: 1 1 13rem;
  min-width: 12rem;
}

.CalControlLabel {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.CalSeg {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 0.18rem;
  padding: 0.22rem;
  background: rgba(20, 44, 38, 0.045);
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(20, 44, 38, 0.04);
}

.CalSeg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  padding: 0.48rem 0.82rem;
  border-radius: 999px;
  cursor: pointer;
  flex: 1 1 auto;
  text-align: center;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.CalSeg button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
}

.CalSeg button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(20, 44, 38, 0.12);
  transform: translateY(-1px);
}

.CalendarDates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.1rem;
  flex: 1 1 100%;
  width: 100%;
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

.CalendarDateField {
  display: grid;
  grid-template-rows: 0fr;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition:
    grid-template-rows 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}

.CalendarDateField.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
}

.CalendarDateFieldInner {
  overflow: hidden;
  min-height: 0;
}

.CalendarSplitRow {
  display: grid;
  gap: 0.38rem;
  flex: 1 1 100%;
  min-width: 0;
}

.HeatChartWrap {
  margin-top: 0.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 0.95rem;
  box-shadow: var(--shadow);
}

.HeatChart {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0.45rem 0.65rem;
  min-height: 22rem;
  width: 100%;
}

.HeatChartY {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.72rem;
  color: var(--ink-muted);
  padding: 0.35rem 0 0;
  min-height: 18rem;
  align-self: start;
}

.HeatChartScroll {
  min-width: 0;
  width: 100%;
  overflow-x: auto;
}

.HeatChartPlot {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  column-gap: 0.18rem;
  min-height: 18rem;
  width: 100%;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  padding: 0.35rem 0.2rem 0 0.35rem;
  background:
    repeating-linear-gradient(
      to top,
      transparent,
      transparent calc(25% - 1px),
      rgba(20, 44, 38, 0.05) calc(25% - 1px),
      rgba(20, 44, 38, 0.05) 25%
    );
}

.HeatChartBar {
  width: 100%;
  min-width: 0;
  max-width: none;
  background: linear-gradient(180deg, #1cc38a 0%, #0b9470 100%);
  border-radius: 5px 5px 0 0;
  position: relative;
  min-height: 2px;
}

.HeatChartBar.is-empty {
  background: rgba(20, 44, 38, 0.08);
  min-height: 2px;
}

.HeatChartBar:hover {
  filter: brightness(1.06);
}

.HeatChartWrap.is-dense .HeatChartPlot,
.HeatChartWrap.is-dense .HeatChartX {
  min-width: 100%;
  grid-auto-columns: minmax(0, 1fr);
}

.HeatChartWrap.is-dense .HeatChartBar,
.HeatChartWrap.is-dense .HeatChartX span {
  min-width: 0;
  max-width: none;
}

.HeatChartX {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  column-gap: 0.18rem;
  width: 100%;
  padding: 0.4rem 0.2rem 0 0.35rem;
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.HeatChartX span {
  min-width: 0;
  max-width: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.HeatChartX.is-months {
  display: flex;
  grid-auto-columns: unset;
  column-gap: 0;
}

.HeatChartX.is-months span {
  overflow: visible;
  text-overflow: unset;
  font-weight: 650;
  letter-spacing: 0.01em;
  min-width: 0;
}

.HeatChartWrap.is-dense .HeatChartX.is-months {
  min-width: 100%;
}

@media (max-width: 640px) {
  .HeatChart {
    grid-template-columns: 2.6rem minmax(0, 1fr);
    min-height: 16rem;
  }

  .HeatChartPlot {
    min-height: 14rem;
  }

  .HeatChartY {
    min-height: 14rem;
  }
}

.photo-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.photo-row img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
}

.notif-btn {
  position: relative;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warm);
  display: inline-block;
  margin-left: 0.15rem;
}

.nav-notif-btn {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 44, 38, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.95rem;
}

.nav-notif-btn:hover,
.nav-notif-btn:focus-visible {
  border-color: rgba(15, 173, 122, 0.35);
  background: rgba(15, 173, 122, 0.1);
  outline: none;
}

.nav-notif-btn .notif-dot--badge {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  margin: 0;
  box-shadow: 0 0 0 2px #fff;
}

.nav-label-short {
  display: none;
}

@media (max-width: 1100px) and (min-width: 921px) {
  .nav-label-long {
    display: none;
  }
  .nav-label-short {
    display: inline;
  }
}

.EmptyCardActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

body.kids-mode .adult-only {
  display: none !important;
}

body[data-season="spring"] {
  --accent: #2ec27e;
  --warm: #f778a8;
}

body[data-season="summer"] {
  --accent: #12b886;
  --warm: #ff9f43;
}

body[data-season="autumn"] {
  --accent: #e07a3d;
  --warm: #f0b429;
}

body[data-season="winter"] {
  --accent: #4aa3c7;
  --warm: #7eb8d4;
}

a.chip-btn {
  text-decoration: none;
}

.nav-menu {
  position: relative;
  margin-left: 0;
}

.nav-menu > summary {
  list-style: none;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}

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

.nav-menu[open] > summary,
.nav-menu > summary:hover {
  border-color: transparent;
  background: rgba(15, 173, 122, 0.08);
}

.nav-avatar-btn {
  max-width: 12rem;
  padding: 0.18rem 0.35rem 0.18rem 0.18rem !important;
}

.nav-account > summary.nav-avatar-btn:hover,
.nav-account[open] > summary.nav-avatar-btn {
  background: rgba(20, 44, 38, 0.05);
  border-color: rgba(20, 44, 38, 0.08);
}

.nav-avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  flex: none;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 1px 4px rgba(20, 44, 38, 0.16);
}

.nav-avatar img,
.UserAvatar img,
.ProfileAvatar img,
.FriendsAvatar img,
.SocialAvatar img,
.SettingsAvatarPreview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-avatar-caret {
  font-size: 0.72rem;
  line-height: 1;
  width: auto;
  height: auto;
  border: 0;
  color: var(--ink);
  opacity: 0.78;
  flex: none;
  margin: 0 0.42rem 0 0.02rem;
  transform: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-menu[open] .nav-avatar-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown {
  margin-left: 0;
}

.nav-dropdown > summary.nav-dropdown-toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.48rem 0.82rem;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink-muted);
  opacity: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

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

.nav-dropdown > summary.nav-dropdown-toggle:hover,
.nav-dropdown[open] > summary.nav-dropdown-toggle,
.nav-dropdown.is-active > summary.nav-dropdown-toggle {
  opacity: 1;
  color: var(--ink);
  border-color: transparent;
  background: rgba(20, 44, 38, 0.05);
}

.nav-dropdown.is-active > summary.nav-dropdown-toggle {
  background: var(--accent-glow);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.nav-dropdown .nav-flyout {
  left: 0;
  right: auto;
}

.nav-dropdown .nav-avatar-caret {
  margin: 0 0 0 0.05rem;
  font-size: 0.62rem;
  opacity: 0.55;
}

.nav-flyout {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  min-width: 14.5rem;
  display: grid;
  gap: 0.12rem;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  z-index: 40;
  animation: toastIn var(--duration) var(--ease) both;
}

.nav-flyout .nav-link,
.nav-flyout .btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: flex-start;
  border-radius: 11px;
  padding: 0.62rem 0.8rem;
  color: var(--ink);
  font-weight: 600;
  background: transparent;
}

.nav-flyout .nav-link:hover,
.nav-flyout .nav-link:focus-visible {
  background: var(--accent-glow);
  color: var(--ink);
}

.nav-flyout .nav-link.is-active {
  background: var(--accent-glow);
  color: var(--accent-strong);
}

.nav-flyout .nav-link-icon {
  display: inline-block;
}

.nav-flyout .nav-link-danger {
  color: var(--danger);
}

.nav-flyout .nav-link-danger:hover {
  color: var(--danger);
  background: rgba(232, 93, 76, 0.08);
}

.btn-danger {
  background: linear-gradient(135deg, #f07a6c, var(--danger));
  color: #fff;
  box-shadow: 0 10px 24px rgba(232, 93, 76, 0.22);
}

.danger-zone {
  margin-top: 1.4rem;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: 14px;
  background: rgba(248, 251, 249, 0.7);
}

.danger-zone h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

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

.checklist li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.checklist li.is-done {
  color: var(--accent-strong);
}

.checklist .mark {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: none;
  margin-top: 0.12rem;
}

.checklist li.is-done .mark {
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 920px) {
  .nav-flyout {
    position: static;
    box-shadow: none;
    margin: 0.25rem 0 0.45rem;
    padding: 0.2rem;
    background: transparent;
    border: 0;
    min-width: 0;
  }

  .site-header-tools .nav-flyout {
    position: absolute;
    right: 0;
    top: calc(100% + 0.55rem);
    min-width: 15rem;
    margin: 0;
    padding: 0.45rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(20, 44, 38, 0.08);
    border-radius: 16px;
    box-shadow: var(--shadow-pop);
  }
}

textarea {
  width: 100%;
  border: 1px solid rgba(20, 44, 38, 0.12);
  background: #ffffff;
  color: var(--ink);
  border-radius: 12px;
  padding: 0.78rem 0.95rem;
  font: inherit;
  outline: none;
  resize: vertical;
  min-height: 6rem;
}

textarea:focus {
  border-color: rgba(18, 184, 134, 0.7);
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.18);
}

.contact-form {
  max-width: 32rem;
}

.gpx-import {
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
  padding: 0.7rem 0.65rem;
  flex: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 60;
  margin-right: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-scrim {
  display: none;
}

.admin-only[hidden] {
  display: none !important;
}

.admin-shell {
  width: 90%;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  min-height: calc(100vh - 6rem);
  position: relative;
}

.adminNavTrigger {
  display: none;
}

.adminNavOverlay {
  display: none;
}

.adminNav {
  display: grid;
  gap: 0.12rem;
  align-content: start;
  background: var(--bg-elevated);
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: var(--radius-lg);
  padding: 0.85rem 0.7rem;
  box-shadow: var(--shadow);
}

.adminNavHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0.35rem 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.adminNavTitle {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.adminNavClose {
  display: none;
  border: 0;
  background: none;
  font-size: 1.4rem;
  cursor: pointer;
}

.adminTab {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 600;
  padding: 0.62rem 0.8rem;
  border-radius: 11px;
  cursor: pointer;
  min-height: 2.55rem;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.adminTab:hover {
  background: rgba(20, 44, 38, 0.045);
  color: var(--ink);
}

.adminTab.adminActive {
  background: var(--accent-glow);
  color: var(--accent-strong);
}

.adminMain {
  background: var(--bg-elevated);
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem 1.55rem;
  min-width: 0;
  box-shadow: var(--shadow);
}

.adminHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.adminHeader h1,
.adminHeader .page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.adminPane {
  display: none;
}

.adminPane.is-on {
  display: block;
}

.admin-h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 1.25rem 0 0.6rem;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.admin-toolbar input,
.admin-toolbar select {
  flex: 1 1 10rem;
  min-width: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-table td,
.admin-table th {
  font-size: 0.88rem;
  vertical-align: top;
}

.admin-stats {
  margin-bottom: 1rem;
}

.admin-email-form {
  max-width: 36rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-chrome {
    overflow-x: clip;
  }

  .site-header {
    padding: 0.85rem max(1.15rem, env(safe-area-inset-right)) 0.85rem max(1.15rem, env(safe-area-inset-left));
    gap: 0.85rem;
    max-width: 100%;
  }

  .brand {
    font-size: 1.05rem;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-logo {
    height: 2.85rem;
    max-width: min(100%, calc(100vw - 6.5rem));
  }

  .brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(14rem, calc(100vw - 6.5rem));
  }

  .page {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: max-content;
    min-width: 16.5rem;
    max-width: min(20rem, calc(100vw - 1.75rem));
    height: 100vh;
    height: 100dvh;
    background: rgba(252, 255, 253, 0.98);
    border-left: 1px solid rgba(20, 44, 38, 0.08);
    padding: 4.5rem 0.9rem 2rem;
    transform: translateX(110%);
    transition: transform 0.22s ease;
    z-index: 55;
    overflow: auto;
    align-items: stretch;
    font-size: 0.95rem;
    box-sizing: border-box;
    box-shadow: var(--shadow-pop);
  }

  body.nav-open .site-nav {
    transform: translateX(0);
  }

  .nav-set {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .nav-set > .nav-link,
  .nav-set > .btn,
  .nav-set > .nav-user-label,
  .nav-set > .nav-dropdown {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.45rem;
    justify-content: flex-start;
    padding: 0.55rem 0.7rem;
    width: 100%;
    max-width: none;
    border-radius: 10px;
    white-space: nowrap;
  }

  .nav-set > .nav-dropdown {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 0;
  }

  .nav-dropdown > summary.nav-dropdown-toggle {
    width: 100%;
    min-height: 2.45rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
  }

  .site-nav .nav-link-icon {
    display: inline-block;
  }

  .nav-set > .nav-user-label {
    display: flex;
    align-items: center;
    max-width: none;
    color: var(--ink-muted);
    background: rgba(22, 48, 40, 0.04);
    border: 1px solid var(--line);
  }

  .nav-set > .btn {
    margin: 0.35rem 0 0;
    justify-content: center;
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(22, 48, 40, 0.28);
    z-index: 50;
  }

  .nav-scrim[hidden] {
    display: none !important;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .adminNavTrigger {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    font: inherit;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 0.5rem;
  }

  .adminNavOverlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(22, 48, 40, 0.28);
    z-index: 70;
    opacity: 0;
    pointer-events: none;
  }

  .adminNavOverlay.adminNavOverlayShow {
    opacity: 1;
    pointer-events: auto;
  }

  .adminNavDock {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 80;
    transform: translateX(-110%);
    transition: transform 0.22s ease;
  }

  .adminNavDock.is-open {
    transform: translateX(0);
  }

  .adminNav {
    width: min(18rem, 86vw);
    height: 100%;
    border-radius: 0;
    overflow: auto;
  }

  .adminNavClose {
    display: inline-flex;
  }

  .lightbox {
    padding: 0.5rem;
    align-items: end;
  }

  .lightbox-panel,
  .lightbox-panel.is-wide {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 1.25rem 1rem 1.4rem;
    border-radius: 16px 16px 0 0;
    transition: transform 0.2s ease, max-height 0.2s ease;
    will-change: transform;
  }

  body.lb-keyboard .lightbox {
    align-items: end;
  }

  body.lb-keyboard .lightbox-panel,
  body.lb-keyboard .lightbox-panel.is-wide {
    transform: translateY(calc(-1 * var(--lb-kb-offset, 0px)));
    max-height: min(92dvh, calc(100dvh - var(--lb-kb-offset, 0px) - 0.75rem));
  }

  /* Record lightbox: full-width bottom sheet + start CTA above scrolling form layers */
  body.lb-open .lightbox:has(#lb-record.is-on) {
    padding: 0;
    place-items: end stretch;
  }

  .lightbox-panel:has(#lb-record.is-on),
  .lightbox-panel.is-wide:has(#lb-record.is-on) {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 18px 18px 0 0;
    max-height: min(94dvh, 100%);
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  }

  #lb-record .RecordSetupForm {
    padding-bottom: 0.15rem;
  }

  #lb-record .RecordSetupHint {
    margin-bottom: 0.35rem;
  }

  #lb-record .RecordStartBar {
    z-index: 30;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.85rem;
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    box-shadow: 0 -12px 32px rgba(22, 48, 40, 0.12);
  }

  .map-overlay {
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
  }

  .chip,
  .chip-btn {
    min-height: 2.5rem;
  }

  .page {
    width: 90%;
  }

  .hero {
    min-height: auto;
    padding: 1.25rem 0 2.5rem;
  }

  .features {
    margin-top: 1.5rem;
    padding-top: 1.75rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.75rem max(1.1rem, env(safe-area-inset-right)) 0.75rem max(1.1rem, env(safe-area-inset-left));
    gap: 0.75rem;
  }

  .brand-logo {
    max-width: calc(100vw - 6.25rem);
  }

  .page {
    width: 98%;
  }

  .site-header,
  .app-shell,
  .admin-shell {
    width: 98%;
  }

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

  .feature-list {
    grid-template-columns: 1fr;
  }

  .btn {
    min-height: 2.75rem;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.7rem 0.65rem;
    font-size: 0.86rem;
  }

  .map-stage,
  #map {
    min-height: 48vh;
  }
}

#heroMap {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 220px;
  opacity: 0;
  transition: opacity 0.65s ease;
}

#heroMap.is-ready {
  opacity: 1;
}

.hero-visual .leaflet-container {
  background: #dcefe4;
}

.btn-google {
  background: #ffffff;
  color: #1f1f1f;
  border: 2px solid #4285f4;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-weight: 400;
  font-size: 1rem;
  min-height: 3rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(66, 133, 244, 0.18);
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-google:hover {
  background: #f8fbff;
  box-shadow: 0 10px 24px rgba(66, 133, 244, 0.24);
  transform: translateY(-1px);
  color: #1f1f1f;
}

.btn-google::before {
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.auth-social {
  margin: 0.15rem 0 1.1rem;
  padding: 1rem 1.05rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid rgba(66, 133, 244, 0.28);
  background: linear-gradient(180deg, #f5f9ff 0%, #eef4ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.15rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

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

.auth-divider span {
  white-space: nowrap;
}

.trip-map {
  height: 280px;
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  overflow: hidden;
}

.trip-form {
  width: 100%;
  max-width: none;
}

.trip-form > label,
.trip-form .PlaceSuggestWrap,
.trip-form .SportSelectWrap,
.trip-form .trip-inline,
.trip-form #tripCustomFields,
.trip-form #tripRandomFields,
.trip-form #tripPaintFields,
.trip-form .trip-finish-mode,
.trip-form .trip-options-grid,
.trip-form .trip-prefs-row,
.trip-form .hero-actions,
.trip-form .chip-row {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.trip-form .trip-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.trip-form .trip-inline > input {
  width: 100%;
  min-width: 0;
}

.trip-form select,
.trip-form .SportSelectWrap select {
  width: 100%;
  min-width: 0;
}

.record-countdown {
  position: absolute;
  inset: 0;
  z-index: 600;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.65rem;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.record-countdown[hidden] {
  display: none !important;
}

.record-countdown-num {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 18vw, 7rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent, #0fad7a);
  animation: recordCountdownPulse 0.9s ease-out;
}

.record-countdown-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@keyframes recordCountdownPulse {
  0% {
    transform: scale(0.55);
    opacity: 0.35;
  }
  55% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.record-hud {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 500;
  width: min(38rem, calc(100% - 1.5rem));
  padding: 0.9rem 1rem 1rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.record-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.record-hud-sport {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.record-hud-sport span[aria-hidden='true'] {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-strong);
  flex-shrink: 0;
}

.record-hud-sport strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
}

.record-hud-workout {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.record-hud-gear {
  flex-shrink: 0;
}

.record-hud-primary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.record-stat-primary .value {
  font-size: 1.45rem;
}

.record-hud-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.record-stat {
  display: grid;
  gap: 0.15rem;
  text-align: center;
}

.record-stat .label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

.record-stat .value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

.record-hud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.record-hud-actions #recordFollowBtn[aria-pressed='false'] {
  opacity: 0.7;
}

.record-hud-meta {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.record-hud-splits {
  margin: 0.4rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

.record-hud-splits[hidden] {
  display: none !important;
}

.record-live-settings {
  position: absolute;
  inset: 0;
  z-index: 550;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background: color-mix(in srgb, #0b1a16 45%, transparent);
}

.record-live-settings[hidden] {
  display: none !important;
}

.record-live-settings-panel {
  width: min(24rem, 100%);
  margin-bottom: 7.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.85rem;
}

.record-live-settings-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.record-live-settings-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.record-start-pin-pulse {
  animation: recordStartPinPulse 1.6s ease-out 2;
}

@keyframes recordStartPinPulse {
  0% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0.85;
  }
}

body.is-record-night .record-hud,
body.is-record-night .record-live-settings-panel,
body.is-record-night .record-draft-banner {
  background: color-mix(in srgb, #0f1c18 92%, transparent);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e8f5ef;
}

body.is-record-night .record-hud .label,
body.is-record-night .record-hud-meta,
body.is-record-night .record-hud-splits,
body.is-record-night .record-hud-workout {
  color: rgba(232, 245, 239, 0.62);
}

body.is-record-night .record-stat .value,
body.is-record-night .record-hud-sport strong {
  color: #f4fff9;
}

body.is-record-night #map {
  filter: brightness(0.78) saturate(0.92);
}

.RecordLocationReady {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-elevated));
  font-size: 0.9rem;
  color: var(--ink);
}

.RecordLocationReady[hidden] {
  display: none !important;
}

.RecordLocationLoading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-elevated));
  color: var(--ink);
}

.RecordLocationLoading[hidden] {
  display: none !important;
}

.RecordLocationLoading strong {
  display: block;
  font-size: 0.95rem;
}

.RecordLocationLoading .meta {
  margin: 0.2rem 0 0;
}

.RecordLocationSpinner {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-top-color: var(--accent);
  flex-shrink: 0;
  animation: record-gps-spin 0.75s linear infinite;
}

@keyframes record-gps-spin {
  to {
    transform: rotate(360deg);
  }
}

.RecordLocationReadyDot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
  flex-shrink: 0;
}

.RecordSetupForm {
  gap: 1rem;
}

.RecordSetupForm.is-gps-pending {
  opacity: 0.52;
  pointer-events: none;
  user-select: none;
}

.RecordSetupForm.is-gps-pending .RecordStartBtn {
  filter: grayscale(0.35);
}

.RecordSetupSection {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 0 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.RecordSetupSection:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.RecordSetupSectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.RecordSetupTitle {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
}

.RecordSportChips,
.RecordWorkoutChips,
.RecordQuickToggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.RecordSportChips .chip-btn,
.RecordWorkoutChips .chip-btn {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.RecordSportChips .chip-btn.is-active,
.RecordWorkoutChips .chip-btn.is-active {
  background: color-mix(in srgb, var(--accent) 18%, var(--bg-elevated));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}

.RecordToggleChip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.RecordToggleChip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  pointer-events: none;
}

#lb-record .RecordSportChips,
#lb-record .RecordWorkoutChips,
#lb-record .RecordSportMoreLabel,
#lb-record .SportSelectWrap,
#lb-record #recordSport {
  position: relative;
  z-index: 6;
  pointer-events: auto !important;
}

#lb-record .chip-btn {
  cursor: pointer;
  pointer-events: auto !important;
}

.RecordToggleChip span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-muted);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.RecordToggleChip input:checked + span {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-elevated));
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--accent-strong);
}

.RecordSportMoreLabel {
  margin: 0;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.RecordSportMoreLabel .SportSelectWrap,
.RecordSportMoreLabel select {
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.RecordSettingsDetails {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg) 55%, var(--bg-elevated));
  padding: 0.15rem 0.85rem 0.85rem;
}

.RecordSettingsDetails summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  padding: 0.75rem 0 0.35rem;
  color: var(--ink);
}

.RecordSettingsDetails summary::-webkit-details-marker {
  display: none;
}

.RecordSettingsDetails summary::after {
  content: '▸';
  float: right;
  color: var(--ink-muted);
  transition: transform 0.15s ease;
}

.RecordSettingsDetails[open] summary::after {
  transform: rotate(90deg);
}

.RecordSettingsPanel {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.RecordSettingsGroup {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 65%, transparent);
}

.RecordSettingsGroup--audio {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 5%, var(--bg-elevated)) 0%,
    var(--bg-elevated) 100%
  );
}

.RecordSettingsGroupHead {
  display: grid;
  gap: 0.25rem;
}

.RecordSettingsGroupTitle {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.RecordSettingsGroupDesc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.RecordSettingsRow {
  display: grid;
  gap: 0.65rem;
}

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

.RecordSettingsField {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.RecordSettingsField--full {
  width: 100%;
}

.RecordSettingsLabel {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.RecordSettingsField select,
.RecordSettingsIntervalControl input[type="number"],
.RecordSettingsIntervalControl select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.RecordSettingsField select:focus-visible,
.RecordSettingsIntervalControl input[type="number"]:focus-visible,
.RecordSettingsIntervalControl select:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.RecordSettingsIntervalBlock {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.RecordSettingsIntervalGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: end;
}

.RecordSettingsInterval {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.RecordSettingsIntervalKind {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink-muted) 88%, var(--accent-strong));
}

.RecordSettingsIntervalControl {
  display: flex;
  align-items: stretch;
  min-height: 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.RecordSettingsIntervalControl:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.RecordSettingsIntervalControl input[type="number"] {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.RecordSettingsIntervalControl input[type="number"]:focus-visible {
  box-shadow: none;
}

.RecordSettingsIntervalControl select {
  flex: 0 0 auto;
  width: auto;
  min-width: 3.4rem;
  min-height: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--bg-elevated) 70%, var(--bg));
  box-shadow: none;
  padding-left: 0.45rem;
  padding-right: 1.6rem;
}

.RecordSettingsIntervalControl select:focus-visible {
  box-shadow: none;
}

.RecordSettingsIntervalUnit {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--ink-muted);
  background: color-mix(in srgb, var(--bg-elevated) 70%, var(--bg));
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.RecordSettingsIntervalSep {
  align-self: center;
  padding-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.RecordSettingsIntervalHint,
.RecordSettingsFootnote {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.RecordSettingsFootnote {
  padding: 0 0.15rem;
}

/* Legacy grid — keep for any older markup references */
.RecordSettingsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.RecordSettingsGrid label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.86rem;
}

.RecordSummary {
  display: grid;
  gap: 1rem;
}

.RecordSummaryTitle {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

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

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

.RecordSummaryStat {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--bg-elevated) 92%, var(--accent) 8%);
}

.RecordSummaryStat .label {
  font-size: 0.75rem;
  color: var(--text-muted, #5a7268);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.RecordSummaryStat strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.RecordSummarySection h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.RecordSummarySection .meta {
  margin: 0 0 0.55rem;
}

.RecordSummaryExtra {
  margin: 0;
}

@media (max-width: 560px) {
  .RecordSummaryHero {
    grid-template-columns: 1fr;
  }
}

.RecordActivePanel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.RecordActivePanel[hidden] {
  display: none !important;
}

.RecordActiveLead {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted, #5a7268);
}

.RecordActiveSport {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.RecordActiveSport strong {
  display: block;
  font-size: 1.05rem;
}

.RecordActiveWorkout {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted, #5a7268);
}

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

.RecordActiveStats .record-stat:nth-child(n + 4) {
  grid-column: span 1;
}

.RecordActiveActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.RecordActiveActions .btn-primary,
.RecordActiveActions .btn-secondary {
  flex: 1 1 7rem;
  min-height: 2.75rem;
}

.RecordActiveMeta {
  margin: 0;
  text-align: center;
}

#lb-record.is-recording-active #recordSetupLede,
#lb-record.is-recording-active #coachRecordBanner,
#lb-record.is-recording-active #recordBlocksPreview,
#lb-record.is-recording-active #recordLocationGate,
#lb-record.is-recording-active #recordLocationReady,
#lb-record.is-recording-active #recordLocationLoading {
  display: none !important;
}

.RecordStartBar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 0.35rem;
  padding: 0.75rem 0 calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--bg-elevated) 88%, transparent) 32%,
    var(--bg-elevated) 100%
  );
  box-shadow: 0 -10px 28px rgba(22, 48, 40, 0.08);
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.RecordStartBtn {
  width: 100%;
  min-height: 3rem;
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.record-hud-live-seg,
.record-hud-hr {
  margin: 0.4rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.record-hud-live-seg[hidden],
.record-hud-hr[hidden] {
  display: none !important;
}

#recordBeaconBtn.is-active {
  background: color-mix(in srgb, #c45c26 18%, var(--bg-elevated));
  border-color: color-mix(in srgb, #c45c26 45%, var(--line));
  color: #a04518;
}

@media (max-width: 640px) {
  .RecordSettingsRow--2,
  .RecordSettingsIntervalGrid {
    grid-template-columns: 1fr;
  }

  .RecordSettingsIntervalSep {
    justify-self: center;
    padding: 0.1rem 0 0.2rem;
  }

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

  .record-hud-primary,
  .record-hud-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .record-stat-primary .value,
  .record-stat .value {
    font-size: 1.05rem;
  }
}

.record-draft-banner {
  position: absolute;
  left: 50%;
  top: 4.4rem;
  transform: translateX(-50%);
  z-index: 500;
  width: min(32rem, calc(100% - 1.5rem));
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  text-align: center;
  font-size: 0.9rem;
}

body.is-recording .map-overlay-controls {
  opacity: 0.55;
}

body.is-recording-paused .record-hud {
  border-color: color-mix(in srgb, var(--warm) 55%, var(--line));
}

.landing-foot {
  margin: 2rem 0 3rem;
  text-align: center;
  display: grid;
  gap: 0.85rem;
  justify-items: center;
}

.landing-foot .text-link {
  display: inline;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.landing-foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  align-items: center;
  justify-content: center;
}

.privacy-link {
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  box-shadow: none;
  border-radius: 0;
}

.privacy-link:hover {
  color: var(--ink);
  background: none;
}

.landing-foot-sep {
  color: var(--ink-muted);
  opacity: 0.7;
}

.ChatbotRoot[hidden] {
  display: none !important;
}

body.kids-mode .admin-only {
  display: none !important;
}

.sport-sheet-toggle {
  display: none !important;
}

.sport-sheet {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ChatbotRoot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  z-index: 80;
  font-family: var(--font-body);
  overflow: visible;
}

.ChatbotLauncher {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #ffffff;
  font-size: 24px;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 10px 26px var(--accent-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 5;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ChatbotLauncher.is-dragging,
.ChatbotRoot--dragging .ChatbotLauncher {
  cursor: grabbing;
  transform: none;
  filter: none;
}

.ChatbotRoot--dragging .ChatbotLauncher:hover {
  transform: none;
  filter: none;
}

.ChatbotRoot--snap {
  transition: left 0.22s ease, bottom 0.22s ease;
}

.ChatbotLauncher:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.ChatbotLauncherFallback {
  display: none;
}

.ChatbotRoot.ChatbotCollapsed .ChatbotPanel {
  display: none;
  pointer-events: none;
}

.ChatbotPanel {
  position: absolute;
  right: 0;
  bottom: calc(56px + 8px);
  z-index: 2;
  width: min(380px, calc(100vw - 24px));
  height: min(620px, calc(100dvh - 56px - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  max-height: calc(100dvh - 56px - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  border: 1px solid #d7ebe1;
  border-radius: 16px;
  box-shadow: 0 14px 42px var(--accent-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ChatbotPanelIn 0.22s ease;
}

@keyframes ChatbotPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ChatbotHeader {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 55%, #0b8f68 100%);
  color: #ffffff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ChatbotTitle {
  font-size: 14px;
  font-weight: 600;
}

.ChatbotHeaderActions {
  display: flex;
  gap: 6px;
}

.ChatbotHeaderButton {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
}

.ChatbotHeaderButton:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ChatbotHubView,
.ChatbotChatView {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ChatbotHubView {
  background: #eef8f2;
}

.ChatbotHubView[hidden],
.ChatbotChatView[hidden] {
  display: none !important;
}

.ChatbotHubIntro {
  padding: 14px 14px 10px;
}

.ChatbotHubNewBtn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid #cfe8db;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}

.ChatbotHubNewBtnIcon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent-strong);
}

.ChatbotHubNewBtnLabel {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #163028;
}

.ChatbotHubNewBtnHint {
  display: block;
  font-size: 12px;
  color: #5b7368;
  line-height: 1.35;
}

.ChatbotHubNewBtnArrow {
  color: #7a9a8c;
  margin-left: auto;
}

.ChatbotHubSectionLabel {
  padding: 4px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b7368;
}

.ChatbotConversationList {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ChatbotConversationListItem {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid #d4e8dc;
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.ChatbotConversationListItem:hover {
  border-color: #12b886;
  background: #f7fdf9;
}

.ChatbotConversationListTitle {
  font-size: 12px;
  font-weight: 700;
  color: #0ca678;
}

.ChatbotConversationListPreview {
  font-size: 12px;
  color: #41586b;
}

.ChatbotEmpty {
  margin: 0;
  padding: 8px 4px;
  font-size: 12px;
  color: #5b7368;
}

.ChatbotFeedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.65rem 0.15rem 0.2rem;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: 10px;
}

.ChatbotFeedbackLabel {
  font-size: 0.8rem;
  font-weight: 650;
  color: #41586b;
}

.ChatbotChatNav {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: #ffffff;
  border-bottom: 1px solid #e3eee8;
}

.ChatbotBackBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: #0ca678;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.ChatbotBackBtn:hover {
  background: #eef8f2;
}

.ChatbotMessages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f7fbf8;
}

.ChatbotBubble {
  max-width: 88%;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ChatbotBubble--user {
  align-self: flex-end;
  background: #12b886;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.ChatbotBubble--bot {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #d7ebe1;
  color: #163028;
  border-bottom-left-radius: 4px;
}

.ChatbotTyping {
  padding: 0 12px 6px;
  font-size: 12px;
  color: #5b7368;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ChatbotTyping[hidden] {
  display: none !important;
}

.ChatbotTypingPulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12b886;
  animation: ChatbotPulse 1s ease infinite;
}

@keyframes ChatbotPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.ChatbotQuickActions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
}

.ChatbotCatPill {
  border: 1px solid #cfe8db;
  background: #ffffff;
  color: #163028;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ChatbotCatPill:hover {
  border-color: #12b886;
  background: #eef8f2;
}

.ChatbotComposer {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'voice voice'
    'tools tools'
    'input send';
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e3eee8;
  background: #ffffff;
  position: relative;
}

.ChatbotComposer.is-voice-recording {
  outline: 2px solid rgba(198, 40, 40, 0.45);
  outline-offset: -2px;
  border-radius: 0 0 12px 12px;
}

.ChatbotVoiceRecording {
  grid-area: voice;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 650;
}

.ChatbotVoiceRecording[hidden] {
  display: none !important;
}

.ChatbotVoiceRecordingDot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fff;
  animation: ChatbotVoiceBlink 0.9s step-start infinite;
}

@keyframes ChatbotVoiceBlink {
  50% { opacity: 0.25; }
}

.ChatbotVoiceRecordingTimer {
  font-variant-numeric: tabular-nums;
  opacity: 0.95;
  margin-left: auto;
}

.ChatbotVoiceRecordingStop {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #c62828;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}

.ChatbotTools {
  grid-area: tools;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ChatbotToolBtn {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid #d7ebe1;
  border-radius: 8px;
  background: #f6faf7;
  color: #163028;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  padding: 0;
}

.ChatbotToolBtn:hover,
.ChatbotToolBtn.is-listening {
  border-color: #12b886;
  background: #eef8f2;
  color: #0ca678;
}

.ChatbotToolBtn.is-recording {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
  animation: social-mic-pulse 1s ease-in-out infinite;
}

.ChatbotEmojiPop {
  grid-area: emoji;
  position: absolute;
  left: 10px;
  bottom: calc(100% - 8px);
  z-index: 5;
  width: min(18.5rem, calc(100vw - 2.5rem));
  max-height: 14rem;
  overflow: auto;
  padding: 0.45rem;
  border: 1px solid rgba(22, 48, 40, 0.12);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(22, 48, 40, 0.14);
  -webkit-overflow-scrolling: touch;
}

.ChatbotEmojiPop[hidden] {
  display: none !important;
}

.ChatbotEmojiGrid {
  display: grid;
  grid-template-columns: repeat(8, 1.7rem);
  gap: 0.2rem;
  justify-content: start;
}

.ChatbotEmojiPop button {
  border: 0;
  background: transparent;
  font-size: 1.05rem;
  cursor: pointer;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  line-height: 1;
  padding: 0;
}

.ChatbotEmojiPop button:hover {
  background: rgba(15, 173, 122, 0.12);
}

.ChatbotInput {
  grid-area: input;
  width: 100%;
  border: 1px solid #d7ebe1;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  resize: none;
  min-height: 44px;
}

.ChatbotSend {
  grid-area: send;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
}

.ChatbotHeader {
  cursor: pointer;
}

.ChatbotSend:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

@media (max-width: 640px) {
  .ChatbotRoot {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .ChatbotPanel {
    width: min(100vw - 20px, 380px);
    height: min(560px, calc(100dvh - 56px - 28px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    max-height: calc(100dvh - 56px - 28px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .map-status-sep,
  .map-status-chip #gridChip {
    display: none;
  }

  .toast-stack {
    width: min(320px, calc(100% - 1.5rem));
  }
}

:focus-visible {
  outline: 3px solid rgba(18, 184, 134, 0.45);
  outline-offset: 2px;
}

.btn:focus:not(:focus-visible),
.chip-btn:focus:not(:focus-visible),
.nav-link:focus:not(:focus-visible),
.ChatbotCatPill:focus:not(:focus-visible),
.ChatbotSend:focus:not(:focus-visible),
.ChatbotLauncher:focus:not(:focus-visible),
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .ChatbotLauncher:hover {
    transform: none;
  }

  #heroMap {
    opacity: 1;
    transition: none;
  }
}

/* ——— Social wall ——— */
#main-content {
  display: contents;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 10000;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  background: #0f3d32;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15, 61, 50, 0.28);
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #0fad7a;
  outline-offset: 2px;
}

.offline-banner {
  position: sticky;
  top: 0;
  z-index: 9990;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: #3b2a12;
  background: linear-gradient(180deg, #ffe8b8, #ffd68a);
  border-bottom: 1px solid rgba(120, 80, 20, 0.25);
}

.PasswordField {
  position: relative;
  display: block;
  width: 100%;
}

.PasswordField input {
  width: 100%;
  padding-right: 2.75rem;
  box-sizing: border-box;
}

.PasswordField input[type="password"]::-ms-reveal,
.PasswordField input[type="password"]::-ms-clear {
  display: none;
}

.PasswordToggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(15, 61, 50, 0.55);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
}

.PasswordToggleIcon {
  display: block;
  line-height: 0;
  pointer-events: none;
}

.PasswordToggleIcon--visible {
  display: none;
}

.PasswordToggle.is-visible .PasswordToggleIcon--hidden {
  display: none;
}

.PasswordToggle.is-visible .PasswordToggleIcon--visible {
  display: block;
}

.PasswordToggleSvg {
  display: block;
  width: 18px;
  height: 18px;
}

.PasswordToggle:hover {
  color: #0f3d32;
  background: rgba(15, 173, 122, 0.1);
}

.PasswordToggle:focus-visible {
  outline: 2px solid #0fad7a;
  outline-offset: 2px;
}

#main-content:focus {
  outline: none;
}

.ActivityDetailMap {
  height: 16rem;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(15, 173, 122, 0.2);
  overflow: hidden;
  position: relative;
}

.ActivityDetailMap--empty {
  display: grid;
  place-items: center;
  background: rgba(246, 250, 247, 0.9);
  color: rgba(18, 53, 44, 0.55);
  font-size: 0.9rem;
  padding: 1rem;
  text-align: center;
}

.RouteMapControls {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  left: auto;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  pointer-events: none;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.RouteMapPlayBtn {
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #163028;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  box-shadow: 0 4px 14px rgba(22, 48, 40, 0.16);
  border: 1px solid rgba(18, 53, 44, 0.1);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.RouteMapPlayBtn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.RouteMapPlayBtn.is-playing {
  background: linear-gradient(125deg, #0b9470 0%, #12c88a 100%);
  color: #fff;
  border-color: transparent;
}

.RouteMapSpeedWrap {
  pointer-events: auto;
  margin-left: 0;
}

.RouteMapSpeed {
  border: 1px solid rgba(18, 53, 44, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.35rem 0.55rem;
  color: #163028;
  box-shadow: 0 4px 14px rgba(22, 48, 40, 0.12);
  cursor: pointer;
}

.RouteMapPlayDot {
  background: transparent !important;
  border: 0 !important;
}

.RouteMapPlayDotInner {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #e8843a;
  border: 2px solid #163028;
  box-shadow: 0 2px 8px rgba(22, 48, 40, 0.35);
}

.RaceCityChips {
  margin: 0 0 1rem;
  flex-wrap: wrap;
}

.ShareLiveMap {
  height: min(42vh, 360px);
  min-height: 240px;
  border-radius: 14px;
  border: 1px solid rgba(15, 173, 122, 0.18);
  overflow: hidden;
  margin: 0 0 1.1rem;
  background: #eef6f1;
}

.WorldMapCanvas {
  position: relative;
  height: clamp(300px, 44vh, 520px);
  min-height: 300px;
  border-radius: 14px;
  border: 1px solid rgba(15, 173, 122, 0.22);
  overflow: hidden;
  margin: 0.85rem 0 1rem;
  touch-action: none;
  background: linear-gradient(180deg, #7eb8e0 0%, #5a9fd4 48%, #3d87c4 100%);
}

.WorldMapSvg {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.WorldMapSvg:active {
  cursor: grabbing;
}

.WorldMapCountry.is-visited {
  cursor: pointer;
  filter: drop-shadow(0 1px 1px rgba(11, 148, 112, 0.25));
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.WorldMapCountry.is-visited:hover,
.WorldMapCountry.is-visited:focus-visible {
  filter: drop-shadow(0 2px 6px rgba(11, 148, 112, 0.4));
  outline: none;
}

.WorldMapControls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}

.WorldMapControlBtn {
  appearance: none;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1;
  color: #142c26;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 6px 16px rgba(20, 44, 38, 0.16);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, transform 0.12s ease;
}

.WorldMapControlBtn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.WorldMapTip {
  position: absolute;
  z-index: 4;
  max-width: 14rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 173, 122, 0.22);
  box-shadow: 0 8px 20px rgba(20, 44, 38, 0.14);
  color: #142c26;
  font-size: 0.78rem;
  line-height: 1.35;
  pointer-events: none;
}

.WorldMapTip strong {
  font-weight: 700;
}

.WorldMapStats {
  margin-bottom: 0.35rem;
}

.WorldMapCountries {
  display: grid;
  gap: 0.55rem;
}

.trip-waypoint-box {
  margin-top: 0.55rem;
}

.trip-waypoint-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.trip-waypoint-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(246, 250, 247, 0.95);
  border: 1px solid rgba(18, 53, 44, 0.08);
  font-size: 0.9rem;
}

.TripPin {
  background: transparent;
  border: 0;
}

.TripPinInner {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.TripPinDot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--trip-pin, #845ef7);
  color: #fff;
  font: 700 0.72rem/1 system-ui, sans-serif;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  border: 2px solid #fff;
  cursor: grab;
}

.TripPinDelete {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #212529;
  color: #fff;
  font: 700 0.7rem/1 system-ui, sans-serif;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.TripPinDelete:hover {
  background: #c92a2a;
}

.LeaderboardFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-end;
}

.LeaderboardFilterGroup {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.LeaderboardFilterLabel {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-muted);
}

.LeaderboardFilterSeg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.18rem;
  padding: 0.22rem;
  background: rgba(20, 44, 38, 0.045);
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(20, 44, 38, 0.04);
}

.LeaderboardFilters .btn {
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 2.15rem;
  padding: 0.45rem 0.9rem;
  font-weight: 650;
}

.LeaderboardFilters .btn:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: none;
}

.LeaderboardFilters .btn.is-active {
  background: #fff;
  color: var(--ink);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(20, 44, 38, 0.12);
  transform: translateY(-1px);
}

.quest-card.is-complete {
  border-color: rgba(15, 173, 122, 0.35);
  background: linear-gradient(180deg, rgba(15, 173, 122, 0.08), var(--bg-elevated) 55%);
}

.quest-card.is-complete .QuestBadge {
  background: var(--accent);
  color: #fff;
}

.ActivityCoAthletes {
  margin: 0.15rem 0 0.45rem;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink, #142c26);
}

.ActivityCoAthletes .meta {
  margin-right: 0.35rem;
}

.TagFriendList {
  display: grid;
  gap: 0.35rem;
  max-height: min(50vh, 22rem);
  overflow: auto;
  margin-top: 0.75rem;
}

.TagFriendRow.is-disabled {
  opacity: 0.55;
}

.ActivityMiniMap {
  height: 16.5rem;
  margin: 0.15rem 0 0.35rem;
  width: 100%;
  max-width: none;
  border-radius: 14px;
  overflow: hidden;
  background: #e8eee9;
  border: 1px solid rgba(20, 44, 38, 0.08);
  position: relative;
  /* Isolate from parent transforms so Leaflet paths stay aligned with tiles. */
  transform: translateZ(0);
}

.ActivityMiniMap .leaflet-container {
  width: 100%;
  height: 100%;
  z-index: 0;
}

.ActivityMiniMap .leaflet-overlay-pane,
.ActivityMiniMap .leaflet-marker-pane,
.ActivityMiniMap .leaflet-tooltip-pane {
  z-index: 650;
}

.ActivityMiniMap--empty {
  display: grid;
  place-items: center;
  color: var(--muted, #4a6b60);
  font-size: 0.88rem;
  background:
    linear-gradient(180deg, rgba(15, 173, 122, 0.06), rgba(18, 53, 44, 0.04)),
    repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(15, 173, 122, 0.04) 10px, rgba(15, 173, 122, 0.04) 11px);
}

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

.ActivityPhotoRow img,
.ProfileActivityThumb {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(15, 173, 122, 0.2);
}

.ActivityPhotoLink {
  display: block;
  line-height: 0;
}

.ProfilePhotoUpload {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.ProfilePhotoUpload input {
  display: none;
}

.SocialPage {
  max-width: 42rem;
}

#SocialRoot {
  margin-top: 0.15rem;
}

.SocialFeedHint {
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  color: var(--muted, #4a6b60);
  line-height: 1.45;
}

.SocialFeedSkeleton {
  display: grid;
  gap: 1rem;
}

.SocialPost--skel {
  min-height: 9rem;
  background: linear-gradient(90deg, rgba(18, 53, 44, 0.04), rgba(18, 53, 44, 0.09), rgba(18, 53, 44, 0.04));
  background-size: 200% 100%;
  animation: socialSkel 1.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes socialSkel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .SocialPost--skel { animation: none; }
}

.SocialStatus {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--accent-strong);
}

.SocialStatus.is-error {
  color: #b42318;
}

.SocialFeed {
  display: grid;
  gap: 1.15rem;
}

.SocialFeedFooter {
  padding: 0.35rem 0 0.75rem;
  text-align: center;
  grid-column: 1 / -1;
}

.SocialFeedSentinel {
  height: 1px;
  width: 100%;
  grid-column: 1 / -1;
  pointer-events: none;
}

.SocialFeedLoadingMore {
  margin: 0;
}

.CrossSyncGroup {
  margin: 1rem 0 0;
}

.CrossSyncHeading {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.CrossSyncList {
  display: grid;
  gap: 0.45rem;
  max-height: 14rem;
  overflow: auto;
  margin: 0.4rem 0 0;
  padding: 0.15rem 0.1rem 0.15rem 0;
}

.CrossSyncRow {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(18, 53, 44, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.CrossSyncRow .meta {
  display: block;
  margin-top: 0.15rem;
}

.SocialPost,
.ActivityCard {
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem 1.15rem 1.15rem;
  border: 1px solid rgba(18, 53, 44, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(18, 53, 44, 0.06);
  animation: SocialPostIn 0.28s ease;
  overflow: hidden;
}

@keyframes SocialPostIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.SocialPostHead {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.SocialPostHeadActions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding-top: 0.1rem;
}

.SocialAuthorMeta {
  min-width: 0;
}

.SocialPostSubline {
  margin: 0.12rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted, #4a6b60);
}

.SocialPostHead time,
.SocialCommentHead time {
  font-size: 0.78rem;
  color: var(--muted, #4a6b60);
  white-space: nowrap;
}

.SocialAuthor,
.SocialAuthorLink {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 650;
  margin-right: 0;
}

.SocialAuthorLink {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

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

.SocialPrivacyBadge {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
}

.ActivityCardTitleRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.15rem 0 0;
}

.ActivityCardTitle {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink, #12352c);
}

.ActivityCardTitle .SocialAuthorLink {
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: inherit;
  max-width: 100%;
}

.ActivityCardTitleActions {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  flex-shrink: 0;
}

.ActivityCardIconBtn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted, #4a6b60);
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}

.ActivityCardIconBtn:hover,
.ActivityCardIconBtn:focus-visible {
  color: var(--accent-strong, #0fad7a);
  background: rgba(15, 173, 122, 0.1);
  outline: none;
}

.ActivityCardIconBtn i {
  font-size: 0.88rem;
}

.ActivityCardTitle .ActivityCardIconBtn {
  width: 1.55rem;
  height: 1.55rem;
  position: relative;
  top: 0.05em;
}

.ActivityCardTitle .ActivityCardIconBtn i {
  font-size: 0.78rem;
}

.ActivityCardAchievement {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink, #12352c);
  opacity: 0.78;
}

.ActivityCardSummary {
  display: grid;
  gap: 0.55rem;
}

.ActivityCardStats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
}

.ActivityCardStats--primary {
  padding-top: 0.15rem;
}

.ActivityCardStats--primary li {
  min-width: 4.5rem;
}

.ActivityCardStats--secondary {
  gap: 0.55rem 1.1rem;
}

.ActivityCardStats--secondary span,
.ActivityCardStats--secondary strong {
  font-size: 0.78rem;
}

.ActivityCardStats li {
  display: grid;
  gap: 0.12rem;
}

.ActivityCardStats > li > span,
.ActivityCardStats .stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #4a6b60);
  font-weight: 650;
}

.ActivityCardStats strong {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink, #12352c);
}

.ActivityCardStats strong span,
.ActivityCardStats strong .stat-unit {
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: none;
  color: inherit;
}

.ActivityCardStats strong .stat-unit {
  font-size: 0.72em;
  font-weight: 650;
  opacity: 0.72;
  margin-left: 0.15em;
}

.SocialPostBody,
.SocialCommentBody {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.SocialPostActions,
.SocialCommentActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(18, 53, 44, 0.06);
}

.SocialActionBtn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink, #12352c);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  padding: 0.4rem 0.15rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.78;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.SocialActionBtn i {
  font-size: 0.82rem;
  color: var(--accent-strong);
}

.SocialActionBtn:hover {
  opacity: 1;
  color: var(--accent-strong);
}

.SocialActionBtn.is-on {
  opacity: 1;
  color: var(--accent-strong);
}

.SocialActionCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(15, 173, 122, 0.1);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.SocialActionBtn.is-on .SocialActionCount {
  background: rgba(15, 173, 122, 0.16);
}

.SocialComments {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.25rem;
  padding-left: 0.15rem;
  border-left: 3px solid var(--accent-glow);
}

.SocialComments.is-collapsed,
.SocialComments[hidden] {
  display: none !important;
}

.SocialCommentsPanel {
  margin-top: 0.15rem;
}

.SocialComment {
  display: grid;
  gap: 0.35rem;
  padding-left: 0.85rem;
}

.SocialComment--reply {
  margin-left: 0.35rem;
}

.SocialCommentReplyForm {
  margin: 0.35rem 0 0.15rem;
  padding: 0.35rem 0.35rem 0.35rem 0.55rem;
  border-radius: 14px;
}

.SocialCommentReplyForm[hidden] {
  display: none !important;
}

.SocialCommentReplyInput {
  flex: 1 1 12rem;
  min-width: 0;
}

.SocialCommentSubmit--compact {
  min-height: 2rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.84rem;
}

.SocialCommentReplies {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.55rem;
  padding-left: 0.35rem;
  border-left: 2px solid rgba(15, 173, 122, 0.18);
}

.SocialCommentHead {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.SocialAuthorRow--comment {
  align-items: center;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
}

.SocialAuthorRow--comment .SocialAvatar,
.SocialAvatar--comment {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.SocialAuthorRow--comment .SocialAuthorMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.SocialAuthorRow--comment .SocialAuthorMeta time {
  font-size: 0.8rem;
  color: rgba(20, 44, 38, 0.55);
}

.SocialCommentForm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin-top: 0.55rem;
  padding: 0.35rem 0.35rem 0.35rem 0.55rem;
  border: 1px solid rgba(18, 53, 44, 0.08);
  border-radius: 18px;
  background: rgba(246, 250, 247, 0.85);
  box-shadow: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.SocialCommentForm[hidden] {
  display: none !important;
}

.SocialCommentForm.is-open,
.SocialPost.is-commenting .SocialCommentForm {
  border-color: rgba(15, 173, 122, 0.22);
  background: #fff;
}

.SocialCommentForm:focus-within {
  border-color: rgba(15, 173, 122, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 173, 122, 0.1);
}

.SocialCommentTools {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  position: relative;
  flex-shrink: 0;
}

.SocialCommentToolBtn {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #163028;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.SocialCommentToolBtn:hover {
  background: rgba(15, 173, 122, 0.12);
  color: #0b9470;
}

.SocialCommentToolBtn.is-recording {
  background: #c62828;
  color: #fff;
  animation: social-mic-pulse 1s ease-in-out infinite;
}

@keyframes social-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.55); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(198, 40, 40, 0); transform: scale(1.06); }
}

.SocialCommentForm.is-voice-recording {
  outline: 2px solid rgba(198, 40, 40, 0.45);
  outline-offset: 2px;
  border-radius: 12px;
}

.SocialCommentVoiceRecording {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 100%;
  order: 5;
  margin: 0.15rem 0 0.25rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 650;
}

.SocialCommentVoiceRecording[hidden] {
  display: none !important;
}

.SocialCommentVoiceRecordingDot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fff;
  animation: social-rec-blink 0.9s step-start infinite;
}

@keyframes social-rec-blink {
  50% { opacity: 0.25; }
}

.SocialCommentVoiceRecordingLabel {
  letter-spacing: 0.02em;
}

.SocialCommentVoiceRecordingTimer {
  font-variant-numeric: tabular-nums;
  opacity: 0.95;
  margin-left: auto;
}

.SocialCommentVoiceStop {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #c62828;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}

.SocialCommentVoiceStop:hover,
.SocialCommentVoiceStop:focus-visible {
  background: #ffe8e8;
  outline: none;
}

.SocialCommentEmojiPop {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 5;
  width: min(18.5rem, calc(100vw - 2.5rem));
  max-height: 14rem;
  overflow: auto;
  padding: 0.45rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(22, 48, 40, 0.12);
  box-shadow: 0 12px 28px rgba(22, 48, 40, 0.14);
  -webkit-overflow-scrolling: touch;
}

.SocialCommentEmojiPop[hidden] {
  display: none !important;
}

.SocialCommentEmojiGrid {
  display: grid;
  grid-template-columns: repeat(8, 1.7rem);
  gap: 0.2rem;
  justify-content: start;
}

.SocialCommentEmojiPop button {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 8px;
  width: 1.7rem;
  height: 1.7rem;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
}

.SocialCommentEmojiPop button:hover {
  background: rgba(15, 173, 122, 0.12);
}

.SocialCommentInput {
  flex: 1;
  min-width: 8rem;
  border: 0;
  border-radius: 0;
  padding: 0.5rem 0.15rem;
  font: inherit;
  font-size: 0.92rem;
  background: transparent;
  color: inherit;
  outline: none;
  box-shadow: none;
}

.SocialCommentInput:focus {
  outline: none;
  box-shadow: none;
}

.SocialCommentVoiceChip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1 1 100%;
  order: 5;
  padding: 0.35rem 0.55rem;
  border-radius: 12px;
  background: rgba(15, 173, 122, 0.12);
  color: #0b9470;
  font-size: 0.75rem;
  font-weight: 650;
}

.SocialCommentVoiceChip[hidden] {
  display: none !important;
}

.SocialCommentVoiceAction {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: #fff;
  color: #0b9470;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(15, 173, 122, 0.25);
}

.SocialCommentVoiceAction--secondary {
  font-weight: 650;
  color: #163028;
  box-shadow: 0 0 0 1px rgba(22, 48, 40, 0.14);
}

.SocialCommentVoiceAction:hover,
.SocialCommentVoiceAction:focus-visible {
  background: rgba(15, 173, 122, 0.1);
}

.SocialCommentVoiceAction--secondary:hover,
.SocialCommentVoiceAction--secondary:focus-visible {
  background: rgba(22, 48, 40, 0.06);
}

.SocialCommentVoiceAction:disabled {
  opacity: 0.65;
  cursor: wait;
}

.SocialCommentVoiceClear {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
  margin-left: auto;
}

.SocialCommentAudio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin: 0.15rem 0 0.35rem;
}

.SocialCommentAudio audio {
  width: min(100%, 280px);
  height: 2rem;
}

.SocialCommentVoiceDelete {
  appearance: none;
  border: 0;
  background: transparent;
  color: #b42318;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.35rem 0.1rem;
  cursor: pointer;
  opacity: 0.88;
}

.SocialCommentVoiceDelete:hover,
.SocialCommentVoiceDelete:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

.SocialCommentTranscribed,
.SocialCommentEdited {
  font-size: 0.92em;
  font-weight: 500;
  opacity: 0.72;
}

.SocialActionBtn--danger {
  color: #b42318;
}

.SocialCommentSubmit {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  background: linear-gradient(125deg, #0b9470 0%, #12c88a 100%);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  order: 3;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.SocialCommentSubmit:hover {
  filter: brightness(1.05);
}

.SocialCommentSubmit:active {
  transform: scale(0.98);
}

.ProfilePage {
  max-width: none;
}

.ProfileHero {
  display: flex;
  gap: 1.35rem;
  align-items: flex-start;
  margin-bottom: 1.85rem;
  padding: 1.35rem 1.45rem;
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(15, 173, 122, 0.14), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}

.ProfileAvatar {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 8px 20px rgba(20, 44, 38, 0.12);
}

.ProfileKicker {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
}

.ProfileOutingsToolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: -0.65rem 0 1.1rem;
}

.ProfileName {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.03em;
  font-weight: 600;
}

.ProfilePlace,
.ProfileBio,
.ProfileMeta {
  margin: 0.25rem 0 0;
  color: var(--ink-muted);
  line-height: 1.45;
}

.ProfileBio {
  color: var(--ink);
  margin-top: 0.7rem;
  max-width: 36rem;
}

.ProfileHeroActions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ProfileSection {
  margin-bottom: 1.5rem;
}

.ProfileOverviewGrid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.ProfileOverviewGrid > .ProfileSection,
.ProfileOverviewGrid > .ProfilePeriods,
.ProfileOverviewGrid > .ProfileSection--panel {
  margin-bottom: 0;
  min-width: 0;
}

.ProfileOverviewGrid--pair,
.ProfileOverviewGrid--stats,
.ProfileOverviewGrid--awards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.ProfileSection--alltime {
  width: 100%;
  margin-bottom: 1.5rem;
}

.ProfileOverviewGrid--pair > .ProfileSection--fill {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ProfileOverviewGrid--pair > .ProfileSection--sports .ProfileSportList,
.ProfileOverviewGrid--pair > .ProfileSection--achievements .badge-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 22rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.ProfileOverviewWearables {
  margin: 0 0 0.75rem;
}

.ProfilePeriods {
  display: grid;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

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

.ProfilePeriod {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

@media (max-width: 860px) {
  .ProfileOverviewGrid--pair,
  .ProfileOverviewGrid--stats,
  .ProfileOverviewGrid--awards,
  .ProfilePeriods--trio {
    grid-template-columns: 1fr;
  }

  .ProfileOverviewGrid--pair > .ProfileSection--sports .ProfileSportList,
  .ProfileOverviewGrid--pair > .ProfileSection--achievements .badge-list {
    max-height: none;
  }
}

.PrivacyToggles {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.PrivacyToggles legend {
  padding: 0 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.PrivacyToggles .check-row {
  margin: 0.45rem 0;
}

.PrivacyToggles .meta {
  margin: 0.65rem 0 0;
}

.ProfileSection--panel,
.ProfilePeriod {
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ProfilePeriod--week {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(15, 173, 122, 0.12), transparent 55%),
    var(--bg-elevated, #fff);
}

.ProfileSection h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.ProfileStatGrid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.8rem, 1fr));
  gap: 0.75rem;
}

.ProfileStatGrid li {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(15, 173, 122, 0.09), rgba(15, 173, 122, 0.02));
  border: 1px solid rgba(15, 173, 122, 0.12);
}

.ProfileStatGrid span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.ProfileStatGrid strong {
  font-size: 1.15rem;
  font-weight: 700;
}

.ProfilePeriod h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

.ProfileStatGrid--compact {
  grid-template-columns: repeat(auto-fill, minmax(5.6rem, 1fr));
  gap: 0.5rem;
}

.ProfileStatGrid--compact li {
  padding: 0.55rem 0.6rem;
  background: rgba(20, 44, 38, 0.035);
  border: 1px solid rgba(20, 44, 38, 0.06);
}

.ProfileStatGrid--compact strong {
  font-size: 1.02rem;
}

.ProfileDashActivities .ProfileActivityList {
  max-height: min(70vh, 40rem);
  overflow: auto;
  padding-right: 0.25rem;
}

.ProfileOutingsWearables {
  margin-top: 0.75rem;
}

.ProfileOutingsWearables .connect-block {
  margin: 0;
}

.ProfilePeopleNav {
  margin: 0 0 0.65rem;
}

.ProfileHeat {
  display: grid;
  grid-template-columns: repeat(53, minmax(0.45rem, 1fr));
  gap: 2px;
  min-width: 16rem;
}

.ProfileHeatCell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(15, 173, 122, 0.12);
}

.ProfileHeatCell.level-1 { background: rgba(15, 173, 122, 0.28); }
.ProfileHeatCell.level-2 { background: rgba(15, 173, 122, 0.48); }
.ProfileHeatCell.level-3 { background: rgba(15, 173, 122, 0.68); }
.ProfileHeatCell.level-4 { background: rgba(15, 173, 122, 0.9); }

.ProfileSportList,
.ProfileActivityList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.ProfileActivityList {
  max-height: min(70vh, 640px);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.ProfileSportList li:not(.ProfileSportRow),
.ProfileActivityRow {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr) auto;
  gap: 0.85rem 1rem;
  align-items: start;
  flex-wrap: unset;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 44, 38, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 140%);
}

.ProfileActivityMiniMap {
  width: 100%;
  min-height: 6.5rem;
  height: 6.5rem;
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
}

.ProfileActivityMain {
  min-width: 0;
}

@media (max-width: 720px) {
  .ProfileSportList li:not(.ProfileSportRow),
  .ProfileActivityRow {
    grid-template-columns: 1fr;
  }

  .ProfileActivityMiniMap {
    height: 8rem;
    min-height: 8rem;
  }
}

.ProfileSportList .ProfileSportRow,
.ProfileSportRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.65rem 1rem;
  align-items: baseline;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 44, 38, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 140%);
}

.ProfileSportName {
  font-weight: 650;
}

.ProfileSportKm {
  justify-self: center;
  text-align: center;
}

.ProfileSportCount {
  justify-self: end;
  text-align: right;
}

.ProfileActivityToggle {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 0.45rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.ProfileActivityToggleTrack {
  display: block;
  width: 2.1rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(22, 48, 40, 0.18);
  position: relative;
  transition: background 0.15s ease;
}
.ProfileActivityToggleThumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(22, 48, 40, 0.35);
  transition: transform 0.15s ease;
}
.ProfileActivityToggle.is-on .ProfileActivityToggleTrack,
.ProfileActivityToggle[aria-pressed="true"] .ProfileActivityToggleTrack {
  background: #12b886;
}
.ProfileActivityToggle.is-on .ProfileActivityToggleThumb,
.ProfileActivityToggle[aria-pressed="true"] .ProfileActivityToggleThumb {
  transform: translateX(0.95rem);
}

.RenameSyncRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.RenameSyncLabel {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink, #12352c);
}

.RenameSyncRow .ProfileActivityToggle {
  margin-right: 0;
  flex-shrink: 0;
}

.ProfileActivityBulkBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(20, 44, 38, 0.1);
  background: rgba(15, 173, 122, 0.08);
}

.ProfileActivityBulkBar[hidden] {
  display: none !important;
}

.ProfileActivitySelect {
  margin-right: 0.35rem;
  accent-color: var(--accent, #12b886);
}

.ProfileActivityRow .meta {
  display: block;
  margin-top: 0.15rem;
}

.ProfileActivityMetrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  justify-content: flex-end;
}

.ProfileEdit {
  display: grid;
  gap: 0.95rem;
  margin-top: 0.5rem;
  padding: 1.25rem 1.3rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ProfileEditHead h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.ProfileEditHead .meta {
  margin: 0 0 0.35rem;
}

.ProfileEdit label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.ProfileEdit input,
.ProfileEdit textarea,
.ProfileEdit select {
  border: 1px solid rgba(15, 173, 122, 0.28);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: inherit;
  background: #fff;
}

.ProfileEditRow {
  display: grid;
  gap: 0.85rem;
}

.ProfileEditActions {
  display: flex;
  gap: 0.55rem;
}

.ProfileShareLink a {
  word-break: break-all;
}

@media (min-width: 640px) {
  .ProfileEditRow {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .SocialCommentForm {
    flex-direction: column;
    align-items: stretch;
    border-radius: 14px;
    padding: 0.55rem 0.65rem;
  }

  .SocialCommentSubmit {
    width: 100%;
  }

  .ProfileHero {
    flex-direction: column;
  }

  .nav-avatar-name {
    display: none;
  }
}

/* Notification preference rows */
.notif-pref-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.85rem 1.25rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(20, 44, 38, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 249, 0.92));
  box-shadow: 0 1px 3px rgba(20, 44, 38, 0.05);
}

.notif-pref-row + .notif-pref-row {
  margin-top: 0.65rem;
}

.notif-pref-copy {
  min-width: 0;
}

.notif-pref-row strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.notif-pref-desc {
  margin: 0.3rem 0 0;
  line-height: 1.45;
  max-width: 34rem;
}

.notif-pref-row .check-row {
  margin: 0;
  justify-self: end;
  white-space: nowrap;
}

.notif-pref-row label.check-row {
  min-height: 0;
}

#notifPrefsZone {
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  padding: 1rem 1.1rem 1.15rem;
}

#notifPrefsZone h3 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .notif-pref-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .notif-pref-row .check-row {
    justify-self: start;
  }
}

/* Friends */
.FriendsPage {
  max-width: none;
}

.FriendsHero {
  margin-bottom: 1.5rem;
}

.FriendsLayout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 980px) {
  .FriendsLayout {
    grid-template-columns: minmax(0, 1fr) 19.5rem;
    align-items: start;
  }
}

.FriendsMain,
.FriendsAside {
  display: grid;
  gap: 1.1rem;
}

.FriendsPanel {
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.FriendsPanelHead {
  margin-bottom: 1rem;
}

.FriendsPanelHead h2 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.FriendsPanelHead .meta {
  margin: 0;
}

.FriendsPanel--split {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .FriendsPanel--split {
    grid-template-columns: 1fr 1fr;
  }
}

.FriendsList {
  display: grid;
  gap: 0.75rem;
}

.FriendsList--compact {
  margin-top: 0.85rem;
}

.FriendsCard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(20, 44, 38, 0.08);
  box-shadow: 0 1px 2px rgba(20, 44, 38, 0.03);
}

.FriendsCard--compact {
  grid-template-columns: minmax(0, 1fr) auto;
}

.FriendsAvatar {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  flex: none;
}

.FriendsCardName {
  display: block;
  font-size: 1rem;
}

.FriendsCardMeta {
  margin: 0.2rem 0 0;
  color: var(--ink-muted);
  font-size: 0.86rem;
}

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

.FriendsForm {
  display: grid;
  gap: 0.75rem;
}

.FriendsForm label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.FriendsForm input {
  border: 1px solid rgba(15, 173, 122, 0.28);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  background: #fff;
  color: inherit;
}

.FriendsStatus.is-error {
  color: var(--danger);
}

.FriendsInviteLabel {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .FriendsCard {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .FriendsCardActions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Weekly Quests */
.QuestsPage {
  max-width: none;
}

.QuestsHero {
  margin-bottom: 1.5rem;
}

.QuestsKicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-muted);
}

.QuestsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.QuestCardTop {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.QuestBadge {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 173, 122, 0.12);
  color: var(--accent-strong);
}

.QuestDesc {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.QuestProgressMeta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.QuestsHistory {
  margin-top: 2rem;
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.QuestsHistoryTitle {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.QuestsHistoryList {
  display: grid;
  gap: 0.75rem;
}

.QuestHistoryItem {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.QuestHistoryItem:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.QuestHistoryMark {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 173, 122, 0.14);
}

/* Avatars / photo mode */
.UserAvatar,
.SocialAvatar,
.SettingsAvatarPreview {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  overflow: hidden;
  flex: none;
}

.SocialAvatar {
  width: 2.7rem;
  height: 2.7rem;
  font-size: 0.95rem;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(15, 173, 122, 0.28);
}

.SettingsAvatarPreview {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 1.5rem;
  box-shadow: 0 0 0 3px #fff, 0 8px 20px rgba(20, 44, 38, 0.12);
}

.ProfileAvatar {
  overflow: hidden;
}

.FriendsAvatar--photo,
.nav-avatar--photo,
.UserAvatar--photo,
.ProfileAvatar.UserAvatar--photo {
  background: transparent !important;
}

.SocialAuthorRow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.SettingsAvatarBlock {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0 0.35rem;
}

.SettingsAvatarActions {
  display: grid;
  gap: 0.45rem;
  justify-items: start;
}

.SettingsAvatarUpload {
  position: relative;
  overflow: hidden;
}

.SettingsProfileRow {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .SettingsProfileRow {
    grid-template-columns: 1fr 1fr;
  }
}

/* Profile tabs — elegant underline strip */
.ProfileTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
  margin: 0.15rem 0 1.65rem;
  padding: 0.28rem;
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: 999px;
  background: rgba(20, 44, 38, 0.035);
  width: fit-content;
  max-width: 100%;
}

.ProfileTab {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--ink-muted);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.ProfileTabIcon {
  font-size: 0.88rem;
  opacity: 0.88;
}

.nav-link-icon {
  display: inline-block;
  width: 1.05rem;
  flex: none;
  text-align: center;
  opacity: 0.78;
}

@media (max-width: 640px) {
  .ProfileTabs {
    flex-wrap: nowrap;
    justify-content: space-around;
    gap: 0.1rem;
    width: 100%;
    border-radius: 16px;
  }

  .ProfileTab {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.62rem 0.2rem;
    gap: 0;
  }

  .ProfileTabLabel {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .ProfileTabIcon {
    font-size: 1.12rem;
    opacity: 1;
  }

  .ProfileTab.is-active::after {
    display: none;
  }
}

.ProfileTab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
}

.ProfileTab.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 44, 38, 0.08), 0 4px 12px rgba(20, 44, 38, 0.05);
}

.ProfileTab.is-active::after {
  display: none;
}

body.is-profile-map {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.is-profile-map > .ChatbotRoot,
body.is-profile-map > .toast-stack {
  position: fixed !important;
  flex: 0 0 0 !important;
  min-height: 0;
  margin: 0;
  order: 0;
}

body.is-profile-map > #lightbox {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: none;
  flex: none !important;
  margin: 0;
  order: 0;
  overflow: visible;
  z-index: 10000 !important;
  pointer-events: auto !important;
}

body.is-profile-map > .ChatbotRoot {
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
}

body.is-profile-map > .toast-stack {
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(340px, calc(100% - 2rem));
  height: auto;
}

body.is-profile-map .site-chrome {
  order: 0;
}

body.is-profile-map #view-profile {
  order: 1;
  display: block;
}

body.is-profile-map #view-profile .ProfilePage {
  margin-bottom: 0.35rem;
  padding-bottom: 0;
}

body.is-profile-map #view-profile .ProfilePage > :not(.ProfileTabs):not(.ProfileTerritory) {
  display: none;
}

body.is-profile-map #view-profile .ProfileTerritory {
  display: block;
  margin: 0 0 0.35rem;
}

body.is-profile-map #view-profile .ProfileTerritory .PageHead {
  margin-bottom: 0.65rem;
}

body.is-profile-map #view-profile .ProfileTabs {
  margin-bottom: 0;
}

body.is-profile-map #view-map {
  order: 2;
  display: block;
  flex: 1 1 auto;
}

body.is-profile-map .app-shell {
  grid-template-columns: minmax(240px, 280px) 1fr;
  width: 90%;
  min-height: calc(100vh - 10.5rem);
  margin-bottom: 1rem;
}

body.is-recording .side-panel,
body.is-recording #mapStatsToggle {
  display: none !important;
}

body.is-recording .MapTerritoryStats {
  display: none !important;
}

body.is-recording .app-shell {
  grid-template-columns: 1fr;
}

/* Recording uses Profile → Map: hide profile chrome so the HUD sits on a clear map. */
body.is-recording.is-profile-map #view-profile {
  display: none !important;
}

body.is-recording.is-profile-map #view-map {
  order: 1;
  flex: 1 1 auto;
  min-height: 0;
}

body.is-recording .view-map .map-stage,
body.is-recording .view-map #map {
  position: relative;
  top: auto;
  min-height: min(100dvh, calc(100vh - 4.5rem));
  height: min(100dvh, calc(100vh - 4.5rem));
}

@media (max-width: 920px) {
  body.is-recording .view-map .map-stage {
    position: relative;
    top: auto;
  }
}

body.is-profile-map .MapTerritoryStats {
  padding: 0.95rem 1.1rem;
  background:
    linear-gradient(135deg, rgba(15, 173, 122, 0.07), transparent 45%),
    var(--bg-elevated);
}

body.is-profile-map .MapTerritoryStats .ActivityCardStats--primary strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

body.is-profile-map .MapTerritoryStats .ActivityCardStats--primary > li > span,
body.is-profile-map .MapTerritoryStats .stat-label {
  font-size: 0.66rem;
}

@media (max-width: 640px) {
  body.is-profile-map .app-shell {
    width: 98%;
  }
}

.ProfileAvatarWrap {
  position: relative;
  width: 4.75rem;
  height: 4.75rem;
  flex-shrink: 0;
  z-index: 2;
}

.ProfileAvatarWrap .ProfileAvatar {
  width: 100%;
  height: 100%;
}

.ProfileAvatarCamera {
  position: absolute;
  right: -0.15rem;
  bottom: -0.1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #142c26;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(20, 44, 38, 0.22);
  cursor: pointer;
  z-index: 3;
  font-size: 0.75rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.ProfileAvatarCamera:hover {
  background: #0b9470;
  transform: scale(1.05);
}

.ProfileHeroActions {
  position: relative;
  z-index: 1;
}

.ProfileDashGrid {
  display: grid;
  gap: 1rem;
}

.ProfileDashHeat {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 100%;
}

.ProfileDashHeat .heat-cell {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
}

@media (min-width: 860px) {
  .ProfileDashGrid {
    grid-template-columns: 1fr 1fr;
  }

  .ProfileDashGrid--activities .ProfileDashActivities {
    grid-column: 1 / -1;
  }
}

.ProfileHeroActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Skeleton loaders */
.skel-stack {
  display: grid;
  gap: 0.55rem;
  padding: 0.15rem 0;
}

.skel-line,
.skel-btn {
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(20, 44, 38, 0.08);
}

.skel-line--short {
  width: 62%;
}

.skel-btn {
  width: 5.5rem;
  height: 1.7rem;
  border-radius: 999px;
}

@keyframes skelPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@keyframes skelShine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.panel-fold-body .empty {
  margin: 0;
}

.side-panel .panel-primary {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(15, 173, 122, 0.12), transparent 55%),
    var(--bg-elevated);
}

.SettingsPage .form-stack,
.SettingsPage .danger-zone {
  max-width: none;
}

.SettingsPanel {
  display: grid;
  gap: 0.95rem;
}

.SettingsPanel[hidden] {
  display: none !important;
}

.SettingsTabs {
  margin-bottom: 1.25rem;
}

.ProfileStatLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0.35rem 0 0;
}

.ProfileStatLink {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.ProfileStatLink strong {
  font-variant-numeric: tabular-nums;
}

.ProfileStatLink:hover,
.ProfileStatLink:focus-visible {
  color: var(--accent-strong, #0b9470);
}

.ProfileShare .share-layout {
  margin-top: 1rem;
}

.ShareExplain {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 44, 38, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f4faf7 140%);
}

.ShareExplain p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(22, 48, 40, 0.82);
}

.ShareSectionTitle {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.ShareLinksCol {
  display: grid;
  gap: 1.15rem;
}

.ShareLinkBlock {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 44, 38, 0.08);
  background: #fff;
}

.ShareLinkBlock input[readonly] {
  width: 100%;
  font-size: 0.88rem;
}

.ShareAdvanced {
  margin-top: 0.25rem;
}

.ShareAdvanced summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.92rem;
  color: rgba(22, 48, 40, 0.78);
}

.ShareAdvanced[open] summary {
  margin-bottom: 0.35rem;
}

.ShareCardActions {
  margin-top: 0.85rem;
}


.PromptDialogField {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
  font-weight: 600;
}

.PromptDialogField input {
  font-weight: 500;
}

.RecordLocationGate p {
  margin: 0;
}

/* Screen chrome — menus, tabs, pages */
.nav-flyout-head {
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem 0.8rem 0.7rem;
  margin: 0 0 0.2rem;
  border-bottom: 1px solid var(--line);
}

.nav-flyout-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-flyout-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav-flyout-sep {
  height: 1px;
  margin: 0.28rem 0.35rem;
  background: var(--line);
}

.nav-flyout .nav-link-danger {
  color: var(--danger);
}

.nav-flyout .nav-link-danger:hover,
.nav-flyout .nav-link-danger:focus-visible {
  color: var(--danger);
  background: rgba(232, 93, 76, 0.08);
}

.SettingsTabs {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 1.15rem;
}

.SettingsPage {
  max-width: 54rem;
}

.SettingsSurface {
  background: var(--bg-elevated);
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem 1.55rem;
  box-shadow: var(--shadow);
}

.SettingsSurface .form-stack,
.SettingsSurface .danger-zone,
.SettingsPage .form-stack,
.SettingsPage .danger-zone {
  max-width: none;
}

.SettingsPanel {
  display: grid;
  gap: 0.95rem;
}

.SettingsPanel .lede {
  max-width: none;
}

.page .card-grid > .empty,
.page .QuestsGrid > .empty,
.HeatChartWrap > .empty {
  grid-column: 1 / -1;
  padding: 2.1rem 1.2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(20, 44, 38, 0.14);
  border-radius: var(--radius);
}

.quest-card {
  border-radius: var(--radius-lg);
}

.panel {
  border-radius: var(--radius);
}

.stat {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 140%);
}

.lightbox-close {
  width: 2.2rem;
  height: 2.2rem;
  background: #ffffff;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  float: none;
  margin: 0;
}

.nav-toggle {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.btn-primary {
  letter-spacing: 0.01em;
}

.hero-kicker {
  color: var(--accent-strong);
}

.QuestsHero.PageHead,
.QuestsHero {
  margin-bottom: 1.75rem;
}

.ProfilePage .ProfileTabs {
  margin-top: 0.2rem;
}

body.kids-mode .kids-hide-dropdown {
  display: none !important;
}

.nav-label-kids {
  display: none;
}

body.kids-mode .nav-label-adult {
  display: none !important;
}

body.kids-mode .nav-label-kids {
  display: inline;
}

body.family-child .kids-hide {
  display: none !important;
}

body.kids-mode .ChatbotRoot {
  display: none !important;
}

.nav-grownup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-right: 0.35rem;
  border: 1px solid rgba(20, 44, 38, 0.12);
  border-radius: 999px;
  background: #fff7e8;
  color: #c45c12;
  cursor: pointer;
  font-size: 1rem;
}

.nav-grownup-btn:hover,
.nav-grownup-btn:focus-visible {
  background: #ffe7c2;
}

body.kids-mode {
  --accent: #6b5cff;
  --accent-strong: #5346e0;
  --accent-glow: rgba(107, 92, 255, 0.2);
  --warm: #ff8a3d;
}

body.kids-mode .site-chrome {
  background: linear-gradient(90deg, rgba(255, 214, 102, 0.45), rgba(167, 232, 189, 0.48) 42%, rgba(174, 198, 255, 0.48));
  border-bottom-color: rgba(107, 92, 255, 0.14);
}

body.kids-mode .site-header {
  background: transparent;
}

body.kids-mode .nav-set > .nav-link,
body.kids-mode .nav-dropdown-toggle {
  font-weight: 700;
  font-size: 1.02rem;
}

body.kids-mode .btn {
  min-height: 2.65rem;
  font-weight: 700;
  border-radius: 999px;
}

body.kids-mode .chip.chip-btn {
  min-height: 2.4rem;
  font-weight: 700;
  border-radius: 999px;
}

body.kids-mode .page-title {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

body.kids-mode .lightbox-panel h1 {
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
}

.FamilyKidsList {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.FamilyKidCard {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 0.85rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f4faf7);
  box-shadow: var(--shadow);
}

.FamilyKidAvatar {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  grid-row: 1 / span 2;
}

.FamilyKidCopy strong {
  display: block;
  font-size: 1.05rem;
}

.FamilyKidActions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.FamilyAddForm {
  padding: 1rem 0 0.25rem;
  border-top: 1px solid var(--line);
}

.FamilyIncoming,
.FamilyAdultsList,
.FamilyGroupForm {
  margin: 0 0 1.1rem;
}

.FamilyGroupForm .btn-primary,
.FamilyAddForm .btn-primary {
  align-self: flex-start;
  min-width: 11rem;
  margin-top: 0.15rem;
}

.RecordShareFamily,
.RecordShareTags {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem 0.35rem;
  margin: 0.35rem 0 0.7rem;
}

.RecordShareMembers {
  display: grid;
  gap: 0.15rem;
  margin: 0.35rem 0 0.5rem;
}

.RecordTagChips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.45rem 0 0.7rem;
}

@media (max-width: 640px) {
  body.kids-mode .nav-set > .nav-link,
  body.kids-mode .nav-dropdown > summary.nav-dropdown-toggle {
    min-height: 3rem;
    font-size: 1.08rem;
  }

  .FamilyKidCard {
    grid-template-columns: auto 1fr;
  }

  .FamilyKidActions {
    width: 100%;
  }

  .FamilyKidActions .btn {
    flex: 1;
  }
}

/* Inner content — cards, stats, lists, boards */
.ContentCard,
.quest-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 1.1rem;
  align-items: start;
  padding: 1.2rem 1.25rem 1.25rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(15, 173, 122, 0.08), transparent 52%),
    #ffffff;
  border: 1px solid rgba(20, 44, 38, 0.08);
  box-shadow: var(--shadow);
}

.ContentCard.is-joined,
.quest-card.is-complete {
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(15, 173, 122, 0.12);
}

.ContentCardIcon,
.QuestCardIcon {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(15, 173, 122, 0.18), rgba(15, 173, 122, 0.06));
  color: var(--accent-strong);
  font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(15, 173, 122, 0.14);
}

.ContentCardMain {
  min-width: 0;
  display: grid;
  gap: 0.42rem;
}

.ContentCardKicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ContentCardTitle,
.ContentCard h3,
.quest-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.ContentCardCopy {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.ContentCardCode {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.ContentCardStats {
  list-style: none;
  margin: 0.35rem 0 0.15rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ContentCardStats li {
  display: grid;
  gap: 0.12rem;
  min-width: 5.2rem;
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  background: rgba(20, 44, 38, 0.035);
  border: 1px solid rgba(20, 44, 38, 0.06);
}

.ContentCardStats span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ContentCardStats strong {
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
}

.ContentCardMeta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.ContentCardMeta a {
  color: var(--accent-strong);
  font-weight: 650;
}

.ContentCardActions {
  margin-top: 0.45rem;
}

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

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

.BoardRow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(248, 251, 249, 0.9);
  border: 1px solid rgba(20, 44, 38, 0.06);
}

.BoardStat {
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.RankBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(15, 173, 122, 0.12);
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
}

.LeaderAthlete {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.LeaderYou {
  display: inline-flex;
  margin-left: 0.35rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.MetricChip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(20, 44, 38, 0.045);
  border: 1px solid rgba(20, 44, 38, 0.07);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.WearBlock {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.WearBlock--compact {
  gap: 0.35rem;
  flex: 0 1 auto;
  justify-content: flex-end;
}

.WearActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
}

.WearPill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 44, 38, 0.1);
  background: rgba(248, 251, 249, 0.9);
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
}

.WearPill.is-on {
  background: var(--accent-glow);
  border-color: transparent;
  color: var(--accent-strong);
}

.WearPill--action {
  border-color: rgba(15, 173, 122, 0.28);
  color: var(--accent-strong);
  background: rgba(15, 173, 122, 0.06);
}

.WearPill--action:hover {
  background: rgba(15, 173, 122, 0.12);
}

.ProfileDashLeadHead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.ProfileDashLeadHead > div:first-child {
  min-width: 0;
  flex: 1 1 12rem;
}

.SettingsFitnessMetrics {
  margin: 0.85rem 0 1.15rem;
}

.SettingsFitnessTitle {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.SettingsFitnessBlock .ProfileStatGrid {
  margin-top: 0.35rem;
}

.SettingsFitnessPrompt .SettingsFitnessTitle {
  margin-bottom: 0.35rem;
}

.FitnessPrompt {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 173, 122, 0.18);
  background: linear-gradient(180deg, rgba(15, 173, 122, 0.07), rgba(255, 255, 255, 0.92));
}

.FitnessGrid .stat {
  min-height: 5.2rem;
}

.ProfileFitnessGrid li em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.EmptyCard {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
  padding: 1.6rem 1.35rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px dashed rgba(20, 44, 38, 0.16);
}

.EmptyCard .empty {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
}

.badge-item.is-earned {
  background: linear-gradient(180deg, rgba(15, 173, 122, 0.1), #fff 58%);
  border-color: rgba(15, 173, 122, 0.22);
}

.badge-item:not(.is-earned) {
  opacity: 0.55;
}

.activity-list,
.badge-list,
.leader-list {
  gap: 0.5rem;
}

.stat {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 160%);
}

.stat .value {
  font-size: 1.45rem;
}

.ProfileHero {
  padding: 1.5rem 1.55rem;
  border-radius: var(--radius-lg);
}

.ProfileSection--panel,
.ProfilePeriod,
.FriendsPanel,
.QuestsHistory {
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.3rem 1.35rem;
}

.FamilyKidCard {
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: #fff;
}

.RecordShareFamily,
.RecordShareTags {
  background: rgba(248, 251, 249, 0.85);
}

.RecordShareFamily legend,
.RecordShareTags legend {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 0 0.35rem;
}

.lb-pane fieldset {
  border: 1px solid rgba(20, 44, 38, 0.08);
  border-radius: 14px;
  padding: 0.85rem 1rem 0.85rem;
  overflow: visible;
}

.share-preview-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(20, 44, 38, 0.08);
  box-shadow: var(--shadow);
  background: #fff;
}

.HeatChartWrap {
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid rgba(20, 44, 38, 0.08);
  box-shadow: var(--shadow);
}

.myRankChip,
#myRankChip {
  padding: 0.55rem 0.95rem;
  font-weight: 650;
}

.ProfileDashGrid > .FriendsPanel:first-child,
.ProfileDashGrid > .ProfileDashLead {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(15, 173, 122, 0.12), transparent 55%),
    #fff;
}

.ProfileActivityMetrics {
  justify-content: flex-end;
}

.card-grid {
  gap: 1.1rem;
}

.ContentCard:not(.clickable-row) {
  cursor: default;
}

.ContentCard.clickable-row:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 173, 122, 0.22);
  box-shadow: var(--shadow-hover);
}

.SocialPost,
.ActivityCard {
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.25rem 1.3rem;
}

.ActivityCardStats--primary li {
  padding: 0.15rem 0;
}

.ActivityCardStats--primary strong {
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -0.03em;
}

@media (max-width: 640px) {
  .ContentCard,
  .quest-card {
    grid-template-columns: 1fr;
  }

  .ProfileSportList .ProfileSportRow,
  .ProfileSportRow {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.45rem 0.65rem;
  }

  .ProfileSportKm {
    justify-self: center;
    text-align: center;
  }

  .ProfileSportCount {
    justify-self: end;
    text-align: right;
    font-size: 0.85em;
  }
}

/* —— Landing wow & motion polish —— */
body.is-landing .join-cta.hero-cta {
  position: relative;
  overflow: hidden;
  min-width: 11rem;
  box-shadow:
    0 1px 2px rgba(20, 44, 38, 0.06),
    0 12px 32px rgba(15, 173, 122, 0.32);
}

body.is-landing .join-cta.hero-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.34) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: btnShimmer 4.5s ease-in-out infinite;
  pointer-events: none;
}

body.is-landing .site-chrome {
  border-bottom-color: rgba(15, 173, 122, 0.1);
}

.hero-block-claimed {
  filter: drop-shadow(0 0 6px rgba(18, 184, 134, 0.35));
  transition: fill-opacity 0.45s ease;
}

.ContentCard,
.quest-card,
.FriendsPanel {
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  body.is-landing::before,
  body.is-landing::after,
  .hero-visual.is-live,
  .hero-kicker-dot,
  .hero-map-badge-dot,
  body.is-landing .join-cta.hero-cta::after,
  .feature {
    animation: none !important;
  }

  .hero-copy,
  .hero-actions,
  .hero-visual,
  .hero-stat,
  .feature,
  .view.is-on {
    opacity: 1;
    transform: none;
  }
}

/* Personal Coach */
.CoachPage {
  --coach-ink: #102820;
  --coach-muted: #5a7168;
  --coach-line: rgba(16, 40, 32, 0.1);
  --coach-panel: rgba(255, 255, 255, 0.82);
  --coach-soft: linear-gradient(165deg, rgba(15, 173, 122, 0.08) 0%, rgba(255, 255, 255, 0.55) 42%, rgba(20, 44, 38, 0.03) 100%);
  position: relative;
}

.CoachPage::before {
  content: '';
  position: absolute;
  inset: -1.5rem -1rem auto;
  height: 16rem;
  background:
    radial-gradient(ellipse 70% 80% at 12% 20%, rgba(15, 173, 122, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 60% at 88% 10%, rgba(255, 138, 61, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.CoachPage > * {
  position: relative;
  z-index: 1;
}

.CoachPage > .PageHead {
  margin-bottom: 1.1rem;
}

.CoachTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--coach-line);
}

.CoachTab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--coach-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.CoachTab:hover {
  color: var(--coach-ink);
}

.CoachTab.is-active {
  background: #fff;
  color: var(--coach-ink);
  box-shadow: 0 1px 4px rgba(16, 40, 32, 0.08);
}

.CoachTab.has-session:not(.is-active)::after,
.CoachTab.has-pending:not(.is-active)::after {
  content: '';
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.CoachTab.has-pending:not(.is-active)::after {
  background: #d97706;
}

.CoachPanel {
  margin: 0;
}

.CoachPanel[hidden] {
  display: none !important;
}

.CoachStartStep {
  margin: 0 0 1.35rem;
}

.CoachStepLabel {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coach-muted);
}

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

.CoachSportChip {
  appearance: none;
  border: 1px solid var(--coach-line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--coach-ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.CoachSportChip:hover {
  border-color: rgba(15, 173, 122, 0.4);
  transform: translateY(-1px);
}

.CoachSportChip.is-selected {
  border-color: rgba(15, 173, 122, 0.55);
  background: rgba(15, 173, 122, 0.12);
  color: var(--accent-strong);
}

.CoachSelectedTemplate {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(15, 173, 122, 0.08);
  border: 1px solid rgba(15, 173, 122, 0.18);
  font-weight: 600;
  color: var(--coach-ink);
}

.CoachFormGrid--compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.CoachFormActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.CoachBlocksQuiet {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--coach-line);
}

.CoachBlocksSelectLabel {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--coach-muted);
}

.CoachBlocksSelect {
  width: 100%;
}

.CoachTodayEmpty {
  padding: 1.25rem 0;
}

.CoachTodayEmptyActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.CoachSection {
  margin: 0 0 2rem;
}

.view.is-on .CoachPage > .PageHead {
  animation: coachFadeUp 0.55s ease both;
}

.view.is-on .CoachPanel.is-active {
  animation: coachFadeUp 0.45s ease both;
}

.view.is-on .CoachTodayBanner:not([hidden]) {
  animation: coachFadeUp 0.5s ease both;
}

.CoachSectionHead {
  margin: 0 0 1rem;
}

.CoachSectionTitle {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--coach-ink);
}

.CoachForm {
  padding: 1.25rem 1.35rem 1.4rem;
  border-radius: 20px;
  background: var(--coach-soft);
  border: 1px solid var(--coach-line);
  box-shadow: 0 12px 32px rgba(16, 40, 32, 0.05);
}

.CoachFormGrid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.CoachFormActions {
  margin-top: 0.35rem;
}

.CoachPaceZones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--coach-line);
}

.CoachPaceZonesLabel {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--coach-muted);
  margin-right: 0.25rem;
}

.CoachPaceChip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--coach-ink);
  background: rgba(15, 173, 122, 0.1);
  border: 1px solid rgba(15, 173, 122, 0.18);
}

.CoachPlanList {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 0.25rem;
}

.CoachPlanCard {
  background: var(--coach-panel);
  border: 1px solid var(--coach-line);
  border-radius: 18px;
  padding: 1.1rem 1.2rem 1.2rem;
  box-shadow: 0 8px 24px rgba(16, 40, 32, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.CoachPlanCard:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 173, 122, 0.28);
  box-shadow: 0 14px 30px rgba(16, 40, 32, 0.08);
}

.CoachPlanCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.CoachPlanCardHead h3 {
  margin: 0.15rem 0 0;
  font-size: 1.08rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.CoachPlanSport {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.CoachProgressBadge {
  flex: none;
  min-width: 2.6rem;
  text-align: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: rgba(15, 173, 122, 0.12);
  border: 1px solid rgba(15, 173, 122, 0.2);
}

.CoachPlanGoal {
  margin: 0.35rem 0 0.85rem;
  color: var(--coach-muted);
  font-size: 0.94rem;
}

.CoachDraft,
.CoachPlanDetail {
  margin: 1.5rem 0;
  padding: 1.4rem 1.45rem;
  border-radius: 20px;
  background: var(--coach-panel);
  border: 1px solid var(--coach-line);
  box-shadow: 0 14px 36px rgba(16, 40, 32, 0.06);
}

.CoachDraftHead h2 {
  margin: 0.35rem 0 0.4rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.CoachWeek + .CoachWeek {
  margin-top: 1.35rem;
}

.CoachWeek h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--coach-ink);
}

.CoachSessionList {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.CoachSession {
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(16, 40, 32, 0.07);
  transition: border-color 0.15s ease;
}

.CoachSession.is-complete {
  opacity: 0.72;
  border-color: rgba(15, 173, 122, 0.35);
  background: linear-gradient(180deg, rgba(15, 173, 122, 0.05), #fff);
}

.CoachSessionRow {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.CoachSessionActions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

.CoachTodayBanner {
  margin: 0 0 1.35rem;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 173, 122, 0.16), rgba(255, 138, 61, 0.08)),
    rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 173, 122, 0.22);
  box-shadow: 0 10px 28px rgba(15, 173, 122, 0.08);
}

.CoachTodayInner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
}

.CoachTodayCopy {
  display: grid;
  gap: 0.15rem;
  min-width: min(100%, 16rem);
}

.CoachTodayLabel {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

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

.CoachCalendar {
  margin: 1rem 0;
}

.CoachCalendarTitle {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.CoachCalendarGrid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.CoachCalendarDay {
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--coach-line);
}

.CoachCalendarSession.is-complete { opacity: 0.65; }
.CoachCalendarSession.is-skipped { text-decoration: line-through; opacity: 0.5; }

.CoachChat {
  margin: 1.35rem 0;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 251, 248, 0.95));
  border: 1px solid var(--coach-line);
}

.CoachChat h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.CoachChatLog { max-height: 320px; overflow: auto; margin-bottom: 0.75rem; }
.CoachChatForm { display: flex; gap: 0.5rem; }
.CoachChatForm input { flex: 1; }
.CoachChatMsg { margin-bottom: 0.5rem; }
.CoachChatMsg--assistant p { color: #163028; }
.CoachWorkoutSteps { margin: 0.35rem 0 0 1rem; font-size: 0.92rem; }
.CoachSession.is-skipped { opacity: 0.55; }
.CoachReminders { margin: 1rem 0; display: grid; gap: 0.35rem; }

.CoachOnboard {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(15, 173, 122, 0.1), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(15, 173, 122, 0.22);
}
.CoachOnboard h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.CoachOnboardList { margin: 0 0 0.85rem; padding-left: 1.15rem; color: var(--coach-muted, #4a5c56); }
.CoachOnboardList li { margin-bottom: 0.35rem; }

.CoachPendingMatches { margin: 0 0 1rem; display: grid; gap: 0.65rem; }
.CoachPendingCard {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 173, 122, 0.25);
}
.CoachSkipReason { color: #8a5a2b; }

.CoachTemplates { margin: 0; display: grid; gap: 1.35rem; }

.CoachTemplateGroup { display: grid; gap: 0.65rem; }

.CoachTemplateGroup--blocks {
  padding: 1.05rem 1.15rem 1.2rem;
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(255, 138, 61, 0.1), rgba(15, 173, 122, 0.08)),
    rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 173, 122, 0.18);
  box-shadow: 0 10px 28px rgba(16, 40, 32, 0.05);
}

.CoachBlocksLead {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--coach-muted);
}

.CoachBlocksCard {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--coach-line);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.CoachBlocksCard.is-selected {
  border-color: rgba(15, 173, 122, 0.5);
  box-shadow: 0 0 0 1px rgba(15, 173, 122, 0.16), 0 10px 22px rgba(15, 173, 122, 0.1);
}

.CoachBlocksCardHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
}

.CoachBlocksCardHead strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: var(--coach-ink);
}

.CoachBlocksAsk {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--coach-muted);
}

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

.CoachBlocksSportsGrouped {
  display: grid;
  gap: 0.85rem;
}

.CoachBlocksSportCat {
  display: grid;
  gap: 0.4rem;
}

.CoachBlocksSportCatLabel {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coach-muted);
}

.CoachBlocksSportBtn {
  appearance: none;
  border: 1px solid var(--coach-line);
  background: #fff;
  color: var(--coach-ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.CoachBlocksSportBtn:hover {
  border-color: rgba(15, 173, 122, 0.4);
  transform: translateY(-1px);
}

.CoachBlocksSportBtn.is-selected {
  border-color: rgba(15, 173, 122, 0.55);
  background: rgba(15, 173, 122, 0.12);
  color: var(--accent-strong);
}

.CoachTemplateSport {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coach-muted);
}

.CoachTemplatesGrid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.CoachTemplateCard {
  display: grid;
  gap: 0.4rem;
  text-align: left;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--coach-line);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  color: inherit;
  font: inherit;
  box-shadow: 0 6px 18px rgba(16, 40, 32, 0.03);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.CoachTemplateCard:hover {
  border-color: rgba(15, 173, 122, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(16, 40, 32, 0.08);
}

.CoachTemplateCard.is-selected {
  border-color: rgba(15, 173, 122, 0.55);
  background: linear-gradient(165deg, rgba(15, 173, 122, 0.12), rgba(255, 255, 255, 0.95));
  box-shadow: 0 0 0 1px rgba(15, 173, 122, 0.18), 0 12px 26px rgba(15, 173, 122, 0.1);
}

.CoachTemplateCard--custom {
  border-style: dashed;
  background: rgba(15, 173, 122, 0.04);
}

.CoachCustomTargets {
  margin: 0.85rem 0 0.35rem;
  padding: 0.95rem 1rem 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(15, 173, 122, 0.35);
  background: linear-gradient(165deg, rgba(15, 173, 122, 0.08), rgba(255, 255, 255, 0.9));
}

.CoachStepLabel--nested {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
}

.CoachPaceInputs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.CoachPaceInputs input {
  width: 4.25rem;
  min-width: 0;
}

.CoachPaceSep {
  font-weight: 700;
  color: var(--coach-muted, #667);
}

.CoachCustomHint {
  margin: 0.55rem 0 0;
}

.CoachMetricSyncWarn {
  margin: 0.65rem 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #7a3b12;
  background: rgba(232, 140, 48, 0.12);
  border: 1px solid rgba(232, 140, 48, 0.35);
}

.CoachRaceWeeksHint {
  margin: 0.15rem 0 0.35rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.35;
  border: 1px solid transparent;
}

.CoachRaceWeeksHint.is-warn {
  color: #7a3b12;
  background: rgba(232, 140, 48, 0.12);
  border-color: rgba(232, 140, 48, 0.35);
}

.CoachRaceWeeksHint.is-ok {
  color: #0f5c45;
  background: rgba(15, 173, 122, 0.1);
  border-color: rgba(15, 173, 122, 0.28);
}

#coachWeeks.is-warn,
#coachRaceDate.is-warn {
  border-color: rgba(232, 140, 48, 0.65);
  box-shadow: 0 0 0 2px rgba(232, 140, 48, 0.12);
}

#coachWeeks.is-ok,
#coachRaceDate.is-ok {
  border-color: rgba(15, 173, 122, 0.55);
}

.CoachTemplateCardTop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
}

.CoachTemplateCardTop strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--coach-ink);
}

.CoachTemplateMeta {
  flex: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--coach-muted);
  white-space: nowrap;
}

.CoachTemplateSummary {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--coach-muted);
}

.CoachTemplateLevel {
  display: inline-flex;
  align-self: start;
  width: fit-content;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: rgba(15, 173, 122, 0.1);
  border: 1px solid rgba(15, 173, 122, 0.18);
}

.CoachClubPanel { margin: 1.25rem 0; }
.CoachClubShareInline { margin: 0.75rem 0 1rem; display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: flex-end; }

@keyframes coachFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .CoachPage > .PageHead,
  .CoachPanel,
  .CoachTodayBanner,
  .CoachTemplateCard,
  .CoachPlanCard,
  .CoachSportChip {
    animation: none;
    transition: none;
  }
}

/* Instagram story share */
.StoryShareLayout {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(220px, 320px) 1fr;
  align-items: start;
}
.StorySharePreviewWrap {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: #163028;
  box-shadow: 0 18px 40px rgba(22, 48, 40, 0.18);
}
.StorySharePhotoLayer,
.StoryShareMapHost,
.StorySharePreview,
.StoryShareHud {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.StorySharePhotoLayer {
  object-fit: cover;
  z-index: 1;
  opacity: 1;
  pointer-events: none;
}
.StoryShareMapHost {
  z-index: 2;
  background: transparent;
  pointer-events: none;
}
.StoryShareMapInner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
}
.StorySharePreviewWrap.is-map-full .StoryShareMapHost {
  opacity: 1 !important;
  background: transparent;
  z-index: 2;
}
.StorySharePreviewWrap.is-map-full .StorySharePhotoLayer {
  /* Raised above the map while fading in; opacity is set in JS from the slider. */
  z-index: 3;
}
.StoryShareMapHost.is-inset {
  inset: auto;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 10px 24px rgba(22, 48, 40, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.92);
  z-index: 5;
  opacity: 1 !important;
  background: #e8f0ec;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
}
.StoryShareMapHost.is-inset.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.StoryShareMapHost.is-inset .StoryShareMapInner {
  border-radius: 10px;
  overflow: hidden;
  background: #e8f0ec;
  pointer-events: none;
}
.StoryShareMapResize {
  display: none;
  position: absolute;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 4px;
  background: #0fad7a;
  box-shadow: 0 2px 8px rgba(22, 48, 40, 0.28);
  z-index: 5;
  pointer-events: auto;
  touch-action: none;
}
.StoryShareMapHost.is-inset .StoryShareMapResize {
  display: block;
}
.StoryShareMapResize--nw { left: -6px; top: -6px; cursor: nwse-resize; }
.StoryShareMapResize--ne { right: -6px; top: -6px; cursor: nesw-resize; }
.StoryShareMapResize--sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.StoryShareMapResize--se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.StorySharePreviewWrap.is-map-inset .StorySharePhotoLayer,
.StorySharePreviewWrap.is-map-off .StorySharePhotoLayer {
  z-index: 1;
}
.StorySharePreviewWrap.is-map-inset .StoryShareHud,
.StorySharePreviewWrap.is-map-off .StoryShareHud,
.StorySharePreviewWrap.is-map-full .StoryShareHud {
  z-index: 6;
}
.StoryShareMapHost .leaflet-container {
  width: 100%;
  height: 100%;
  background: transparent;
}
.StoryShareMapHost.is-inset .leaflet-container {
  background: #e8f0ec;
}
.StoryShareMapModeLabel {
  display: grid;
  gap: 0.35rem;
  margin: 0.65rem 0 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.StoryShareMapModeLabel select {
  font-weight: 500;
}
.StorySharePreview {
  display: block;
  object-fit: cover;
  z-index: 3;
}
.StoryShareHud {
  z-index: 4;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  box-sizing: border-box;
}
.StoryShareHudCard {
  width: 100%;
  padding: 0.85rem 0.9rem 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #163028;
  box-shadow: 0 10px 24px rgba(22, 48, 40, 0.12);
}
.StoryShareHudBrand {
  margin: 0 0 0.35rem;
  color: #0fad7a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.StoryShareHudTitle {
  margin: 0 0 0.25rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}
.StoryShareHudSub,
.StoryShareHudStats,
.StoryShareHudFoot {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: #5b7368;
  line-height: 1.35;
}
.StoryShareHudStats {
  margin-top: 0.35rem;
  color: #163028;
  font-weight: 600;
}
.StoryShareHudFoot {
  margin-top: 0.45rem;
  color: #0ca678;
  font-weight: 600;
}
.StoryShareCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.StorySharePreviewWrap.is-live-map .StorySharePreview,
.StorySharePreviewWrap.is-map-off .StorySharePreview {
  display: none;
}
.StoryShareToggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}
.StoryShareFields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.85rem;
  margin: 0.85rem 0 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(22, 48, 40, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
}
.StoryShareFields:disabled {
  opacity: 0.45;
}
.StoryShareFields .StoryShareToggleRow {
  margin: 0;
  padding: 0.15rem 0;
  min-height: 1.35rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.StorySharePhotoTools {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0 0.35rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(22, 48, 40, 0.1);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.72), rgba(244, 250, 247, 0.9));
}
.StoryShareDropzone {
  position: relative;
}
.StoryShareFileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.StoryShareDropzoneBtn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0.95rem 1rem;
  border: 1.5px dashed rgba(22, 48, 40, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: #163028;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.StoryShareDropzoneBtn:hover,
.StoryShareDropzone.is-dragover .StoryShareDropzoneBtn {
  border-color: rgba(15, 173, 122, 0.55);
  background: rgba(15, 173, 122, 0.06);
  box-shadow: 0 8px 22px rgba(15, 173, 122, 0.08);
}
.StoryShareDropzoneIcon {
  display: grid;
  place-items: center;
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  background: linear-gradient(145deg, #12c287, #0fad7a);
  color: #fff;
  font-size: 1.05rem;
}
.StoryShareDropzoneCopy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.StoryShareDropzoneCopy strong {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.StoryShareDropzoneCopy span {
  font-size: 0.8rem;
  font-weight: 500;
  color: #5b7368;
  line-height: 1.35;
}
.StoryShareDropzonePreview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(22, 48, 40, 0.1);
}
.StoryShareDropzonePreview img {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: cover;
  border-radius: 9px;
  background: #163028;
}
.StoryShareDropzonePreviewMeta {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}
.StoryShareDropzonePreviewMeta strong {
  font-size: 0.9rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.StoryShareOpacity {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.StoryShareOpacity input[type="range"] {
  width: 100%;
  accent-color: var(--accent, #0fad7a);
}
.StoryShareControls > .StoryShareToggleRow {
  margin-bottom: 0.55rem;
}
@media (max-width: 760px) {
  .StoryShareLayout {
    grid-template-columns: 1fr;
  }
  .CoachSessionRow {
    flex-direction: column;
  }
}

.RecordBlocksPreview {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 138, 61, 0.08);
  border: 1px solid rgba(255, 138, 61, 0.22);
}
.RecordBlocksPreviewTitle { margin: 0 0 0.35rem; font-size: 0.95rem; }
.RecordBlocksMap {
  height: 160px;
  margin-top: 0.65rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(22, 48, 40, 0.1);
}