
.external-place-result {
  min-height: 52px;
  padding: 10px 11px;
  color: var(--cgb-ink-900);
  background: var(--cgb-white);
  border: 0;
  border-bottom: 1px solid var(--cgb-neutral-200);
  border-radius: 0;
}

.external-place-result:hover,
.external-place-result:focus-visible {
  background: var(--cgb-navy-50);
}

.external-place-result strong,
.missing-location-link {
  color: var(--cgb-navy-950);
}

.map-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  gap: 7px;
}

.map-actions .secondary-button,
.map-actions .icon-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  color: var(--cgb-navy-950);
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(1, 1, 51, .16);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.map-actions .secondary-button {
  font-size: 0;
}

.map-actions .ui-icon {
  width: 19px;
  height: 19px;
}

.map-actions .secondary-button:hover,
.map-actions .icon-button:hover {
  color: var(--cgb-navy-950);
  background: var(--cgb-gold-400);
  border-color: var(--cgb-gold-500);
}

.maplibregl-ctrl-top-right {
  top: 146px;
  right: 12px;
}

.maplibregl-ctrl-group {
  border: 1px solid rgba(1, 1, 51, .12) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-sm) !important;
}

.maplibregl-ctrl-group button {
  width: 38px !important;
  height: 38px !important;
}

/* ---------- Shared controls ---------- */
.primary-button,
.secondary-button,
.icon-button,
.text-button,
.search-submit {
  font-weight: 800;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 0;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - var(--chamfer-sm)) 0, 100% var(--chamfer-sm), 100% 100%, var(--chamfer-sm) 100%, 0 calc(100% - var(--chamfer-sm)));
}

.primary-button {
  color: var(--cgb-white);
  background: var(--cgb-navy-950);
  border: 1px solid var(--cgb-navy-950);
  box-shadow: none;
}

.primary-button:hover:not(:disabled) {
  color: var(--cgb-navy-950);
  background: var(--cgb-gold-400);
  border-color: var(--cgb-gold-500);
  transform: translateY(-1px);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.icon-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:disabled {
  color: rgba(255, 255, 255, .64);
  background: var(--cgb-navy-700);
  border-color: var(--cgb-navy-700);
  box-shadow: none;
  opacity: .7;
}

.secondary-button {
  color: var(--cgb-navy-950);
  background: var(--cgb-white);
  border: 1px solid var(--cgb-neutral-300);
  box-shadow: none;
}

.secondary-button:hover {
  color: var(--cgb-navy-950);
  background: var(--cgb-gold-50);
  border-color: var(--cgb-gold-500);
}

.icon-button {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--cgb-navy-950);
  background: var(--cgb-white);
  border: 1px solid var(--cgb-neutral-300);
  border-radius: 50%;
  box-shadow: none;
  font-size: 1rem;
}

.icon-button:hover {
  color: var(--cgb-navy-950);
  background: var(--cgb-gold-50);
  border-color: var(--cgb-gold-500);
}

.text-button {
  color: var(--cgb-navy-900);
  background: transparent;
  border: 0;
  font-weight: 750;
  text-underline-offset: .18em;
}

.intent-button[aria-pressed="true"] {
  color: var(--cgb-navy-950);
  background: var(--cgb-gold-400);
  border-color: var(--cgb-gold-500);
}

.intent-button[aria-pressed="true"]:hover {
  background: #ffc636;
}

/* ---------- Marker system ---------- */
.cgb-marker {
  width: 48px;
  height: 56px;
  transform-origin: 50% 100%;
}

.marker-pin {
  left: 8px;
  top: 4px;
  width: 32px;
  height: 42px;
  background: var(--cgb-navy-900);
  border: 3px solid var(--cgb-navy-900);
  border-radius: 50% 50% 50% 0;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .94),
    0 6px 14px rgba(1, 1, 51, .28);
}

.marker-pin::after {
  left: 8px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--cgb-white);
  box-shadow: none;
}

.marker--cal-bar .marker-pin {
  background: var(--cgb-navy-900);
  border-color: var(--cgb-navy-900);
}

.marker--cal-bar .marker-pin::after {
  background: var(--cgb-white);
}

.marker--community-location .marker-pin {
  background: var(--cgb-white);
  border-color: var(--cgb-navy-950);
}

.marker--community-location .marker-pin::after {
  background: var(--cgb-navy-950);
}

.marker-star {
  position: absolute;
  left: 3px;
  top: 1px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--cgb-white);
  background: var(--cgb-gold-400);
  border: 3px solid var(--cgb-gold-400);
  border-radius: 50% 50% 50% 0;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .94),
    0 7px 16px rgba(1, 1, 51, .28);
  filter: none;
  -webkit-text-stroke: 0;
  font-size: 0;
  transform: rotate(-45deg);
}

.marker-star::before {
  content: "";
  position: absolute;
  inset: 7px;
  background: var(--cgb-navy-950);
  border-radius: 50%;
}

.marker-star::after {
  content: none;
}

