/* Art stage: bright woodland, retaining gameplay geometry and controls. */
:root{color-scheme:light}body{background:radial-gradient(ellipse at 20% 0,#f8f7d7,transparent 65%),#e7f0d7;color:#315b42;font-family:'Segoe UI','Microsoft YaHei',sans-serif}header small{color:#6e885e;letter-spacing:2px}h1{color:#315b42}h1 em{color:#7c916a}button{background:#fbf9e8;border:2px solid #c1d0a4;border-radius:14px;color:#3d6147;box-shadow:0 3px 0 #9dad8033;font-weight:600}button:hover{background:#f1f5d6;border-color:#97b77e}button:focus-visible{outline:3px solid #e7a83f;outline-offset:2px}button:disabled{opacity:.5;box-shadow:none}.board{background:#bddf9e;border:3px solid #8bb879;border-radius:24px;box-shadow:0 8px 0 #b6cb9855,0 16px 32px #55764a15}.stats{background:#f9f9e7;border:1px solid #cfdbb5;padding:9px 14px;border-radius:14px;color:#6c825d;gap:8px}.stats b{color:#47764c}.caption{color:#66805b}.intro small{color:#6e885e}.intro h2{font-size:21px;color:#3e6548}.shop{gap:9px}.shop button{grid-template-columns:48px 1fr;background:#fffdec;padding:8px 12px;align-items:center;column-gap:12px}.tower-icon{width:48px;height:48px;grid-row:span 2}.shop strong{font-size:15px}.shop span{color:#6a815a;font-weight:400}.shop .selected{background:#fff1bb;border-color:#e7b853;box-shadow:0 3px 0 #c7943840,inset 3px 0 #e3ae42}.primary{background:#f3c65d;border-color:#d6a53d;color:#4b5b32;box-shadow:0 4px 0 #be913c66}.primary:hover{background:#ffda7c;border-color:#d6a53d}#tip{color:#617954;line-height:1.55}footer button{color:#69805e;box-shadow:none;font-weight:500}.manage button{background:#f1f6dc}dialog{background:#fcfbe9;color:#375e43;border:3px solid #b5ca91;box-shadow:0 18px 65px #355e4540}dialog::backdrop{background:#376a4f77;backdrop-filter:blur(4px)}dialog h2{color:#385f43}dialog p{color:#627a56;font-size:13px}.level-grid button{background:#f2f6dd;border-radius:10px;font-weight:500;min-height:44px}.level-grid button:disabled{background:#eef0e0;color:#859177;opacity:.7}.content-extra button{background:#f8e7af}.content-nav button{font-size:12px}.actions button{min-height:46px}.content-results,.rule-note{color:#5c7851}
@media(max-width:700px) and (orientation:portrait){body{padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}header{gap:8px;margin-bottom:12px}header small{font-size:9px;letter-spacing:1px}h1{font-size:23px}h1 em{display:none}.content-nav{gap:5px}.content-nav button{font-size:11px;padding:5px 8px;white-space:nowrap;min-height:40px}.board{height:39dvh;min-height:290px;border-radius:20px}.stats{padding:7px 10px;font-size:12px;margin-bottom:10px}.stats b{font-size:20px;margin-left:3px}.shop button{padding:7px 3px;gap:3px;border-radius:13px}.tower-icon{width:39px;height:39px}.shop strong{font-size:13px}.shop span{font-size:10px}#tip{font-size:11px;margin:7px 0 9px}.manage button{min-height:42px}.caption{font-size:10px}.actions button{font-size:13px}footer{font-size:11px;gap:4px}footer button{font-size:11px;padding:7px 3px}dialog{padding:18px}.level-grid{max-height:46dvh}}
@media(orientation:landscape) and (max-height:550px){body{padding:7px max(12px,env(safe-area-inset-right)) 7px max(12px,env(safe-area-inset-left))}header{margin-bottom:5px}main{grid-template-columns:minmax(0,1fr) 240px;gap:14px}.stats{padding:4px 8px;font-size:11px}.stats b{font-size:17px}.board{height:calc(100dvh - 106px);min-height:185px;border-radius:17px}#tip{font-size:10px;line-height:1.4;min-height:28px;max-height:42px;overflow:auto;margin:0 0 5px}.shop{gap:4px}.shop button{display:grid;grid-template-columns:34px 1fr;gap:1px 8px;padding:4px 8px;min-height:40px;border-radius:10px}.tower-icon{width:32px;height:32px}.shop strong{font-size:12px}.shop span{font-size:10px}.manage{margin:6px 0}.manage button{min-height:35px;padding:5px}.actions button{min-height:38px;font-size:11px;padding:6px}.content-nav button{min-height:34px}footer{font-size:10px;gap:2px}footer button{min-height:32px;font-size:10px;padding:3px}.level-grid{max-height:42dvh}dialog{padding:18px}}
@media(orientation:landscape) and (max-width:640px){main{grid-template-columns:minmax(0,1fr) 210px;gap:10px}.stats{font-size:10px;padding:4px 6px}.stats b{font-size:15px}.shop button{column-gap:4px}footer{flex-wrap:wrap}footer span{display:none}}

dialog[open]{display:flex;flex-direction:column;overflow:hidden}#modalTitle{flex-shrink:0}#modalText{overflow:auto;min-height:0;flex:1;margin:10px 0}#close{flex-shrink:0;margin-top:10px}.level-grid{white-space:normal;max-height:38dvh}.content-extra{padding-bottom:4px}
*{-webkit-tap-highlight-color:transparent}.level-grid button:disabled{opacity:1;color:#687754;background:#f0f2e1}.primary:disabled{opacity:1;color:#78804e;background:#ede2ae;border-color:#dbcd93}
