:root {
  --ink: #18211f;
  --muted: #60706c;
  --paper: #f6f4ee;
  --panel: rgba(255, 252, 244, 0.88);
  --line: rgba(26, 37, 34, 0.12);
  --past: #356d8f;
  --present: #2f8360;
  --future: #b45f34;
  --capsule: #7d5bb7;
  --shadow: 0 18px 60px rgba(31, 38, 35, 0.16);
}

* {
  box-sizing: border-box;
}

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

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

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.sidebar,
.right-rail,
.map-stage {
  min-height: 0;
}

.sidebar,
.right-rail {
  position: fixed;
  top: 16px;
  z-index: 20;
  display: flex;
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sidebar {
  left: 16px;
}

.right-rail {
  right: 16px;
}

.brand-lockup,
.profile-card,
.control-block,
.badges,
.feed-panel,
.topbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 36px rgba(25, 36, 32, 0.09);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.profile-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(47, 131, 96, 0.95), rgba(53, 109, 143, 0.9)),
    #20302b;
  color: #fff9ed;
  font-weight: 900;
}

.profile-main h1 {
  margin: 0 0 3px;
  font-size: 1.18rem;
}

.profile-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profile-stats div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

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

.profile-stats strong {
  margin-bottom: 2px;
  font-size: 1.08rem;
}

.profile-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #202d29;
  color: #f4efe3;
  font-size: 1.3rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1;
}

.control-block,
.badges,
.feed-panel {
  padding: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.section-title strong {
  color: var(--ink);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 38, 34, 0.06);
}

.segment {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.segment.is-active {
  background: #20302b;
  color: #fff8eb;
  box-shadow: 0 8px 18px rgba(23, 35, 31, 0.14);
}

.range-label {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.time-activity {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  height: 112px;
  margin-top: 14px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent),
    rgba(27, 38, 34, 0.04);
}

.chart-activity {
  height: 132px;
  background:
    linear-gradient(rgba(26, 37, 34, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), transparent),
    rgba(27, 38, 34, 0.04);
  background-size: 100% 24px, auto, auto;
}

.year-line {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
}

.year-line::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 22px;
  left: 50%;
  width: 1px;
  background: rgba(26, 37, 34, 0.16);
}

.year-line i {
  position: relative;
  z-index: 1;
  width: 12px;
  height: var(--height);
  min-height: 12px;
  border-radius: 999px;
  background: var(--past);
  box-shadow: 0 8px 18px rgba(53, 109, 143, 0.18);
}

.year-line.is-hot i {
  background: var(--future);
}

.year-line.is-now i {
  background: var(--present);
}

.year-line span {
  position: absolute;
  bottom: 0;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: #20302b;
}

.post-form {
  display: grid;
  gap: 12px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 86px;
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(32, 48, 43, 0.48);
  box-shadow: 0 0 0 3px rgba(47, 131, 96, 0.14);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-action,
.challenge-panel button,
.popover-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #20302b;
  color: #fff9ed;
  font-weight: 800;
}

.button-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  font-weight: 800;
}

.exploration-card {
  padding: 14px;
}

.filter-select {
  width: auto;
  min-height: 34px;
  padding: 0 28px 0 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 800;
}

.tabbed-card {
  padding: 10px;
}

.tab-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-container);
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab-button.is-active {
  background: var(--primary-container);
  color: #073b33;
}

.tab-button strong {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 107, 91, 0.14);
  font-size: 0.68rem;
}

.tab-panel[hidden] {
  display: none;
}

.moment-examples {
  display: grid;
  gap: 10px;
}

.moment-example {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.moment-thumb {
  width: 64px;
  height: 74px;
  border-radius: 8px;
  background: #ccd8d0;
  box-shadow: inset 0 0 0 1px rgba(24, 33, 31, 0.08);
}

.memory-thumb {
  background:
    linear-gradient(140deg, rgba(53, 109, 143, 0.95), rgba(246, 244, 238, 0.24)),
    linear-gradient(35deg, #213a4b, #8cb5c8);
}

.capsule-thumb {
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 249, 237, 0.82), transparent 22%),
    linear-gradient(135deg, #7d5bb7, #b45f34);
}

.future-thumb {
  background:
    linear-gradient(150deg, rgba(47, 131, 96, 0.9), rgba(180, 95, 52, 0.72)),
    linear-gradient(30deg, #f6f4ee, #557b8b);
}

.moment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.moment-meta time {
  white-space: nowrap;
}

.moment-example h2 {
  margin: 0 0 4px;
  font-size: 0.96rem;
  line-height: 1.15;
}

.moment-example p {
  margin: 0 0 8px;
  color: #45544f;
  font-size: 0.76rem;
  line-height: 1.32;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.tag-row span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(32, 48, 43, 0.08);
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 800;
}

.checkins {
  color: var(--muted);
  font-size: 0.72rem;
}

.map-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  min-width: 0;
}

.topbar {
  position: fixed;
  top: 16px;
  left: calc(340px + 32px);
  right: calc(330px + 32px);
  z-index: 25;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.search-box {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.search-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
}

.search-box input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
}

.top-add-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.add-moment-panel {
  padding: 12px;
}

.add-moment-button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  white-space: nowrap;
}

.add-moment-fields {
  display: none;
  width: 100%;
  gap: 12px;
  padding-top: 2px;
}

.add-moment-panel.is-expanded .add-moment-fields {
  display: grid;
}

.top-add-panel.is-expanded .top-detail-fields {
  display: none;
}

.top-add-panel.has-location .top-detail-fields {
  display: none;
}

.add-mode {
  max-width: 100%;
}

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

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

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

.add-form-grid textarea {
  min-height: 64px;
}

.placement-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid rgba(47, 131, 96, 0.2);
  border-radius: 8px;
  background: rgba(47, 131, 96, 0.11);
  color: #244f3e;
  font-size: 0.8rem;
  font-weight: 800;
}

.placement-hint span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #20302b;
  color: #fff9ed;
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.icon-button.is-active,
.icon-button:hover {
  background: #20302b;
  color: #fff9ed;
}

.map-panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.map-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: #d9e4d9;
}

.lapse-map,
.leaflet-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: #d9e4d9;
  font: inherit;
}

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

.leaflet-container {
  overflow: hidden;
  outline: 0;
}

.leaflet-container.adding-moment,
.leaflet-container.adding-moment .leaflet-tile,
.leaflet-container.adding-moment .leaflet-marker-icon {
  cursor: copy;
}

.map-canvas.is-adding::after {
  content: "+";
  position: fixed;
  z-index: 900;
  right: calc(330px + 32px);
  bottom: 24px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: #20302b;
  color: #fff9ed;
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(25, 36, 32, 0.24);
  pointer-events: none;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
}

.leaflet-marker-icon,
.leaflet-marker-shadow {
  display: block;
}

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

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

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

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

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

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

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

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

