.landfill-map {
  width:100%; height:100%; min-height:0; display:flex; flex-direction:column;
  background:white; color:var(--ink); isolation:isolate;
}
.map-header,.map-footer {flex:none; position:relative; z-index:2;}
.map-header {
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
  padding:max(18px,env(safe-area-inset-top)) clamp(16px,4vw,70px) 13px;
}
.map-header h2 {margin:0; font:700 clamp(34px,5vw,74px)/.96 var(--sans); letter-spacing:-.083em;}
.map-header h2 span {color:var(--orange);}
.map-total {margin:9px 0 0; color:#62675c; font:12px var(--mono);}
.landfill-map button {touch-action:manipulation;}
.landfill-map button:focus-visible,.map-surface:focus-visible {outline:2px solid #1d7296;outline-offset:2px;}
.landfill-map button:not(.map-deposit) {min-height:42px;}
.landfill-map [data-map-action="close"],.map-actions button,.map-zoom button,.map-feedback button {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  background:#f9f9f6; border:1px solid #c3c6bc; border-radius:5px;
  box-shadow:inset 0 1px #fff,0 1px 1px #3b42331c;
  color:#33372e; font-size:13px; font-weight:560; padding:8px 13px; white-space:nowrap;
}
.landfill-map [data-map-action="close"] {background:white;}
.map-actions button:hover,.map-zoom button:hover,.landfill-map [data-map-action="close"]:hover,.map-feedback button:hover {background:#efefe9;}
.landfill-map .icon {width:15px; height:15px;}
.map-surface {
  flex:1; min-height:0; position:relative; overflow:hidden; touch-action:none;
  user-select:none; -webkit-user-select:none; cursor:grab; background:white; outline-offset:-3px!important;
}
.map-surface.is-dragging,.map-surface.is-dragging * {cursor:grabbing;}
.map-landscape,.map-ground,.map-pieces {position:absolute; inset:0; pointer-events:none;}
.map-landscape {width:100%; height:100%; display:block;}
.map-ground {background-image:url("/assets/bale-surface.webp");}
.map-pieces {z-index:0;}
.map-deposit {
  position:absolute; margin:0; padding:0; height:auto; aspect-ratio:1/.72;
  border:0; border-radius:6px; background:transparent;
  transform:translate(-50%,-50%); display:grid; place-items:center; pointer-events:auto;
  touch-action:none!important; cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.map-deposit canvas {display:block; width:100%; height:100%; pointer-events:none;}
.map-swatch {
  display:block; width:64%; height:26%; border-radius:21% 27% 29% 16%;
  transform:rotate(-5deg); box-shadow:inset 0 -2px 3px #0003,0 3px 3px #0002;
}
.map-deposit.is-located::after {
  content:""; position:absolute; inset:4% 3% 3%; border:1.5px solid #e45e29; border-radius:9px;
  pointer-events:none; box-shadow:0 0 0 2px #ffffffe3;
}
.map-pin {
  position:absolute; bottom:calc(100% - 1px); left:50%; transform:translateX(-50%);
  white-space:nowrap; display:none; pointer-events:none;
  padding:4px 6px 3px; color:white; background:#30342c; border-radius:3px;
  font:10px/1.05 var(--mono); letter-spacing:.015em;
}
.map-deposit.is-located .map-pin,.map-deposit:focus-visible .map-pin {display:block;}
@media(hover:hover) {.map-deposit:hover .map-pin {display:block;}}
.map-feedback {
  position:absolute; z-index:1; left:50%; top:10px; max-width:calc(100% - 28px);
  display:flex; gap:8px; align-items:center; transform:translateX(-50%);
}
.map-notice {font-size:12px; line-height:1.4; text-align:center; color:#545a50; background:#fffffff2; border-radius:4px; padding:4px 8px;}
.map-notice:empty {display:none;}
.map-feedback [data-map-action="retry"] {min-height:32px!important; padding:3px 7px;}
.map-locator {
  position:absolute; bottom:5px; right:clamp(16px,4vw,70px); z-index:1; width:112px; height:44px;
  border:1px solid #d4d7cf; border-radius:4px; background:#fff; opacity:.92; padding:0;
}
.map-locator img {position:absolute; width:100%; height:100%; object-fit:fill; inset:0; opacity:.52; pointer-events:none;}
.map-locator i {
  position:absolute; pointer-events:none; box-sizing:border-box; min-width:4px; min-height:4px;
  border:1px solid #ad441c; background:#ff7d3838; border-radius:1px;
}
.map-footer {padding:12px clamp(16px,4vw,70px) max(19px,env(safe-area-inset-bottom));}
.map-footer::before {content:"";display:block;border-top:1px solid var(--line);margin-bottom:12px;}
#mapInstructions {color:#61675d; font:12px/1.45 var(--sans); margin:0 0 10px;}
.map-tools,.map-actions,.map-zoom {display:flex;align-items:center;}
.map-tools {justify-content:space-between;gap:8px;}
.map-actions {gap:8px;}
.map-zoom {
  border:1px solid #b5baae; border-radius:6px; padding:2px; gap:1px;
  background:linear-gradient(#ebede6,#d7dacf); box-shadow:inset 0 1px #fff,0 1px 2px #2a312622;
}
.map-zoom button {background:#fcfcf9;padding:0;min-height:36px!important;min-width:37px;border:0;border-radius:3px;font-size:21px;}
.map-zoom #mapFit {font:12px var(--mono);min-width:53px;padding:0 4px;}
.map-zoom button:disabled {color:#888e81; cursor:default; background:#f0f2eb;}
.map-find-form {
  position:absolute; bottom:calc(100% - 42px); left:clamp(16px,4vw,70px); width:min(258px,calc(100% - 32px));
  padding:12px; background:white; border:1px solid #c1c5b9; border-radius:7px; box-shadow:0 4px 18px #28302418;
}
.map-find-form label {display:block; margin-bottom:6px; font-size:13px; font-weight:600;}
.map-find-form div {display:flex; gap:7px;}
.map-find-form input {min-width:0; margin:0; font:16px var(--mono);}
.map-sr {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
@media(max-width:490px) {
  .map-header {padding-left:16px;padding-right:16px;}
  .map-header h2 {font-size:39px;}
  .map-gestures {display:block;}
  .map-footer {padding:8px 12px max(12px,env(safe-area-inset-bottom));}
  .map-actions {gap:4px;}
  .map-actions button {font-size:12px;padding:7px;}
  .map-zoom button {min-width:35px;min-height:40px!important;}
  .map-zoom #mapFit {min-width:39px;font-size:10px;}
  .map-locator {right:12px;width:84px;height:38px;}
  .map-find-form {left:12px;bottom:calc(100% - 46px);}
}
@media(max-width:355px) {
  .map-actions .icon {display:none;}
  .map-header h2 {font-size:34px;}
  .map-zoom button {min-width:31px;}
}
@media(max-height:440px) {
  .map-header {padding-top:7px;padding-bottom:3px;}
  .map-header h2 {font-size:30px;}
  .map-total {margin-top:3px;font-size:10px;}
  .map-footer {padding-top:3px;padding-bottom:6px;}
  .map-footer::before {margin-bottom:5px;}
  #mapInstructions {margin-bottom:4px;}
  .map-gestures {display:inline;}
}
