@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap");

/* Global tokens and defaults */
:root {
  --bg: #f7f7f2;
  --ink: #111;
  --muted: #6b6b6b;
  --accent: #0f766e;
  --panel: #ffffff;
  --panel-glass: rgba(255, 255, 255, 0.75);
  --chip: #ededed;
  --card: #ffffff;
  --border: #e5e5e5;
  --topbar-height: 60px;
}

* {
  box-sizing: border-box;
}

html, body, #app {
  height: 100%;
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

/* Mobile viewport stability */
html {
  height: 100%;
}

body {
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
}

#app {
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
}

/* Moderator-only layout overrides */
body.mod-page .topbar,
body.mod-page .searchbar,
body.mod-page #map,
body.mod-page #recommendPanel,
body.mod-page #edgeReco,
body.mod-page #edgeUser,
body.mod-page #fabCreate {
  display: none !important;
}

body.mod-page #adminPanel {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  padding: 16px !important;
}

body.mod-page {
  background: #f4f5f2;
}

.mod-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

.mod-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.mod-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mod-logo {
  font-weight: 700;
  letter-spacing: 0.4px;
}

.mod-sub {
  font-size: 12px;
  color: var(--muted);
}

.mod-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mod-user {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f2ef;
  font-size: 12px;
  border: 1px solid var(--border);
}

.mod-btn {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
}

.mod-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.mod-btn.ghost {
  background: transparent;
}

.mod-btn.danger {
  background: #1c1c1c;
  color: #fff;
  border-color: transparent;
}

.mod-body {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 24px;
}

.mod-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-nav-btn {
  border: 1px solid transparent;
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
}

.mod-nav-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.mod-main {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
}

.mod-toolbar {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.mod-quick-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 18px 16px;
  border-bottom: 1px solid var(--border);
}

.mod-chip {
  border: 1px solid #d7ddd9;
  background: #f7faf8;
  color: #3f4d49;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.mod-chip.active {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.36);
  color: var(--accent);
}

.mod-search {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}

.mod-search input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.mod-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.mod-check input {
  margin-right: 6px;
}

.mod-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  padding: 18px;
  height: 100%;
}

.mod-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  max-height: 70vh;
  padding-right: 6px;
}

.mod-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fbfbfb;
  cursor: pointer;
}

.mod-item.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.1);
}

.mod-item.disabled {
  opacity: 0.6;
}

.mod-item.expired {
  background: #fffaf1;
}

.mod-item-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.mod-item-meta {
  font-size: 12px;
  color: var(--muted);
}

.mod-badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.mod-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f0f0;
}

.mod-badge.warn {
  background: #ffe6e6;
  color: #b42318;
}

.mod-badge.muted {
  background: #f0f0f0;
  color: #555;
}

.mod-badge.star {
  background: #fff4cc;
  color: #8a6400;
}

.mod-badge.ok {
  background: #e7f8ee;
  color: #117a37;
}

.mod-badge.expired {
  background: #fff2cc;
  color: #9a6700;
}

.mod-badges-detail {
  margin-top: 10px;
}

.mod-detail {
  border-left: 1px solid var(--border);
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.mod-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mod-detail-title {
  font-weight: 700;
}

.mod-detail-sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.mod-detail-sub.accent {
  color: #9a6700;
  font-weight: 600;
}

.mod-detail-grid {
  display: grid;
  gap: 12px;
}

.mod-detail-grid label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--muted);
  gap: 6px;
}

.mod-detail-grid input,
.mod-detail-grid textarea,
.mod-detail-grid select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.mod-detail-grid .full {
  grid-column: 1 / -1;
}

.mod-toggles {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.mod-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mod-reputation {
  background: #f8f8f6;
  border-radius: 14px;
  padding: 12px;
}

.mod-rep-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.mod-rep-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

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

.mod-rep-edit input {
  width: 90px;
}

.mod-detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mod-detail-actions .mod-btn {
  min-width: 96px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mod-detail-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.mod-empty,
.mod-hint {
  color: var(--muted);
  font-size: 13px;
}

.mod-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
}

.mod-modal.hidden {
  display: none;
}

.mod-modal-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  width: min(92vw, 360px);
  display: grid;
  gap: 10px;
}

