:root {
  --graphite: #1a1a1a;
  --taupe: #b09b87;
  --cream: #faf8f5;
  --white: #fcfcfc;
  --teal: #55ffe1;
  --burger: #c45c26;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  --sidebar-w: 320px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font-sans); background: var(--cream); color: var(--graphite); }
#app { display: flex; height: 100%; overflow: hidden; }

#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid rgba(176,155,135,0.3);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.25s ease;
}
.sidebar-header {
  position: relative;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(176,155,135,0.25);
  flex-shrink: 0;
}
.sidebar-header h1 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}
.sidebar-header .sub {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  font-weight: 600;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.45rem;
}
.play-link {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--taupe);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(176,155,135,0.5);
}
.play-link:hover { color: var(--graphite); }
#search {
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(176,155,135,0.4);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: var(--cream);
}
#search:focus { outline: none; border-color: var(--taupe); }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(176,155,135,0.2);
  flex-shrink: 0;
}
.host-chips {
  border-bottom: none;
  padding-bottom: 0.25rem;
}
.chip {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border-radius: 2px;
  border: 1px solid rgba(176,155,135,0.45);
  background: transparent;
  color: var(--graphite);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
}
.chip.active { background: var(--taupe); color: var(--white); border-color: var(--taupe); }
.chip.walk-chip.active { background: var(--graphite); border-color: var(--graphite); }
.chip.host-chip.active { background: var(--graphite); border-color: var(--graphite); }
#location-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.list-item {
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(176,155,135,0.12);
  transition: background 0.15s;
}
.list-item-main {
  min-width: 0;
}
.list-item-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.list-item-title {
  flex: 1 1 auto;
  min-width: 0;
}
.list-item-actions {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  margin-left: auto;
}
.list-mod-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid rgba(176, 155, 135, 0.35);
  border-radius: 999px;
  background: rgba(250, 248, 245, 0.95);
  color: #8a7b6c;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
}
.list-mod-btn svg {
  width: 0.85rem;
  height: 0.85rem;
  display: block;
  pointer-events: none;
}
.list-mod-btn:hover {
  color: #5c534b;
  border-color: rgba(176, 155, 135, 0.7);
  background: #fff;
}
.list-mod-approve.is-on,
.list-mod-approve:hover {
  background: rgba(85, 255, 225, 0.22);
  border-color: rgba(85, 255, 225, 0.75);
  color: #2a7a6c;
}
.list-mod-blacklist.is-on,
.list-mod-blacklist:hover {
  background: rgba(176, 155, 135, 0.28);
  border-color: rgba(176, 155, 135, 0.85);
  color: #6b5c4e;
}
.list-mod-remove:hover {
  background: rgba(26, 26, 26, 0.06);
  border-color: rgba(176, 155, 135, 0.75);
  color: #5c534b;
}
.list-item.is-approved {
  border-left: 3px solid rgba(85, 255, 225, 0.85);
}
.list-item.is-blacklisted {
  border-left: 3px solid rgba(176, 155, 135, 0.9);
}
.list-item.is-want {
  border-left: 3px solid rgba(176, 155, 135, 0.45);
}
.list-item .list-verdict-badge {
  display: inline-block;
  vertical-align: middle;
  box-sizing: border-box;
  margin: 0 0 0 0.25rem;
  padding: 0.08rem 0.32rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
  max-width: none;
  height: auto;
}
.list-item .list-verdict-badge.list-verdict-approved,
.list-item .list-verdict-badge.list-verdict-blacklisted,
.list-item .list-verdict-badge.list-verdict-want {
  font-size: 0.58rem;
  padding: 0.08rem 0.32rem;
  line-height: 1.15;
}
.list-item .list-verdict-badge.list-verdict-approved {
  background: rgba(85, 255, 225, 0.28);
  border-color: rgba(42, 122, 108, 0.35);
  color: #1f6b5e;
}
.list-item .list-verdict-badge.list-verdict-blacklisted {
  background: rgba(176, 155, 135, 0.32);
  border-color: rgba(107, 92, 78, 0.35);
  color: #5c4e42;
}
.list-item .list-verdict-badge.list-verdict-want {
  background: rgba(176, 155, 135, 0.18);
  border-color: rgba(138, 123, 108, 0.4);
  color: #6e5f50;
}
.list-item .list-verdict-badge.list-verdict-clearable {
  cursor: pointer;
}
.list-item .list-verdict-badge.list-verdict-clearable:hover {
  filter: brightness(0.97);
}
.list-item.is-removed {
  opacity: 0.72;
}
.list-item .list-removed-badge {
  background: rgba(26, 26, 26, 0.08);
  color: #6b5c4e;
}
.list-mod-restore {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.45rem;
  min-width: auto;
  width: auto;
  height: auto;
  border-radius: 6px;
  color: #2a7a6c;
}
.list-mod-btn.is-active {
  border-color: rgba(85, 255, 225, 0.65);
  background: rgba(85, 255, 225, 0.14);
}
.popup-verdict {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.popup-verdict.list-verdict-approved {
  background: rgba(85, 255, 225, 0.2);
  color: #2a7a6c;
}
.popup-verdict.list-verdict-blacklisted {
  background: rgba(176, 155, 135, 0.28);
  color: #6b5c4e;
}
.popup-verdict.list-verdict-want {
  background: rgba(176, 155, 135, 0.16);
  color: #8a7b6c;
}
.list-item:hover, .list-item.active { background: rgba(176,155,135,0.12); }
.list-item .name {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 600;
}
.list-item .name-link,
.popup-name-link {
  font-family: var(--font-serif);
  font-size: inherit;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(85, 255, 225, 0.55);
}
.list-item .name-link:hover,
.popup-name-link:hover {
  color: #0a8f7a;
  border-bottom-color: #55ffe1;
}
.list-item .addr { font-size: 0.72rem; color: #888; margin-top: 0.15rem; }
.list-item .meta-line { font-size: 0.68rem; color: #666; margin-top: 0.2rem; }
.list-item .badge {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-right: 0.35rem;
  font-weight: 600;
}
.list-item .shared-badge,
.popup-shared {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  background: rgba(85,255,225,0.35);
  border: 1px solid rgba(85,255,225,0.7);
  padding: 0.12rem 0.35rem;
  margin-left: 0.25rem;
  font-weight: 600;
  vertical-align: middle;
}
.list-item .contributor-badge,
.popup-inner .contributor-badge {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  background: rgba(176, 155, 135, 0.22);
  border: 1px solid rgba(176, 155, 135, 0.55);
  padding: 0.12rem 0.35rem;
  margin-left: 0.25rem;
  font-weight: 600;
  vertical-align: middle;
}
.contributor-chips {
  margin-top: 0.35rem;
}
.list-item .num {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--taupe);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 600;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(176,155,135,0.25);
  flex-shrink: 0;
}
#center-home {
  width: 100%;
  padding: 0.55rem;
  background: var(--graphite);
  color: var(--white);
  border: none;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
}
#center-home:hover { background: var(--taupe); color: var(--graphite); }

/* Home pin — circular Kevin & Peter (was 12G star) */
.gwn-home-marker-wrap {
  background: transparent !important;
  border: none !important;
}
.gwn-home-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid #fff;
  box-shadow:
    0 0 0 2px rgba(85, 255, 225, 0.85),
    0 2px 10px rgba(0, 0, 0, 0.35);
  background: #fff;
}
.gwn-home-marker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.app-version {
  margin-top: 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  text-align: center;
  font-weight: 600;
}

