body {
    overflow: hidden;
}

.page-shell--map {
    --map-top-offset: 243px;
    width: 100%;
    max-width: none;
    height: calc(100vh - var(--map-top-offset));
    height: calc(100dvh - var(--map-top-offset));
    padding: 0;
}

.public-map {
    position: relative;
    height: 100%;
    min-height: 0;
    background: #17202a;
}

.category-filter--map {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0;
}

.viewport {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: auto;
    touch-action: pan-x pan-y;
    overscroll-behavior: contain;
    cursor: grab;
}

.viewport.panning {
    cursor: grabbing;
    user-select: none;
}

.map-canvas-spacer {
    position: relative;
    width: 3000px;
    height: 2000px;
}

.map-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 3000px;
    height: 2000px;
    overflow: hidden;
    transform-origin: 0 0;
    background-color: #78936a;
    background-image:
        linear-gradient(rgba(54, 76, 49, 0.48), rgba(54, 76, 49, 0.48)),
        radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.11) 0 2px, transparent 3px),
        linear-gradient(135deg, rgba(127, 153, 101, 0.34), transparent 34%),
        linear-gradient(45deg, rgba(77, 101, 68, 0.24), transparent 38%);
    background-repeat: repeat;
    background-size: auto, 84px 84px, 520px 520px, 620px 620px;
    box-shadow: inset 0 0 0 1px rgba(32, 35, 40, 0.08);
}

.iso-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.42;
    background-image:
        linear-gradient(30deg, rgba(0, 127, 122, 0.18) 1px, transparent 1px),
        linear-gradient(150deg, rgba(0, 127, 122, 0.18) 1px, transparent 1px);
    background-size: 86px 50px;
}

.draw-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.road-shadow,
.road-dust,
.road-outline,
.road-core,
.beach-core,
.sea-core {
    pointer-events: none;
}