.mod-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mod-toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: #111;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  z-index: 5000;
}

.mod-toast.ok {
  background: #0f766e;
}

.mod-toast.error {
  background: #b42318;
}

@media (max-width: 980px) {
  .mod-body {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .mod-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .mod-content {
    grid-template-columns: 1fr;
  }

  .mod-detail {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }
}

.hidden {
  display: none;
}

/* removed footer guide (use topbar link) */


/* Main application chrome */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.guide-link {
  font-size: 12px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

.premium-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(196, 138, 0, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at top left, rgba(255, 244, 184, 0.92), rgba(255, 255, 255, 0.98) 46%),
    linear-gradient(135deg, rgba(255, 248, 221, 0.98), rgba(255, 255, 255, 0.98));
  color: #7a5200;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(196, 138, 0, 0.14);
  overflow: hidden;
}

.premium-cta::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.56) 36%, transparent 70%);
  transform: translateX(-140%);
  animation: premium-sheen 3.4s ease-in-out infinite;
  pointer-events: none;
}

.premium-cta-star {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #f59e0b;
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.28);
  animation: premium-star-pop 1.9s ease-in-out infinite;
}

.premium-cta-star::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.32), transparent 68%);
  animation: premium-star-ring 2.2s ease-out infinite;
}

.premium-cta.active {
  border-color: rgba(217, 119, 6, 0.34);
  background:
    radial-gradient(circle at top left, rgba(255, 236, 167, 0.95), rgba(255, 255, 255, 0.98) 44%),
    linear-gradient(135deg, rgba(255, 245, 212, 0.98), rgba(255, 255, 255, 0.98));
  color: #8a5b00;
}

.premium-cta.loading {
  opacity: 0.8;
  cursor: progress;
}

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

@keyframes premium-star-pop {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(10deg) scale(1.12);
  }
}

@keyframes premium-star-ring {
  0% {
    transform: scale(0.65);
    opacity: 0.64;
  }
  100% {
    transform: scale(1.34);
    opacity: 0;
  }
}

@keyframes premium-sheen {
  0%, 72%, 100% {
    transform: translateX(-140%);
  }
  84% {
    transform: translateX(140%);
  }
}

.spacer {
  flex: 1;
}

.searchbar {
  display: grid;
  grid-template-columns: 24px 1fr 28px 32px;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  position: fixed;
  top: calc(var(--topbar-height) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  width: min(86vw, 420px);
}

.searchbar .search-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.04);
}

.searchbar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  min-width: 0;
  width: 100%;
  color: var(--ink);
}

.searchbar .search-cta {
  border: none;
  background: var(--accent);
  color: #fff;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.25);
}

.searchbar .locate-btn {
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
}

.searchbar .locate-btn.locating {
  animation: locate-spin 0.8s linear infinite;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
}

@keyframes locate-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (min-width: 960px) {
  .searchbar {
    top: 78px;
    width: min(60vw, 420px);
  }
  .searchbar input {
    font-size: 14px;
  }
}

.primary {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.2);
}

.primary.full {
  width: 100%;
}

.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

.close-pill {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.close-pill .chev {
  font-size: 16px;
  line-height: 1;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
}

.admin-menu {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f7f7f7;
  font-size: 12px;
  cursor: pointer;
}

.user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}



/* Map canvas */
#map {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  min-height: 0;
}

.scrim {
  position: fixed;
  inset: var(--topbar-height) 0 0 0;
  background: rgba(0, 0, 0, 0.08);
  z-index: 1000;
}

.scrim.hidden {
  display: none;
}


.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12000;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(300px, 88vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  margin: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 12001;
}

.modal-title {
  font-size: 14px;
  margin-bottom: 6px;
}

.modal-text {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.maplibregl-ctrl-attrib {
  font-size: 10px !important;
  opacity: 0.35;
  background: transparent !important;
  margin: 0 6px 6px 0;
}

.maplibregl-ctrl-attrib a {
  color: #666 !important;
}

/* Shared panel shell */
.panel {
  position: absolute;
  right: 16px;
  top: 76px;
  width: 380px;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  z-index: 11100;
  backdrop-filter: none;
  opacity: 1;
}

.panel.hidden {
  display: none;
}

/* Recommendation panel */
#recommendPanel.hidden {
  display: none;
}

