:root {
  --bg: #F5F0E4; --paper: #FFFDF8; --ink: #2B2723; --ink2: #4A433B; --muted: #6B6257;
  --line: #DDD3BE; --line2: #EAE2D0; --teal: #2C6E7C; --red: #9A3A33; --blue: #375A9E; --gold: #C9A45C; --grey: #9A958C;
  --serif: 'PT Serif', Georgia, serif; --sans: 'PT Sans', system-ui, sans-serif;
  --wrap: 1240px; --pad: max(3vw, 16px);
}
* { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--ink); }
a:hover { color: var(--teal); }
button { font: inherit; cursor: pointer; color: inherit; }
img { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* header */
.site-head { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; text-decoration: none; }
.brand b { font: 700 26px/1.2 var(--serif); }
.brand b span { font-weight: 400; color: #A39886; }
.brand small { font-size: 15px; color: var(--muted); }
.head-right { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; }
.nav a { text-decoration: none; padding: 6px 0; }
.nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); }
.nav-mail { position: relative; }
.nav-n { position: absolute; top: -1px; right: -11px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: #b3261e; color: #fff; font: 600 11px/17px var(--sans, sans-serif); text-align: center; box-sizing: border-box; }
.nav-n[hidden] { display: none; }
.langs { display: flex; gap: 2px; padding: 3px; background: var(--line2); border-radius: 8px; font-size: 14px; }
.langs button { border: 0; background: none; padding: 6px 10px; border-radius: 6px; color: var(--muted); min-height: 34px; }
.langs button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(43,39,35,.18); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* inputs */
.search { position: relative; display: flex; }
.search svg { position: absolute; left: 14px; top: 13px; pointer-events: none; }
.search input { flex: 1; height: 44px; padding: 0 14px 0 42px; font: 16px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid #CFC4AC; border-radius: 8px; }

/* intro row */
.intro { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 18px 0 16px; }
.intro p { flex: 1.5 1 380px; margin: 0; font-size: 15px; color: var(--muted); }
.intro .search { flex: 1 1 420px; }

/* map block */
.mapbox { display: flex; flex-wrap: wrap; border-radius: 12px; overflow: hidden; background: var(--paper); box-shadow: 0 1px 0 var(--line), 0 12px 32px rgba(43,39,35,.10); }
#map { flex: 999 1 560px; height: 454px; background: #EDF0E6; }
.card { flex: 1 1 340px; height: 454px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-left: 1px solid var(--line2); }
@media (max-width: 900px) { .card { height: auto; } }
.card h2 { margin: 0; font: 700 26px/1.15 var(--serif); hyphens: auto; }
.card .church { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.status { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 10px 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; font: 22px/1.1 var(--serif); white-space: nowrap; }
.quote { position: relative; margin: 0; padding: 12px 14px; background: var(--bg); border-radius: 10px; cursor: default; outline: none; }
.quote .qpop { position: absolute; left: -6px; right: -6px; bottom: -6px; z-index: 20; display: none; flex-direction: column; gap: 6px; max-height: 330px; overflow-y: auto; padding: 12px 14px; background: var(--paper); border-radius: 12px; box-shadow: 0 14px 36px rgba(43,39,35,.24); }
.quote.open .qpop { display: flex; }
.quote .qtop { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.quote .qtop b { flex: 1 1 auto; min-width: 0; }
.quote .qtop span { flex: none; white-space: nowrap; }
.quote .qtop button { flex: none; white-space: nowrap; border: 0; background: none; color: var(--teal); font-size: 13px; min-height: 28px; padding: 0 0 0 6px; }
.quote .qpop p { margin: 0; font: 15px/1.45 var(--serif); }
.quote .qpop .qsrc { display: block; font-size: 12px; color: var(--muted); white-space: normal; }
.quote figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.quote figcaption > span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote figcaption button { flex: none; white-space: nowrap; border: 0; background: none; color: var(--teal); font-size: 13px; font-weight: 400; min-height: 32px; }
.quote blockquote { margin: 4px 0 6px; font: 15px/1.45 var(--serif); height: calc(1.45em * 4); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.quote.vq blockquote { height: calc(1.45em * 3); -webkit-line-clamp: 3; margin-bottom: 0; }   /* в карточке места меньше места: источник — только во всплывающем окне */
.quote.vq > span { display: none; }
.quote.vq.q2 blockquote { height: calc(1.45em * 2); -webkit-line-clamp: 2; }
.quote.vq.q1 blockquote { height: 1.45em; -webkit-line-clamp: 1; }
.quote span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-line { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--ink); border-radius: 8px; text-decoration: none; margin-top: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13px; color: var(--ink2); }
.legend span { display: flex; align-items: center; gap: 8px; }
.badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; flex: none; }

/* markers */
.mk { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0; }
.cl { transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--gold); background: var(--ink); color: var(--paper); font: 700 15px var(--sans); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1.5px var(--paper), 0 4px 10px rgba(43,39,35,.35); padding: 0; }
.mk .ring { position: relative; display: flex; border-radius: 50%; padding: 3px; box-shadow: 0 0 0 1.5px #5A4636, 0 4px 10px rgba(43,39,35,.35); }
.mk img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.mk .noimg { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #F1E8D4; color: #8A7A60; }
.mk .rite { position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--paper); display: flex; align-items: center; justify-content: center; }
.mk .lbl { font: italic 15px/1.3 var(--serif); color: var(--ink); background: rgba(255,253,248,.92); border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.leaflet-div-icon { background: none; border: 0; }

/* eras */
.eras { display: flex; flex-wrap: wrap; margin-top: 10px; }
.eras button { flex: 1 1 130px; display: flex; flex-direction: column; align-items: center; gap: 0; min-height: 0; padding: 0 6px 4px; border: 0; border-top: 1px solid #D8CFBC; border-radius: 0 0 6px 6px; background: transparent; font-size: 12.5px; line-height: 1.25; color: var(--muted); }
.eras button i { width: 7px; height: 7px; margin: -4px 0 3px; border-radius: 50%; background: var(--bg); border: 1.5px solid #CFC4AC; }
.eras button[aria-pressed="true"] { background: rgba(255,253,248,.7); box-shadow: none; color: var(--ink); }
.eras button[aria-pressed="true"] i { background: var(--ink); border-color: var(--ink); }
.eras small { font-size: 10.5px; color: var(--muted); opacity: .85; }
.eras button.soon { color: var(--muted); }
.note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* bottom */
.bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px 64px; padding-top: 32px; padding-bottom: 32px; align-items: stretch; }
.bottom h2 { margin: 0 0 8px; font: 700 19px/1.25 var(--serif); }
.bottom p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: var(--ink2); }
.recent { display: flex; flex-direction: column; }
.recent ul { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; flex-direction: column; }
.recent li { font-size: 14px; }
.recent li span { font-size: 12px; color: var(--muted); }
.parish-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.parish-list a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 4px; background: var(--paper); border-radius: 999px; text-decoration: none; box-shadow: 0 1px 0 var(--line); }
.parish-list img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
footer { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 24px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }

/* parish page */
.back { font-size: 14px; color: var(--muted); text-decoration: none; }
.phero { position: relative; display: flex; align-items: center; margin-top: 4px; }
.phero img { position: absolute; right: 0; bottom: 0; height: 140%; width: auto; max-width: 100%; object-fit: cover; object-position: right bottom;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.2) 35%, #000 78%), linear-gradient(to bottom, #000 80%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.2) 35%, #000 78%), linear-gradient(to bottom, #000 80%, transparent 100%); mask-composite: intersect; }
.phero div { position: relative; padding: 2px 0; }
.phero h1 { margin: 0; font: 700 38px/1.05 var(--serif); }
.phero p { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; color: var(--ink2); }
.desc { margin: 8px 0 24px; font-size: 13px; line-height: 1.6; color: var(--muted); }
@media (max-width: 760px) { .phero { display: block; } .phero img { position: static; width: 100%; height: auto; -webkit-mask-image: none; mask-image: none; } }

.finds-head { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.finds-head .linkbtn { font-size: 13px; }
.finds-head h2 { margin: 0; font: 700 17px var(--serif); }
.linkbtn { border: 0; background: none; color: var(--teal); font-size: 14px; min-height: 36px; padding: 0 4px; }
.finds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
@media (max-width: 900px) { .finds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .finds { grid-template-columns: 1fr; } }
.find { position: relative; }
.find > button { width: 100%; height: 104px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; text-align: left; background: var(--paper); border: 0; border-radius: 12px; box-shadow: 0 1px 0 var(--line); }
.find .top { display: flex; justify-content: space-between; gap: 8px; width: 100%; font-size: 11px; color: var(--muted); }
.find .top span { white-space: nowrap; }
.find .txt { flex: none; font: 13px/1.3 var(--serif); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.find .src { margin-top: auto; font-size: 11px; color: var(--muted); }
.find .pop { position: absolute; left: -6px; right: -6px; top: -6px; z-index: 20; display: none; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--paper); border-radius: 12px; box-shadow: 0 14px 36px rgba(43,39,35,.24); }
.find.open .pop { display: flex; }
.find .pop p { margin: 0; font: 13px/1.45 var(--serif); }
.tag-record { color: var(--red); } .tag-fact { color: var(--teal); }

.panel { background: var(--paper); border-radius: 12px; padding: 18px 20px 14px; box-shadow: 0 1px 0 var(--line); }
.panel-head { display: flex; flex-wrap: wrap; gap: 2px 24px; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.panel-head b { color: var(--muted); }
.readout.on { color: var(--ink); font-weight: 700; }
.series { display: flex; gap: 12px; align-items: flex-end; margin-top: 14px; }
.series .lab { flex: none; width: 92px; line-height: 1.2; padding-bottom: 2px; }
.series .lab span { display: block; font-size: 13px; color: var(--muted); }
.series .lab b { display: block; font: 400 20px var(--serif); }
.bars { flex: 1; display: flex; align-items: stretch; gap: 1px; height: 48px; border-bottom: 1px solid #CFC4AC; }
.bars span { flex: 1; min-width: 0; display: flex; align-items: flex-end; }
.bars i { width: 100%; border-radius: 2px 2px 0 0; }
.bars span:hover i, .bars span.on i { background: var(--ink) !important; }
.axis { position: relative; height: 18px; margin: 4px 0 0 104px; font-size: 12px; color: var(--muted); }
.axis span { position: absolute; transform: translateX(-50%); }

.records { margin-top: 28px; }
.rec-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.tabs { display: flex; padding: 3px; background: var(--line2); border-radius: 10px; }
.tabs button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 15px; }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(43,39,35,.18); }
.rec-head .search { flex: 1 1 320px; max-width: 460px; }
.yrs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.yrs span:first-child { margin-right: 4px; }
.yrs input { width: 78px; height: 44px; padding: 0 10px; font: 16px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid #CFC4AC; border-radius: 8px; -moz-appearance: textfield; }
.yrs input::-webkit-inner-spin-button, .yrs input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.yrs button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--line2); color: var(--ink); font-size: 18px; line-height: 1; }
.tablebox { overflow-x: auto; margin-top: 12px; background: var(--paper); border-radius: 12px; box-shadow: 0 1px 0 var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #E6DDCA; }
th { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; position: sticky; top: 0; background: var(--paper); }
td.nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.more { padding: 10px 12px; }
.pager { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.pager select { font: 15px var(--sans); color: var(--ink); min-height: 36px; padding: 0 8px; margin-left: 6px; background: var(--paper); border: 1px solid #CFC4AC; border-radius: 8px; }
.pages { display: flex; align-items: center; gap: 12px; }
.pages button { min-height: 36px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 8px; background: none; }
.pages button:disabled { opacity: .35; cursor: default; }
.more button { min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 8px; background: none; }
.count { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.dl { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; padding: 18px 20px; background: var(--paper); border-radius: 12px; box-shadow: 0 1px 0 var(--line); }
.dl h2 { margin: 0 0 4px; font: 700 20px var(--serif); }
.dl p { margin: 0; font-size: 14px; color: var(--muted); }
.dl div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.dl a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 8px; text-decoration: none; }
.dl a.primary { background: var(--ink); color: var(--paper); }
.sources { margin-top: 36px; margin-bottom: 48px; }
.sources h2 { margin: 0 0 10px; font: 400 24px var(--serif); }
.empty { padding: 16px; color: var(--muted); }
@media (max-width: 600px) { .series .lab { width: 76px; } .axis { margin-left: 88px; } .card { border-left: 0; border-top: 1px solid var(--line2); } }

.bars span { cursor: pointer; }
.ok { color: var(--teal); font-weight: 700; cursor: help; }

/* переключатель режимов карты: храмы / деревни */
.mapbox { position: relative; }
.mapctl { position: absolute; z-index: 1000; left: 12px; top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.modes { display: inline-flex; gap: 2px; margin: 0; padding: 2px; background: #EFE7D6; border-radius: 8px; box-shadow: 0 1px 4px rgba(43,39,35,.2); }
.modes button { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; }
.modes button b { font-weight: 600; }
.modes button i { font-style: normal; font-size: 12px; color: var(--muted); }
.modes button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(43,39,35,.16); }
.modes .mi { flex: none; }
.modes button[aria-selected="true"] .mi { color: var(--red); }
.modes button[data-m="v"][aria-selected="true"] .mi { color: var(--teal); }
.vdot { display: block; border-radius: 50%; position: relative; box-shadow: 0 0 0 1.2px #3E5A5F, 0 2px 5px rgba(43,39,35,.3); }
.vdot::after { content: ''; position: absolute; inset: 22%; border-radius: 50%; background: var(--paper); }
.vmk.sel .vdot { box-shadow: 0 0 0 2.5px var(--ink), 0 3px 8px rgba(43,39,35,.4); }
.mk .lbl.vl { font-size: 13px; }
.vcl { width: 21px; height: 21px; font-size: 10.5px; border-width: 2px; border-color: var(--teal); }
.revs { display: flex; flex-direction: column; gap: 6px; }
.revs-t { font-size: 12px; color: var(--muted); }
.revs > div { display: flex; flex-wrap: wrap; gap: 6px; }
.rv { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 13px; font: 13px var(--sans); }
.rv.idx { background: var(--teal); color: var(--paper); }
.rv.idx::after { content: ' ✓'; white-space: pre; }
.rv.ex { border: 1px solid #B9AE98; color: var(--ink2); }
.rv.lost { color: #A79C8A; text-decoration: line-through; }
.legend .rv { min-height: 22px; font-size: 12px; padding: 0 7px; }
.byrev { margin-top: -8px; font-size: 12px; color: var(--muted); }
.owner { font-size: 14px; }
.demo { font-size: 12px; color: var(--red); }
.btn-line.off { color: var(--muted); border-color: #CFC4AC; border-style: dashed; }
.card .church a { color: var(--teal); }
.card h2.ttl .ti { margin-right: 4px; vertical-align: -1px; }
.card h2.ttl .ti.house { vertical-align: -2.7px; }
.empty-v { margin: 0; font: 15px/1.5 var(--serif); color: var(--ink2); }

/* карточка храма держит одну раскладку: статус в одну строку, числа всегда на месте, дата записи не обрезается */
.status { white-space: nowrap; min-width: 0; }
.status .dot { flex: none; }
.status .st { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.status .yrs-c { white-space: nowrap; }
.stats dd.nil { color: #B9AE98; }
.quote figcaption > span.fc { display: flex; min-width: 0; overflow: hidden; text-overflow: clip; }
.quote figcaption .fc b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote figcaption .fc .fd { flex: none; white-space: nowrap; }

/* списки прихожан / исповедные ведомости */
.lists-head { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lists-head h2 { margin: 0; font: 400 24px var(--serif); }
.conv-intro { font-size: 13.5px; color: var(--muted); margin: -4px 0 12px; }
.lstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px 16px; margin: 0 0 14px; padding: 14px 18px; background: var(--paper); border-radius: 12px; box-shadow: 0 1px 0 var(--line); }
.lstats div { display: flex; flex-direction: column-reverse; }
.lstats dt { font-size: 12px; color: var(--muted); }
.lstats dd { margin: 0; font: 24px/1.15 var(--serif); white-space: nowrap; }
.lstats dd small { font: 13px var(--sans); color: var(--muted); }
.byplace { margin: 0 0 16px; }
.byplace summary { cursor: pointer; color: var(--teal); font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.byplace td.num, .byplace th.num { text-align: right; white-space: nowrap; }
.byplace tbody tr { cursor: pointer; }
.byplace tbody tr:hover { background: var(--bg); }
.lsel select { height: 44px; max-width: 300px; padding: 0 10px; font: 15px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid #CFC4AC; border-radius: 8px; }
.lists .hhn { display: block; font-size: 12px; color: var(--muted); }
.lists td.raw { font-family: var(--serif); }
.lists tr.head1 td { border-top: 1px solid var(--line2); }
.tabs[hidden] { display: none; }
/* страница деревни */
.vhero p { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vhero .vh { color: var(--teal); flex: none; }
.vhero a { color: var(--teal); }
.sources .hhn { display: block; font-size: 12px; color: var(--muted); }
.lstats dt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* компактные таблицы записей (28.11.2026): мельче шрифт и отступы */
table { font-size: 13px; line-height: 1.35; }
th, td { padding: 5px 8px; }
th { font-size: 11px; }
.lists .hhn, .sources .hhn { font-size: 11px; }
.lists td:first-child .hhn { display: inline; margin-left: 6px; white-space: nowrap; }
.lists td:first-child { white-space: nowrap; }
.lists td.raw { font-size: 13.5px; }
.more { padding: 8px 10px; }
.lists td:nth-child(3) .hhn { display: inline; margin-left: 6px; }
.sform { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; max-width: 900px; }
@media (max-width: 640px) { .sform { grid-template-columns: 1fr; } }

/* документ на странице деревни */
.ddesc{margin:4px 0 14px}
.ddesc p{margin:0 0 6px;font-size:15px;line-height:1.5}
.ddesc .dplace{font-size:13.5px;color:var(--muted)}
.ddesc .dplace a{color:var(--teal)}
.lsel[hidden]{display:none}
.vhero + .desc[hidden] + #finds-sec{margin-top:22px}

.intro .cnt{font-weight:700;color:var(--ink)}

/* ползунок лет на карте — компактный и неброский */
.myrs { width: 168px; padding: 3px 8px 1px; background: rgba(239,231,214,.82); border-radius: 7px; box-shadow: 0 1px 3px rgba(43,39,35,.14); font-size: 11px; color: var(--muted); }
.myrs-top { display: flex; align-items: baseline; gap: 5px; line-height: 1.2; }
.myrs-top b { color: var(--ink); font-weight: 600; font-size: 11.5px; }
.myrs-top button { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 13px; line-height: 1; padding: 0 1px; cursor: pointer; }
.myrs-rng { position: relative; height: 16px; }
.myrs-rng::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 2px; border-radius: 1px; background: #CFC4AC; }
.myrs-bar { position: absolute; top: 7px; height: 2px; border-radius: 1px; background: var(--teal); }
.myrs-rng input { position: absolute; left: 0; top: 0; width: 100%; height: 16px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.myrs-rng input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--teal); cursor: pointer; }
.myrs-rng input::-moz-range-thumb { pointer-events: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--teal); cursor: pointer; }
.myrs-rng input::-webkit-slider-runnable-track { background: none; }
.myrs-rng input::-moz-range-track { background: none; }

/* легенда как фильтр */
.legend .lf { display: flex; align-items: center; gap: 8px; padding: 2px 8px 2px 2px; margin: -2px 0; border: 0; border-radius: 14px; background: none; font: inherit; color: inherit; cursor: pointer; }
.legend .lf:hover { background: rgba(255,253,248,.7); }
.legend .lf[aria-pressed="true"] { background: var(--paper); box-shadow: 0 1px 3px rgba(43,39,35,.16); }
.legend.filtering .lf[aria-pressed="false"] { opacity: .5; }

/* значок храма в карточке, справа вверху */
.card { position: relative; }
.cicon { position: absolute; top: 16px; right: 18px; width: 68px; height: 68px; padding: 3px; border-radius: 50%; box-shadow: 0 1px 4px rgba(43,39,35,.18); }
.cicon img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--paper); }
.card.has-icon h2.ttl, .card.has-icon .church, .card.has-icon .status { padding-right: 76px; }
.card.has-icon .church { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.has-icon h2.ttl { white-space: nowrap; }
.ddesc details.sibs summary { cursor: pointer; color: var(--teal); }
.ddesc details.sibs p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.6; }

/* ---------- вход и аккаунт ---------- */
.acct { display: flex; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 14px; text-decoration: none; cursor: pointer; }
.acct-btn:hover { border-color: var(--ink2); }
.acct-btn.in { padding: 0 12px 0 5px; }
.acct-btn img, .ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ava { display: inline-flex; align-items: center; justify-content: center; background: var(--teal); color: #fff; font-weight: 700; font-size: 14px; }
.ava.big, .acct-ph { width: 56px; height: 56px; font-size: 24px; border-radius: 50%; flex: none; }
.acct-btn .nm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-dlg { border: 0; border-radius: 14px; padding: 28px 30px 22px; width: min(400px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 18px 50px rgba(43,39,35,.28); }
.acct-dlg::backdrop { background: rgba(43,39,35,.35); }
.al-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 24px; color: var(--muted); width: 36px; height: 36px; cursor: pointer; }
.acct-dlg h2, .al-inline h2 { font-family: 'PT Serif', Georgia, serif; font-size: 24px; margin: 0 0 6px; }
.al-lead { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); }
.al-google { width: 100%; min-height: 44px; border: 1px solid var(--ink); border-radius: 8px; background: var(--paper); font-size: 15px; cursor: pointer; }
.al-google:hover, .al-main:hover { filter: brightness(.97); }
.al-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; font-size: 12.5px; color: var(--muted); }
.al-or::before, .al-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.al-form label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--ink2); }
.al-form label small { color: var(--muted); }
.al-form input, .acct-name input { display: block; width: 100%; margin-top: 4px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); }
.al-form input:focus, .acct-name input:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
.al-main { width: 100%; min-height: 44px; border: 0; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 15px; cursor: pointer; }
.al-main:disabled { opacity: .6; }
.al-msg { min-height: 0; margin: 0 0 8px; font-size: 13px; color: var(--red); }
.al-msg:empty { display: none; }
.al-msg.ok { color: var(--teal); }
.al-links { display: flex; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; }
.al-links .linkbtn { font-size: 13px; padding: 0; }
.acct-main { max-width: 640px; }
.acct-h1 { font-family: 'PT Serif', Georgia, serif; font-size: 36px; margin: 18px 0 14px; }
.acct-card { background: var(--paper); border-radius: 14px; padding: 22px 24px; box-shadow: 0 1px 4px rgba(43,39,35,.08); }
.al-inline { max-width: 400px; }
.acct-top { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 16px; }
.acct-top { align-items: center; }
.acct-name { flex: 1; min-width: 0; }
.an-lbl { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 2px; }
.an-row { display: flex; align-items: baseline; gap: 4px; }
.an-row[hidden], .an-form[hidden] { display: none; }
.an-v { font: 700 22px/1.25 var(--serif); }
.an-ed { border: 0; background: none; padding: 0 4px; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; opacity: .6; }
.an-ed:hover, .an-ed:focus-visible { opacity: 1; color: var(--teal); }
.an-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.an-form input { flex: 1; min-width: 180px; }
.acct-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 16px; font-size: 14.5px; }
.acct-dl dt { color: var(--muted); }
.acct-dl dd { margin: 0; }
.acct-dl .linkbtn { min-height: 0; padding: 0; font-size: 13.5px; }
.v-ok { color: var(--teal); } .v-no { color: var(--red); }
.acct-act, .acct-confirm { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.acct-act .btn-line, .acct-confirm .btn-line { margin: 0; padding: 0 22px; background: none; font: inherit; cursor: pointer; }
.danger { color: var(--red) !important; }
.btn-line.danger { border-color: var(--red); }
.acct-confirm { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line2); }
.acct-confirm p { flex-basis: 100%; margin: 0; font-size: 14px; }
.acct-soon { margin: 18px 0 6px; font-size: 14px; color: var(--ink2); }
.acct-priv { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ---------- воспоминания ---------- */
.mem { margin: 34px 0 10px; }
.mem-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mem-head h2, .mem-acc h2 { margin: 0; font: 400 24px var(--serif); }
.mem-head .btn-line { margin: 0; padding: 0 20px; background: var(--paper); font: inherit; font-size: 15px; cursor: pointer; }
.mem-lead { margin: 6px 0 16px; max-width: 760px; font-size: 14px; color: var(--muted); }
.mem-list { display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.mem-card { background: var(--paper); border-radius: 12px; padding: 18px 20px 14px; box-shadow: 0 1px 4px rgba(43,39,35,.08); }
.mem-card h3 { margin: 0 0 8px; font: 700 18px/1.3 var(--serif); }
.mem-text { font: 15px/1.55 var(--serif); color: var(--ink2); max-height: 9.3em; overflow: hidden; position: relative; }
.mem-card:not(.open) .mem-text::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2.4em; background: linear-gradient(rgba(255,253,248,0), var(--paper)); }
.mem-card.open .mem-text { max-height: none; }
.mem-text p { margin: 0 0 .6em; }
.mem-more { padding: 0; min-height: 28px; font-size: 13.5px; }
.mem-by { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.mem-none { margin: 0; font-size: 14px; color: var(--muted); }
.mem-form { background: var(--paper); border-radius: 12px; padding: 20px 22px; margin-bottom: 16px; max-width: 760px; box-shadow: 0 1px 4px rgba(43,39,35,.08); }
.mem-form label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--ink2); }
.mem-form input:not([type=checkbox]), .mem-form textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: 15px/1.5 var(--sans, inherit); color: var(--ink); resize: vertical; }
.mem-form textarea { font-family: var(--serif); }
.mem-form input:focus, .mem-form textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.mem-form .chk { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); }
.mem-form .chk small { color: var(--muted); }
.mem-rules { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.mem-btns { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mem-btns .al-main { width: auto; padding: 0 22px; }
.mem-btns .btn-line { margin: 0; padding: 0 20px; background: none; font: inherit; cursor: pointer; }
.mem-acc { margin-top: 16px; }
.mem-acc h2 { font-size: 20px; margin-bottom: 10px; }
.mem-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line2); font-size: 14px; flex-wrap: wrap; }
.mem-row .linkbtn { min-height: 0; padding: 0 0 0 12px; font-size: 13px; }
.mem-date { margin-left: 8px; font-size: 12.5px; color: var(--muted); }
.mem-st { font-size: 12.5px; padding: 2px 8px; border-radius: 10px; background: var(--line2); }
.mem-st.published { background: #DCEBEA; color: var(--teal); }
.mem-st.rejected { background: #F1DEDA; color: var(--red); }
.mem-mod .mem-card { box-shadow: none; border: 1px solid var(--line); margin-bottom: 12px; }
.mem-where { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.mem-n { display: inline-block; min-width: 24px; padding: 0 7px; border-radius: 12px; background: var(--red); color: #fff; font: 700 13px/22px var(--sans, inherit); text-align: center; vertical-align: middle; }
.mem-pub summary { cursor: pointer; color: var(--teal); font-size: 14px; margin-top: 6px; }
.acct-confirm[hidden], .mem-form[hidden] { display: none; }
.mem-row > div:last-child { flex: none; white-space: nowrap; }
.mem-row > div:first-child { flex: 1; min-width: 0; }

/* кнопка входа — как пункты меню (решение автора 28.11) */
.acct-btn { min-height: 0; padding: 6px 0; border: 0; border-radius: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); }
.acct-btn:hover { border: 0; }
.acct-btn.in { padding: 2px 0; gap: 7px; }
.acct-btn[aria-current="page"] .nm { border-bottom: 1px solid var(--ink); }
.acct-btn img { width: 30px; height: 30px; border-radius: 50%; }
.acct-phb { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.acct-phb:hover img { box-shadow: 0 0 0 2px var(--teal); }
.acct-ph { width: 64px; height: 64px; }
.ava-pick { display: flex; flex-direction: column; gap: 8px; margin: -4px 0 16px; }
.ava-sex { display: inline-flex; align-self: flex-start; background: var(--line2); border-radius: 8px; padding: 3px; }
.ava-sex button { border: 0; background: none; font: inherit; font-size: 14px; padding: 4px 14px; border-radius: 6px; cursor: pointer; color: var(--ink2); }
.ava-sex button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(43,39,35,.12); }
.ava-vars { display: flex; flex-wrap: wrap; gap: 8px; }
.ava-pick .ava-note { font-size: 12.5px; }
.ava-pick p { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); }
.ava-vars button { border: 2px solid transparent; border-radius: 50%; padding: 0; background: none; cursor: pointer; }
.ava-vars button[aria-pressed="true"] { border-color: var(--teal); }
.ava-vars img { display: block; width: 52px; height: 52px; border-radius: 50%; }
.ava-pick[hidden] { display: none; }

/* страница места: описание документа мельче, воспоминания среди находок, кнопка у названия */
.ddesc p { font-size: 13.5px !important; line-height: 1.5 !important; color: var(--ink2); }
.vhero { justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vhero .mem-add-top { flex: none; margin: 0; padding: 0 18px; min-height: 40px; background: var(--paper); font: inherit; font-size: 14.5px; cursor: pointer; }
.tag-mem { color: var(--teal); }
.mem-find .txt b { font-weight: 700; }
.find .pop h3 { margin: 0; font: 700 15px/1.3 var(--serif); }
.find .pop .mtxt { max-height: 320px; overflow: auto; font: 13px/1.5 var(--serif); }
.find .pop .mtxt p { margin: 0 0 .5em; }
#rev-sec > details.byplace:first-of-type { margin-top: 18px; }
.mem-dlg { width: min(640px, calc(100vw - 32px)); }
.mem-dlg .mem-form { box-shadow: none; padding: 0; margin: 0; max-width: none; }
.mem-dlg h2 { margin: 0 0 4px; }
.recent li a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
.recent li a:hover { text-decoration-color: var(--ink); }

/* шаги от места к храму прихода */
.step { position: absolute; display: block; color: var(--ink2); opacity: 0; animation: stepIn .25s ease-out forwards; pointer-events: none; }
.step.still, .step-dest.still { animation: none; opacity: .55; }
.step-dest.still { opacity: 1; }
@keyframes stepIn { 0% { opacity: 0; } 60% { opacity: .9; } 100% { opacity: .55; } }
.step-dest { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 5px; opacity: 0; animation: destIn .4s ease-out forwards; cursor: pointer; white-space: nowrap; }
.step-dest .badge { box-shadow: 0 0 0 2px var(--paper), 0 3px 8px rgba(43,39,35,.35); }
.step-dest .lbl { font: italic 13px/1.3 var(--serif); color: var(--ink); background: rgba(255,253,248,.92); border-radius: 6px; padding: 0 6px; }
@keyframes destIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.card .walk { display: block; margin-top: 3px; font-size: 12.5px; color: var(--teal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .step, .step-dest { animation: none; opacity: .55; } .step-dest { opacity: 1; } }
#rtabs { flex-wrap: wrap; }
#rtabs button { white-space: nowrap; }

/* пустая карточка на главной: фигурка и приглашение */
.welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 10px 8px; }
.welcome img { height: 230px; width: auto; max-width: 70%; object-fit: contain; }
.welcome h2 { margin: 4px 0 0; font: 400 24px/1.25 var(--serif); }
.welcome p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); max-width: 260px; }
/* карточка места: цифры по последнему документу — компактнее, чем у храмов */
.stats.vst { padding: 6px 0; gap: 6px; }
.stats.vst dd { font-size: 17px; }
.stats.vst dt { font-size: 11px; }
.stats.vst + .byrev { margin-top: -9px; font-size: 11px; }

/* документы места — строкой лет */
.revs > .ylist { display: flex; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; font: 14px/1.5 var(--sans); }
.ylist .y { cursor: default; }
.ylist .y.gap::before, .ylist .y.gap + .y::before { content: none !important; }
.ylist .y.gap { padding: 0 6px; }
.ylist .y.n { padding-left: 8px; font-size: 12.5px; }
.ylist .y + .y:not(.n)::before { content: '·'; padding: 0 6px; color: #B9AE98; text-decoration: none; display: inline-block; }
.ylist .y.idx { color: var(--teal); font-weight: 600; }
.ylist .y.ex { color: var(--muted); }
.ylist .y.lost { color: #B9AE98; text-decoration: line-through; }
.ylist .y.gap, .ylist .y.n { color: var(--muted); font-weight: 400; }

/* «Предложить правку»: ✎ в конце строки записи; таблица не меняется, правка идёт составителю */
.fix { display: none; margin-left: 8px; padding: 0 4px; min-height: 0; border: 0; background: none; color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; opacity: .35; vertical-align: baseline; }
.can-fix .fix { display: inline-block; }
.can-fix td:has(> .fix) { position: relative; padding-right: 30px; }
.can-fix td > .fix { position: absolute; right: 6px; top: 5px; margin: 0; line-height: 1.45; }
tr:hover .fix, .fix:focus-visible { opacity: 1; color: var(--teal); }
@media (hover: none) { .fix { opacity: .6; } }
.fix-dlg { width: min(720px, calc(100vw - 32px)); }
.fix-rec { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.fix-rec b { color: var(--ink); font-weight: 600; }
.fix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
.mem-form .fix-f { margin-bottom: 10px; font-size: 12.5px; }
.mem-form .fix-f input, .mem-form .fix-f textarea { padding: 6px 10px; font-size: 14.5px; }
.fix-more { margin: 2px 0 12px; }
.fix-more summary { cursor: pointer; color: var(--teal); font-size: 13.5px; margin-bottom: 8px; }
.fix-nav { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.fix-nav .linkbtn { min-height: 0; padding: 0; font-size: 13.5px; }
.fix-nav .linkbtn[disabled] { visibility: hidden; }
.fix-nav .fix-rec { margin: 0; text-align: center; }
.mem-form .fix-f .chg { border-color: var(--teal); background: #EEF6F5; }
.fix-key { font-size: 12px; color: var(--muted); }
.fix-log { list-style: none; margin: 10px 0 0; padding: 0; max-height: 66px; overflow: auto; font-size: 12.5px; color: var(--muted); }
.fix-log:empty { display: none; }
.fix-log li.ok { color: var(--teal); }
.fix-log li.bad { color: var(--red); }
.fix-log .linkbtn { min-height: 0; padding: 0 0 0 6px; font-size: 12.5px; }
tr.fixing td { background: #FFF4D6; }

/* Кошелёк: монеты сайта (рисунки автора: грош — медь, злотый — золото, талер — серебро с гербами) */
.coin { display: inline-block; width: 1.15em; height: 1.15em; margin-right: .3em; vertical-align: -.22em; background: center / contain no-repeat; }
.coin.gr { background-image: url(../../img/coins/grosz.webp); }
.coin.zl { background-image: url(../../img/coins/zloty.webp); }
.coin.tal { background-image: url(../../img/coins/taler.webp); }
.acct-coins { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; font: 600 14px/1 var(--sans, inherit); color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.acct-coins span { display: inline-flex; align-items: center; }
.acct-coins .coin { width: 20px; height: 20px; margin-right: 4px; vertical-align: 0; }
.acct-coins:hover { color: var(--teal); }
.acct { align-items: center; }
.coin-amt { white-space: nowrap; margin-right: .5em; }
.wal-msg { color: var(--red); }
.wal-op.plus { color: var(--teal); }
.wal-op.minus { color: var(--ink2); }

/* шапка в одну строку (решение автора 28.11): на широком экране не переносится; если тесно — прячется подзаголовок */
@media (min-width: 900px) {
  .site-head, .head-right { flex-wrap: nowrap; }
  .head-right { gap: 10px 22px; }
  .brand { flex-wrap: nowrap; white-space: nowrap; }
}
@media (min-width: 900px) and (max-width: 1279px) { .site-head:has(.acct-coins) .brand small { display: none; } }
@media (min-width: 900px) and (max-width: 1140px) { .brand small { display: none; } }
/* аккаунт: кошелёк справа от карточки (решение автора 28.11), на узком экране — под ней */
.acct-cols { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 420px); gap: 24px; align-items: start; }
.acct-cols .acct-main { max-width: none; }
#acct-wallet .wal { margin-top: 0; }
@media (max-width: 1000px) { .acct-cols { grid-template-columns: minmax(0, 640px); } #acct-wallet .wal { margin-top: 16px; } .acct-side { order: 1; } }

/* кошелёк — тем же текстом, что карточка аккаунта и «Мои воспоминания» */
.wal-bag { width: 28px; height: 28px; margin-right: 8px; vertical-align: -5px; }
.wal .acct-dl { margin: 12px 0 14px; }
.wal .acct-dl dd .coin { width: 18px; height: 18px; }
.wal .coin-amt { margin-right: .6em; }
.wal-buy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14.5px; }
.wal-buy .btn-line[disabled] { opacity: .45; cursor: default; }
.wal .mem-none { margin-bottom: 8px; }
.wal-rank { display: inline-block; padding: 0 9px; border-radius: 10px; background: #DCEBEA; color: var(--teal); font-size: 13.5px; }
.wal-offer { margin: 0 0 8px; font-size: 14.5px; }
.wal-buy .mem-none { margin: 0; }
.sostav td.num, .sostav th.num { text-align: right; } .sostav-note { font-size: 13px; color: var(--ink2); margin: 10px 0 4px; } #sostav-src a { color: inherit; }

/* «Управление» (admin.html) */
.wal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wal-head h2 { margin: 0; }
.wal-adm.btn-line { display: inline-flex; align-items: center; min-height: 30px; margin: 0; padding: 0 12px; font-size: 13px; text-decoration: none; white-space: nowrap; }
.adm-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 6px 0 18px; }
.adm-tiles a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--card, #fffdf7); color: var(--ink); text-decoration: none; box-shadow: 0 1px 3px rgba(60,40,10,.08); }
.adm-tiles b { font: 400 26px/1.1 var(--serif); }
.adm-tiles span { font-size: 12.5px; color: var(--muted); }
.adm-tiles a:hover b { color: var(--teal); }
.adm-sec { margin-bottom: 18px; }
.adm-sec h2 { margin-bottom: 6px; }
.adm-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-t th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line2); }
.adm-t td { padding: 6px 8px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.adm-t .num { text-align: right; }
.adm-t small { color: var(--muted); }
.adm-t select { font: inherit; padding: 2px 6px; border-radius: 8px; border: 1px solid var(--line2); background: #fff; }
.adm-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.adm-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.adm-form input, .adm-form select { font: 14.5px var(--sans, inherit); padding: 7px 10px; border: 1px solid var(--line2); border-radius: 10px; background: #fff; color: var(--ink); }
.adm-form .adm-why { flex: 1 1 280px; }
.adm-sum { display: flex; gap: 6px; } .adm-sum input { width: 90px; }
.adm-form .btn-line { min-height: 38px; padding: 0 18px; background: none; font: inherit; cursor: pointer; }
.adm-res { font-size: 13.5px; color: var(--teal); }
#adm-mem .mem-mod { margin-top: 0; }
@media (max-width: 900px) { .adm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.votchina { margin: 4px 0 0 !important; font-size: 13.5px; color: var(--muted); } .votchina b { color: var(--teal); font-weight: 600; }
.adm-lands { min-width: 220px; }
.adm-land { display: inline-flex; align-items: center; gap: 2px; margin: 0 4px 4px 0; padding: 1px 4px 1px 9px; border-radius: 10px; background: #DCEBEA; font-size: 12.5px; }
.adm-land a { color: var(--teal); text-decoration: none; }
.adm-land button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; padding: 0 3px; }
.adm-lands input { width: 100%; max-width: 230px; font: 12.5px var(--sans, inherit); padding: 4px 8px; border: 1px dashed var(--line2); border-radius: 8px; background: transparent; }
.tip { position: relative; border-bottom: 1px dotted currentColor; cursor: help; outline: none; }
.tip::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: 340px; max-width: 80vw; padding: 10px 12px; border-radius: 10px; background: #fffdf7; color: var(--ink); box-shadow: 0 4px 18px rgba(60,40,10,.18); font-size: 13px; line-height: 1.45; font-weight: 400; white-space: normal; opacity: 0; pointer-events: none; transition: opacity .15s; }
.tip:hover::after, .tip:focus::after { opacity: 1; }
.wal-sub { margin: 14px 0 4px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.wal .wal-earn { margin: 0 0 8px; padding-left: 18px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.wal .wal-earn li { margin-bottom: 3px; text-wrap: pretty; }
.wal .mem-none { text-wrap: pretty; font-size: 13px; line-height: 1.45; margin-bottom: 6px; }
.wal-item { margin: 2px 0 0 !important; }
.wal-item span { display: block; color: var(--muted); font-size: 13px; }
.wal-msg:empty { display: none; }
/* дедич: карточка при наведении и письма */
.ded { position: relative; cursor: pointer; outline: none; }
.ded > b { color: var(--teal); font-weight: 600; border-bottom: 1px dotted var(--teal); }
.ded-card { position: absolute; left: 0; top: calc(100% + 6px); z-index: 31; display: flex; flex-direction: column; gap: 6px; width: 320px; max-width: 86vw; padding: 12px 14px; border-radius: 12px; background: #fffdf7; color: var(--ink); box-shadow: 0 4px 18px rgba(60,40,10,.18); font-size: 13px; line-height: 1.45; opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; }
.ded:hover .ded-card, .ded:focus-within .ded-card { opacity: 1; visibility: visible; }
.ded-card::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.ded-h { font-size: 14px; }
.ded-row a { color: var(--teal); }
.ded-write { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-top: 2px; padding: 0 12px; background: none; font: inherit; cursor: pointer; }
.ded-write img, .pis-ico { width: 22px; height: 22px; object-fit: contain; }
.pis-ico { width: 28px; height: 28px; margin-right: 8px; vertical-align: -6px; }
.pis-dlg textarea { width: 100%; }
.pis-quote { margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid var(--line2); color: var(--muted); font-size: 13px; max-height: 120px; overflow: auto; }
.pis-quote p { margin: 0 0 4px; }
.pis-item { padding: 10px 0; border-top: 1px solid var(--line2); }
.pis-item.new { background: linear-gradient(90deg, rgba(220,235,234,.55), transparent 70%); }
.pis-meta { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.pis-new { color: var(--teal); font-weight: 600; }
.pis-text p { margin: 0 0 6px; font-family: var(--serif); font-size: 14.5px; }
.pis-item .mem-btns { margin-top: 4px; }
.pis-item .btn-line { min-height: 30px; padding: 0 12px; background: none; font: inherit; font-size: 13px; cursor: pointer; }
.pis-acc { margin-top: 16px; }
.pis-i { display: inline-block; width: 22px; height: 22px; background: url(../../img/pismo.webp) center / contain no-repeat; }

/* разбор правок дедичем (razbor.js) */
.rz-stat { font-size: 13.5px; color: var(--muted, #6b625a); margin: 4px 0 10px; }
.rz-card { border-top: 1px solid var(--line2); padding: 12px 0 10px; }
.rz-card.rz-done { opacity: .55; }
.rz-card.rz-done .rz-btns { display: none; }
.rz-where { margin: 0 0 6px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.rz-where .mem-date { margin-left: auto; }
.rz-ch { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 15px; }
.rz-col { font-weight: 700; }
.rz-ch s { color: var(--red); text-decoration-thickness: 1px; }
.rz-new { flex: 1 1 220px; min-width: 0; font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.rz-why { margin: 6px 0 0; font-size: 14px; font-style: italic; }
.rz-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.rz-btns .btn-line { min-height: 32px; padding: 4px 14px; font-size: 14px; }
.rz-btns .rz-no { color: var(--red); border-color: #E3C3BC; }
.rz-why-in { flex: 1 1 160px; min-width: 0; font: inherit; font-size: 13.5px; padding: 5px 8px; border: 1px solid var(--line2); border-radius: 6px; }
.rz-res { margin: 6px 0 0; font-size: 13.5px; min-height: 0; }
.rz-res:empty { display: none; }
.rz-res.ok { color: var(--teal); }
.rz-res.bad { color: var(--red); }
.adm-own { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 24px; }
.adm-own > div:empty { display: none; }
.adm-own:has(> div:empty) { grid-template-columns: minmax(0, 760px); }
@media (max-width: 1000px) { .adm-own { grid-template-columns: minmax(0, 1fr); } }
.adm-own .acct-card { margin-top: 0; }
.wal-rank { white-space: nowrap; }
.adm-t td, .adm-t th { padding-left: 6px; padding-right: 6px; }
.adm-t td.num, .adm-t [data-pay] { white-space: nowrap; }

/* страница документа (dokument.js) и окно «Название и точка» (mesto.js) */
.dk-desc { margin: 4px 0 18px; }
.dlink { margin: 6px 0 0; font-size: 14px; }
.dlink a { color: var(--teal); }
.dk-lv { margin: 10px 0 18px; }
.dk-lvh { margin: 0 0 8px; font-size: 14px; }
.dk-gapn { color: var(--red); }
.dk-strip { display: flex; height: 26px; border-radius: 4px; overflow: hidden; background: var(--line2); }
.dk-strip i { flex: 1 1 0; min-width: 0; background: #F3EDE0; border-right: 1px solid rgba(255,253,248,.35); }
.dk-strip i.y { background: var(--teal); }
.dk-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin: 2px 0 4px; }
.dk-gaps { font-size: 13px; line-height: 1.6; margin: 6px 0 0; word-break: break-word; }
.dk-part { font-size: 13.5px; color: var(--ink2); }
.dk-write { margin-left: 6px; vertical-align: middle; min-height: 30px; padding: 2px 12px; font-size: 13px; }
.dk-places { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.dk-places .tablebox { margin-top: 0; max-height: 420px; overflow: auto; }
.dk-map { height: 420px; border-radius: 10px; background: var(--line2); }
.dk-map[hidden] { display: none; }
.dk-places:has(.dk-map[hidden]) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .dk-places { grid-template-columns: minmax(0, 1fr); } .dk-map { height: 300px; } }
.dk-ok { color: var(--teal); font-weight: 700; }
.dk-no, .dk-nop { color: var(--red); font-size: 12.5px; font-weight: 400; }
.dk-pt { min-height: 0; padding: 0 0 0 6px; font-size: 13px; }
.dk-recs table { font-size: 12.5px; }
.dk-recs td { white-space: normal; }
.mesto-btn { min-height: 0; padding: 2px 0; font-size: 13.5px; color: var(--teal); }
.claim-btn { min-height: 0; padding: 2px 0; font-size: 13.5px; color: var(--teal); margin-left: 16px; }
.claim-btn::before { content: '⚑\FE0E  '; }
.claim-form textarea { width: 100%; margin-top: 6px; }
.mesto-dlg { width: min(720px, 94vw); }
.mesto-dlg form { display: flex; flex-direction: column; gap: 10px; }
.mesto-names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .mesto-names { grid-template-columns: minmax(0, 1fr); } }
.mesto-map { height: 300px; border-radius: 8px; background: var(--line2); }
.mesto-dlg label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.mesto-dlg input { font: inherit; font-size: 15px; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mesto-dlg input[readonly] { background: var(--line2); color: var(--ink2); }
.wal-rank.tip { border-bottom: 0; }
.acct-phb { position: relative; }
.acct-phe { position: absolute; right: -2px; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(43,39,35,.25); color: var(--muted); font-size: 12px; line-height: 22px; text-align: center; }
.acct-phb:hover .acct-phe { color: var(--teal); }
.acct-sex .ava-sex { padding: 2px; }
.acct-sex .ava-sex button { padding: 2px 12px; font-size: 13.5px; }

/* ачивки (nagrady.js) */
.ach { margin-top: 16px; }
.ach h2 { display: flex; align-items: baseline; gap: 10px; }
.ach-n { font: 400 13px var(--sans); color: var(--muted); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px 8px; margin-top: 8px; }
.ach-i { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; border-bottom: 0; cursor: default; }
.ach-i.tip::after { left: 50%; transform: translateX(-50%); width: 220px; }
.ach-b { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--line2); color: #B4AA9A; }
.ach-b img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; filter: grayscale(1) opacity(.45); }
.ach-b.got { background: radial-gradient(circle at 35% 30%, #F3DFA6, var(--gold)); color: #5B3F12; box-shadow: 0 1px 4px rgba(120,80,20,.3); }
.ach-b.got img { filter: none; }
.ach-t { font-size: 12px; line-height: 1.25; color: var(--muted); }
.ach-i.got .ach-t { color: var(--ink); }
.ach-p { width: 44px; height: 3px; border-radius: 2px; background: var(--line2); overflow: hidden; }
.ach-p i { display: block; height: 100%; background: var(--teal); }
.ach-pop { position: fixed; left: 50%; top: 22%; transform: translate(-50%, -12px) scale(.96); opacity: 0; z-index: 2000; transition: opacity .3s, transform .3s; pointer-events: none; }
.ach-pop.on { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.ach-pop-in { display: flex; gap: 16px; align-items: center; min-width: 300px; max-width: min(440px, 90vw); padding: 18px 22px; border-radius: 14px; background: var(--paper); box-shadow: 0 10px 40px rgba(60,40,10,.28); border: 1px solid #E8D6A8; position: relative; }
.ach-pop .ach-b { width: 64px; height: 64px; flex: none; }
.ach-pop-h { margin: 0; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.ach-pop-n { margin: 2px 0; font: 700 20px/1.25 var(--serif); }
.ach-pop-d { margin: 0; font-size: 13.5px; color: var(--ink2); }
.ach-pop-x { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.ach-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.ach-b.pic { width: 96px; height: 96px; border-radius: 14px; background: none; box-shadow: none; }
.ach-b.pic img { width: 96px; height: 96px; border-radius: 14px; }
.ach-b.pic.got { box-shadow: 0 2px 8px rgba(120,80,20,.28); }
.ach-pop .ach-b.pic, .ach-pop .ach-b.pic img { width: 110px; height: 110px; }
.ach-p { width: 80px; }
.ach-c { font-size: 11px; color: var(--muted); }
/* картинки ачивок в блоке на 30% меньше (решение автора 29.11) */
.ach-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.ach-grid .ach-b.pic, .ach-grid .ach-b.pic img { width: 67px; height: 67px; border-radius: 10px; }
.ach-grid .ach-p { width: 60px; }
/* подписи под ачивками нет — название и что нужно сделать видно при наведении (решение автора 29.11) */
.ach-grid .ach-t { display: none; }
.ach-grid .ach-c { font-size: 11px; line-height: 1; color: var(--muted); margin-top: -1px; }
.ach-grid { grid-template-columns: repeat(auto-fill, 67px); gap: 14px; }
.ach-grid .ach-p { width: 67px; }
.ach-i.tip::after { left: 0; transform: none; }
/* страница документа компактнее (решение автора 29.11): листы — две ссылки в строку, места — на 40% ниже */
.dk-lv { margin: 6px 0 10px; }
.dk-lv .byplace { display: inline-block; vertical-align: top; margin: 4px 24px 0 0; }
.dk-lv .byplace[open] { display: block; margin-right: 0; }
.dk-lv .byplace > summary { padding: 2px 0; }
.dk-map { height: 252px; }
.dk-places .tablebox { max-height: 252px; }
#pl-sec, #lv-sec { margin-top: 18px; }
/* шифр в «Источниках» — не разрывать «д. 1» на две строки */
.sources td:first-child { min-width: 15em; }
section[hidden] { display: none !important; }
/* достижения — 5 в ряд, без полоски прогресса, только счётчик (решение автора 29.11) */
.ach-grid { grid-template-columns: repeat(5, 1fr); gap: 14px 10px; }
.ach-grid .ach-i { min-width: 0; gap: 5px; }
.ach-grid .ach-b.pic, .ach-grid .ach-b.pic img { width: 100%; height: auto; aspect-ratio: 1; max-width: 96px; }
.ach-grid .ach-p { display: none; }
.ach-grid .ach-c { margin-top: 0; }
/* «мои владения» в легенде карты */
.legend .mine-b { display: inline-flex; align-items: center; justify-content: center; background: var(--gold); }
/* окно входа: зачем входить (скачивание, листание) */
.al-why { margin: 0 32px 12px 0; padding: 10px 12px; border-radius: 10px; background: #F6EFDD; color: var(--ink2); font-size: 13.5px; line-height: 1.45; }
.gate-note { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; background: #F6EFDD; font-size: 13.5px; color: var(--ink2); }
.gate-note .gate-in { font-weight: 600; }
.rec-head[hidden] { display: none; }
/* привилей — грамота на владение (privilej.js): рисунок автора img/privilej.webp (1280×853: лист, буквица-завиток слева,
   сгиб на 49,6 % высоты, подогнутый край до 70 %, вислая печать ниже) — текст поверх листа выше сгиба, кнопка — на подогнутом крае */
dialog.priv { border: 0; padding: 0; background: transparent; width: min(656px, 92vw); max-width: none; overflow: visible; }
dialog.priv::backdrop { background: rgba(35, 24, 8, .6); }
.priv-sheet { position: relative; color: #5B3A1C; font-family: 'Monomakh', 'PT Serif', Georgia, serif; }
.priv-bg { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(20, 10, 2, .45)); }
.priv-txt { position: absolute; left: 19.8%; right: 3.6%; top: 4.6%; height: 43.6%; overflow: hidden; font-size: 18px; opacity: .88; mix-blend-mode: multiply; }   /* чернила впитались в пергамент */
.priv-sheet p { margin: 0; font-size: 1em; line-height: 1.3; text-align: justify; hyphens: auto; }
.priv-big { hyphens: none; font-size: 1.5em; line-height: 1; letter-spacing: .02em; color: #9C3A26; }
.priv-sheet .priv-d { margin-top: .35em; text-align: right; }
.priv-sheet a { color: #7A3020; text-decoration: underline; text-decoration-style: dotted; text-decoration-color: rgba(107, 26, 16, .6); text-underline-offset: 3px; }
.priv-sheet a:hover { color: #A0261A; text-decoration-style: solid; }
.priv-ok { position: absolute; right: 7%; top: 56%; padding: .25em 1.2em; border-radius: 2px; cursor: pointer; font-family: 'Monomakh', 'PT Serif', serif; font-size: clamp(13px, 2.2vw, 18px); letter-spacing: .05em;
  color: #F3E2BE; background: linear-gradient(#9A4430, #7E3020); border: 1px solid rgba(90, 30, 15, .6); box-shadow: inset 0 0 0 2px rgba(230, 205, 150, .4), 0 1px 3px rgba(50, 15, 5, .25);
  opacity: .82; mix-blend-mode: multiply; }   /* выцветшая киноварь */
.priv-ok:hover { opacity: .95; }
.priv-ok:focus-visible { outline: 2px solid #C9A36B; outline-offset: 3px; }
/* телефон: вытянутый лист img/privilej-m.webp (800×1200: лист 13–86 % по ширине, завиток слева вверху, сгибы на 45 % и 70 %,
   подогнутый край до 83 %) — текст обтекает завиток (.priv-fl), кнопка — на подогнутом крае справа от шнуров */
.priv-fl { display: none; }
@media (max-width: 600px) {
  dialog.priv { width: min(344px, 80vw); }
  .priv-txt { left: 16.2%; right: 16.2%; top: 4%; height: 65%; }
  .priv-fl { display: block; float: left; width: 34%; height: 41%; margin-right: 4px; shape-outside: polygon(0 0, 100% 0, 100% 40%, 72% 62%, 58% 100%, 0 100%); }
  .priv-sheet p { line-height: 1.25; }
  .priv-sheet .priv-1 { display: inline; }
  .priv-big { font-size: 1.3em; }
  .priv-ok { right: 17%; top: 75.5%; font-size: 14px; padding: 3px 12px; }
}
.v-also { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.pl-go { margin-left: 4px; color: var(--teal); text-decoration: none; }
.fam-n { color: var(--muted); font-size: .92em; }   /* фамилия двора, если в записи своей нет (списки прихожан) */
.mem-ok { color: var(--teal); white-space: nowrap; }

/* ---------- Почта (pochta.html, pisma.js) ---------- */
.ml { margin-bottom: 40px; }
.ml-guest { max-width: 460px; }
.ml-guest .al-main { width: auto; padding: 0 22px; }
.ml-bar { display: flex; align-items: center; gap: 16px; margin: 0 0 12px; flex-wrap: wrap; }
.ml-new { width: auto; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px 0 12px; min-height: 40px; }
.ml-new img { width: 24px; height: 24px; object-fit: contain; }
.ml-flt { display: inline-flex; background: var(--line2); border-radius: 8px; padding: 3px; }
.ml-flt button { border: 0; background: none; border-radius: 6px; padding: 5px 12px; font: inherit; font-size: 14px; color: var(--ink2); cursor: pointer; }
.ml-flt button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(43,39,35,.12); }
.ml-cols { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 0; background: var(--paper); border-radius: 14px; box-shadow: 0 1px 4px rgba(43,39,35,.08); min-height: 480px; overflow: hidden; }
.ml-list { list-style: none; margin: 0; padding: 0; border-right: 1px solid var(--line2); max-height: 640px; overflow-y: auto; }
.ml-th { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line2); text-decoration: none; color: inherit; position: relative; }
.ml-th:hover { background: #FAF6EC; }
.ml-th.cur { background: #EEF3F1; box-shadow: inset 3px 0 0 var(--teal); }
.ml-av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--line2); color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; font: 700 15px var(--serif); }
.ml-av.sm { width: 24px; height: 24px; font-size: 12px; margin-right: 6px; }
.ml-th-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ml-th-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.ml-th-top b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-th-top time { flex: none; font-size: 12px; color: var(--muted); }
.ml-subj { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-subj small { color: var(--muted); }
.ml-snip { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-th.unr .ml-th-top b, .ml-th.unr .ml-subj { font-weight: 700; }
.ml-th.unr .ml-snip { padding-right: 24px; }
.ml-th.unr .ml-th-top time { color: #b3261e; font-weight: 600; }
.ml-n { position: absolute; right: 12px; bottom: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #b3261e; color: #fff; font: 600 11px/18px var(--sans); text-align: center; box-sizing: border-box; }
.ml-empty { padding: 18px; font-size: 14px; }
.ml-empty p { margin: 0 0 8px; }
.ml-hint { color: var(--muted); font-size: 13px; }
.ml-view { display: flex; flex-direction: column; min-width: 0; padding: 18px 22px; }
.ml-pick { margin: auto; color: var(--muted); }
.ml-back { display: none; align-self: flex-start; }
.ml-head h2 { margin: 0; font: 400 22px/1.3 var(--serif); }
.ml-head p { margin: 4px 0 12px; font-size: 13.5px; color: var(--muted); }
.ml-head p b { color: var(--ink); font-weight: 600; }
.ml-head .ml-delt { float: right; min-height: 22px; font-size: 13px; }
.ml-msgs { flex: 1; max-height: 470px; overflow-y: auto; border-top: 1px solid var(--line2); }
.ml-msg { padding: 12px 4px 6px; border-bottom: 1px solid var(--line2); }
.ml-msg.mine { background: linear-gradient(90deg, #F6F1E5, transparent 80%); }
.ml-msg.new { background: linear-gradient(90deg, rgba(220,235,234,.6), transparent 75%); }
.ml-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.ml-meta b { color: var(--ink); }
.ml-meta time { margin-left: auto; font-size: 12px; }
.ml-meta .linkbtn { min-height: 22px; font-size: 12px; opacity: .55; }
.ml-msg:hover .ml-meta .linkbtn { opacity: 1; }
.ml-s2 { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.ml-reply { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: end; }
.ml-reply textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 14.5px/1.45 var(--serif); background: #fff; resize: vertical; }
.ml-reply .al-main { width: auto; padding: 0 20px; }
.ml-reply .al-msg { grid-column: 1 / -1; grid-row: 2; margin: 0; }
.pis-f { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pis-f input { display: block; width: 100%; box-sizing: border-box; margin-top: 3px; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; }
@media (max-width: 799px) {
  .ml-cols { grid-template-columns: 1fr; min-height: 0; }
  .ml-list { border-right: 0; max-height: none; }
  .ml-cols.has-cur .ml-list { display: none; }
  .ml-cols:not(.has-cur) .ml-view { display: none; }
  .ml-back { display: inline-block; margin-bottom: 6px; }
  .ml-msgs { max-height: none; }
  .ml-reply { grid-template-columns: 1fr; }
}
/* неполученные достижения — серее и размыто, со знаком вопроса (решение автора 30.11: больше интриги) */
.ach-b.pic:not(.got) { position: relative; overflow: hidden; background: #E4DDD0; box-shadow: 0 0 0 1px #CDBF9F, inset 0 0 0 3px rgba(255,252,244,.9), inset 0 0 0 4px #D9CCAE; }
.ach-b.pic:not(.got) img { filter: grayscale(1) blur(3px) opacity(.42) contrast(.85); transform: scale(1.04); }
.ach-b.pic:not(.got)::after { content: '?'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 26px var(--serif); color: rgba(96,82,60,.6); text-shadow: 0 0 6px rgba(255,252,244,.9); z-index: 1; }
.ach-b:not(.pic):not(.got) svg { filter: blur(1.2px); opacity: .55; }

/* воспоминание из аккаунта: выбор места (vosp.js openPick) */
.mem-acc .mem-head { margin-bottom: 12px; }
.mem-acc .mem-head .btn-line { height: 38px; font-size: 14px; }
.mp-where label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted, #6b6457); margin-top: 12px; }
.mp-where input { font: inherit; font-size: 16px; color: var(--ink, #2b2620); padding: 10px 12px; border: 1px solid var(--line, #d8d0bf); border-radius: 10px; background: #fff; }
.mp-list { list-style: none; margin: 4px 0 0; padding: 0; max-height: 300px; overflow: auto; border-radius: 10px; }
.mp-list:empty { display: none; }
.mp-list li { padding: 7px 12px; cursor: pointer; font-size: 15px; border-radius: 8px; }
.mp-list li.on, .mp-list li:hover { background: rgba(31, 107, 117, .09); }
.mp-list li.mp-msg { cursor: default; color: var(--muted, #6b6457); font-size: 14px; background: none; }
.mp-d { color: var(--muted, #8a8273); font-size: 13.5px; }
.mp-note { font-size: 12.5px; margin: 8px 0 0; }
.mp-chosen { margin: 12px 0 4px; font-size: 15px; }
.mp-chosen .linkbtn { font-size: 14px; }

/* «Скарбовая книга» в «Имуществе» (30.11.2026) */
.tip.tip-pre::after { white-space: pre-line; }
.wal-bal.tip { border-bottom-style: dotted; }
.book { margin: 4px 0 6px; }
.book-row { display: grid; grid-template-columns: 4.8em 7.4em 1fr; gap: 4px 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.book-row:last-child { border-bottom: 0; }
.book-d { color: var(--muted); font-size: 12px; }
.book-row .wal-op { white-space: nowrap; font-weight: 600; overflow: hidden; }
.book-w small { color: var(--muted); }
.book-more summary { cursor: pointer; font-size: 13px; color: var(--teal); margin: 4px 0; }

/* «Индекс прислал: … ✉ написать» в шапке храма (30.11.2026) */
.sender .snd-write { display: inline-flex; min-height: 0; padding: 0 2px; align-items: center; gap: 4px; margin-left: 4px; font-size: 13px; vertical-align: middle; }
.sender .snd-write .pis-i { width: 18px; height: 18px; }

.votchina .sep-c { margin-left: -0.28em; }

/* «Люди и сословия»: поиск и листание (30.11.2026) */
.adm-find { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.adm-find input { flex: 1 1 260px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.adm-find select { min-height: 36px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; padding: 0 8px; }

/* заявки на владение в «Управлении» */
.cl-act { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.cl-act input { width: 100%; }
.cl-act span { display: flex; gap: 16px; }
.cl-yes { color: var(--teal); font-weight: 600; }
.cl-no { color: var(--red); }
.docs-btn.docs-ico::before { content: '＋ '; }
