/* Scoped hotfix: shared practice renderer, no changes to question or record data. */
.chapter-actions-reveal{min-width:0}
.chapter-actions-reveal[hidden]{display:none!important}
.chapter-hover-ready{align-self:start}
.chapter-hover-ready>.chapter-card{flex:0 0 auto}
.chapter-actions .chapter-tool:disabled{cursor:default}
.chapter-actions .chapter-tool.danger:disabled{background:#f8fafc;border-color:#e2e8f0;color:#64748b;opacity:1}
.chapter-actions .chapter-action--wrong{grid-column:1 / -1;background:#fff7ed;border-color:#fdba74;color:#9a3412}
.chapter-actions .chapter-action--wrong:disabled{background:#f8fafc;border-color:#e2e8f0;color:#64748b;opacity:1;cursor:default}
@media(hover:hover){.chapter-actions .chapter-action--wrong:hover:not(:disabled){background:#ffedd5;border-color:#fb923c;color:#9a3412}}
.practice-topline.practice-toolbar-ready{flex-wrap:wrap;gap:8px}
.practice-toolbar-ready>.button,.practice-toolbar-ready>.icon-button{white-space:nowrap;flex-shrink:0;touch-action:manipulation}
.practice-control-icon{width:22px;height:22px;flex:none}
.practice-toolbar-ready .practice-settings .practice-control-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.practice-toolbar-ready>.button .practice-control-icon,.practice-control-short,.practice-sheet-close{display:none}
.practice-toolbar-ready :is(button,a):focus-visible,.practice-sheet-close:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.practice-toolbar-ready [data-toggle-marked][aria-pressed="true"] .practice-control-icon{fill:var(--accent-soft);stroke:var(--accent)}
.practice-toolbar-ready [data-toggle-marked][aria-pressed="true"] .practice-control-short{font-weight:800;text-decoration:underline;text-underline-offset:3px}
/* Long press belongs to option elimination on touch screens. Keep the question,
   explanations and editable notes selectable, and leave pan/pinch gestures native. */
@media(any-pointer:coarse){
  body[data-route="practice"] .question-card [data-option],
  body[data-route="practice"] .question-card [data-option] *{
    -webkit-user-select:none;
    user-select:none;
    -webkit-touch-callout:none;
  }
}
@media(max-width:1100px){
  body[data-route="practice"] .practice-top{padding:8px 12px;min-width:0}
  body[data-route="practice"] .practice-topline.practice-toolbar-ready{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:8px;align-items:center}
  body[data-route="practice"] .practice-toolbar-ready>.button,
  body[data-route="practice"] .practice-toolbar-ready>.icon-button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;min-width:44px;min-height:52px;width:100%;height:auto;padding:5px 2px;margin:0;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);line-height:1.2}
  body[data-route="practice"] .practice-toolbar-ready>.button .practice-control-icon{display:block}
  .practice-toolbar-ready .practice-control-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
  .practice-toolbar-ready .practice-control-short{display:block;font-size:11px;line-height:1.2}
  body[data-route="practice"] .practice-toolbar-ready>[data-end-session]{grid-column:1;grid-row:1;min-height:44px;width:44px;background:var(--surface-2)}
  .practice-toolbar-ready>[data-end-session] .practice-control-short{display:none}
  .practice-toolbar-ready>.topline-count{grid-column:2 / 4;grid-row:1;font-size:16px;min-width:0}
  body[data-route="practice"] .practice-toolbar-ready>.progress-track{grid-column:4 / 6;grid-row:1;min-width:0;width:100%;border-radius:4px}
  .practice-toolbar-ready>.topline-spacer{display:none}
  .practice-toolbar-ready>[data-toggle-marked]{grid-column:1;grid-row:2}
  .practice-toolbar-ready>.practice-search{grid-column:2;grid-row:2}
  .practice-toolbar-ready>[data-reading-on],.practice-toolbar-ready>[data-paper-finish]{grid-column:3;grid-row:2}
  .practice-toolbar-ready>[data-open-settings]{grid-column:4;grid-row:2}
  .practice-toolbar-ready>[data-toggle-sheet]{grid-column:5;grid-row:2}
  .practice-toolbar-ready>.round-chip,.practice-toolbar-ready>.streak-badge,.practice-toolbar-ready>.exam-focus-chip{grid-column:1 / -1;justify-self:start;white-space:normal;order:0}
  body[data-route="practice"] .practice-toolbar-ready>[data-reading-on]{color:#17664d;border-color:#a7d9c7;background:#edf8f3}
  body[data-route="practice"] .practice-toolbar-ready>[data-toggle-sheet]{color:var(--accent-ink);background:var(--accent-soft);border-color:var(--accent)}
  body[data-route="practice"] .practice-toolbar-ready>[data-toggle-marked][aria-pressed="true"]{color:var(--accent-ink);background:var(--accent-soft);border-color:var(--accent)}
  body[data-route="practice"] .answer-sheet{box-sizing:border-box;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));width:auto;min-width:0;max-width:none;top:auto;bottom:calc(76px + env(safe-area-inset-bottom));max-height:calc(100dvh - 100px - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;padding:16px;border-radius:12px}
  .answer-sheet header{gap:8px;flex-wrap:wrap}
  .answer-sheet header h2{flex:1;min-width:0;overflow-wrap:anywhere}
  .answer-sheet .practice-sheet-close{display:inline-flex;min-width:44px;min-height:44px;width:44px;height:44px;flex:none;margin-left:auto}
  .answer-sheet .answer-grid{grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:8px}
  .answer-sheet .answer-number{min-width:44px;min-height:44px;width:100%}
}