.reco-panel {
  position: fixed;
  left: 10px;
  top: 32vh;
  width: 292px;
  background: var(--panel-glass) !important;
  border: 1px solid rgba(208, 214, 210, 0.92);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  z-index: 1001;
  max-height: 340px;
  overflow: auto;
  transform: translateX(-120%);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
}

.reco-panel.open {
  transform: translateX(0);
  opacity: 1;
}

.reco-panel.compact {
  transform: translateX(-90%);
  opacity: 0.3;
  pointer-events: none;
}

.reco-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 247, 0.86));
  border: 1px solid rgba(15, 118, 110, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  position: sticky;
  top: 6px;
  z-index: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.reco-toggle {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 999px;
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
  display: none;
}

.reco-panel.collapsed {
  transform: translateX(-120%);
  opacity: 0;
}

.reco-list {
  display: grid;
  gap: 10px;
}

.reco-item {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  background: #fff;
}

.reco-item.selected {
  border-color: rgba(15, 118, 110, 0.4);
  background: rgba(15, 118, 110, 0.05);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.reco-item.star {
  border-color: rgba(0, 0, 0, 0.08);
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.reco-item.star.selected {
  border-color: rgba(15, 118, 110, 0.4);
  background: rgba(15, 118, 110, 0.05);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.reco-title {
  font-size: 13px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reco-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.reco-share {
  margin-left: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  color: #111;
  font-size: 11px;
  padding: 4px 10px;
  min-width: 62px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.reco-share:active {
  transform: scale(0.98);
}

.share-btn.copied {
  background: rgba(22, 163, 74, 0.08);
  color: #0f5132;
  border-color: rgba(22, 163, 74, 0.25);
  animation: share-pop 0.25s ease;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.06);
}

@keyframes share-pop {
  0% { transform: scale(1); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.reco-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  white-space: nowrap;
}

.reco-badge.price {
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.25);
  color: #0f5132;
}

.reco-badge.event {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #1e3a8a;
}

.reco-badge.rep.pos {
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(22, 163, 74, 0.35);
  color: #0f5132;
}

.reco-badge.rep.neg {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.reco-badge.rep.zero {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #555;
}

@media (max-width: 760px) {
  .reco-panel {
    left: 0;
    top: 30vh;
    bottom: 90px;
    width: 78vw;
    max-height: 320px;
    border-radius: 0 16px 16px 0;
    background: var(--panel-glass) !important;
  }
  .reco-list {
    display: flex;
    gap: 8px;
    overflow-y: auto;
    flex-direction: column;
  }
  .reco-item {
    min-width: auto;
  }
  .panel.user {
    top: auto;
    bottom: 12px;
    height: auto;
    max-height: 40vh;
    width: auto;
    max-width: calc(100% - 24px);
    right: 12px;
    left: 12px;
    border-radius: 16px;
    background: var(--panel-glass) !important;
    backdrop-filter: blur(6px);
    transform: none !important;
    transition: none !important;
  }
  .panel.user.open {
    transform: none !important;
  }
  .my-list {
    max-height: 200px;
  }
}

@media (max-width: 760px) and (max-height: 740px) {
  /* Primary create action */
.fab-create {
    bottom: calc(74px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 420px) {
  .fab-create {
    width: 50px;
    height: 50px;
    bottom: calc(36px + env(safe-area-inset-bottom));
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .fab-create::after {
    width: 50px;
    height: 50px;
  }
}

#panelTitle {
  font-weight: 600;
}

#panel {
  background: #fff !important;
  opacity: 1 !important;
  z-index: 11120 !important;
}

#panelPrice {
  color: var(--accent);
}

#panelDesc {
  color: #111;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 12px;
  border-radius: 12px;
}

#panelAttract {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

#panelPhone {
  font-size: 12px;
}

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

/* Announcement content header. Dragging now uses a dedicated handle above it. */
.announce-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-drag-handle {
  width: 56px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.22);
  margin: 4px auto 10px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.panel-drag-handle.dragging {
  cursor: grabbing;
}

.announce-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.announce-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  padding-right: 64px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announce-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.share-pill {
  align-self: flex-start;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  color: #111;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  height: 36px;
  min-width: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, background 0.15s ease, border 0.15s ease;
}

.share-pill:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.share-pill:active {
  transform: translateY(0);
}

.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fafafa;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge.price {
  border-color: rgba(15, 118, 110, 0.3);
  color: var(--accent);
  background: rgba(15, 118, 110, 0.08);
}

.badge.kind {
  color: #111;
  background: rgba(0, 0, 0, 0.04);
}

.badge.star-pill {
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(22, 163, 74, 0.35);
  color: #0f5132;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.star-banner {
  font-size: 11px;
  color: #0f5132;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: 8px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}
.announce-desc {
  margin-top: 6px;
}

.announce-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.rep-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  height: 36px;
  line-height: 1;
}

.rep-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  cursor: pointer;
  line-height: 1;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.rep-btn.rep-up {
  color: #0f5132;
}

.rep-btn.rep-down {
  color: #b91c1c;
}

#repScore.rep-neg {
  color: #b91c1c;
}

#repScore.rep-pos {
  color: #0f5132;
}

#repScore.rep-zero {
  color: var(--muted);
}

.meta-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.infinity {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.announce-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.announce-actions .ghost {
  flex: 1;
}

.chat-box {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.chat-head {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.chat-sub {
  font-size: 11px;
  color: var(--muted);
}

.chat-list {
  max-height: 180px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.chat-msg {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f4f4f4;
  color: #111;
}

.chat-msg.me {
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.25);
}

.chat-msg {
  word-break: break-word;
}

.chat-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-text {
  font-size: 12px;
}

.chat-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f5132;
  border: 1px solid rgba(15, 118, 110, 0.3);
}

.chat-time {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}

.chat-msg.hidden-msg {
  opacity: 0.78;
  background: rgba(196, 155, 104, 0.08);
}

.chat-msg.hidden-msg .chat-text {
  color: #7a6550;
  font-style: italic;
}


.chat-hide-btn {
  margin-top: 6px;
  align-self: flex-end;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
}

.chat-hide-btn:hover {
  color: #111;
}

.chat-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.chat-input {
  position: relative;
  display: block;
}

.chat-input input {
  border: 1px solid var(--border);
  background: #fff;
  width: 100%;
  padding: 8px 40px 8px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.chat-input .primary {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: #8c8c8c;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  z-index: 1;
  cursor: pointer;
}

.chat-input .primary::before {
  content: "➤";
  font-size: 12px;
  line-height: 1;
}

.chat-input.has-text .primary {
  color: #0f766e;
}

.chat-hint {
  font-size: 11px;
  color: var(--muted);
}

.panel.create {
  left: 16px;
  right: auto;
  width: 300px;
  background: #fff;
  backdrop-filter: none;
  border: 1px solid #dcdcdc;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
}

.panel.create .panel-header {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel.user {
  top: 60px;
  right: 0;
  left: auto;
  height: calc(100% - 60px);
  width: 380px;
  max-width: 92vw;
  border-radius: 20px 0 0 20px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 249, 0.98));
  backdrop-filter: none;
  border: 1px solid rgba(214, 219, 215, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.panel.user.open {
  transform: translateX(0);
}

.panel.user.compact {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}

.panel.user.login-only {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(320px, 90vw) !important;
  height: auto !important;
  max-height: none !important;
  border-radius: 16px !important;
  transform: translate(-50%, -50%) !important;
  z-index: 11050 !important;
}

@media (max-width: 760px) {
  .panel.user.login-only {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: min(320px, 90vw) !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 16px !important;
    transform: translate(-50%, -50%) !important;
    z-index: 11050 !important;
  }
}

.panel.admin {
  top: var(--topbar-height);
  right: 0;
  left: auto;
  height: calc(100% - var(--topbar-height));
  width: 420px;
  max-width: 92vw;
  border-radius: 16px 0 0 16px;
  overflow: auto;
  padding-top: 44px;
  padding-left: 14px;
  padding-right: 14px;
}



.login-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 10px 12px;
  background: transparent !important;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  border: none;
  box-shadow: none;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(248, 250, 249, 0.88);
  border: 1px solid rgba(15, 118, 110, 0.08);
}

.auth-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #5b655f;
  border-radius: 11px;
  padding: 9px 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.98);
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.16);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.08);
}

