/* Give lessons the main reading area; retain full-size touch controls. */
#shelf .library.scrolling .library-header{padding:4px 12px;gap:8px;min-height:55px}
#shelf .library.scrolling .lib-top{padding:6px 16px 0;gap:5px}
#shelf .library.scrolling .lib-title{gap:8px;min-height:34px}
#shelf .library.scrolling .lib-title h3{font-size:23px}
#shelf .library.scrolling .smart-shelf-badge{width:40px;height:34px;margin:0}
#shelf .library.scrolling .lib-tools{flex-wrap:nowrap;gap:8px}
#shelf .library.scrolling .lib-seg{flex:none}
#shelf .library.scrolling .lib-seg button{min-height:44px;padding:0 10px}
#shelf .library.scrolling .lib-search{flex:1 1 auto;min-width:0;padding:0 8px}
#shelf .library.scrolling .lib-search-input{min-height:44px}
#shelf .library.scrolling .lib-index{padding-bottom:5px}
#shelf .library.scrolling .lib-index button{min-height:44px}
#shelf .library.scrolling .lib-scroll{padding-top:8px}
@media(max-width:650px){
 #shelf .library.scrolling .lib-top{padding:5px 10px 0;gap:5px}
 #shelf .library.scrolling .lib-title{flex-wrap:nowrap;min-width:0}
 #shelf .library.scrolling .lib-title h3{font-size:19px;min-width:0}
 #shelf .library.scrolling .lib-prog{flex:none;margin-left:auto;font-size:11px;gap:4px}
 #shelf .library.scrolling .lib-bookbar{width:46px}
 #shelf .library.scrolling .lib-seg button{padding:0 7px}
}
/* Bigger islands fill their existing interaction targets; Bobo keeps his own stage. */
#v-map #world{gap:6px 8px}
#v-map #world .isle .land{width:min(100%,calc((100cqh - 6px)/2 - 78px));max-width:320px}
#v-module-map .mw-islands{max-width:1200px;gap:6px 10px}
#v-module-map .mw-island-art{width:min(100%,calc((100cqh - 6px)/2 - 82px));max-width:360px}
@media(min-width:701px) and (max-width:1000px) and (orientation:portrait){
 #v-map #world{grid-template-columns:minmax(230px,1.15fr) repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
 #v-map #world #mapBobo{grid-column:1;grid-row:1/span 3;width:100%}
 #v-map #world .isle:nth-child(1){grid-column:2;grid-row:1}
 #v-map #world .isle:nth-child(2){grid-column:3;grid-row:1}
 #v-map #world .isle:nth-child(3){grid-column:2;grid-row:2}
 #v-map #world .isle:nth-child(4){grid-column:3;grid-row:2}
 #v-map #world .isle:nth-child(5){grid-column:2/span 2;grid-row:3;width:50%;justify-self:center}
 #v-map #world .isle .land{width:min(100%,calc((100cqh - 12px)/3 - 86px))}
}
@media(max-width:700px) and (orientation:portrait){
 #v-map #world{grid-template-rows:290px repeat(3,244px);height:1040px;min-height:1040px;gap:6px 6px}
 #v-map #world .isle .land{width:min(100%,170px)}
 #v-module-map .mw-islands{gap:10px 6px}
 #v-module-map .mw-island-art{width:min(100%,42vw,200px)}
}
@media(max-height:600px) and (orientation:landscape){
 #v-map #world{height:max(100%,490px);min-height:490px;gap:6px}
 #v-map #world .isle .land{width:min(100%,153px)}
 #v-module-map .mw-islands{min-height:490px;flex:none}
 #v-module-map .mw-island-art{width:min(100%,155px)}
}
/* In a short landscape window, the list itself is the chapter navigation. */
@media(max-height:500px) and (orientation:landscape){
 #shelf .library.scrolling .lib-index,#shelf .library.scrolling .lib-fab{display:none}
 #shelf .library.scrolling .lib-chhead{position:static;padding:5px 8px;gap:8px;margin-bottom:8px}
 #shelf .library.scrolling .library-thumbnail{width:64px;height:48px}
 #shelf .library.scrolling .lib-chtxt b{font-size:18px}
 #shelf .library.scrolling .lib-chtxt small,#shelf .library.scrolling .lib-chtxt em{font-size:11px}
}
