/* Respond to the browser viewport: Android display scale, rotation and split view. */
body.study .study-main { min-width: 0; }
body.study .app-dialog { max-height: calc(100dvh - 28px); }
@media (min-width: 1040px) and (max-width: 1500px) {
  body.study .study-sidebar { width: 184px; padding: 24px 12px; }
  body.study .study-main { margin-left: 184px; padding: 24px 24px 48px; }
  body.study .dashboard-subject-grid { gap: 16px; }
}
@media (min-width: 561px) and (max-width: 1039px) {
  body.study .study-sidebar { position: static; width: 100%; min-height: 0; padding: 16px 24px 12px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  body.study .side-brand { margin: 0; }
  body.study .side-account { margin: 0 0 0 auto; padding: 0; border: 0; }
  body.study .study-sidebar .tabs { order: 3; flex: 1 1 100%; min-width: 0; flex-direction: row; flex-wrap: nowrap; gap: 5px; overflow-x: auto; overscroll-behavior-x: contain; }
  body.study .study-sidebar .tab-btn { width: auto; flex-shrink: 0; white-space: nowrap; text-align: center; padding: 10px 12px; }
  body.study .study-sidebar .tab-btn span { width: 19px; }
  body.study .study-main { margin-left: 0; padding: 24px 24px 48px; }
}
@media (min-width: 760px) and (max-width: 1039px) {
  body.study .dashboard-subject-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  body.study .subject-section { padding: 16px; }
  body.study .subject-heading { gap: 6px; }
  body.study .subject-heading > span:last-child { font-size: 12px; }
  body.study .subject-english .year-dots { gap: 2px; }
  body.study .subject-english .metric-bubble span small { display: block; line-height: 1.2; }
  body.study .math-journey { grid-template-columns: repeat(4,minmax(0,1fr)); row-gap: 10px; }
  body.study .math-journey > .journey-step:nth-child(4)::before { display: none; }
}
@media (min-width: 561px) and (max-width: 759px) {
  body.study .study-main { padding: 20px 18px 40px; }
  body.study .dashboard-subject-grid { grid-template-columns: 1fr; }
  body.study .subject-progress { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (pointer: coarse) and (min-width: 600px) {
  body.study :is(.btn,.mini-btn,.icon-btn,.tab-btn,.step-btn),
  body.study .subject-section .dashboard-tools :is(.btn,.mini-btn),
  body.study .subject-english .quick-action { min-height: 44px; }
  body.study :is(.icon-btn,.step-btn) { min-width: 44px; }
  body.study .time-stepper { grid-template-columns: 44px minmax(52px,1fr) 44px; }
  body.study .dashboard-subject-grid .subject-section { height: 500px; min-height: 500px; }
  body.study .mastery-tile { min-height: 68px; }
  body.study .timer-btns { gap: 12px; }
  body.study .slide-finish { height: 60px; width: 300px; }
  body.study .slide-handle { width: 48px; height: 48px; font-size: 25px; }
  body.study .slide-label { left: 60px; }
  body.study .dialog-actions { flex-wrap: wrap; }
  body.study .topic-actions .btn { flex: 1 1 150px; }
  .portal-wrap { max-width: 860px; padding: 36px 28px; }
  .portal-wrap .btn,.login-shell .btn,.login-shell .captcha-box { min-height: 44px; }
  .entry-card { padding: 36px 26px 30px; }
  .login-shell { width: min(100%,420px); }
  .login-shell .panel { max-width: 420px; }
}
@media (max-height: 560px) {
  body.study .timer-card.immersive,body.study .timer-card:fullscreen { justify-content: flex-start; padding: 18px 24px; height: 100dvh; }
  body.study .timer-card.immersive .timer-display,body.study .timer-card:fullscreen .timer-display { font-size: clamp(54px,12vh,88px); margin: 8px 0; }
  .center-page { align-items: flex-start; }
}
