/* Tactile fantasy finish; load after style.css. */
#asset-loading{position:absolute;inset:0;z-index:12;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:#34462ded;color:#ecd59c}#asset-loading b{font:700 28px var(--serif);letter-spacing:4px}#asset-loading span{font-size:13px;color:#c6c9a1}
.app.expanded{width:min(100%,calc((100dvh - 226px)*1.5 + 72px));max-width:none;padding-top:12px;padding-bottom:12px}.app.expanded .game-layout{grid-template-columns:1fr}.app.expanded .field-guide,.app.expanded footer,.app.expanded .chapter{display:none}.app.expanded .masthead{min-height:58px;padding-bottom:12px}.app.expanded .crest{width:35px;height:42px}.app.expanded h1{font-size:25px;letter-spacing:3px}.app.expanded .brand-kicker{font-size:8px}.app.expanded #focus-btn{margin-left:auto}.app.expanded .topbar{min-height:54px;padding-top:6px;padding-bottom:6px}.app.expanded .combat-bar{min-height:72px;padding-top:8px;padding-bottom:8px}
@media(max-width:600px){#focus-btn{font-size:10px;padding:6px;margin-left:auto}.masthead #help-btn{margin-left:0;font-size:10px;padding:6px}.masthead{gap:6px}.app.expanded{width:100%;padding:10px}.app.expanded .brand-kicker{font-size:6px}.app.expanded h1{font-size:23px}#asset-loading b{font-size:21px}.app.expanded .kill-stat{display:none}}
:root{--frame-ink:#211c15;--frame-iron:#74633f;--scroll-ink:#3c422b}
.battle-frame{position:relative;border:5px solid var(--frame-iron);border-radius:10px 6px 9px 7px;outline:2px solid var(--frame-ink);box-shadow:0 0 0 4px #473b26,inset 0 0 0 2px #bd9955,0 12px 25px #081b1766}
.battle-frame::before,.battle-frame::after{content:"";position:absolute;left:5px;right:5px;height:10px;z-index:8;pointer-events:none;background:radial-gradient(circle at 5px 5px,#d3b77a 0 1px,#7d7456 2px 3px,#221e17 4px,transparent 5px),radial-gradient(circle at calc(100% - 5px) 5px,#d3b77a 0 1px,#7d7456 2px 3px,#221e17 4px,transparent 5px)}
.battle-frame::before{top:4px}.battle-frame::after{bottom:4px}
.topbar,.combat-bar{background-color:#3e3021;background-image:repeating-linear-gradient(2deg,transparent 0 5px,#18191132 6px 7px,transparent 8px 13px),repeating-linear-gradient(178deg,#d2a06009 0 2px,transparent 3px 19px);border-color:#8d713e;box-shadow:inset 0 2px #c4a36566,inset 0 -2px #1a2019}
.topbar{border-bottom-width:4px}.combat-bar{border-top-width:4px}
.stat span{font-size:12px;letter-spacing:1px;color:#e0cfa4;text-shadow:0 1px 1px #171b14}
.stat strong{text-shadow:0 2px 0 #1d2015,1px 0 #292518}
.square-btn{border:2px solid #96835a;border-radius:4px 3px 5px 3px;background:#4e4934;box-shadow:inset 0 1px #c2b17c,0 2px 0 #181e16;color:#f3dfaa}
.square-btn.active{background:#78643b;box-shadow:inset 0 0 0 1px #c5a45e,0 2px #1a2018}
.help-btn{background:#33432b;border:2px solid #85734c;box-shadow:inset 0 1px #b39a5755,0 2px #101f18;color:#eadcb7;font-weight:700}
.spell-button b{text-shadow:0 2px #171c14}.spell-button small{font-size:11px;color:#d2c3a1}
.spell-seal{border-width:3px;border-radius:10px 7px 9px 6px;box-shadow:inset 0 0 0 2px #433020,0 3px 0 #141e16}
#wave-btn,.primary-button{border:2px solid #e4c77a;border-bottom-color:#896629;border-radius:5px 3px 6px 4px;background:linear-gradient(#e7cb78 0 45%,#d1ab50 47% 100%);box-shadow:inset 0 2px #ffedb4,inset 0 -3px #aa7b32,inset 2px 0 #f1d690,inset -2px 0 #bc913f,0 3px 0 #1b2017;min-height:47px;color:#443217;text-shadow:0 1px #fff0b8;font-size:15px;font-weight:800}
#wave-btn:not(:disabled):active,.primary-button:not(:disabled):active{box-shadow:inset 0 2px #b68836,inset 0 -1px #f6d58d,0 1px #171e16}
.progress-track{height:4px;border:1px solid #151c14;background:#262719}
.field-guide{border:3px solid #987947;border-radius:6px 3px 7px 4px;background-color:#e6d2a0;background-image:repeating-linear-gradient(91deg,#83652907 0 1px,transparent 2px 7px),repeating-linear-gradient(0deg,transparent 0 5px,#6e57270a 6px 7px);box-shadow:0 0 0 2px #292d1e,inset 0 0 20px #9b713432,0 8px 18px #091e1644;color:var(--scroll-ink)}
.guide-tabs{background:#343824;border-bottom:2px solid #9a7e48;box-shadow:inset 0 2px #bba66b33}
.guide-tabs button{font-weight:700;color:#d3c498;text-shadow:0 1px #1d291b}
.guide-tabs button.active{background:#e6d2a0;color:#3e442a;text-shadow:0 1px #fff0c188;box-shadow:inset 0 2px #f5e5bb}
.guide-heading h2{color:#374127;text-shadow:0 1px #fff0c5}
.guide-heading p,.guide-note,.guide-bottom{color:#615c39}
.guide-heading>span{color:#79613c}.guide-note p{line-height:1.75}
.tower-list{overflow:visible}.tower-card{min-height:116px;overflow:visible;border-bottom-color:#92754566;padding-top:3px;padding-bottom:3px}
.tower-card canvas{width:98px;height:110px;object-fit:contain;overflow:visible;filter:drop-shadow(0 3px 1px #69502c30)}
.tower-copy>b{font-size:19px;color:#344126;text-shadow:0 1px #fff0c1}
.tower-copy>small,.tower-copy>span{font-size:11px;color:#645c36;letter-spacing:0}
.tower-copy>em{font-size:16px;color:#765322}
.tower-card.selected{border-color:#77753e;background:#f2dfaa;box-shadow:inset 0 0 0 1px #fff0c066}
.tower-card:hover{background:#fff0c555}
.enemy-entry b{color:#3b4129}.enemy-entry small,.enemy-entry p{color:#645a37}
#build-menu{border:3px solid #927245;border-radius:7px 4px 6px 4px;background:#e8d6a4;box-shadow:inset 0 0 16px #a77d3433,0 0 0 2px #343222,0 7px 15px #10211999;max-height:calc(100% - 16px);overflow:auto;scrollbar-width:thin;scrollbar-color:#a28953 #e8d6a4}
.build-title{font:700 16px var(--serif);color:#354027;text-shadow:0 1px #fff0c3;border-bottom:1px solid #9e8351;padding-bottom:8px;line-height:1.4}
.build-title>span{font:12px var(--sans);color:#665c37}.build-title>button{color:#514825;background:#d9c38b;border:1px solid #97804b;flex-shrink:0}
.build-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.build-options>button{min-width:0;gap:4px;padding:6px 4px;border:1px solid #9c8652;border-bottom-width:3px;border-radius:4px;background:#dece9a;color:#334027;font-weight:700;box-shadow:inset 0 1px #f7e7b8}
.build-options canvas{display:block;width:74px;height:76px;object-fit:contain;flex-shrink:0;overflow:visible}
.build-options small{font-size:12px;color:#765225}.build-options>button:hover:not(:disabled){background:#f3dfa7;border-color:#766b39}
.tower-detail{font-size:12px;color:#514e30}.upgrade-options>button:first-child{background:#ced096}
#toast{background:#2e3b27f2;border:2px solid #b59756;color:#f5e4b7;text-shadow:0 1px #202719}
dialog{border-color:#997a43;background-color:#e6d2a0;box-shadow:inset 0 0 25px #9b713433,0 0 0 4px #303628,0 18px 70px #07181088}
@media(min-width:1600px){.tower-card canvas{width:105px;height:116px}}
@media(max-width:1170px){.tower-card canvas{width:84px;height:101px}.tower-card{min-height:107px}.tower-copy>b{font-size:17px}.stat span{font-size:11px}}
@media(min-width:601px) and (max-width:900px){.tower-card canvas{width:73px;height:95px}.tower-copy>b{font-size:15px}.tower-copy>small{font-size:10px}.tower-card{min-height:109px}}
@media(max-width:600px){.battle-frame{border-width:3px;outline-width:1px;box-shadow:0 0 0 2px #473b26,0 8px 18px #081b1755}.battle-frame::before,.battle-frame::after{left:2px;right:2px;opacity:.85}.topbar{border-bottom-width:3px}.combat-bar{border-top-width:3px}.stat span{font-size:10px;letter-spacing:0}.stat strong{font-size:18px}.square-btn{border-width:1px}.tower-card canvas{width:82px;height:102px}.tower-card{padding-left:4px;padding-right:4px;min-height:109px}.tower-copy>b{font-size:16px}.tower-copy>small{font-size:10px}.tower-copy>em{font-size:15px}#wave-btn{font-size:12px;min-height:40px}.build-title{font-size:15px}.build-title>span{font-size:11px}.build-options{gap:5px}.build-options>button{font-size:12px;padding:4px}.build-options small{font-size:11px}.spell-button small{display:none}}
@media(max-width:380px){.tower-card canvas{width:73px;height:96px}.tower-copy>b{font-size:15px}.stat span{font-size:9px}}
@media(max-height:500px) and (orientation:landscape){.tower-card canvas{width:73px;height:82px}.tower-card{min-height:87px}.stat span{font-size:9px}#wave-btn{min-height:35px;font-size:12px}.combat-bar{border-top-width:3px}.topbar{border-bottom-width:3px}}