.auth-view {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 2px;
}

.auth-view.hidden {
  display: none;
}

.auth-helper {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  background: rgba(15, 118, 110, 0.05);
  border: 1px solid rgba(15, 118, 110, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
}

.verify-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(15, 118, 110, 0.08), transparent 32%),
    linear-gradient(180deg, #f8faf9, #eef3f0);
}

.verify-card {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 118, 110, 0.08);
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.verify-brand {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
  margin-bottom: 8px;
}

.verify-title {
  margin: 0 0 10px;
  font-size: 24px;
}

.verify-text {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.verify-link {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.login-card.hidden {
  display: none;
}

.login-msg {
  font-size: 12px;
  color: var(--muted);
  min-height: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-msg a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.login-msg-actions {
  display: flex;
  align-items: center;
}

.login-msg-action {
  appearance: none;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background: rgba(15, 118, 110, 0.06);
  color: #0f766e;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.login-msg-action:hover {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.22);
}

.login-msg-action:disabled {
  opacity: 0.65;
  cursor: wait;
}

.my-section {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  background: transparent;
}

.my-section.hidden {
  display: none;
}

.empty {
  color: var(--muted);
  font-size: 12px;
  padding: 8px 0;
}

.my-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #111;
  margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 247, 0.88));
  border: 1px solid rgba(15, 118, 110, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  position: sticky;
  top: 6px;
  z-index: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.login-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: inherit;
}

.phone-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
}