.leaflet-top {
  top: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-control-container .leaflet-left {
  left: 0;
}

.leaflet-control-container .leaflet-top {
  top: 0;
}

.leaflet-popup {
  position: absolute;
  text-align: center;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  text-align: left;
}

.map-scrim {
  position: absolute;
  inset: 0;
  z-index: 350;
  background:
    linear-gradient(90deg, rgba(246, 244, 238, 0.38), transparent 28%, transparent 72%, rgba(246, 244, 238, 0.28)),
    linear-gradient(180deg, rgba(246, 244, 238, 0.2), transparent 30%, rgba(246, 244, 238, 0.1));
  pointer-events: none;
}

.leaflet-control-zoom {
  margin: 96px 0 0 372px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 36px rgba(25, 36, 32, 0.09) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  border: 0 !important;
  color: var(--ink) !important;
  font: 800 1rem/30px Inter, sans-serif !important;
}

.leaflet-control-attribution {
  border-radius: 8px 0 0 0;
  background: rgba(255, 252, 244, 0.84) !important;
}

.leaflet-marker-icon {
  background: transparent;
  border: 0;
}

.map-grid {
  position: absolute;
  display: none;
  inset: -12%;
  opacity: 0.7;
  background-image:
    linear-gradient(rgba(40, 63, 56, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 63, 56, 0.11) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: rotate(-8deg);
}

.waterway,
.park,
.street,
.trail-line {
  position: absolute;
  pointer-events: none;
}

.waterway,
.park,
.street {
  display: none;
}

.waterway {
  border-radius: 999px;
  background: rgba(75, 139, 165, 0.5);
  filter: blur(0.2px);
}

.waterway-one {
  width: 76%;
  height: 70px;
  left: -8%;
  top: 18%;
  transform: rotate(-15deg);
}

.waterway-two {
  width: 48%;
  height: 46px;
  right: -7%;
  bottom: 22%;
  transform: rotate(23deg);
}

.park {
  border: 1px solid rgba(56, 111, 74, 0.12);
  background: rgba(98, 155, 87, 0.34);
}

.park-one {
  width: 210px;
  height: 150px;
  left: 55%;
  top: 12%;
  border-radius: 47% 53% 42% 58%;
}

.park-two {
  width: 260px;
  height: 160px;
  left: 8%;
  bottom: 8%;
  border-radius: 58% 42% 54% 46%;
}

.street {
  background: rgba(255, 252, 243, 0.8);
  box-shadow: inset 0 0 0 1px rgba(30, 44, 39, 0.08);
}

.street.h {
  width: 120%;
  height: 22px;
  left: -10%;
}

.street.v {
  width: 22px;
  height: 120%;
  top: -10%;
}

.h1 {
  top: 35%;
  transform: rotate(-6deg);
}

.h2 {
  top: 59%;
  transform: rotate(9deg);
}

.h3 {
  top: 77%;
  transform: rotate(-18deg);
}

.v1 {
  left: 24%;
  transform: rotate(12deg);
}

.v2 {
  left: 49%;
  transform: rotate(-7deg);
}

.v3 {
  left: 77%;
  transform: rotate(18deg);
}

.lapse-marker {
  display: grid;
  width: 34px;
  height: 46px;
  place-items: start center;
  padding: 0;
  border: 0;
  border-radius: 18px 18px 18px 4px;
  background: var(--present);
  box-shadow:
    0 16px 30px rgba(27, 37, 34, 0.28),
    inset 0 -10px 16px rgba(0, 0, 0, 0.14);
  transform: rotate(-45deg);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.lapse-marker::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 15px 15px 15px 4px;
}

.lapse-marker::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -12px;
  width: 28px;
  height: 10px;
  border-radius: 999px;
  background: rgba(24, 33, 31, 0.22);
  filter: blur(2px);
  transform: rotate(45deg);
}

.pin-glyph {
  display: grid;
  width: 19px;
  height: 19px;
  margin-top: 8px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(45deg);
}

.lapse-marker.memory {
  background: var(--past);
}

.lapse-marker.future {
  background: var(--future);
}

.lapse-marker.capsule {
  background: var(--capsule);
}

.lapse-marker:hover,
.lapse-marker.is-selected {
  box-shadow: 0 20px 44px rgba(25, 36, 32, 0.34);
  transform: rotate(-45deg) translateY(-4px) scale(1.13);
}

.lapse-marker.is-selected::before {
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.24);
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(31, 38, 35, 0.16);
  backdrop-filter: blur(18px);
}

.lapse-leaflet-popup.is-capsule .leaflet-popup-content-wrapper {
  border-color: rgba(125, 91, 183, 0.35);
  background:
    linear-gradient(135deg, rgba(125, 91, 183, 0.13), transparent 55%),
    var(--panel);
}

.leaflet-popup-tip {
  background: var(--panel);
  box-shadow: none;
}

.leaflet-popup-content {
  width: 320px !important;
  margin: 18px;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
}

.lapse-popup p:first-child {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lapse-popup h2 {
  margin-bottom: 4px;
  font-size: 1.32rem;
  line-height: 1.15;
}

.lapse-popup time {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.lapse-popup-note {
  margin: 14px 0;
  color: #394844;
  line-height: 1.45;
}

.draft-popup .draft-form {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.draft-popup label span {
  font-size: 0.72rem;
}

.draft-popup textarea {
  min-height: 72px;
}

.draft-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.capsule-popover {
  display: none;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(125, 91, 183, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.lapse-popup.is-capsule .capsule-popover {
  display: grid;
}

.capsule-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(125, 91, 183, 0.16);
}

.capsule-meter span {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d5bb7, #b45f34);
}

.capsule-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.capsule-meta div {
  display: grid;
  gap: 2px;
}

.capsule-meta strong {
  font-size: 1.02rem;
}

.capsule-meta span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.capsule-people {
  display: flex;
  gap: 6px;
}

.capsule-people span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: #7d5bb7;
  color: #fff9ed;
  font-size: 0.7rem;
  font-weight: 900;
}

.popover-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.popover-actions button:last-child {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
}

.signal-feed {
  display: grid;
  gap: 10px;
}

.signal {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.signal::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--present);
}

.signal.past::before {
  background: var(--past);
}

.signal.future::before {
  background: var(--future);
}

.signal.capsule::before {
  background: var(--capsule);
}

.signal strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.88rem;
}

.signal p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.trail-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trail-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
}

.trail-dot {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: var(--present);
  box-shadow: 0 0 0 1px var(--line);
}

.trail-dot.past {
  background: var(--past);
}

.trail-dot.future {
  background: var(--future);
}

.trail-list strong {
  font-size: 0.9rem;
}

.trail-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.challenge-panel {
  display: grid;
  gap: 14px;
  background: #20302b;
  color: #fff9ed;
}

.challenge-panel .eyebrow {
  color: rgba(255, 249, 237, 0.7);
}

.challenge-panel h2 {
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

.challenge-panel button {
  background: #fff9ed;
  color: #20302b;
}

@media (max-width: 1120px) {
  .topbar {
    left: 16px;
    right: 16px;
  }

  .sidebar {
    top: 88px;
  }

  .right-rail {
    top: auto;
    right: 16px;
    bottom: 16px;
    left: calc(340px + 32px);
    width: auto;
    max-height: 240px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .leaflet-control-zoom {
    margin-left: 16px !important;
  }
}

/* Etcht flat black accent */
:root {
  --primary: #111827;
  --primary-soft: #f3f4f6;
  --past: #111827;
  --present: #111827;
  --future: #111827;
  --capsule: #111827;
  --signal: #111827;
}

.brand-wordmark {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 2px;
  color: #111827;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background: #000000;
}

.memory-thumb,
.capsule-thumb,
.future-thumb {
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.84), rgba(17, 24, 39, 0.12)),
    #f3f4f6;
}

.capsule-meter,
.chart-date-bar i {
  background: #e5e7eb;
}

