html[data-theme="dark"], :root {
  /* Dark shell from the color mockup: black canvas, navy bar, slate panels, blue labels */
  --bg: #000000;
  --bg-elev: #181e2e;
  --bg-panel: #3a435a;
  --bg-head: #14161d;
  --border: transparent;
  --border-soft: rgba(255,255,255,0.12);
  --text: #f4f7fb;
  --muted: #b7c0d0;
  --accent: #557fee;
  --accent-dim: rgba(85, 127, 238, 0.18);
  --label: #557fee;
  --ok: #34c759;
  --danger: #ff453a;
  --radius: 18px;
  --gap: 12px;
  --topbar-h: 58px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.app {
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr;
  padding: var(--gap);
  gap: var(--gap);
  max-width: 100%;
  min-height: 0;
}
.col-map {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
  min-height: 0;
}
.col-map .map-panel {
  flex: 1;
  min-height: 0;
}
.col-side {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  width: 340px;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
body.is-form-wide .col-side {
  width: 450px;
}
.col-side .user-panel {
  flex: 1;
  min-height: 0;
}
.col-side .status-panel {
  flex-shrink: 0;
}

/* —— Top bar —— */
.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  display: grid;
  grid-template-columns: 1fr minmax(180px, 420px) auto;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  z-index: 30;
}
.topbar-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
}
.topbar-progress-bar {
  display: block;
  height: 100%;
  width: 38%;
  background: var(--accent);
  border-radius: 3px;
  animation: topbar-load 1.05s ease-in-out infinite;
}
@keyframes topbar-load {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(340%); }
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}
.brand-logo-img {
  display: none;
  height: 36px;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
}
html[data-theme="dark"] .brand-logo-dark { display: block; }
html[data-theme="light"] .brand-logo-light { display: block; }
/* fallback before theme attr is set */
html:not([data-theme]) .brand-logo-dark { display: block; }
.top-nav { display: flex; gap: 4px; margin-left: 8px; }
.nav-btn {
  border: 0; background: transparent; color: var(--muted);
  font: 600 12px/1 var(--font); text-transform: uppercase; letter-spacing: 0.06em;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.nav-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-btn.is-active { color: var(--accent); background: var(--accent-dim); }

/* —— Dropdown menu under topbar —— */
.sub-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: subMenuIn 0.18s ease-out;
}
.sub-menu[hidden] { display: none !important; }
.sub-menu-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 11px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.sub-menu-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}
.sub-menu-btn.is-active {
  color: var(--label, var(--accent));
  background: var(--accent-dim);
}
.menu-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  letter-spacing: 0;
  text-transform: none;
}
.menu-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}
.menu-toggle[aria-expanded="true"] {
  color: var(--label, var(--accent));
  background: var(--accent-dim);
}
@keyframes subMenuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
html[data-theme="light"] .sub-menu-btn { color: #4a433a; }
html[data-theme="light"] .sub-menu-btn:hover {
  color: var(--text);
  background: rgba(60,48,32,0.08);
}
html[data-theme="light"] .sub-menu-btn.is-active {
  color: var(--label);
  background: var(--accent-dim);
}


.topbar-center {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}
.search-expand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 40px;
  width: 100%;
}
.search-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.search-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.search-expand.is-open .search-toggle {
  display: none;
}
.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 0;
  max-width: 100%;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(12px);
  transition: width 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.search-expand.is-open .search-panel,
.search-panel:not([hidden]) {
  pointer-events: auto;
}
.search-expand.is-open .search-panel {
  width: min(420px, 100%);
  opacity: 1;
  transform: translateX(0);
}
.search-wrap { display: block; flex: 1; min-width: 0; width: 100%; }
.search-wrap input {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  outline: none;
}
.search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-wrap input::placeholder { color: #666; }
.search-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
.search-close:hover { color: var(--text); border-color: var(--text); }
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 320px;
  overflow: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  z-index: 40;
  padding: 6px;
}
.search-hit, .search-empty, .search-pending {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
}
.search-hit:hover, .search-hit.is-active { background: var(--accent-dim); }
.search-hit-title { display: block; font-size: 13px; font-weight: 650; }
.search-hit-meta { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.search-empty, .search-pending { cursor: default; color: var(--muted); font-size: 12px; }
html[data-theme="light"] .search-toggle,
html[data-theme="light"] .search-close {
  background: #ebe4d9;
}

.clock {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  color: var(--label, var(--accent));
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* —— Main grid —— */
.main {
  /* legacy wrapper removed; layout is .app > .col-map + .col-side */
  display: contents;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.panel-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-head);
  border-bottom: 1px solid var(--border);
}
.panel-head h1, .panel-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label, var(--accent));
}
.map-tools { display: flex; align-items: center; gap: 8px; }
.map-tools select {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  max-width: 180px;
}
.btn {
  border: 0; border-radius: 10px; cursor: pointer;
  font: 600 13px/1.2 var(--font);
  padding: 10px 14px;
  background: var(--accent); color: #111;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border-soft); padding: 6px 10px;
}
.btn.ghost:hover { color: var(--text); border-color: var(--muted); }
.btn.block { width: 100%; }
.btn.secondary { background: #333; color: var(--text); }

.chip {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-dim); padding: 4px 8px; border-radius: 999px;
}

.map-panel { min-width: 0; }
.map-body { position: relative; flex: 1; min-height: 0; }
.map-canvas { position: absolute; inset: 0; }
.map-loading {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: #14161d; color: var(--muted); font-weight: 600; font-size: 14px;
  pointer-events: none; transition: opacity 0.3s;
}
.map-loading.hide { opacity: 0; }

.side {
  display: flex; flex-direction: column; gap: var(--gap); min-height: 0;
}
.user-panel { flex: 1; min-height: 0; }
.panel-body {
  flex: 1; min-height: 0; overflow: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}