.phone-prefix {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.phone-field input {
  border: none;
  padding-left: 0;
  padding-right: 0;
}

.phone-field input:focus {
  outline: none;
}

.phone-field:focus-within {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.panel-section {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.my-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 320px;
}

.admin-section {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}

.admin-create {
  display: grid;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.admin-create input {
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.admin-create-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.admin-head {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.admin-tab {
  flex: 1;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.admin-tab.active {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.35);
  color: #0f5132;
}

.admin-section-block {
  display: grid;
  gap: 8px;
}

.admin-section-block.hidden {
  display: none;
}

.admin-create,
.admin-search {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}

.admin-create {
  margin-bottom: 8px;
}

.admin-search {
  margin-bottom: 8px;
}

.admin-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-filter {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-search input {
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.admin-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.admin-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.admin-item .admin-summary {
  cursor: pointer;
}

.admin-item.open {
  border-color: rgba(0, 0, 0, 0.15);
  background: #fbfbfb;
}

.admin-item.selected {
  border-color: rgba(15, 118, 110, 0.4);
  background: rgba(15, 118, 110, 0.05);
}

.admin-item .meta {
  font-size: 11px;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  gap: 6px;
}

.admin-actions .mini {
  padding: 6px 8px;
}

.admin-edit {
  display: grid;
  gap: 6px;
}

.admin-edit.hidden {
  display: none;
}

.admin-edit input,
.admin-edit textarea,
.admin-edit select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: inherit;
}

.my-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 10px;
  font-size: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfbfa);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.my-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.07);
}

.my-item.selected {
  border-color: rgba(15, 118, 110, 0.4);
  background: rgba(15, 118, 110, 0.05);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.icon-x {
  height: 26px;
  min-width: 26px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  color: #111;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.icon-x:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.my-item .title {
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

.my-item .title-text {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-item .message-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.01em;
  padding: 1px 0;
  border: none;
  background: transparent;
}

.my-item .message-status.has-unread {
  color: #16a34a;
}

.my-item .message-status.all-read {
  color: #98a29d;
}

.my-item .message-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.my-item .message-status.has-unread .message-dot {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}

.my-item .message-status.all-read .message-dot {
  background: #c7ceca;
}

.my-item .message-count {
  min-width: 1ch;
  line-height: 1;
}

.my-item small {
  color: var(--muted);
  font-size: 11px;
}

.my-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.my-badge {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.my-badge.attractivity {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.08);
}

.mini {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #111;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}

.mini.copied {
  background: #111;
  color: #fff;
  border-color: #111;
}

.mini.star {
  background: #fff;
  border-color: #e5e5e5;
  color: #b45309;
  font-size: 15px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.mini.star.filled {
  border-color: #e5e5e5;
  background: rgba(245, 158, 11, 0.22);
  color: #f59e0b;
  box-shadow: none;
}

.mini.share {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.12);
  color: #0f5132;
}


.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}

.mini {
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.mini:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.mini.star {
  border-color: #e5e5e5;
  background: #fff;
  color: #b45309;
}

.mini.share {
  border-color: #e5e5e5;
  background: #fff;
  color: #111;
}

.my-item .share-btn {
  margin-left: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  color: #111;
  font-size: 11px;
  padding: 4px 10px;
  min-width: 62px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.my-item .share-btn:active {
  transform: scale(0.98);
}


#createForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#createForm input,
#createForm textarea,
#createForm select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  background: #fff;
}

#createForm input:disabled {
  background: #f3f3f3;
  color: #888;
}

#addressField {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #555;
}

.row {
  display: flex;
  gap: 8px;
}

.row input,
.row select,
.row .kind-toggle {
  flex: 1;
}

.kind-toggle {
  display: flex;
  gap: 6px;
}

.kind-chip {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.kind-chip.active {
  background: rgba(15, 118, 110, 0.14);
  border-color: rgba(15, 118, 110, 0.45);
  color: #0f5132;
}

#createForm textarea {
  resize: vertical;
  min-height: 84px;
}

.pulse-marker {
  width: var(--mark-size, 12px);
  height: var(--mark-size, 12px);
  position: relative;
}

.topbar #logoutBtn {
  margin-left: 8px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
}


.pulse-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--mark-size, 12px);
  height: var(--mark-size, 12px);
  transform: translate(-50%, -50%);
  background: #16a34a;
  border: 2px solid #166534;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(22, 163, 74, 0.9);
  animation: dot-breathe 1.8s ease-in-out infinite;
}

.pulse-marker::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--mark-size, 12px);
  height: var(--mark-size, 12px);
  border-radius: 50%;
  border: 2px solid rgba(22, 163, 74, 0.5);
  animation: pulse 1.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes dot-breathe {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.12);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.cluster-marker {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  background: #111;
  color: #fff;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cluster-marker-single {
  background: rgba(17, 17, 17, 0.92);
}

