.photo-album-heading,.photo-album-scroll,.photo-album-actions,.photo-result-heading,.photo-result-keepsake,.photo-result-actions{display:contents}
.photo-album-heading>p{font-size:15px;line-height:1.7;color:#fff}
.photo-album-heading>.eyebrow{color:#fff}
.photo-album-heading h1{color:#fff}
.photo-album-actions>p{font-size:14px;line-height:1.6;color:#fff;margin:18px 0 0}
.photo-album-actions>.primary{max-width:360px;margin:18px auto 0}
.photo-result-heading>p{font-size:15px;color:#476378;line-height:1.7;margin:10px 0}
.photo-result-actions>.quiet{font-size:14px}
.photo-album-scroll:focus-visible{outline:3px solid #ffe295;outline-offset:-3px}
@media(max-width:740px),(max-width:1366px) and (max-height:600px),(hover:none) and (pointer:coarse) and (orientation:landscape){
  body:is([data-screen="album"],[data-screen="result"],[data-screen="lobby"]){overflow:hidden;overscroll-behavior:none}
  body:is([data-screen="album"],[data-screen="result"],[data-screen="lobby"])>.site-header,body:is([data-screen="album"],[data-screen="result"],[data-screen="lobby"]) footer{display:none}
  body[data-screen="game"] #game{height:var(--photo-viewport-height,100dvh);bottom:auto}
  body:is([data-screen="album"],[data-screen="result"],[data-screen="lobby"]) main{padding:0}
  body:is([data-screen="album"],[data-screen="result"],[data-screen="lobby"]) :is(#album,#result,#lobby):not([hidden]){position:fixed;top:0;left:0;right:0;bottom:auto;z-index:10;width:100%;max-width:none;height:var(--photo-viewport-height,100dvh);min-height:0;margin:0;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:linear-gradient(145deg,#139abb,#065d88);border:0;border-radius:0;box-shadow:none}
  body[data-screen="album"] #album{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px;overflow:hidden}
  .photo-album-heading{display:block;min-width:0}
  .photo-album-heading>.eyebrow{display:none}
  .photo-album-heading h1{font-size:25px;line-height:1.3;letter-spacing:-1px;margin:0;color:#fff}
  .photo-album-heading>p{font-size:14px;line-height:1.5;margin:6px 0 0}
  .photo-album-scroll{display:block;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:14px 4px 12px;scrollbar-gutter:stable;border-radius:19px}
  .photo-album-scroll .album-rows{margin:0;gap:24px}
  .photo-album-scroll .album-row{padding:24px 9px 12px;border-radius:18px}
  .photo-album-scroll .album-row-title{font-size:14px;left:12px;padding:5px 11px;max-width:90%}
  .photo-album-scroll .album-photos{gap:9px}
  .photo-album-scroll .album-photo{padding:5px;transform:none;border-radius:9px}
  .photo-album-scroll .photo-caption{font-size:13px;line-height:1.4;padding:7px 2px 0;gap:4px;flex-wrap:wrap;color:#4a6374}
  .photo-album-scroll .photo-caption strong{font-size:22px}
  .photo-album-scroll .counting-board{margin:18px 0 0;padding:10px;gap:15px;border-radius:18px}
  .photo-album-scroll .counting-board>div{width:42%;min-width:0}
  .photo-album-scroll .counting-board>div>span{font-size:14px;color:#2f6178}
  .photo-album-scroll .counting-board>div>strong{font-size:42px;line-height:1.25;letter-spacing:-1px}
  .photo-album-scroll .versus{font-size:16px}
  .photo-album-actions{display:grid;gap:7px;padding:9px 10px;border:1px solid #b7e6ef;border-radius:18px;background:#effbff;box-shadow:0 -3px 14px #004a6e22}
  .photo-album-actions>p{font-size:14px;color:#285a72;line-height:1.5;margin:0}
  .photo-album-actions>.primary{margin:0;width:100%;max-width:none;min-height:48px;font-size:17px}
  body[data-screen="result"] #result{display:block;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-gutter:stable}
  #result .result-card{width:100%;max-width:560px;margin:0 auto;padding:18px;border-radius:23px;box-shadow:none;min-height:0}
  #result .photo-result-heading{display:block}
  #result .photo-result-heading>.eyebrow,#result .result-symbol{display:none}
  #result .result-card h1{font-size:34px;line-height:1.25;letter-spacing:-1px;margin:0}
  #result .photo-result-heading>p{font-size:15px;line-height:1.5;margin:7px 0 12px}
  #result .photo-result-keepsake{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0}
  #result .result-photo{width:min(100%,260px);max-width:none;margin:0 auto;padding:10px 10px 13px}
  #result .result-photo>span{font-size:14px;line-height:1.4;padding-top:7px}
  #result .final-scores{width:100%;margin:0;padding:9px 12px;gap:14px;border-radius:15px}
  #result .final-scores b{font-size:28px;line-height:1.2}
  #result .final-scores span{font-size:14px;line-height:1.5}
  #result .best-details{font-size:13px;line-height:1.5;color:#315c70;margin:0;overflow-wrap:anywhere}
  #result .photo-result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:14px;align-content:center}
  #result .photo-result-actions>button{margin:0;min-height:46px;padding:9px;font-size:15px;line-height:1.45;min-width:0}
  #result #again{grid-column:1/-1;order:-1}
  #result .photo-result-actions>.quiet{grid-column:1/-1;text-decoration:underline}
  body[data-screen="lobby"] #lobby{display:block;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
  #lobby .lobby-picture{display:none}
  #lobby .lobby-content{max-width:640px;margin:0 auto;background:#f0fbff;border-radius:22px;padding:20px}
  #lobby .lobby-content h1{font-size:28px;margin:7px 0}
  #lobby .lobby-content>p{font-size:15px;line-height:1.5}
  .capture-polaroid{width:min(86vw,calc((var(--photo-viewport-height,100dvh) - 120px)*1.5))}
  .photo-viewer{height:var(--photo-viewport-height,100dvh);bottom:auto;padding:48px 14px 14px;overflow:auto}
  .viewer-print{max-height:calc(var(--photo-viewport-height,100dvh) - 66px);width:min(95vw,850px)}
  body:is([data-screen="game"],[data-screen="album"],[data-screen="result"],[data-screen="lobby"]) dialog{max-height:calc(var(--photo-viewport-height,100dvh) - 24px);overflow:auto;overscroll-behavior:contain}
}
@media(orientation:landscape) and (max-width:1366px) and (max-height:600px),(hover:none) and (pointer:coarse) and (orientation:landscape){
  body[data-screen="album"] #album{gap:7px;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .photo-album-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left}
  .photo-album-heading h1{font-size:24px;white-space:nowrap}
  .photo-album-heading>p{font-size:14px;margin:0;max-width:48%}
  .photo-album-scroll{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:12px;align-items:start;padding-top:14px}
  .photo-album-scroll .album-rows{grid-column:1;grid-row:1;gap:24px}
  .photo-album-scroll .album-row{padding:23px 8px 9px}
  .photo-album-scroll .album-photos{gap:10px}
  .photo-album-scroll .album-photo>canvas{width:100%;height:clamp(65px,27vh,130px);aspect-ratio:auto;object-fit:contain;background:#e9f8fa;border-radius:5px}
  .photo-album-scroll .photo-caption{font-size:13px;padding-top:5px;gap:3px}
  .photo-album-scroll .photo-caption strong{font-size:22px}
  .photo-album-scroll .counting-board{grid-column:2;grid-row:1;flex-direction:column;gap:4px;margin:0;padding:9px}
  .photo-album-scroll .counting-board>div{width:100%}
  .photo-album-scroll .counting-board>div>strong{font-size:36px;line-height:1.15}
  .photo-album-scroll .versus{font-size:14px}
  .photo-album-actions{grid-template-columns:minmax(0,1fr) minmax(220px,36%);align-items:center;gap:15px;padding:7px 11px}
  .photo-album-actions>p{font-size:14px;text-align:left}
  .photo-album-actions>.primary{min-height:44px;font-size:16px;padding:8px}
  #result .result-card{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);grid-template-rows:auto minmax(0,1fr);max-width:1080px;min-height:100%;gap:8px 20px;padding:12px 16px;border-radius:19px;align-items:center}
  #result .photo-result-heading{grid-column:2;grid-row:1}
  #result .result-card h1{font-size:clamp(24px,3.5vw,34px);margin:0;line-height:1.2}
  #result .photo-result-heading>p{font-size:14px;line-height:1.45;margin:6px 0 0}
  #result .photo-result-keepsake{grid-column:1;grid-row:1/3;gap:7px;justify-content:center}
  #result .result-photo{width:min(100%,calc((var(--photo-viewport-height,100dvh) - 180px)*1.5));max-width:330px;padding:7px 7px 9px}
  #result .result-photo>span{font-size:13px;padding-top:5px}
  #result .final-scores{padding:7px 9px;gap:10px}
  #result .final-scores b{font-size:26px}
  #result .final-scores span{font-size:13px}
  #result .best-details{font-size:12px;line-height:1.4}
  #result .photo-result-actions{grid-column:2;grid-row:2;margin:0;gap:8px;align-self:center}
  #result .photo-result-actions>button{min-height:44px;font-size:15px;padding:8px}
  .viewer-print{width:min(88vw,calc((var(--photo-viewport-height,100dvh) - 120px)*1.5));padding:8px 8px 12px}
  .viewer-print strong{font-size:17px;margin-top:8px}
  .viewer-print p{font-size:13px;margin:5px 0}
}
