/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ece5d9;
  --surface: rgba(255, 248, 239, 0.82);
  --surface2: #f7efe4;
  --border: #d8cdbc;
  --text: #233746;
  --text-muted: #6d7c86;
  --accent: #7a2033;
  --accent-soft: #c16d7c;
  --accent-rgb: 122, 32, 51;
  --emerald: #147c64;
  --emerald-rgb: 20, 124, 100;
  --indigo: #336faf;
  --red: #c45549;
  --sidebar-w: 320px;
  --radius: 10px;
}

html, body {
  height: 100%;
  font-family: 'Avenir Next', 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

body {
  position: relative;
}

/* ===== Map Layer ===== */
#map-shell {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg);
  overflow: hidden;
}

#map-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 14%, rgba(var(--accent-rgb), 0.14), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(var(--emerald-rgb), 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(236,229,217,0.18));
}

#map {
  width: 100%;
  height: 100%;
}

/* ===== Login Screen ===== */
#login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    linear-gradient(rgba(245,239,230,0.76), rgba(245,239,230,0.64)),
    radial-gradient(circle at 20% 18%, rgba(var(--accent-rgb), 0.16), transparent 30%),
    radial-gradient(circle at 82% 22%, rgba(var(--emerald-rgb), 0.14), transparent 34%);
  backdrop-filter: blur(6px);
}

#login-screen.open {
  display: flex;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  width: 380px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 28px 72px rgba(109, 85, 52, 0.18);
}

.login-logo {
  margin-bottom: 20px;
}

.login-logo-mark {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(93, 72, 48, 0.16));
}

.login-card h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 32px;
}

.login-error {
  color: var(--red);
  font-size: 0.875rem;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(196,85,73,0.12);
  border-radius: var(--radius);
  border: 1px solid rgba(196,85,73,0.22);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  margin-bottom: 20px;
}
.google-btn:hover {
  background: #fffaf4;
  border-color: #cbbca8;
  transform: translateY(-1px);
}
.google-btn:active { transform: translateY(0); }

.login-secondary-btn {
  width: 100%;
  padding: 11px 18px;
  background: rgba(255, 248, 239, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  margin-bottom: 20px;
}

.login-secondary-btn:hover {
  background: #fffaf4;
  border-color: #cbbca8;
  transform: translateY(-1px);
}

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

.dev-btn {
  display: block;
  width: 100%;
  padding: 9px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.dev-btn:hover { border-color: #c0b09a; color: var(--text); }

.login-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== App Layout ===== */
#app-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  height: 100vh;
  pointer-events: none;
}

/* ===== Sidebar ===== */
#sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: relative;
  background: rgba(250,244,236,0.8);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 10;
  flex-shrink: 0;
  pointer-events: auto;
  backdrop-filter: blur(18px);
  box-shadow: 20px 0 56px rgba(122, 97, 68, 0.12);
}

#sidebar::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.62), rgba(var(--emerald-rgb), 0.18));
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.74), rgba(255,248,239,0.9)),
    rgba(255,248,239,0.82);
  border: 1px solid rgba(35,55,70,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 10px 24px rgba(93,72,48,0.12);
}

.app-brand-icon {
  display: block;
  width: 42px;
  height: 42px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.logout-btn:hover { color: var(--text); background: var(--surface2); }

.stats {
  padding: 14px 16px 16px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0) 52%),
    radial-gradient(circle at top right, rgba(var(--emerald-rgb), 0.1), transparent 42%);
}

.stats-kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(35,55,70,0.68);
}

.stats-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.stats-count {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stats-percent {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

.stats-percent-muted {
  color: var(--text-muted);
}

.stats-detail {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stats-bar {
  height: 7px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(83,103,118,0.12);
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.28);
  transition: width 0.3s ease;
}

.stats-meta {
  margin-top: 10px;
  font-size: 0.74rem;
  color: rgba(35,55,70,0.58);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  padding: 8px 8px 0;
  gap: 2px;
}

.tab-btn {
  flex: 1;
  padding: 8px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-align: center;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), transparent);
}

/* ===== Place List ===== */
.place-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.place-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.12s;
  gap: 8px;
}
.place-item:hover { background: rgba(224,214,200,0.45); }

