.jgf-dg-map {
    --jgf-navy: #102a4f;
    --jgf-focus: #0b62d6;
    --jgf-surface: #ffffff;
    --jgf-border: rgba(16, 42, 79, 0.2);
    max-width: 1600px;
    margin-inline: auto;
}

.jgf-dg-map__instructions {
    margin: 0 0 0.8rem;
    color: #3c4653;
    font-size: 0.95rem;
}

.jgf-dg-map__scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
    border: 1px solid var(--jgf-border);
    border-radius: 10px;
    background: #fffdf9;
}

.jgf-dg-map__scroll:focus-visible {
    outline: 3px solid var(--jgf-focus);
    outline-offset: 3px;
}

.jgf-dg-map__canvas {
    position: relative;
    width: 100%;
    min-width: 760px;
    line-height: 0;
}

.jgf-dg-map__overview {
    display: block;
    width: 100%;
    height: auto;
}

.jgf-dg-map__hotspot {
    position: absolute;
    left: var(--jgf-x);
    top: var(--jgf-y);
    display: inline-grid;
    place-items: center;
    width: clamp(24px, 2.15vw, 34px);
    aspect-ratio: 1;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--jgf-navy);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    font: 700 clamp(18px, 1.55vw, 26px) / 1 Arial, sans-serif;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
    z-index: 2;
}

.jgf-dg-map__hotspot:hover {
    background: #174a86;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%) scale(1.1);
}

.jgf-dg-map__hotspot:focus-visible {
    outline: 4px solid #ffd54d;
    outline-offset: 3px;
    transform: translate(-50%, -50%) scale(1.12);
}

.jgf-dg-map__modal[hidden] {
    display: none;
}

.jgf-dg-map__modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(10px, 2vw, 28px);
    background: rgba(3, 12, 25, 0.88);
    z-index: 999999;
}

.jgf-dg-map__dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(1500px, 97vw);
    height: min(960px, 95vh);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: var(--jgf-surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.jgf-dg-map__dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--jgf-border);
    background: #f7f9fc;
}

.jgf-dg-map__dialog-header h3 {
    margin: 0;
    color: var(--jgf-navy);
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.25;
}

.jgf-dg-map__dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.jgf-dg-map__action,
.jgf-dg-map__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid #b7c2d1;
    border-radius: 7px;
    background: #fff;
    color: #15263c;
    font: 600 0.88rem/1.2 system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.jgf-dg-map__action {
    padding: 0.5rem 0.7rem;
}

.jgf-dg-map__close {
    width: 40px;
    padding: 0;
    font-size: 1.75rem;
}

.jgf-dg-map__action:hover,
.jgf-dg-map__close:hover {
    border-color: #5b6f89;
    background: #eef3f9;
    color: #0d2442;
}

.jgf-dg-map__action:focus-visible,
.jgf-dg-map__close:focus-visible {
    outline: 3px solid var(--jgf-focus);
    outline-offset: 2px;
}

.jgf-dg-map__image-viewport {
    min-height: 0;
    overflow: auto;
    display: grid;
    place-items: center;
    padding: clamp(8px, 1.5vw, 20px);
    background: #e9edf2;
}

.jgf-dg-map__detail {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.jgf-dg-map__image-viewport.is-full-resolution {
    display: block;
}

.jgf-dg-map__image-viewport.is-full-resolution .jgf-dg-map__detail {
    max-width: none;
    max-height: none;
    width: 1536px;
    height: auto;
    margin: 0 auto;
}

.jgf-dg-map__dialog-help {
    margin: 0;
    padding: 0.45rem 0.85rem;
    border-top: 1px solid var(--jgf-border);
    background: #f7f9fc;
    color: #4d5968;
    font-size: 0.82rem;
}

.jgf-dg-map__noscript {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--jgf-border);
    border-radius: 8px;
}

body.jgf-dg-map-modal-open {
    overflow: hidden;
}

@media (max-width: 782px) {
    .jgf-dg-map__canvas {
        min-width: 900px;
    }

    .jgf-dg-map__dialog {
        width: 98vw;
        height: 97vh;
    }

    .jgf-dg-map__dialog-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
    }

    .jgf-dg-map__dialog-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .jgf-dg-map__close {
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jgf-dg-map__hotspot {
        transition: none;
    }
}
