/* The writing pad (public/answer-pad.js). Mobile-first: the canvas fills the width and keeps a
   usable height on a 360 px phone, controls are at least 44 px, and the page never scrolls while
   writing: touch-action is set here only (no inline styles), so every page that mounts the pad
   must link this file. Labels wrap instead of relying on word length, so other languages fit. */
.wp { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.wp-canvas {
  display: block;
  width: 100%;
  height: clamp(180px, 38vh, 420px);
  background: #fffdf7;
  border: 2px solid #c9c3e6;
  border-radius: 14px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.wp-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.wp-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.8rem;
  border: 2px solid #c9c3e6;
  border-radius: 12px;
  background: #ffffff;
  color: #1d1b3a;
  font: inherit;
  white-space: normal;
}
.wp-btn[aria-pressed="true"] { background: #e9e4ff; border-color: #6b5bd6; }
.wp-btn:disabled { opacity: 0.5; }
.wp-btn:focus-visible { outline: 3px solid #6b5bd6; outline-offset: 2px; }
.wp-submit { margin-inline-start: auto; background: #6b5bd6; border-color: #6b5bd6; color: #ffffff; }
@media (min-width: 768px) { .wp-canvas { height: clamp(240px, 45vh, 520px); } }