.spider-tooltip {
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 4px 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  font-size: 12px;
  font-weight: 600;
  pointer-events: auto;
  white-space: nowrap;
  opacity: 0.7;
  transition: opacity 0.15s ease;
  cursor: pointer;
}

.map-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


.draft-marker-root {
  pointer-events: none;
}

.draft-marker {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #111;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.32), 0 6px 14px rgba(0, 0, 0, 0.18);
}

.map-anchor {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.map-anchor.dot {
  background: #16a34a;
  border: 2px solid #166534;
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.85);
  color: transparent;
}

.map-anchor.star {
  width: 26px;
  height: 26px;
  color: #f4b000;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.95), rgba(255, 249, 219, 0.72) 58%, rgba(255, 244, 200, 0.22) 100%);
  border: 1px solid rgba(244, 176, 0, 0.08);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.72),
    0 6px 14px rgba(244, 176, 0, 0.12),
    0 0 14px rgba(255, 208, 74, 0.18);
  font-size: 19px;
  line-height: 1;
  text-shadow:
    0 1px 1px rgba(146, 64, 14, 0.12),
    0 0 6px rgba(255, 205, 96, 0.22);
  animation: star-anchor-float 1.9s ease-in-out infinite;
  position: relative;
}

.map-anchor.star::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 2px solid rgba(255, 208, 74, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  animation: star-anchor-pulse 1.9s ease-out infinite;
  pointer-events: none;
}

/* Map markers */
.label-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e6e6e6;
  border-radius: 16px 16px 16px 8px;
  padding: 6px 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  max-width: 220px;
  opacity: 0.85;
  overflow: hidden;
  transform: translate(0, 0);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.label-marker::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 11px;
  height: 11px;
  background: inherit;
  border-left: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  transform: translateY(-50%) rotate(45deg);
  border-bottom-left-radius: 3px;
}

