@media (max-width: 800px) {
  body #app:not(.immersive) { width: 100%; min-width: 0; height: auto; min-height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 12px; }
  #app:not(.immersive) .page-header { order: 0; padding: 0 0 8px; }
  #app:not(.immersive) .course-title h1 { font-size: clamp(21px, 5.7vw, 30px); line-height: 1.3; white-space: normal; }
  #app:not(.immersive) .workspace { display: contents; }
  #app:not(.immersive) .center-column { display: block; order: 2; }
  #app:not(.immersive) .stage { height: clamp(235px, 68vw, 410px); }
  #app:not(.immersive) .clock { width: min(64vw, 370px); }
  #app:not(.immersive) .caption { min-height: 0; padding: 12px 4px 0; }
  #app:not(.immersive) .caption > * { max-width: 100%; white-space: normal; }
  #app:not(.immersive) .page-footer { order: 3; position: static; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
  #app:not(.immersive) .toolbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
  #app:not(.immersive) .toolbar button { min-height: 44px; }
  #app:not(.immersive) .source-note { position: static; text-align: center; }
  #app:not(.immersive) .board { order: 4; overflow-x: auto; }
  #app:not(.immersive) .board-grid { min-width: 330px; height: auto; min-height: 420px; grid-template-rows: 48px repeat(4,auto); }
  #app:not(.immersive) .geology { order: 1; }
  #app:has(.history-picker):not(.immersive) .geology { display: none; }
  #app:not(.immersive) .history-picker { display: flex; order: 1; align-items: center; gap: 12px; margin: 0; font-size: 16px; }
  .history-picker select { flex: 1; min-height: 44px; padding: 4px 12px; border: 1px solid #9eaba3; border-radius: 4px; color: #294a43; background: #fffdf5; font: inherit; }
}
.history-picker { display: none; }
@media (max-width: 800px) {
  #app:not(.immersive) .signature { display: none; }
  #app:not(.immersive) .page-footer { height: auto; min-height: 70px; }
  #app:not(.immersive) .page-footer .source-note { flex: 0 0 100%; margin: 0; }
}
