/* Compact controls, with space reserved only while an answer field has focus. */
.hw-launch{gap:6px;flex-wrap:wrap}
.hw-launch button{padding:4px 10px;box-shadow:0 2px 0 var(--ink)}
#handwritingTypeOpen{background:#fff2bf}
.hw-field-nav{display:flex;align-items:center;justify-content:center;flex:none;gap:8px;padding:3px 10px;border-bottom:1px solid #d8c69d;background:#fff9e9}
.hw-field-nav button{min-height:44px;padding:3px 12px;font-size:14px;box-shadow:0 2px 0 var(--ink)}
.hw-field-nav span{min-width:45px;text-align:center;font:700 15px var(--f-body)}
.hw-review-body{scroll-padding:8px}
.hw-field{scroll-margin:8px}
.hw-field input:focus,.hw-field textarea:focus{outline:3px solid #2d8bb2;outline-offset:1px}
.hw-typed .hw-review-actions button:first-child{flex:0 0 auto}
.hw-review-actions button{min-height:44px;font-size:15px;padding:4px 12px}
.hw-typed .hw-question-context{max-height:74px;overflow:auto}
.hw-card [hidden],.answer-keyboard-dock[hidden],.answer-keyboard-dock [hidden]{display:none!important}
.answer-keyboard-dock{position:fixed;z-index:65;display:flex;align-items:center;gap:5px;transform:translateX(-50%);padding:3px 5px;border:2px solid var(--ink);border-radius:12px;background:#fff5d8;box-shadow:0 3px 0 #2b1d1440;font:700 14px var(--f-body);touch-action:manipulation;white-space:nowrap}
.answer-keyboard-dock button{min-height:44px;min-width:44px;padding:3px 9px;background:#fff;border:2px solid var(--ink);border-radius:8px;color:var(--ink);font:inherit}
.answer-keyboard-dock button:last-child{background:#ffe38a}
.answer-keyboard-dock button:disabled{opacity:.4}
.answer-keyboard-dock span{min-width:38px;text-align:center}
#board.answer-keyboard-open{padding-bottom:74px!important;scroll-padding-block:14px 74px}
@media(pointer:coarse){
 #qarea input:not([type=checkbox]):not([type=radio]):not([type=range]),#qarea textarea{font-size:max(16px,1em);min-height:44px;scroll-margin-block:14px 74px;user-select:text;-webkit-user-select:text;touch-action:manipulation}
 .hw-modal{padding:6px}
 .hw-card{width:min(660px,100%)}
 .hw-keyboard .hw-header{min-height:48px;padding:6px 58px 6px 10px}
 .hw-header .sx{top:2px;right:6px;width:44px;height:44px}
 .hw-field input,.hw-field textarea{font-size:18px;min-height:44px;padding:6px 9px}
 .hw-field{grid-template-columns:minmax(52px,auto) minmax(0,1fr);gap:8px}
 .hw-review-body{align-content:start}
}
.hw-short.hw-keyboard .hw-header{display:none}
.hw-short.hw-keyboard .hw-question-context{display:none}
.hw-short.hw-keyboard .hw-field-nav{padding-block:0}
.hw-short.hw-keyboard .hw-review-actions{padding:3px 6px}

body.answer-keyboard-short>.hud{visibility:hidden;pointer-events:none}
body.answer-keyboard-short #stage{top:6px}
body.answer-keyboard-short #stage .gbar{display:none}
body.answer-keyboard-short #stage:not(.scratch-open):not(.with-sheet){grid-template-columns:minmax(0,1fr)!important}
body.answer-keyboard-short #stage>.coach{display:none!important}

.hw-short .hw-field textarea{height:60px;min-height:44px;resize:none}
