/* Keep the imported chapter art and behavior; constrain its layout to the viewport. */
#player.app{width:100%;min-width:0}
#player.app>*{min-width:0;max-width:100%}
#player.app>.bar{flex-wrap:wrap;min-width:0}
#player.app>.bar .kiso-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0;max-width:100%}
#player.app .kiso-reading{display:inline-flex;align-items:center;gap:4px;max-width:100%;font-size:12px}
#player.app .kiso-reading select{min-width:0;max-width:100%}
#player.app .sheet>*{min-width:0;max-width:100%}
#map.map .node .meta{min-width:0;max-width:100%;overflow-wrap:anywhere}

/* The public banner takes real space, rather than covering the bottom of a player. */
body:has(>.demo-public-bar){display:flex;flex-direction:column;height:100dvh;overflow:hidden}
body>.demo-public-bar{flex:none}
body:has(>.demo-public-bar)>#player.app,
body:has(>.demo-public-bar)>#map.map{flex:1 1 0;min-height:0;height:auto}

@media(max-width:899px){#player.app{grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){
 #player.app>.bar .segs{flex:1 1 100%;order:1}
 #player.app>.bar .kiso-tools{flex:1 1 100%;order:2;justify-content:flex-end}
 #map.map{overflow-y:auto;overscroll-behavior:contain}
 #map.map>.mhead,#map.map>.mtools{flex-shrink:0}
 #map.map .mhead{grid-template-columns:minmax(0,1fr)}
 #map.map .mhead .art{display:none}
 #map.map .mhead h1{font-size:clamp(24px,6vw,32px)}
 #map.map #path{flex:none;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:minmax(104px,auto);gap:8px}
 #map.map .node{flex-direction:row!important;align-items:center;min-width:0;min-height:104px;gap:8px!important;padding:8px!important}
 #map.map .node .disc{width:44px!important;height:44px!important;flex:0 0 44px!important}
 #map.map .node .meta{flex:1 1 0%;align-self:center}
 #map.map .node b{font-size:13px!important;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
 #map.map .node .k{font-size:10px;line-height:1.2;letter-spacing:.04em}
 #map.map .node .cap,#map.map .node .src{display:none}
 #map.map .demo-lock{width:max-content;max-width:calc(100% - 12px);white-space:normal;text-align:center;font-size:13px;line-height:1.2;padding:6px}
 #map.map .demo-free{right:4px;top:4px;font-size:9px;padding:2px 4px}
}
