.tool-panel:not([hidden]) { display: grid; gap: 12px; }
.tool-panel { overflow-wrap: anywhere; }
.tool-panel h2, .tool-panel p, .tool-panel ol { margin-block: 0; }
.tool-panel button { justify-self: start; }
.tool-panel input:not([type=checkbox]), .tool-panel textarea { width: 100%; }
.draw-turn { font: 2.2rem/1.2 Georgia, serif; }
@media print {
  body:has(#draw-result:not([hidden])) :is(.header,.skip-link,.crumbs,.guide-hero,.guide-cta,.guide-faq,.related,.footer),
  body:has(#draw-result:not([hidden])) .prose > :not(#draw-result),
  #draw-result :is(button,.draw-turn,#copy-status) { display: none !important; }
  #draw-result:not([hidden]), #draw-result:not([hidden]) #draw-list[hidden] { display: block !important; }
}
#tickets { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-block: 1.5rem; }
.draw-ticket:not([hidden]) { display: grid; gap: .4rem; justify-items: center; padding: 12px 4px; border: 1px dashed #777; text-align: center; }
.draw-ticket strong { font: 2.7rem/1 Georgia, serif; }
.draw-ticket span, .draw-ticket small { font-size: .75rem; }
@media print {
  body:has(#tickets) :is(.header,.skip-link,.crumbs,.guide-hero,.guide-cta,.guide-faq,.related,.footer),
  body:has(#tickets) .prose > :not(#tickets) { display: none !important; }
  body:has(#tickets) :is(.wrap,.prose) { width: 100%; max-width: none; margin: 0; padding: 0; }
  #tickets { grid-template-columns: repeat(4, 1fr); margin: 0; }
  .draw-ticket { break-inside: avoid; color: black; }
}
#reader { width: min(94vw, 48rem); max-height: 90vh; }
#passage { font: clamp(1.4rem, 3vw, 2.5rem)/1.4 Georgia, serif; }
#passage b { color: var(--forest); text-decoration: underline; }
#rules-card { margin-block: 1.5rem; border: 1px dashed var(--forest); overflow-wrap: anywhere; }
#sheet-budget { font-weight: 700; }
@media print {
  body:has(#rules-card) :is(.header,.skip-link,.crumbs,.guide-hero,.guide-cta,.guide-faq,.related,.footer),
  body:has(#rules-card) .prose > :not(#rules-card) { display: none !important; }
  body:has(#rules-card) :is(.wrap,.prose) { display: block; width: 100%; max-width: none; margin: 0; padding: 0; }
  #rules-card { margin: 0; padding: 20pt; border: 1pt dashed #333; break-inside: avoid; color: black; }
  #sheet-rules li { font-size: 13pt; line-height: 1.4; margin-bottom: 12pt; }
}
/* Keep controls under the pointer as a passage or preview changes height. */
.guide-page :is(dialog,.tool-panel) .button:hover:not(:disabled) { transform: none; }
