* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, "Heebo", "Segoe UI", sans-serif;
  background: #0b1620;
  color: #eef3f7;
  overscroll-behavior: none;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  background: #0b3d59;
  color: #fff;
  position: relative;
  z-index: 20;
}

.topbar h1 {
  font-size: 17px;
  margin: 0;
  white-space: nowrap;
}

.topbar-sub {
  font-weight: 400;
  opacity: 0.75;
  font-size: 13px;
}

.project-name {
  flex: 1;
  font-size: 13px;
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* On narrow screens the buttons scroll sideways inside the bar rather than widening the
   whole page (which made every panel and the map scroll horizontally on a phone). */
.topbar-actions {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-actions::-webkit-scrollbar { display: none; }

.topbar h1 { flex: none; }

.topbar-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  min-height: 40px;
  flex: none;
  white-space: nowrap;
}

.topbar-btn-primary {
  background: #5fd0c8;
  border-color: #5fd0c8;
  color: #05282a;
  font-weight: 600;
}

/* Marks whichever of שכבות/מקרא/חיפוש currently has its panel open, so it's clear at a
   glance which one you're in (they share one screen slot - see app.js showPanel). */
.topbar-btn.active {
  background: #5fd0c8;
  border-color: #5fd0c8;
  color: #05282a;
  font-weight: 600;
}

.unsupported-banner {
  background: #4a3410;
  color: #ffd98a;
  font-size: 13px;
  padding: 8px 12px;
  text-align: center;
}

.map-shell {
  position: relative;
  height: calc(100% - 56px);
}

#map {
  position: absolute;
  inset: 0;
}

.empty-state {
  position: absolute;
  inset: 0;
  top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #0b1620;
  color: #a9bcc9;
  z-index: 15;
  overflow-y: auto; /* the recent-projects list can outgrow a short landscape screen */
  padding-block: 16px;
}

.empty-state[hidden] { display: none; }

.layer-panel {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: min(300px, 82vw);
  height: 100%;
  background: rgba(14, 26, 36, 0.96);
  backdrop-filter: blur(6px);
  border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 25;
}

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

.layer-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.layer-panel-close {
  background: none;
  border: none;
  color: #eef3f7;
  font-size: 18px;
  padding: 6px 10px;
}

.layer-list {
  overflow-y: auto;
  padding: 6px;
}

.layer-panel-empty {
  padding: 16px;
  color: #7f95a3;
  font-size: 13px;
  text-align: center;
}

