/* The word board: a full-height app screen. Board fills whatever the header and
   composer leave, so the keypad never covers the grid — the reason we use our
   own A–Z keypad instead of the native keyboard. */
.board-page { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.board-page header.site { flex: 0 0 auto; }

.board-wrap { position: relative; flex: 1 1 auto; min-height: 0; background: #0b0b0f;
  overflow: hidden; touch-action: none; }
/* absolutely positioned so the canvas never drives layout: as a flex child with
   height:100% it grew to its own pixel height and pushed the keypad off-screen */
.board-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.board-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  background: rgba(20,18,24,0.9); border: 1px solid var(--border-2); color: var(--text-2);
  font-size: 13px; border-radius: 999px; padding: 7px 14px; pointer-events: none;
  transition: opacity 0.25s ease; white-space: nowrap; }
.board-hint.gone { opacity: 0; }

.board-tools { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.zoom { width: 38px; height: 38px; border-radius: 50%; background: rgba(22,22,22,0.92);
  border: 1px solid var(--border-2); color: var(--text-1); font-size: 18px; font-weight: 800;
  font-family: inherit; cursor: pointer; line-height: 1; }
.zoom:hover { border-color: var(--pink); }

/* composer */
.composer { flex: 0 0 auto; background: var(--bg-card); border-top: 1px solid var(--border-1);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
.status { text-align: center; min-height: 30px; display: flex; align-items: center;
  justify-content: center; gap: 8px; font-size: 14px; font-weight: 700; padding: 2px 0 6px; }
.status-msg { color: var(--text-2); font-weight: 600; }
.status .w { font-size: 17px; font-weight: 900; letter-spacing: 0.06em; color: var(--text-1); }
.status .ok { color: #46d39a; }
.status .warn { color: #ffb020; }
.status .bad { color: var(--pink-hot); }

.keypad { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.key { background: var(--bg-raised); border: 1px solid var(--border-1); color: var(--text-1);
  font-family: inherit; font-size: 16px; font-weight: 800; border-radius: 6px;
  height: 42px; cursor: pointer; padding: 0; transition: background 0.1s ease, border-color 0.1s ease; }
.key:hover:not(:disabled) { background: #2a2630; border-color: var(--pink); }
.key:active:not(:disabled) { background: var(--pink); }
.key:disabled { opacity: 0.3; cursor: not-allowed; }
.key.wide { grid-column: span 2; font-size: 13px; }

.composer-foot { display: flex; align-items: center; gap: 8px; padding-top: 8px; }
.composer-foot input { flex: 0 0 84px; background: var(--bg-raised); border: 1px solid var(--border-2);
  color: var(--text-1); font-family: inherit; font-size: 15px; font-weight: 700; text-align: center;
  border-radius: var(--radius-md); padding: 10px 8px; text-transform: uppercase; }
.composer-foot input:focus { outline: none; border-color: var(--pink); }
.composer-foot .tool { flex: 0 0 auto; padding: 10px 14px; }
.composer-foot .btn { flex: 1 1 auto; padding: 11px 18px; }

@media (min-width: 720px) {
  .keypad { max-width: 640px; margin: 0 auto; gap: 6px; }
  .key { height: 46px; font-size: 17px; }
  .composer-foot { max-width: 640px; margin: 0 auto; }
  .status { padding-bottom: 8px; }
}
