/* Hand-tuned responsive fixes on top of the generated per-element rules. */
html,body{overflow-x:clip}
body{overflow-wrap:break-word}

/* Hover cards: also open on tap, and stay on screen on narrow phones. */
@media (hover:none){
  .pop:focus .pop-card{opacity:1;transform:translate(-50%,0)}
}
@media (max-width:1100px){
  .dia,p:has(> .pop){position:relative}
  .dia .pop,p:has(> .pop) .pop{position:static}
  .pop-card{left:50% !important;width:min(260px,calc(100vw - 40px)) !important}
}

/* How I work cards: no tall empty gap when stacked. */
@media (max-width:767px){
  .how-card{min-height:0 !important;gap:16px !important}
}

/* About: keep the polaroid fan on phones and tablets, scaled to fit. */
@media (max-width:900px){
  .pol-wrap{display:block !important;height:320px !important;width:min(360px,100%);margin:8px auto 0}
}
@media (max-width:420px){
  .pol-wrap{scale:.88;transform-origin:top center;height:290px !important}
}

/* Home: keep photo and intro side by side until phones. */
@media (min-width:641px){
  .about-grid{grid-template-columns:5fr 7fr !important}
}
