/* W-104 · the notch and the home bar. Full screen (the iPhone app, or the game added to the home screen) the page runs
   under the status bar and the home indicator; index.html's viewport-fit=cover makes env(safe-area-inset-*) report them
   (0 in a browser tab). The game's frame takes them as padding, so the HUD starts below the notch and the action bar
   ends above the home bar; the timber frame fills the space. The title and loading screen already pad their own. */
#game{padding-top:var(--safe-top,env(safe-area-inset-top));padding-bottom:var(--safe-bottom,env(safe-area-inset-bottom))}
@media(min-width:600px){#game{padding-top:0;padding-bottom:0}}
/* The phone view on a computer (phone.html, phone-frame.js): the designer's iPhone gives the game a 62 px status bar and
   a 34 px home bar; inside the view's frame every inset in the game reads these (var(--safe-top,env(…))). */
:root[data-phone-frame]{--safe-top:62px;--safe-bottom:34px}

/* W-169 (#97), the new screen: in the home-screen app the page reaches the screen's bottom (screen-layout.js applyTall:
   the window plus the status bar), so the strip iOS leaves under it is the game's; the action bar's buttons stay above
   the home bar (its inset in the bar's padding, above). */
html.tall-screen,html.tall-screen body{height:var(--app-h);min-height:var(--app-h);overflow:hidden}
html.tall-screen #game{height:var(--app-h);max-height:none}

/* W-169 (#103), an experiment (?hand=over): on the phone the hand is dealt over the board's near rows and the board keeps
   its empty-hand size (band-cover.js leaves the hand out of the cover). The cards sit on the board's bottom edge with no
   band of their own; while a tower card is held they drop to a low strip so the bottom rows can be tapped; in a wave
   they turn to glass so the minions at the gate show through. */
@media not all and (min-width:960px) and (min-height:600px) and (min-aspect-ratio:5/4){
#game[data-hand="over"] #battle-view{position:relative}
#game[data-hand="over"] #battle-view #actions{z-index:5;background:#272c23}/* the dropped hand slides behind the bar */
#game[data-hand="over"] #battle-view #hand{position:absolute;left:0;right:0;bottom:var(--actions-h,98px);z-index:4;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-top:0;transition:transform .22s ease,opacity .22s ease;pointer-events:none}
#game[data-hand="over"] #battle-view #hand .card{pointer-events:auto;box-shadow:0 6px 16px #000a}
#game[data-hand="over"] #battle-view #hand:has(.card.selected[data-board]){transform:translateY(68%)}/* #150: every card placed or aimed on the board, not towers alone (main.js onBoard) */
#game[data-hand="over"] #battle-view.live-wave #hand:not(:has(.card.selected)) .card{opacity:.45}
#game[data-hand="over"] #battle-view.resolving #hand .card{opacity:.45}
}
/* #157: in a live wave a card you can play now keeps its full colour and its border glows (main.js playableNow; the mana half
   is the live .unaffordable mark, hand-afford.js, so a mid-wave mana rise lights a card without a redraw); the rest
   stay as glass. The laptop's hand shows the same glow (style.css). */
#game[data-hand="over"] #battle-view.live-wave #hand:not(:has(.card.selected)) .card.playable:not(.unaffordable){opacity:.95}
