/* Small phones (iPhone SE, 320-360 px wide) */
@media (max-width: 360px) {
  .screen { padding-left: 10px; padding-right: 10px; }
  .logo-row span { width: 38px; height: 44px; font-size: 28px; }
  .hud h1 { font-size: 23px; }
  .tool { width: 80px; }
  .btn.big { font-size: 21px; }
}
/* Short screens: tighten vertical spacing so the board stays large */
@media (max-height: 640px) {
  .hud h1 { font-size: 21px; margin: 2px 0; }
  .chips { margin: 6px 0 4px; gap: 4px; }
  .tool { padding: 4px 4px 3px; font-size: 12px; } .tool > img { width: 22px; height: 22px; }
  .actions { padding-top: 6px; }
  .board { --pad: 5px; border-radius: 16px; }
  .chip { padding: 3px 7px; --chip-font: 14px; }
  .hud-row { font-size: 14px; } .progress { height: 16px; } .progress span { line-height: 16px; font-size: 12px; }
  .logo { min-height: 120px; } .tagline { margin-top: 6px; }
  .home-actions { gap: 10px; }
}
/* Landscape phones: put the word list beside the board */
@media (orientation: landscape) and (max-height: 520px) {
  #play.active { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.15fr); grid-template-rows: auto 1fr auto; column-gap: 14px; max-width: 900px; }
  #play .bar { grid-column: 1 / -1; }
  #play .hud { grid-column: 1; grid-row: 2; overflow-y: auto; }
  #play .board-wrap { grid-column: 2; grid-row: 2 / 4; }
  #play .actions { grid-column: 1; grid-row: 3; }
  .tool { width: 74px; }
  #home.active { max-width: 900px; }
  .logo { min-height: 0; } .logo-row span { width: 36px; height: 40px; font-size: 26px; }
}
/* Tablets and desktops */
@media (min-width: 700px) and (min-height: 760px) {
  .hud h1 { font-size: 34px; }
  .chip { --chip-font: 18px; }
}
