.ymap-page .reports-layout {
    align-items: start;
}

.ymap-feed {
    display: grid;
    gap: 12px;
}

.ymap-hero {
    display: grid;
    gap: 12px;
}

.ymap-hero-copy {
    display: grid;
    gap: 8px;
}

.ymap-hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 192, 27, 0.12);
    color: var(--classic-accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ymap-shell {
    display: grid;
    gap: 16px;
}

.ymap-shell--report-style {
    gap: 12px;
    padding: 10px;
}

.ymap-toolbar {
    display: grid;
    gap: 12px;
}

.ymap-shell--report-style .ymap-toolbar {
    gap: 10px;
    padding: 2px 2px 0;
}

.ymap-toolbar-copy h2 {
    margin: 0;
    color: var(--classic-accent-dark);
}

.ymap-shell--report-style .ymap-toolbar-copy h2 {
    color: var(--classic-text);
}

.ymap-toolbar-copy p {
    margin: 8px 0 0;
    color: var(--classic-muted);
}

.ymap-shell--report-style .ymap-toolbar-copy p {
    margin-top: 6px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.ymap-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ymap-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--classic-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--classic-text);
    font-weight: 700;
    cursor: pointer;
}

.ymap-filter.is-active {
    border-color: rgba(239, 108, 0, 0.35);
    background: #fff8ec;
    color: var(--classic-accent-dark);
}

.ymap-canvas {
    width: 100%;
    min-height: 560px;
    border: 1px solid var(--classic-border);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.ymap-canvas--report-style {
    border-radius: 10px;
    background: #f8fafc;
}

.ymap-status {
    min-height: 24px;
    color: var(--classic-muted);
    font-size: 0.92rem;
}

.ymap-shell--report-style .ymap-status {
    padding: 0 2px;
    font-size: 0.88rem;
}

.ymap-status.is-error {
    color: #b91c1c;
}

.ymap-balloon {
    position: relative;
    display: grid;
    gap: 12px;
    width: min(100%, 308px);
    padding: 16px;
    color: var(--classic-text);
    box-sizing: border-box;
}

.ymap-balloon-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--classic-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: #334155;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
    z-index: 3;
    cursor: pointer;
}

.ymap-balloon-close:hover {
    color: #0f172a;
    background: #ffffff;
}

.ymap-balloon-close i {
    font-size: 0.95rem;
    line-height: 1;
}

.ymap-balloon-loading {
    padding: 8px 4px;
    color: var(--classic-muted);
    font-size: 0.92rem;
}

.ymap-balloon-media {
    height: 158px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--classic-border);
    background: #f8fafc;
}

.ymap-balloon-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ymap-balloon-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.ymap-balloon-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--classic-muted);
    font-size: 0.8rem;
}

.ymap-balloon-body h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.ymap-balloon-body h3 a {
    color: var(--classic-text);
    text-decoration: none;
}

.ymap-balloon-body h3 a:hover {
    color: var(--classic-accent-dark);
}

.ymap-balloon-body p {
    margin: 0;
    color: var(--classic-text);
    line-height: 1.5;
}

.ymap-balloon-author {
    color: var(--classic-muted);
    font-size: 0.86rem;
}

.ymap-balloon-excerpt {
    color: var(--classic-muted);
    font-size: 0.9rem;
}

.ymap-balloon-location {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--classic-muted);
    line-height: 1.4;
}

.ymap-balloon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(239, 108, 0, 0.35);
    border-radius: 12px;
    background: #fff8ec;
    color: var(--classic-accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.ymap-balloon-link:hover {
    color: var(--classic-accent-dark);
    filter: brightness(0.98);
    text-decoration: none;
}

.ymap-canvas [class*="balloon__layout"] {
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18) !important;
}

.ymap-canvas [class*="balloon__content"] {
    margin-right: 0 !important;
    padding: 0 !important;
    padding-right: 0 !important;
    background: #ffffff !important;
    width: 308px !important;
    max-width: 308px !important;
    min-width: 308px !important;
}

.ymap-canvas [class*="balloon__close"] {
    display: none !important;
}

.ymap-canvas [class*="balloon__close-button"] {
    display: none !important;
}

.ymap-canvas [class*="balloon__tail"] {
    transform: scale(0.92);
}

.ymap-inline,
.ymap-picker-canvas {
    width: 100%;
    min-height: 100%;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.ymap-preview-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    border-radius: inherit;
    overflow: hidden;
}

.ymap-preview-inline-map {
    min-height: 100%;
}

.ymap-preview-inline-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.ymap-preview-inline-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--classic-accent-dark);
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.16);
}

.ymap-preview-trigger {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--classic-text);
    text-align: left;
    cursor: pointer;
}

.ymap-preview-trigger:hover {
    background: linear-gradient(180deg, #fff8ec 0%, #f8fafc 100%);
}

.ymap-preview-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 108, 0, 0.12);
    color: var(--classic-accent-dark);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ymap-preview-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ymap-preview-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--classic-text);
}