.chart-area {
  fill: rgba(17, 24, 39, 0.08);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

/* Tight moment activity date layout */
.activity-line-chart {
  padding-top: 8px;
}

.activity-line-chart svg {
  height: 142px;
}

.chart-date-controls {
  margin-top: 2px;
  padding-top: 4px;
}

.chart-date-arrow {
  min-height: 42px;
}

.chart-date-bar button {
  height: 42px;
}

/* Tight moment activity date layout */
.activity-line-chart {
  padding-top: 8px;
}

.activity-line-chart svg {
  height: 142px;
}

.chart-date-controls {
  margin-top: 2px;
  padding-top: 4px;
}

.chart-date-arrow {
  min-height: 42px;
}

.chart-date-bar button {
  height: 42px;
}

/* Tight moment activity date layout */
.activity-line-chart {
  padding-top: 8px;
}

.activity-line-chart svg {
  height: 142px;
}

.chart-date-controls {
  margin-top: 2px;
  padding-top: 4px;
}

.chart-date-arrow {
  min-height: 42px;
}

.chart-date-bar button {
  height: 42px;
}

/* Moment activity date navigation */
.activity-report-card {
  overflow: visible;
  flex: 0 0 auto;
}

.right-rail {
  overflow-y: auto;
}

.tabbed-card {
  flex: 0 0 auto;
}

.chart-date-controls {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.chart-date-arrow {
  display: grid;
  min-width: 0;
  min-height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
}

.chart-date-arrow:disabled {
  color: #c5ccd6;
  cursor: default;
}

.chart-date-arrow .material-symbols-rounded {
  font-size: 1.1rem;
}

.chart-date-viewport {
  min-width: 0;
  overflow: hidden;
}

.chart-date-bar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.chart-date-bar button {
  height: 46px;
  min-width: 0;
}

.chart-date-bar span {
  font-size: 0.56rem;
}

/* Dynamic chart final states */
.activity-line-chart {
  position: relative;
}

.chart-point {
  fill: #ffffff;
  stroke: var(--primary);
  stroke-width: 2;
}

.chart-hit-point {
  fill: transparent;
  outline: none;
  cursor: pointer;
}

.chart-point-group .chart-hover-line {
  opacity: 0;
  stroke: var(--primary);
  stroke-dasharray: 4 5;
  stroke-width: 1;
}

.chart-point-group.is-active .chart-hover-line {
  opacity: 0.42;
}

.chart-point-group.is-active .chart-point {
  fill: var(--primary);
}

/* Dynamic moment chart */
.activity-line-chart {
  position: relative;
  padding-top: 12px;
}

.activity-line-chart svg {
  display: block;
  width: 100%;
  height: 164px;
  overflow: visible;
}

.chart-grid path {
  fill: none;
  stroke: #edf1f6;
  stroke-width: 1;
}

.chart-area {
  fill: url(#activityFill);
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-point-group .chart-hover-line {
  opacity: 0;
  stroke: var(--primary);
  stroke-dasharray: 4 5;
  stroke-width: 1;
}

.chart-point {
  fill: #ffffff;
  stroke: var(--primary);
  stroke-width: 2;
}

.chart-hit-point {
  fill: transparent;
  outline: none;
  cursor: pointer;
}

.chart-point-group.is-active .chart-hover-line {
  opacity: 0.42;
}

.chart-point-group.is-active .chart-point {
  fill: var(--primary);
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 148px;
  max-width: 188px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(23, 32, 51, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity 120ms ease;
}

.chart-tooltip.is-visible {
  opacity: 1;
}

.chart-tooltip strong,
.chart-tooltip span,
.chart-tooltip p {
  display: block;
}

.chart-tooltip strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.chart-tooltip span {
  margin-top: 2px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
}

.chart-tooltip p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.chart-date-bar {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 3px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.chart-date-bar button {
  display: grid;
  min-width: 0;
  height: 42px;
  align-items: end;
  justify-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8b95a3;
  font-size: 0.58rem;
  font-weight: 700;
}

.chart-date-bar i {
  display: block;
  width: 100%;
  max-width: 10px;
  height: var(--bar-height);
  min-height: 6px;
  border-radius: 999px 999px 2px 2px;
  background: #dbe3ee;
}

.chart-date-bar span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: clip;
  white-space: nowrap;
}

.chart-date-bar button.is-active {
  color: var(--primary);
}

.chart-date-bar button.is-active i {
  background: var(--primary);
}

/* Flat activity report */
.activity-report-card {
  padding: 14px 14px 12px;
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.report-header .eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
}

.report-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.15;
}

.report-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 650;
}

.report-period .material-symbols-rounded {
  color: var(--muted);
  font-size: 1rem;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.report-metrics div {
  min-width: 0;
  padding: 12px 10px;
}

.report-metrics div + div {
  border-left: 1px solid var(--line);
}

.report-metrics span,
.chart-labels {
  color: #8b95a3;
  font-size: 0.68rem;
  font-weight: 650;
}

.report-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 780;
  line-height: 1;
}

.activity-line-chart {
  padding-top: 12px;
}

.activity-line-chart svg {
  display: block;
  width: 100%;
  height: 164px;
}

.chart-grid path {
  fill: none;
  stroke: #edf1f6;
  stroke-width: 1;
}

.chart-area {
  fill: url(#activityFill);
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-point {
  fill: var(--primary);
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  padding: 2px 2px 0;
}

/* Final flat two-color UI */
:root {
  --ink: #172033;
  --muted: #6b7280;
  --paper: #f4f7fb;
  --panel: #ffffff;
  --line: #dbe3ee;
  --line-strong: #c5d0df;
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --primary-soft: #eaf1ff;
  --surface: #ffffff;
  --surface-container: #f4f7fb;
  --surface-high: #ffffff;
  --past: #2563eb;
  --present: #2563eb;
  --future: #2563eb;
  --capsule: #2563eb;
  --signal: #2563eb;
  --shadow: none;
}

body {
  background: var(--paper);
  color: var(--ink);
}

.leaflet-tile {
  filter: saturate(0.9) contrast(0.98) brightness(1.02);
}

.map-canvas,
.lapse-map,
.leaflet-container {
  background: #eef3f8;
}

.map-scrim {
  background: linear-gradient(90deg, rgba(244, 247, 251, 0.5), transparent 24%, transparent 76%, rgba(244, 247, 251, 0.45));
}

.sidebar,
.right-rail {
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
}

.topbar {
  left: calc(360px + 32px);
  right: calc(360px + 32px);
}

.profile-card,
.control-block,
.badges,
.feed-panel,
.search-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: none;
}

.profile-card::before,
.control-block::before,
.feed-panel::before,
.search-box::before {
  display: none;
}

.profile-card,
.control-block,
.feed-panel {
  padding: 14px;
}

.search-box {
  min-height: 56px;
  padding: 7px;
}

.profile-main h1,
.section-title span,
.moment-example h2,
.signal strong,
.trail-list strong,
.lapse-popup h2 {
  color: var(--ink);
}

.profile-main p,
.profile-stats span,
.section-title,
.moment-meta,
.signal p,
.trail-list p,
label span,
.lapse-popup time,
.lapse-popup-note {
  color: var(--muted);
}

.section-title {
  margin-bottom: 10px;
  font-size: 0.74rem;
  text-transform: none;
}

.section-title span {
  font-size: 0.9rem;
  font-weight: 750;
}

.section-title strong,
.checkins,
.search-icon,
.lapse-popup p:first-child {
  color: var(--primary);
}

.avatar {
  width: 46px;
  height: 46px;
  border: 0;
  background: var(--primary);
  color: #ffffff;
  box-shadow: none;
}

.profile-stats div,
.moment-example,
.signal,
.capsule-popover {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-container);
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

select {
  color-scheme: light;
}

.search-box input[type="search"] {
  color: var(--ink);
}

.search-box input[type="search"]::placeholder,
input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.primary-action,
.challenge-panel button,
.popover-actions button {
  min-height: 38px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: none;
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background: #1d4ed8;
}

.segmented,
.tab-list {
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-container);
}

.segment,
.tab-button {
  min-height: 34px;
  border-radius: 6px;
  color: var(--muted);
}

.segment.is-active,
.tab-button.is-active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: none;
}

.tab-button strong {
  background: var(--primary-soft);
  color: var(--primary);
}

.time-activity {
  height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(#e7edf5 1px, transparent 1px),
    #ffffff;
  background-size: 100% 24px;
}

.time-activity::before {
  display: none;
}

.year-line::before {
  background: #dbe3ee;
}

.year-line i,
.year-line.is-hot i,
.year-line.is-now i {
  width: 9px;
  border-radius: 6px 6px 2px 2px;
  background: var(--primary);
  box-shadow: none;
}

.year-line span {
  color: var(--muted);
}

.filter-select,
.tag-row span,
.badge {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.moment-example {
  grid-template-columns: 58px 1fr;
  gap: 10px;
  padding: 9px;
  transition: none;
}

.moment-example:hover {
  border-color: var(--line-strong);
  background: var(--surface-container);
  transform: none;
}

.moment-thumb {
  width: 58px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.memory-thumb,
.capsule-thumb,
.future-thumb {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.84), rgba(37, 99, 235, 0.16)),
    #dbeafe;
}

.moment-example p {
  color: var(--muted);
}

.signal {
  grid-template-columns: 8px 1fr;
  gap: 10px;
  background: #ffffff;
}

.signal::before {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.placement-hint {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.placement-hint span {
  background: var(--primary);
  color: #ffffff;
}

.challenge-panel {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.challenge-panel .eyebrow {
  color: var(--primary);
}

.challenge-panel h2 {
  color: var(--ink);
}

.challenge-panel button {
  background: var(--primary);
  color: #ffffff;
}

.lapse-marker {
  width: 32px;
  height: 40px;
  border: 2px solid #ffffff;
  border-radius: 18px 18px 18px 5px;
  background: var(--primary);
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.18);
}

.lapse-marker::before {
  inset: 7px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
}

.lapse-marker::after {
  background: rgba(23, 32, 51, 0.2);
}

.lapse-marker.memory,
.lapse-marker.future,
.lapse-marker.capsule {
  background: var(--primary);
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.18);
}

.pin-glyph {
  color: var(--primary);
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.14);
  backdrop-filter: none;
}

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

.leaflet-popup-content {
  color: var(--ink);
}

.capsule-popover {
  border-color: var(--line);
  background: var(--surface-container);
}

.capsule-meter {
  background: #dbeafe;
}

.capsule-meter span {
  background: var(--primary);
}

.capsule-meta strong,
.capsule-people span {
  color: var(--ink);
}

.capsule-people span {
  background: var(--primary);
  color: #ffffff;
}

.popover-actions button:last-child {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.leaflet-control-zoom {
  margin-left: 392px !important;
  border: 1px solid var(--line) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

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

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--muted) !important;
}

.map-canvas.is-adding::after {
  right: calc(360px + 34px);
  border: 2px solid #ffffff;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.18);
}

@media (max-width: 1120px) {
  .topbar {
    left: 16px;
    right: 16px;
  }

  .leaflet-control-zoom {
    margin-left: 16px !important;
  }
}

/* Etcht flat black accent */
:root {
  --primary: #111827;
  --primary-soft: #f3f4f6;
  --past: #111827;
  --present: #111827;
  --future: #111827;
  --capsule: #111827;
  --signal: #111827;
}

.brand-wordmark {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 2px;
  color: #111827;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background: #000000;
}

.memory-thumb,
.capsule-thumb,
.future-thumb {
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.84), rgba(17, 24, 39, 0.12)),
    #f3f4f6;
}

.capsule-meter,
.chart-date-bar i {
  background: #e5e7eb;
}

.chart-area {
  fill: rgba(17, 24, 39, 0.08);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

/* Final Lapse command layer */
:root {
  --ink: #f7f4ec;
  --muted: #a8b2ad;
  --paper: #0c0f0e;
  --panel: rgba(18, 22, 21, 0.84);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --past: #38a5ff;
  --present: #33e0a1;
  --future: #ff8a3d;
  --capsule: #b48cff;
  --signal: #f4d35e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34), 0 2px 10px rgba(0, 0, 0, 0.18);
}

body {
  background: var(--paper);
  color: var(--ink);
}

.leaflet-tile {
  filter: saturate(0.62) contrast(1.06) brightness(0.86);
}

.map-canvas,
.lapse-map,
.leaflet-container {
  background: #16201c;
}

.map-scrim {
  background:
    linear-gradient(90deg, rgba(6, 8, 8, 0.58), transparent 28%, transparent 70%, rgba(6, 8, 8, 0.5)),
    linear-gradient(180deg, rgba(6, 8, 8, 0.42), transparent 24%, rgba(6, 8, 8, 0.25)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 72px);
}

.sidebar,
.right-rail {
  width: min(372px, calc(100vw - 32px));
  gap: 12px;
}

.topbar {
  left: calc(372px + 30px);
  right: calc(372px + 30px);
}

.profile-card,
.control-block,
.badges,
.feed-panel,
.search-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 58%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.25);
}