.status-panel { flex-shrink: 0; padding: 12px 14px; }
.status-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
}
.stat-places {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stat-val {
  display: inline;
  font-size: 16px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-lbl {
  display: inline;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

/* —— Side content —— */
.hero-empty {
  text-align: center; padding: 28px 12px 16px; color: var(--muted);
}
.hero-empty strong {
  display: block; color: var(--accent); font-size: 18px;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px;
}
.list { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px;
  align-items: center;
  padding: 10px 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent;
}
.list-item:hover, .list-item.is-active {
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
}
.list-ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px;
  background: #222;
}
.list-title { font-size: 13px; font-weight: 600; line-height: 1.25; }
.list-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.list-rating { font-size: 11px; color: var(--accent); font-weight: 600; }

.detail-cover {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: 10px; background: #222; margin-bottom: 12px;
}
.detail-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; line-height: 1.25; }
.detail-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); margin-bottom: 10px;
}
.detail-desc {
  font-size: 13px; line-height: 1.5; color: #c8c4bc;
  margin: 0 0 14px; white-space: pre-wrap;
}
.kv { display: grid; gap: 6px; margin-bottom: 14px; }
.kv-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; padding: 8px 10px; background: #222; border-radius: 8px;
}
.kv-row span:first-child { color: var(--muted); }
.kv-row span:last-child { text-align: right; font-weight: 600; min-width: 0; }
.kv-credits .kv-row span:last-child { overflow-wrap: anywhere; }
.kv-credits a { color: var(--accent); text-decoration: none; }
.kv-credits a:hover { text-decoration: underline; }

.form { display: grid; gap: 10px; }
.form label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form input, .form textarea, .form select {
  width: 100%; background: #14161d; border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 10px 12px; font: 14px/1.3 var(--font);
}
.form textarea { min-height: 88px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.msg { font-size: 12px; padding: 10px; border-radius: 8px; margin-top: 4px; }
.msg.ok { background: rgba(52,199,89,0.15); color: var(--ok); }
.msg.err { background: rgba(255,69,58,0.15); color: var(--danger); }
.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin: 16px 0 8px; font-weight: 700;
}
.back-link {
  background: none; border: 0; color: var(--accent); font: 600 12px var(--font);
  cursor: pointer; padding: 0; margin-bottom: 10px;
}

/* MapLibre dark tweaks */
.maplibregl-ctrl-group {
  background: #14161d !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
}
.maplibregl-ctrl-group button { filter: invert(1); opacity: 0.85; }
.maplibregl-ctrl-attrib {
  background: rgba(20,20,20,0.85) !important;
  color: #888 !important;
  font-size: 10px !important;
}
.maplibregl-ctrl-attrib a { color: #aaa !important; }
.maplibregl-popup-content {
  background: #14161d !important; color: var(--text) !important;
  border-radius: 10px !important; padding: 10px 12px !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5) !important;
  border: 1px solid var(--border);
  font-family: var(--font);
}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: #14161d !important; }
.maplibregl-popup-close-button { color: var(--muted) !important; font-size: 18px !important; }

.go-marker {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 17px; border: 2px solid #fff;
  box-shadow: 0 5px 14px rgba(0,0,0,0.45);
  cursor: pointer;
}

.go-cluster {
  border: 3px solid #fff;
  border-radius: 50%;
  background: #FF6B35;
  color: #111;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  cursor: pointer;
  padding: 0;
}
.go-cluster:hover { filter: brightness(1.08); }
.go-cluster span { pointer-events: none; }


/* —— Light theme —— */
html[data-theme="light"] {
  /* Warm stone light — soft, not white; brand amber (not harsh red) */
  --bg: #c8c0b4;
  --bg-elev: #e4ddd2;
  --bg-panel: #dfd7cb;
  --bg-head: #d6cec2;
  --border: rgba(60, 48, 32, 0.10);
  --border-soft: rgba(60, 48, 32, 0.14);
  --text: #2a241c;
  --muted: #6a6258;
  --accent: #d97706;
  --accent-dim: rgba(217, 119, 6, 0.16);
  --label: #c2410c;
  --ok: #3f7d4e;
  --danger: #b42318;
}

