/* LandMonitor design system — hand-written, no build step.
   Minimal, high-information, consistent across the dashboard. */

:root {
  --bg: #fafaf9;
  --panel: #ffffff;
  --line: #e7e5e4;
  --line-soft: #f5f5f4;
  --ink: #1c1917;
  --muted: #78716c;
  --faint: #a8a29e;
  --accent: #047857;
  --accent-soft: #ecfdf5;
  --accent-line: #a7f3d0;
  --sea: #0e7490;
  --shadow: 0 1px 2px rgb(28 25 23 / 0.05), 0 4px 16px rgb(28 25 23 / 0.04);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

.lm-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

/* Header */
.lm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.lm-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lm-sub {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.lm-refresh {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.lm-refresh:hover {
  border-color: var(--faint);
}

.lm-refresh[disabled] {
  opacity: 0.75;
  cursor: default;
}

.lm-refresh--busy::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 8px;
  vertical-align: -1px;
  border: 2px solid var(--faint);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: lm-spin 0.8s linear infinite;
}

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

.lm-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.lm-stat b {
  display: block;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.lm-stat span {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

/* Map */
.lm-map-wrap {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
  /* Leaflet's own panes run z-index 200-1000 (tiles 200, markers 600, popups
     700, controls 1000). Without a stacking context here they compete directly
     with the detail pane's z-index 50 in the root context, so the map paints on
     top of the pane wherever the two overlap. `isolate` keeps every Leaflet
     z-index inside this box. */
  isolation: isolate;
}

#land-map {
  height: 440px;
  background: #eef1f0;
}

.lm-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--muted);
  align-items: center;
}

.lm-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: -1px;
}

.leaflet-popup-content {
  margin: 10px 12px;
  font: 13px/1.45 ui-sans-serif, system-ui, sans-serif;
}

.lm-pop img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--line-soft);
}

.lm-pop a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.lm-pop .lm-pop-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

/* Popup bridge into the detail pane */
.lm-pop-open {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lm-pop-open:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

/* Card grid */
.lm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.lm-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.lm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgb(28 25 23 / 0.09);
}

.lm-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f5f5f4, #e7e5e4);
}

.lm-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lm-noimg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lm-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgb(28 25 23 / 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}

.lm-coast {
  position: absolute;
  top: 8px;
  right: 44px;
  background: rgb(255 255 255 / 0.94);
  color: var(--sea);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.lm-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
  flex: 1;
}

.lm-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.lm-price {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.lm-perha {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lm-headline {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.lm-headline a {
  color: var(--ink);
  text-decoration: none;
}

.lm-card:hover .lm-headline a {
  color: var(--accent);
}

.lm-loc {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lm-chip {
  font-size: 11px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  color: #57534e;
  border-radius: 6px;
  padding: 2px 7px;
  font-weight: 500;
}

.lm-chip.good {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.lm-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--faint);
}

.lm-open {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.lm-open:hover {
  text-decoration: underline;
}

/* Runs log */
.lm-runs {
  margin-top: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
}

.lm-runs summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 0;
  list-style: none;
}

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

.lm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.lm-table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.lm-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-soft);
  color: #44403c;
}

.lm-table tr:last-child td {
  border-bottom: none;
}

.lm-ok {
  color: var(--accent);
  font-weight: 600;
}

.lm-bad {
  color: #b91c1c;
  font-weight: 600;
}

/* Header actions */
.lm-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lm-refresh--active {
  border-color: var(--accent);
  color: var(--accent);
}

/* Criteria panel */
.lm-criteria {
  margin-top: 14px;
  padding: 18px 20px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: lm-fade-in 0.15s ease-out;
}

@keyframes lm-fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lm-criteria-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.lm-criteria-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lm-criteria-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--faint);
  max-width: 640px;
}

.lm-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--faint);
  cursor: pointer;
}

.lm-close:hover {
  color: var(--ink);
  background: var(--line-soft);
}

.lm-close svg {
  width: 15px;
  height: 15px;
}

.lm-criteria-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
}

.lm-span2 {
  grid-column: 1 / -1;
}