.profile-card::before,
.control-block::before,
.feed-panel::before,
.search-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.search-box {
  min-height: 58px;
  border-color: var(--line-strong);
}

.search-icon,
.section-title strong,
.checkins,
.lapse-popup p:first-child {
  color: var(--present);
}

.profile-main h1,
.section-title span,
.moment-example h2,
.signal strong,
.trail-list strong,
.lapse-popup h2 {
  color: #fffaf1;
}

.profile-main p,
.profile-stats span,
.section-title,
.moment-meta,
.signal p,
.trail-list p,
label span,
.lapse-popup time,
.lapse-popup-note {
  color: var(--muted);
}

.avatar {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(51, 224, 161, 0.5);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.55), transparent 23%),
    conic-gradient(from 210deg, var(--past), var(--present), var(--future), var(--capsule), var(--past));
  color: #07100d;
  box-shadow: 0 0 0 5px rgba(51, 224, 161, 0.08), 0 16px 34px rgba(0, 0, 0, 0.34);
}

.profile-stats div,
.moment-example,
.signal,
.capsule-popover {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

input,
select,
textarea {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(3, 7, 6, 0.34);
  color: #fffaf1;
}

select {
  color-scheme: dark;
}

.search-box input[type="search"] {
  color: #fffaf1;
}

.search-box input[type="search"]::placeholder,
input::placeholder,
textarea::placeholder {
  color: rgba(247, 244, 236, 0.42);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(51, 224, 161, 0.72);
  box-shadow: 0 0 0 3px rgba(51, 224, 161, 0.14);
}

.primary-action,
.challenge-panel button,
.popover-actions button {
  border: 1px solid rgba(51, 224, 161, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.17), transparent 70%),
    #12c98a;
  color: #06100d;
  box-shadow: 0 14px 30px rgba(18, 201, 138, 0.24);
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 70%),
    #33e0a1;
}

.segmented,
.tab-list {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.segment,
.tab-button {
  border-radius: 6px;
  color: rgba(247, 244, 236, 0.62);
}

.segment.is-active,
.tab-button.is-active {
  background: rgba(247, 244, 236, 0.92);
  color: #0b100e;
}

.tab-button strong {
  background: rgba(51, 224, 161, 0.18);
  color: var(--present);
}

.time-activity {
  height: 136px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(56, 165, 255, 0.12), rgba(51, 224, 161, 0.06) 46%, rgba(255, 138, 61, 0.08)),
    rgba(0, 0, 0, 0.22);
  background-size: 100% 24px, auto, auto;
}

.year-line i {
  width: 11px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #7ad0ff, var(--past));
}

.year-line.is-hot i {
  background: linear-gradient(180deg, #ffd47a, var(--future));
}

.year-line.is-now i {
  background: linear-gradient(180deg, #b3ffe5, var(--present));
}

.filter-select,
.tag-row span,
.badge {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.07);
  color: #dce5df;
}

.moment-example:hover {
  border-color: rgba(51, 224, 161, 0.35);
  background: rgba(255, 255, 255, 0.085);
  transform: translateY(-1px);
}

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

.signal::before {
  width: 3px;
  height: 100%;
  margin: 0;
  border-radius: 999px;
}

.challenge-panel {
  border-color: rgba(244, 211, 94, 0.28);
  background:
    linear-gradient(135deg, rgba(244, 211, 94, 0.14), transparent 62%),
    rgba(20, 18, 10, 0.86);
}

.challenge-panel .eyebrow {
  color: var(--signal);
}

.challenge-panel h2 {
  color: #fff6d1;
}

.challenge-panel button {
  border-color: rgba(244, 211, 94, 0.48);
  background: var(--signal);
  color: #171207;
  box-shadow: 0 14px 30px rgba(244, 211, 94, 0.18);
}

.lapse-marker {
  width: 32px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px 18px 18px 5px;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.88), transparent 18%),
    linear-gradient(160deg, #a8ffe2, var(--present) 52%, #11895f);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.36), 0 0 0 7px rgba(51, 224, 161, 0.1);
}

