/* 2.3.174 «фишки» этап 1: the button «Новое N» in the header and «Тогда и сейчас» (ops/plans/gimmicks-stage1-mockup.html; Andrew 17.10: no strip, the page keeps its height). The panel lies OVER the page (fixed), nothing moves. */
.site-header .header-tools .new-button{position:relative;cursor:pointer}
.new-button svg{width:20px;height:20px;fill:currentColor;stroke:none}
.new-count{position:absolute;top:-4px;inset-inline-end:-4px;min-width:18px;height:18px;padding:0 4px;box-sizing:border-box;border-radius:9px;background:#b69359;color:#1d211d;font:700 11px/18px Arial,sans-serif;text-align:center}
.new-panel{position:fixed;z-index:60;inset-inline-end:12px;width:min(420px,calc(100vw - 24px));max-height:min(72vh,560px);overflow:auto;border:1px solid #c9d0bf;border-radius:12px;background:#fff;color:#232923;box-shadow:0 12px 32px rgba(0,0,0,.28)}
.new-panel[hidden]{display:none}
.new-panel-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #e3dfd3;position:sticky;top:0;background:#fff}
.new-panel-head strong{font-size:15px}
.new-sum{flex:1;min-width:0;color:#667062;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.new-close{border:1px solid #c9d0bf;background:transparent;color:inherit;border-radius:8px;height:28px;padding:0 10px;font:inherit;font-size:13px;cursor:pointer}
.new-panel-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 12px 12px}
.new-chip{border:1px solid #c9d0bf;border-radius:8px;overflow:hidden;background:rgba(0,0,0,.03);color:inherit;text-decoration:none}
.new-chip img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.new-chip p{margin:0;padding:5px 8px;font-size:12.5px;line-height:1.3}
.new-chip small{display:block;color:#667062;font-size:11.5px}
@media(max-width:600px){.new-panel{inset-inline:12px;width:auto}}
/* Тогда и сейчас */
.then-now-title{margin:0 0 10px;font-size:20px;line-height:1.25}
.then-now-ring{position:absolute;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 2px rgba(0,0,0,.35),0 0 14px rgba(255,255,255,.55);pointer-events:none;animation:then-now-ring 1.2s ease-out}
@keyframes then-now-ring{from{opacity:0;transform:scale(1.25)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.then-now-ring{animation:none}}
.then-now-dialog{width:min(96vw,760px);max-height:94vh;overflow:auto;padding:14px;border:1px solid #888;border-radius:12px}
.then-now-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px;position:relative}
.then-now-side{border:1px solid #c9d0bf;border-radius:10px;overflow:hidden}
.then-now-crop{position:relative;overflow:hidden;aspect-ratio:3/4;background:#222}
.then-now-crop img{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);max-width:none;width:100%;height:auto}
.then-now-crop.is-face img{left:50%;top:40%;width:250%;max-height:none}
.then-now-cap{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;font-size:14px}
.then-now-cap b{font-size:20px}
.then-now-arrow{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);width:38px;height:38px;border-radius:50%;background:#fff;color:#232923;border:1px solid #c9d0bf;display:flex;align-items:center;justify-content:center;font-size:20px;z-index:1}
.then-now-span{text-align:center;margin:8px 0 0;font-size:15px;font-weight:600}
.then-now-label{margin:12px 0 4px;font-size:14px;color:#667062;font-weight:600}
.then-now-years{display:flex;gap:6px;overflow-x:auto;padding:2px 0}
.then-now-year{flex:0 0 auto;padding:5px 10px;border:1px solid #c9d0bf;border-radius:999px;font:inherit;font-size:13px;background:transparent;color:inherit;cursor:pointer}
.then-now-year.on{background:#7a8b6b;border-color:#7a8b6b;color:#fff}
.then-now-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.then-now-button{margin-inline-end:8px}
@media(max-width:600px){.then-now-dialog{width:100vw;max-width:100vw;height:100vh;max-height:100vh;border-radius:0}.then-now-pair{gap:6px}.then-now-arrow{width:30px;height:30px;font-size:16px}}

/* 2.3.183 (Andrew on a laptop: «не туда ни сюда»): «Тогда и сейчас» fits the visible height — the photos whole in the room left by the title and three compact lines */
.then-now-dialog[open]{display:flex;flex-direction:column;gap:6px;height:min(94vh,940px);overflow:hidden;box-sizing:border-box}
.then-now-dialog .then-now-title{flex:none;margin:0;font-size:18px}
.then-now-dialog .then-now-pair{flex:1 1 auto;min-height:140px}
.then-now-dialog .then-now-side{display:flex;flex-direction:column;min-height:0}
.then-now-dialog .then-now-crop{flex:1 1 auto;min-height:0;aspect-ratio:auto}
.then-now-dialog .then-now-crop img,.then-now-dialog .then-now-crop.is-face img{inset:0;left:0;top:0;width:100%;height:100%;max-width:none;transform:none;object-fit:contain}
.then-now-dialog .then-now-cap{flex:none;padding:4px 10px}
.then-now-dialog .then-now-cap b{font-size:18px}
.then-now-dialog .then-now-arrow{top:50%}
.then-now-row{flex:none;display:flex;align-items:center;gap:8px;min-width:0}
.then-now-row .then-now-label{flex:none;margin:0;min-width:64px;font-size:13px}
.then-now-row .then-now-years{flex:1 1 auto;min-width:0}
.then-now-dialog .then-now-actions{flex:none;flex-wrap:nowrap;align-items:center;margin:0;overflow-x:auto}
.then-now-dialog .then-now-actions .then-now-span{flex:1 1 auto;margin:0;text-align:start;font-size:13px;white-space:nowrap}
.then-now-dialog .then-now-actions>*{flex:none;white-space:nowrap}
.then-now-dialog .then-now-actions>.then-now-span{flex:1 1 auto}
.then-now-dialog .then-now-arrow{z-index:2}
.person-summary-actions{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;scrollbar-width:none}.person-summary-actions>*{flex:none;white-space:nowrap}   /* 2.3.183: the person's buttons on one line */
/* 2.3.184 (Andrew: «большие полосы справа и левой фотографии»; ГЛАВНЫЙ АУДИТ: «на всю доступную высоту… подложка»): the photo view — the search panel and the path are not shown
   while one photo is open (the way back is «В альбом»), so the photo takes the height; beside the photo a blurred copy of it instead of pale bands */
body.gallery-photo-focus :is(#site-search,.site-search,#album-breadcrumbs){display:none!important}
#photo-viewer .viewer-stage{position:relative;isolation:isolate}
#photo-viewer .viewer-stage::before{content:'';grid-column:2;grid-row:1;align-self:stretch;justify-self:stretch;z-index:-1;background:var(--pv-bg,none) center/cover no-repeat;filter:blur(30px) brightness(.8) saturate(1.1);clip-path:inset(0 round 4px);border-radius:4px}
#photo-viewer .viewer-stage>img{grid-column:2;grid-row:1;background:transparent!important}

/* 2.3.187 (аудит B п.10): «Тогда и сейчас» on the computer — a blurred copy of the photo around it instead of black fields, the same as in the photo view */
.then-now-crop{isolation:isolate}
.then-now-crop::before{content:'';position:absolute;inset:-24px;background:var(--tn-bg,none) center/cover;filter:blur(18px) brightness(.72);z-index:-1}
.then-now-dialog .then-now-actions{padding:2px}

/* 2.3.189 (Andrew 18.10: «можно сделать шире… не весь экран, скажем две трети»): on a computer the window is about two thirds of the screen wide, the photos bigger;
   a small «Другое фото» in each photo's strip */
@media(min-width:1000px){.then-now-dialog{width:min(67vw,1400px);max-width:none}.then-now-dialog[open]{height:min(94vh,1000px)}}
.then-now-cap{gap:8px}
.then-now-cap .then-now-one{margin-inline-start:auto;margin-inline-end:8px;padding:3px 10px;border:1px solid #c9d0bf;border-radius:999px;background:#fffdf8;color:inherit;font:12px/1.3 Arial,sans-serif;cursor:pointer}
.then-now-cap .then-now-one:hover{background:#efeadd}
/* 2.3.189 (ГЛАВНЫЙ АУДИТ: «перед „Закрыть“ оранжевая скобка»): the focus ring of «Закрыть» was cut by the scrolling row — room for it */
.then-now-dialog .then-now-actions{padding:6px;margin:-4px}

/* 2.3.202 (Andrew 18.10, iPad: «кнопка закрыть… с какими-то обводами»): the ring only for the keyboard (:focus-visible); the window's own focus without a frame */
.then-now-dialog:focus{outline:none}
.then-now-dialog .page-button:focus:not(:focus-visible),.then-now-dialog button:focus:not(:focus-visible){outline:none;box-shadow:none}
/* 2.3.222 (Andrew 19.10: «экран открывается такой вот сжатый не полностью и где-то в правой части… по центру и был полностью открыт… два ряда по три»):
   «Новое» — a window in the middle of the screen over a dimmed page, three photos in a row (two rows seen at once), all of it inside the screen */
.new-panel{inset-inline:0;margin-inline:auto;width:min(980px,calc(100vw - 32px));top:50%!important;transform:translateY(-50%);max-height:min(88vh,820px);max-height:min(88dvh,820px);box-shadow:0 0 0 100vmax rgba(18,22,18,.5),0 16px 48px rgba(0,0,0,.35)}
.new-panel-head{padding:12px 16px}
.new-panel-head strong{font-size:17px}
.new-sum{font-size:14px}
.new-close{height:34px;padding:0 14px;font-size:14px}
.new-panel-body{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:14px 16px 16px}
.new-chip p{padding:7px 10px;font-size:14px}
.new-chip small{font-size:12.5px}
@media(max-width:700px){.new-panel{width:calc(100vw - 24px)}.new-panel-body{grid-template-columns:repeat(2,minmax(0,1fr))}}