.ymap-preview-text {
    color: var(--classic-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.ymap-preview-action {
    color: var(--classic-accent-dark);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.ymap-single-modal-content {
    border: 1px solid var(--classic-border);
    border-radius: 18px;
    overflow: hidden;
}

.ymap-single-modal-header {
    align-items: start;
    gap: 16px;
    border-bottom: 1px solid var(--classic-border);
}

.ymap-single-modal-headline {
    display: grid;
    gap: 4px;
}

.ymap-single-modal-headline h2 {
    margin: 0;
    color: var(--classic-accent-dark);
    font-size: 1.18rem;
}

.ymap-single-modal-headline p {
    margin: 0;
    color: var(--classic-muted);
    line-height: 1.45;
}

.ymap-single-modal-body {
    padding: 0;
}

.ymap-single-modal-map {
    min-height: 68vh;
}

.ymap-single-modal {
    z-index: 2000 !important;
}

.ymap-single-modal .modal-dialog,
.ymap-single-modal .modal-content,
.ymap-picker-modal .modal-dialog,
.ymap-picker-modal .modal-content {
    position: relative;
    z-index: 2005;
}

.add-publication-map-field {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
}

.add-publication-map-field > span:first-child,
.add-publication-map-field > .ymap-picker-modal {
    grid-column: 1 / -1;
}

.ymap-picker {
    display: grid;
    gap: 10px;
}

.ymap-picker-launch {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.ymap-picker-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(239, 108, 0, 0.35);
    border-radius: 12px;
    background: #fff8ec;
    color: var(--classic-accent-dark);
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.ymap-picker-summary {
    padding: 12px 14px;
    border: 1px solid var(--classic-border);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--classic-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.ymap-picker-summary.is-selected {
    border-color: rgba(239, 108, 0, 0.28);
    background: #fff8ec;
    color: var(--classic-text);
}

.ymap-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    flex-wrap: wrap;
}

.ymap-picker-note {
    color: var(--classic-muted);
    line-height: 1.45;
}

.ymap-picker-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--classic-border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--classic-text);
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.ymap-picker-frame {
    height: min(65vh, 520px);
    min-height: 340px;
    border: 1px solid var(--classic-border);
    border-radius: 18px;
    overflow: hidden;
}

.ymap-picker-status {
    color: var(--classic-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.ymap-picker-canvas {
    height: 100%;
    min-height: 340px;
}

.ymap-picker-status.is-error {
    color: #b91c1c;
}

.ymap-picker-modal {
    z-index: 2000 !important;
}

.modal-backdrop.ymap-picker-backdrop {
    z-index: 1990 !important;
}

.modal-backdrop.ymap-single-backdrop {
    z-index: 1990 !important;
}

.ymap-picker-modal .modal-content {
    border: 1px solid var(--classic-border);
    border-radius: 18px;
}

.ymap-picker-modal .modal-header {
    border-bottom: 1px solid var(--classic-border);
    padding: 16px 18px;
}

.ymap-picker-modal .modal-title {
    margin: 0;
    color: var(--classic-accent-dark);
    font-size: 1.2rem;
    font-weight: 800;
}

.ymap-picker-modal .modal-body {
    padding: 18px;
}

.ymap-picker-modal-footer {
    border-top: 1px solid var(--classic-border);
    padding: 14px 18px 18px;
    justify-content: flex-end;
}

.ymap-picker-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(239, 108, 0, 0.35);
    border-radius: 12px;
    background: var(--classic-accent);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.report-single-map.report-single-map-live {
    border: 1px solid var(--classic-border);
    background: #f8fafc;
}

.ymap-balloon-single {
    width: 200px;
}

.ymap-balloon-single h3 {
    margin: 0 0 4px;
    color: var(--classic-text);
    font-size: 0.98rem;
}

.ymap-balloon-single p {
    margin: 0;
    color: var(--classic-muted);
    font-size: 0.86rem;
}

@media (max-width: 960px) {
    .ymap-canvas {
        min-height: 460px;
    }

    .ymap-picker-frame {
        min-height: 280px;
    }

    .ymap-single-modal-map {
        min-height: 56vh;
    }
}

@media (max-width: 720px) {
    .add-publication-map-field {
        grid-template-columns: 1fr;
    }

    .ymap-filter-group,
    .ymap-picker-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ymap-canvas {
        min-height: 380px;
    }

    .ymap-picker-modal .modal-dialog {
        margin: 0;
        max-width: none;
        min-height: 100dvh;
        align-items: flex-end;
    }

    .ymap-picker-modal .modal-content {
        border-radius: 20px 20px 0 0;
        min-height: min(86dvh, 760px);
    }

    .ymap-picker-modal .modal-body {
        padding: 16px;
    }

    .ymap-picker-frame {
        height: min(52vh, 420px);
        min-height: 260px;
    }

    .ymap-preview-trigger {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ymap-preview-action {
        grid-column: 1 / -1;
        padding-left: 52px;
    }

    .ymap-single-modal-map {
        min-height: 48vh;
    }
}
