/* Реєстр пам'яток — сайт */
.pmr-single { --pmr-border: rgba(127,127,127,.3); --pmr-soft: rgba(127,127,127,.08); }
.pmr-single section { margin: 2em 0; }
.pmr-single h2 { margin-bottom: .5em; }
.pmr-crumbs { font-size: .9em; opacity: .85; margin-bottom: .8em; }
.pmr-lead { font-size: 1.15em; line-height: 1.5; }

.pmr-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: .6em 0 1em; }
.pmr-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--pmr-border, rgba(127,127,127,.3)); font-size: .85em; line-height: 1.4; text-decoration: none; color: inherit; }
.pmr-badge-status { border-color: var(--pmr-c); background: var(--pmr-c); color: #fff; }
.pmr-badge-value { background: rgba(26,115,232,.08); }
.pmr-cond-avariinyi, .pmr-cond-ruina { border-color: #b3261e; color: #b3261e; }
.pmr-prio-urgent { background: #b3261e; color: #fff; border-color: #b3261e; }
.pmr-prio-high { background: #f9ab00; color: #1d1d1d; border-color: #f9ab00; }

.pmr-tip { position: relative; cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.pmr-badge.pmr-tip { text-decoration: none; }
.pmr-tip-text { position: absolute; left: 0; top: calc(100% + 6px); z-index: 1000; width: max-content; max-width: 300px; padding: 8px 10px; border-radius: 6px; background: #202124; color: #fff; font-size: 13px; font-weight: 400; line-height: 1.4; text-align: left; box-shadow: 0 4px 14px rgba(0,0,0,.25); opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; white-space: normal; }
.pmr-tip:hover .pmr-tip-text, .pmr-tip:focus .pmr-tip-text, .pmr-tip:focus-within .pmr-tip-text { opacity: 1; visibility: visible; }
@media (max-width: 600px) { .pmr-tip-text { max-width: 70vw; } }

.pmr-why { padding: 1em 1.2em; border-left: 4px solid #1a73e8; background: var(--pmr-soft); border-radius: 0 8px 8px 0; }
.pmr-why h2 { margin-top: 0; }

.pmr-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 1em 0; }
.pmr-gallery img { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; display: block; }

.pmr-table { width: 100%; border-collapse: collapse; }
.pmr-table th, .pmr-table td { padding: 8px 10px; border-bottom: 1px solid var(--pmr-border); vertical-align: top; text-align: left; }
.pmr-table th { width: 35%; font-weight: 600; }
.pmr-inscription { margin: 0; white-space: pre-wrap; font-family: inherit; font-style: italic; background: none; padding: 0; }

.pmr-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pmr-card a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 8px; border: 1px solid var(--pmr-border); border-radius: 8px; text-decoration: none; color: inherit; }
.pmr-card a:hover { border-color: currentColor; }
.pmr-card img, .pmr-card-noimg { width: 100%; height: 120px; object-fit: cover; border-radius: 5px; }
.pmr-card-noimg { display: flex; align-items: center; justify-content: center; font-size: 2.4em; background: var(--pmr-soft); }
.pmr-card-title { font-weight: 600; }
.pmr-card-meta { font-size: .85em; opacity: .8; }
.pmr-card .pmr-badge { align-self: flex-start; }
.pmr-summary-needs { margin-top: .8em; }
.pmr-coords { font-size: .9em; opacity: .85; }

/* Карти */
.pmr-map-wrap { margin: 1em 0; }
.pmr-map { width: 100%; border-radius: 8px; z-index: 0; }
.pmr-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin-bottom: 10px; font-size: .9em; }
.pmr-filters label { display: flex; flex-direction: column; gap: 2px; }
.pmr-filters label.pmr-check { flex-direction: row; align-items: center; gap: 6px; }
.pmr-filters select { min-width: 150px; max-width: 100%; }
.pmr-count { margin-left: auto; opacity: .8; }
@media (max-width: 600px) { .pmr-filters label:not(.pmr-check) { flex: 1 1 100%; } .pmr-filters select { width: 100%; } .pmr-count { margin-left: 0; } }
.pmr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .85em; }
.pmr-legend-item { display: inline-flex; align-items: center; gap: 6px; cursor: help; }
.pmr-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.pmr-legend-item .pmr-dot { margin-right: 0; }

.pmr-pin-wrap { background: none; border: 0; }
.pmr-pin { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pmr-c, #5f6368); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pmr-pin > span { transform: rotate(45deg); color: #fff; font-size: 14px; line-height: 1; }
.pmr-pin-big { width: 34px; height: 34px; }
.pmr-pin-big > span { font-size: 17px; }

.pmr-popup img { width: 100%; height: 120px; object-fit: cover; border-radius: 4px; margin-bottom: 6px; }
.pmr-popup-parent, .pmr-popup-needs { font-size: 12px; opacity: .85; margin-top: 2px; }
.pmr-popup-meta { margin: 4px 0; font-size: 12px; }
.pmr-popup-meta .pmr-badge { font-size: 11px; padding: 1px 6px; }
.pmr-popup p { margin: 6px 0 !important; }
.pmr-popup-more { font-weight: 600; }

.pmr-glossary dt { font-weight: 600; margin-top: .8em; display: flex; align-items: center; }
.pmr-glossary dd { margin: .2em 0 0 18px; }

.pmr-external ul { padding-left: 1.2em; }
.pmr-muted { opacity: .7; }
.pmr-print-link { margin-top: 2em; font-size: .9em; }
.pmr-systems dt { font-weight: 600; margin-top: .9em; }
.pmr-systems dd { margin: .2em 0 0 0; }
.pmr-ext-link { font-weight: 400; font-size: .85em; }
.pmr-steps li { margin-bottom: .5em; }

/* Головна сторінка пам'яток */
.pmr-catalog-page { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; box-sizing: border-box; }
.pmr-catalog { --pmr-border: rgba(127,127,127,.3); --pmr-soft: rgba(127,127,127,.08); }
.pmr-cat-head { margin-bottom: 18px; }
.pmr-cat-title { margin: 0 0 8px; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; }
.pmr-cat-intro { max-width: 760px; font-size: 1.05em; line-height: 1.55; margin: 0 0 8px; }
.pmr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.pmr-stat { padding: 12px 14px; border: 1px solid var(--pmr-border); border-radius: 10px; }
.pmr-stat strong { display: block; font-size: 1.8em; line-height: 1.1; }
.pmr-stat span { font-size: .9em; opacity: .8; }
@media (max-width: 640px) { .pmr-stats { grid-template-columns: repeat(2, 1fr); } }
.pmr-status-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.pmr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--pmr-border); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: .88em; cursor: pointer; }
.pmr-chip .pmr-dot { background: var(--pmr-c); margin: 0; }
.pmr-chip.is-on { background: var(--pmr-c); border-color: var(--pmr-c); color: #fff; }
.pmr-chip.is-on .pmr-dot { background: #fff; }
.pmr-cat-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; padding: 12px; border-radius: 10px; background: var(--pmr-soft); font-size: .9em; }
.pmr-cat-filters label { display: flex; flex-direction: column; gap: 2px; }
.pmr-cat-filters label.pmr-check { flex-direction: row; align-items: center; gap: 6px; }
.pmr-cat-filters select, .pmr-cat-filters input[type=search] { min-width: 150px; max-width: 100%; padding: 6px 8px; }
.pmr-cat-search { flex: 1 1 220px; }
.pmr-cat-search input { width: 100%; }
.pmr-reset { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
@media (max-width: 640px) { .pmr-cat-filters label:not(.pmr-check) { flex: 1 1 100%; } .pmr-cat-filters select { width: 100%; } }
.pmr-cat-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 14px 0 8px; }
.pmr-view { display: inline-flex; border: 1px solid var(--pmr-border); border-radius: 8px; overflow: hidden; }
.pmr-view button { background: none; border: 0; padding: 6px 12px; font: inherit; font-size: .88em; color: inherit; cursor: pointer; }
.pmr-view button.is-on { background: var(--pmr-soft); font-weight: 600; }
.pmr-cat-map { height: 460px; border-radius: 10px; z-index: 0; }
@media (max-width: 640px) { .pmr-cat-map { height: 340px; } }
.pmr-cat-cards { margin-top: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pmr-cat-cards .pmr-card img, .pmr-cat-cards .pmr-card-noimg { height: 150px; }
.pmr-card-needs { font-size: .82em; color: #b3261e; }
.pmr-cat-empty { padding: 24px; text-align: center; opacity: .8; }

/* Сторінка пам'ятки */
.pmr-page { --pmr-border: rgba(127,127,127,.25); --pmr-soft: rgba(127,127,127,.07); }
.pmr-page h2 { font-size: 1.35em; margin: 0 0 .6em; }
.pmr-page section { margin: 0 0 2em; }
.pmr-admin-note { margin: 0 0 16px; padding: 10px 14px; border-left: 4px solid #8e6bbf; background: var(--pmr-soft); font-size: .9em; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.pmr-admin-todo { flex-basis: 100%; }
.pmr-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; margin: 8px 0 32px; align-items: start; }
@media (max-width: 860px) { .pmr-hero { grid-template-columns: 1fr; gap: 18px; } }
.pmr-hero-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
.pmr-thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pmr-thumb { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; width: 64px; height: 64px; overflow: hidden; }
.pmr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pmr-thumb.is-on, .pmr-thumb:focus-visible { border-color: currentColor; }
.pmr-photo-empty { aspect-ratio: 4 / 3; border: 2px dashed var(--pmr-border); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; background: var(--pmr-soft); }
.pmr-photo-empty-icon { font-size: 3em; opacity: .5; line-height: 1; }
.pmr-title { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.1; margin: 10px 0 8px; text-transform: none; letter-spacing: 0; }
.pmr-sub { font-size: 1.05em; margin: 0 0 14px; opacity: .9; }
.pmr-sub a { text-decoration: none; }
.pmr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pmr-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 8px; background: #1a73e8; color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: .95em; }
.pmr-btn:hover { filter: brightness(1.08); }
.pmr-btn:focus-visible { outline: 3px solid rgba(26,115,232,.45); outline-offset: 2px; }
.pmr-btn-ghost { background: transparent; color: inherit !important; border: 1px solid var(--pmr-border); font-weight: 500; }
.pmr-btn-ghost:hover { background: var(--pmr-soft); }
.pmr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
@media (max-width: 960px) { .pmr-layout { grid-template-columns: 1fr; } }
.pmr-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 960px) { .pmr-side { position: static; } }
.pmr-box { border: 1px solid var(--pmr-border); border-radius: 12px; padding: 16px; margin: 0 !important; }
.pmr-box h2 { font-size: 1.05em; margin-bottom: .6em; }
.pmr-box section { margin: 0; }
.pmr-facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .92em; }
.pmr-facts dt { opacity: .7; }
.pmr-facts dd { margin: 0; }
.pmr-side-map { height: 240px; }
.pmr-route { font-size: .9em; margin: 4px 0 0; }
.pmr-count { font-size: .7em; padding: 2px 8px; border-radius: 999px; background: var(--pmr-soft); vertical-align: middle; }
.pmr-needs-list { padding-left: 1.2em; }
.pmr-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; border-radius: 12px; background: var(--pmr-soft); margin-top: 8px; }
.pmr-help > div { flex: 1 1 380px; }
.pmr-help p { margin: 0; }
.pmr-near { margin-top: 32px; }

/* Немає фото: текст головний, заглушка компактна збоку */
.pmr-hero-nophoto { grid-template-columns: minmax(0, 1fr) 300px; }
.pmr-hero-nophoto .pmr-hero-media { order: 2; }
.pmr-hero-nophoto .pmr-hero-text { order: 1; }
.pmr-hero-nophoto .pmr-photo-empty { aspect-ratio: auto; min-height: 200px; padding: 18px; font-size: .92em; }
.pmr-hero-nophoto .pmr-photo-empty-icon { font-size: 2em; }
@media (max-width: 860px) {
	.pmr-hero-nophoto { grid-template-columns: 1fr; }
	.pmr-hero-nophoto .pmr-photo-empty { min-height: 0; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; }
}
.pmr-approx { font-size: .9em; margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(142,107,191,.1); }

/* ===== v0.6: каталог «список + карта» ===== */
.pmr-cat-searchbar { margin: 4px 0 14px; max-width: 760px; }
.pmr-cat-searchbar input[type=search] { width: 100%; min-height: 52px; padding: 0 16px; font-size: 1.1em; border: 2px solid var(--pmr-border); border-radius: 10px; box-sizing: border-box; }
.pmr-cat-searchbar input[type=search]:focus { border-color: #1a73e8; outline: none; }
.pmr-hint { margin: 6px 0 0; font-size: .88em; opacity: .8; }
.pmr-split { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
.pmr-split-map { position: sticky; top: 90px; }
.pmr-split-map .pmr-cat-map { height: calc(100vh - 140px); min-height: 420px; }
.pmr-map-toggle { display: none; }
@media (max-width: 900px) {
	.pmr-split { grid-template-columns: 1fr; }
	.pmr-split-map { position: static; order: -1; }
	.pmr-split-map .pmr-cat-map, .pmr-split-map .pmr-legend { display: none; }
	.pmr-split-map.is-open .pmr-cat-map { display: block; height: 60vh; }
	.pmr-split-map.is-open .pmr-legend { display: flex; }
	.pmr-map-toggle { display: block; width: 100%; min-height: 44px; border: 1px solid var(--pmr-border); border-radius: 8px; background: transparent; font: inherit; cursor: pointer; margin-bottom: 8px; }
}
.pmr-filters-box { border: 1px solid var(--pmr-border); border-radius: 10px; padding: 0 12px; }
.pmr-filters-box summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.pmr-filters-box .pmr-cat-filters { background: none; padding: 0 0 12px; flex-direction: column; align-items: stretch; }
.pmr-filters-box .pmr-cat-filters select { width: 100%; }
.pmr-active-count { font-weight: 400; opacity: .75; }
.pmr-sort { display: inline-flex; align-items: center; gap: 6px; font-size: .88em; }
.pmr-results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--pmr-border); }
.pmr-row { position: relative; border-bottom: 1px solid var(--pmr-border); }
.pmr-row-link { display: flex; gap: 12px; padding: 14px 44px 14px 4px; color: inherit; text-decoration: none; }
.pmr-row.is-hover, .pmr-row-link:hover { background: var(--pmr-soft); }
.pmr-row-link:focus-visible { outline: 3px solid rgba(26,115,232,.45); outline-offset: -3px; }
.pmr-row-media { flex: 0 0 72px; }
.pmr-row-media img, .pmr-row-noimg { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--pmr-soft); font-size: 1.6em; }
.pmr-row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pmr-row-num { font-size: .75em; letter-spacing: .02em; opacity: .7; }
.pmr-row-title { font-weight: 700; font-size: 1.05em; line-height: 1.25; }
.pmr-row-place { font-size: .9em; opacity: .85; }
.pmr-row-facts { font-size: .85em; margin-top: 4px; line-height: 1.5; }
.pmr-row-facts .pmr-dot { width: 9px; height: 9px; margin: 0 4px 0 2px; }
.pmr-row-extra { font-size: .82em; opacity: .85; }
.pmr-row-needs { color: #b3261e; }
.pmr-row-pin { position: absolute; right: 4px; top: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--pmr-c); color: #fff; font-size: 18px; cursor: pointer; }
.pmr-more { display: block; width: 100%; min-height: 44px; margin: 12px 0; border: 1px solid var(--pmr-border); border-radius: 8px; background: transparent; font: inherit; cursor: pointer; }
.pmr-reset-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.pmr-popup-dl { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; margin: 6px 0; font-size: 12px; }
.pmr-popup-dl dt { font-weight: 600; }
.pmr-popup-dl dd { margin: 0; }

/* ===== v0.6: картка ===== */
.pmr-numline { margin: 0 0 4px; font-size: .85em; opacity: .85; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.pmr-num { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--pmr-soft); font-weight: 600; letter-spacing: .02em; }
.pmr-num-official { background: rgba(179,38,30,.1); }
.pmr-keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 18px; margin: 14px 0; padding: 14px 0; border-top: 1px solid var(--pmr-border); border-bottom: 1px solid var(--pmr-border); }
.pmr-keyfacts dt { font-size: .78em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-bottom: 2px; }
.pmr-keyfacts dd { margin: 0; }
.pmr-keyfacts .pmr-dot { width: 10px; height: 10px; margin-right: 6px; }
.pmr-keyfacts-sub { display: block; font-size: .88em; opacity: .85; }
.pmr-photo-caption { font-size: .85em; opacity: .8; margin: 6px 0 0; min-height: 1em; }
.pmr-pagenav { position: sticky; top: 70px; z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; margin: 0 0 20px; background: var(--pmr-bg, #fff); border-bottom: 1px solid var(--pmr-border); }
.pmr-pagenav a { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: inherit; font-size: .9em; }
.pmr-pagenav a:hover { background: var(--pmr-soft); }
.pmr-pagenav span { font-size: .8em; opacity: .7; }
.pmr-page section[id], .pmr-side [id] { scroll-margin-top: 130px; }
.pmr-disclaimer { font-size: .82em; opacity: .75; border-top: 1px solid var(--pmr-border); padding-top: 12px; margin: 24px 0 12px; }

.pmr-photo-credit { font-size: .78em; opacity: .75; margin: 2px 0 0; }
.pmr-fig { margin: 0; }
.pmr-fig figcaption { font-size: .75em; opacity: .75; margin-top: 3px; }
.pmr-src-host { opacity: .6; font-size: .9em; }
.pmr-row-num.is-official { color: #b3261e; font-weight: 600; }

/* Сторінки громад і сіл */
.pmr-place-page { --pmr-border: rgba(127,127,127,.25); --pmr-soft: rgba(127,127,127,.07); }
.pmr-place-head { display: flex; gap: 16px; align-items: center; margin: 8px 0 12px; }
.pmr-place-coat { width: 72px; height: auto; }
.pmr-place-cards { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pmr-place-card a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--pmr-border); border-radius: 10px; text-decoration: none; color: inherit; min-height: 64px; }
.pmr-place-card a:hover, .pmr-place-card a:focus-visible { background: var(--pmr-soft); }
.pmr-coat img, .pmr-coat-empty { width: 40px; height: 48px; object-fit: contain; display: flex; align-items: center; justify-content: center; background: var(--pmr-soft); border-radius: 6px; font-weight: 700; }
.pmr-place-meta { display: block; font-size: .82em; opacity: .75; }
.pmr-place-kids summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.pmr-place-section h2 a { text-decoration: none; color: inherit; }
.pmr-place-filter { width: 100%; max-width: 420px; min-height: 44px; padding: 0 12px; border: 1px solid var(--pmr-border); border-radius: 8px; }
.pmr-cat-links { margin: 0 0 6px; font-size: .92em; }
.pmr-project-credit { margin: -2px 0 12px; color: #76816f; font: 12px/1.5 system-ui, sans-serif; }
.pmr-about-atlas { max-width: 820px; font: 13px/1.7 system-ui, sans-serif; margin: 12px 0 20px; }
.pmr-about-atlas summary { cursor: pointer; font-weight: 600; color: #4b6243; }
.pmr-about-atlas p { margin: 10px 0; }
.pmr-row-number-pending { font-size:11px; line-height:1.5; color:#82744e; }