.layer-row {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.layer-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layer-row-opacity {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-inline-start: 28px;
  margin-top: 4px;
}

.layer-row-opacity-icon {
  flex: none;
  font-size: 13px;
  opacity: 0.7;
  width: 14px;
  text-align: center;
}

.layer-row-opacity-slider {
  flex: 1;
  height: 28px;
  accent-color: #5fd0c8;
}

.layer-row-checkbox {
  width: 20px;
  height: 20px;
  flex: none;
}

.layer-row-name {
  flex: 1;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tapping the name zooms to the layer's extent (layer-panel.js zoomToLayerFromPanel). */
.layer-row-name-zoomable {
  cursor: pointer;
  padding-block: 8px;
}

.layer-row-name-zoomable:active {
  color: #5fd0c8;
}

.layer-row-zoom-btn {
  flex: none;
  font-size: 17px;
}

/* ---------- Recent projects (recent-projects.js) ---------- */

.recent-panel-hint {
  padding: 6px 14px;
  font-size: 12px;
  color: #7f95a3;
}

.empty-recent {
  width: min(420px, 90vw);
  margin-top: 8px;
}

.empty-recent-title {
  font-size: 13px;
  text-align: center;
  margin-bottom: 6px;
}

.recent-project-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.recent-project-open {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #eef3f7;
  padding: 9px 12px;
  min-height: 48px;
  cursor: pointer;
}

.recent-project-open:active {
  background: rgba(95, 208, 200, 0.18);
}

.recent-project-name {
  font-size: 14px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-project-meta {
  font-size: 11.5px;
  color: #8fa5b3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-project-delete {
  flex: none;
  width: 44px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #a9bcc9;
  font-size: 15px;
  cursor: pointer;
}

.layer-row-move {
  display: flex;
  gap: 4px;
  flex: none;
}

.layer-row-move-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #eef3f7;
  font-size: 13px;
}

.layer-row-move-btn:disabled {
  opacity: 0.3;
}

.layer-row-colors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-inline-start: 28px;
  margin-top: 6px;
}

.layer-row-color-swatch {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.layer-row-color-swatch input[type="color"] {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background: none;
  cursor: pointer;
}

.layer-row-color-label {
  font-size: 11.5px;
  color: #cddce6;
}

.layer-row-color-reset {
  margin-inline-start: auto;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #eef3f7;
  font-size: 14px;
}

.layer-row-none-btn {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: none;
  color: #cddce6;
  font-size: 13px;
  line-height: 1;
}

.layer-row-none-btn.active {
  background: #5fd0c8;
  border-color: #5fd0c8;
  color: #05282a;
}

.layer-row-classified-hint {
  font-size: 11.5px;
  color: #9fb3c1;
  padding-inline-start: 28px;
  margin-top: 6px;
}

/* Legend panel shares the layer panel's position/slot (see app.js - opening one closes
   the other, so this is a tab-like switch, not a second simultaneous panel). */

.legend-list {
  overflow-y: auto;
  padding: 10px 14px;
}

.legend-panel-empty {
  padding: 16px;
  color: #7f95a3;
  font-size: 13px;
  text-align: center;
}

.legend-block {
  margin-bottom: 16px;
}

.legend-block-title {
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-block-attr {
  font-size: 11.5px;
  color: #9fb3c1;
  margin: 2px 0 6px;
}

.legend-entries {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}

.legend-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.legend-entry-editable {
  padding: 2px 0;
}

.legend-entry-color {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: none;
  cursor: pointer;
}

.legend-entry-none-btn {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: none;
  color: #cddce6;
  font-size: 12px;
  line-height: 1;
}

.legend-entry-none-btn.active {
  background: #5fd0c8;
  border-color: #5fd0c8;
  color: #05282a;
}

.legend-entry-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-swatch {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
}

.legend-swatch-none {
  background: repeating-linear-gradient(45deg, #444 0 2px, transparent 2px 5px);
}

/* Search panel - shares the layer/legend panels' position/slot (see app.js showPanel). */

.search-panel-body {
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.search-row-label {
  font-size: 12.5px;
  color: #9fb3c1;
  flex: none;
}

.search-panel-empty {
  padding: 16px 0;
  color: #7f95a3;
  font-size: 13px;
  text-align: center;
}

.search-layer-select,
.search-field-select,
.search-op-select,
.search-connector-select,
.search-value-select {
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #eef3f7;
  font-size: 13px;
  padding: 4px 6px;
}

.search-layer-select {
  flex: 1;
}

.search-conditions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-condition-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.search-connector-select {
  width: 56px;
  flex: none;
}

.search-field-select {
  flex: 1;
  min-width: 90px;
}

.search-op-select {
  width: 56px;
  flex: none;
}

.search-value-select {
  flex: 1;
  min-width: 90px;
}

.search-value-input {
  flex: 1;
  min-width: 90px;
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #eef3f7;
  font-size: 13px;
  padding: 4px 8px;
}

.search-remove-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #eef3f7;
  font-size: 13px;
}

.search-add-btn {
  align-self: flex-start;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  background: none;
  color: #cddce6;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12.5px;
}

.search-run-btn {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  border: none;
  font-weight: 600;
}

.search-status {
  font-size: 12.5px;
  color: #9fb3c1;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-row {
  text-align: start;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #eef3f7;
  font-size: 12.5px;
  padding: 8px 10px;
}

.search-result-row.current {
  border-color: #5fd0c8;
  background: rgba(95, 208, 200, 0.15);
}

/* ---------- Basemap button + gallery (basemap-gallery.js) ---------- */

.basemap-ctrl {
  background: rgba(11, 22, 32, 0.9);
  border-radius: 6px;
}

.basemap-gallery-btn {
  display: block;
  min-height: 36px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #eef3f7;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.basemap-gallery-btn:active {
  background: rgba(95, 208, 200, 0.2);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.modal-overlay[hidden] { display: none; }

.modal-box {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  background: #0e1a24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.basemap-modal-box { width: min(680px, 100%); }

.basemap-modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
  overflow-y: auto;
}

.basemap-note {
  margin: 0;
  font-size: 12.5px;
  color: #9fb3c1;
}

/* no scroll box of its own: a nested one hid the OpenStreetMap cards below the Esri ones
   (only the heading showed), so the whole dialog body scrolls instead */
.basemap-grid {
  flex: none;
}

.basemap-category {
  font-size: 12px;
  font-weight: 700;
  color: #9fb3c1;
  padding: 10px 2px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.basemap-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.basemap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #eef3f7;
  cursor: pointer;
  overflow: hidden;
}

.basemap-card.active {
  border-color: #5fd0c8;
  background: rgba(95, 208, 200, 0.15);
}

.basemap-preview {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
  background: #1b2a36;
}

/* the preview tile failed to load on this device/network */
.basemap-card-error .basemap-preview { visibility: hidden; }

.basemap-card-error::after {
  content: "לא נטען";
  position: absolute;
  inset: 4px 4px auto;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffd98a;
  background: rgba(74, 52, 16, 0.6);
  border-radius: 5px;
}

.basemap-card-label {
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

/* attribution is a legal requirement for OSM and Esri */
.basemap-attribution {
  font-size: 11px;
  color: #8fa5b3;
  direction: ltr;
  text-align: left;
}

.basemap-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  min-height: 32px;
}

.basemap-option input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
}

.basemap-opacity-row {
  flex-wrap: wrap;
}

.basemap-opacity-row input[type="range"] {
  flex: 1;
  min-width: 160px;
  height: 28px;
  accent-color: #5fd0c8;
}

.basemap-cache-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- 2D / 3D control (map-init.js SceneControl) ---------- */

.scene-ctrl {
  background: rgba(11, 22, 32, 0.9);
  border-radius: 6px;
  color: #eef3f7;
  overflow: hidden;
}

.scene-toggle {
  display: block;
  width: 100%;
  min-width: 44px;
  min-height: 36px;
  border: none;
  background: transparent;
  color: #eef3f7;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.scene-toggle.active {
  background: #5fd0c8;
  color: #05282a;
}

.scene-panel {
  padding: 4px 8px 8px;
}

.scene-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  min-height: 30px;
  white-space: nowrap;
}

.scene-row input[type="range"] {
  width: 90px;
  accent-color: #5fd0c8;
}

.scene-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.scene-value {
  min-width: 30px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Bookmarks + offline panels ---------- */

.panel-section-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #9fb3c1;
  margin-top: 4px;
}

.bookmark-add {
  display: flex;
  gap: 6px;
}

.bookmark-row {
  display: flex;
  gap: 6px;
}

.bookmark-go {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  text-align: start;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #eef3f7;
  font-size: 13.5px;
  padding: 8px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.bookmark-go:active {
  background: rgba(95, 208, 200, 0.18);
}

.offline-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offline-warning {
  font-size: 12.5px;
  color: #ffd98a;
  background: rgba(74, 52, 16, 0.6);
  border-radius: 6px;
  padding: 8px 10px;
}

.offline-actions .topbar-btn:disabled {
  opacity: 0.45;
}

.offline-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.offline-progress progress {
  width: 100%;
  accent-color: #5fd0c8;
}

.maplibregl-popup-content {
  direction: rtl;
  font-family: -apple-system, "Heebo", sans-serif;
  max-height: 50vh;
  overflow-y: auto;
  color: #0b3d59; /* was unset, so values inherited the app's near-white body text
                     color and were unreadable on the popup's white background */
}

.info-table {
  border-collapse: collapse;
  font-size: 12.5px;
}

.info-table td {
  border-bottom: 1px solid #e5e5e5;
  padding: 3px 8px;
  vertical-align: top;
  color: #0b3d59;
}

.info-table td.key {
  font-weight: 600;
  white-space: nowrap;
}

.identify-block + .identify-block {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #ddd;
}

.identify-layer-name {
  font-weight: 700;
  font-size: 12.5px;
  margin-bottom: 4px;
  color: #0b3d59;
}

.identify-count {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.muted-note {
  font-size: 12px;
  color: #888;
}

/* OSM standard when the viewer was opened as a file (see map-init.js OPENED_AS_FILE) */
.basemap-card-blocked .basemap-preview { visibility: hidden; }

.basemap-card-blocked::after {
  content: "חסום בפתיחה כקובץ";
  position: absolute;
  inset: 4px 4px auto;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  text-align: center;
  font-size: 12px;
  color: #ffd98a;
  background: rgba(74, 52, 16, 0.6);
  border-radius: 5px;
}

.basemap-notice-flash {
  outline: 2px solid #ffd98a;
}

/* ---------- Street view panel (street-view.js) ---------- */

.street-panel {
  width: min(520px, 92vw);
}

.street-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.street-tabs {
  display: flex;
  gap: 6px;
}

.street-tab {
  flex: 1;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #eef3f7;
  font-size: 13px;
  cursor: pointer;
}

.street-tab.active {
  background: #5fd0c8;
  border-color: #5fd0c8;
  color: #05282a;
  font-weight: 600;
}

.street-hint {
  margin: 0;
  font-size: 13px;
  color: #9fb3c1;
  line-height: 1.5;
}

.street-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 60vh;
  border: 0;
  border-radius: 8px;
  background: #000;
}

.street-license {
  font-size: 11px;
  color: #8fa5b3;
  direction: ltr;
  text-align: left;
}

.street-link {
  align-self: flex-start;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.street-key summary {
  cursor: pointer;
  font-size: 13px;
  color: #cddce6;
  padding: 4px 0;
}

.street-key[open] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Bookmark management (bookmarks.js) ---------- */

.bookmarks-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bookmark-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bookmark-row {
  flex-wrap: wrap;
  align-items: center;
}

.bookmark-actions {
  display: flex;
  gap: 4px;
  flex: none;
}

.bookmark-action {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #eef3f7;
  font-size: 14px;
  cursor: pointer;
}

.bookmark-action:disabled {
  opacity: 0.3;
}

.bookmark-rename {
  flex: 1;
  min-width: 120px;
}

/* my bookmarks carry five actions: the name gets its own full-width line (a 300px side
   panel otherwise cut names down to "תל א…"), actions sit on the line below */
.bookmark-row-mine .bookmark-go {
  flex: 1 1 100%;
}

.bookmark-row-mine .bookmark-actions {
  margin-inline-start: auto;
}

.bookmark-row-mine {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bookmark-status {
  color: #5fd0c8;
}

/* ---------- Toast (short notices) ---------- */

.toast {
  position: fixed;
  z-index: 60;
  inset-inline: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  margin-inline: auto;
  max-width: 520px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #4a3410;
  color: #ffd98a;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.toast[hidden] { display: none; }

/* ---------- Bottom sheets on a phone held upright ---------- */

.sheet-handle { display: none; }

@media (max-width: 700px) and (orientation: portrait) {
  .layer-panel,
  .street-panel {
    top: auto;
    bottom: 0;
    inset-inline: 0;
    width: 100%;
    height: 46%;
    border-inline-start: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
    padding-bottom: env(safe-area-inset-bottom);
    transition: height 0.2s ease;
  }

  .layer-panel[data-sheet="full"] { height: 88%; }

  /* header only - the map is fully usable, one tap brings the list back */
  .layer-panel[data-sheet="min"] { height: 64px; }

  .layer-panel .layer-panel-header {
    position: relative;
    padding-top: 20px;
    flex: none;
  }

  .sheet-handle {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .sheet-handle::before {
    content: "";
    display: block;
    width: 44px;
    height: 5px;
    margin: 8px auto 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.45);
  }

  .layer-panel > :not(.layer-panel-header) {
    min-height: 0;
    overflow-y: auto;
  }
}
