/* The actual panels move into a single nonmodal sheet only after enhancement. */
body[data-st-page] .masthead { position:relative;top:auto; }
.st-mobile-sheet { display:none; }
@media(max-width:767px) {
  body[data-st-mobile=yes] .masthead .shell-inner { padding-block:6px;gap:8px; }
  .st-site-menu { margin-left:auto; }
  .st-site-menu-content { flex-basis:100%;display:flex;flex-wrap:wrap;gap:8px; }
  .st-site-menu-content[hidden] { display:none; }
  .st-site-menu-content :is(nav,.masthead-tools) { margin:0; }
  .st-site-menu-content nav a { min-height:44px;display:inline-flex;align-items:center; }
  body[data-st-mobile=yes] .sm-pagehead .pagehead-kicker { margin-bottom:2px; }
  body[data-st-mobile=yes] .st { padding-top:8px; }
  [data-st-mobile-emergencies]>summary { min-height:44px;cursor:pointer;display:list-item; }
  [data-st-mobile-emergencies]>summary>strong { font-size:13px; }
  [data-st-mobile=yes] .st-severe-summary .st-urgent { padding:0 10px; }
  [data-st-mobile-navigation] { padding-bottom:calc(5px + env(safe-area-inset-bottom)); }
  [data-st-mobile-navigation] a { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:6px 3px;flex:1;min-width:0;font-size:12px;min-height:56px; }
  [data-st-mobile-navigation] svg { width:22px;height:22px;flex:none; }
  [data-st-mobile-navigation] [aria-current=true] { color:var(--st-action);box-shadow:inset 0 -3px var(--st-action); }
  [data-st-mobile=yes] [data-st-mobile-navigation] { position:fixed;bottom:0;left:0;right:0;z-index:20;margin:0; }
  body[data-st-mobile=yes] { padding-bottom:calc(210px + env(safe-area-inset-bottom)); }
  .st-mobile-sheet { display:flex;flex-direction:column;position:fixed;z-index:19;bottom:var(--st-nav-height,67px);left:0;right:0;height:160px;min-height:min(var(--st-sheet-min-height,160px),calc(100dvh - var(--st-nav-height,67px) - 48px));max-height:calc(100dvh - var(--st-nav-height,67px) - 48px);border:1px solid var(--st-border);border-radius:14px 14px 0 0;background:var(--st-panel);color:var(--st-text);box-shadow:0 -4px 16px #0003;overflow:hidden; }
  .st-mobile-sheet[data-size=half] { height:min(49dvh,max(220px,calc(100dvh - var(--st-map-top,280px) - 110px - var(--st-nav-height,67px)))); }
  .st-mobile-sheet[data-size=full] { height:calc(100dvh - 150px - env(safe-area-inset-top)); }
  .st-sheet-header { display:flex;align-items:center;gap:6px;padding:5px 10px;flex-wrap:wrap;flex:none; }
  .st-sheet-header h2 { margin:0;font-size:15px;line-height:1.4;flex:1;min-width:0; }
  .st-sheet-header>span { position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden; }
  .st-sheet-header .st-button { min-height:44px;font-size:13px; }
  .st-sheet-header [data-st-refresh-status] { flex-basis:100%;min-width:0;font-size:12px;line-height:1.4;overflow-wrap:anywhere;color:var(--st-secondary); }
  .st-sheet-sizes { display:flex;gap:6px;padding:0 10px 5px;flex:none; }
  .st-sheet-sizes button { min-height:44px;font-size:13px;flex:1; }
  body[data-st-page] .st-mobile-sheet .st-sheet-sizes [aria-pressed=true] { background:var(--st-action);color:var(--st-action-text)!important;border-color:var(--st-action); }
  .st-sheet-content { overflow:auto;overscroll-behavior:contain;min-height:48px;flex:1;scroll-padding:12px; }
  .st-sheet-content [data-st-sheet-view] { padding:0 10px 14px; }
  .st-sheet-content [data-st-sheet-view][hidden] { display:none; }
  .st-sheet-content :is(.st-warning-rail,.st-warning-list,.st-severe-inspector) { max-height:none;overflow:visible; }
  .st-sheet-content .st-watched { border:0;padding:8px; }
  .st-sheet-content .st-surface { margin-top:8px; }
  body[data-st-page][data-st-mobile=yes] :is(.st-map-stage,.st-severe-stage) { height:clamp(220px,calc(100dvh - var(--st-map-top,280px) - max(160px,var(--st-sheet-min-height,160px)) - var(--st-nav-height,67px) - 8px),520px);min-height:220px;aspect-ratio:auto; }
  [data-st-mobile=yes] .st-replay-controls { margin:0; }
  [data-st-mobile=yes] .st-rail:empty { display:none; }
  [data-st-mobile=yes] .st-tabs [data-st-mobile-primary] { display:none; }
  .st-sheet-content input[type=search] { font-size:16px;min-height:44px;max-width:100%; }
  .st-sheet-content :focus-visible { outline:3px solid var(--st-action);outline-offset:2px; }
  .st-sheet-content :is(table,pre) { max-width:100%; }
}
/* A short keyboard/landscape viewport scrolls naturally instead of hiding its input. */
@media(max-width:767px) and (max-height:500px) {
  .st-mobile-sheet { position:relative;bottom:auto;margin-top:12px;max-height:none;height:auto!important;min-height:220px; }
  .st-sheet-content { max-height:none;overflow:visible; }
  body[data-st-mobile=yes] { padding-bottom:80px; }
}
@media(forced-colors:active) {
  .st-mobile-sheet,[data-st-mobile-navigation] { border:2px solid CanvasText; }
  [data-st-mobile-navigation] [aria-current=true],.st-sheet-sizes [aria-pressed=true] { outline:2px solid Highlight; }
}