.label-marker.mini {
  padding: 4px 8px;
  max-width: 182px;
  min-height: 28px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.label-marker.star {
  border-color: rgba(245, 158, 11, 0.24);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.12);
  background: rgba(255, 255, 255, 0.98);
  opacity: 1;
}

.label-marker.star::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  border: 2px solid rgba(245, 158, 11, 0.38);
  animation: star-ring 1.6s ease-out infinite;
  pointer-events: none;
}

.label-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: #111;
  max-width: 118px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.label-rep {
  font-size: 10px;
  color: var(--accent);
  background: rgba(15, 118, 110, 0.08);
  border-radius: 999px;
  padding: 2px 5px;
  white-space: nowrap;
}

.label-star {
  font-size: 10px;
  font-weight: 700;
  color: #92400e;
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  padding: 2px 6px;
  white-space: nowrap;
}

.label-marker.rep-neg .label-rep {
  background: rgba(239, 68, 68, 0.16);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.35);
}

.label-sub {
  font-size: 10px;
  color: var(--accent);
  background: rgba(15, 118, 110, 0.08);
  border-radius: 999px;
  padding: 2px 5px;
  white-space: nowrap;
}

.dot-marker {
  width: var(--mark-size, 12px);
  height: var(--mark-size, 12px);
  border-radius: 50%;
  background: #16a34a;
  border: 2px solid #166534;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
  animation: none;
}

.dot-marker.low {
  width: 9px;
  height: 9px;
  opacity: 0.5;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
}

.dot-marker.star {
  opacity: 1;
}

.label-marker.low {
  opacity: 0.6;
}

.label-marker.star.low {
  opacity: 0.9;
}

.pulse-marker.star .pulse-dot {
  background: #f8fafc !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45) !important;
}

.pulse-marker.star::after {
  border-color: rgba(245, 158, 11, 0.45) !important;
}

.star-pulse {
  width: var(--mark-size, 12px);
  height: var(--mark-size, 12px);
  position: relative;
}

.star-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(245, 158, 11, 0.55);
  animation: star-ring-static 1.6s ease-out infinite;
}

.star-pulse .star-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: calc(var(--mark-size, 12px) * 1.3);
  color: #f59e0b;
  text-shadow:
    0 0 1px rgba(0, 0, 0, 0.45),
    0 0 4px rgba(0, 0, 0, 0.35),
    0 0 10px rgba(245, 158, 11, 0.55);
  animation: dot-breathe 1.8s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 1px 4px;
  line-height: 1;
}

@keyframes star-ring-static {
  0% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.2;
  }
}

@keyframes star-ring {
  0% {
    transform: scale(0.85);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes star-anchor-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-1px) scale(1.06);
  }
}

@keyframes star-anchor-pulse {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.42);
    opacity: 0;
  }
}

@keyframes star-halo {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}


@media (max-width: 760px) {
  :root {
    --topbar-height: calc(60px + env(safe-area-inset-top));
  }

  .topbar {
    align-items: flex-end;
    padding: env(safe-area-inset-top) 12px 8px;
  }

  .premium-cta {
    padding: 7px 10px;
    gap: 6px;
    font-size: 11px;
  }

  .premium-cta-star {
    width: 16px;
    height: 16px;
  }

  .searchbar input,
  .login-card input,
  .phone-field input,
  #createForm input,
  #createForm textarea,
  .chat-input input {
    font-size: 16px !important;
  }

  .chat-input input {
    padding-right: 12px;
  }

  .chat-input .primary {
    position: static;
    transform: none;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: rgba(15, 118, 110, 0.08);
    color: rgba(17, 17, 17, 0.72);
    box-shadow: none;
  }

  .chat-input .primary::before {
    font-size: 15px;
  }

  .chat-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
  }

  .phone-prefix {
    font-size: 14px;
  }

  .topbar #openCreate {
    display: none;
  }

  #map {
    top: var(--topbar-height);
    height: auto;
  }

  .panel,
  .panel.create {
    position: fixed;
    left: 12px;
    right: 12px;
    width: auto;
  }
  #panel {
    width: auto !important;
    max-width: calc(100% - 24px);
  }

  .panel.user {
    top: 30vh;
    bottom: auto;
    height: 320px;
    width: 78vw;
    max-width: 78vw;
    right: 0;
    left: auto;
    border-radius: 16px 0 0 16px;
    background: #fff;
    backdrop-filter: none;
  }

  .my-list {
    max-height: 240px;
  }

  .chat-box {
    margin-top: 10px;
  }

  .chat-list {
    max-height: 140px;
  }

  .chat-input {
    grid-template-columns: 1fr;
  }

  .chat-input .primary {
    width: 100%;
  }
}

