.hole-toggle { display:block; width:100%; padding:0; border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.answer-row {
  display:flex; flex-wrap:nowrap; justify-content:center; white-space:nowrap;
  width:min(calc(var(--answer-count) * (var(--answer-width, 25px) + var(--answer-gap, 4px))), calc(100cqw - 44px));
  margin:3px auto 0; gap:min(var(--answer-gap, 4px), .8cqw);
  font:700 clamp(12px, min(var(--answer-font, 18px), calc((100cqw - 46px) / var(--answer-count))), 24px) Georgia, serif;
}
.answer-position {
  display:grid; place-items:center; flex:0 1 var(--answer-width, 25px); min-width:0;
  height:1.35em; padding:0; color:#ffedbb; background:transparent; border:0; border-bottom:1px solid #ead6a29b;
  border-radius:2px 2px 0 0; font:inherit; line-height:1;
}
button.answer-position { cursor:pointer; touch-action:manipulation; }
.answer-row .answer-locked { color:#ffe8a0; font-weight:var(--locked-weight, 800); border-bottom-color:#d5ae57; }
.answer-position.answer-entered { color:#fffdf2; font-style:italic; font-weight:var(--draft-weight, 700); background:#ffffff17; }
.answer-position[aria-current="true"] { outline:calc(var(--active-weight, 2) * 1px) solid #f6d279; outline-offset:-1px; border-bottom-width:2px; }
.answer-keyboard {
  position:absolute; z-index:8; left:50%; bottom:calc(var(--key-inset, 0px) + var(--keyboard-lift, 0px) + 4px);
  width:calc((100% - 8px) * var(--keyboard-scale, 1)); padding:6px;
  border:1px solid #d4af67; border-radius:12px 12px 7px 7px; background:linear-gradient(#234a34, #102e1f);
  box-shadow:0 -3px 12px #101a1399; transform:translate(-50%, calc(110% + var(--key-inset, 0px) + var(--keyboard-lift, 0px)));
  transition:transform var(--key-duration, 200ms) ease-in-out;
}
.answer-keyboard-shown .answer-keyboard { transform:translate(-50%, 0); }
.answer-key-row,.answer-actions { display:flex; gap:var(--key-gap, 4px); }
.answer-key-row + .answer-key-row { margin-top:var(--key-gap, 4px); }
.answer-key-row.row-2 { padding-inline:4.6%; }
.answer-key-row.row-3 { padding-inline:8% 4.6%; }
.answer-keyboard button {
  flex:1; padding:0; min-width:0; height:calc(var(--key-height, 44px) * var(--keyboard-scale, 1));
  border:1px solid #d5b16d; border-radius:var(--key-radius, 7px); color:#fff5d5; background:linear-gradient(#3b5b44, #214332);
  font:700 var(--key-font, 17px)/1 Georgia, serif; touch-action:manipulation; cursor:pointer;
}
.answer-keyboard button:active { background:#9f7635; color:#fff; }
.answer-keyboard button:disabled { opacity:.56; cursor:default; }
.answer-keyboard .answer-backspace { flex:1.7; }
.answer-actions { margin-top:var(--action-gap, 6px); padding-inline:var(--action-offset, 0px); }
.answer-actions [data-answer-key="Submit"]:not(:disabled) { background:#e1bc73; color:#213222; }
.answer-keyboard button:focus-visible,.answer-position:focus-visible,.hole-toggle:focus-visible { outline:2px solid #fff3b5; outline-offset:-2px; }
.answer-active :is(.scene-ball,.scene-marker,.scene-signature,.equipment-address,.equipment-closed,.equipment-drawer,.playing-controls) { visibility:hidden; }
.playing:has(.answer-active) > :is(.playing-feedback,.puzzle-tools) { display:none; }
html:has(.answer-active) { overflow:hidden; overscroll-behavior:none; }
.answer-active .playing-details { max-height:min(100%, var(--answer-clue-height, 120px)); }
.answer-active .equipment-tuning { top:3px; bottom:auto; }
@media (prefers-reduced-motion:reduce) { .answer-keyboard { transition:none; } }