.lapse-marker.memory {
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(160deg, #9adeff, var(--past) 56%, #116aa4);
}

.lapse-marker.future {
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(160deg, #ffd29d, var(--future) 56%, #c65316);
}

.lapse-marker.capsule {
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(160deg, #dcc7ff, var(--capsule) 56%, #6e46c3);
}

.pin-glyph {
  color: #fffaf1;
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 70%),
    rgba(15, 18, 17, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.25);
}

.leaflet-popup-tip {
  background: rgba(15, 18, 17, 0.94);
}

.leaflet-popup-content {
  color: #fffaf1;
}

.popover-actions button:last-child {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fffaf1;
  box-shadow: none;
}

.leaflet-control-zoom {
  margin-left: 404px !important;
  border: 1px solid var(--line-strong) !important;
  background: rgba(15, 18, 17, 0.82) !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-control-zoom a {
  background: rgba(15, 18, 17, 0.92) !important;
  color: #fffaf1 !important;
}

.map-canvas.is-adding::after {
  right: calc(372px + 34px);
  border: 1px solid rgba(51, 224, 161, 0.65);
  background: var(--present);
  color: #06100d;
}

@media (max-width: 1120px) {
  .topbar {
    left: 16px;
    right: 16px;
  }

  .leaflet-control-zoom {
    margin-left: 16px !important;
  }
}

/* Flat two-color override */
:root {
  --ink: #172033;
  --muted: #6b7280;
  --paper: #f4f7fb;
  --panel: #ffffff;
  --line: #dbe3ee;
  --line-strong: #c5d0df;
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --primary-soft: #eaf1ff;
  --surface: #ffffff;
  --surface-container: #f4f7fb;
  --surface-high: #ffffff;
  --past: #2563eb;
  --present: #2563eb;
  --future: #2563eb;
  --capsule: #2563eb;
  --signal: #2563eb;
  --shadow: none;
}

body {
  background: var(--paper);
  color: var(--ink);
}

.leaflet-tile {
  filter: saturate(0.9) contrast(0.98) brightness(1.02);
}

.map-canvas,
.lapse-map,
.leaflet-container {
  background: #eef3f8;
}

.map-scrim {
  background: linear-gradient(90deg, rgba(244, 247, 251, 0.5), transparent 24%, transparent 76%, rgba(244, 247, 251, 0.45));
}

.sidebar,
.right-rail {
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
}

.topbar {
  left: calc(360px + 32px);
  right: calc(360px + 32px);
}

.profile-card,
.control-block,
.badges,
.feed-panel,
.search-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: none;
}

.profile-card::before,
.control-block::before,
.feed-panel::before,
.search-box::before {
  display: none;
}

.profile-card,
.control-block,
.feed-panel {
  padding: 14px;
}

.search-box {
  min-height: 56px;
  padding: 7px;
}

.profile-main h1,
.section-title span,
.moment-example h2,
.signal strong,
.trail-list strong,
.lapse-popup h2 {
  color: var(--ink);
}

.profile-main p,
.profile-stats span,
.section-title,
.moment-meta,
.signal p,
.trail-list p,
label span,
.lapse-popup time,
.lapse-popup-note {
  color: var(--muted);
}

.section-title {
  margin-bottom: 10px;
  font-size: 0.74rem;
  text-transform: none;
}

.section-title span {
  font-size: 0.9rem;
  font-weight: 750;
}

.section-title strong,
.checkins,
.search-icon,
.lapse-popup p:first-child {
  color: var(--primary);
}

.avatar {
  width: 46px;
  height: 46px;
  border: 0;
  background: var(--primary);
  color: #ffffff;
  box-shadow: none;
}

.profile-stats div,
.moment-example,
.signal,
.capsule-popover {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-container);
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

select {
  color-scheme: light;
}

.search-box input[type="search"] {
  color: var(--ink);
}

.search-box input[type="search"]::placeholder,
input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.primary-action,
.challenge-panel button,
.popover-actions button {
  min-height: 38px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: none;
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background: #1d4ed8;
}

.segmented,
.tab-list {
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-container);
}

.segment,
.tab-button {
  min-height: 34px;
  border-radius: 6px;
  color: var(--muted);
}

.segment.is-active,
.tab-button.is-active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: none;
}

.tab-button strong {
  background: var(--primary-soft);
  color: var(--primary);
}

.time-activity {
  height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(#e7edf5 1px, transparent 1px),
    #ffffff;
  background-size: 100% 24px;
}

.time-activity::before {
  display: none;
}

.year-line::before {
  background: #dbe3ee;
}

.year-line i,
.year-line.is-hot i,
.year-line.is-now i {
  width: 9px;
  border-radius: 6px 6px 2px 2px;
  background: var(--primary);
  box-shadow: none;
}

.year-line span {
  color: var(--muted);
}

.filter-select,
.tag-row span,
.badge {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.moment-example {
  grid-template-columns: 58px 1fr;
  gap: 10px;
  padding: 9px;
  transition: none;
}

.moment-example:hover {
  border-color: var(--line-strong);
  background: var(--surface-container);
  transform: none;
}

.moment-thumb {
  width: 58px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.memory-thumb,
.capsule-thumb,
.future-thumb {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.84), rgba(37, 99, 235, 0.16)),
    #dbeafe;
}

.moment-example p {
  color: var(--muted);
}

.signal {
  grid-template-columns: 8px 1fr;
  gap: 10px;
  background: #ffffff;
}

.signal::before {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.placement-hint {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.placement-hint span {
  background: var(--primary);
  color: #ffffff;
}

.challenge-panel {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.challenge-panel .eyebrow {
  color: var(--primary);
}

.challenge-panel h2 {
  color: var(--ink);
}

.challenge-panel button {
  background: var(--primary);
  color: #ffffff;
}

.lapse-marker {
  width: 32px;
  height: 40px;
  border: 2px solid #ffffff;
  border-radius: 18px 18px 18px 5px;
  background: var(--primary);
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.18);
}

.lapse-marker::before {
  inset: 7px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
}

.lapse-marker::after {
  background: rgba(23, 32, 51, 0.2);
}

.lapse-marker.memory,
.lapse-marker.future,
.lapse-marker.capsule {
  background: var(--primary);
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.18);
}

.pin-glyph {
  color: var(--primary);
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.14);
  backdrop-filter: none;
}

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

.leaflet-popup-content {
  color: var(--ink);
}

.capsule-popover {
  border-color: var(--line);
  background: var(--surface-container);
}

.capsule-meter {
  background: #dbeafe;
}

.capsule-meter span {
  background: var(--primary);
}

.capsule-meta strong,
.capsule-people span {
  color: var(--ink);
}

.capsule-people span {
  background: var(--primary);
  color: #ffffff;
}

.popover-actions button:last-child {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.leaflet-control-zoom {
  margin-left: 392px !important;
  border: 1px solid var(--line) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

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

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--muted) !important;
}

.map-canvas.is-adding::after {
  right: calc(360px + 34px);
  border: 2px solid #ffffff;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.18);
}

@media (max-width: 1120px) {
  .topbar {
    left: 16px;
    right: 16px;
  }

  .leaflet-control-zoom {
    margin-left: 16px !important;
  }
}

/* Lapse temporal command UI */
:root {
  --ink: #f7f4ec;
  --muted: #a8b2ad;
  --paper: #101312;
  --panel: rgba(18, 22, 21, 0.82);
  --panel-solid: #151a18;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --past: #38a5ff;
  --present: #33e0a1;
  --future: #ff8a3d;
  --capsule: #b48cff;
  --signal: #f4d35e;
  --danger: #ff5c7a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34), 0 2px 10px rgba(0, 0, 0, 0.18);
}

body {
  background: #0c0f0e;
  color: var(--ink);
}

.leaflet-tile {
  filter: saturate(0.62) contrast(1.06) brightness(0.86);
}

.map-canvas,
.lapse-map,
.leaflet-container {
  background: #16201c;
}

.map-scrim {
  background:
    linear-gradient(90deg, rgba(6, 8, 8, 0.58), transparent 28%, transparent 70%, rgba(6, 8, 8, 0.5)),
    linear-gradient(180deg, rgba(6, 8, 8, 0.42), transparent 24%, rgba(6, 8, 8, 0.25)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 72px);
}

.sidebar,
.right-rail {
  width: min(372px, calc(100vw - 32px));
  gap: 12px;
}

.profile-card,
.control-block,
.badges,
.feed-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 54%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.25);
}

.profile-card::before,
.control-block::before,
.feed-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.profile-card,
.control-block,
.feed-panel {
  padding: 15px;
}

.profile-main {
  align-items: flex-start;
}

.avatar {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(51, 224, 161, 0.5);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.55), transparent 23%),
    conic-gradient(from 210deg, var(--past), var(--present), var(--future), var(--capsule), var(--past));
  color: #07100d;
  box-shadow: 0 0 0 5px rgba(51, 224, 161, 0.08), 0 16px 34px rgba(0, 0, 0, 0.34);
  font-weight: 900;
}

.profile-main h1 {
  color: #fffaf1;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
}