.beach-core {
    fill: none;
    stroke: #ead087;
    stroke-width: 108;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.road-shadow {
    fill: none;
    stroke: rgba(61, 47, 34, 0.34);
    stroke-width: 56;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: blur(2px);
}

.road-dust {
    fill: none;
    stroke: rgba(208, 176, 112, 0.62);
    stroke-width: 52;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.road-outline {
    fill: none;
    stroke: rgba(92, 83, 72, 0.82);
    stroke-width: 43;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.road-core {
    fill: none;
    stroke: #6e7370;
    stroke-width: 34;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.road-shadow.road-narrow {
    stroke-width: 30;
}

.road-dust.road-narrow {
    stroke-width: 27;
}

.road-outline.road-narrow {
    stroke-width: 22;
}

.road-core.road-narrow {
    stroke-width: 16;
}

.sea-core {
    fill: none;
    stroke: #24c7bd;
    stroke-width: 260;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#objectsLayer {
    position: relative;
    z-index: 3;
}

.map-object {
    position: absolute;
    display: grid;
    place-items: end center;
    width: calc(128px * var(--object-scale, 1) * var(--object-family-scale, 1)) !important;
    height: calc(128px * var(--object-scale, 1) * var(--object-family-scale, 1)) !important;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    transform: translate(-50%, -100%);
    user-select: none;
    cursor: pointer;
}

.map-object.decor-object {
    cursor: default;
}

.map-object:hover,
.map-object:focus-visible,
.map-object:active {
    background: transparent;
    outline: none;
}

.text-box-object {
    place-items: center;
    width: var(--text-box-width, 220px) !important;
    height: var(--text-box-height, 92px) !important;
    align-content: center;
    min-height: 0;
    padding: 12px 16px;
    border: 3px solid var(--text-box-border, #6f5738);
    border-radius: var(--text-box-radius, 18px);
    background: var(--text-box-bg, #fff2a8);
    box-shadow: 0 10px 22px rgba(28, 33, 37, 0.18);
    color: var(--text-box-color, #22312b);
    font-size: var(--text-box-font-size, 22px);
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    transform: translate(0, 0);
}

.text-box-object::before {
    display: none;
}

.text-box-object:hover,
.text-box-object:focus-visible,
.text-box-object:active {
    background: var(--text-box-bg, #fff2a8);
}

.text-box-title,
.text-box-content {
    display: -webkit-box;
    position: relative;
    z-index: 1;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow-wrap: anywhere;
    pointer-events: none;
}

.text-box-title {
    -webkit-line-clamp: 2;
    font-size: 1em;
    letter-spacing: 0;
}

.text-box-divider {
    position: relative;
    z-index: 1;
    margin: 5px 0 7px;
    color: color-mix(in srgb, var(--text-box-border, #6f5738) 74%, var(--text-box-color, #22312b));
    font-size: 0.82em;
    line-height: 1;
    pointer-events: none;
}

.text-box-divider::before {
    content: "~";
}

.text-box-content {
    -webkit-line-clamp: 5;
    font-size: 0.78em;
    font-weight: 700;
}

.arrow-object {
    place-items: center;
    width: var(--arrow-width, 240px) !important;
    height: var(--arrow-height, 86px) !important;
    padding: 0;
    color: var(--arrow-text, #22312b);
    font-size: var(--text-box-font-size, 24px);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    transform: translate(-50%, -50%) rotate(var(--arrow-rotation, 0deg));
}

.arrow-object:hover,
.arrow-object:focus-visible,
.arrow-object:active {
    background: transparent;
}

.arrow-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
    border: 3px solid var(--arrow-border, #6f5738);
    border-radius: 8px;
    background: var(--arrow-color, #ffd75a);
    clip-path: polygon(0 22%, 68% 22%, 68% 0, 100% 50%, 68% 100%, 68% 78%, 0 78%);
    pointer-events: none;
}

.arrow-left .arrow-visual {
    transform: scaleX(-1);
}

.arrow-title {
    position: relative;
    z-index: 1;
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.map-object img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 12px 12px rgba(22, 28, 32, 0.22));
    transition: filter 160ms ease;
}

.map-object.decor-object img {
    filter:
        saturate(0.46)
        brightness(0.86)
        contrast(0.82)
        drop-shadow(0 12px 12px rgba(22, 28, 32, 0.18));
}

.map-object.palm-object {
    --object-family-scale: 0.85;
}

.map-object.decor-object:not(.palm-object) img {
    filter:
        saturate(0.5)
        brightness(0.9)
        contrast(0.78)
        drop-shadow(0 10px 10px rgba(22, 28, 32, 0.14));
}

.map-object.organization-object:hover img,
.map-object.organization-object:focus-visible img {
    filter:
        drop-shadow(0 0 4px rgba(255, 232, 151, 0.95))
        drop-shadow(0 0 12px rgba(255, 185, 72, 0.72))
        drop-shadow(0 12px 12px rgba(22, 28, 32, 0.22));
}

.map-object.decor-object:hover img,
.map-object.decor-object:focus-visible img {
    filter:
        saturate(0.5)
        brightness(0.9)
        contrast(0.78)
        drop-shadow(0 10px 10px rgba(22, 28, 32, 0.14));
}

.fallback-building {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(135deg, #f7c873 0%, #d7894b 50%, #9c6b4d 100%);
    clip-path: polygon(50% 0, 100% 28%, 100% 78%, 50% 100%, 0 78%, 0 28%);
    box-shadow: 0 14px 20px rgba(28, 33, 37, 0.22);
}

.map-category-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--category-color, #0f766e);
    box-shadow: 0 8px 18px rgba(25, 34, 40, 0.2);
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}

.object-label {
    position: absolute;
    left: 50%;
    z-index: 2;
    display: flex;
    max-width: 180px;
    align-items: center;
    gap: 5px;
    padding: 4px 8px 4px 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 16px rgba(25, 34, 40, 0.12);
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}

.object-feature {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    z-index: 3;
    width: 156px;
    padding: 8px 11px;
    border: 1px solid #c98f12;
    border-radius: 8px;
    background: #ffd75a;
    box-shadow: 0 10px 20px rgba(75, 51, 10, 0.2);
    color: #3b2a08;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-align: center;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}

.object-feature__text {
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
}

.object-feature.is-overflowing .object-feature__text {
    max-width: none;
    padding-left: 100%;
    animation: feature-marquee 7s linear infinite;
}

.object-feature::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 12px;
    height: 12px;
    border-right: 1px solid #c98f12;
    border-bottom: 1px solid #c98f12;
    background: #ffd75a;
    transform: translateX(-50%) rotate(45deg);
}

@keyframes feature-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.map-object.feature-custom .object-feature {
    top: calc(100% + var(--feature-offset-y, 0px));
    bottom: auto;
    left: calc(50% + var(--feature-offset-x, 0px));
    transform: translate(-50%, -100%);
}

.label-icon {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.label-icon svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* organization icon labels experiment */
.map-object.organization-object .object-label {
    max-width: none;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 8px 18px rgba(25, 34, 40, 0.16);
    overflow: visible;
}

.map-object.organization-object .object-label > span:not(.label-icon) {
    position: absolute;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
}

.map-object.organization-object .label-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 18px rgba(25, 34, 40, 0.2);
    font-size: 22px;
}

.map-object.organization-object .label-icon svg {
    width: 24px;
    height: 24px;
}

.map-object.organization-object.is-category-muted {
    opacity: 0.38;
    pointer-events: none;
}

.map-object.organization-object.is-category-muted img {
    filter:
        grayscale(0.78)
        saturate(0.36)
        brightness(0.82)
        contrast(0.84)
        drop-shadow(0 8px 8px rgba(22, 28, 32, 0.12));
}

.map-object.organization-object.is-category-muted .map-category-icon,
.map-object.organization-object.is-category-muted .label-icon,
.map-object.organization-object.is-category-muted .object-feature {
    filter: grayscale(0.72) saturate(0.38) brightness(0.9);
}

.map-object.label-bottom .object-label {
    bottom: -26px;
}

.map-object.label-top .object-label {
    top: -26px;
}

.map-object.label-left .object-label,
.map-object.label-right .object-label {
    top: 50%;
}

.map-object.label-left .object-label {
    right: calc(100% + 10px);
    left: auto;
    transform: translateY(-50%);
}

.map-object.label-right .object-label {
    left: calc(100% + 10px);
    transform: translateY(-50%);
}

.map-object.label-custom .object-label {
    top: calc(100% + var(--label-offset-y, 0px));
    right: auto;
    bottom: auto;
    left: calc(50% + var(--label-offset-x, 0px));
    transform: translate(-50%, -50%);
}

.map-toolbar {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 5;
    display: grid;
    grid-template-columns: 42px 158px;
    grid-template-rows: 42px 42px;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(158, 170, 181, 0.55);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 40px rgba(29, 37, 45, 0.16);
}

.map-toolbar button {
    grid-column: 1;
}

.map-toolbar button {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid #d8dee7;
    border-radius: 8px;
    background: #fff;
    color: #202328;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.map-toolbar button + button {
    grid-row: 2;
}

.map-toolbar button:hover,
.map-toolbar button:focus-visible {
    border-color: #aab4bf;
    outline: none;
}

.mini-map {
    position: relative;
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 158px;
    height: 92px;
    overflow: hidden;
    border: 1px solid rgba(105, 116, 127, 0.5);
    border-radius: 8px;
    background:
        linear-gradient(rgba(54, 76, 49, 0.4), rgba(54, 76, 49, 0.4)),
        #78936a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    cursor: pointer;
    touch-action: none;
}

.mini-map__svg {
    display: block;
    width: 100%;
    height: 100%;
}

.mini-map__bounds {
    fill: transparent;
    stroke: rgba(255, 255, 255, 0.34);
    stroke-width: 18;
}

.mini-map__road {
    fill: none;
    stroke: rgba(71, 76, 73, 0.82);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mini-map__beach {
    fill: none;
    stroke: rgba(234, 208, 135, 0.92);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mini-map__sea {
    fill: none;
    stroke: rgba(36, 199, 189, 0.72);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mini-map__pin {
    fill: #fff7d7;
    stroke: rgba(33, 41, 47, 0.42);
    stroke-width: 10;
}

.mini-map__view {
    position: absolute;
    min-width: 8px;
    min-height: 8px;
    border: 2px solid #ffffff;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 0 0 1px rgba(32, 35, 40, 0.42),
        0 6px 16px rgba(22, 28, 32, 0.22);
    pointer-events: none;
}

#zoomValue {
    min-width: 54px;
    color: #68717d;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.place-card {
    width: min(420px, calc(100vw - 28px));
    max-height: min(720px, calc(100dvh - 28px));
    padding: 0;
    border: 1px solid rgba(29, 42, 40, 0.22);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 18px 54px rgba(12, 18, 22, 0.28);
    z-index: 1000;
}

.place-card::backdrop {
    background: rgba(17, 24, 31, 0.34);
}

.place-card [hidden] {
    display: none !important;
}

.place-card__media {
    border-bottom: 1px solid rgba(29, 42, 40, 0.14);
    background: #edf4f0;
}

.place-card__media img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.place-card__body {
    display: grid;
    gap: 12px;
    max-height: calc(100dvh - 220px);
    overflow: auto;
    padding: 18px;
}

.place-card__media[hidden] + .place-card__body {
    max-height: calc(100dvh - 28px);
}

.place-card__meta {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.place-card__category {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(15, 118, 110, 0.24);
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: #0b5d56;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.place-card__feature {
    flex: 1 1 180px;
    min-width: 0;
    margin: 0;
    padding: 5px 0 5px 10px;
    border-left: 3px solid #ffd75a;
    color: #3b2a08;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.place-card h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.08;
}

.place-card p {
    margin: 0;
    color: #66716c;
    line-height: 1.5;
    white-space: pre-line;
}

.place-card__stats {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.place-card__stat {
    display: inline-flex;
    min-width: 58px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 9px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 8px;
    color: #253a36;
    background: rgba(15, 118, 110, 0.07);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.place-card__stat--price {
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.08);
}

.place-card__stat-icon {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #ffffff;
    background: #0f766e;
}

.place-card__stat-count {
    min-width: 1ch;
    font-variant-numeric: tabular-nums;
}

.place-card__stat--price .place-card__stat-icon {
    background: #6d5bd0;
}

.place-card__stat--photos .place-card__stat-icon::before {
    content: "";
    width: 12px;
    height: 9px;
    border: 2px solid #ffffff;
    border-radius: 3px;
}

.place-card__stat--photos .place-card__stat-icon::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
}

.place-card__stat--price .place-card__stat-icon::before,
.place-card__stat--price .place-card__stat-icon::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 5px 0 #ffffff;
}

.place-card__stat--price .place-card__stat-icon::before {
    top: 6px;
}

.place-card__stat--price .place-card__stat-icon::after {
    display: none;
}

.place-card__whatsapp,
.place-card__details,
.place-card__close-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
    text-decoration: none;
}

.place-card__whatsapp {
    border: 0;
    color: #ffffff;
    background: #128c7e;
}

.place-card__details {
    border: 0;
    color: #ffffff;
    background: #0f766e;
}

.place-card__close-action {
    border: 1px solid #d8dee7;
    color: #202328;
    background: #ffffff;
    font: inherit;
    cursor: pointer;
}

.close-card {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 720px) {
    .place-card {
        width: 100vw;
        max-width: none;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
    }

    .place-card__media img {
        height: min(38dvh, 260px);
    }

    .place-card__body {
        max-height: calc(100dvh - min(38dvh, 260px));
        padding: 22px 18px 18px;
    }

    .place-card__media[hidden] + .place-card__body {
        max-height: 100dvh;
    }
}

.toast {
    display: none;
}

@media (max-width: 720px) {
    .page-shell--map {
        --map-top-offset: 191px;
    }

    .map-toolbar {
        right: 10px;
        bottom: 10px;
        grid-template-columns: 40px 132px;
        grid-template-rows: 40px 40px;
        gap: 5px;
        padding: 5px;
    }

    .map-toolbar button {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .mini-map {
        width: 132px;
        height: 85px;
    }
}
