:root{ --lr-accent:#ea992e; }

/* Compact filters */
.lr-map-wrap { position: relative; display: grid; gap: 10px; }
#lr-map-controls { padding: 8px 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
.lr-filters-compact { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px 14px; justify-content: space-between; }

/* Segmented rating control */
.lr-segment { display: inline-flex; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 9999px; overflow: hidden; }
.lr-segment button {
  border: 0; background: transparent; padding: 6px 10px; font-size: 13px; cursor: pointer; color: #374151;
}
.lr-segment button.active { background: var(--lr-accent); color: #111; }
.lr-segment button:focus { outline: none; }

/* Cuisine dropdown */
.lr-cuisine-dropdown { position: relative; flex: 0 0 auto; margin-left: auto; }
.lr-cuisine-btn { padding: 8px 12px; border: 1px solid var(--lr-accent); background: #fff; border-radius: 12px; font-size: 13px; cursor: pointer; box-shadow: 0 0 0 2px rgba(234,153,46,0.1);}
.lr-count { background: var(--lr-accent); color: #111; border-radius: 9999px; padding: 0 8px; margin-left: 8px; font-size: 12px; }

.lr-cui-search { width: 100%; border: 1px solid var(--lr-accent); border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; box-shadow: 0 0 0 2px rgba(234,153,46,0.08);}
.lr-cui-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.lr-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: #fff7ec; border: 1px solid rgba(234,153,46,0.4); border-radius: 9999px; font-size: 12px; white-space: nowrap; }
.lr-chip input { accent-color: #111827; }
.lr-cui-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.lr-cui-actions button { flex: 1; padding: 8px 10px; border: 1px solid var(--lr-accent); border-radius: 10px; background: #fff; cursor: pointer; }
.lr-cui-actions button:hover { background: #fff3e6; }

/* Pins */
/* .lr-pin-wrap { position: relative; }  -- removed: breaks Leaflet absolute positioning */
.leaflet-pane .leaflet-marker-icon.lr-pin-wrap { position: absolute !important; }
.lr-pin { width:24px; height:24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); position: relative; box-shadow: 0 0 0 2px rgba(0,0,0,0.15); }
.lr-pin-dot { position:absolute; width:8px; height:8px; background:#fff; border-radius:50%; top:8px; left:8px; transform: rotate(45deg); }

/* Card refined */
.leaflet-popup-content { margin: 0; }
.lr-card {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  min-width: 260px; max-width: 300px; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.lr-card-image { position: relative; width: 100%; padding-top: 70%; background: #f6f6f6; overflow: hidden; }
.lr-card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lr-card-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.lr-card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lr-card-title { font-size: 16px; font-weight: 700; line-height: 1.2; color: #111827; }
.lr-stars { color: var(--lr-accent); font-size: 14px; letter-spacing: .5px; white-space: nowrap; }
.lr-badge-year-removed { background: #eef2ff; color: #3730a3; border: 1px solid #e0e7ff; border-radius: 8px; padding: 2px 6px; font-size: 12px; }
.lr-card-row { font-size: 13px; line-height: 1.45; color: #374151; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lr-label { color: #6b7280; white-space: nowrap; }
.lr-value { color: #111827; }
.lr-badge { display: inline-block; padding: 2px 8px; font-size: 12px; line-height: 1.6; background: #f3f4f6; color: #111827; border-radius: 9999px; border: 1px solid #e5e7eb; }
.lr-badge-more { background: var(--lr-accent); color: #111; border-color: var(--lr-accent); }
.leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; }
.leaflet-popup-tip { display: none; }

@media (max-width: 600px){
  
  .lr-cui-list { grid-template-columns: 1fr; }
}

.lr-cuisine-btn{ white-space: nowrap; }


@media (max-width: 640px){
  /* Keep filters in one row; allow rating to scroll horizontally if too tight */
  .lr-filters-compact { flex-wrap: nowrap; }
  #lr-rating-segment { max-width: 70vw; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .lr-segment { white-space: nowrap; }
  .lr-cuisine-dropdown { flex: 0 0 auto; margin-left: 8px; }
  .lr-cuisine-btn { padding: 8px 10px; }

  /* Cuisine panel as an overlay modal within viewport */
  
  .lr-cui-list { grid-template-columns: 1fr; }
}



/* === Custom patch: full-width Cuisine filter + mobile responsiveness === */
#lr-map-controls { width: 100%; box-sizing: border-box; }

.lr-filters-compact { flex-wrap: wrap; }

/* Make the Cuisine dropdown take full row width */
.lr-cuisine-dropdown { 
  position: relative; 
  flex: 1 1 100%; 
  width: 100%; 
  margin-left: 0; 
}

.lr-cuisine-btn { 
  width: 100%; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  box-sizing: border-box; 
}

/* Ensure panel spans the container width and stays within viewport */


/* Mobile: use near-full-screen sheet for easier tapping */
@media (max-width: 768px) {
  .lr-filters-compact { gap: 8px; }
  
  .lr-cui-list { grid-template-columns: 1fr 1fr; }
  .lr-chip { font-size: 14px; padding: 10px 12px; }
  .lr-cui-actions { position: sticky; bottom: 0; background: #fff; padding-top: 8px; }
}
/* === End custom patch === */


/* === Patch v2: refine mobile cuisine panel + full-width rating === */

/* Make rating (segmented control) full-width and on its own row */
.lr-segment {
  width: 100%;
  box-sizing: border-box;
}
/* When inside compact filter row, let it occupy a full row */
.lr-filters-compact .lr-segment {
  flex: 1 1 100%;
}

/* Mobile: show cuisine panel as dropdown with margins (not full-screen) */
@media (max-width: 768px) {
  
}
/* === End Patch v2 === */


/* === Patch v3: rating left, cuisine right on same row; mobile cuisine list single column === */

/* Force filters row alignment */
.lr-filters-compact {
  flex-wrap: nowrap;
  justify-content: space-between;
}
.lr-filters-compact .lr-segment {
  flex: 0 1 auto;
}
.lr-filters-compact .lr-cuisine-dropdown {
  flex: 0 1 auto;
  margin-left: auto;
}

/* Mobile: cuisine list single column */
@media (max-width: 768px) {
  .lr-cui-list {
    grid-template-columns: 1fr !important;
  }
}
/* === End Patch v3 === */


/* === Patch v3: desktop same-row layout (rating left, cuisine right) + mobile one-column cuisine === */

/* Default (mobile-first): allow wrapping so controls stack nicely */
.lr-filters-compact { flex-wrap: wrap; }

/* Rating control base */
.lr-segment {
  width: auto;              /* not forced full width anymore */
  box-sizing: border-box;
  flex: 0 0 auto;
  order: 10;                /* rating first */
}

/* Cuisine dropdown base */
.lr-cuisine-dropdown {
  flex: 0 1 auto;
  margin-left: auto;        /* push to the right when space allows */
  order: 20;                /* cuisine second */
  width: auto;
}

/* Desktop and larger tablets: keep everything on one line */
@media (min-width: 769px) {
  .lr-filters-compact { flex-wrap: nowrap; }
  .lr-segment { flex: 0 0 auto; }
  .lr-cuisine-dropdown { flex: 0 0 auto; }
}

/* Mobile cuisine panel list: one column */
@media (max-width: 768px) {
  .lr-cui-list {
    display: grid;
    grid-template-columns: 1fr; /* single column */
    gap: 10px;
  }
}
/* === End Patch v3 === */


/* === Patch v4: filters as two separate centered full-width rows (buttons only) === */
#lr-map-controls { width: 100%; box-sizing: border-box; }

/* Stack controls into two rows across all breakpoints */
.lr-filters-compact {
  display: flex;
  flex-wrap: wrap;            /* allow controls to wrap to next line */
  align-items: center;
  justify-content: center;    /* center content horizontally */
  gap: 12px;
}

/* Rating row: occupy full row */
.lr-filters-compact .lr-segment {
  flex: 1 1 100%;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
}

/* Cuisine row: occupy full row and align center */
.lr-filters-compact .lr-cuisine-dropdown {
  flex: 1 1 100%;
  width: 100%;
  margin-left: 0;             /* ensure not pushed right */
}
.lr-filters-compact .lr-cuisine-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;    /* center the label & content */
  box-sizing: border-box;
}

/* Cuisine panel stays constrained to container width */


/* Mobile cuisine list stays one column as requested earlier */
@media (max-width: 768px) {
  .lr-cui-list { grid-template-columns: 1fr; }
}
/* === End Patch v4 === */


#lr-rating-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
#lr-rating-legend .lr-legend-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
}
#lr-rating-legend .lr-legend-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: center;
}
#lr-rating-legend .lr-legend-item {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  white-space: nowrap;
}
#lr-rating-legend .lr-legend-item i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}


.lr-map-wrap { width: 100%; }
#lr-map-controls { width: 100%; box-sizing: border-box; }
.lr-filters-compact { width: 100%; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; }
.lr-segment { flex: 1 1 auto; }
.lr-cuisine-dropdown { flex: 1 1 auto; }

#lr-rating-legend { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; }
#lr-rating-legend .lr-legend-title { font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .02em; }
#lr-rating-legend .lr-legend-scale { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; }
#lr-rating-legend .lr-legend-item { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; white-space: nowrap; }
#lr-rating-legend .lr-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
#lr-rating-legend .lr-star { font-size: 13px; line-height: 1; }

.lr-segment button { font-size: 13px; line-height: 1; padding: 6px 10px; }
.lr-segment button .lr-star { font-size: 13px; line-height: 1; }



@media (max-width: 768px) {
  .lr-filters-compact { flex-direction: column; align-items: stretch; }
  .lr-segment, .lr-cuisine-dropdown { width: 100%; }
  .lr-cui-list { grid-template-columns: 1fr; }
}


.lr-map-wrap { width: 100%; }
#lr-map-controls {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 10px 12px;
}
.lr-filters-compact {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: stretch;
  justify-content: space-between;
}
.lr-pill {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  padding: 4px;
}
#lr-rating-segment {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
}
.lr-segment {
  flex: 1 1 auto;
  display: inline-flex;
}
.lr-segment button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  color: #374151;
  border-radius: 9999px;
}
.lr-segment button.active { background: var(--lr-accent); color: #111; }
.lr-cuisine-dropdown { flex: 1 1 auto; display: flex; align-items: stretch; }

.lr-cuisine-button:focus { outline: none; box-shadow: 0 0 0 2px rgba(234,153,46,.2); }


#lr-rating-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
#lr-rating-legend .lr-legend-title { font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1; }
#lr-rating-legend .lr-legend-scale { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center; }
#lr-rating-legend .lr-legend-item { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; white-space: nowrap; }
#lr-rating-legend .lr-swatch { width: 14px; height: 14px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); display: inline-block; }
#lr-rating-legend .lr-star { font-size: 13px; line-height: 1; }
@media (max-width: 900px) {
  .lr-filters-compact { flex-direction: column; align-items: stretch; }
  .lr-segment, .lr-cuisine-dropdown { width: 100%; }
}

/* === Virtuvės button static pill & centered text (v6) === */
.lr-cuisine-dropdown { flex: 1 1 auto; display: flex; align-items: center; }
.lr-cuisine-button {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  width: 100%;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lr-cuisine-button .lr-count {
  background: var(--lr-accent);
  color: #111;
  border: none;
  border-radius: 9999px;
  padding: 2px 6px;
  margin-left: 8px;
  font-size: 12px;
}


/* === Top Bar Refinement (v6) === */
.lr-cuisine-dropdown {
  display: flex;
  flex-direction: column;   /* panel goes BELOW the button */
  align-items: stretch;
  flex: 1 1 auto;
}

/* Button as static pill, centered text */
.lr-cuisine-button {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  width: 100%;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;      /* vertical center */
  justify-content: center;  /* horizontal center */
  text-align: center;
  gap: 8px;
}
.lr-cuisine-button:focus { outline: none; box-shadow: 0 0 0 2px rgba(234,153,46,.2); }

/* Count "bubble" color matches active rating accent */
.lr-cuisine-button .lr-count {
  background: var(--lr-accent);
  color: #111;
  border: 0;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 12px;
}

/* Panel is a separate box, not expanding the pill */


/* Keep overall container full width and pleasant rounding */
#lr-map-controls {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 10px 12px;
}

/* Keep rating segment consistent */
#lr-rating-segment {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
}
.lr-segment button {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  color: #374151;
  border-radius: 9999px;
}
.lr-segment button.active { background: var(--lr-accent); color: #111; }

/* Legend stays last and centered */
#lr-rating-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
#lr-rating-legend .lr-legend-title { font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1; }
#lr-rating-legend .lr-legend-scale { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center; }
#lr-rating-legend .lr-legend-item { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; white-space: nowrap; }
#lr-rating-legend .lr-swatch { width: 14px; height: 14px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); display: inline-block; }
#lr-rating-legend .lr-star { font-size: 13px; line-height: 1; }

/* Layout */
.lr-filters-compact {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: stretch;
  justify-content: space-between;
}
.lr-segment { flex: 1 1 auto; display: inline-flex; }
@media (max-width: 900px) {
  .lr-filters-compact { flex-direction: column; align-items: stretch; }
  .lr-segment, .lr-cuisine-dropdown { width: 100%; }
}

/* === Overlay cuisine panel over map (v7) === */
.lr-cuisine-dropdown { position: relative; } /* create positioning context for panel */
.lr-cuisine-panel {
  position: absolute;          /* overlay */
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  z-index: 9999;               /* ensure it's above map/controls */
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* === Mobile centering for rating filter (v7.1) === */

  .lr-segment {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 900px) {
  /* Center star-rating segment on mobile */
  #lr-rating-segment { display: flex; justify-content: center; }
  .lr-segment { justify-content: center; width: 100%; }
  .lr-segment button { text-align: center; }
}


#lr-rating-segment { min-width: 100% !important; }

/* === v10: Leaflet popup close button: white, no click/hover effect === */
.leaflet-popup-close-button {
  color: #fff !important;
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
  opacity: 1 !important;
}
.leaflet-popup-close-button:hover,
.leaflet-popup-close-button:active,
.leaflet-popup-close-button:focus {
  color: #fff !important;
  background: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* === v10: Focus/outline color unification to --lr-accent === */
.lr-cuisine-button:focus,
.lr-cuisine-button:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(234,153,46,.35) !important; /* #ea992e */
}

/* Chip focus ring matches accent (input then span) */
.lr-chip input:focus + span,
.lr-chip input:focus-visible + span {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(234,153,46,.35) !important; /* #ea992e */
  border-radius: 9999px;
}

/* If labels themselves get focus (mouse users), also handle */
.lr-chip:focus,
.lr-chip:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(234,153,46,.35) !important;
  border-radius: 9999px;
}



/* === v11: Remove hover ring from cuisine filter labels === */
.lr-cui-list label:hover,
.lr-cui-list label:focus,
.lr-cui-list label:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}


/* Card actions */
.lr-card-actions{  display:flex; justify-content:flex-end; }
.lr-btn{
  display: block;
  width: 100%;
  text-align: center;
  padding: 4px 8px;
  border-radius: 10px;
  background: var(--lr-accent, #eab308);
  border: 1px solid var(--lr-accent, #eab308);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
color: #fff;color: #fff !important;}



@media (max-width: 640px){
  /* Ensure the star filter can scroll fully left/right on mobile */
  #lr-rating-segment { 
    justify-content: flex-start !important;
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }
  .lr-segment { white-space: nowrap; overflow: visible; }
}



/* Card actions — full width accent button */
.lr-card-actions {  }
.lr-btn{
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--lr-accent, #eab308);
  border: 1px solid var(--lr-accent, #eab308);
  color: #111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
color: #fff;color: #fff !important;}




/* Star filter responsiveness */
#lr-rating-segment{
  flex: 1 1 auto;
  min-width: 0;            /* allow flex item to shrink properly */
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.lr-segment{ white-space: nowrap; display: inline-flex; }
.lr-filters-compact{ align-items: stretch; overflow: hidden; } /* contain inner overflow */
.lr-cuisine-dropdown{ flex: 0 0 auto; } /* keep cuisine button fixed size */



@media (max-width: 640px){
  #lr-rating-segment{
    justify-content: flex-start !important;
    max-width: 100vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}



/* Ensure cuisine dropdown can expand over the controls */
.lr-filters-compact{ overflow: visible !important; }
.lr-cuisine-dropdown{ overflow: visible; position: relative; }
#lr-cuisine-panel{ z-index: 9999; }



/* Gesture handling: allow page scroll on mobile when not gesturing */
.leaflet-container { touch-action: pan-y; }
.leaflet-container.lr-gesturing { touch-action: none; }

/* Small hint for mobile */
.lr-gesture-hint {
  background: rgba(255,255,255,.9);
  color: #111;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 12px;
  padding: 6px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}


/* === Mobile overflow fix (≤ 400px) injected === */

/* === LR Map Controls mobile fixes (≤ 400px) === */
@media (max-width: 400px){
  #lr-map-controls,
  #lr-map-controls * {
    box-sizing: border-box;
    max-width: 100%;
  }

  .lr-filters-compact{
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Keep the segmented buttons on one line, but make them swipeable */
  #lr-rating-segment{
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    max-width: 100%;
    padding-bottom: 2px; /* avoid scrollbar overlap */
  }
  #lr-rating-segment button{
    flex: 0 0 auto;
    padding: 6px 8px;
    white-space: nowrap;
  }

  /* Make Cuisine dropdown take the full row */
  .lr-cuisine-dropdown{
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0 !important;
  }
  .lr-cuisine-button, .lr-cuisine-btn, #lr-cuisine-toggle{
    width: 100%;
  }

  /* Legend wraps neatly */
  #lr-rating-legend{
    width: 100%;
  }
  #lr-rating-legend .lr-legend-scale{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  #lr-rating-legend .lr-legend-item{
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
  }
}

/* === LR Popup hard size cap (added 20250812-144504) === */
.leaflet-popup { max-width: 320px !important; }
.leaflet-popup-content {
  max-width: 300px !important;
  max-height: 200px !important;
  overflow: auto !important;
}
/* Make long words/addresses wrap instead of expanding the card */
.leaflet-popup-content, .leaflet-popup-content * {
  word-break: break-word;
  overflow-wrap: anywhere;
}
/* Ensure card itself doesn't fight the width cap */
.lr-card { min-width: 0 !important; max-width: 300px !important; }
.leaflet-popup-content-wrapper { padding: 0; }
/* === end cap === */

/* === LR Popup compact no-scroll variant (added 20250812-145056) === */
/* Keep popup narrow */
.leaflet-popup { max-width: 300px !important; }

/* Ensure popup content never shows scrollbars */
.leaflet-popup-content {
  max-width: 300px !important;
  max-height: none !important;
  overflow: visible !important;
}
.leaflet-popup-content-wrapper {
  overflow: hidden !important; /* hide any accidental overflow, no scrollbars */
}

/* Make the card itself compact */
.lr-card {
  min-width: 0 !important;
  max-width: 300px !important;
  border-radius: 12px !important;
}
.lr-card-image {
  padding-top: 56% !important; /* smaller header image ratio */
}
.lr-card-body {
  padding: 10px 12px 12px !important;
  gap: 4px !important;
}
.lr-card-title {
  font-size: 14px !important;
  line-height: 1.2 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;  /* clamp title to 2 lines */
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.lr-card-row {
  font-size: 12px !important;
  line-height: 1.35 !important;
}
/* Clamp any potentially long text (like address) */
.lr-card .lr-value,
.lr-card .lr-card-address {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}
/* Avoid wide chips/badges blowing up width */
.lr-badge, .lr-badge-more, .lr-badge-year-removed {
  white-space: nowrap !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
/* === end compact variant === */


/* === Popup fixed width override (2025-08-12) ===
   Ensure min-width equals max-width for both the popup shell and its content.
   Adjust 300px if you want a different fixed width.
*/
.leaflet-popup { max-width: 300px !important; min-width: 300px !important; }
.leaflet-popup-content { max-width: 300px !important; min-width: 300px !important; }
