.g812-map-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border: 0;
    border-radius: 999px;
    background: #f7bd00;
    color: #242424;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(48, 42, 24, 0.14);
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.g812-map-trigger:hover {
    background: #ffc928;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(48, 42, 24, 0.2);
}

.g812-map-trigger:focus-visible,
.g812-map-modal button:focus-visible,
.g812-map-modal a:focus-visible {
    outline: 3px solid #242424;
    outline-offset: 3px;
}

body.g812-map-is-open {
    overflow: hidden;
}

.g812-map-modal[hidden],
.g812-map-modal [hidden] {
    display: none !important;
}

.g812-map-modal {
    --g812-accent: #f7bd00;
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    font-family: inherit;
    color: #262626;
}

.g812-map-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 25, 31, 0.8);
    backdrop-filter: blur(6px);
}

.g812-map-modal__panel {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(1500px, 100%);
    height: min(94vh, 1080px);
    overflow: hidden;
    border-radius: 22px;
    background: #f8fbfb;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.g812-map-modal__header {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 18px;
    align-items: center;
    min-height: 86px;
    padding: 14px 18px 14px 24px;
    border-bottom: 1px solid rgba(31, 54, 62, 0.12);
    background: #fff;
}

.g812-map-modal__title {
    margin: 0;
    color: #242424;
    font-size: clamp(20px, 2vw, 32px);
    line-height: 1.15;
}

.g812-map-modal__instruction {
    max-width: 780px;
    margin: 6px 0 0;
    color: #65747a;
    font-size: 14px;
    line-height: 1.35;
}

.g812-map-modal__tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid #d9e2e5;
    border-radius: 999px;
    background: #f5f8f9;
}

.g812-map-modal__tools button,
.g812-map-modal__close {
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    margin: 0;
    border: 0;
    appearance: none;
    background: transparent;
    color: #27363c;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.g812-map-modal__tools button svg,
.g812-map-modal__close svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.g812-map-modal__tools button {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 700;
}

.g812-map-modal__tools button:hover {
    background: #fff;
}

.g812-map-modal__close {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    background: #eef3f4;
}

.g812-map-modal__close svg {
    width: 22px;
    height: 22px;
}

.g812-map-modal__close:hover {
    background: var(--g812-accent);
}

.g812-map-modal__body {
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.g812-map-loading,
.g812-map-error {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
}

.g812-map-loading__spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(30, 57, 65, 0.18);
    border-top-color: var(--g812-accent);
    border-radius: 50%;
    animation: g812-map-spin 700ms linear infinite;
}

.g812-map-error {
    color: #9d2626;
    background: #fff5f5;
}

.g812-map-viewport {
    position: absolute;
    inset: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 30%, rgba(255,255,255,0.85), rgba(238,246,247,0.92)),
        #edf5f6;
    scrollbar-color: var(--g812-accent) #dce6e8;
}

.g812-map-modal.is-card-open .g812-map-viewport {
    overflow: hidden;
}

.g812-map-canvas-wrap {
    width: 100%;
    min-width: 0;
    margin: 0 auto;
    transition: width 180ms ease;
}

.g812-map-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 1160 / 900;
    overflow: visible;
    isolation: isolate;
}

.g812-map-canvas__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.g812-map-hotspots {
    position: absolute;
    z-index: 2;
    inset: 0;
}

.g812-map-hotspot {
    position: absolute;
    display: block;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: #20272a;
    cursor: help;
    -webkit-tap-highlight-color: transparent;
}

.g812-map-hotspot[data-type="card"] {
    cursor: pointer;
}

.g812-map-hotspot::after {
    content: "";
    position: absolute;
    inset: 2px;
    border: 2px solid transparent;
    border-radius: inherit;
    background: transparent;
    box-shadow: none;
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.g812-map-hotspot:hover::after,
.g812-map-hotspot:focus-visible::after,
.g812-map-hotspot.is-active::after {
    border-color: var(--g812-accent);
    background: color-mix(in srgb, var(--g812-accent) 20%, transparent);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--g812-accent) 18%, transparent);
}

.g812-map-hotspot[data-type="card"]::before {
    content: "+";
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--g812-accent);
    color: #242424;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    transition: opacity 140ms ease, transform 140ms ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.g812-map-hotspot[data-type="card"]:hover::before,
