/* Existing person tags only; photo originals and the mobile application stay independent. */
#photo-viewer .viewer-top{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
#photo-viewer.mobile-no-metadata .viewer-top{display:flex}
#photo-viewer .viewer-name{margin-inline-start:auto;min-height:44px;max-width:40%}
.photo-name-control{display:flex;align-items:center;gap:12px;flex:1;flex-wrap:wrap;margin-inline:16px;min-width:180px}
.photo-name-toggle{display:inline-flex;align-items:center;gap:10px;min-height:44px;border:0;background:transparent;color:#344236;padding:5px 0;font:inherit;font-size:14px;cursor:pointer}
.photo-name-track{display:inline-block;position:relative;width:38px;height:22px;border:1px solid #89947c;border-radius:20px;background:#e2e5dc;flex-shrink:0;transition:background .15s}
.photo-name-track::after{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .15s}
.photo-name-toggle[aria-checked="true"] .photo-name-track{background:#344236;border-color:#344236}
.photo-name-toggle[aria-checked="true"] .photo-name-track::after{transform:translateX(16px)}
.photo-name-toggle:focus-visible,.photo-person-name:focus-visible{outline:3px solid #b69359;outline-offset:3px}
.photo-name-status{font-size:12px;color:#627059;max-width:260px}
.person-markers[hidden]{display:none}
.photo-name-content{position:absolute;pointer-events:none}
.photo-name-guides{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.photo-name-guides line{stroke:#dfd1a9;stroke-width:1.5;filter:drop-shadow(0 1px 1px #17251b)}
.photo-name-guides circle{fill:#fff;stroke:#344236;stroke-width:1}
.photo-person-name{display:inline-flex;box-sizing:border-box;align-items:center;pointer-events:auto;border:1px solid #fff8;border-radius:7px;background:#263126ed;color:#fff!important;font:600 12px/1.4 Arial,sans-serif;box-shadow:0 2px 7px #0004;padding:6px 9px;max-width:min(220px,100%);overflow-wrap:anywhere;text-decoration:none}
.photo-person-name:hover{background:#455741;color:#fff;text-decoration:underline}
.photo-person-positioned{position:absolute;width:max-content}
.photo-name-list{display:flex;box-sizing:border-box;flex-wrap:wrap;align-content:start;gap:6px;padding:8px;max-height:120px;overflow:auto;margin:8px auto;max-width:970px;pointer-events:auto;scrollbar-width:thin}
.photo-name-list[hidden]{display:none}
.photo-person-summary{margin:0 0 24px;padding:20px 24px;border:1px solid #d3d8c9;border-radius:12px;background:#e6eadf80;overflow-wrap:anywhere}
.photo-person-summary[hidden]{display:none}
.photo-person-summary h2{font:22px/1.35 Georgia,serif;margin:0 0 10px;color:#344236}
.photo-person-summary p{margin:8px 0;white-space:pre-wrap}
.photo-person-summary dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;margin:16px 0 0}
.photo-person-summary dt{font-size:12px;color:#627059}
.photo-person-summary dd{margin:4px 0 0;white-space:pre-wrap}
@media(max-width:600px){.photo-name-control{margin-inline:0;flex-basis:100%;order:3}.photo-person-name{font-size:11px;padding:5px 7px;max-width:min(150px,100%)}.photo-person-summary{padding:16px}.photo-person-summary dl{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.photo-name-track,.photo-name-track::after{transition:none}}

/* Manual placement keeps identity selection separate from the photograph position. */
.community-dialog .tag-person-row{border:1px solid var(--border,#cbd1bd);border-radius:8px;padding:8px;margin-block:6px}
.community-dialog .tag-person-row .tag-person-choice{border:0;margin:0;padding:4px;align-items:flex-start}
.community-dialog .tag-person-actions{display:flex;flex-wrap:wrap;gap:8px;padding-inline-start:30px;margin-block-start:6px}
.community-dialog .tag-person-actions .page-button{min-height:36px;padding:6px 10px;font-size:13px}
.community-dialog.tag-position-dialog{width:min(1000px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:20px;box-sizing:border-box;overflow:auto}
.tag-position-dialog h2{font-size:clamp(18px,3vw,26px);margin:0 0 8px}
.tag-position-dialog p{margin:8px 0}
.tag-position-stage{position:relative;line-height:0;background:#232923;border-radius:8px;overflow:hidden;cursor:crosshair;touch-action:manipulation}
.tag-position-stage:focus-visible{outline:3px solid #b79860;outline-offset:3px}
.tag-position-stage img{display:block;width:100%;height:min(58dvh,620px);object-fit:contain;user-select:none;-webkit-user-drag:none}
.tag-position-dot{position:absolute;width:20px;height:20px;transform:translate(-50%,-50%);border:2px solid #fff;border-radius:50%;background:#b79860aa;box-shadow:0 0 0 2px #232923;pointer-events:none}
.tag-position-dot[hidden]{display:none}
.tag-position-dialog .photo-admin-actions{position:sticky;bottom:0;background:var(--paper,#f5f4ec);padding-block:10px;margin-top:8px;display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
@media(max-width:600px){.community-dialog.tag-position-dialog{padding:12px}.tag-position-stage img{height:52dvh}.community-dialog .tag-person-actions{padding-inline-start:0}}

.photo-tag-movable{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.photo-tag-movable:active{cursor:grabbing}.photo-tag-drag-point{position:absolute;transform:translate(-50%,-50%);width:12px;height:12px;border:2px solid #fff;border-radius:50%;background:#b79860;box-shadow:0 0 0 2px #232923;pointer-events:none}

/* The explicit menu also works for tags that do not have a saved point yet. */
.community-dialog.tag-context-dialog{width:min(420px,calc(100vw - 24px));box-sizing:border-box}
.tag-context-dialog h2{font-size:22px;overflow-wrap:anywhere}
.tag-context-actions{display:grid;gap:10px}
.tag-context-actions .page-button{min-height:44px;width:100%;text-align:start}
.tag-existing-people{margin:12px 0;padding:12px;border:1px solid var(--border,#cbd1bd);border-radius:8px}
.tag-existing-people[hidden]{display:none}
.tag-existing-people h3{font:600 14px/1.4 Arial,sans-serif;margin:0 0 8px}
.tag-existing-chips{display:flex;flex-wrap:wrap;gap:8px}
.tag-existing-chips .page-button{min-height:40px;padding:6px 10px;font-size:13px}
.tag-existing-chips .page-button[aria-pressed="true"]{background:#344236;color:#fff}

.photo-person-summary{position:relative;padding-inline-end:78px}
.person-summary-edit{position:absolute;inset-inline-end:20px;top:20px;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid #a7b29d;border-radius:8px;background:#f7f6ef;color:#344236}
.person-summary-edit svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.person-summary-edit:hover{background:#e1e8d9}
.person-summary-edit:focus-visible{outline:3px solid #b69359;outline-offset:3px}

.school-profile-popup .profile-admin-edit{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid #a7b29d;border-radius:8px;color:#344236}.school-profile-popup .profile-admin-edit svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}

/* Admin-marked deceased person: a small static candle right after the name in the person title (no glow/flame animation). */
.person-candle-word{white-space:nowrap}
.person-candle{display:inline-block;width:.6em;height:1em;margin-inline-start:.25em;vertical-align:-.08em;line-height:0}
.person-candle svg{display:block;width:100%;height:100%;overflow:visible}
/* 2.3.126: school89 «Люди» cards — portrait or initials, name, «N фотографий» / «нет фото», a line of public card fields. */
#album-grid a.person-card{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:start;align-content:start;column-gap:14px;row-gap:6px;min-height:0;padding:16px 18px;font-size:16px;text-align:start}
#album-grid a.person-card .person-card-face{grid-row:1/span 2;width:48px;height:48px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#ddd5c2;color:#3b3a2f;font:600 15px/1 Arial,sans-serif;letter-spacing:.02em}
#album-grid a.person-card .person-card-face img{display:block;width:100%;height:100%;object-fit:cover;background:none}
#album-grid a.person-card .person-card-body{display:flex;flex-direction:column;gap:2px;min-width:0}
#album-grid a.person-card .person-card-name{font:600 17px/1.3 Georgia,serif}
#album-grid a.person-card .person-card-meta{font:14px/1.4 Arial,sans-serif;opacity:.8}
#album-grid a.person-card.person-card-empty .person-card-meta{font-style:italic}
#album-grid a.person-card .person-card-details{font:13px/1.4 Arial,sans-serif;opacity:.75;overflow-wrap:anywhere}
#album-grid a.person-card .andrew-more{grid-column:2;font:14px/1.4 Arial,sans-serif}
/* 2.3.126: the person's page on school89 — portrait and actions in the «О человеке» panel. */
.photo-person-summary .person-summary-portrait{float:inline-end;width:96px;height:96px;margin:0 0 8px 16px;border-radius:50%;object-fit:cover}
.photo-person-summary .person-summary-actions{clear:both;display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px}
.photo-person-summary .person-summary-actions>.page-button{box-sizing:border-box;min-height:44px;display:inline-flex;align-items:center;margin:0}
.photo-person-summary .person-summary-status{font-size:14px}
#album-grid:has(>a.person-card){grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
/* 2.3.152: «Вас также могут заинтересовать» — the same cards as «Люди», under the person's photos and under one found person. */
.related-people{margin:28px 0 8px;padding-top:18px;border-top:1px solid #0000001f}
.site-search-results .related-people{margin:18px 0 8px}
.related-people-title{margin:0 0 12px;font:600 18px/1.3 Georgia,serif;color:inherit}
.related-people-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px}
.related-people-grid a.person-card{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:start;align-content:start;column-gap:14px;row-gap:6px;padding:14px 16px;border:1px solid #0000001f;border-radius:12px;background:#ffffff8c;color:inherit;text-decoration:none;text-align:start}
.related-people-grid a.person-card:hover,.related-people-grid a.person-card:focus-visible{border-color:#00000052}
.related-people-grid a.person-card .person-card-face{grid-row:1/span 2;width:48px;height:48px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#ddd5c2}
.related-people-grid a.person-card .person-card-face img{display:block;width:100%;height:100%;object-fit:cover}
.related-people-grid a.person-card .person-card-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.related-people-grid a.person-card .person-card-name{font:600 16px/1.3 Georgia,serif}
.related-people-grid a.person-card .person-card-meta{font:14px/1.4 Arial,sans-serif;opacity:.8}
@media(max-width:600px){.related-people-grid{grid-template-columns:1fr}}
/* 2.3.156 (Andrew 16.10, laptop at 150%): the «Люди» list shows the people found without scrolling — body[data-people-list] is set by
   gallery.js (results = a search with people found, all = the list, empty = nothing found). Nothing is removed: the hint stays as the
   field's title and for screen readers; «Страна» moves into the search row; the crumb and the «Выберите человека» line go only while
   people are shown. */
@media(min-width:900px){
 body[data-people-list] .gallery-filters.people-search{grid-template-columns:minmax(0,1fr) auto auto auto;padding:12px 16px;margin-block:10px 6px;gap:10px 12px}
 /* the hint is row 1 and the field, the buttons and «Страна» row 2 (school89: the roles row 3) — until the hint is hidden above found people (2.3.157:
    row numbers follow the state; before, the hint and the field both sat in row 1 and wrote over each other) */
 body[data-people-list] .gallery-filters.people-search>.people-country,body[data-people-list] .gallery-filters.people-search>.people-roles~.people-country{grid-column:4;grid-row:2}
 body[data-people-list] .gallery-filters.people-search>.people-roles{grid-row:3}
 body[data-people-list="results"] .gallery-filters.people-search>label,body[data-people-list="results"] .gallery-filters.people-search>.page-button,body[data-people-list="results"] .gallery-filters.people-search>.people-country,body[data-people-list="results"] .gallery-filters.people-search>.people-roles~.people-country{grid-row:1}
 body[data-people-list="results"] .gallery-filters.people-search>.people-roles{grid-row:2}
 body[data-people-list="results"] .gallery-filters.people-search>.people-language-hint{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 body[data-people-list]:not([data-people-list="empty"]) #album-breadcrumbs{display:none}
 body[data-people-list]:not([data-people-list="empty"]) #gallery-index .album-heading{min-height:0;margin:8px 0 4px;padding:0}
 body[data-people-list]:not([data-people-list="empty"]) #gallery-index .album-heading h1{font-size:clamp(24px,2.2vw,30px);line-height:1.2;margin:0}
 body[data-people-list]:not([data-people-list="empty"]) #gallery-intro{display:none}
 body[data-people-list]:not([data-people-list="empty"]) #gallery-index .album-controls{display:none}
 body[data-people-list] #album-grid{margin-top:8px}
}
/* «Вас также могут заинтересовать» under the found person and above the photographs: one row of cards, scrolling sideways (2.3.156) */
.related-people:is([data-place="list"],[data-place="page"]){margin:14px 0 6px;padding-top:12px}
.related-people:is([data-place="list"],[data-place="page"]) .related-people-title{margin:0 0 8px}
.related-people:is([data-place="list"],[data-place="page"]) .related-people-grid{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:12px;padding-bottom:6px}
.related-people:is([data-place="list"],[data-place="page"]) .related-people-grid>a{flex:0 0 232px}

.person-summary-base{inset-inline-end:66px}
/* 2.3.183 (Andrew 17.10: «расположить в одну строку… чтобы они не занимали весь экран»): one row of round faces with names, scrolled sideways */
.related-people{margin:14px 0 6px;padding-top:12px}
.related-people-grid{display:flex!important;gap:14px;overflow-x:auto;padding:2px 2px 8px;scrollbar-width:thin}
.related-people-grid a.person-card{flex:0 0 auto;display:flex!important;flex-direction:column;align-items:center;gap:6px;width:92px;padding:6px 4px!important;border:0!important;background:transparent!important;text-align:center!important}
.related-people-grid a.person-card .person-card-face{width:64px!important;height:64px!important}
.related-people-grid a.person-card .person-card-name{font:600 13px/1.25 Arial,sans-serif!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.related-people-grid a.person-card .person-card-meta{display:none}
/* 2.3.183 (Andrew 17.10: «чтобы они не занимали весь экран… не остается места на фотографии»): on a person's page the filters are one compact line, the person's text short */
.gallery-filters.is-person{padding:10px 14px!important;display:flex!important;flex-wrap:wrap;align-items:flex-end;gap:8px 12px}
.gallery-filters.is-person>p,.gallery-filters.is-person .filter-hint{display:none}
.gallery-filters.is-person label{margin:0;font-size:12px}
.gallery-filters.is-person :is(select,input){min-height:36px;height:36px;padding-block:4px}
#photo-person-summary{padding-block:10px!important}
#photo-person-summary h2{margin-block:0 4px!important;font-size:18px!important}
/* 2.3.184: on a person's page the filters fold behind «Фильтры ▾» (features.js); the title and the person's text smaller */
.gallery-filters.is-person:not(.open){display:none!important}
.filters-toggle{display:inline-flex;align-items:center;min-height:36px;margin:0 0 10px;padding:0 14px;border:1px solid #0000002e;border-radius:18px;background:#ffffffb3;color:inherit;font:14px Arial,sans-serif;cursor:pointer}
.filters-toggle[hidden]{display:none}
body:has(form.gallery-filters.is-person) .album-heading h1,body:has(form.gallery-filters.is-person) #album-title{font-size:clamp(26px,2.6vw,36px)}
body:has(form.gallery-filters.is-person) #gallery-title{font-size:clamp(26px,2.4vw,34px);line-height:1.15}
body:has(form.gallery-filters.is-person) .album-heading{margin-block:4px 6px}
#photo-person-summary{padding:8px 14px!important;margin-block:6px!important}
#photo-person-summary p{margin-block:2px!important;font-size:14px}
.related-people{margin:8px 0 4px!important;padding-top:6px!important}
.related-people-title{margin:0 0 4px!important;font-size:16px!important}
.related-people-grid{padding-bottom:2px!important}
.related-people-grid a.person-card{width:84px;gap:4px;padding:2px!important}
.related-people-grid a.person-card .person-card-face{width:52px!important;height:52px!important}
.related-people-grid a.person-card .person-card-name{-webkit-line-clamp:1!important}
/* 2.3.185 (ГЛАВНЫЙ АУДИТ: «фото начинались в первой половине экрана 1366×768»): on a person's page the big search panel is not shown (the search stays in the header's
   magnifier and «Фильтры ▾»); the tabs and «Фильтры ▾» share one line */
body:has(form.gallery-filters.is-person) :is(#site-search,.site-search){display:none!important}
body:has(form.gallery-filters.is-person) .filters-toggle{margin:0 0 6px}
/* 2.3.185: «О человеке» on one line when it holds no more than the generic sentence and the buttons */
#photo-person-summary{display:flex;flex-wrap:wrap;align-items:center;column-gap:14px;row-gap:6px}
#photo-person-summary>h2{margin:0!important}
#photo-person-summary>.person-summary-generic{display:none}
#photo-person-summary>:not(h2):not(.person-summary-actions):not(.person-summary-generic):not(.person-summary-portrait){flex-basis:100%}
#photo-person-summary>.person-summary-portrait{order:-1;float:none;flex:0 0 auto;width:64px;height:64px;margin:0}
/* 2.3.185 (ГЛАВНЫЙ АУДИТ: «фото начинались в первой половине экрана 1366×768»): on a computer a person's page is compact — «Фильтры ▾» goes to the free end of the
   tabs' line, no «Все альбомы» line, «О человеке» one row (portrait, title, buttons, facts), «Вас также могут заинтересовать» one line of small chips */
@media(min-width:1024px){
body:has(form.gallery-filters.is-person) .gallery-main{position:relative}
body:has(form.gallery-filters.is-person) .gallery-main>.filters-toggle{position:absolute;inset-inline-end:0;top:-56px;margin:0}
body:has(form.gallery-filters.is-person) #album-breadcrumbs{display:none}
body:has(form.gallery-filters.is-person) .gallery-main>.filter-chips:empty,body:has(form.gallery-filters.is-person) #gallery-intro:empty{display:none}
body:has(form.gallery-filters.is-person) .album-controls{margin:6px 0 10px}
body:has(form.gallery-filters.is-person) #gallery-index>.album-heading{margin:0 0 8px!important;padding:0!important;min-height:0}
body:has(form.gallery-filters.is-person) #gallery-title{font-size:28px;line-height:1.2;margin:0}
#photo-person-summary{padding:6px 14px!important;margin:0 0 6px!important}
#photo-person-summary>.person-summary-portrait{width:44px;height:44px}
#photo-person-summary>h2{font-size:17px}
#photo-person-summary>dl{flex:1 1 280px!important;display:flex;flex-wrap:wrap;gap:2px 22px;margin:0}
#photo-person-summary>dl>div{display:flex;gap:6px;align-items:baseline}
#photo-person-summary>dl dt::after{content:':'}
#photo-person-summary>dl dd{margin:0}
.related-people[data-place="page"]{display:flex;align-items:center;gap:14px;margin:0 0 6px!important;padding-top:6px!important}
.related-people[data-place="page"] .related-people-title{margin:0!important;font-size:15px;white-space:nowrap}
.related-people[data-place="page"] .related-people-grid{flex:1;gap:8px!important;padding:0!important;justify-content:flex-start!important}
.related-people[data-place="page"] .related-people-grid a.person-card{flex:0 0 auto!important;flex-direction:row!important;width:auto!important;gap:8px!important;padding:2px 10px 2px 2px!important}
.related-people[data-place="page"] .related-people-grid a.person-card .person-card-face{width:32px!important;height:32px!important}
.related-people[data-place="page"] .related-people-grid a.person-card .person-card-meta{display:none}
}
/* 2.3.187 (аудит B п.6): the portrait in «Люди» was 18px in its 48px circle — a general card rule gave the circle a 15px padding (48 − 2×15) */
#album-grid a.person-card .person-card-face,.related-people-grid a.person-card .person-card-face{padding:0!important;grid-template:100%/100%}
#album-grid a.person-card .person-card-face img,.related-people-grid a.person-card .person-card-face img{width:100%!important;height:100%!important;max-width:none}
/* 2.3.187 (аудит B п.5): school89 «Люди» on the computer — the same as /m/: «Все / Ученики / Учителя» one of three (a joined group), «Без портрета» a separate switch */
.gallery-filters.people-search .people-roles{gap:8px 14px!important}
.people-role-seg{display:inline-flex;border:1px solid #b9ad92;border-radius:18px;overflow:hidden}
.people-role-seg button{min-height:36px;padding:0 14px;border:0;background:transparent;color:inherit;font:14px/1 Arial,sans-serif;cursor:pointer}
.people-role-seg button+button{border-inline-start:1px solid #b9ad92}
.people-role-seg button[aria-pressed="true"]{background:#2f3a2c;color:#fff}
.people-bare{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 14px;border:1px solid #b9ad92;border-radius:18px;background:transparent;color:inherit;font:14px/1 Arial,sans-serif;cursor:pointer}
.people-bare::before{content:'';width:14px;height:14px;border:1.5px solid currentColor;border-radius:3px;box-sizing:border-box}
.people-bare[aria-pressed="true"]{background:#2f3a2c;color:#fff}
.people-bare[aria-pressed="true"]::before{background:currentColor;box-shadow:inset 0 0 0 2px #2f3a2c}
/* 2.3.188 (аудит B п.16: «Люди» at 960×540 — the first screen under the search panels, the name field 135px): at 900–1199px «Страна» takes its own row so the
   field keeps at least 200px; on a low window the big «Поиск по сайту» is not shown on the people list (the header's magnifier stays; a running site search keeps it) */
@media(min-width:900px) and (max-width:1199px){
 body[data-people-list] .gallery-filters.people-search{grid-template-columns:minmax(200px,1fr) auto auto}
 body[data-people-list] .gallery-filters.people-search>.people-country,body[data-people-list] .gallery-filters.people-search>.people-roles~.people-country{grid-column:1/-1;grid-row:3}
 body[data-people-list] .gallery-filters.people-search>.people-roles{grid-row:4}
 body[data-people-list="results"] .gallery-filters.people-search>.people-country,body[data-people-list="results"] .gallery-filters.people-search>.people-roles~.people-country{grid-row:2}
 body[data-people-list="results"] .gallery-filters.people-search>.people-roles{grid-row:3}
}
@media(min-width:900px) and (max-height:820px){
 body[data-people-list] .page-wrap:not(.site-search-active) :is(#site-search,form.site-search){display:none}
}
