*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{width:100%;height:100%;overflow:hidden;background:#1d1b3a;touch-action:none;user-select:none;-webkit-user-select:none;
  font-family:"Trebuchet MS","Arial Rounded MT Bold",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:#1d1b3a}
canvas{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none}
button{font:inherit;cursor:pointer;border:0;color:inherit}
.panel{position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:12px;z-index:5;
  background:rgba(29,27,58,.55) url(img/bg.webp) center/cover no-repeat;background-blend-mode:multiply}
.panel.show{display:flex}
#free,#trophy{background:rgba(29,27,58,.72)}
.menuCard{width:min(460px,100%);max-height:100%;overflow:auto;background:#fff8ec;border:4px solid #1d1b3a;border-radius:26px;
  padding:14px 16px 14px;text-align:center;box-shadow:0 8px 0 #1d1b3a,0 18px 40px rgba(0,0,0,.35)}
h1{font-size:40px;line-height:1;letter-spacing:.5px;font-weight:900;color:#ff7a2f;
  text-shadow:2px 2px 0 #1d1b3a,-2px 2px 0 #1d1b3a,2px -2px 0 #1d1b3a,-2px -2px 0 #1d1b3a,0 5px 0 #1d1b3a}
h1::after{content:"";display:block}
.sub{font-size:19px;font-weight:900;color:#2f8cff;margin:4px 0 6px;text-shadow:0 2px 0 #1d1b3a33}
h2{font-size:26px;font-weight:900;margin-bottom:10px}
.vs{display:flex;align-items:center;justify-content:center;gap:8px}
.pick{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px}
.tag{font-weight:900;font-size:14px;color:#fff;border-radius:10px;padding:1px 10px;border:2px solid #1d1b3a}
.p1 .tag{background:#ff7a2f}.p2 .tag{background:#2f8cff}
.ava{width:104px;height:104px;border-radius:50%;border:4px solid #1d1b3a;overflow:hidden;background:#ffd9b8;display:grid;place-items:center;
  box-shadow:0 4px 0 #1d1b3a}
.p2 .ava{background:#cfe4ff}
.p1 .ava{outline:4px solid #ff7a2f;outline-offset:-9px}.p2 .ava{outline:4px solid #2f8cff;outline-offset:-9px}
.ava img{width:118%;height:118%;object-fit:cover;object-position:50% 20%;margin-top:14%}
.nm{font-weight:900;font-size:17px}
.row{display:flex;gap:6px}
.arr{width:40px;height:30px;border-radius:10px;background:#fff;border:3px solid #1d1b3a;font-size:13px;box-shadow:0 3px 0 #1d1b3a}
.x{font-size:28px;font-weight:900;color:#1d1b3a;transform:rotate(-8deg)}
.big{display:block;width:100%;margin:12px 0 8px;padding:14px 0;font-size:32px;font-weight:900;color:#fff;border-radius:20px;
  background:linear-gradient(#36d36e,#1fae55);border:4px solid #1d1b3a;box-shadow:0 6px 0 #1d1b3a;letter-spacing:1px;
  text-shadow:0 3px 0 #1d1b3a}
.big:active{transform:translateY(4px);box-shadow:0 2px 0 #1d1b3a}
.small{margin-top:8px;padding:8px 22px;font-size:17px;font-weight:900;border-radius:14px;background:#fff;border:3px solid #1d1b3a;box-shadow:0 3px 0 #1d1b3a}
.opts{margin-top:10px;display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;font-weight:900;font-size:15px}
.opt{padding:6px 10px;border-radius:12px;background:#fff;border:3px solid #1d1b3a;font-weight:900;font-size:14px}
.opt.sel{background:#ffd23f}
.opt.free{background:#e5d7ff}
.keys{display:flex;gap:10px;justify-content:center;margin-top:10px;flex-wrap:wrap}
.kp{display:flex;align-items:center;gap:3px;padding:4px 8px;border-radius:12px;border:2px solid #1d1b3a}
.k1{background:#ffe1cc}.k2{background:#d9eaff}
.kp b{margin-right:4px;font-size:14px}
.k{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:6px;background:#fff;border:2px solid #1d1b3a;
  box-shadow:0 2px 0 #1d1b3a;font-weight:900;font-size:13px}
.touch{font-size:13px;font-weight:700;margin-top:8px}
.intro{font-size:12.5px;line-height:1.35;margin-top:6px;color:#4a4766}
#duelGrid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.dbtn{display:flex;align-items:center;gap:8px;padding:10px 8px;border-radius:14px;background:#fff;border:3px solid #1d1b3a;
  box-shadow:0 3px 0 #1d1b3a;font-weight:900;font-size:15px;text-align:left}
.dbtn i{font-style:normal;font-size:24px}
.tw{font-size:34px;font-weight:900;color:#ff7a2f;text-shadow:0 3px 0 #1d1b3a}
#twImg{width:170px;height:170px;margin:4px auto 0;display:block;animation:bob 1.2s ease-in-out infinite}
@keyframes bob{50%{transform:translateY(-8px) rotate(3deg)}}
.score{font-size:30px;font-weight:900}
.stat{font-size:14px;font-weight:700;color:#4a4766}
#hudBtns{position:fixed;z-index:6;display:flex;gap:6px;top:8px;right:8px}
#btnHome.hide{display:none}
.round{width:38px;height:38px;border-radius:50%;background:#fff;border:3px solid #1d1b3a;display:grid;place-items:center;box-shadow:0 3px 0 #1d1b3a;padding:0}
.round svg{width:20px;height:20px;fill:none;stroke:#1d1b3a;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}
#btnHome svg path{fill:#1d1b3a;stroke:none}
#btnMute .off{display:none}#btnMute.muted .on{display:none}#btnMute.muted .off{display:inline}
#btnMute path{fill:none}
@media (max-height:640px){h1{font-size:32px}.ava{width:80px;height:80px}.big{padding:9px 0;font-size:26px;margin:8px 0 6px}.intro{display:none}}
@media (max-height:500px){.menuCard{padding:8px 12px;width:min(560px,100%)}h1{font-size:28px}.sub{font-size:15px;margin:2px 0}.tag{display:none}
  .ava{width:58px;height:58px;border-width:3px}.nm{font-size:14px}.arr{height:26px}.big{padding:6px 0;font-size:24px;margin:6px 0}
  .opts{margin-top:4px}.keys{margin-top:4px}.touch{display:none}}
