/* Mobile / responsive fixes */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; }

/* grid/flex children may shrink below their content width */
.grid > *, .flex > * { min-width: 0; }
.shrink-0 { min-width: auto; }

section [dir="rtl"], section h1, section h2, section p { overflow-wrap: anywhere; }

/* tab rows scroll instead of stretching the layout */
section [class*="rounded"]:has(> button + button) { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
section [class*="rounded"]:has(> button + button)::-webkit-scrollbar { display: none; }
section [class*="rounded"] > button { flex-shrink: 0; white-space: nowrap; }

@media (max-width: 640px) {
  section h1 { font-size: clamp(1.9rem, 9vw, 2.6rem); line-height: 1.1; }
  section [class*="max-w-[340px]"] { max-width: 100%; }
}
