.geo-link-button {
    display: inline-grid;
    place-items: center;
    width: 2.05rem;
    height: 2.05rem;
    margin: .12rem .18rem;
    padding: 0;
    border: 1px solid rgba(30, 92, 160, .28);
    border-radius: 999px;
    background: #e8f4ff;
    color: #124f88;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    box-shadow: 0 3px 10px rgba(20, 80, 135, .08);
}
.geo-link-button:hover,
.geo-link-button:focus-visible {
    background: #d8edff;
    border-color: #2776b8;
    transform: translateY(-1px);
}
.geo-link-button__icon {
    display: block;
    font-size: 1.05rem;
    line-height: 1;
}

.geo-modal[hidden] { display: none; }
.geo-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: .75rem;
}
.geo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 20, 39, .72);
    backdrop-filter: blur(3px);
}
.geo-modal__dialog {
    position: relative;
    width: min(900px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 26px 90px rgba(0,0,0,.32);
}
.geo-modal__header {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: .85rem;
    min-height: 86px;
    padding: .55rem .7rem .55rem .8rem;
    border-bottom: 1px solid #dfe9f2;
    background: linear-gradient(120deg, #eaf6ff 0%, #fff 72%);
}
.geo-modal__mascot {
    width: 66px;
    height: 72px;
    object-fit: contain;
    object-position: center bottom;
}
.geo-modal__heading { min-width: 0; }
.geo-modal__eyebrow {
    display: block;
    margin-bottom: .12rem;
    color: #1769aa;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
#geo-modal-title {
    display: block;
    color: #153d63;
    font-size: clamp(1.05rem, 2.1vw, 1.45rem);
    line-height: 1.12;
}
.geo-modal__place {
    margin-top: .18rem;
    overflow: hidden;
    color: #243d55;
    font-size: .9rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.geo-modal__coords {
    margin-top: .12rem;
    color: #657789;
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
}
.geo-modal__actions {
    display: flex;
    align-items: center;
    gap: .55rem;
}
.geo-modal__external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    min-height: 2.55rem;
    max-width: 290px;
    padding: .58rem .8rem;
    border-radius: 11px;
    background: #1769aa;
    color: #fff;
    font-size: .82rem;
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(23,105,170,.2);
}
.geo-modal__external:hover,
.geo-modal__external:focus-visible { background: #0d548e; }
.geo-modal__close {
    flex: 0 0 auto;
    width: 2.45rem;
    height: 2.45rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #17324d;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(23,50,77,.14);
}
.geo-modal__close:hover,
.geo-modal__close:focus-visible { background: #e8f4ff; }
.geo-modal__map-wrap {
    height: clamp(240px, 37vh, 330px);
    background: #e8eef3;
}
.geo-modal__map {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
.geo-modal-open { overflow: hidden; }

@media (max-width: 720px) {
    .geo-modal { padding: .35rem; }
    .geo-modal__dialog { border-radius: 15px; }
    .geo-modal__header {
        grid-template-columns: 54px minmax(0, 1fr) auto;
        min-height: 72px;
        gap: .5rem;
        padding: .4rem .45rem;
    }
    .geo-modal__mascot { width: 50px; height: 60px; }
    .geo-modal__eyebrow { display: none; }
    #geo-modal-title { font-size: 1rem; }
    .geo-modal__place { font-size: .82rem; }
    .geo-modal__coords { font-size: .68rem; }
    .geo-modal__external {
        width: 2.55rem;
        max-width: none;
        padding: 0;
        font-size: 0;
    }
    .geo-modal__external span:first-child { font-size: 1rem; }
    .geo-modal__close { width: 2.35rem; height: 2.35rem; }
    .geo-modal__map-wrap { height: min(52vh, 300px); }
}

/* V5: viewer and landing-page compatibility */
.viewer-geo-link.geo-link-button {
    display: inline-grid;
    text-decoration: none;
    border: 1px solid rgba(30, 92, 160, .28);
}
.geo-modal__dialog { width: min(820px, 100%); }
.geo-modal__map-wrap { height: clamp(210px, 32vh, 285px); }
@media (max-width: 720px) {
    .geo-modal__map-wrap { height: min(42vh, 245px); }
}
