/* Bangla Bloom v3.2.21: responsive defects identified in codebase-wide audit.
   All previous full-frame subject photography and lesson text remain unchanged.
   On 320px-wide phones the 4-column Memory Meadow board previously overflowed
   because each card had a hard 70px minimum height and square aspect ratio.
   Very narrow viewports use responsive grid sizing, plus a 2-column layout. */
@media (max-width: 380px) {
  .memory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .memory-grid > .memory-card {
    width: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    padding: 3px;
    font-size: clamp(13px, 4.5vw, 18px);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .memory-grid > .memory-card > svg {
    max-width: 70%;
    width: 28px;
    height: auto;
  }
}
/* On the narrowest phones, two columns keep word faces legible and tappable
   instead of forcing the English names into 58px-wide squares. */
@media (max-width: 360px) {
  .memory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .memory-grid > .memory-card {
    aspect-ratio: 4 / 3;
    min-height: 72px;
    font-size: 16px;
    padding: 7px;
    overflow-wrap: anywhere;
  }
}
