#math-practice-content .practice-modal.practice-reel { width: min(1120px, calc(100vw - 24px)); max-width: 1120px; height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); background: #edf5fb; }
.practice-reel .practice-modal-header { height: 60px; padding: 10px 20px; }
.practice-reel .practice-modal-header h2 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.practice-reel .practice-modal-scroll { height: calc(100% - 60px); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.practice-reel .practice-actions { flex-shrink: 0; padding: 6px 16px !important; gap: 6px !important; position: static; background: white; border-bottom: 1px solid #dbe7ef; }
.practice-reel .practice-actions button { min-height: 36px; padding: 7px 10px; font-size: 11px; width: auto; }
.practice-reel #practice-grade { display: none; }
.practice-reel #practice-status { flex-shrink: 0; font-size: 12px; padding: 6px 20px; margin: 0; min-height: 30px; }
.practice-reel #practice-paper-host { flex: 1; min-height: 0; }
#math-practice-content .practice-reel .paper { display: flex; flex-direction: column; height: 100%; min-height: 0; max-width: none; width: 100%; padding: 0; margin: 0 !important; background: none; box-shadow: none; }
.practice-reel .paper > :is(.paper-top,h2,.paper-meta,.paper-bottom) { display: none !important; }
.reel-progress { width: min(720px, calc(100% - 40px)); margin: 0 auto; padding: 4px 0 8px; flex-shrink: 0; }
.reel-progress > div { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: #25526f; font-size: 14px; }
.reel-answered { color: #657d8f; font-size: 12px; }
.reel-progress progress { display: block; width: 100%; height: 7px; margin-top: 8px; border: 0; border-radius: 6px; accent-color: #1688cf; overflow: hidden; }
.reel-progress progress::-webkit-progress-bar { background: #dce8ef; }.reel-progress progress::-webkit-progress-value { background: #1688cf; border-radius: 6px; }
#math-practice-content .practice-reel .question-grid { display: block; flex: 1; min-height: 0; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; position: relative; }
#math-practice-content .practice-reel .reel-slide { height: 100%; min-height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow-y: auto; padding: 8px 20px 18px; border: 0; }
.reel-card { width: min(720px, 100%); min-height: 100%; margin: auto; padding: clamp(20px, 3vw, 32px); border: 1px solid #d4e3ed; border-radius: 24px; background: #fff; box-shadow: 0 10px 30px #2a536710; }
#math-practice-content .practice-reel .stage-prompt { font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; line-height: 1.7; }
#math-practice-content .practice-reel .stage-visual { max-height: 210px; margin: 18px auto; border-radius: 16px; background: #f5faff; }
#math-practice-content .practice-reel .stage-answer-fields { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
#math-practice-content .practice-reel .stage-field input { border-radius: 12px; min-height: 48px; font-size: 20px; }
.reel-navigation { display: flex; flex-shrink: 0; justify-content: flex-end; gap: 10px; min-height: 88px; padding: 14px 22px 22px 160px; }
.reel-navigation button { width: auto; min-height: 48px; padding: 12px 20px; font-size: 14px; }
#practice-popup > #aiedue-rpg-hud { position: absolute !important; left: 12px !important; bottom: 12px !important; top: auto !important; right: auto !important; z-index: 20; display: flex; }
@media (max-width: 700px) {
  #math-practice-content .practice-modal.practice-reel { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .practice-reel .practice-actions { padding: 6px 12px !important; }
  .practice-reel .practice-actions button { padding: 6px 8px; font-size: 10px; }
  #math-practice-content .practice-reel .reel-slide { padding: 6px 12px 12px; }
  .reel-card { padding: 18px 16px; border-radius: 20px; }
  .reel-navigation { min-height: 150px; flex-wrap: wrap; align-content: flex-start; padding: 10px 14px 16px 152px; }
  .reel-navigation button { flex: 1; min-height: 44px; padding: 10px; font-size: 12px; }
  .reel-progress { width: calc(100% - 28px); }
}
@media print {
  html, body.math-mode, body.math-mode .premium-card { background: white !important; box-shadow: none !important; border: 0 !important; }
  #main-container { position: static !important; width: 100% !important; max-width: none !important; height: auto !important; overflow: visible !important; transform: none !important; animation: none !important; }
  .view-section { display: none !important; }
  #math-practice-section { display: block !important; position: static !important; width: 100% !important; height: auto !important; background: white !important; overflow: visible !important; }
  #math-practice-section > :not(.math-practice-shell) { display: none !important; }
  #math-practice-section .math-practice-shell { width: 100% !important; padding: 0 !important; margin: 0 !important; }
  #math-practice-content .practice-modal.practice-reel, .practice-reel .practice-modal-scroll, .practice-reel #practice-paper-host, #math-practice-content .practice-reel .paper, #math-practice-content .practice-reel .question-grid { display: block !important; position: static !important; height: auto !important; max-height: none !important; width: 100% !important; min-height: 0 !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; background: white !important; }
  .practice-reel :is(.practice-modal-header,#practice-status,#aiedue-rpg-hud,.reel-progress,.reel-navigation,.practice-actions) { display: none !important; }
  #math-practice-content .practice-reel .reel-slide { display: block !important; height: auto !important; min-height: 245mm !important; overflow: visible !important; break-after: page; page-break-after: always; padding: 6mm !important; }
  #math-practice-content .practice-reel .reel-slide:last-child { break-after: auto; page-break-after: auto; }
  .reel-card { padding: 0 !important; border: 0; box-shadow: none; width: 100%; }
  .reel-card::before { content: '에이두 수학 익힘  ·  이름: __________________'; display: block; margin-bottom: 8mm; color: #526477; font-size: 11px; }
  .reel-slide[aria-hidden="true"] { visibility: visible !important; }
}
