/* A fixed homepage frame fills with landscape photos; full views retain the complete image. */
.photo-frame #frame-open{height:auto;aspect-ratio:4 / 3;background:transparent;min-height:0}
.photo-frame #frame-open img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.frame-photo{position:relative;min-width:0}
.photo-frame #frame-open{display:block;width:100%;padding:0;border:0;cursor:zoom-in;color:inherit;font:inherit}
.photo-frame #frame-open:disabled{cursor:default}
.frame-album{position:absolute;inset-inline-end:10px;bottom:10px;z-index:2;display:inline-flex;align-items:center;gap:7px;min-height:44px;box-sizing:border-box;max-width:calc(100% - 20px);padding:8px 12px;border:1px solid #fff6;border-radius:24px;background:#252b27c9;color:#fffaf0;text-decoration:none;font:600 13px/1.2 Arial,sans-serif;box-shadow:0 2px 10px #0002;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.frame-album[hidden]{display:none}
.frame-album:hover{background:#252b27ee;border-color:#fff9}
.frame-album svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.frame-album .frame-album-chevron{width:14px}
[dir="rtl"] .frame-album-chevron{transform:rotate(180deg)}
.photo-frame #frame-open:focus-visible,.frame-album:focus-visible{outline:3px solid #d6b777;outline-offset:3px}
@media(max-width:600px){.frame-album{gap:5px;padding-inline:10px;font-size:12px;inset-inline-end:8px;bottom:8px;max-width:calc(100% - 16px)}}

/* Andrew and School89 have room for a wider photograph beside the introduction. */
body[data-photo-site] .photo-hero{height:auto;min-height:max(620px,calc(100svh - 88px));grid-template-columns:minmax(320px,1fr) minmax(440px,min(58vw,860px));gap:clamp(24px,4vw,64px);padding:40px clamp(24px,4vw,64px)}
@media(max-width:1000px){
 body[data-photo-site] .photo-hero{grid-template-columns:minmax(0,1fr);gap:28px;padding:32px 24px 40px}
 body[data-photo-site] .photo-frame{max-width:860px;justify-self:center}
}
@media(max-width:680px){
 body[data-photo-site] .photo-hero{padding-inline:16px}
 body[data-photo-site] .photo-frame{padding:14px}
}
/* Elisheva retains two quiet cards, with a modest increase to both. */
body .hero-frames{width:332px}
body .hero-frames .memory-frame{min-height:260px}
@media(min-width:1550px){body .hero-frames{width:420px}body .hero-frames .memory-frame{min-height:285px}}
@media(max-width:1000px){body .hero-frames{width:300px}body .hero-frames .memory-frame{min-height:235px}}
@media(max-height:850px) and (min-width:681px){body .hero-frames .memory-frame{min-height:220px}}
@media(max-height:650px) and (min-width:681px){body .hero-frames{width:300px}body .hero-frames .memory-frame{min-height:185px}}
@media(max-width:680px){body .hero-frames{width:auto;inset-inline:12px}body .hero-frames .memory-frame{min-height:0}}

/* Keep both memorial cards and the lower controls visible on short landscape screens. */
@media(min-width:681px){body[data-page="home"] .hero{min-height:820px}}
@media(min-width:1550px){body[data-page="home"] .hero{min-height:900px}}
@media(max-height:650px) and (min-width:681px){body[data-page="home"] .hero{min-height:700px}}

body[data-page="home"] :is(.photo-hero,.hero){height:var(--home-height,calc(100svh - 100px));min-height:0}
body[data-page="home"] .photo-frame{max-width:var(--fit-width,860px)}
/* Compact homepages reserve the first screen for the photograph and its controls. */
@media(max-width:1100px),(max-height:850px){
 body[data-page="home"] .site-header{min-height:0}
 body[data-page="home"] :is(.photo-hero,.hero){height:var(--home-height,calc(100svh - 100px));min-height:0;max-height:none;padding:12px 18px;display:flex;flex-direction:column;gap:12px;justify-content:flex-start;align-items:center}
 body[data-page="home"] :is(.hero-copy,.hero-intro){position:relative;inset:auto;bottom:auto;max-width:100%;width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px}
 body[data-page="home"] :is(.hero-copy,.hero-intro) :is(.eyebrow,.hero-subtitle,.hero-description,.dates,.photo-total){display:none}
 body[data-page="home"] :is(.hero-copy,.hero-intro) h1{font-size:clamp(20px,3vw,32px);line-height:1.15;margin:0;letter-spacing:0;white-space:normal}
 body[data-page="home"] .hero-intro h1 br{display:none}
 body[data-page="home"] :is(.hero-copy,.hero-intro) .hero-links{margin:0;gap:10px;flex-shrink:0}
 body[data-page="home"] :is(.hero-copy,.hero-intro) .primary{padding:10px 12px;font-size:12px;min-height:40px}
 body[data-page="home"] .hero-intro .text-link{display:none}
 body[data-page="home"] .photo-frame{flex:none;width:min(100%,var(--fit-width,650px));max-width:860px;padding:12px;align-self:center}
 body[data-page="home"] .photo-frame .frame-top{margin-bottom:8px;flex-wrap:nowrap;min-height:34px}
 body[data-page="home"] .photo-frame .frame-top>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body[data-page="home"] .photo-frame .frame-bottom{padding-top:8px;flex-wrap:nowrap;align-items:center;gap:8px}
 body[data-page="home"] .photo-frame .frame-bottom p{font-size:15px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:none}
 body[data-page="home"] .photo-frame .frame-bottom>div:first-child{min-width:0}
 body[data-page="home"] .photo-frame .frame-pause{margin-top:6px;min-height:28px}
 body[data-page="home"] .photo-frame .frame-status:empty{display:none}
 body[data-page="home"] .hero-frames{position:relative;inset:auto;top:auto;width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:12px;max-width:850px}
 body[data-page="home"] .hero-frames .photo-frame{justify-self:end;align-self:start;inset:auto;top:auto}
 body[data-page="home"] .hero-frames .memory-frame{min-height:0;padding:12px 12px 42px}
 body[data-page="home"] .memory-content blockquote{-webkit-line-clamp:3;font-size:15px}
 body[data-page="home"] .memory-frame-link{margin:6px 0 0}
 body[data-page="home"] .hero-bottom{position:relative;inset:auto;bottom:auto;height:42px;min-height:42px;padding:0 8px;width:100%;margin-top:auto}
 body[data-page="home"] .hero video,body[data-page="home"] .hero :is(.ambient,.shade){inset:0;width:100%;height:100%}
}
@media(max-width:600px){
 body[data-page="home"] :is(.photo-hero,.hero){padding:10px;gap:10px}
 body[data-page="home"] :is(.hero-copy,.hero-intro) h1{font-size:20px}
 body[data-page="home"] .hero-copy h1{display:none}
 body[data-page="home"] .hero-copy{justify-content:center}
 body[data-page="home"] .hero-frames{gap:8px}
 body[data-page="home"] .hero-frames .photo-frame{padding:8px}
 body[data-page="home"] .hero-frames .memory-frame{padding:8px 8px 38px}
 body[data-page="home"] .hero-frames .frame-top{font-size:9px;letter-spacing:0;gap:4px}
 body[data-page="home"] .hero-frames .frame-dot{display:none}
 body[data-page="home"] .memory-content blockquote{-webkit-line-clamp:2;font-size:13px}
 body[data-page="home"] #memory-frame-author{font-size:11px}
}
@media(max-height:500px){
 body[data-page="home"] :is(.hero-copy,.hero-intro){display:none}
 body[data-page="home"] :is(.photo-hero,.hero){padding-block:6px;gap:6px}
 body[data-page="home"] .photo-frame{position:relative;padding:8px 8px 44px}
 body[data-page="home"] .photo-frame .frame-top{position:absolute;top:12px;inset-inline-end:12px;margin:0;z-index:2}
 body[data-page="home"] .photo-frame .frame-top>span{display:none}
 body[data-page="home"] .photo-frame .frame-fullscreen{background:#f5f3eddd}
 body[data-page="home"] .photo-frame .frame-bottom{position:absolute;bottom:6px;inset-inline-end:8px;padding:0}
 body[data-page="home"] .photo-frame .frame-bottom>div:first-child{display:none}
 body[data-page="home"] .photo-frame .frame-meta small{display:none}
 body[data-page="home"] .photo-frame .frame-pause{position:absolute;bottom:6px;inset-inline-start:8px;margin:0}
 body[data-page="home"] .hero-bottom .scroll-link{display:none}
 body[data-page="home"] .hero-frames .memory-frame{padding:6px 10px 26px}
 body[data-page="home"] .memory-frame .frame-top{margin-bottom:4px}
 body[data-page="home"] .memory-content blockquote{-webkit-line-clamp:1;font-size:13px;margin-bottom:4px}
 body[data-page="home"] #memory-frame-author{font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body[data-page="home"] .memory-frame-link{margin:3px 0 0}
}

/* Keep the site identity in the header and give the introduction to its description. */
body[data-photo-site] .hero-copy h1{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body[data-photo-site] .hero-copy .eyebrow{display:none}
#frame-open{touch-action:manipulation}
@media(max-width:1100px),(max-height:850px){
 body[data-page="home"] :is(.hero-copy,.hero-intro) :is(.hero-subtitle,.hero-description){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font:14px/1.4 Arial,sans-serif;margin:0;min-width:0;max-width:760px}
 body[data-page="home"] .hero-intro h1{display:none}
 body[data-page="home"] .hero-frames{display:flex;flex-direction:column;gap:10px;width:min(48vw,420px,var(--home-card-width,420px));max-width:100%;align-self:flex-end;flex:none}
 body[data-page="home"] .hero-frames .photo-frame{width:100%;max-width:100%;align-self:stretch}
 body[data-page="home"] .hero-frames .memory-frame{box-sizing:border-box;width:100%;min-height:0;padding:10px 12px 38px}
 body[data-page="home"] .memory-frame .frame-top{display:none}
 body[data-page="home"] .memory-content blockquote{-webkit-line-clamp:2;font:14px/1.4 Georgia,serif;margin:0 0 5px}
 body[data-page="home"] .memory-content cite{font-size:11px;line-height:1.3}
 body[data-page="home"] .memory-frame-link{font-size:11px;line-height:1.4;margin:6px 0 0}
 body[data-page="home"] .memory-frame-controls{bottom:6px}
}
@media(max-width:600px){
 body[data-page="home"] :is(.hero-copy,.hero-intro){gap:8px}
 body[data-page="home"] :is(.hero-copy,.hero-intro) :is(.hero-subtitle,.hero-description){font-size:12px}
 body[data-page="home"] .hero-frames{width:min(74vw,320px,max(180px,var(--home-card-width,320px)))}
}
@media(max-height:500px){
 body[data-page="home"] .hero-frames .memory-frame{padding:6px 8px 30px}
 body[data-page="home"] .memory-content blockquote{font-size:12px;line-height:1.25}
 body[data-page="home"] .hero-frames{gap:6px}
}
body[data-page="home"] .hero-frames #memory-frame-author{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-page="home"] .photo-frame .frame-fullscreen{margin-inline-start:auto}
@media(max-width:600px) and (max-height:700px){
 body[data-page="home"] .hero-frames .photo-frame{position:relative;padding:8px 8px 42px}
 body[data-page="home"] .hero-frames .photo-frame .frame-top{position:absolute;top:12px;inset-inline-end:12px;margin:0;z-index:2}
 body[data-page="home"] .hero-frames .photo-frame .frame-top>span{display:none}
 body[data-page="home"] .hero-frames .photo-frame .frame-fullscreen{background:#f5f3eddd}
 body[data-page="home"] .hero-frames .photo-frame .frame-bottom{position:absolute;bottom:7px;inset-inline-end:8px;padding:0}
 body[data-page="home"] .hero-frames .photo-frame .frame-bottom>div:first-child,body[data-page="home"] .hero-frames .frame-progress{display:none}
 body[data-page="home"] .hero-frames .memory-frame{padding:8px 10px 32px}
}
@media(max-height:500px){
 body[data-page="home"] .hero-frames{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:min(70vw,600px,calc(var(--home-card-width,300px)*2 + 6px));align-items:start}
}
/* 2.3.156 (Andrew 16.10, laptop at 150% = 1280x720): Andrew and School89 keep the big-screen layout — introduction and button on the
   left, the photograph on the right — on wide but short windows; the stacked layout stays for phones and narrow windows. */
/* 2.3.187 (аудит B п.9): from 900px, so 150% on a 1440px screen (960x540) keeps the two columns too */
@media(min-width:900px) and (min-height:500px) and (max-height:850px){
 body[data-photo-site][data-page="home"] .photo-hero{display:grid;grid-template-columns:minmax(320px,1fr) minmax(0,min(46vw,580px));column-gap:clamp(24px,4vw,56px);row-gap:0;align-items:center;justify-content:normal;padding:12px clamp(24px,4vw,56px)}
 body[data-photo-site][data-page="home"] .hero-copy{display:block;width:auto;max-width:520px;justify-self:start}
 body[data-photo-site][data-page="home"] .hero-copy .hero-subtitle{display:block;-webkit-line-clamp:unset;overflow:visible;max-width:520px;margin:0 0 22px;font:22px/1.5 Georgia,serif}
 body[data-photo-site][data-page="home"] .hero-copy .photo-total{display:inline}
 body[data-photo-site][data-page="home"] .hero-copy .hero-links{display:flex;align-items:center;gap:16px;margin:0}
 body[data-photo-site][data-page="home"] .hero-copy .primary{padding:12px 18px;font-size:15px;min-height:44px}
 body[data-photo-site][data-page="home"] .photo-frame{width:100%;max-width:min(var(--fit-width,580px),580px);justify-self:end;align-self:center}
}

/* 2.3.187 (аудит B п.3, п.9): a low window (150%) — the memorial card «Воспоминание» gives its height to the photo; a small photo card gets smaller buttons
   («В альбом», ⛶ 36px) so they do not cover a quarter of the photo; a very small one shows only the folder icon of «В альбом» */
@media(max-height:600px) and (min-width:700px){body[data-page="home"] .hero-frames .memory-frame{display:none}}
body[data-page="home"] .photo-frame .frame-album{white-space:nowrap}
body[data-page="home"] .photo-frame.frame-small .frame-photo .frame-actions{inset-inline-end:8px;bottom:8px;gap:6px}
body[data-page="home"] .photo-frame.frame-small :is(.frame-album,#frame-album){min-height:36px;padding:4px 10px;font-size:13px;gap:5px}
body[data-page="home"] .photo-frame.frame-small .frame-photo .frame-actions>#photo-fullscreen{width:36px;height:36px;min-height:36px;font-size:15px}
body[data-page="home"] .photo-frame.frame-tiny #frame-album-label{display:none}
/* 2.3.188 (аудит B п.19: «„Пауза“ — 31×28 px, на iPad трудно попасть»): the look and the place stay; an invisible touch area of about 44px around it.
   position:relative only where nothing else positions the button (:where — no specificity, an absolute position elsewhere wins) */
:where(body[data-page="home"] .photo-frame .frame-pause){position:relative}
body[data-page="home"] .photo-frame .frame-pause::after{content:'';position:absolute;inset:-9px -10px}
/* 2.3.189 (Andrew 18.10, elisheva on a laptop: «расположение на главной странице текста кнопок и рамок фото было как и на остальных сайтах… воспоминания
   оставить под фотографией… рамку воспоминаний по высоте уменьшить, рамку фотографии увеличить… одинаковые ширины… одинаковая линейка»; ГЛАВНЫЙ АУДИТ:
   «колонку той же ширины и с той же левой границей, что у andrew… фото — во всю ширину рамки»): on a computer-wide window the memorial home takes andrew's
   grid exactly — the same columns, gaps and paddings (tall and low windows as andrew's), the photo card as wide as andrew's (home-fit.js: andrew's formula)
   and at the same place (tall: the start of the column, low: its end); the photo fills the card's width, as high as «Воспоминания» under it leave
   (--eli-photo-h, cut top and bottom); «Воспоминания» the same width, lower; the strip «Сохраняем дорогие моменты» stays across the bottom.
   Left: as andrew — tall: from the top, «Ещё наши сайты» at the bottom of the column; low: in the middle. Phones and narrow windows keep their layout. */
@media(min-width:1000px) and (min-height:500px){
 body[data-page="home"]:not([data-photo-site]) #home.hero{display:grid;grid-template-columns:minmax(320px,1fr) minmax(440px,min(58vw,860px));grid-template-rows:minmax(0,1fr) auto;column-gap:clamp(24px,4vw,64px);row-gap:0;align-items:stretch;padding:40px clamp(24px,4vw,64px) 0;height:calc(100svh - 88px);min-height:560px;box-sizing:border-box}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro{position:relative;inset:auto;bottom:auto;grid-column:1;grid-row:1;width:auto;max-width:560px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:0;padding-bottom:28px;z-index:3}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro :is(.eyebrow,.dates,.hero-description){display:block}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro h1{display:block;font-size:clamp(30px,2.6vw,44px);line-height:1.15;margin:10px 0 12px;white-space:pre-line}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro .hero-description{display:block;-webkit-line-clamp:unset;overflow:visible;font:17px/1.5 Georgia,serif;max-width:520px;margin:10px 0 0}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro .hero-links{display:flex;align-items:center;gap:16px;margin:22px 0 0}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro .primary{padding:12px 18px;font-size:15px;min-height:44px}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro .text-link{display:inline-block}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro>.home-sites{display:flex;margin-top:auto}
 body[data-page="home"]:not([data-photo-site]) #home .hero-frames{position:relative;inset:auto;top:auto;grid-column:2;grid-row:1;align-self:start;justify-self:start;width:min(100%,var(--home-card-width,580px));max-width:none;display:flex;flex-direction:column;gap:12px;padding-bottom:20px;z-index:3}
 body[data-page="home"]:not([data-photo-site]) #home .hero-frames .photo-frame{width:100%;max-width:100%;align-self:stretch;justify-self:auto}
 body[data-page="home"]:not([data-photo-site]) #home #frame-open{aspect-ratio:auto;height:var(--eli-photo-h,auto)}
 body[data-page="home"]:not([data-photo-site]) #home #frame-open img{object-fit:cover;object-position:50% 35%}
 body[data-page="home"]:not([data-photo-site]) #home .hero-frames .memory-frame{box-sizing:border-box;width:100%;min-height:0;padding:10px 14px 34px}
 body[data-page="home"]:not([data-photo-site]) #home .hero-frames .memory-frame .frame-top{display:flex;margin-bottom:4px}
 body[data-page="home"]:not([data-photo-site]) #home #memory-frame-quote{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:15px;line-height:1.45;margin:0 0 4px}
 body[data-page="home"]:not([data-photo-site]) #home .hero-bottom{position:relative;inset:auto;bottom:auto;grid-column:1/-1;grid-row:2;width:auto;margin-inline:calc(-1 * clamp(24px,4vw,64px));z-index:3}
 body[data-page="home"]:not([data-photo-site]) #home video{padding-inline-end:0}
 /* ⛶ stands on the photo (as on andrew), its own row above the photo goes */
 body[data-page="home"]:not([data-photo-site]) #home .photo-frame>.frame-top{position:absolute;top:22px;inset-inline-end:22px;z-index:3;margin:0;padding:0;height:auto;min-height:0}
 body[data-page="home"]:not([data-photo-site]) #home .photo-frame>.frame-top #photo-fullscreen{display:grid;place-items:center;width:40px;height:40px;margin:0;border:1px solid #fff6;border-radius:50%;background:#252b27c9;color:#fff;font-size:17px;backdrop-filter:blur(6px)}
}
/* a low window (≤ 850 px): andrew's low grid — the card at most min(46vw, 580px), at the end of its column, both columns in the middle of the height */
@media(min-width:1000px) and (min-height:500px) and (max-height:850px){
 body[data-page="home"]:not([data-photo-site]) #home.hero{grid-template-columns:minmax(320px,1fr) minmax(0,min(46vw,580px));column-gap:clamp(24px,4vw,56px);padding:12px clamp(24px,4vw,56px) 0}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro{justify-content:center;padding-bottom:12px}
 body[data-page="home"]:not([data-photo-site]) #home .hero-intro>.home-sites{margin-top:22px}
 body[data-page="home"]:not([data-photo-site]) #home .hero-frames{align-self:center;justify-self:end;padding-bottom:12px}
 body[data-page="home"]:not([data-photo-site]) #home .hero-bottom{margin-inline:calc(-1 * clamp(24px,4vw,56px))}
}
