/* Mobile-only fit; desktop postcard and corner artwork retain their layout. */
@media(max-width:760px),(pointer:coarse){
 :root{--mobile-edge:12px}
 .odd-systems-corner{
  width:clamp(82px,26vw,120px);height:auto;object-fit:contain;
  left:max(var(--mobile-edge),env(safe-area-inset-left));
  top:max(var(--mobile-edge),env(safe-area-inset-top));
 }
 .contact-stamp#contact-stamp{
  width:clamp(60px,18vw,88px);height:auto;
  right:max(var(--mobile-edge),env(safe-area-inset-right));
  top:max(var(--mobile-edge),env(safe-area-inset-top));
 }
 .oddly-corner-logo{
  width:clamp(86px,27vw,130px);height:auto;object-fit:contain;
  left:max(var(--mobile-edge),env(safe-area-inset-left));
  bottom:max(var(--mobile-edge),env(safe-area-inset-bottom));
 }
 .side-archive{
  right:max(var(--mobile-edge),env(safe-area-inset-right));
  bottom:max(var(--mobile-edge),env(safe-area-inset-bottom));
 }
 #contact-popup.photo-postcard{
  inset:auto;left:var(--mobile-center-x,50%);top:var(--mobile-center-y,50%);margin:0;
  width:calc(var(--mobile-vw,100vw)*.85);height:auto;
  max-width:640px;max-height:none;min-height:0;aspect-ratio:auto;
  background:#cae4b8;overflow:visible;
  transform:translate(-50%,-50%) scale(var(--postcard-fit,1));transform-origin:center;
 }
 #contact-popup[open]{grid-template-columns:54.2% 45.8%;grid-template-rows:auto}
 #contact-popup .wave-visual{position:relative;min-width:0;min-height:0;overflow:hidden;aspect-ratio:auto;align-self:stretch}
 #contact-popup .wave-signal{inset:0;width:100%;height:100%;object-fit:contain}
 #contact-popup .wave-art{left:2%;top:1.25%;width:83%;height:97.5%;max-width:100%;max-height:100%;object-fit:contain}
 #contact-popup .photo-postcard-form{
  position:relative;inset:auto;width:auto;min-width:0;margin:0;
  padding:66px 16px 16px;gap:8px;align-content:start;min-height:0;transform:none;align-self:stretch;
 }
 #contact-popup .wave-inquiry-heading{font:600 13px/1.3 monospace}
 #contact-popup .photo-postcard-form :is(input,textarea){font-size:16px;line-height:1.3;padding:5px 0;min-width:0;max-width:100%}
 #contact-popup .photo-postcard-form textarea{height:80px;max-height:none;min-height:0;resize:none}
 #contact-popup .contact-submit{min-height:36px;font-size:13px;padding:8px}
 #contact-popup .wave-chat{font-size:12px;line-height:1.4;margin:8px 0 0;overflow-wrap:anywhere}
 #contact-popup .contact-dismiss{width:44px;height:44px;top:-36px;right:0;font-size:30px;line-height:44px}
 #contact-popup .wave-stamp-slot{top:8px;right:12px;width:50px}
}
@media(max-width:760px) and (orientation:portrait){
 #contact-popup[open]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto}
 #contact-popup .wave-visual{height:clamp(90px,20vh,150px);aspect-ratio:auto}
 #contact-popup .photo-postcard-form{padding:62px 18px 16px}
 #contact-popup .wave-stamp-slot{top:calc(clamp(90px,20vh,150px) + 6px);right:16px}
}

/* In mobile landscape, reserve narrow side gutters for the corner artwork. */
.mobile-folder-wide #app .console{
 width:min(calc(100vw - 120px),max(0px,calc((100dvh - var(--folder-top-clearance,24px) - var(--folder-bottom-clearance,48px)) * 1360 / 740)));
}
.mobile-folder-wide .odd-systems-corner{width:52px;height:auto;left:8px;top:8px}
.mobile-folder-wide .contact-stamp#contact-stamp{width:38px;height:auto;right:8px;top:8px}
.mobile-folder-wide .oddly-corner-logo{width:54px;height:auto;left:8px;bottom:8px}
.mobile-folder-wide body{--archive-end-height:30px;--archive-gutter:8px;--archive-bottom:8px}
.mobile-folder-wide .side-archive{right:8px;bottom:8px}
.mobile-folder-wide .mobile-view-exit{min-height:28px;padding:0 8px;font-size:10px;bottom:4px}
