.location-card:has(> .location-preview-button) {
 display: block;
 width: 252px;
 padding: 0;
}
.location-preview-button,
#map-viewer .map-canvas {
 background-color: #29394a;
}
.location-preview-button {
 position: relative;
 display: grid;
 place-items: center;
 width: 100%;
 aspect-ratio: 1.9;
 padding: 0;
 overflow: hidden;
 isolation: isolate;
 border: 0;
 border-radius: 11px;
 cursor: pointer;
 color: #fff;
}
.location-preview-button::before {
 content: '';
 position: absolute;
 inset: -27%;
 z-index: -1;
 transform: rotate(-20deg);
 background:
  repeating-linear-gradient(90deg, transparent 0 14px, #6d859220 14px 32px, transparent 32px 54px),
  repeating-linear-gradient(0deg, transparent 0 25px, #a4bcc417 25px 27px, transparent 27px 45px, #486477 45px 49px, transparent 49px 68px),
  #29394a;
}
.location-preview-pin,
.location-view-pin {
 display: grid;
 place-items: center;
 flex: none;
 border-radius: 50%;
 background: var(--accent, #398af0);
 color: #fff;
}
.location-preview-pin { width: 34px; height: 34px; box-shadow: 0 2px 6px #15212d70; }
.location-view-pin { width: 27px; height: 27px; }
.location-preview-pin .glyph,
.location-view-pin .glyph { width: 17px; height: 17px; }
.location-preview-pin svg,
.location-view-pin svg { width: 100%; height: 100%; }
.location-preview-label {
 position: absolute;
 inset: auto 7px 7px;
 width: fit-content;
 max-width: calc(100% - 14px);
 padding: 3px 6px;
 overflow: hidden;
 border-radius: 5px;
 background: #172535e6;
 text-overflow: ellipsis;
 white-space: nowrap;
 font-size: .75rem;
}
#map-viewer[open] {
 --location-safe-top: env(safe-area-inset-top, 0px);
 --location-safe-bottom: env(safe-area-inset-bottom, 0px);
 position: fixed;
 inset: 0;
 display: block;
 width: min(100%, 750px);
 height: min(100%, 820px);
 max-width: none;
 max-height: none;
 margin: auto;
 padding: 0;
 overflow: hidden;
 isolation: isolate;
 border: 0;
 border-radius: 14px;
 background: #29394a;
}
#map-viewer .page-head {
 position: absolute;
 z-index: 2;
 inset: var(--location-safe-top) 0 auto;
 display: grid;
 grid-template-columns: 44px 1fr 44px;
 align-items: center;
 gap: 8px;
 margin: 0;
 padding: 6px 10px;
 border: 0;
 background: var(--panel, #202831);
 text-align: center;
}
#map-viewer .page-head .text-button {
 width: 44px;
 height: 44px;
 padding: 0;
 border-radius: 50%;
 background: color-mix(in srgb, currentColor 9%, transparent);
 font-size: 1.35rem;
 line-height: 1;
}
#map-viewer-body {
 position: absolute;
 inset: 0 0 calc(116px + var(--location-safe-bottom));
 margin: 0;
}
#map-viewer-body .embedded-map {
 --map-height: 100%;
 width: 100%;
 height: 100%;
 border-radius: 0;
}
#map-viewer-body .leaflet-top { top: calc(57px + var(--location-safe-top)); }
#map-viewer-body .map-point-pin > span { color: var(--accent, #398af0); }
#map-viewer-body .map-notice,
#map-viewer-body .map-polar { display: none; }
#map-viewer-body .map-status:not(:empty) {
 position: absolute;
 z-index: 1;
 inset: auto 12px 34px;
 width: fit-content;
 max-width: calc(100% - 24px);
 padding: 5px 8px;
 border-radius: 8px;
 background: var(--panel, #202831);
 color: var(--text, #fff);
}
#map-viewer-body .map-retry:not([hidden]) { position: absolute; z-index: 1; inset: auto auto 16px 12px; }
#map-viewer-body .map-load:not([hidden]) { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); }
#map-viewer-caption {
 position: absolute;
 z-index: 2;
 inset: auto 0 0;
 display: grid;
 gap: 8px;
 min-height: calc(116px + var(--location-safe-bottom));
 box-sizing: border-box;
 margin: 0;
 padding: 10px 12px calc(10px + var(--location-safe-bottom));
 border-start-start-radius: 14px;
 border-start-end-radius: 14px;
 background: var(--panel, #202831);
 color: var(--text, #fff);
}
.location-view-place { display: flex; align-items: center; gap: 8px; min-width: 0; }
.location-view-place strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-view-actions { display: flex; gap: 8px; }
.location-view-action {
 display: grid;
 flex: 1;
 place-items: center;
 min-height: 44px;
 padding-inline: 8px;
 border-radius: 10px;
 background: #1764c0;
 color: #fff;
 font-weight: 600;
 text-decoration: none;
 text-align: center;
}
.location-preview-button:focus-visible,
.location-view-action:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
@media (max-width: 640px), (pointer: coarse) {
 #map-viewer[open] { width: 100%; height: 100dvh; min-height: 100dvh; max-height: 100dvh; border-radius: 0; }
}

#location-preview .map-editor .map-canvas {
 background-color: #29394a;
}
.theme-light #location-preview .map-editor .map-canvas {
 background-color: #e3ebf0;
}
#location-preview .map-editor .map-status {
 color: var(--text);
}
#location-preview .map-editor:not(.map-active) .map-status:not(:empty) {
 position: absolute;
 inset: 0 12px auto;
 display: grid;
 place-items: center;
 height: var(--map-height);
 margin: 0;
 pointer-events: none;
 text-align: center;
}
#location-preview .map-editor:has(.map-load:not([hidden])) .map-status:not(:empty) {
 inset: auto;
 position: static;
 display: block;
 height: auto;
 margin: 6px 8px;
 text-align: start;
}