.lm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.lm-field > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.lm-req,
.lm-opt {
  font-size: 11px;
  font-weight: 400;
  color: var(--faint);
}

.lm-input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  width: 100%;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}

.lm-input::placeholder {
  color: var(--faint);
  opacity: 0.8;
}

.lm-input:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--panel);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 0 0 1px var(--accent-line);
}

.lm-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lm-input-row .lm-input {
  width: 110px;
}

.lm-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.lm-field-hint {
  font-size: 11px;
  color: var(--sea);
}

/* Reading an ad page in the add-entry panel: the photo it found sits beside the
   URL, its verdict sits underneath. */
.lm-read-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.lm-read-row .lm-input {
  flex: 1 1 auto;
  min-width: 0;
}

.lm-read-preview {
  width: 76px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--line-soft);
}

.lm-status {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.lm-status-wait {
  color: var(--sea);
}

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

.lm-status-bad {
  color: #b91c1c;
}

/* Current-value pills under keyword fields */
.lm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 1px;
}

.lm-pill {
  font-size: 11px;
  line-height: 1.5;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.lm-pill--green {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.lm-pill--sea {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: var(--sea);
}

.lm-pill--red {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.lm-criteria-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.lm-apply {
  margin-left: auto;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.12s;
}

.lm-apply:hover {
  background: #065f46;
}

.lm-ghost {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 6px;
  border-radius: 8px;
}

.lm-ghost:hover {
  color: #b91c1c;
  background: #fef2f2;
}

.lm-hint {
  font-size: 12px;
  color: var(--faint);
}

.lm-custom-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}

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

/* --- Favorites ------------------------------------------------------------ */

/* Heroicons "heart" is not in the bundled icon set — same mask pattern. */
.hero-heart {
  --hero-heart: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor' aria-hidden='true'><path d='M11.645 20.91l-.007-.003-.022-.012a15.247 15.247 0 01-.383-.218 25.18 25.18 0 01-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0112 5.052 5.5 5.5 0 0116.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 01-4.244 3.17 15.247 15.247 0 01-.383.219l-.022.012-.007.004-.003.001a.752.752 0 01-.704 0l-.003-.001z'/></svg>");
  -webkit-mask: var(--hero-heart);
  mask: var(--hero-heart);
  mask-repeat: no-repeat;
  background-color: currentColor;
  vertical-align: middle;
  display: inline-block;
}

.lm-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  color: var(--faint);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    color 0.12s ease;
}

.lm-fav:hover {
  transform: scale(1.12);
  color: #e11d48;
}

.lm-fav--on {
  color: #e11d48;
}

.lm-fav-icon {
  width: 17px;
  height: 17px;
}


/* Custom (hand-added) entries — pinned regardless of criteria */
.lm-card:has(.lm-pinned) {
  border-color: #fde68a;
}

.lm-pinned {
  position: absolute;
  top: 32px;
  left: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}

.lm-note {
  font-size: 12px;
  line-height: 1.45;
  color: #92400e;
  background: #fffbeb;
  border-left: 2px solid #fcd34d;
  border-radius: 0 6px 6px 0;
  padding: 5px 9px;
}

.lm-foot-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.lm-remove,
.lm-discard {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  cursor: pointer;
}

.lm-remove:hover,
.lm-discard:hover {
  color: #e11d48;
  text-decoration: underline;
}

/* --- Detail pane --------------------------------------------------------- */

/* The pane locks body scroll; a stable gutter keeps the page from shifting. */
html {
  scrollbar-gutter: stable;
}

.lm-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(28 25 23 / 0.3);
  animation: lm-fade-in 0.15s ease-out;
}