html[data-theme="light"] .maplibregl-ctrl-group {
  background: #e4ddd2 !important;
  border-color: rgba(60,48,32,0.12) !important;
  box-shadow: 0 4px 14px rgba(60,48,32,0.12) !important;
}
html[data-theme="light"] .maplibregl-ctrl-group button { filter: none; opacity: 1; }
html[data-theme="light"] .maplibregl-ctrl-attrib {
  background: rgba(228, 221, 210, 0.94) !important;
  color: #5a5348 !important;
}
html[data-theme="light"] .maplibregl-ctrl-attrib a { color: #2a241c !important; }
html[data-theme="light"] .maplibregl-popup-content {
  background: #e4ddd2 !important;
  color: var(--text) !important;
  border-color: rgba(60,48,32,0.12);
}
html[data-theme="light"] .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: #e4ddd2 !important;
}
html[data-theme="light"] .form input,
html[data-theme="light"] .form textarea,
html[data-theme="light"] .form select {
  background: #ebe4d9;
  border-color: rgba(60,48,32,0.14);
  color: var(--text);
}
html[data-theme="light"] .kv-row { background: #d6cec2; }
html[data-theme="light"] .list-ico { background: #ebe4d9; }
html[data-theme="light"] .btn.secondary { background: #b8aea0; color: #2a241c; }
html[data-theme="light"] .search-wrap input { background: #ebe4d9; color: var(--text); }
html[data-theme="light"] .map-tools select { background: #ebe4d9; color: var(--text); }
html[data-theme="light"] .map-loading { background: #d6cec2; color: var(--muted); }
html[data-theme="light"] .nav-btn { color: #4a433a; }
html[data-theme="light"] .nav-btn.is-active { color: var(--label); background: var(--accent-dim); }
html[data-theme="light"] .clock { color: var(--label); }
html[data-theme="light"] .panel-head h1,
html[data-theme="light"] .panel-head h2,
html[data-theme="light"] .section-title,
html[data-theme="light"] .chip,
html[data-theme="light"] .stat-val { color: var(--label); }
html[data-theme="light"] .btn { background: var(--accent); color: #fff; }
html[data-theme="light"] .theme-toggle { color: var(--label); border-color: rgba(60,48,32,0.14); background: #ebe4d9; }


html[data-theme="dark"] .panel-head h1,
html[data-theme="dark"] .panel-head h2,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .stat-val,
html[data-theme="dark"] .nav-btn.is-active,
html[data-theme="dark"] .clock {
  color: var(--label);
}
html[data-theme="dark"] .btn { background: var(--accent); color: #fff; }
html[data-theme="dark"] .user-panel,
html[data-theme="dark"] .user-panel .panel-head { background: #181e2e; }
html[data-theme="dark"] .status-panel { background: #14161d; }
html[data-theme="dark"] .btn.secondary { background: #14161d; color: var(--text); }
html[data-theme="dark"] .nav-btn.is-active,
html[data-theme="dark"] .sub-menu-btn.is-active,
html[data-theme="dark"] .menu-toggle[aria-expanded="true"] {
  background: rgba(88, 130, 246, 0.16);
}
html[data-theme="light"] .btn.secondary { background: #b8aea0; color: #2a241c; }
html[data-theme="dark"] .maplibregl-ctrl-group {
  background: #14161d !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}

/* Theme toggle */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-switch {
  display: flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-panel);
  flex-shrink: 0;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0 8px;
  height: 100%;
  cursor: pointer;
}
.lang-switch button.is-on {
  color: var(--text);
  background: var(--accent-dim);
}
html[data-theme="light"] .lang-switch {
  background: #ebe4d9;
  border-color: rgba(60, 48, 32, 0.14);
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}
.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}







/* —— Network status pulse in map title —— */
.net-status {
  display: inline-block;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.net-status.is-online {
  color: #30d158;
  animation: netPulseOnline 1.6s ease-in-out infinite;
}
.net-status.is-offline {
  color: #ff453a;
  animation: netPulseOffline 1.1s ease-in-out infinite;
}
@keyframes netPulseOnline {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 transparent; }
  50% { opacity: 0.45; text-shadow: 0 0 10px rgba(48, 209, 88, 0.55); }
}
@keyframes netPulseOffline {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 transparent; }
  50% { opacity: 0.4; text-shadow: 0 0 12px rgba(255, 69, 58, 0.65); }
}

html[data-theme="light"] .net-status.is-online {
  color: #1a7f37;
  animation: netPulseOnlineLight 1.6s ease-in-out infinite;
}
html[data-theme="light"] .net-status.is-offline {
  color: #c62828;
}
@keyframes netPulseOnlineLight {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 transparent; }
  50% { opacity: 0.55; text-shadow: 0 0 8px rgba(26, 127, 55, 0.35); }
}

@media (prefers-reduced-motion: reduce) {
  .net-status.is-online,
  .net-status.is-offline { animation: none; opacity: 1; }
  .col-side { transition: none; }
}

@media (max-width: 960px) {
  /* Phone shell lives at the end of this file. Do not stack map + panel here. */
}

/* Lucide icons */
.lucide-wrap { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.lucide-wrap svg, .theme-icon svg, .icon-btn svg, .back-link svg, .list-ico svg, .detail-cat-ico svg, .go-marker svg {
  display: block;
  flex-shrink: 0;
}
.theme-icon { display: none; align-items: center; justify-content: center; }
html[data-theme="dark"] .theme-icon-sun { display: inline-flex; }
html[data-theme="light"] .theme-icon-moon { display: inline-flex; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="light"] .theme-icon-sun { display: none; }
.theme-toggle { color: var(--text); }
.go-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}
.list-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  min-width: 36px;
}
.detail-cat-ico { display: inline-flex; align-items: center; }


/* —— logged-in user profile —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 8px 4px 4px;
}
.user-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid var(--accent, #ff9300);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-avatar-fallback span {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}
.user-change-photo {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent, #ff9300);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.user-change-photo:hover { opacity: 0.85; }
.user-photo-hint {
  font-size: 10px;
  color: var(--muted);
  margin-top: -4px;
}
.user-fullname {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-top: 4px;
}
.user-username {
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
}
.rank-card {
  width: 100%;
  max-width: 320px;
  margin: 6px 0 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(28, 28, 28, 0.92);
  border: 1px solid rgba(63, 63, 70, 0.55);
  text-align: left;
}
html[data-theme="light"] .rank-card {
  background: rgba(228, 221, 210, 0.95);
  border-color: rgba(120, 100, 70, 0.28);
}
.rank-card-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}
.rank-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rank-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
html[data-theme="light"] .rank-card-icon {
  background: rgba(255, 255, 255, 0.45);
}
.rank-card-meta { flex: 1; min-width: 0; }
.rank-card-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}
.rank-card-count {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.rank-card-next {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  opacity: 0.9;
}
.rank-card-bar {
  margin-top: 12px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
html[data-theme="light"] .rank-card-bar {
  background: rgba(0, 0, 0, 0.08);
}
.rank-card-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.user-profile #btnLogout {
  margin-top: 8px;
  width: 100%;
  max-width: 320px;
}
.user-profile .account-actions {
  width: 100%;
  max-width: 320px;
  align-self: center;
}
.user-profile .account-actions .btn { width: 100%; }


/* —— Place popup card (map click) —— */
.go-place-popup-wrap.maplibregl-popup { z-index: 5; }
.go-place-popup-wrap .maplibregl-popup-content {
  background: rgba(28, 28, 28, 0.94) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f5f5f5 !important;
  border-radius: 22px !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 48px rgba(0,0,0,0.55) !important;
  overflow: hidden;
  width: min(320px, 86vw);
}
.go-place-popup-wrap .maplibregl-popup-close-button {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff !important; font-size: 18px !important;
  right: 10px !important; top: 10px !important; z-index: 2;
  display: grid; place-items: center; padding: 0 !important;
}
.go-place-popup-wrap .maplibregl-popup-tip {
  border-top-color: rgba(28,28,28,0.94) !important;
}
.go-pop { padding: 0 14px 14px; font-family: var(--font); }
.go-pop-cover {
  margin: 0 -14px 12px; height: 148px; background: #141414;
  display: grid; place-items: center; overflow: hidden;
}
.go-pop-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.go-pop-cover.is-empty { color: #666; }
.go-pop-cover-ph { opacity: 0.7; display: inline-flex; }
.go-pop-rating { margin-bottom: 8px; }
.go-rate-public, .go-rate-mine { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.go-rate-mine { margin-top: 6px; }
.go-pop-rating-label {
  font-weight: 800; font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.go-rate-mine-label {
  font-size: 12px; font-weight: 700; color: #c8c8d0; min-width: 62px;
}
.go-pop-stars, .go-rate-stars { display: inline-flex; align-items: center; gap: 1px; line-height: 0; }
.go-star {
  display: block; fill: none; stroke: #b4b4be; stroke-width: 1.6;
  stroke-linejoin: round; stroke-linecap: round;
}
.go-star.is-on { fill: #F17313; stroke: #F17313; }
.star-btn {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; margin: 0; line-height: 0;
  cursor: pointer; color: inherit; pointer-events: auto; touch-action: manipulation;
}
.star-btn:hover { transform: scale(1.08); }
.go-star-clip { position: relative; display: inline-block; vertical-align: middle; flex: none; }
.go-star-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; line-height: 0; }
.go-pop-avg { font-weight: 800; font-size: 16px; color: #fff; }
.go-pop-reviews { font-size: 12px; color: #b0b0b8; margin: 0; }
.go-pop-title-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.go-pop-title { flex: 1; margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; color: #fff; }
.go-pop-fav {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06);
  color: #aaa; display: grid; place-items: center; cursor: pointer;
}
.go-pop-fav.is-on { color: #ff3b30; border-color: rgba(255,59,48,0.35); background: rgba(255,59,48,0.12); }
.go-pop-desc { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: #cfcfcf; }
.go-pop-meta { display: flex; flex-direction: column; gap: 6px; font-size: 13px; margin-bottom: 10px; }
.go-pop-meta span { display: inline-flex; align-items: center; gap: 8px; color: #d0d0d0; }
.go-pop-meta .lucide-wrap { color: #ff9500; }
.go-pop-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.go-pop-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px;
  border-radius: 999px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.06); font-size: 12px; color: #eee;
}
.go-pop-creator {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.06);
  margin-bottom: 12px; font-size: 13px;
}
.go-pop-creator-name { display: inline-flex; align-items: center; gap: 6px; color: #f0f0f0; font-weight: 600; }
.go-pop-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  background: rgba(234, 179, 8, 0.16); color: #eab308; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.go-pop-actions { display: flex; flex-direction: column; gap: 8px; }
/* go-pop-route: do not force accent text — secondary buttons need readable contrast */
.go-pop-route { /* color inherited from .btn.secondary */ }

.route-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 16px;
}
.route-sheet[hidden] { display: none; }
.route-sheet-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.route-sheet-card {
  position: relative;
  width: min(420px, 100%);
  margin-bottom: 8px;
  padding: 16px;
  border-radius: 18px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border-soft);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.route-sheet-title { font-weight: 700; font-size: 16px; }
.route-sheet-sub {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}
.route-sheet-apps { display: flex; flex-direction: column; gap: 8px; }
.route-sheet-app {
  display: block;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg-head);
  color: var(--text);
  border: 1px solid var(--border-soft);
  font: 600 14px/1.2 var(--font);
}
.route-sheet-app:hover { border-color: var(--accent); }

.go-pop-delete {
  margin-top: 10px; width: 100%; border: 0; background: transparent; color: #ff453a;
  font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px;
}
.go-pop-delete:hover { opacity: 0.85; }

html[data-theme="light"] .go-place-popup-wrap .maplibregl-popup-content {
  background: rgba(228, 221, 210, 0.96) !important; color: #2a241c !important;
  border-color: rgba(60,48,32,0.12);
}
html[data-theme="light"] .go-place-popup-wrap .maplibregl-popup-tip {
  border-top-color: rgba(228,221,210,0.96) !important;
}
html[data-theme="light"] .go-pop-title { color: #2a241c; }
html[data-theme="light"] .go-pop-desc { color: #5a5348; }
html[data-theme="light"] .go-pop-meta span { color: #3a342c; }
html[data-theme="light"] .go-pop-chip {
  background: rgba(60,48,32,0.08); border-color: rgba(60,48,32,0.08); color: #2a241c;
}
html[data-theme="light"] .go-pop-creator { background: rgba(60,48,32,0.08); }
html[data-theme="light"] .go-pop-creator-name { color: #2a241c; }
html[data-theme="light"] .go-pop-cover { background: #d0c8bc; }
html[data-theme="light"] .go-pop-avg { color: #2a241c; }
html[data-theme="light"] .go-rate-mine-label,
html[data-theme="light"] .go-pop-reviews { color: #5c564e; }
html[data-theme="light"] .go-star { stroke: #8a8178; }
html[data-theme="light"] .go-star.is-on { fill: #F17313; stroke: #F17313; }
html[data-theme="light"] .go-pop-fav {
  background: rgba(60,48,32,0.06); border-color: rgba(60,48,32,0.12); color: #6a6258;
}


/* —— Place detail drawer (glass modal) —— */
.place-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}
.place-drawer-root:not([hidden]) {
  pointer-events: auto;
}
.place-drawer-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
}
.place-drawer {
  position: absolute;
  top: var(--gap);
  right: var(--gap);
  bottom: var(--gap);
  width: min(460px, calc(100vw - 24px));
  max-width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(28, 28, 28, 0.55);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: transform;
  transform: translate3d(110%, 0, 0);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.place-drawer-root.is-open .place-drawer {
  transform: translate3d(0, 0, 0);
}
.place-drawer-scrim {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.place-drawer-root.is-open .place-drawer-scrim {
  opacity: 1;
}
.place-drawer-inner {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 0 20px;
  overscroll-behavior: contain;
}
.place-drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(28, 28, 28, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.place-drawer-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.place-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.place-drawer-close:hover { background: rgba(255,255,255,0.14); }

.place-drawer .go-pop.place-drawer-pop {
  padding: 0;
  margin: 0;
}
.place-drawer .place-drawer-cover {
  position: relative;
  margin: 0;
  height: 240px;
  border-radius: 0;
  width: 100%;
}
.place-drawer .place-drawer-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.place-drawer .place-drawer-cover img[data-gallery] { cursor: zoom-in; }
.place-thumbs-slot:empty { display: none; }
.place-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 12px 0;
  overflow-x: auto;
}
.place-thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
  cursor: zoom-in;
}
.place-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.place-thumb:hover { border-color: var(--accent); }
.place-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 56px 72px;
}
.place-lightbox[hidden] { display: none; }
.place-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.place-lightbox-close,
.place-lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.place-lightbox-close { top: 16px; right: 16px; }
.place-lightbox-nav.is-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.place-lightbox-nav.is-next { right: 16px; top: 50%; transform: translateY(-50%); }
.place-lightbox-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.04em;
}
body.is-lightbox { overflow: hidden; }
.place-drawer .place-drawer-body {
  padding: 14px 18px 8px;
}
.place-drawer .go-pop-title { font-size: 24px; }
.place-drawer .place-drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.place-drawer .place-drawer-close:hover {
  background: rgba(0, 0, 0, 0.6);
}
html[data-theme="light"] .place-drawer .place-drawer-close {
  background: rgba(0, 0, 0, 0.40);
  color: #fff;
  border: 0;
}
.place-drawer .go-pop-actions { margin-top: 4px; }
.go-pop-chips.is-icons { gap: 10px; margin: 14px 0 16px; }
.go-pop-chip.is-icon {
  width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 12px;
}
.go-pop-chip.is-icon .wc-icon { width: 26px; height: 16px; }
.place-facts { display: flex; flex-direction: column; gap: 22px; margin: 18px 0 10px; }
.place-facts-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.place-facts-sec h4 {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.place-fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  font-size: 13px;
}
.place-fact-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); min-width: 0; }
.place-fact-label em { font-style: normal; }
.place-fact.is-icons { justify-content: flex-start; background: transparent; padding: 2px 0; }
.place-fact-icons { display: flex; flex-wrap: wrap; gap: 10px; }
.place-fact strong { color: var(--text); font-weight: 650; text-align: right; }
.place-drawer .place-fact.is-money strong,
.place-drawer .place-fact.is-money .place-fact-fx,
.place-drawer .go-pop-meta .is-price,
.place-drawer .go-pop-meta .is-price .lucide-wrap { color: #3ddc84; }
html[data-theme="light"] .place-drawer .place-fact.is-money strong,
html[data-theme="light"] .place-drawer .place-fact.is-money .place-fact-fx,
html[data-theme="light"] .place-drawer .go-pop-meta .is-price,
html[data-theme="light"] .place-drawer .go-pop-meta .is-price .lucide-wrap { color: #166534; }
html[data-theme="light"] .place-facts-sec { background: rgba(60, 48, 32, 0.04); border-color: rgba(60, 48, 32, 0.08); }
html[data-theme="light"] .place-fact { background: rgba(60, 48, 32, 0.08); }
.place-drawer .go-pop-kv {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 14px;
}
.place-drawer .go-pop-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  font-size: 13px;
}
.place-drawer .go-pop-kv-row span:first-child { color: var(--muted); }
.place-drawer .go-pop-kv-row span:last-child { color: var(--text); font-weight: 600; text-align: right; }

html[data-theme="light"] .place-drawer-scrim {
  background: rgba(42, 36, 28, 0.22);
}
html[data-theme="light"] .place-drawer {
  background: rgba(228, 221, 210, 0.58);
  border-color: rgba(60, 48, 32, 0.14);
  box-shadow: 0 24px 64px rgba(60, 48, 32, 0.22);
}
html[data-theme="light"] .place-drawer-head {
  background: rgba(228, 221, 210, 0.45);
  border-bottom-color: rgba(60, 48, 32, 0.10);
}
html[data-theme="light"] .place-drawer-close {
  background: rgba(60, 48, 32, 0.08);
  border-color: rgba(60, 48, 32, 0.12);
  color: var(--text);
}
html[data-theme="light"] .place-drawer .go-pop-kv-row {
  background: rgba(60, 48, 32, 0.08);
}

@media (max-width: 900px) {
  .place-drawer {
    width: min(100%, calc(100vw - 16px));
    left: auto;
    right: 8px;
    top: var(--gap);
    bottom: var(--gap);
    height: auto;
    transform: translate3d(110%, 0, 0);
  }
  .place-drawer-root.is-open .place-drawer {
    transform: translate3d(0, 0, 0);
  }
}


/* —— Social auth buttons —— */
.social-auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
}
.social-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.social-apple {
  background: #111 !important;
  color: #fff !important;
}
html[data-theme="light"] .social-apple {
  background: #000 !important;
  color: #fff !important;
}
.social-google {
  background: #fff !important;
  color: #1f1f1f !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
}
html[data-theme="dark"] .social-google {
  background: #14161d !important;
  color: #f5f5f5 !important;
  border-color: rgba(255,255,255,0.12) !important;
}
.social-ico {
  font-size: 18px;
  line-height: 1;
  width: 1.1em;
  text-align: center;
}
.social-ico-g {
  font-weight: 800;
  font-family: "Inter", system-ui, sans-serif;
  background: linear-gradient(120deg, #4285F4, #34A853, #FBBC05, #EA4335);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.social-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.social-divider::before,
.social-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}
.social-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
.social-hint code {
  font-size: 10px;
  word-break: break-all;
}


/* —— Auth panel —— */
.auth-switch {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.auth-footnote {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
button.linkish {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
button.linkish.muted {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
button.linkish.muted:hover { color: var(--text); text-decoration: underline; }


/* —— Register terms checkbox —— */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}
.terms-check input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--accent);
}
.terms-check a {
  color: var(--accent);
  font-weight: 600;
}
.terms-check a:hover { text-decoration: underline; }


/* Compact actions in place drawer + map popup */
.place-drawer .go-pop-actions { gap: 6px; }
.place-drawer .go-pop-actions .btn {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
  line-height: 1.2;
}
.place-drawer .go-pop-delete {
  font-size: 12px;
  padding: 4px;
  margin-top: 6px;
}
.go-pop-actions { gap: 6px; }
.go-pop-actions .btn {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
  line-height: 1.2;
}
.go-place-popup-wrap .go-pop-actions .btn {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
  line-height: 1.2;
}
.place-edit-form { display: grid; gap: 8px; margin-top: 4px; }
.place-edit-form label {
  display: grid; gap: 4px; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.place-edit-form input,
.place-edit-form textarea,
.place-edit-form select {
  width: 100%; background: #14161d; border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 8px 10px;
  font: 13px/1.3 var(--font);
}
html[data-theme="light"] .place-edit-form input,
html[data-theme="light"] .place-edit-form textarea,
html[data-theme="light"] .place-edit-form select {
  background: #ebe4d9; border-color: rgba(60,48,32,0.14); color: var(--text);
}
.place-edit-form textarea { min-height: 72px; resize: vertical; }
.place-edit-form .check-row {
  display: flex; align-items: center; gap: 8px;
  text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text);
}
.place-edit-form .check-row input { width: auto; }
.place-edit-actions { display: grid; gap: 6px; margin-top: 4px; }
.place-edit-msg { font-size: 12px; margin-top: 4px; }
.place-edit-msg.is-err { color: var(--danger); }
.place-edit-msg.is-ok { color: var(--ok); }

/* Narrower action buttons in map popup + Ver Lugar drawer */
.go-place-popup-wrap .go-pop-actions,
.place-drawer .go-pop-actions {
  align-items: center;
}
.go-place-popup-wrap .go-pop-actions .btn,
.place-drawer .go-pop-actions .btn {
  width: 68% !important;
  max-width: 220px;
  align-self: center;
  padding: 7px 14px;
  font-size: 12px;
  border-radius: 8px;
  line-height: 1.2;
}
.go-place-popup-wrap .go-pop-delete,
.place-drawer .go-pop-delete {
  width: 68%;
  max-width: 220px;
  align-self: center;
  margin-left: auto;
  margin-right: auto;
  display: block;
  text-align: center;
  font-size: 12px;
  padding: 4px;
}

/* Categorias: botão no panel-head + barra horizontal deslizante */
.btn-categories {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 16px;
  min-height: 36px;
  font: 700 14px/1.2 var(--font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-categories i, .btn-categories svg { width: 18px; height: 18px; }
.btn-categories:hover,
.btn-categories[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.cat-bar-panel {
  flex: 0 0 auto;
  padding: 0 10px 10px;
  min-width: 0;
}
.cat-bar-panel[hidden] { display: none !important; }
.cat-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(28,28,36,0.55) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.25), 0 8px 18px rgba(0,0,0,0.28);
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar.is-dragging { cursor: grabbing; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font: 600 12px/1.2 var(--font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.cat-chip .lucide-wrap { display: inline-flex; color: var(--accent); }
.cat-chip:hover {
  color: var(--accent);
  border-color: rgba(255,149,0,0.45);
  background: rgba(255,255,255,0.08);
}
.cat-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
  box-shadow: 0 2px 6px rgba(241,115,19,0.4);
}
html[data-theme="dark"] .cat-chip:hover {
  border-color: rgba(85, 127, 238, 0.55);
}
html[data-theme="dark"] .cat-chip.is-active,
html[data-theme="dark"] .cat-chip.is-active .lucide-wrap {
  color: #fff;
  box-shadow: none;
}
html[data-theme="light"] .btn-categories {
  background: #ebe4d9;
  border-color: #d4cbbd;
  color: #2a241c;
}
html[data-theme="light"] .btn-categories:hover,
html[data-theme="light"] .btn-categories[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff6eb;
}
html[data-theme="light"] .cat-bar {
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(235,228,217,0.9) 100%);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}
html[data-theme="light"] .cat-chip {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.08);
  color: #2a241c;
}


/* —— Acampamento Estruturado (Novo Ponto) —— */
.ce-form { gap: 22px; }
.ce-sec {
  display: grid;
  gap: 10px;
  padding: 14px 12px 16px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
.ce-sec + .ce-sec,
.ce-form > .ce-sec + #campingFields,
.ce-form > #campingFields {
  /* numbered blocks stay visually separated via .ce-form gap */
}
#campingFields {
  display: grid;
  gap: 22px;
}
html[data-theme="light"] .ce-sec {
  background: rgba(0,0,0,0.02);
}
.ce-sec-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.ce-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.ce-row2, .ce-row3 {
  display: grid;
  gap: 10px;
}
.ce-row2 { grid-template-columns: 1fr 1fr; }
.ce-row3 { grid-template-columns: 1fr 1fr 1fr; }
.ce-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ce-check, .ce-toggle {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ce-check input, .ce-toggle input {
  width: auto !important;
  margin: 0;
  accent-color: var(--accent);
}
.ce-check:has(input:checked), .ce-toggle:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.ce-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed var(--border);
}
.ce-fx-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 450; line-height: 1.35; }
.place-fact-fx { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.place-fact-trend-wrap { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 11px; font-weight: 600; line-height: 1.35; text-align: right; }
.place-fact-trend.is-up { color: #ff8a5b; }
.place-fact-trend.is-down { color: #3ddc84; }
.place-fact-trend.is-same { color: var(--muted); font-weight: 500; }
html[data-theme="light"] .place-fact-trend.is-up { color: #9a3412; }
html[data-theme="light"] .place-fact-trend.is-down { color: #166534; }
.price-update { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: end; margin: 4px 0 14px; }
.price-update label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.price-update .ce-fx-hint { grid-column: 1 / -1; }
.price-update-note { margin: 0 0 12px; }
@media (max-width: 420px) {
  .ce-row2, .ce-row3, .ce-checks { grid-template-columns: 1fr; }
}


/* —— Novo Ponto pick mode —— */
.map-add-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #111;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 4px 12px rgba(255,149,0,0.35);
  white-space: nowrap;
  max-width: min(52vw, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-add-hint[hidden] { display: none !important; }
.map-panel .panel-head {
  flex-wrap: wrap;
  gap: 8px;
}
.map-panel .panel-head h1 {
  flex: 0 1 auto;
}
.map-panel .panel-head .map-tools {
  margin-left: auto;
}
body.is-add-picking .map-canvas,
body.is-add-picking .maplibregl-canvas,
body.is-add-picking .maplibregl-canvas-container,
body.is-add-picking .maplibregl-map {
  cursor: crosshair !important;
}
.user-panel.is-add-form {
  background: linear-gradient(180deg, rgba(255,149,0,0.08) 0%, var(--bg-panel) 48px);
  box-shadow: inset 0 0 0 1px rgba(255,149,0,0.22);
}
html[data-theme="light"] .user-panel.is-add-form {
  background: linear-gradient(180deg, rgba(230,134,0,0.12) 0%, var(--bg-panel) 48px);
  box-shadow: inset 0 0 0 1px rgba(230,134,0,0.28);
}
html[data-theme="dark"] .map-add-hint {
  color: #fff;
  box-shadow: 0 4px 12px rgba(85, 127, 238, 0.35);
}
html[data-theme="dark"] .user-panel.is-add-form {
  background: linear-gradient(180deg, rgba(85, 127, 238, 0.16) 0%, #181e2e 48px);
  box-shadow: inset 0 0 0 1px rgba(85, 127, 238, 0.28);
}
html[data-theme="dark"] .pc-card.is-reply {
  background: rgba(85, 127, 238, 0.08);
}
.ce-readonly label { color: var(--muted); }
.ce-readonly input.ce-ro-input,
input.ce-ro-input[readonly] {
  background: rgba(127,127,127,0.12) !important;
  color: var(--muted) !important;
  cursor: default;
  border-style: dashed;
  opacity: 0.95;
  pointer-events: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
input.ce-ro-input[readonly]::-webkit-outer-spin-button,
input.ce-ro-input[readonly]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ce-sec[hidden] { display: none !important; }
.ce-lnt { align-items: flex-start; }
.ce-lnt span { line-height: 1.35; font-weight: 600; }
.alert-live { margin-top: 16px; }
.alert-ask { margin: 8px 0 0; font-size: 14px; font-weight: 700; }
.alert-votes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.alert-votes .btn.is-on { box-shadow: inset 0 0 0 2px var(--text); }
.go-temp-add-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transform: translateY(4px);
}
.go-temp-add-pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent, #ff9500);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.go-temp-add-pin-label {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent, #ff9500);
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}


/* —— Place photo gallery (Novo Ponto) —— */
.ce-photos-sec .ce-sec-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.ce-photos-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.ce-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 10px;
  min-height: 4px; /* keep section layout stable when empty */
}
.ce-photos-grid:empty {
  min-height: 0;
}
.ce-photos-sec {
  /* always visible block on every Novo Ponto category form */
}
.ce-photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-2, rgba(127,127,127,0.08));
}
.ce-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ce-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 16px;
  line-height: 22px;
  cursor: pointer;
  padding: 0;
}
.ce-photo-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  color: #fff;
}
.ce-photo-badge.is-err { background: #b91c1c; }
.ce-photo-thumb.is-error {
  outline: 1px solid rgba(239, 68, 68, 0.55);
}
.ce-photo-thumb.is-uploading img {
  filter: brightness(0.72);
}
.ce-photo-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 6px 7px;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}
.ce-photo-progress-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  overflow: hidden;
}
.ce-photo-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  transition: width 0.18s ease-out;
}
.ce-photo-progress.is-indeterminate .ce-photo-progress-bar {
  width: 40% !important;
  animation: ce-photo-indeterminate 1.1s ease-in-out infinite;
}
@keyframes ce-photo-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
.ce-photo-progress-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ce-photo-remove {
  z-index: 2;
}
.ce-photo-remove:hover,
.ce-photo-remove:focus-visible {
  background: #dc2626;
  outline: none;
}
.ce-photos-add {
  position: relative;
  cursor: pointer;
  text-align: center;
}
.ce-photos-add .sr-only {
  /* keep file input activatable via label without display:none */
  position: absolute;
}
.ce-photos-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.ce-photos-status.is-err { color: #ef4444; }
html[data-theme="light"] .ce-photo-thumb {
  background: #f3f4f6;
}
html[data-theme="light"] .ce-photo-remove {
  background: rgba(15,15,15,0.75);
}
html[data-theme="light"] .ce-photo-progress {
  background: linear-gradient(transparent, rgba(15,23,42,0.7));
}
html[data-theme="light"] .ce-photo-progress-track {
  background: rgba(255,255,255,0.35);
}
@media (max-width: 420px) {
  .ce-photos-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}


/* —— Minha Localização (v58) —— */
#btnMyLocation.is-locating {
  opacity: 0.55;
  pointer-events: none;
}
#btnMyLocation.is-locating svg {
  animation: goLocSpin 0.9s linear infinite;
}
@keyframes goLocSpin {
  to { transform: rotate(360deg); }
}
.go-user-loc {
  width: 18px;
  height: 18px;
  position: relative;
  pointer-events: none;
}
.go-user-loc-dot {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #2b7cff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(43, 124, 255, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.go-user-loc-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(43, 124, 255, 0.35);
  animation: goUserLocPulse 1.6s ease-out infinite;
}
@keyframes goUserLocPulse {
  0% { transform: scale(0.55); opacity: 0.85; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* —— Favoritos distance (v59→v60 OSRM) —— */
.fav-dist-note {
  font-size: 12px;
  color: var(--muted);
  margin: -2px 0 10px;
  line-height: 1.35;
}
.list-dist {
  font-size: 12px;
  font-weight: 600;
  color: #22c55e;
  margin-top: 2px;
}
html[data-theme="light"] .list-dist {
  color: #166534;
}
#btnMap3d,
#btnNorth {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 8px;
  box-sizing: border-box;
  overflow: hidden;
}
#btnMap3d svg,
#btnNorth .north-icon {
  width: 24px;
  height: 24px;
  display: block;
  overflow: hidden;
}
#btnMyLocation.is-active,
#btnMap3d.is-active {
  border-color: rgba(43, 124, 255, 0.65);
  background: rgba(43, 124, 255, 0.14);
  color: #2b7cff;
  box-shadow: 0 0 0 1px rgba(43, 124, 255, 0.25);
}
html[data-theme="light"] #btnMyLocation.is-active,
html[data-theme="light"] #btnMap3d.is-active {
  border-color: rgba(43, 124, 255, 0.55);
  background: rgba(43, 124, 255, 0.1);
  color: #1d4ed8;
}

/* —— Place comments (Ver lugar) —— */
.place-comments {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.place-comments-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.place-comments-title .lucide-wrap,
.place-comments-title svg { color: var(--accent); }
.place-comments-count {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  font-weight: 600;
}
.place-comments-list { display: flex; flex-direction: column; gap: 10px; }
.place-comments-status,
.place-comments-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.pc-card {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
}
.pc-card.is-reply {
  margin-left: 28px;
  border-left: 2px solid var(--accent);
  background: rgba(255,149,0,0.06);
}
.pc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
}
.pc-avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #111;
  background: var(--accent);
}
.pc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.pc-name { font-size: 13px; font-weight: 700; }
.pc-when { font-size: 11px; color: var(--muted); white-space: nowrap; }
.pc-replyto {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.pc-text {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.pc-actions { display: flex; gap: 8px; margin-top: 6px; }
.pc-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 12px/1 var(--font);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pc-action:hover { color: var(--accent); }
.pc-action.is-danger:hover { color: var(--danger, #ff453a); }
.pc-replying {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.pc-replying button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 600 12px/1 var(--font);
  cursor: pointer;
}
.pc-form { display: grid; gap: 8px; margin-top: 10px; }
.pc-form textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  background: #14161d;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font: 14px/1.4 var(--font);
}
.pc-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pc-count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pc-form .btn { padding: 8px 14px; }
.pc-msg { font-size: 12px; }
.pc-msg.is-err { color: var(--danger, #ff453a); }
.pc-msg.is-ok { color: var(--ok, #34c759); }
html[data-theme="light"] .pc-card { background: rgba(60, 48, 32, 0.08); }
html[data-theme="light"] .pc-card.is-reply { background: rgba(230, 134, 0, 0.1); }
html[data-theme="light"] .pc-form textarea {
  background: #f7f6f3;
  color: var(--text);
}
html[data-theme="light"] .pc-avatar { background: #e7e2da; }

/* —— Phone shell (max-width 960px, includes landscape phones) —— */
.phone-dock { display: none; }
.phone-menu-lead { display: none; margin: 0; }

@media (max-width: 960px) {
  html, body { height: 100%; overflow: hidden; }
  .app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding: 8px 8px calc(52px + env(safe-area-inset-bottom));
    gap: 8px;
    --gap: 8px;
  }
  .col-map {
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
  }
  .col-side,
  body.is-form-wide .col-side {
    display: none;
    width: auto;
    height: auto;
  }
  html[data-phone="panel"] .col-map { display: none; }
  html[data-phone="panel"] .col-side,
  html[data-phone="panel"] body.is-form-wide .col-side,
  html[data-phone="panel"] .col-side {
    display: flex;
    flex: 1;
    width: auto;
    min-height: 0;
  }
  html[data-phone="menu"] .map-panel { display: none; }
  html[data-phone="menu"] .sub-menu,
  html[data-phone="menu"] .sub-menu[hidden] {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    gap: 8px;
    padding: 14px;
    overflow: auto;
  }
  html[data-phone="menu"] .phone-menu-lead {
    display: block;
    order: -1;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 6px;
  }
  html[data-phone="menu"] .sub-menu-btn {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 14px 16px;
    font-size: 14px;
    border-radius: 14px;
    background: rgba(127, 127, 127, 0.08);
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: 52px;
    min-height: 52px;
    padding: 0 8px;
    gap: 8px;
  }
  .top-nav, .menu-toggle { display: none; }
  .brand-logo-img { height: 28px; }
  .clock { display: none !important; }
  .go-place-popup-wrap.maplibregl-popup {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    bottom: 56px !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    transform: none !important;
    z-index: 50;
    pointer-events: none;
  }
  .go-place-popup-wrap .maplibregl-popup-tip { display: none !important; }
  .go-place-popup-wrap .maplibregl-popup-content {
    pointer-events: auto;
    width: 100% !important;
    max-height: min(70dvh, 560px);
    overflow: auto;
  }
  .star-btn { width: 36px; height: 36px; }
  .topbar:has(.search-expand.is-open) .topbar-left,
  .topbar:has(.search-expand.is-open) .topbar-right { visibility: hidden; }
  .search-expand.is-open {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 6px;
    width: auto;
    z-index: 6;
  }
  .search-expand.is-open .search-panel { width: 100%; }
  .search-results {
    width: min(420px, calc(100vw - 32px));
    max-height: min(46dvh, 320px);
  }
  .search-wrap input,
  input, select, textarea { font-size: 16px; }

  .map-panel { position: relative; flex: 1; min-height: 0; }
  .map-panel .panel-head {
    position: absolute;
    z-index: 5;
    left: 8px;
    right: 8px;
    top: 8px;
    background: transparent;
    border: 0;
    padding: 0;
    pointer-events: none;
  }
  .map-panel .panel-head h1 { display: none; }
  .map-panel .map-add-hint {
    margin: 0 0 0 56px;
    max-width: calc(100% - 64px);
    pointer-events: none;
  }
  .map-panel .map-tools {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
    max-height: calc(100dvh - 180px);
    overflow-y: auto;
  }
  .map-panel .map-tools > * { pointer-events: auto; }
  .map-panel .btn-categories {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
    background: var(--bg-elev);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  }
  .map-panel .btn-categories span { display: none; }
  .map-panel .icon-btn,
  .map-panel #btnMap3d,
  .map-panel #btnNorth,
  .map-panel #btnMyLocation,
  .map-panel #btnFit,
  .map-panel #btnNewPlace {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 14px;
    background: var(--bg-elev);
    color: var(--text);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  }
  .cat-bar-panel { padding: 8px 8px 0; }
  .maplibregl-ctrl-top-right { top: 8px; right: 8px; }
  .maplibregl-popup { max-width: calc(100vw - 28px) !important; }

  .phone-dock {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(6px + env(safe-area-inset-bottom));
    z-index: 60;
    height: 40px;
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 3px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  }
  .phone-dock button {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 11px;
    min-height: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    touch-action: manipulation;
  }
  .phone-dock button span { display: none; }
  .phone-dock button svg { width: 20px; height: 20px; display: block; }
  .phone-dock button.is-active {
    color: var(--label, var(--accent));
    background: var(--accent-dim);
  }

  .place-drawer {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(86dvh, 100%);
    border-radius: 22px 22px 0 0;
    transform: translate3d(0, 110%, 0);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .place-drawer-root.is-open .place-drawer { transform: translate3d(0, 0, 0); }
  .place-lightbox { padding: 56px 12px 24px; }
}

.account-actions { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 14px; }
.account-panel { display: flex; flex-direction: column; gap: 10px; }
.account-panel p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.founder-on { color: var(--ok); font-weight: 700; }
.delete-warn {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
}
html.is-ad-free ins.adsbygoogle,
html.is-ad-free .adsbygoogle,
html.is-ad-free .go-ad,
html.is-ad-free iframe[id^="google_ads"],
html.is-ad-free iframe[src*="googlesyndication"] { display: none !important; }
