[data-tank-menu-button]{display:none}
@media (max-width:700px) and (orientation:portrait){
  main[data-tank-menu]:not(.aquarium-fullscreen)>[data-tank-menu-button]{
    position:absolute;display:block;z-index:20;top:max(8px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));
    min-height:40px;padding:8px 14px;border:1px solid #62938e;border-radius:10px;background:#102e36;color:#edf9f6;font:600 13px/1.2 system-ui
  }
  main[data-tank-menu]:not(.aquarium-fullscreen)>header{
    box-sizing:border-box;display:flex;flex-direction:column;align-items:stretch;gap:8px;
    padding:8px 12px;inset:0 0 auto;width:100%;max-height:34svh;overflow:auto;overscroll-behavior:contain;pointer-events:auto;background:#0a1c27
  }
  main[data-tank-menu]:not(.aquarium-fullscreen)>header :is(.identity,.reef-identity){
    display:flex;align-items:center;gap:8px;min-height:40px;margin:0;padding-right:118px
  }
  main[data-tank-menu]>header :is(.identity,.reef-identity) :is(.intro,.eyebrow:not(a)){display:none}
  main[data-tank-menu]>header :is(.identity,.reef-identity) h1{display:block;margin:0;font:500 14px/1.2 Georgia,serif;text-align:left}
  main[data-tank-menu]>header .hr-home-pill{margin:0!important}
  main[data-tank-menu="closed"]:not(.aquarium-fullscreen)>header :is(nav,.scene-note,.reef-tools,.primary-tools),
  main[data-tank-menu="closed"]:not(.aquarium-fullscreen)>footer{display:none}
  main[data-tank-menu="open"]:not(.aquarium-fullscreen)>header{max-height:46svh;overflow:hidden}
  .tank-controls-drawer{display:flex;flex-direction:column;gap:8px;min-height:0;overflow:auto;overscroll-behavior:contain}
  .tank-controls-drawer>*{flex:none}
  main[data-tank-menu] .tank-controls-drawer footer{
    position:static;display:flex;flex-flow:column nowrap;align-items:center;justify-content:flex-start;
    width:100%;max-width:none;transform:none;margin:0;padding:0;white-space:normal
  }
  .tank-controls-drawer footer :is(.views,.actions){display:flex;flex-wrap:wrap;justify-content:center}
  main[data-tank-menu]:not(.aquarium-fullscreen)>.help,
  main[data-tank-menu]:not(.aquarium-fullscreen)>.bottom-note{display:none}
  #app[data-tank-menu].reef-panel-open{min-height:0}
  main[data-tank-menu] .aquarium-header{left:0!important;right:0!important;top:0!important}
  main[data-tank-menu].observation-idle>[data-tank-menu-button]{visibility:hidden}
}

@media (max-width:500px) and (orientation:portrait){
  html[data-mobile-demo="betta-bowl"] .site-links{
    display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 8px
  }
  html[data-mobile-demo="betta-bowl"] .site-links>a{white-space:nowrap;padding:5px 8px}
  /* Keep the graphics picker clear of both rows of footer links. */
  html[data-mobile-demo="betta-bowl"] body>.graphics-choice{bottom:calc(max(10px,env(safe-area-inset-bottom)) + 74px)}
  html[data-mobile-demo="betta-bowl"] .betta-controls .variety-menu{max-height:32dvh}
  html[data-mobile-demo="betta-bowl"] #stage .water-panel{bottom:calc(112px + env(safe-area-inset-bottom));max-height:28dvh}
  html[data-mobile-demo="betta-bowl"] #stage:not(.water-on) .learn-card{bottom:calc(112px + env(safe-area-inset-bottom));max-height:25dvh;overflow:auto}
}

@media (pointer:coarse) and (max-width:1000px) and (orientation:landscape) and (max-height:520px){
  html[data-mobile-demo="filtration"] header{padding:5px 12px}
  html[data-mobile-demo="filtration"] main{width:auto;margin:0 10px}
  html[data-mobile-demo="filtration"] .intro{display:flex;gap:12px;align-items:center;padding:4px 0}
  html[data-mobile-demo="filtration"] .intro .eyebrow{display:none}
  html[data-mobile-demo="filtration"] .intro h1{font-size:22px;margin:0}
  html[data-mobile-demo="filtration"] .intro p{margin:0;font-size:11px;line-height:1.2}
  html[data-mobile-demo="filtration"] .systems{display:flex;overflow-x:auto;gap:4px;margin:3px 0;padding:0}
  html[data-mobile-demo="filtration"] .systems button{flex:1 0 auto;min-width:0;padding:5px 8px;min-height:34px}
  html[data-mobile-demo="filtration"] .workspace{display:grid;grid-template-columns:minmax(0,3fr) minmax(230px,2fr)}
  html[data-mobile-demo="filtration"] .stage .scene-head{margin:4px 12px;height:20px}
  html[data-mobile-demo="filtration"] .workspace .stage :is(#viewport,#labels){height:calc(100svh - 132px)}
  html[data-mobile-demo="filtration"] .workspace .stage #labels{top:28px}
  html[data-mobile-demo="canister"] .filter-dialog>header{min-height:0;padding:6px 12px}
  html[data-mobile-demo="canister"] .filter-dialog .filter-layout{display:grid;grid-template-columns:minmax(0,3fr) minmax(230px,2fr)}
  html[data-mobile-demo="canister"] .filter-dialog .filter-stage{display:flex;flex-direction:column;min-height:0;height:auto}
  html[data-mobile-demo="canister"] .filter-stage .filter-canvas{position:relative;inset:auto;flex:none;order:-2;height:calc(100svh - 84px)}
  html[data-mobile-demo="canister"] .filter-stage :is(.filter-view-label,.filter-toolbar,.filter-legend){position:static;margin:6px 10px}
  html[data-mobile-demo="canister"] .filter-dialog .filter-guide{max-height:calc(100svh - 84px);overflow:auto}
}
@media (pointer:coarse) and (max-width:700px) and (orientation:portrait){
  html[data-mobile-demo="fantasy-terrarium"] .jt-guide:not(.closed){max-height:27svh;overflow:auto;overscroll-behavior:contain}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:520px){
  html[data-mobile-demo="fantasy-terrarium"] .jt-guide{top:54px;bottom:auto;right:12px;max-width:38vw}
  html[data-mobile-demo="fantasy-terrarium"] .jt-guide:not(.closed){max-height:calc(100svh - 133px);overflow:auto;overscroll-behavior:contain}
}
@media (pointer:coarse) and (max-width:1000px){
  html[data-mobile-demo="fantasy-terrarium"] .jt-guide:not(.closed)>h3{position:sticky;top:0;z-index:1;background:#282b28;color:#fff;border-radius:8px;padding:8px}
}
