/* Living Showroom (freshwater) and Living Reef on a short, wide screen: a phone held sideways (Lab, Nov 17 2026;
   Jez: "fix the tank and reef shrinking sideways"). Added to the two built pages by tools/apply-showroom-phone.mjs,
   after each program's own stylesheet, so the programs synced from jez237-site are not edited.
   Before: the menus took most of a 390 px-high screen and the tank was a strip about 130 px tall. */
@media (max-height:520px) and (min-width:600px){

/* ---- Living Reef: the picture gets the row left between a one-line header and a one-line footer. ---- */
#app>header{display:flex;align-items:center;gap:8px;padding:6px 10px 5px}
#app>header .reef-identity h1,#app>header .reef-identity .intro,#app>header nav{display:none}
#app>header .reef-identity{flex:none}
#app>header .reef-tools{flex:1;min-width:0;gap:5px;margin:0}
#app>header .reef-tools>button,#app>header .reef-tools>a{min-height:36px;padding:5px 6px;font-size:11.5px;line-height:1.2;flex:1;min-width:0}
#app>header .reef-tools small{display:none}
#app>footer{flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center;gap:8px;padding:4px 10px 6px}
#app>footer .caption{display:none}
#app>footer .views,#app>footer .actions{margin:0;padding:3px;white-space:nowrap}
#app>footer .views button,#app>footer .actions button{min-height:34px;padding:6px 10px}
#app,#app.reef-panel-open{min-height:0}
/* A lesson or lab opens beside the picture, never under it, so the picture keeps its height. */
#app.reef-panel-open{grid-template-columns:minmax(0,1fr) min(390px,46vw);grid-template-rows:auto minmax(0,1fr) auto}
#app.reef-panel-open #reef-learning{grid-area:2/2/4;border-radius:12px 0 0;border-left:1px solid #345469;padding:12px 16px 20px}
#app.reef-panel-open>footer{display:flex;flex-wrap:wrap}
#app.reef-panel-open>footer .views button,#app.reef-panel-open>footer .actions button{padding:6px 6px}

/* ---- Living Showroom: its camera leaves room for controls in proportion to where the picture starts.
   The picture now covers the whole screen and starts (for that sum) 140 px down, so the tank is drawn at about
   two thirds of the screen's height instead of a third; the controls sit over its top and bottom edges. ---- */
main:not(.aquarium-fullscreen)>#scene{top:140px;bottom:auto;height:100%;transform:translateY(-140px)}
/* A lesson or the identify panel opens beside the tank, never under it. */
main.learning-open>#scene,main.exploration-open>#scene{right:min(390px,46vw)}
main.learning-open #learning{top:0;bottom:0;left:auto;right:0;width:min(390px,46vw);border-top:0;border-left:1px solid #bbd9cd40}
main.exploration-open #exploration{inset:0 0 0 auto;width:min(390px,46vw);max-width:none;max-height:none;border-radius:0;border-width:0 0 0 1px}
main.learning-open .aquarium-header,main.exploration-open .aquarium-header{right:calc(min(390px,46vw) + 10px)}
main.learning-open>footer,main.exploration-open>footer{display:none}
main.learning-open .primary-tools>button,main.exploration-open .primary-tools>button{font-size:10.5px;padding:4px 5px}
main.learning-open>#fullscreen,main.exploration-open>#fullscreen{right:calc(min(390px,46vw) + 10px)}
main .aquarium-header,main.learning-open .aquarium-header,main.exploration-open .aquarium-header{top:6px;left:10px}
main:not(.learning-open):not(.exploration-open) .aquarium-header{right:10px}
.aquarium-header .identity,.aquarium-header nav,.aquarium-header .scene-note,main>.help,main>.bottom-note{display:none}
.aquarium-header .primary-tools{grid-row:1;grid-column:1/-1}
.aquarium-header .primary-tools>button{min-height:38px;padding:5px 7px}
main:not(.learning-open):not(.exploration-open)>footer{flex-direction:row;align-items:center;gap:6px;left:8px;bottom:6px;transform:none;max-width:calc(100% - 112px)}
main>footer .views,main>footer .actions{flex-wrap:nowrap;padding:3px}
main>footer .views button,main>footer .actions button{padding:8px 7px;font-size:12px}
main>#fullscreen{bottom:6px;right:10px}
}
/* Narrower still: pinch and drag do the zooming, so the + and - buttons make room for the rest. */
@media (max-height:520px) and (min-width:600px) and (max-width:760px){
main>footer #zoomIn,main>footer #zoomOut,main>footer .actions .divider,main>footer #reset{display:none}
#app>footer .views button,#app>footer .actions button{padding:6px 7px}
}
