:root{--gold:#f1c785;--cyan:#73dcee;--ink:#070d1d;--safe:env(safe-area-inset-bottom,0px)}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:var(--ink);color:#f7ecd9;font-family:Arial,sans-serif;overscroll-behavior:none}body{height:100dvh;display:flex;flex-direction:column}button,a,select{-webkit-tap-highlight-color:transparent}button,select{font:700 12px Arial;color:inherit;background:#15223a;border:1px solid #53667a;border-radius:7px;padding:10px;cursor:pointer}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid var(--cyan);outline-offset:3px}[hidden]{display:none!important}.topbar{flex:0 0 57px;display:flex;align-items:center;gap:12px;padding:8px 16px;border-bottom:1px solid #b78d59;background:#070d1ef5;z-index:5}.topbar>a{color:var(--cyan);font-size:12px;font-weight:bold;text-decoration:none}.topbar>b{margin:auto;font-size:20px;letter-spacing:3px}.topbar em{color:var(--gold);font-style:normal}.tools{display:flex;align-items:center;gap:6px}.tools button{white-space:nowrap}.tools #nick{max-width:160px;font-size:12px}#arena{position:relative;flex:1;min-height:0;overflow:hidden;background:#101629}#fightCanvas{display:block;width:100%;height:100%;touch-action:none}.overlay{position:absolute;inset:0;z-index:10;overflow:auto;overscroll-behavior:contain;background:linear-gradient(130deg,#090f21f7,#071324f5);display:flex;align-items:safe center;justify-content:center;padding:18px}.select-panel{width:min(100%,1040px);margin:auto;border:1px solid #84694b;background:#0b1425;box-shadow:0 24px 80px #0007;border-radius:13px;padding:18px}.select-head{display:flex;align-items:center;gap:20px;margin-bottom:12px}.select-head>img{width:165px;max-height:95px;object-fit:contain}.select-head small,.panel>small,.versus-panel>small{font-size:10px;letter-spacing:2px;color:var(--gold)}h1{font-size:26px;letter-spacing:1px;margin:8px 0}p{color:#b7c8dc;line-height:1.45;font-size:13px;margin:5px 0}.roster{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.roster button{padding:0;display:flex;align-items:center;gap:10px;text-align:left;min-height:76px;border:1px solid #34485e;background:linear-gradient(135deg,#26374b,#0a1424);overflow:hidden}.roster img{width:76px;height:76px;object-fit:contain;background:#203046}.roster b{font-size:14px}.roster small{display:block;font-size:9px;margin-top:4px;color:#a3b9d1;font-weight:400}.roster .selected{border:2px solid #f3d49b;box-shadow:0 0 18px #f4c36a24;background:#32415a}.selected-detail{display:flex;align-items:center;gap:12px;margin:12px 0;padding:10px;background:#152338;border-left:3px solid var(--cyan);min-height:84px}.selected-detail>img{width:65px;height:65px;object-fit:contain}.selected-detail h2{font-size:19px;margin:0 0 4px}.selected-detail b{color:var(--gold);font-size:12px}.selected-detail p{font-size:12px}.options{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.options label{display:flex;flex-direction:column;gap:5px;flex:1;font-size:9px;letter-spacing:1px;color:#a4bad0}.options select{width:100%}.options #menuNick{font-size:12px;padding-bottom:8px}.start-row{display:flex;gap:14px;align-items:center;justify-content:space-between;margin:14px 0 8px}#personalBest{font-size:12px;color:#b9d9e9}.primary{background:linear-gradient(120deg,#f2d190,#c99559);color:#161527;border:1px solid #ffe6b4;padding:13px 20px;font-size:13px;letter-spacing:.7px;box-shadow:0 5px 20px #0005}.help{font-size:11px;text-align:center;color:#7fa0bb}.panel,.versus-panel{width:min(600px,100%);padding:26px;border:1px solid #aa895a;border-radius:13px;text-align:center;background:#0b172c;margin:auto}.panel h2{font-size:34px;margin:15px 0;color:#ffe1a8}.panel button{margin:6px}.panel a{display:block;margin-top:15px;color:var(--cyan);font-size:12px}.versus-faces{display:grid;grid-template-columns:1fr 55px 1fr;align-items:center;gap:8px;margin:20px 0}.versus-faces img{width:100%;height:190px;object-fit:contain;background:radial-gradient(#314764,#10192c);border-bottom:2px solid var(--gold)}.versus-faces b{display:block;font-size:18px;margin-top:8px}.versus-faces strong{font-size:28px;color:var(--gold)}.ladder{display:flex;gap:8px;justify-content:center;margin:14px 0}.ladder span{font-size:11px;padding:8px;border:1px solid #344c64;border-radius:6px}.ladder .current{border-color:var(--gold);color:var(--gold)}.ladder .done{border-color:#67ca9d;color:#67ca9d}progress{display:block;width:100%;height:9px;margin:12px 0 20px;accent-color:var(--cyan)}#resultPortrait{height:100px;max-width:160px;object-fit:contain;display:block;margin:auto}#resultScore{display:block;font-size:32px;margin:10px;color:var(--gold)}#saveStatus{min-height:25px}.touch-controls{display:none;flex:0 0 104px;padding:8px 14px calc(8px + var(--safe));align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #3a4c62;background:linear-gradient(#101c32,#070d1d);touch-action:none;user-select:none;-webkit-user-select:none}.stick{width:145px;height:82px;position:relative;flex-shrink:0;border:2px solid #6ac5db;border-radius:48px;background:radial-gradient(#294664,#0a1428 70%);touch-action:none;box-shadow:inset 0 0 15px #000}.stick>span{position:absolute;color:#7bbdd0;pointer-events:none;font-size:13px}.stick .left{left:10px;top:25px}.stick .right{right:10px;top:25px}.stick .down{bottom:5px;left:0;right:0;text-align:center;font-size:9px}.stick i{position:absolute;top:38%;left:50%;width:38px;height:38px;margin:-19px;border-radius:50%;border:2px solid #cdf2ff;background:linear-gradient(135deg,#88dff1,#365278);box-shadow:0 3px 12px #0008;pointer-events:none}.touch-actions{display:flex;gap:10px;align-items:center}.touch-actions button{width:72px;height:72px;border-radius:50%;padding:0;touch-action:none;font-size:25px;box-shadow:inset 0 0 14px #ffffff10,0 3px 7px #0008}.touch-actions span{display:block;font-size:9px;letter-spacing:.4px}.touch-actions .attack{border:2px solid #edbc75;background:#493627}.touch-actions .jump{border:2px solid #7fd9e3;background:#193e4d}.touch-actions .special{border:2px solid #b188e6;background:#34234e}.touch-actions .pressed{filter:brightness(1.6);transform:scale(.96)}.touch-actions .special.charged{box-shadow:0 0 20px #c592fa88;background:#644184;animation:charged 1s alternate infinite}@keyframes charged{to{box-shadow:0 0 26px #f1baffaa}}footer{display:flex;justify-content:space-between;flex:0 0 23px;align-items:center;padding:0 14px;font-size:9px;color:#647e96;background:#060b16}.combat-message{position:absolute;top:90px;left:50%;transform:translateX(-50%);background:#090f24db;border:1px solid var(--gold);color:#ffe1a4;font:bold 13px Arial;padding:8px 14px;pointer-events:none;opacity:0;transition:opacity .1s;white-space:nowrap}.combat-message.show{opacity:1}
@media(pointer:coarse),(max-width:960px){body.playing .touch-controls{display:flex}.topbar{flex-basis:49px;padding:7px 9px;gap:6px}.topbar>b{font-size:13px;letter-spacing:1px}.topbar>a{font-size:10px}.tools #nick{display:none}.tools button{font-size:9px;padding:8px 6px}.overlay{padding:7px}.select-panel{padding:10px}.select-head{gap:10px;margin-bottom:8px}.select-head>img{width:86px;height:66px}.select-head small{font-size:7px;letter-spacing:1px}h1{font-size:18px;margin:4px 0}.select-head p{font-size:10px}.roster{gap:5px}.roster button{display:block;text-align:center;min-height:82px;padding:0 0 5px}.roster img{width:100%;height:68px;display:block}.roster b{font-size:10px}.roster small{display:none}.selected-detail{min-height:65px;padding:6px;margin:8px 0;gap:7px}.selected-detail>img{width:50px;height:50px}.selected-detail h2{font-size:15px}.selected-detail p{font-size:10px}.selected-detail b{font-size:10px}.options label{font-size:8px}.options select{font-size:11px;padding:9px}.options #menuNick{padding:0}.start-row{margin:9px 0;flex-wrap:wrap;gap:8px}.start-row .primary{width:100%;padding:12px}.help{font-size:9px}.panel,.versus-panel{padding:16px}.panel h2{font-size:25px}.versus-faces img{height:150px}.versus-faces b{font-size:15px}.touch-controls{gap:8px;padding-left:8px;padding-right:8px;flex-basis:100px}.stick{width:116px;height:80px}.touch-actions{gap:7px}.touch-actions button{width:60px;height:60px}.touch-actions span{font-size:8px}footer{font-size:8px;flex-basis:20px}.combat-message{top:79px;font-size:11px}}
@media(max-width:365px){.stick{width:104px}.touch-actions{gap:5px}.touch-actions button{width:56px;height:56px}.topbar>b{font-size:11px}.tools button{padding:7px 4px}.roster img{height:58px}}
@media(orientation:landscape) and (max-height:540px){.topbar{flex-basis:40px;padding:4px 10px}.touch-controls{flex-basis:72px;padding-top:3px;padding-bottom:3px}.stick{height:62px;width:135px}.stick i{top:40%;width:32px;height:32px;margin:-16px}.stick .left,.stick .right{top:17px}.touch-actions button{width:57px;height:57px}.touch-actions{gap:12px}.select-head>img{height:52px}.select-head p,.help{display:none}.select-head{margin-bottom:5px}.roster button{display:flex;text-align:left;min-height:51px;padding:0;gap:5px}.roster img{width:51px;height:51px}.roster b{font-size:11px}.selected-detail{min-height:45px;margin:6px 0}.selected-detail>img{width:38px;height:38px}.selected-detail p{margin:2px 0}.options{float:left;width:55%;margin-right:10px}.start-row{margin:5px 0}.start-row .primary{width:auto;padding:11px}.versus-faces{margin:10px 0}.versus-faces img{height:100px}.versus-panel progress{margin:8px 0}.panel h2{font-size:24px;margin:8px}#resultPortrait{height:65px}footer{flex-basis:18px}}

.special.available{border-color:#76eaff;box-shadow:0 0 12px #58d8ff50}.special.charged{border-color:#dfb7ff;box-shadow:0 0 20px #c783ff90}

.stick .up{top:3px;left:0;right:0;text-align:center;font-size:8px}

/* V61 portrait tournament ladder */
.ladder{display:block;width:100%;padding:12px;background:linear-gradient(150deg,#261231,#061b29);border:1px solid #997642;border-radius:12px}.ladder-title{display:block;color:#f6d487;letter-spacing:2px;font-size:10px;margin-bottom:10px}.ladder-faces{display:flex;justify-content:center;gap:12px}.ladder-face{width:100px;display:flex;flex-direction:column;border:2px solid #596472;background:#101a2a;overflow:hidden;border-radius:6px;opacity:.65}.ladder-face img{width:100%;height:85px;object-fit:cover;object-position:top}.ladder-face>span{font:800 8px Arial;padding:5px;color:#c4d2e5}.ladder-face>b{font:800 11px Arial;padding:6px}.ladder-face.current{opacity:1;border-color:#ffdc83;box-shadow:0 0 18px #ffd06344}.ladder-face.current>span{background:#ffdc83;color:#20202b}.ladder-face.done{border-color:#79dda5}.ladder-face.done>span{color:#79dda5}.options{flex-wrap:wrap}.options label{flex:1;min-width:120px}
@media(max-height:760px){.versus-panel{padding:16px;max-height:calc(100dvh - 70px);overflow:auto}.versus-faces img{height:90px!important}.ladder-face img{height:65px}.ladder{padding:8px}.ladder-title{margin-bottom:6px}}

@media(min-width:1000px) and (max-height:820px){
#menu.overlay{padding:10px}.select-panel{padding:14px 18px}.select-head{gap:16px;margin-bottom:10px}.select-head>img{width:130px;max-height:80px;object-fit:contain}.select-head h1{font-size:25px;margin:5px 0}.select-head p{margin:5px 0}.roster{gap:6px}.roster button{min-height:58px;padding:6px}.roster button img{width:45px;height:45px;object-fit:contain}.selected-detail{padding:8px;margin-top:9px;min-height:56px}.selected-detail img{width:48px;height:48px}.selected-detail h2{font-size:17px;margin:0}.options{margin:9px 0}.select-panel .help{font-size:11px;line-height:1.35;margin:6px 0}.start-row{margin:8px 0}
}