.marker-star__icon {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.15;
  transform: rotate(45deg);
}

.marker-count {
  top: -7px;
  right: -29px;
  min-width: 45px;
  height: 22px;
  padding: 0 7px;
  color: var(--cgb-white);
  background: var(--cgb-navy-950);
  border: 2px solid var(--cgb-white);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  font-size: .6rem;
  font-weight: 850;
}

.cgb-marker:hover {
  transform: translateY(-2px) scale(1.04);
}

.cgb-marker.is-selected {
  z-index: 2;
  transform: translateY(-2px) scale(1.16);
  filter: drop-shadow(0 0 8px rgba(253, 181, 21, .72));
}

.cgb-marker:focus-visible {
  outline: 0;
  filter: drop-shadow(0 0 6px var(--cgb-gold-400));
}

.user-marker {
  width: 18px;
  height: 18px;
  background: #2d8cff;
  border: 4px solid var(--cgb-white);
  box-shadow: 0 0 0 3px rgba(45, 140, 255, .25), var(--shadow-sm);
}

/* ---------- Layered location tray ---------- */
.venue-tray {
  position: absolute;
  z-index: 34;
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  bottom: calc(var(--footer-height) + 9px);
  color: var(--cgb-ink-900);
  background: rgba(255, 255, 255, .99);
  border: 1px solid rgba(1, 1, 51, .1);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-sm);
  box-shadow: 0 13px 34px rgba(1, 1, 51, .2);
  backdrop-filter: blur(16px) saturate(115%);
  overflow: hidden;
}

.venue-tray::before {
  content: none;
  position: absolute;
  z-index: 4;
  top: 0;
  left: 42%;
  right: 42%;
  height: 3px;
  background: var(--cgb-gold-400);
}

.tray--peek {
  height: 108px;
}

.tray--selected {
  height: auto;
  max-height: var(--selected-tray-max-height);
}

.tray--full {
  height: min(71dvh, 650px);
}

.tray-handle {
  width: 100%;
  height: var(--tray-handle-height);
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
}

.tray-handle span {
  width: 32px;
  height: 3px;
  background: var(--cgb-neutral-300);
  border-radius: var(--radius-pill);
}

.tray-peek {
  padding: 0 13px 10px;
}

.tray-summary {
  width: 100%;
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 7px 8px;
  color: var(--cgb-ink-900);
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
}

.tray-summary:hover {
  background: var(--cgb-navy-50);
}

.tray-summary span:first-child {
  display: grid;
  gap: 4px;
}

.tray-summary strong {
  color: var(--cgb-navy-950);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -.015em;
}

.tray-summary small {
  color: var(--cgb-ink-500);
  font-size: var(--text-xs);
  line-height: 1.35;
}

.tray-summary > .ui-icon {
  color: var(--cgb-navy-900);
}

.tray-selected,
.tray-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.selected-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  padding: 3px 14px 14px;
}

.selected-card__header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.selected-card__header > div {
  min-width: 0;
}

.selected-card h2 {
  margin: 7px 0 4px;
  overflow: hidden;
  color: var(--cgb-navy-950);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5.8vw, 1.8rem);
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.04;
  text-overflow: ellipsis;
}

.venue-location,
.venue-description,
.preview-note {
  color: var(--cgb-ink-500);
}

.venue-location {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 600;
}

.venue-description {
  grid-column: 1;
  align-self: center;
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.42;
}

.bear-count {
  grid-column: 2;
  align-self: center;
  max-width: 105px;
  margin: 0;
  color: var(--cgb-navy-950);
  font-family: var(--font-condensed);
  font-size: .74rem;
  font-weight: 850;
  line-height: 1.15;
  text-align: right;
  text-transform: uppercase;
}

.venue-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.venue-badge {
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 0;
  font-family: var(--font-condensed);
  font-size: .57rem;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - .32rem) 0, 100% .32rem, 100% 100%, .32rem 100%, 0 calc(100% - .32rem));
}

.badge--party {
  color: var(--cgb-navy-950);
  background: var(--cgb-gold-400);
  border: 1px solid var(--cgb-gold-500);
}

.badge--cal {
  color: var(--cgb-white);
  background: var(--cgb-navy-900);
  border: 1px solid var(--cgb-navy-900);
}

.badge--community {
  color: var(--cgb-navy-950);
  background: var(--cgb-white);
  border: 1px solid var(--cgb-navy-950);
}

.party-module {
  display: grid;
  gap: 7px;
}

.selected-card > .party-module {
  grid-column: 1 / -1;
  margin: 1px 5px 0;
  padding: 13px 14px;
  color: var(--cgb-white);
  background: linear-gradient(135deg, var(--cgb-navy-950), var(--cgb-navy-900));
  border: 0;
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(0 0, calc(100% - var(--chamfer-md)) 0, 100% var(--chamfer-md), 100% 100%, var(--chamfer-md) 100%, 0 calc(100% - var(--chamfer-md)));
}
