:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#f2f4ff;background:#090f20;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 45% -8%,#1e3155 0,transparent 55%),#090f20}
button,input{font:inherit}
button{border:1px solid #586787;background:#202d48;color:#f2f5ff;border-radius:13px;min-height:45px;padding:10px 15px;cursor:pointer;touch-action:manipulation;transition:filter .12s,transform .08s}
button:hover{filter:brightness(1.1)}
button:active{transform:scale(.97)}
button:disabled{opacity:.45;cursor:not-allowed}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #98b8ff;outline-offset:3px}
button.primary{background:#647ef0;border-color:#889cff;color:white;font-weight:800}
input{background:#121d34;border:1px solid #485879;border-radius:11px;color:white;padding:12px;min-width:0;width:100%;font-size:16px}
a{color:inherit;text-decoration:none}
h1,h2,h3,p{margin:0}
.top{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:15px clamp(12px,3vw,32px);background:#0b1225cc;border-bottom:1px solid #283b59;position:relative;z-index:2}
.top .brand{font-weight:1000;font-size:clamp(13px,2vw,20px);letter-spacing:1px}
.brand span{color:#8ba8ff}
.top>div{display:flex;align-items:center;gap:16px;font-size:12px;color:#bbc5e5}
.top strong{font-size:14px;color:white}
#connection.online{color:#75e1bd}
.landing{padding:clamp(45px,8vh,120px) 20px;text-align:center;max-width:800px;margin:auto}
.hero{font-size:82px;filter:drop-shadow(0 20px 32px #6581db77);margin-bottom:16px}
.landing h1{font-size:clamp(29px,6vw,54px);margin-bottom:15px}
.landing p{color:#bac7e4;font-size:clamp(15px,2vw,19px);line-height:1.6}
.panel{border:1px solid #34445f;border-radius:18px;background:linear-gradient(145deg,#16253e,#101a2d);padding:19px;box-shadow:0 12px 35px #0003;margin-bottom:16px}
.panel h3{font-size:17px;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between}
.panel small{font-size:11px;color:#9eb1d8;font-weight:500}
.panel label{display:block;font-size:11px;color:#9caece;margin:15px 0 6px}
.form{max-width:450px;margin:28px auto;display:grid;gap:13px}
.form button.primary{width:100%}
.inline{display:flex;gap:8px;align-items:center}
.inline>button{flex-shrink:0}
.sub{font-size:13px;color:#a8b6d2}
.battle{max-width:1360px;padding:clamp(9px,1.7vw,24px);margin:0 auto}
.layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(250px,0.8fr);gap:20px;align-items:start}
.arena{background:linear-gradient(180deg,#15213a,#0a1224 70%);border:1px solid #324364;border-radius:20px;overflow:hidden;padding:clamp(13px,2.3vw,26px);box-shadow:0 15px 44px #0005}
.arena-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:16px}
.eyebrow{color:#a9b8d9;letter-spacing:2px;font-size:10px;font-weight:800}
.arena h2{font-size:clamp(21px,3vw,30px);margin-top:5px}
.arena h2 small{color:#aebee3;font-size:11px;white-space:nowrap}
.meter-label{display:flex;justify-content:space-between;font-weight:800;font-size:12px;letter-spacing:.6px;margin:14px 0 6px}
.meter{height:15px;border-radius:30px;background:#263550;overflow:hidden;box-shadow:inset 0 2px 5px #0005}
.meter>div{height:100%;border-radius:30px;transition:width .18s ease}
.meter.hp>div{background:linear-gradient(90deg,#ce314e,#fa6763)}
.meter.co-op>div{background:linear-gradient(90deg,#457edb,#66ddc5)}
.stage{position:relative;height:clamp(185px,31vw,335px);display:flex;align-items:center;justify-content:center;overflow:hidden}
.stage:after{content:"";position:absolute;bottom:2%;width:76%;height:8%;background:radial-gradient(ellipse,#5d6b9155,transparent 70%);border-radius:50%}
.stage .circle{position:absolute;inset:12% 16%;border-radius:50%;filter:blur(23px);background:radial-gradient(circle,#567acc33,transparent 70%)}
.stage .circle.shield-red{background:radial-gradient(circle,#e947613b,transparent 68%)}
.stage .circle.shield-blue{background:radial-gradient(circle,#438be53b,transparent 68%)}
.stage .circle.shield-yellow{background:radial-gradient(circle,#e1c9573b,transparent 68%)}
.boss{height:100%;max-width:100%;z-index:1;filter:drop-shadow(0 15px 18px #020715)}
.stage.defeated .boss{filter:grayscale(1) brightness(.45)}
.event{text-align:center;background:#0d1a32;border:1px solid #374d6e;border-radius:15px;padding:15px 9px;margin:6px 0 17px;min-height:112px}
.event h3{font-size:clamp(17px,2.7vw,26px);margin:0 0 5px}
.event p{color:#b8c7e1;font-size:clamp(12px,1.5vw,15px)}
.event strong{display:block;margin-top:7px;font-size:21px;color:#ffc985}
.party{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:17px;padding-top:14px;border-top:1px solid #273b56}
.party>strong{font-size:12px}
.party>span{font-size:12px;color:#b7c8e0}
.party #partyHp{font-size:22px;color:white;letter-spacing:1px}
aside{min-width:0}
.actions{text-align:center}
.waiting{padding:25px 12px;color:#baccf3;background:#111f37;border-radius:12px;line-height:1.6}
.waiting.ready{color:#82e3c4}
.colors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.colors button{height:99px;border-radius:17px;font-size:31px;font-weight:1000;display:flex;flex-direction:column;align-items:center;justify-content:center}
.colors button span,.guard span,.mash span{font-size:12px;letter-spacing:.4px;margin-top:7px}
.colors .red{background:#a73149}
.colors .blue{background:#305da9}
.colors .yellow{background:#9e751e}
.guard{background:#3768b7;border-color:#80aaff;font-size:39px;height:122px;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}
.mash{background:linear-gradient(155deg,#a9324a,#d8723c);border:2px solid #f9a470;font-size:44px;height:160px;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;user-select:none;-webkit-user-select:none}
.mash.impact{animation:hit .12s ease-out}
@keyframes hit{from{transform:scale(.91)}to{transform:scale(1)}}
.roster{display:flex;flex-wrap:wrap;gap:7px}
.roster span{border:1px solid #42506b;background:#17253f;border-radius:20px;padding:6px 11px;color:#aab6d0;font-size:12px}
.roster .online{color:#9ef1ce}
.qr{background:white;display:table;margin:12px auto;padding:10px;border-radius:10px}
.toast{display:none;position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#233b61;color:#fff;padding:13px 22px;border-radius:13px;box-shadow:0 8px 25px #0007;z-index:100;max-width:90%;text-align:center}
.toast.show{display:block}
@media(max-width:900px){.layout{grid-template-columns:1fr;gap:13px}.battle{max-width:690px}.arena{padding:13px}.stage{height:clamp(180px,52vw,315px)}.top{padding:12px 13px}.top>div{gap:8px}aside .panel{margin-bottom:12px}}
@media(max-width:420px){.colors button{height:90px;font-size:27px}.event{padding:13px 7px}.party #partyHp{font-size:19px}.stage{height:195px}.arena h2{font-size:21px}}
@media(min-width:1000px){.display .layout{grid-template-columns:minmax(0,2fr) minmax(200px,.55fr)}.display .stage{height:49vh;max-height:540px}.display .event{min-height:125px}}

/* v0.2 — timing challenge, whispered runes, sound controls and responsive effects */
.stage.pattern-rune .circle{background:radial-gradient(circle,#9b6fe36c,transparent 72%);animation:runePulse 1.6s ease-in-out infinite alternate}
.stage.pattern-sync .circle{background:radial-gradient(circle,#fed47b4b,transparent 75%);animation:syncPulse .65s ease-in-out infinite alternate}
.stage.pattern-mash .boss{animation:stagger .19s linear infinite alternate}
.stage.result-success .boss{animation:successPop .5s ease-out}
.rune-symbol{position:absolute;z-index:2;top:18%;left:62%;border:2px solid #bfb2ff;background:#332351c9;color:#f4d5ff;border-radius:50%;font-size:35px;font-weight:900;width:60px;height:60px;display:flex;justify-content:center;align-items:center;box-shadow:0 0 25px #b879ff91;animation:runePulse 1.3s ease-in-out infinite alternate}
.sync-controller{text-align:center;display:flex;flex-direction:column;gap:10px}
.sync-instruction{color:#f4d593;font-size:18px;font-weight:900}
.sync-strike{display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:130px;font-size:48px;background:linear-gradient(155deg,#7a5335,#c1832f);border:2px solid #edc374;box-shadow:0 0 15px #bb854b55}
.sync-strike span{font-size:14px;font-weight:900}
.sync-strike:disabled{background:#263452;border-color:#435378;color:#abbad7;opacity:.75}
.sync-strike.strike-now:not(:disabled){animation:syncPulse .28s infinite alternate;box-shadow:0 0 35px #ffda65a8}
.rune-hint{font-size:15px;line-height:1.55;background:#35254f;border:2px solid #8c70cc;border-radius:15px;padding:15px;margin-bottom:12px;text-align:center;color:#e7d5ff}
.rune-hint strong{font-size:20px;color:#fff}
.rune-hint.no-hint{background:#162843;border-color:#536b90;color:#d1dfff}
.audio-tools .inline{flex-wrap:wrap;margin-bottom:9px}
.audio-tools .inline>button{flex:1;min-width:100px}
.audio-tools .sub{line-height:1.5;margin-top:8px}
@keyframes runePulse{from{transform:scale(.94);opacity:.7}to{transform:scale(1.07);opacity:1}}
@keyframes syncPulse{from{transform:scale(.98);filter:brightness(.9)}to{transform:scale(1.025);filter:brightness(1.35)}}
@keyframes stagger{from{transform:translateX(-3px) rotate(-1deg)}to{transform:translateX(3px) rotate(1deg)}}
@keyframes successPop{0%{transform:scale(1);filter:brightness(1.6)}70%{transform:scale(.88)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.stage.pattern-mash .boss,.rune-symbol,.stage.result-success .boss,.stage.pattern-rune .circle,.stage.pattern-sync .circle,.sync-strike.strike-now{animation:none}}
@media(max-width:400px){.sync-strike{height:105px}.sync-instruction{font-size:15px}.rune-hint{font-size:13px}}