.lm-detail {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  width: min(520px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 48px rgb(28 25 23 / 0.14);
  animation: lm-slide-in 0.18s ease-out;
}

@keyframes lm-slide-in {
  from {
    transform: translateX(28px);
    opacity: 0.5;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.lm-detail-head {
  position: relative;
  padding: 16px 84px 13px 18px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.lm-detail-tools {
  position: absolute;
  top: 12px;
  right: 10px;
  display: flex;
  gap: 4px;
}

.lm-detail-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.lm-detail-source,
.lm-detail-flag,
.lm-detail-verdict {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
}

.lm-detail-flag {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.lm-detail-verdict--ok {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: #047857;
}

.lm-detail-title {
  margin: 9px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.lm-detail-title a {
  color: var(--ink);
  text-decoration: none;
}

.lm-detail-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.lm-detail-loc {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.lm-detail-sea {
  color: var(--sea);
}

.lm-detail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 22px;
}

.lm-detail-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f4, #e7e5e4);
}

.lm-detail-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lm-detail-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.lm-detail-price .lm-price {
  font-size: 22px;
}

.lm-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 16px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.lm-facts dt,
.lm-meta dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.lm-facts dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
}

.lm-detail-block {
  margin-top: 20px;
}

.lm-detail-h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The note heading is a <label>, so it must not look like one. */
.lm-detail-h3 label {
  font: inherit;
  color: inherit;
  cursor: text;
}

.lm-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.lm-desc--empty {
  color: var(--faint);
  font-style: italic;
  white-space: normal;
}

.lm-notes-block {
  margin-top: 22px;
  padding: 14px 14px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--accent-soft);
}

.lm-notes-block .lm-detail-h3 {
  color: #047857;
}

.lm-note-area {
  min-height: 104px;
  line-height: 1.5;
  resize: vertical;
  background: var(--panel);
}

.lm-note-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.lm-note-actions .lm-apply {
  margin-left: auto;
}

.lm-detail-record summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lm-detail-record summary:hover {
  color: var(--ink);
}

.lm-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
  margin: 12px 0 0;
}

.lm-meta dd {
  margin: 1px 0 0;
  font-size: 12.5px;
}

.lm-meta-wide {
  grid-column: 1 / -1;
}

.lm-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
}

.lm-url {
  display: block;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--line-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--sea);
  overflow-wrap: anywhere;
}

.lm-raw {
  max-height: 220px;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #1c1917;
  color: #e7e5e4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: auto;
}

.lm-detail-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  flex: none;
}

.lm-detail-foot .lm-remove {
  margin-left: auto;
}

.lm-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel);
  cursor: pointer;
  transition:
    color 0.12s ease,
    border-color 0.12s ease;
}

.lm-fav-btn:hover,
.lm-fav-btn--on {
  color: #e11d48;
  border-color: #fecdd3;
}

.lm-fav-btn--on {
  background: #fff1f2;
}

.lm-open-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.lm-open-btn:hover {
  border-color: var(--faint);
}

/* Card-side affordances for the pane */
.lm-media--open {
  cursor: pointer;
}

.lm-media-hint {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(28 25 23 / 0.62);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.lm-card:hover .lm-media-hint {
  opacity: 1;
}

/* The bundled set only has the left arrow; the pane slides in from the right. */
.lm-media-hint-icon {
  width: 11px;
  height: 11px;
  transform: scaleX(-1);
}

.lm-details {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.lm-details:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* The viewer's own note, previewed on the card. */
.lm-mynote {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #0e7490;
  background: #ecfeff;
  border-left: 2px solid #67e8f9;
  border-radius: 0 6px 6px 0;
  padding: 5px 9px;
}

.lm-mynote-icon {
  width: 12px;
  height: 12px;
  margin-right: 5px;
  vertical-align: -2px;
}

@media (max-width: 640px) {
  .lm-detail {
    width: 100vw;
  }

  .lm-facts,
  .lm-meta {
    grid-template-columns: 1fr;
  }
}

/* Land reports (/reports, /reports/:slug) */
.lm-report-page {
  max-width: 920px;
}

.lm-build {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
}

.lm-build--good {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: #047857;
}

.lm-build--warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.lm-build--bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.lm-report-head {
  margin-bottom: 14px;
}

.lm-report-title {
  margin: 9px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.lm-report-status {
  margin: 0 0 14px;
}

.lm-report-keys,
.lm-report-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.lm-report-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.lm-report-price .lm-price {
  font-size: 24px;
}

.lm-report-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lm-report-verdict {
  margin-top: 16px;
}

.lm-report-verdict p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
}

.lm-report-ads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.lm-report-h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lm-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.lm-thumb {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--line-soft);
  cursor: zoom-in;
}

.lm-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lm-thumb-cap {
  position: absolute;
  inset: auto 0 0;
  padding: 14px 7px 5px;
  font-size: 10.5px;
  line-height: 1.3;
  text-align: left;
  color: #fff;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.65));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lm-report-toc {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  margin-bottom: 8px;
  background: var(--bg);
}

.lm-report-toc a {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--panel);
}

