/* Help uses its own scrollable content area; closing it never rebuilds the learner's answer. */
#geary-dialog[open] { display:flex; flex-direction:column; gap:.5rem; overflow:hidden; }
#geary-title, #geary-status, #geary-dialog > .answer-actions { flex-shrink:0; margin:0; }
#geary-status { max-height:25vh; overflow:auto; }
#geary-message { min-height:0; overflow:auto; overscroll-behavior:contain; white-space:pre-wrap; margin:0; padding:.7rem; }
#geary-dialog > .answer-actions { padding-top:.35rem; }
#geary-dialog[data-help-view="explanation"] {
  width:min(96vw,64rem);
  height:calc(var(--learner-viewport-height,100dvh) - 2rem);
  max-height:calc(var(--learner-viewport-height,100dvh) - 2rem);
  padding:1rem;
}
#geary-dialog[data-help-view="explanation"] #geary-message { flex:1; width:100%; }

/* Reserve actual translated review labels, then overlay either Check Answer or the permitted review actions in that footprint. */
#check-answer-slot { display:grid; }
#check-answer-control, #answered-actions, .check-answer-reserve { grid-area:1 / 1; min-width:0; }
#check-answer-control { display:grid; }
#check-answer-control > .check-answer { height:100%; margin:0; width:100%; }
#answered-actions, .check-answer-reserve { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:.5rem; }
.check-answer-reserve { visibility:hidden; pointer-events:none; }
.check-answer-reserve > span, #answered-actions > button { min-width:0; padding:.65em .95em; border:1px solid transparent; min-height:44px; overflow-wrap:anywhere; text-align:center; line-height:inherit; }
#answered-actions > button { border-color:var(--line); }
#answered-actions > button.primary { border-color:var(--primary); }
#answered-actions:not(:has(> button:not([hidden]) ~ button:not([hidden]))) { grid-template-columns:minmax(0,1fr); }
/* Match the shared enabled-button hover after the review control's normal border declarations. */
#answered-actions > button:not(:disabled):hover { border-color:var(--focus); }
@media (forced-colors:active) { #answered-actions > button:not(:disabled):hover { border-color:Highlight; } }