#map-wrap { flex: 1; position: relative; min-width: 0; }
#map { width: 100%; height: 100%; }
#toggle-sidebar {
  display: none;
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  bottom: auto;
  z-index: 1001;
  transform: translateX(-50%);
  appearance: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 7.5rem;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}
#toggle-sidebar .toggle-sidebar-chevron {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  display: block;
}

.close-sidebar {
  display: none;
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  appearance: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(176, 155, 135, 0.4);
  background: rgba(255, 252, 255, 0.55);
  color: var(--graphite);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}
.close-sidebar svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.leaflet-popup-content-wrapper {
  border-radius: 4px;
  font-family: var(--font-sans);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.popup-inner { min-width: 200px; max-width: 260px; }
.popup-inner h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.popup-cat {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.popup-addr { font-size: 0.78rem; color: #666; margin-bottom: 0.4rem; }
.popup-meta { font-size: 0.72rem; color: #555; margin-bottom: 0.4rem; }
.popup-desc { font-size: 0.8rem; line-height: 1.5; color: #444; margin-bottom: 0.5rem; }
.popup-page { font-size: 0.7rem; color: #999; font-style: italic; margin-bottom: 0.5rem; }
.popup-soon {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 0.35rem;
}
.popup-maps {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--taupe);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.popup-maps:hover { text-decoration: underline; }

.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.popup-btn {
  display: block;
  text-align: center;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  border: 1px solid rgba(26, 26, 26, 0.2);
  cursor: pointer;
  text-decoration: none;
  color: #1a1a1a;
  background: #fff;
}

.popup-btn.popup-interested {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.popup-btn.popup-propose {
  background: transparent;
}

.gwn-interest-sheet {
  position: fixed;
  inset: 0;
  /* Above sticky-bar (10040) + feedback chip so Save stays tappable */
  z-index: 10120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.gwn-interest-sheet[hidden] {
  display: none;
}

.gwn-interest-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.28);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
}

.gwn-interest-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  overflow: auto;
  border-radius: 14px 14px 0 0;
  padding: 1.25rem 1.1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  /* Glass — same family as List control */
  background: rgba(255, 252, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: none;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
}

.gwn-interest-panel .loc-search-wrap {
  z-index: 5;
}

.gwn-interest-panel .loc-suggest {
  z-index: 30;
  max-height: 11rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.theme-mike .gwn-interest-panel {
  background: rgba(8, 18, 32, 0.72);
  border-color: rgba(61, 139, 255, 0.35);
  color: #e8eef6;
  box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.35);
}

body.theme-mike .gwn-interest-panel .label,
body.theme-mike .gwn-interest-panel .gwn-interest-deck,
body.theme-mike .gwn-interest-panel .loc-match-hint {
  color: rgba(232, 238, 246, 0.85);
}

body.theme-mike .gwn-interest-actions .button-secondary {
  border-color: rgba(232, 238, 246, 0.35);
  color: #e8eef6;
}

body.theme-mike .gwn-interest-actions .submit-btn {
  background: #3d8bff;
  color: #07111f;
}

body.theme-mike .gwn-interest-panel .loc-suggest {
  background: rgba(12, 24, 40, 0.95);
  border-color: rgba(61, 139, 255, 0.35);
  color: #e8eef6;
}

.gwn-interest-panel,
.gwn-interest-panel h3,
.gwn-interest-panel .field,
.gwn-interest-panel .label,
.gwn-interest-panel .gwn-interest-deck,
.gwn-interest-panel .loc-match-hint,
.gwn-interest-panel .form-error,
.gwn-interest-panel .propose-ok,
.gwn-interest-panel input,
.gwn-interest-panel textarea,
.gwn-interest-panel select,
.gwn-interest-panel button,
.gwn-interest-panel .loc-suggest {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
    'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.gwn-interest-panel h3 {
  margin: 0 0 0.35rem;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
    'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.gwn-interest-panel .field {
  display: block;
  margin-top: 0.65rem;
}

.gwn-interest-panel input,
.gwn-interest-panel textarea {
  width: 100%;
  min-height: 2.75rem;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: inherit;
}

.gwn-interest-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.gwn-interest-actions .submit-btn {
  flex: 1;
  border: none;
  background: #1a1a1a;
  color: #fff;
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.gwn-interest-panel .label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.gwn-interest-panel .optional {
  font-weight: 400;
  opacity: 0.7;
}

.gwn-interest-panel .form-error {
  color: #b42318;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.gwn-interest-panel .propose-ok {
  color: #1a6b4a;
  font-weight: 500;
  margin-top: 0.5rem;
}

.gwn-interest-actions .button-secondary {
  border: 1px solid rgba(26, 26, 26, 0.25);
  background: transparent;
  color: #1a1a1a;
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font: inherit;
}

@media (max-width: 768px) {
  #sidebar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  #sidebar.open { transform: translateX(0); }
  #toggle-sidebar { display: inline-flex; }
  body.gwn-list-open #toggle-sidebar,
  #app:has(#sidebar.open) #toggle-sidebar {
    display: none;
  }
  body.gwn-list-open .close-sidebar,
  #app:has(#sidebar.open) .close-sidebar {
    display: inline-flex;
  }
  body.gwn-list-open .sidebar-header,
  #app:has(#sidebar.open) .sidebar-header {
    padding-right: 3.4rem;
  }
}

/* B8 host Add fab + cassette success on map sheets */
.gwn-add-fab {
  position: absolute;
  left: 50%;
  bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 900;
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  background: #1a1a1a;
  color: #faf8f5;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(20, 18, 16, 0.22);
}

.gwn-add-fab:hover,
.gwn-add-fab:focus-visible {
  background: #333;
}

body.theme-mike .gwn-add-fab {
  background: #3d8bff;
  color: #fff;
}

.gwn-interest-panel .propose-ok.is-cassette::before {
  content: "●";
  display: inline-block;
  margin-right: 0.35rem;
  color: #c0392b;
  font-size: 0.85em;
  vertical-align: 0.05em;
}