.lm-report-toc a:hover {
  color: var(--accent);
  border-color: var(--accent-line);
}

.lm-report-section {
  scroll-margin-top: 52px;
}

/* Rendered markdown */
.lm-md {
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.lm-md h1,
.lm-md h2,
.lm-md h3,
.lm-md h4 {
  margin: 1.4em 0 0.5em;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lm-md h1 {
  font-size: 18px;
}

.lm-md h2 {
  font-size: 16px;
}

.lm-md h3,
.lm-md h4 {
  font-size: 14.5px;
}

.lm-md > :first-child {
  margin-top: 0;
}

.lm-md p,
.lm-md ul,
.lm-md ol {
  margin: 0.6em 0;
}

.lm-md ul,
.lm-md ol {
  padding-left: 1.3em;
}

.lm-md li {
  margin: 0.25em 0;
}

.lm-md a {
  color: var(--accent);
}

.lm-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--line-soft);
  border-radius: 4px;
  padding: 1px 4px;
}

.lm-md pre {
  overflow-x: auto;
  background: var(--line-soft);
  border-radius: 8px;
  padding: 10px 12px;
}

.lm-md blockquote {
  margin: 0.8em 0;
  padding: 2px 14px;
  border-left: 3px solid var(--accent-line);
  color: #57534e;
}

.lm-md hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.4em 0;
}

.lm-md-table {
  overflow-x: auto;
  margin: 0.8em 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lm-md table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.lm-md th,
.lm-md td {
  padding: 6px 9px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  min-width: 70px;
}

.lm-md th {
  background: var(--bg);
  font-weight: 600;
  white-space: nowrap;
}

/* Lightbox */
.lm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lm-fade-in 0.15s ease-out;
}

.lm-lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgb(12 10 9 / 0.88);
}

.lm-lightbox-fig {
  position: relative;
  margin: 0;
  max-width: min(1400px, 96vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.lm-lightbox-fig img {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  object-fit: contain;
  border-radius: 6px;
}

.lm-lightbox-fig figcaption {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  color: #e7e5e4;
  font-size: 13px;
  text-align: center;
  padding: 0 12px;
}

.lm-lb-btn {
  position: absolute;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.lm-lb-btn:hover {
  background: rgb(255 255 255 / 0.26);
}

.lm-lb-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lm-lb-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lm-lb-close {
  top: 12px;
  right: 12px;
}

/* Report link + assessment in the dashboard detail pane */
.lm-report-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-soft);
  color: #065f46;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.lm-report-link:hover {
  border-color: var(--accent);
}

.lm-assess p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .lm-report-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lm-report-keys,
  .lm-report-block {
    padding: 14px 14px;
  }

  .lm-gallery {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }

  .lm-report-title {
    font-size: 19px;
  }

  .lm-lb-prev,
  .lm-lb-next {
    top: auto;
    bottom: 14px;
    transform: none;
  }
}

/* Land report map (/reports overview) */
.lm-parcel-pin {
  border: 2px solid #ffffff;
  border-radius: 3px;
  background: #dc2626;
  box-shadow: 0 0 0 1.5px #dc2626;
}

.lm-rpop-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.lm-rpop-flag {
  color: #92400e;
}

.lm-rpop-title {
  display: block;
  font-size: 13.5px;
  line-height: 1.3;
}

.lm-rpop-approx {
  color: #92400e;
  font-weight: 600;
}

.lm-rpop-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  margin: 8px 0 0;
}

