/* One opaque tile grid; the background is scenery, never a second interactive board. */
body[data-game-viewport=pvz] #game .battle{display:block;padding:0}
body[data-game-viewport=pvz] #game .battle .field{position:absolute;left:13.2%;right:6.8%;top:20%;width:auto;height:67%;margin:0}
body[data-game-viewport=pvz] #game .battle .grid,body[data-game-viewport=pvz] #game .battle .entities{position:absolute;inset:0;width:100%;height:100%}
#game .tile{--tile-art:url('./pixel/grass.png');--tile-color:#477e20;background:var(--tile-color) var(--tile-art) center/100% 100%;opacity:1}
#game .tile.alt{--tile-art:url('./pixel/grass-alt.png')}
#game .tile.water{--tile-art:url('./pixel/water.png');--tile-color:#235d79}
#game[data-scene=roof] .tile{--tile-art:url('./pixel/roof.png');--tile-color:#b7663b}
#game .tile:hover{background:var(--tile-color) var(--tile-art) center/100% 100%}
#game .tile.inactive-lane{opacity:1;cursor:default;pointer-events:auto}
#game .tile.inactive-lane::after{content:'';position:absolute;inset:0;background:#09291714;pointer-events:none}
#game .tile.gravestone{background:#526058}
#game .tile.vase{background:var(--tile-color) var(--tile-art) center/100% 100%}
/* Feedback never moves the hit area or covers neighbouring cells. */
button,.whack-target[role=button],.sponsor-link{touch-action:manipulation;-webkit-user-select:none;user-select:none}
button.pvz-press,button.pvz-hit{outline:2px solid #fff2b0;outline-offset:-3px}
#game .tile:active,#game .tile.pvz-press,#game .tile.pvz-hit{translate:none;box-shadow:inset 0 0 0 2px #fff2b0}
.card>.sprite,.card>.cooldown,.card>.plant-name,.card>.plant-cost,.card>.belt-count,.whack-target>.sprite{pointer-events:none}
.card[aria-disabled=true]{cursor:default}
.card .sun-price::before{content:'☀';color:#c18313;font-size:.8em;margin-right:2px}
.sun:active,.sun.pvz-press{translate:none;outline:2px solid #fff2b0;outline-offset:1px}
.whack-target.pvz-press{filter:brightness(1.25)}
.wave-track{position:relative}
.wave-track i[data-flag-wave]{display:block;position:absolute;z-index:1;top:0;bottom:0;width:3px;height:100%;background:#967b45;transform:translateX(-100%)}
.wave-track i[data-flag-wave].passed{background:#ffe395}
#wave{font-variant-numeric:tabular-nums}
#game .wave-panel:has(.race-live-label:not([hidden])){gap:1px}
#game .wave-panel:has(.race-live-label:not([hidden])) #wave{font-size:10px;line-height:11px}
#game .wave-panel:has(.race-live-label:not([hidden])) .wave-track{height:7px}
#game .wave-panel .race-live-label{position:static;transform:none;padding:0;border:0;border-radius:0;background:none;color:#ffe395;max-width:100%;font-size:9px;line-height:10px;white-space:nowrap}
@media(orientation:landscape) and (min-width:461px){
 body[data-game-viewport=pvz] #game .battle::before{background-size:100% 124%;background-position:center 62%}
 body[data-game-viewport=pvz] #game .battle .field{top:10%;height:83%}
 body[data-game-viewport=pvz] #game[data-scene=roof] .battle::before{background-size:100% 112%;background-position:center 65%}
 body[data-game-viewport=pvz] #game[data-scene=roof] .battle .field{left:13.2%;right:6.8%;top:12%;height:80%}
}

#game #auto-sun{flex:none;white-space:nowrap;min-width:78px;padding:3px 6px;line-height:1.15}
#auto-sun span,#auto-sun small{display:block}#auto-sun small{font-size:9px;font-weight:400;margin-top:2px}#auto-sun[aria-pressed=true]{color:#172719;background:#ffe395}#auto-sun:disabled{opacity:.6}
@media(orientation:portrait) and (max-width:700px){#game .battle-footer{gap:4px}#game .battle-footer .game-feedback{gap:4px;order:2}#game #auto-sun{order:1;font-size:11px;min-width:76px}#game .battle-footer #restart{order:3;padding-inline:6px;font-size:11px}}

#game #auto-sun{height:32px;min-height:30px;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;padding:1px 5px}#auto-sun span{font-size:11px;line-height:12px}#auto-sun small{font-size:8px;line-height:9px;margin-top:0}