.fab-create {
  position: fixed;
  left: 50%;
  bottom: calc(clamp(52px, 8dvh, 68px) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: clamp(46px, 10vw, 54px);
  height: clamp(46px, 10vw, 54px);
  border-radius: 999px;
  border: none;
  background: rgba(15, 118, 110, 0.9);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.22);
  cursor: pointer;
  z-index: 1008;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fab-create.behind {
  z-index: 900;
  opacity: 0.4;
  pointer-events: none;
}

.fab-create::after {
  content: "";
  position: absolute;
  width: clamp(46px, 10vw, 54px);
  height: clamp(46px, 10vw, 54px);
  border-radius: 50%;
  border: 2px solid rgba(15, 118, 110, 0.28);
  animation: fab-pulse 1.6s ease-out infinite;
}

@keyframes fab-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
.panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f7f7f7;
  color: #111;
  cursor: pointer;
  line-height: 1;
}

.panel-flag {
  position: absolute;
  top: 10px;
  right: 44px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: #fff;
  color: #dc2626;
  cursor: pointer;
  line-height: 1;
  font-size: 12px;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.15s ease, border 0.15s ease;
}

.panel-flag:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.55);
  transform: translateY(-1px);
}

.panel.star {
  border: 1px solid rgba(15, 118, 110, 0.25);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.15);
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.06), #fff 45%);
}

.panel.star .announce-title {
  text-shadow: 0 0 10px rgba(22, 163, 74, 0.2);
}

.marker-highlight .dot-marker,
.marker-highlight .star-pulse,
.marker-highlight .label-marker {
  box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.18), 0 0 0 2px rgba(15, 118, 110, 0.35);
  border-radius: 999px;
  transition: box-shadow 0.3s ease;
}

.marker-hover .label-marker {
  border-color: rgba(22, 163, 74, 0.5);
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.16), 0 0 0 2px rgba(22, 163, 74, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.marker-hover .label-marker::before {
  border-left-color: rgba(22, 163, 74, 0.35);
  border-bottom-color: rgba(22, 163, 74, 0.35);
}

.marker-hover .map-anchor.dot {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14), 0 0 14px rgba(22, 163, 74, 0.92);
}

.marker-hover .map-anchor.star {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12), 0 6px 14px rgba(22, 163, 74, 0.14);
}
/* Source buttons stay hidden; MapLibre controls proxy their actions. */
#edgeReco,
#edgeUser {
  display: none !important;
}

/* Custom MapLibre edge controls */
.gopop-edge-control-wrap {
  margin: 0 !important;
  pointer-events: auto !important;
}

.maplibregl-ctrl-top-left,
.maplibregl-ctrl-top-right {
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.gopop-edge-control {
  width: clamp(16px, 3vw, 20px);
  height: clamp(78px, 14vw, 96px);
  border: 1px solid rgba(15, 118, 110, 0.28);
  background: linear-gradient(180deg, rgba(21, 128, 61, 0.96), rgba(15, 118, 110, 0.88));
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  pointer-events: auto;
}

.gopop-edge-control.left {
  border-radius: 0 14px 14px 0;
}

.gopop-edge-control.right {
  border-radius: 14px 0 0 14px;
}

.gopop-edge-control:hover {
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.24);
}

.gopop-edge-control::before {
  content: "";
  width: 3px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

@media (max-width: 760px) {
  .gopop-edge-control {
    width: 18px;
    height: 78px;
  }
}

@media (max-width: 420px) {
  .gopop-edge-control {
    height: 70px;
  }
}
