:root{--pine:#203f32;--moss:#416749;--cream:#f8f5e9;--line:#d9d9c7;--muted:#687261;color:var(--pine);font:16px/1.45 "Segoe UI",Arial,sans-serif;background:var(--cream);color-scheme:light}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 100% 15%,#eeecd9,transparent 55%);min-height:100vh}.wrap{width:min(1320px,92%);margin:auto}button,select{font:inherit;color:inherit}button{cursor:pointer;border:0;border-radius:9px;font-weight:700;background:#e6e9d7}button:focus-visible,select:focus-visible{outline:3px solid #df9064;outline-offset:2px}button:disabled{cursor:default}header{background:#203e32;color:#faf6df;border-bottom:4px solid #ccd998}.bar,nav,.tools,.heading,.hud,.strip,.dialog-title,.foot,.power-title,.petlabel{display:flex;align-items:center;justify-content:space-between}.bar{height:65px;gap:35px}.brand{display:flex;align-items:center;gap:9px;color:inherit;text-decoration:none;font:900 28px Georgia,serif;letter-spacing:-1px}.logo{font:41px/1 Georgia;color:#ffcd70;transform:rotate(-14deg)}nav{margin-right:auto;gap:12px;height:100%}nav button,.tools button{background:transparent;color:#dce5ce}nav button{height:100%;position:relative;padding:0 13px;font-size:14px}nav .current{color:#fff3be}nav .current:after{content:"";position:absolute;bottom:0;left:10px;right:10px;height:3px;background:#eed184}.tools{gap:8px}.tools button,.x{border:1px solid #718371;border-radius:50%;width:32px;height:32px}.heading{margin:23px 0 16px}.over{font:800 11px/1.4 "Segoe UI",sans-serif;letter-spacing:2px;color:#667b57}h1,h2,h3,p{margin:0}h1{font:700 clamp(32px,3.4vw,52px)/1.16 Georgia,serif;letter-spacing:-1.8px}.outline{padding:10px 17px;background:#fffdf2;border:1px solid #c3cbb7;box-shadow:0 2px 0 #d5dbc9}.arena{position:relative;background:#90d4d4;border-radius:17px 17px 0 0;overflow:hidden;box-shadow:0 0 0 1px #aebfa9}.arena canvas{display:block;width:100%;aspect-ratio:1200/505;touch-action:none;cursor:crosshair}.hud{position:absolute;top:4%;left:2%;right:2%;align-items:flex-start;pointer-events:none}.fighter,#wind{background:#fffaeaeF;border:1px solid #fffae6;border-radius:12px;box-shadow:0 3px 8px #30483926}.fighter{display:flex;align-items:center;gap:8px;padding:6px 11px 7px 6px;min-width:145px}.fighter img{width:42px;height:42px;object-fit:contain}.fighter small,.fighter strong{display:block;line-height:1.2}.fighter small{font-size:9px;font-weight:800;letter-spacing:1px;color:#687966}.fighter strong{font-size:15px}.hp{width:100%;height:5px;background:#cad0b9;border-radius:9px;margin-top:4px;overflow:hidden}.hp i{display:block;height:100%;background:#76a351}.cpu{flex-direction:row-reverse;text-align:right;padding:6px 6px 7px 11px}.cpu .hp i{margin-left:auto;background:#cd886b}#wind{font-size:13px;font-weight:800;padding:7px 12px;letter-spacing:.3px}.strip{background:#253f31;color:#fcfaeb;padding:10px 18px;border-radius:0 0 14px 14px;min-height:40px;font-size:13px}.strip b{color:#e4efb8}.strip span{color:#e0e7d7}.console{display:grid;grid-template-columns:minmax(0,2fr) minmax(190px,1fr);background:#fffcf4;border:1px solid var(--line);border-radius:15px;padding:16px 20px;margin:15px 0 24px;gap:27px}.console h2,dialog h3{font:700 20px Georgia,serif;margin:0 0 10px}.power-side{border-left:1px solid var(--line);padding-left:22px}.power-title h2{margin:0}.gauge{background:#dddcca;height:11px;border-radius:8px;margin:12px 0 7px;overflow:hidden}.gauge i{display:block;width:0;height:100%;background:linear-gradient(90deg,#91bb60,#e9c653,#e98050)}small{color:var(--muted)}kbd{font:700 11px monospace;border:1px solid #c1c4ac;border-bottom-width:2px;border-radius:3px;padding:1px 4px}#ammo{display:flex;gap:7px}#ammo button{flex:1;background:#f3f2e8;border:1px solid #dfdfcf;padding:9px;display:flex;align-items:center;gap:7px;text-align:left;font-size:13px}#ammo button.selected{background:#e6edd4;border:1px solid #76905e}#ammo button:disabled{opacity:.6}#ammo button i{font:normal 21px Georgia;color:var(--mark)}#ammo button small{display:block;font-size:10px}dialog{padding:22px;background:#fffcf0;border:1px solid #d9ddc7;border-radius:16px;color:var(--pine);width:min(750px,94vw);max-height:90dvh;box-shadow:0 20px 90px #18372850}dialog::backdrop{background:#152b239c;backdrop-filter:blur(3px)}.dialog-title h2,#result h2{font:700 32px Georgia,serif}.x{background:transparent;font-size:21px;line-height:1}.switch{display:flex;gap:5px;margin:15px 0 10px}.switch button,.foot button,dialog>button,#result button{padding:8px 14px}.switch .selected,.foot button,#next,#manual>button{background:var(--pine);color:#fff8dd}.cards,.mapcards{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.mapcards{grid-template-columns:repeat(5,1fr)}.cards button,.mapcards button{padding:5px;background:#efefe0;border:2px solid transparent;font-size:13px}.cards img,.mapcards img{width:100%;height:65px;object-fit:contain;display:block}.mapcards img{object-fit:cover;height:48px;border-radius:4px}.cards .selected,.mapcards .selected{border-color:#5e8752;background:#e2ebd4}.mapcards button:disabled{opacity:.42}#bio,.foot span,.petlabel,dialog p{font-size:14px;color:#576b58}#bio{margin:8px 0 16px}.petlabel{margin:14px 0;justify-content:flex-start;gap:12px}.petlabel select{padding:6px;border-radius:6px;background:#f3f4e7}.foot{border-top:1px solid var(--line);padding-top:12px}#manual{max-width:480px}#manual p{margin:14px 0}#result{position:absolute;inset:0;background:#203b334b;display:grid;place-items:center;text-align:center}#result>div{border-radius:15px;background:#fffbeb;padding:20px 30px}#result button{margin:11px 3px 0}[hidden]{display:none!important}
@media(max-width:760px){.wrap{width:95%}.bar{gap:10px;height:56px}.brand{font-size:22px}.logo{font-size:30px}nav{gap:1px}nav button{padding:0 7px;font-size:12px}.tools{gap:4px}.tools button{width:27px;height:27px}.heading{margin:14px 0 10px}.fighter{min-width:0;padding:3px 5px}.fighter img{width:26px;height:26px}.fighter strong,#wind{font-size:11px}#wind{padding:3px 6px}.fighter small{font-size:7px}.console{grid-template-columns:1fr;padding:12px;gap:10px}.power-side{padding:0;border:none}.arena canvas{aspect-ratio:1.7}.strip{gap:8px;font-size:11px;padding:7px 9px}.cards{grid-template-columns:repeat(3,1fr)}.mapcards{grid-template-columns:repeat(3,1fr)}.cards img{height:48px}.outline{font-size:12px;padding:7px}.console h2{font-size:17px}}

#wind{display:grid;justify-items:center;gap:2px;border:0;padding:0;background:transparent;box-shadow:none}
.wind-dial{position:relative;width:48px;aspect-ratio:1;border:3px solid #f4dda4;border-radius:50%;background:repeating-conic-gradient(from -1deg,#c9aa6e 0 2deg,transparent 2deg 30deg),radial-gradient(circle at 34% 25%,#fffde6,#dfd8b3);box-shadow:inset 0 0 0 1px #93784b,0 2px 5px #35473855}
.wind-dial:before{content:"";position:absolute;inset:5px;border-radius:50%;background:radial-gradient(at 35% 20%,#fff8df,#e7e1c0)}
.wind-dial i{position:absolute;inset:9px 4px;background:linear-gradient(#6c9a72 0 50%,#386248 50%);clip-path:polygon(0 38%,58% 38%,58% 8%,100% 50%,58% 92%,58% 62%,0 62%)}
#wind[data-sign="-1"] i{transform:rotate(180deg)}
#wind[data-sign="0"] i{inset:40%;clip-path:none;border-radius:50%}
#wind-value{font-size:12px;background:#fff9e4ed;border-radius:9px;padding:0 7px;color:#354c39}
@media(max-width:760px){.wind-dial{width:34px;border-width:2px}.wind-dial i{inset:5px 3px}#wind-value{font-size:10px}}
.tools #shop-open{width:auto;min-width:53px;padding:0 9px;border-radius:16px;color:#ffe4a8}
.tools button[aria-pressed=false]:is(#music,#sound){opacity:.55}
.gear-row{grid-column:1/-1;border-top:1px solid var(--line);padding-top:10px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#bag{display:flex;gap:5px;flex-wrap:wrap}#bag button,#shelves button{font-size:12px;border:1px solid #c7ceb4;border-radius:7px;padding:5px 9px;background:#eff3de}
#bag button:disabled,#shelves button:disabled{opacity:.52}#gear-hint{margin-left:auto}#reward{color:#89611e;font-weight:700}
#shelves{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:12px 0}
#shelves>div{display:grid;gap:5px;border:1px solid #d4d9c1;border-radius:10px;padding:12px;background:#f6f5e9}#shelves button{justify-self:start}
#balance{display:block;margin-top:12px}#transaction{font-size:14px;color:#476846}
html:is(:fullscreen,.screen-fit){background:#14281f}
html:is(:fullscreen,.screen-fit) body{height:100dvh;display:flex;flex-direction:column;overflow:auto;background:#182e24}
html:is(:fullscreen,.screen-fit) .wrap{width:100%;max-width:none}
html:is(:fullscreen,.screen-fit) .bar{height:42px;padding:0 14px}
html:is(:fullscreen,.screen-fit) main{min-height:0;flex:1;display:flex;flex-direction:column}
html:is(:fullscreen,.screen-fit) .heading{display:none}
html:is(:fullscreen,.screen-fit) .arena{flex:1;min-height:180px;border-radius:0;background:#162c22;display:flex;justify-content:center;align-items:center;container-type:size}
html:is(:fullscreen,.screen-fit) .arena canvas{width:min(100cqw,222.222cqh);height:auto;aspect-ratio:1200/540}
html:is(:fullscreen,.screen-fit) .strip{padding:4px 14px;min-height:25px;border-radius:0}
html:is(:fullscreen,.screen-fit) .console{padding:6px 12px;margin:0;gap:4px 20px;border-radius:0}
html:is(:fullscreen,.screen-fit) .console h2{font-size:15px;margin-bottom:2px}
html:is(:fullscreen,.screen-fit) .gear-row{padding-top:3px}
@media(max-width:720px){.bar{gap:4px}.brand{font-size:17px}.brand .logo{font-size:22px}nav{gap:0}nav button{padding:0 4px}.tools{gap:2px}.tools button{width:24px;height:26px}.tools #shop-open{min-width:38px;padding:0 3px}.gear-row{gap:5px}#gear-hint{margin:0}#shelves{gap:5px}}
@media(max-height:490px) and (orientation:landscape){html:is(:fullscreen,.screen-fit) .console{display:grid;grid-template-columns:2fr 1fr 2fr}html:is(:fullscreen,.screen-fit) .gear-row{grid-column:auto;border:0}html:is(:fullscreen,.screen-fit) .power-side small,html:is(:fullscreen,.screen-fit) .gear-row small{display:none}}
.match-options{display:flex;align-items:center;gap:5px 18px;flex-wrap:wrap;margin:12px 0}.match-options .petlabel{margin:0;gap:6px}.match-options select{max-width:100%}@media(max-width:540px){.match-options .petlabel{width:100%;justify-content:space-between}.match-options select{max-width:65%}}
.armory-head{display:flex;align-items:baseline;gap:12px;margin:7px 0 4px;font-size:12px}.armory-head small{line-height:1.15}#extra-ammo{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}#extra-ammo button{padding:3px 5px;display:flex;gap:5px;align-items:center;justify-content:center;background:linear-gradient(#fffcf1,#eeecdf);border:1px solid #d4d4c0;font-size:11px;line-height:1.1}#extra-ammo img{width:31px;height:27px;object-fit:contain}#extra-ammo button[aria-pressed=true]{background:#e2ecd0;border-color:#60864f;box-shadow:inset 0 -2px #70975d}#extra-ammo button:disabled{opacity:.6}
@media(max-width:540px){#extra-ammo button{flex-direction:column;gap:2px}.armory-head{min-height:16px}}
@media(max-height:500px) and (orientation:landscape){#extra-ammo button{font-size:10px;padding:2px}#extra-ammo img{width:18px;height:18px}.armory-head{margin:2px 0}.armory-head small{display:none}}
.volume-label{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:650;color:#50634c;margin:7px 0 3px}.volume-label input{min-width:40px;width:52%;accent-color:#527c4c}.volume-label output{font-variant-numeric:tabular-nums}
@media(max-height:500px) and (orientation:landscape){.volume-label{margin:1px 0;font-size:10px}}
#ammo button img{width:clamp(26px,3.4vw,49px);height:clamp(26px,3vw,43px);object-fit:contain;flex:0 0 auto}#ammo button span{min-width:0;overflow-wrap:anywhere}@media(max-width:540px){#ammo button{flex-direction:column;align-items:flex-start;padding:5px}#ammo button small{line-height:1.1}}
@media(max-height:510px) and (orientation:landscape){#ammo button img{width:22px;height:23px}#ammo button{padding:3px}}
@font-face{font-family:"Be Vietnam Pro";font-weight:400;src:url("../assets/BeVietnamPro-Regular.ttf") format("truetype");font-display:swap}
@font-face{font-family:"Be Vietnam Pro";font-weight:700;src:url("../assets/BeVietnamPro-Bold.ttf") format("truetype");font-display:swap}
:root,body,button,select,input,output,kbd,.brand,.over,h1,h2,h3,.console h2,dialog h3,.dialog-title h2,#result h2{font-family:"Be Vietnam Pro","Segoe UI",sans-serif}
h1,.brand{letter-spacing:-.035em}h1,h2,h3,.brand,.fighter strong,#ammo button span{line-height:1.4}#ammo button small{line-height:1.45}

.preview-link{align-self:center;text-decoration:none;font-weight:700;color:inherit;font-size:.88rem;padding:5px 8px}.preview-link:hover{text-decoration:underline}@media(max-width:600px){.preview-link{font-size:.69rem;padding:0 2px}.bar{flex-wrap:wrap;height:auto;min-height:58px}}

.game-screen{display:contents}
#fire{display:none}
html.touch-layout{--play-width:100dvw;--play-height:100dvh;overflow:hidden}
html.turned{--play-width:100dvh;--play-height:100dvw}
.touch-layout .game-screen{
 position:fixed;top:0;left:0;display:block;width:var(--play-width);height:var(--play-height);
 overflow:auto;overscroll-behavior:contain;background:var(--paper,#f7f6ea);
}
.turned .game-screen{transform-origin:top left;transform:translateX(100dvw) rotate(90deg)}
html.touch-layout .game-screen .wrap{width:100%;max-width:none}
html.touch-layout .game-screen .bar{flex-wrap:nowrap;height:40px;min-height:0;gap:6px;padding:0 8px}
.touch-layout .heading,.touch-layout .mouse-hint{display:none}
html.touch-layout .game-screen main{display:block}
html.touch-layout .game-screen .arena{
 height:calc(var(--play-height) - 96px);min-height:0;border-radius:0;
 display:flex;align-items:center;justify-content:center;container-type:size;background:#203e32;
}
html.touch-layout .game-screen .arena canvas{width:min(100cqw,222.222cqh);height:auto;aspect-ratio:1200/540}
html.touch-layout .game-screen .strip{height:52px;min-height:0;gap:8px;padding:2px 8px;border-radius:0}
.touch-layout #message{margin-left:auto}
.touch-layout #fire{
 display:block;flex:none;min-height:44px;padding:0 14px;color:#253f31;background:#f5d17d;
 touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
}
#fire:active{background:#ffe6a9}
#fire:disabled{opacity:.5}
#fire-power{display:inline-block;min-width:4ch;color:inherit;font-variant-numeric:tabular-nums}
.touch-layout .console{margin-top:0}
.turned dialog{
 position:fixed;inset:50% auto auto 50%;margin:0;transform:translate(-50%,-50%) rotate(90deg);
 width:min(750px,94dvh);max-width:94dvh;max-height:94dvw;
}
