:root{
  --bg:#ffffff;
  --panel:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --shadow: 0 18px 50px rgba(17,24,39,.18);
}

html,body{height:100%; width:100%; margin:0; padding:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color:var(--text); background:var(--bg);}
#map{position:fixed; inset:0;}

.drawer{
  position:fixed;
  top:0; right:0;
  height:100%;
  width:min(440px, 92vw);
  background:var(--panel);
  border-left:1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 260ms cubic-bezier(.2,.8,.2,1);
  display:flex;
  flex-direction:column;
  z-index:10;
}

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

.drawer__header{
  padding:16px 16px 12px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(255,255,255,.92));
  backdrop-filter: blur(8px);
}

.drawer__title{
  font-size:16px;
  font-weight:700;
  line-height:1.2;
  transform: perspective(700px) translateZ(0);
}

.drawer__meta{ font-size:12px; color:var(--muted); margin-top:6px; }

.drawer__close{
  border:1px solid var(--border);
  background:#fff;
  width:34px;
  height:34px;
  border-radius:10px;
  cursor:pointer;
  font-size:20px;
  line-height:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: transform 140ms ease;
}

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

.drawer__content{ padding:14px 16px 18px; overflow:auto; display:grid; gap:12px; }

.card{
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 12px 10px;
  background:#fff;
  box-shadow: 0 10px 26px rgba(17,24,39,.06);
  transform: perspective(900px) translateZ(0);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card:hover{
  transform: perspective(900px) translateZ(16px);
  box-shadow: 0 18px 40px rgba(17,24,39,.10);
}

.card__label{ font-size:12px; font-weight:700; color:#374151; margin-bottom:8px; text-transform:none; }
.card__body{ font-size:13px; line-height:1.45; white-space:pre-wrap; }

.muted{ color:var(--muted); }
.small{ font-size:12px; margin-top:8px; }

.tableWrap{ overflow:auto; }
.tbl{ width:100%; border-collapse:collapse; font-size:12px; }
.tbl th, .tbl td{ border-bottom:1px solid var(--border); padding:10px 8px; vertical-align:top; }
.tbl th{ text-align:left; color:#374151; font-weight:700; background:#fafafa; position:sticky; top:0; }

.controls{ display:flex; gap:10px; flex-wrap:wrap; }
.btn{
  border:1px solid var(--border);
  background:#fff;
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:600;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 18px rgba(17,24,39,.08); }

.maplibregl-ctrl-group{ box-shadow: 0 10px 26px rgba(17,24,39,.12) !important; border:1px solid var(--border) !important; }