.profile-main p {
  color: #9da9a4;
  font-size: 0.78rem;
}

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

.profile-stats div {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.profile-stats strong {
  color: #fffaf1;
  font-size: 1.12rem;
}

.profile-stats span,
.section-title,
.moment-meta,
.checkins,
.signal p,
.trail-list p,
label span {
  color: var(--muted);
}

.section-title {
  margin-bottom: 12px;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.section-title span {
  color: #fffaf1;
  font-size: 0.82rem;
  font-weight: 850;
}

.section-title strong {
  color: var(--present);
  font-size: 0.72rem;
}

.topbar {
  left: calc(372px + 30px);
  right: calc(372px + 30px);
}

.search-box {
  min-height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 70%),
    rgba(15, 18, 17, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.25);
}

.search-row {
  min-height: 44px;
  gap: 9px;
}

.search-icon {
  color: var(--present);
}

.search-box input[type="search"] {
  color: #fffaf1;
  font-size: 0.9rem;
  font-weight: 650;
}

.search-box input[type="search"]::placeholder {
  color: rgba(247, 244, 236, 0.45);
}

input,
select,
textarea {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(3, 7, 6, 0.34);
  color: #fffaf1;
}

select {
  color-scheme: dark;
}

textarea::placeholder,
input::placeholder {
  color: rgba(247, 244, 236, 0.42);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(51, 224, 161, 0.72);
  box-shadow: 0 0 0 3px rgba(51, 224, 161, 0.14);
}

.primary-action,
.challenge-panel button,
.popover-actions button {
  border: 1px solid rgba(51, 224, 161, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.17), transparent 70%),
    #12c98a;
  color: #06100d;
  box-shadow: 0 14px 30px rgba(18, 201, 138, 0.24);
  font-weight: 850;
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 70%),
    #33e0a1;
}

.button-icon {
  color: currentColor;
}