.lm-rpop-facts div {
  min-width: 0;
}

.lm-rpop-facts dt {
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lm-rpop-facts dd {
  margin: 0;
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.lm-rpop-verdict {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  max-height: 7.5em;
  overflow: auto;
}

.lm-rpop-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.lm-pop a.lm-rpop-report {
  color: var(--accent);
}

.lm-pop a.lm-rpop-ad {
  color: var(--muted);
  font-weight: 600;
}

/* The vendored Leaflet ships without its images/ folder, so the layer
   switcher's icon would 404 — draw the toggle as a text button instead. */
.lm-minimap .leaflet-control-layers-toggle {
  background-image: none !important;
  width: auto !important;
  height: auto !important;
  padding: 5px 9px;
  font: 700 11px/1.2 ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  text-decoration: none;
}

.lm-minimap .leaflet-control-layers-toggle::after {
  content: "Layers";
}

/* One-click land reports: request badge, actions, card dot */
.lm-rr {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lm-rr-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lm-rr-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  align-self: flex-start;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.lm-rr-badge-text {
  font-weight: 700;
  color: var(--ink);
}

.lm-rr-badge-dot,
.lm-rr-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.lm-rr-badge--requested {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.lm-rr-badge--running {
  border-color: #a5f3fc;
  background: #ecfeff;
  color: var(--sea);
}

.lm-rr-badge--running .lm-rr-badge-dot,
.lm-rr-dot--running i {
  animation: lm-rr-pulse 1.4s ease-in-out infinite;
}

.lm-rr-badge--done {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.lm-rr-badge--failed {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.lm-rr-badge--canceled {
  color: var(--faint);
}

@keyframes lm-rr-pulse {
  50% {
    opacity: 0.3;
  }
}

.lm-rr-notes {
  margin: 0;
  padding: 0 0 0 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.lm-rr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lm-rr-btn {
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background 0.12s,
    border-color 0.12s;
}

.lm-rr-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lm-rr-btn--primary {
  background: var(--accent);
  color: #fff;
}

.lm-rr-btn--primary:hover:not(:disabled) {
  background: #065f46;
}

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

.lm-rr-btn--secondary:hover:not(:disabled) {
  border-color: var(--accent-line);
  color: var(--accent);
}

.lm-rr-btn--ghost {
  background: none;
  border-color: var(--line);
  color: var(--muted);
}

.lm-rr-btn--ghost:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.lm-rr-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Beats workspace.css's generic `.lm-app-content form` / `label` / submit rules. */
.lm-rr-form,
.lm-app-content .lm-rr-form {
  display: grid;
  gap: 6px;
  margin: 0;
  max-width: none;
}

.lm-rr-label,
.lm-app-content .lm-rr-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.lm-rr-btn {
  white-space: nowrap;
}

.lm-app-content .lm-rr-form .lm-rr-btn--secondary {
  background: var(--panel);
  color: var(--ink);
}

.lm-rr-optional {
  font-weight: 400;
  color: var(--muted);
}

.lm-rr-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.lm-rr-form .lm-rr-actions {
  margin-top: 4px;
}

.lm-assess .lm-rr-hint,
.lm-assess .lm-rr-notes li {
  margin: 0;
}

.lm-rr-dot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.94);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lm-rr-dot--requested {
  color: #92400e;
}

.lm-rr-dot--running {
  color: var(--sea);
}

@media (max-width: 640px) {
  .lm-rr-actions .lm-rr-btn {
    flex: 1 1 100%;
    padding: 11px 14px;
  }
}

/* --- Detail pane: maximized layout, slideshow, small map, report ------------ */

/* Icons not in the bundled set (default.css) — same mask pattern as .hero-heart. */
.hero-arrows-pointing-out,
.hero-arrows-pointing-in,
.hero-chevron-left,
.hero-chevron-right,
.hero-language {
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  background-color: currentColor;
  vertical-align: middle;
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
}

.hero-arrows-pointing-out {
  --hero-arrows-pointing-out: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15'/></svg>");
  -webkit-mask: var(--hero-arrows-pointing-out);
  mask: var(--hero-arrows-pointing-out);
}

.hero-arrows-pointing-in {
  --hero-arrows-pointing-in: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25'/></svg>");
  -webkit-mask: var(--hero-arrows-pointing-in);
  mask: var(--hero-arrows-pointing-in);
}

.hero-chevron-left {
  --hero-chevron-left: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M15.75 19.5 8.25 12l7.5-7.5'/></svg>");
  -webkit-mask: var(--hero-chevron-left);
  mask: var(--hero-chevron-left);
}

.hero-chevron-right {
  --hero-chevron-right: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m8.25 4.5 7.5 7.5-7.5 7.5'/></svg>");
  -webkit-mask: var(--hero-chevron-right);
  mask: var(--hero-chevron-right);
}

.hero-language {
  --hero-language: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='m10.5 21 5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 0 1 6-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 0 1-3.827-5.802'/></svg>");
  -webkit-mask: var(--hero-language);
  mask: var(--hero-language);
}

/* Columns: one column in the side pane; maximized, the listing on the left
   and the research beside it, notes and the record under the listing. */
.lm-pane-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main" "side" "tail";
  column-gap: 28px;
}

.lm-pane-main {
  grid-area: main;
}

.lm-pane-side {
  grid-area: side;
}

.lm-pane-tail {
  grid-area: tail;
}

.lm-detail--max {
  width: min(1320px, 100vw);
  animation: none;
}

@media (min-width: 980px) {
  .lm-detail--max .lm-pane-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    grid-template-areas: "main side" "tail side";
    align-items: start;
  }

  .lm-detail--max .lm-detail-scroll {
    padding: 20px 28px 28px;
  }

  .lm-detail--max .lm-pane-side > .lm-detail-block:first-child {
    margin-top: 0;
  }

  .lm-detail--max .lm-minimap {
    height: 260px;
  }
}

/* Photo slideshow */
.lm-slides {
  margin-bottom: 2px;
}

.lm-slide-open {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.lm-slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.88);
  color: var(--ink);
  box-shadow: 0 1px 6px rgb(28 25 23 / 0.2);
  cursor: pointer;
  opacity: 0.85;
}

.lm-slide-btn:hover {
  opacity: 1;
}

.lm-slide-btn span {
  width: 18px;
  height: 18px;
}

.lm-slide-prev {
  left: 10px;
}

.lm-slide-next {
  right: 10px;
}

.lm-slide-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(28 25 23 / 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lm-slide-strip {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.lm-slide-thumb {
  flex: none;
  width: 64px;
  height: 44px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  overflow: hidden;
  background: var(--line-soft);
  cursor: pointer;
  opacity: 0.7;
}

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

.lm-slide-thumb:hover {
  opacity: 1;
}

.lm-slide-thumb--on {
  border-color: var(--accent);
  opacity: 1;
}

/* Small map. `isolation` keeps Leaflet's z-indexed panes inside the pane
   (see PITFALLS "The map paints over the pane"). */
.lm-minimap-wrap {
  margin-top: 14px;
  isolation: isolate;
}

.lm-minimap {
  height: 190px;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #eef1f0;
}

.lm-minimap-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--faint);
  font-size: 12.5px;
  text-align: center;
}

/* Report inside the pane */
.lm-assess .lm-detail-h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lm-assess .lm-report-link {
  margin-left: auto;
  padding: 3px 10px;
  font-size: 11.5px;
  text-transform: none;
  letter-spacing: 0;
}

.lm-report .lm-report-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 4px;
}

.lm-detail--max .lm-report .lm-report-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lm-report-h4 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lm-report .lm-report-verdict {
  margin-top: 14px;
}

.lm-report-gallery {
  margin-top: 16px;
}

.lm-report-gallery .lm-gallery {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.lm-report .lm-report-toc {
  margin-top: 16px;
}

.lm-report .lm-report-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 12px;
}

.lm-report .lm-report-section .lm-report-h2 {
  font-size: 15px;
}

.lm-report .lm-md {
  font-size: 13.5px;
}

@media (max-width: 640px) {
  .lm-detail--max {
    width: 100vw;
  }

  .lm-minimap {
    height: 170px;
  }
}

/* Description language switch */
.lm-desc-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lm-langs {
  display: inline-flex;
  margin-left: auto;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.lm-lang {
  padding: 2px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.lm-lang:hover {
  color: var(--ink);
}

.lm-lang--on {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(28 25 23 / 0.12);
}

.lm-desc-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 11.5px;
}

.lm-desc + .lm-desc-status {
  margin: 8px 0 0;
}

.lm-desc-icon {
  width: 14px;
  height: 14px;
}

/* === Shell: top bar, stat line, filter toolbar, split layout (2026-10-02) === */

:root {
  --topbar-h: 58px;
}

.hero-map-pin {
  --hero-map-pin: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path fill-rule='evenodd' d='m11.54 22.351.07.04.028.016a.76.76 0 0 0 .723 0l.028-.015.071-.041a16.975 16.975 0 0 0 1.144-.742 19.58 19.58 0 0 0 2.683-2.282c1.944-1.99 3.963-4.98 3.963-8.827a8.25 8.25 0 0 0-16.5 0c0 3.846 2.02 6.837 3.963 8.827a19.58 19.58 0 0 0 2.682 2.282 16.975 16.975 0 0 0 1.145.742ZM12 13.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z' clip-rule='evenodd'/></svg>");
  -webkit-mask: var(--hero-map-pin);
  mask: var(--hero-map-pin);
  mask-repeat: no-repeat;
  background-color: currentColor;
  display: inline-block;
  vertical-align: middle;
  width: 1.5rem;
  height: 1.5rem;
}

.lm-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.lm-topbar-inner {
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.lm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.lm-logo {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--ink);
}

.lm-brand:hover .lm-logo {
  color: var(--accent);
}

.lm-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.lm-brand-text b {
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.lm-brand-text small {
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--muted);
}

.lm-topbar .lm-actions {
  margin-left: auto;
}

.lm-topbar .lm-refresh {
  padding: 7px 13px;
  box-shadow: none;
}

#refresh-btn {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

#refresh-btn:hover {
  background: #292524;
}

.lm-page--wide {
  max-width: 1600px;
  padding-top: 16px;
}

/* One line of numbers */
.lm-statline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.lm-statline b {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lm-statline-lead {
  font-size: 14px;
}

.lm-statline-lead b {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.lm-statline-dim,
.lm-statline-dim b {
  color: var(--faint);
}

/* Filter toolbar: pill selects with the label inside, a favorites toggle */
.lm-controls {
  position: sticky;
  top: var(--topbar-h);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px -20px 0;
  padding: 10px 20px;
  background: rgb(250 250 249 / 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}

.lm-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgb(28 25 23 / 0.04);
  transition: border-color 0.12s;
}

.lm-pick:hover {
  border-color: var(--faint);
}

.lm-pick:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.lm-pick--on {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.lm-pick-label {
  padding-left: 13px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  pointer-events: none;
}

.lm-pick select {
  appearance: none;
  -webkit-appearance: none;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2378716c'><path d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.17l3.71-3.94a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06Z'/></svg>")
    no-repeat right 10px center / 15px;
  padding: 0 32px 0 7px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.lm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.lm-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lm-toggle-icon {
  width: 14px;
  height: 14px;
}

.lm-toggle:has(input:checked) {
  border-color: #fda4af;
  background: #fff1f2;
  color: #e11d48;
}

.lm-toggle:has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.lm-count {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Split layout: list left, map pinned right (desktop) */
.lm-browse {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 6px;
}

.lm-browse-map .lm-map-wrap {
  margin-top: 0;
}

.lm-browse-list .lm-grid {
  margin-top: 0;
}

@media (min-width: 1100px) {
  .lm-browse {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.8fr);
    align-items: start;
  }

  .lm-browse-map {
    order: 2;
    position: sticky;
    top: calc(var(--topbar-h) + 60px);
    height: calc(100vh - var(--topbar-h) - 76px);
  }

  .lm-browse-map .lm-map-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .lm-browse-map #land-map {
    flex: 1;
    height: auto;
    min-height: 0;
  }

  .lm-browse-list .lm-grid {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  }
}

.lm-onmap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.lm-onmap-icon {
  width: 13px;
  height: 13px;
}

@media (max-width: 720px) {
  .lm-topbar-inner {
    gap: 10px;
    padding: 0 12px;
  }

  .lm-brand-text small {
    display: none;
  }

  .lm-topbar .lm-refresh {
    padding: 6px 9px;
    font-size: 12px;
  }

  .lm-controls {
    margin: 10px -12px 0;
    padding: 8px 12px;
    position: static;
  }

  .lm-count {
    width: 100%;
    margin-left: 0;
  }

  /* iOS Safari zooms the page when a focused select is under 16px. */
  .lm-pick select {
    font-size: 16px;
  }
}

/* === Detail pane: independent columns, TOC === */

/* Side pane: the left wrapper dissolves so the order is listing → research → notes. */
.lm-pane-left {
  display: contents;
}

@media (min-width: 980px) {
  .lm-detail--max .lm-detail-scroll {
    display: flex;
    overflow: hidden;
    padding: 0;
  }

  .lm-detail--max .lm-pane-cols {
    flex: 1;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "left side";
    align-items: stretch;
    column-gap: 0;
  }

  .lm-detail--max .lm-pane-left {
    display: block;
    grid-area: left;
    overflow-y: auto;
    padding: 20px 24px 28px 28px;
    border-right: 1px solid var(--line);
    overscroll-behavior: contain;
  }

  .lm-detail--max .lm-pane-side {
    overflow-y: auto;
    padding: 4px 28px 28px 24px;
    overscroll-behavior: contain;
  }
}

/* Report section navigation: sticks to the top of whichever box scrolls it. */
.lm-report .lm-report-toc {
  position: sticky;
  top: 0;
  z-index: 3;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 10px 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 8px -8px rgb(28 25 23 / 0.18);
  scrollbar-width: none;
}

.lm-report .lm-report-toc::-webkit-scrollbar {
  display: none;
}

.lm-report .lm-report-toc a {
  padding: 4px 11px;
  font-size: 11.5px;
  white-space: nowrap;
}

/* Clear the sticky TOC when jumping to a section. */
.lm-report .lm-report-section {
  scroll-margin-top: 58px;
}

.lm-detail-scroll .lm-report-toc {
  top: -16px;
}

.lm-topbar .lm-refresh {
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .lm-brand-text small {
    display: none;
  }
}

/* The TOC's own bottom rule replaces the first section's top rule. */
.lm-report .lm-report-toc + .lm-report-section {
  border-top: 0;
}

/* Maximized, the TOC's scroller is the right column (4px top padding), not
   the pane's scroll box (16px). */
@media (min-width: 980px) {
  .lm-detail--max .lm-report .lm-report-toc {
    top: -4px;
  }
}

/* Search: first thing in the toolbar, grows to fill the row. */
.hero-magnifying-glass {
  --hero-magnifying-glass: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><circle cx='10.5' cy='10.5' r='6.5'/><path d='m15.5 15.5 5 5'/></svg>");
  -webkit-mask: var(--hero-magnifying-glass);
  mask: var(--hero-magnifying-glass);
  mask-repeat: no-repeat;
  background-color: currentColor;
  display: inline-block;
  vertical-align: middle;
  width: 1.5rem;
  height: 1.5rem;
}

.lm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  max-width: 420px;
  height: 34px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgb(28 25 23 / 0.04);
  cursor: text;
}

.lm-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.lm-search--on {
  border-color: var(--accent-line);
}

.lm-search-icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--faint);
}

.lm-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.lm-search input::placeholder {
  color: var(--faint);
}

.lm-kbd {
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--faint);
  font: 600 11px/1.5 ui-monospace, monospace;
}

@media (max-width: 720px) {
  .lm-search {
    max-width: none;
    flex-basis: 100%;
  }

  .lm-kbd {
    display: none;
  }
}
