/* User redlines only: keep the shared toolbar and list contents in place. */
body:not(.map-fullscreen) #header-carousel-area {
  margin-bottom: 10px !important;
}
#map-demo-list .map-list-line {
  display: block;
  line-height: 1.15;
}
#map-demo-list {
  white-space: normal;
}

/* The toolbar stays fixed where the existing code puts it. Reserve its measured
   lower edge, then give the paper and the action/receipt rows separate space. */
#cont-map {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding-top: var(--redline-map-top, 116px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#cont-map.hidden { display: none; }
#cont-map.map-exiting { display: flex; }
#cont-map #paper-viewport {
  position: relative;
  inset: auto;
  flex: 1 1 0;
  order: 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 4px !important;
  overflow: auto;
  box-sizing: border-box;
}
#cont-map #paper-canvas {
  min-width: 0 !important;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}
#map-layout-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  flex: 0 0 auto;
  order: 1;
  align-items: stretch;
  gap: 6px;
  padding: 8px;
  background: #30449a;
  position: relative;
  z-index: 4;
}
#map-layout-actions > :is(button, a) {
  position: relative !important;
  inset: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 44px;
  margin: 0;
  padding: 7px 5px;
  box-sizing: border-box;
  clip-path: none;
  border-radius: 9px;
  font-size: clamp(12px, 3.4vw, 14px);
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  text-align: center;
}
#map-layout-actions #msd-map-entry {
  display: flex;
  border: 1px solid #26716e;
  background: #a8dcd3;
  color: #153b42;
  box-shadow: none;
}
#map-layout-actions #map-sponsor-entry {
  border: 1px solid #f1dfb1;
  background: #fff1cd;
  color: #512d19;
  isolation: auto;
}
#map-layout-actions #map-sponsor-entry::before { display: none; }
#map-layout-actions #map-onboarding-open {
  border: 1px solid #cfdedb;
  background: #f5f7f8;
  color: #17324d;
  box-shadow: none;
}
#map-layout-actions > :is(button, a):focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
}
#cont-map #map-receipt-dock {
  position: relative;
  inset: auto;
  width: 100%;
  flex: 0 0 auto;
  order: 2;
  padding: 0 8px 8px;
  z-index: 4;
}
.map-fullscreen.has-receipt-awards #cont-map #map-receipt-dock:not([hidden]) { display: block; }
#cont-map #map-receipt-dock[hidden] { display: none !important; }
body:not(.map-fullscreen) #map-layout-actions { display: none; }
