  canvas { display: block; }
  
  

        .krb-btn {
            background: white;
    border-bottom: 1px solid #ccc;
    border-top: 0;
    border-inline: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
        }


.krb-ui-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    font-family: Sans-Serif;
}

/* Левый нижний угол */
.krb-left-bottom {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Масштабная линейка */
.krb-scale-bar {
        height: 24px;
    background: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
    border: 2px solid black;
    border-top: none;
    display: flex;
    align-items: center;
}

.krb-scale-label {
       font-size: 12px;
    color: #333;
    margin-left: 4px;
}

.krb-zoom-label {
    font-size: 10px;
    color: #333;
    position: fixed;
    top: 4px;
    left: 4px;
}

.krb-coord-label {
    font-size: 10px;
    color: #333;
    margin-right: 6px;
}

/* Логотип */
.krb-logo {
    height: 23px;
    opacity: 0.7;
    margin-top: 4px;
}

/* Правый нижний угол */
.krb-right-bottom {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Контейнер кнопок */
.krb-buttons {
    pointer-events: auto;
    margin-bottom: 12px;
    display: flex;
    margin-right: 8px;
    gap: 0;
    border-radius: 5px;
    overflow: hidden;
    flex-direction: column;
    filter: drop-shadow(2px 4px 5px rgba(0, 0, 0, 0.5));
}


.krb-btn:last-child {
    border-bottom: none;
}

.krb-btn:hover {
    background: #f0f0f0;
}

.krb-btn:active {
    background: #ddd;
}

/* Атрибуция */
.krb-attribution {
    font-size: 12px;

    pointer-events: auto;
    padding: 4px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
}

/* Строка «атрибуция + кнопка (i)» */
.krb-info-row {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Сворачиваемая панель атрибуции — слева от кнопки (i) */
.krb-attribution-wrap {
    position: absolute;
    right: 100%;                /* правый край панели = левый край кнопки */
    bottom: 0;                  /* низ панели по нижнему краю кнопки */
    margin-right: 6px;          /* зазор между панелью и кнопкой */

    width: max-content;         /* ширина по содержимому… */
    max-width: min(360px, calc(100vw - 80px)); /* …но не шире экрана */

    clip-path: inset(0 0 0 100%); /* спрятано: обрезано по левому краю */
    opacity: 0;
    pointer-events: none;

    transition: clip-path 0.35s ease, opacity 0.25s ease;
    will-change: clip-path, opacity;
}

.krb-info-row {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin-right: 8px;
    margin-bottom: 8px;
}

.krb-attribution-wrap.krb-attribution-wrap--open {
    clip-path: inset(0 0 0 0);  /* показано полностью */
    opacity: 1;
    pointer-events: auto;
}

/* Кнопка (i): отключаем внешние отступы, их теперь даёт .krb-info-row */
.krb-buttons.krb-info-btn-group {
    margin-bottom: 0;
    margin-right: 0;
}

/* Активное состояние кнопки-тоггла */
.krb-btn[aria-expanded="true"] {
    background: #e9e9e9;
}

.krb-attribution-link {
    color: #333;
    text-decoration: none;
}

.krb-attribution-link:hover { text-decoration: underline;}

.krb-btn img {    width: 50%;}

/* ── Десктоп (≥ 900px): атрибуция всегда видна, без кнопки и анимации ── */
@media (min-width: 900px) {
    /* Кнопка (i) не нужна — атрибуция и так всегда видна */
    .krb-info-btn-group {
        display: none;
    }


    /* Обёртка — обычный блок в потоке, без clip-path и fade */
    .krb-attribution-wrap {
        position: static;
        right: auto;
        bottom: auto;
        margin-right: 0;
        width: auto;
        max-width: none;
        clip-path: none;
        opacity: 1;
        pointer-events: auto;
        transition: none;
        will-change: auto;
    }

    /* На десктопе ограничение по ширине тоже снимаем (было только на мобилке) */
    .krb-attribution {
        max-width: none;
    }
}