body { font-family: Georgia, serif; background: #f3ead8; color: #3a2f25; margin: 0 auto; max-width: 560px; padding: 16px; }
  h1 { font-size: 1.5em; margin: 0 0 4px 0; }
  h2 { font-size: 1.1em; margin: 0 0 2px 0; }
  p { margin: 8px 0; line-height: 1.4; }
  canvas { display: block; width: 100%; max-width: 528px; height: auto; border: 2px solid #7a5c43; border-radius: 6px; background: #e6d6b8; touch-action: manipulation; }
  canvas:focus { outline: 2px solid #2f7fb8; }
  button { font: inherit; padding: 6px 12px; margin: 0 6px 6px 0; background: #fff8e8; border: 1px solid #7a5c43; border-radius: 4px; color: inherit; }
  button:disabled { color: #a89880; border-color: #c9b99c; background: #efe5d0; }
  .water { border-top: 1px solid #c9b99c; padding: 10px 0 2px 0; }
  .water p { margin: 4px 0; }
  #status { min-height: 4.2em; }
  #notice { min-height: 1.4em; font-style: italic; }
  small { color: #6b5a48; }
  /* A wide, low frame (such as 768 by 432): the board goes to the left at the frame's height, the words to its right. */
  @media (min-width: 700px) and (max-height: 640px) {
    body { max-width: 980px; padding: 8px 16px; }
    h1 { font-size: 1.1em; margin: 0 0 4px 0; }
    #play:not([hidden]) { display: grid; grid-template-columns: auto 1fr; grid-template-rows: repeat(5, auto) 1fr; column-gap: 16px; align-items: start; }
    #play > * { grid-column: 2; }
    #play > canvas { grid-column: 1; grid-row: 1 / span 6; width: min(528px, calc(100vh - 54px)); max-width: none; }
    #play > h2 { margin-top: 0; }
    #play > p { margin: 4px 0; }
    #status { min-height: 3em; }
  }