.place-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.place-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.place-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.place-meta {
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(var(--accent-rgb), 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 4px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.place-item:hover .delete-btn { opacity: 1; }
.delete-btn:hover { color: var(--red); background: rgba(196,85,73,0.12); }

.empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ===== Sidebar Footer ===== */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.save-btn {
  width: 100%;
  padding: 11px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, color 0.15s;
}

.save-btn:hover {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.48);
  transform: translateY(-1px);
}

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

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

.save-btn[hidden] {
  display: none;
}

.share-btn {
  width: 100%;
  padding: 11px;
  background: rgba(255, 248, 239, 0.9);
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.share-btn:hover {
  background: #fffaf4;
  border-color: rgba(var(--accent-rgb), 0.44);
  transform: translateY(-1px);
}
.share-btn:active { transform: translateY(0); }
.share-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
}

.add-btn {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff8ef;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.add-btn:hover { background: #631726; transform: translateY(-1px); }
.add-btn:active { transform: translateY(0); }

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(245,239,230,0.64);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 28px 72px rgba(109, 85, 52, 0.18);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-caption {
  margin-bottom: 18px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.modal-field {
  margin-bottom: 18px;
  position: relative;
}

.modal-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-field input,
.modal-field textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.modal-field input:focus,
.modal-field textarea:focus {
  border-color: var(--accent);
}
.modal-field textarea { resize: vertical; min-height: 72px; }

.modal-field select {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, opacity 0.15s;
  font-family: inherit;
}

.modal-field select:focus {
  border-color: var(--accent);
}

.modal-field select:disabled {
  opacity: 0.6;
}

.modal-field-hint {
  margin-top: 8px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.travel-date-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.travel-date-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.travel-date-row-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(35,55,70,0.64);
}

.travel-date-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.travel-date-year,
.travel-date-month {
  min-width: 0;
}

.export-modal {
  width: 640px;
}

.share-scope-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.share-scope-pill:hover {
  border-color: #c6b7a3;
  color: var(--text);
}

.share-scope-pill.active {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.12);
}

.share-scope-pill:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.share-scope-hint {
  margin-top: 10px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.share-preview-shell {
  position: relative;
  min-height: 320px;
  margin-top: 4px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,252,247,0.8), rgba(245,236,224,0.85)),
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.12), transparent 36%),
    radial-gradient(circle at top right, rgba(var(--emerald-rgb), 0.12), transparent 38%);
  border: 1px solid rgba(216,205,188,0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.52);
}

.share-preview-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

/* Search Results Dropdown */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 4px;
  z-index: 10;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.search-result {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.12s;
}
.search-result:hover { background: var(--surface); }
.search-result + .search-result { border-top: 1px solid var(--border); }

.result-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.result-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.type-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.type-country { background: rgba(var(--accent-rgb), 0.16); color: var(--accent); }
.type-state   { background: rgba(57,95,158,0.12); color: var(--indigo); }
.type-city    { background: rgba(var(--emerald-rgb), 0.14); color: var(--emerald); }

.search-no-results {
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.selected-places {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.selected-places-empty {
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.82rem;
  background: rgba(255,255,255,0.32);
}

.selected-place-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(216,205,188,0.9);
  border-radius: 12px;
  background: rgba(255,252,247,0.82);
}

.selected-place-copy {
  min-width: 0;
}

.selected-place-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-place-subtitle {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-place-remove {
  border: none;
  background: rgba(35,55,70,0.06);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.selected-place-remove:hover {
  background: rgba(196,85,73,0.12);
  color: var(--red);
  transform: scale(1.04);
}

/* Type Pills */
.type-pills {
  display: flex;
  gap: 8px;
}

.type-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.type-pill:hover { border-color: #c6b7a3; color: var(--text); }
.type-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.visited-dot { background: var(--accent); }
.lived-dot   { background: var(--emerald); }
.want-dot    { background: var(--indigo); }

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.btn-primary {
  padding: 9px 22px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff8ef;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: #631726; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  padding: 9px 22px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { color: var(--text); border-color: #c6b7a3; }

/* ===== Toasts ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 999;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-info  { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
.toast-error { background: rgba(196,85,73,0.12); border: 1px solid rgba(196,85,73,0.26); color: var(--red); }

.maplibregl-ctrl-group {
  background: rgba(255,250,243,0.88);
  border: 1px solid rgba(216,205,188,0.9);
  box-shadow: 0 10px 22px rgba(122, 97, 68, 0.12);
  backdrop-filter: blur(10px);
}

.maplibregl-ctrl-group button + button {
  border-top: 1px solid rgba(216,205,188,0.9);
}

.maplibregl-ctrl button:not(:disabled):hover {
  background-color: rgba(var(--accent-rgb), 0.08);
}

.maplibregl-ctrl-attrib {
  background: rgba(255,250,243,0.76);
  color: var(--text-muted);
  border-radius: 10px 10px 0 0;
  border: 1px solid rgba(216,205,188,0.9);
  border-bottom: none;
}

.maplibregl-ctrl-attrib a {
  color: var(--text);
}


/* ===== Mobile ===== */
@media (max-width: 640px) {
  .login-logo-mark {
    width: 52px;
    height: 52px;
  }

  #app-screen {
    align-items: flex-end;
  }

  #sidebar {
    width: 100%;
    height: 40vh;
    border-right: none;
    border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -18px 48px rgba(122, 97, 68, 0.12);
  }

  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .modal-overlay {
    align-items: flex-end;
  }
}
