/* Fix the shared shell without rebuilding or changing betting components. */
.app-wrapper:has(.page-container > .unified-lottery-room) {
  height: calc(100vh / var(--app-zoom, 1));
  height: calc(100dvh / var(--app-zoom, 1));
}
.page-container:has(> .unified-lottery-room) {
  padding-bottom: 0 !important;
  overflow: hidden;
  will-change: auto;
}
html.lottery-room-mobile-fit,
html.lottery-room-mobile-fit body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
html.lottery-room-mobile-fit {
  --app-zoom: 1 !important;
  --app-max-width: 100% !important;
  --app-total-width: 100% !important;
}
html.lottery-room-mobile-fit #app { zoom: 1 !important; max-width: 100% !important; }
html.lottery-room-mobile-fit .app-wrapper:has(.unified-lottery-room) {
  position: fixed !important;
  top: var(--lottery-room-top, 0px) !important;
  left: 0;
  width: 100%;
  height: var(--lottery-room-height, 100dvh) !important;
  min-height: 0;
  overflow: hidden;
}
html.lottery-room-mobile-fit .page-container:has(> .unified-lottery-room) {
  top: 0 !important;
  height: 100% !important;
}
html.lottery-room-mobile-fit .unified-lottery-room {
  width: 100%;
  max-width: none;
  height: 100% !important;
  min-height: 0 !important;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
html.lottery-room-mobile-fit .unified-room-header { padding-top: env(safe-area-inset-top); }
html.lottery-room-mobile-fit .unified-room-workspace { flex: 1 1 0%; min-height: 0; overflow: hidden; }
html.lottery-room-mobile-fit .unified-room-content,
html.lottery-room-mobile-fit .unified-room-sidebar {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: 12px;
}
html.lottery-room-mobile-fit .unified-bet-footer { flex: 0 0 auto; }
/* Keep all controls legible when a keyboard or landscape viewport is short. */
html.lottery-room-compact .unified-room-header { padding-bottom: 4px; }
html.lottery-room-compact .room-nav-row { height: 34px; }
html.lottery-room-compact .room-nav-row h1 { font-size: 15px; }
html.lottery-room-compact .room-nav-row button { height: 32px; }
html.lottery-room-compact .room-issue-row { min-height: 25px; padding-bottom: 3px; }
html.lottery-room-compact .room-draw-panel { padding: 4px 8px; }
html.lottery-room-compact .room-draw-balls { margin: 4px auto 0; }
html.lottery-room-compact .room-draw-balls--ssc { grid-template-columns: repeat(5, 24px); }
html.lottery-room-compact .room-draw-balls--pk10 { max-width: 278px; }
html.lottery-room-compact .room-draw-ball { font-size: 12px; }
html.lottery-room-compact .room-draw-ball-item small { margin-top: 1px; line-height: 10px; }
html.lottery-room-compact .room-draw-detail { font-size: 10px; line-height: 12px; }
html.lottery-room-compact .unified-room-tabs { height: 32px; }
html.lottery-room-compact .unified-bet-footer { padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
html.lottery-room-compact .unified-stake-row,
html.lottery-room-compact .unified-action-row { margin-top: 4px; }
html.lottery-room-compact .unified-stake-row { height: 34px; }
html.lottery-room-compact .unified-action-row { height: 34px; }