.g812-map-hotspot[data-type="card"]:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.g812-map-tooltip {
    position: absolute;
    z-index: 8;
    left: 50%;
    bottom: calc(100% + 10px);
    width: max-content;
    max-width: min(300px, 70vw);
    padding: 12px 14px;
    border-radius: 13px;
    background: #fff;
    color: #28363b;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 7px);
    transition: opacity 140ms ease, transform 140ms ease;
    box-shadow: 0 14px 34px rgba(26, 45, 53, 0.24);
}

.g812-map-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border: 7px solid transparent;
    border-top-color: #fff;
    transform: translateX(-50%);
}

.g812-map-tooltip strong {
    display: block;
    margin-bottom: 4px;
    color: #20282b;
    font-size: 15px;
}

.g812-map-tooltip p {
    margin: 0;
}

.g812-map-hotspot:hover .g812-map-tooltip,
.g812-map-hotspot:focus-visible .g812-map-tooltip,
.g812-map-hotspot.is-active .g812-map-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
}

.g812-map-card {
    position: absolute;
    z-index: 10;
    inset: 16px;
    overflow: auto;
    padding: 18px;
    border: 1px solid rgba(30, 55, 63, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 26px 80px rgba(25, 44, 51, 0.24);
}

.g812-map-card__back {
    position: sticky;
    z-index: 3;
    top: 0;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin-bottom: 16px;
    padding: 9px 15px;
    border: 0;
    border-radius: 999px;
    background: #eef3f4;
    color: #28383e;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.g812-map-card__back:hover {
    background: var(--g812-accent);
}

.g812-map-card__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
    min-width: 0;
    gap: clamp(24px, 3vw, 48px);
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
}

.g812-map-gallery,
.g812-map-card__content {
    min-width: 0;
}

.g812-map-gallery__main {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #eaf0f1;
}

.g812-map-gallery__main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.g812-map-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.g812-map-gallery__thumbs button {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #edf2f3;
    cursor: pointer;
}

.g812-map-gallery__thumbs button.is-current {
    border-color: var(--g812-accent);
}

.g812-map-gallery__thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.g812-map-card__content {
    padding: 8px 0 20px;
}

.g812-map-card__content h3 {
    margin: 0 0 18px;
    color: #21282b;
    font-size: clamp(27px, 3vw, 46px);
    line-height: 1.08;
}

.g812-map-card__text {
    color: #4d5d63;
    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.62;
}

.g812-map-card__text p {
    margin: 0 0 1em;
}

.g812-map-card__cta {
    display: inline-flex;
    justify-content: center;
    min-height: 50px;
    margin-top: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    background: var(--g812-accent);
    color: #222;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

.g812-map-card__cta:hover {
    color: #111;
    filter: brightness(1.05);
}

@keyframes g812-map-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .g812-map-modal {
        padding: 0;
    }

    .g812-map-modal__panel {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .g812-map-modal__header {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 72px;
        padding: 11px 12px 11px 16px;
    }

    .g812-map-modal__instruction {
        display: none;
    }

    .g812-map-modal__tools {
        position: absolute;
        z-index: 6;
        right: 12px;
        bottom: -54px;
        box-shadow: 0 6px 18px rgba(23, 42, 48, 0.18);
    }

    .g812-map-modal__close {
        grid-column: 2;
        grid-row: 1;
    }

    .g812-map-viewport {
        padding: 66px 10px 24px;
    }

    .g812-map-card {
        inset: 8px;
        padding: 12px;
        border-radius: 16px;
    }

    .g812-map-card__layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .g812-map-card__content {
        padding: 0 4px 22px;
    }

    .g812-map-gallery__thumbs {
        overflow-x: auto;
        display: flex;
        padding-bottom: 4px;
    }

    .g812-map-gallery__thumbs button {
        flex: 0 0 70px;
    }
}

@media (max-width: 520px) {
    .g812-map-modal__title {
        max-width: 250px;
        font-size: 19px;
    }

    .g812-map-modal__close {
        width: 42px;
        height: 42px;
    }

    .g812-map-hotspot {
        min-width: 34px;
        min-height: 34px;
    }

    .g812-map-tooltip {
        max-width: 240px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .g812-map-trigger,
    .g812-map-canvas-wrap,
    .g812-map-hotspot::after,
    .g812-map-hotspot::before,
    .g812-map-tooltip {
        transition: none;
    }

    .g812-map-loading__spinner {
        animation-duration: 1400ms;
    }
}