.segmented,
.tab-list {
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.segment,
.tab-button {
  min-height: 34px;
  border-radius: 6px;
  color: rgba(247, 244, 236, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
}

.segment.is-active,
.tab-button.is-active {
  background: rgba(247, 244, 236, 0.92);
  color: #0b100e;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.tab-button strong {
  background: rgba(51, 224, 161, 0.18);
  color: var(--present);
}

.tab-button.is-active strong {
  background: #0b100e;
  color: #fffaf1;
}

.time-activity {
  position: relative;
  height: 136px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(56, 165, 255, 0.12), rgba(51, 224, 161, 0.06) 46%, rgba(255, 138, 61, 0.08)),
    rgba(0, 0, 0, 0.22);
  background-size: 100% 24px, auto, auto;
}

.time-activity::before {
  content: "activity";
  position: absolute;
  top: 9px;
  left: 10px;
  color: rgba(247, 244, 236, 0.42);
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.year-line::before {
  background: rgba(255, 255, 255, 0.12);
}

.year-line i {
  width: 11px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #7ad0ff, var(--past));
  box-shadow: 0 0 22px rgba(56, 165, 255, 0.2);
}

.year-line.is-hot i {
  background: linear-gradient(180deg, #ffd47a, var(--future));
  box-shadow: 0 0 22px rgba(255, 138, 61, 0.22);
}

.year-line.is-now i {
  background: linear-gradient(180deg, #b3ffe5, var(--present));
  box-shadow: 0 0 22px rgba(51, 224, 161, 0.24);
}

.year-line span {
  color: rgba(247, 244, 236, 0.52);
}

input[type="range"] {
  accent-color: var(--present);
}

.moment-example {
  grid-template-columns: 62px 1fr;
  gap: 11px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.moment-example:hover {
  border-color: rgba(51, 224, 161, 0.35);
  background: rgba(255, 255, 255, 0.085);
  transform: translateY(-1px);
}

.moment-thumb {
  width: 62px;
  height: 70px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 24px rgba(0, 0, 0, 0.22);
}

.moment-meta span {
  color: #fffaf1;
}

.moment-example h2 {
  color: #fffaf1;
  font-size: 0.95rem;
}

.moment-example p {
  color: #b8c2bd;
}

.tag-row span,
.filter-select,
.badge {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.07);
  color: #dce5df;
}

.checkins {
  color: var(--present);
}

.signal {
  grid-template-columns: 3px 1fr;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.signal::before {
  width: 3px;
  height: 100%;
  margin: 0;
  border-radius: 999px;
  background: var(--present);
}

.signal strong {
  color: #fffaf1;
}

.trail-list {
  position: relative;
}

.trail-list::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 6px;
  width: 1px;
  background: linear-gradient(var(--past), var(--present), var(--future));
}

.trail-dot {
  position: relative;
  z-index: 1;
  border-color: rgba(11, 16, 14, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 18px rgba(51, 224, 161, 0.18);
}

.trail-list strong {
  color: #fffaf1;
}

.placement-hint {
  border: 1px solid rgba(51, 224, 161, 0.2);
  border-radius: 8px;
  background: rgba(51, 224, 161, 0.09);
  color: #c9ffec;
}

.placement-hint span {
  background: var(--present);
  color: #06100d;
}

.challenge-panel {
  border-color: rgba(244, 211, 94, 0.28);
  background:
    linear-gradient(135deg, rgba(244, 211, 94, 0.14), transparent 62%),
    rgba(20, 18, 10, 0.86);
  color: #fff4c7;
}

.challenge-panel .eyebrow {
  color: var(--signal);
}

.challenge-panel h2 {
  color: #fff6d1;
}

.challenge-panel button {
  border-color: rgba(244, 211, 94, 0.48);
  background: var(--signal);
  color: #171207;
  box-shadow: 0 14px 30px rgba(244, 211, 94, 0.18);
}

.lapse-marker {
  width: 32px;
  height: 40px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px 18px 18px 5px;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.88), transparent 18%),
    linear-gradient(160deg, #a8ffe2, var(--present) 52%, #11895f);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.36), 0 0 0 7px rgba(51, 224, 161, 0.1);
}

.lapse-marker::before {
  inset: 6px;
  border: 0;
  border-radius: 50%;
  background: rgba(6, 16, 13, 0.84);
}

.lapse-marker::after {
  right: -12px;
  bottom: -13px;
  background: rgba(0, 0, 0, 0.36);
}

.lapse-marker.memory {
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(160deg, #9adeff, var(--past) 56%, #116aa4);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.36), 0 0 0 7px rgba(56, 165, 255, 0.1);
}

.lapse-marker.future {
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(160deg, #ffd29d, var(--future) 56%, #c65316);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.36), 0 0 0 7px rgba(255, 138, 61, 0.1);
}

.lapse-marker.capsule {
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(160deg, #dcc7ff, var(--capsule) 56%, #6e46c3);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.36), 0 0 0 7px rgba(180, 140, 255, 0.1);
}

.pin-glyph {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  margin-top: 8px;
  background: transparent;
  color: #fffaf1;
  font-size: 0.58rem;
}

.lapse-marker:hover,
.lapse-marker.is-selected {
  transform: rotate(-45deg) translateY(-5px) scale(1.12);
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 70%),
    rgba(15, 18, 17, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.25);
}

.leaflet-popup-tip {
  background: rgba(15, 18, 17, 0.94);
}

.leaflet-popup-content {
  color: #fffaf1;
}

.lapse-popup p:first-child {
  color: var(--present);
}

.lapse-popup h2 {
  color: #fffaf1;
  font-size: 1.12rem;
}

.lapse-popup time,
.lapse-popup-note {
  color: #aeb9b4;
}

.capsule-popover {
  border-color: rgba(180, 140, 255, 0.22);
  background: rgba(180, 140, 255, 0.08);
}

.capsule-meter {
  background: rgba(180, 140, 255, 0.14);
}

.capsule-meter span {
  background: linear-gradient(90deg, var(--capsule), var(--future), var(--signal));
}

.capsule-meta strong,
.capsule-people span {
  color: #fffaf1;
}

.popover-actions button:last-child {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fffaf1;
  box-shadow: none;
}

.leaflet-control-zoom {
  margin-left: 404px !important;
  border: 1px solid var(--line-strong) !important;
  background: rgba(15, 18, 17, 0.82) !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-control-zoom a {
  background: rgba(15, 18, 17, 0.92) !important;
  color: #fffaf1 !important;
}

.leaflet-control-attribution {
  background: rgba(15, 18, 17, 0.74) !important;
  color: rgba(247, 244, 236, 0.68) !important;
}

.leaflet-control-attribution a {
  color: #dbeafe !important;
}

.map-canvas.is-adding::after {
  right: calc(372px + 34px);
  border: 1px solid rgba(51, 224, 161, 0.65);
  background: var(--present);
  color: #06100d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34), 0 0 0 7px rgba(51, 224, 161, 0.14);
}

@media (max-width: 1120px) {
  .topbar {
    left: 16px;
    right: 16px;
  }

  .leaflet-control-zoom {
    margin-left: 16px !important;
  }
}

@media (max-width: 900px) {
  .profile-card,
  .control-block,
  .feed-panel,
  .search-box {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 60%),
      rgba(15, 18, 17, 0.9);
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 88px 10px 220px;
  }

  .map-stage {
    position: fixed;
  }

  .topbar {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .sidebar,
  .right-rail {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-height: none;
    overflow: visible;
  }

  .right-rail {
    display: flex;
    margin-top: 12px;
  }

  .leaflet-control-zoom {
    margin-top: 146px !important;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-end;
  }

  .app-shell {
    padding-top: 146px;
  }

  .form-grid,
  .popover-actions {
    grid-template-columns: 1fr;
  }
}

/* Material 3 refresh */
:root {
  --ink: #17201d;
  --muted: #5d6762;
  --paper: #f7f8f3;
  --panel: rgba(255, 255, 249, 0.96);
  --line: rgba(28, 35, 32, 0.1);
  --primary: #006b5b;
  --primary-ink: #ffffff;
  --primary-container: #b7f1df;
  --secondary-container: #dbe7de;
  --surface: #fffdf7;
  --surface-container: #eef2ec;
  --surface-high: #ffffff;
  --past: #356d8f;
  --present: #006b5b;
  --future: #b45f34;
  --capsule: #7450a8;
  --shadow: 0 8px 24px rgba(27, 36, 32, 0.12);
}

body {
  background: var(--surface-container);
  color: var(--ink);
  font-family: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
}

.sidebar,
.right-rail {
  gap: 12px;
}

.profile-card,
.control-block,
.badges,
.feed-panel,
.topbar {
  border: 1px solid rgba(28, 35, 32, 0.08);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.topbar {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-box {
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(28, 35, 32, 0.08);
  background: var(--surface-high);
  box-shadow: 0 10px 32px rgba(27, 36, 32, 0.14);
}

.search-row {
  min-height: 42px;
  padding: 0 6px 0 10px;
}

.search-icon {
  color: var(--muted);
}

.search-box input[type="search"] {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}

.section-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: none;
}

.section-title span {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
}

.section-title strong {
  color: var(--muted);
  font-size: 0.76rem;
}

.primary-action,
.challenge-panel button,
.popover-actions button {
  min-height: 42px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 4px 12px rgba(0, 107, 91, 0.22);
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background: #005246;
}

.button-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: currentColor;
}

.top-add-button {
  min-height: 40px;
  padding: 0 16px;
}

.avatar {
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.45), transparent 32%),
    linear-gradient(135deg, #006b5b, #356d8f);
  box-shadow: 0 8px 18px rgba(0, 107, 91, 0.24);
}

.profile-stats div,
.moment-example,
.signal,
.capsule-popover {
  border: 0;
  background: var(--surface-container);
}

.segmented {
  border: 0;
  border-radius: 999px;
  background: var(--surface-container);
}

.segment {
  border-radius: 999px;
  color: var(--muted);
}

.segment.is-active {
  background: var(--primary-container);
  color: #073b33;
  box-shadow: none;
}

input,
select,
textarea {
  border: 1px solid rgba(28, 35, 32, 0.12);
  background: #fbfdf8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 107, 91, 0.14);
}

.time-activity {
  border: 0;
  background:
    linear-gradient(rgba(28, 35, 32, 0.07) 1px, transparent 1px),
    var(--surface-container);
  background-size: 100% 24px;
}

.year-line::before {
  background: rgba(28, 35, 32, 0.12);
}

.year-line i {
  width: 10px;
  border-radius: 999px 999px 3px 3px;
  box-shadow: none;
}

.filter-select,
.tag-row span,
.badge {
  border: 0;
  background: var(--secondary-container);
  color: #34423c;
}

.placement-hint {
  border: 0;
  background: var(--primary-container);
  color: #073b33;
}

.placement-hint span {
  background: var(--primary);
}

.challenge-panel {
  background: #12372f;
}

.challenge-panel button {
  background: var(--primary-container);
  color: #073b33;
}

.lapse-marker {
  background: var(--present);
  box-shadow:
    0 8px 16px rgba(27, 36, 32, 0.24),
    inset 0 -10px 16px rgba(0, 0, 0, 0.12);
}

.lapse-marker.capsule {
  background: var(--capsule);
}

.leaflet-popup-content-wrapper {
  border: 0;
  background: var(--surface-high);
  box-shadow: 0 12px 36px rgba(27, 36, 32, 0.18);
}

.leaflet-popup-tip {
  background: var(--surface-high);
}

.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: 0 8px 22px rgba(27, 36, 32, 0.14) !important;
}

.leaflet-control-zoom a {
  background: var(--surface-high) !important;
}

/* shadcn/Radix-inspired refresh */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --paper: #f8fafc;
  --panel: #ffffff;
  --line: #e2e8f0;
  --primary: #111827;
  --primary-ink: #ffffff;
  --primary-container: #eff6ff;
  --secondary-container: #f1f5f9;
  --surface: #ffffff;
  --surface-container: #f8fafc;
  --surface-high: #ffffff;
  --past: #2563eb;
  --present: #059669;
  --future: #f97316;
  --capsule: #7c3aed;
  --danger: #ef4444;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.sidebar,
.right-rail {
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
}

.profile-card,
.control-block,
.badges,
.feed-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.profile-card,
.control-block,
.badges,
.feed-panel {
  padding: 14px;
}

.topbar {
  left: calc(360px + 32px);
  right: calc(360px + 32px);
  padding: 0;
}

.search-box {
  min-height: 54px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-row {
  min-height: 40px;
  padding: 0 4px 0 10px;
}

.search-icon {
  color: #94a3b8;
}

.search-box input[type="search"] {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-main h1 {
  font-size: 1rem;
  font-weight: 700;
}

.profile-main p,
.profile-stats span,
.section-title,
.moment-meta,
.checkins,
.signal p,
.trail-list p {
  color: var(--muted);
}

.avatar {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  font-size: 0.86rem;
}

.profile-stats {
  gap: 8px;
}

.profile-stats div,
.moment-example,
.signal,
.capsule-popover {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.profile-stats strong {
  font-size: 1.02rem;
  font-weight: 800;
}

.section-title {
  margin-bottom: 10px;
  font-size: 0.76rem;
}

.section-title span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.section-title strong {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.segmented,
.tab-list {
  gap: 2px;
  padding: 3px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f1f5f9;
}

.segment,
.tab-button {
  min-height: 34px;
  border-radius: 6px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 650;
}

.segment.is-active,
.tab-button.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.tab-button strong {
  background: #e2e8f0;
  color: #475569;
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.86rem;
}

textarea {
  min-height: 76px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.primary-action,
.challenge-panel button,
.popover-actions button {
  min-height: 38px;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
  font-size: 0.86rem;
  font-weight: 700;
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background: #1e293b;
}

.top-add-button {
  min-height: 38px;
  padding: 0 12px;
}

.button-icon {
  font-size: 1.05rem;
}

.time-activity {
  height: 118px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background:
    linear-gradient(#e5e7eb 1px, transparent 1px),
    #f8fafc;
  background-size: 100% 24px;
}

.year-line::before {
  background: #e2e8f0;
}

.year-line i {
  width: 9px;
  border-radius: 6px 6px 2px 2px;
}

.year-line span {
  color: #64748b;
  font-size: 0.58rem;
}

.filter-select,
.tag-row span,
.badge {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
}

.moment-example {
  grid-template-columns: 58px 1fr;
  gap: 10px;
  padding: 9px;
}

.moment-thumb {
  width: 58px;
  height: 64px;
  border-radius: 8px;
}

.moment-example h2 {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.moment-example p {
  color: #64748b;
  font-size: 0.74rem;
}

.placement-hint {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
}

.placement-hint span {
  background: #2563eb;
}

.challenge-panel {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #431407;
}

.challenge-panel .eyebrow {
  color: #c2410c;
}

.challenge-panel h2 {
  color: #431407;
}

.challenge-panel button {
  background: #ea580c;
  color: #fff7ed;
}

.challenge-panel button:hover {
  background: #c2410c;
}

.signal {
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.leaflet-popup-content-wrapper {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

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

.lapse-popup h2 {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 750;
}

.lapse-popup-note {
  color: #475569;
}

.lapse-marker {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.leaflet-control-zoom {
  margin-left: 392px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-control-zoom a {
  background: #ffffff !important;
  color: #0f172a !important;
}

.map-scrim {
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.42), transparent 22%, transparent 78%, rgba(248, 250, 252, 0.34));
}

@media (max-width: 1120px) {
  .topbar {
    left: 16px;
    right: 16px;
  }

  .leaflet-control-zoom {
    margin-left: 16px !important;
  }
}

/* Flat two-color override */
:root {
  --ink: #172033;
  --muted: #6b7280;
  --paper: #f4f7fb;
  --panel: #ffffff;
  --line: #dbe3ee;
  --line-strong: #c5d0df;
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --primary-soft: #eaf1ff;
  --surface: #ffffff;
  --surface-container: #f4f7fb;
  --surface-high: #ffffff;
  --past: #2563eb;
  --present: #2563eb;
  --future: #2563eb;
  --capsule: #2563eb;
  --signal: #2563eb;
  --shadow: none;
}

body {
  background: var(--paper);
  color: var(--ink);
}

.leaflet-tile {
  filter: saturate(0.9) contrast(0.98) brightness(1.02);
}

.map-canvas,
.lapse-map,
.leaflet-container {
  background: #eef3f8;
}

.map-scrim {
  background: linear-gradient(90deg, rgba(244, 247, 251, 0.5), transparent 24%, transparent 76%, rgba(244, 247, 251, 0.45));
}

.sidebar,
.right-rail {
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
}

.topbar {
  left: calc(360px + 32px);
  right: calc(360px + 32px);
}

.profile-card,
.control-block,
.badges,
.feed-panel,
.search-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: none;
}

.profile-card::before,
.control-block::before,
.feed-panel::before,
.search-box::before {
  display: none;
}

.profile-card,
.control-block,
.feed-panel {
  padding: 14px;
}

.search-box {
  min-height: 56px;
  padding: 7px;
}

.profile-main h1,
.section-title span,
.moment-example h2,
.signal strong,
.trail-list strong,
.lapse-popup h2 {
  color: var(--ink);
}

.profile-main p,
.profile-stats span,
.section-title,
.moment-meta,
.signal p,
.trail-list p,
label span,
.lapse-popup time,
.lapse-popup-note {
  color: var(--muted);
}

.section-title {
  margin-bottom: 10px;
  font-size: 0.74rem;
  text-transform: none;
}

.section-title span {
  font-size: 0.9rem;
  font-weight: 750;
}

.section-title strong,
.checkins,
.search-icon,
.lapse-popup p:first-child {
  color: var(--primary);
}

.avatar {
  width: 46px;
  height: 46px;
  border: 0;
  background: var(--primary);
  color: #ffffff;
  box-shadow: none;
}

.profile-stats div,
.moment-example,
.signal,
.capsule-popover {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-container);
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

select {
  color-scheme: light;
}

.search-box input[type="search"] {
  color: var(--ink);
}

.search-box input[type="search"]::placeholder,
input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.primary-action,
.challenge-panel button,
.popover-actions button {
  min-height: 38px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: none;
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background: #1d4ed8;
}

.segmented,
.tab-list {
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-container);
}

.segment,
.tab-button {
  min-height: 34px;
  border-radius: 6px;
  color: var(--muted);
}

.segment.is-active,
.tab-button.is-active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: none;
}

.tab-button strong {
  background: var(--primary-soft);
  color: var(--primary);
}

.time-activity {
  height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(#e7edf5 1px, transparent 1px),
    #ffffff;
  background-size: 100% 24px;
}

.time-activity::before {
  display: none;
}

.year-line::before {
  background: #dbe3ee;
}

.year-line i,
.year-line.is-hot i,
.year-line.is-now i {
  width: 9px;
  border-radius: 6px 6px 2px 2px;
  background: var(--primary);
  box-shadow: none;
}

.year-line span {
  color: var(--muted);
}

.filter-select,
.tag-row span,
.badge {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.moment-example {
  grid-template-columns: 58px 1fr;
  gap: 10px;
  padding: 9px;
  transition: none;
}

.moment-example:hover {
  border-color: var(--line-strong);
  background: var(--surface-container);
  transform: none;
}

.moment-thumb {
  width: 58px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.memory-thumb,
.capsule-thumb,
.future-thumb {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.84), rgba(37, 99, 235, 0.16)),
    #dbeafe;
}

.moment-example p {
  color: var(--muted);
}

.signal {
  grid-template-columns: 8px 1fr;
  gap: 10px;
  background: #ffffff;
}

.signal::before {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.placement-hint {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.placement-hint span {
  background: var(--primary);
  color: #ffffff;
}

.challenge-panel {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.challenge-panel .eyebrow {
  color: var(--primary);
}

.challenge-panel h2 {
  color: var(--ink);
}

.challenge-panel button {
  background: var(--primary);
  color: #ffffff;
}

.lapse-marker {
  width: 32px;
  height: 40px;
  border: 2px solid #ffffff;
  border-radius: 18px 18px 18px 5px;
  background: var(--primary);
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.18);
}

.lapse-marker::before {
  inset: 7px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
}

.lapse-marker::after {
  background: rgba(23, 32, 51, 0.2);
}

.lapse-marker.memory,
.lapse-marker.future,
.lapse-marker.capsule {
  background: var(--primary);
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.18);
}

.pin-glyph {
  color: var(--primary);
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.14);
  backdrop-filter: none;
}

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

.leaflet-popup-content {
  color: var(--ink);
}

.capsule-popover {
  border-color: var(--line);
  background: var(--surface-container);
}

.capsule-meter {
  background: #dbeafe;
}

.capsule-meter span {
  background: var(--primary);
}

.capsule-meta strong,
.capsule-people span {
  color: var(--ink);
}

.capsule-people span {
  background: var(--primary);
  color: #ffffff;
}

.popover-actions button:last-child {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.leaflet-control-zoom {
  margin-left: 392px !important;
  border: 1px solid var(--line) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

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

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--muted) !important;
}

.map-canvas.is-adding::after {
  right: calc(360px + 34px);
  border: 2px solid #ffffff;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.18);
}

@media (max-width: 1120px) {
  .topbar {
    left: 16px;
    right: 16px;
  }

  .leaflet-control-zoom {
    margin-left: 16px !important;
  }
}

/* Etcht flat black accent */
:root {
  --primary: #111827;
  --primary-soft: #f3f4f6;
  --past: #111827;
  --present: #111827;
  --future: #111827;
  --capsule: #111827;
  --signal: #111827;
}

.brand-wordmark {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 2px;
  color: #111827;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-action:hover,
.challenge-panel button:hover,
.popover-actions button:hover {
  background: #000000;
}

.memory-thumb,
.capsule-thumb,
.future-thumb {
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.84), rgba(17, 24, 39, 0.12)),
    #f3f4f6;
}

.capsule-meter,
.chart-date-bar i {
  background: #e5e7eb;
}

.chart-area {
  fill: rgba(17, 24, 39, 0.08);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}
/* Tight moment activity date layout */
.activity-line-chart {
  padding-top: 8px;
}

.activity-line-chart svg {
  height: 142px;
}

.chart-date-controls {
  margin-top: 2px;
  padding-top: 4px;
}

.chart-date-arrow {
  min-height: 42px;
}

.chart-date-bar button {
  height: 42px;
}
