@font-face{font-family:Poppins;src:url('/assets/fonts/petbomb.ttf') format('truetype');font-display:swap;font-weight:600 900}*{box-sizing:border-box}html{color-scheme:dark}body{margin:0;background:#1c2940;color:#fff3e0;font-family:Poppins,system-ui,sans-serif;font-size:15px;min-height:100vh;background-image:linear-gradient(90deg,#172439ee,#172439a0),url('/assets/images/ui/title_bg.png');background-size:cover;background-position:center;background-attachment:fixed}button,input,select{font:inherit}button,input,select{border:2px solid #687e9e;border-radius:12px;padding:12px 18px;color:#fff3e0;background:#2d405e}button{cursor:pointer;transition:background .15s,transform .15s}button:hover:enabled{background:#425975;transform:translateY(-2px)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffe39a;outline-offset:4px}button:disabled{opacity:.45;cursor:default}.primary{background:#ffd37e;color:#26344f;border-color:#ffd37e}.primary:hover:enabled{background:#ffe3a9}button.quiet{background:transparent;border-color:transparent;color:#d3deee}header{max-width:1480px;margin:auto;padding:28px 5%;display:flex;align-items:center;justify-content:space-between;gap:24px}header img{width:230px;max-width:35vw;height:auto}.header-tools{display:flex;gap:24px;align-items:center}.header-tools label{display:flex;align-items:center;gap:12px;font-size:12px}.header-tools select{font-size:12px;max-width:185px;padding:8px}#connection{font-size:12px;color:#89e0b8}main{max-width:1360px;margin:24px auto 70px;padding:0 5%}h1{font-size:clamp(30px,4vw,58px);line-height:1.16;letter-spacing:-1.8px;margin:14px 0 24px;max-width:800px}h2{font-size:23px;letter-spacing:-.5px;margin:0 0 22px}p{line-height:1.8;color:#d5dfed}.eyebrow{color:#ffd37e;font-size:13px}.welcome{min-height:65vh;display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:8%}.intro p{max-width:510px;font-size:17px}.features{display:flex;flex-wrap:wrap;gap:20px;margin-top:30px;font-size:12px;color:#b5c9e0}.join-panel{background:#2d405ef5;padding:38px;border-radius:24px;box-shadow:0 16px 64px #0c162a66;max-width:470px;width:100%;justify-self:end}.join-panel label{display:block;font-size:13px;margin-bottom:8px}.join-panel input{width:100%;background:#1c2940}.join-panel>.primary{width:100%;margin-top:20px}.divider{text-align:center;font-size:12px;color:#bbccdf;margin:25px 0}.join-row{display:flex;gap:10px}.join-row input{text-transform:uppercase;min-width:0;letter-spacing:3px}.small{font-size:12px;line-height:1.7}.join-panel>.small{margin:24px 0 0}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.section-heading h1{font-size:38px;margin-bottom:30px}.section-heading button{font-size:12px}#code-display{display:block;font-size:24px;letter-spacing:4px;color:#ffd37e;margin-top:4px}.seats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.seat{border-radius:18px;background:#2d405ef0;padding:24px 16px 20px;text-align:center;border-top:5px solid var(--seat);min-width:0}.seat h3{margin:0;font-size:15px;overflow-wrap:anywhere}.seat .portrait{width:150px;height:150px;max-width:100%;object-fit:contain;margin:8px 0}.seat .pet-choice{display:flex;justify-content:center;align-items:center;gap:6px}.pet-choice button{padding:4px 12px}.pet-name{font-size:13px;min-width:0;overflow-wrap:anywhere}.seat .status{font-size:12px;color:#c0cee1;margin-top:16px}.seat.ready .status{color:#89e0b8}.lobby-bottom{display:grid;grid-template-columns:1fr 240px;gap:40px;margin-top:36px}.arenas{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.arena-option{padding:0;overflow:hidden;text-align:left;background:#2d405e;border:2px solid transparent}.arena-option img{width:100%;aspect-ratio:1.5;object-fit:cover;display:block}.arena-option span{display:block;padding:10px;font-size:11px;min-height:50px}.arena-option.selected{border-color:#ffd37e;color:#ffd37e}.lobby-actions{display:flex;flex-direction:column;justify-content:center;gap:14px}.rule-row{display:flex;gap:20px;align-items:center;margin-top:20px}.rule-row label{display:flex;gap:12px;align-items:center;font-size:12px}.match-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;font-size:13px}#timer{font-size:32px;color:#ffd37e}.scoreboard{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}.score{padding:10px 14px;border-radius:12px;background:#2d405ef0;border-left:4px solid var(--seat);font-size:12px;min-width:0}.score-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.score small{display:block;color:#c3d3e7;margin-top:4px}.score.dead{opacity:.5}.arena-wrap{position:relative;max-width:900px;margin:auto;border-radius:18px;background:#26344f;border:5px solid #617694;overflow:hidden}canvas{display:block;width:100%;height:auto;touch-action:none}.banner{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#26344ff0;border:3px solid #ffd37e;border-radius:18px;padding:25px 40px;max-width:85%;text-align:center;font-size:clamp(22px,4vw,48px);box-shadow:0 10px 40px #10192c66;pointer-events:none}.game-footer{display:flex;align-items:center;justify-content:center;gap:20px;font-size:12px}.game-footer button{padding:6px;font-size:12px}.game-footer p{margin:15px 0}.touch-controls{display:none;justify-content:space-between;align-items:center;margin-top:18px}.touch-controls button{touch-action:none;user-select:none}.dpad{display:grid;grid-template-columns:repeat(3,48px);gap:4px}.dpad button{padding:8px}.dpad button:first-child{grid-column:2}.dpad button:nth-child(2){grid-column:1}.results{text-align:center;max-width:700px;margin:30px auto;background:#2d405ef5;border-radius:24px;padding:36px}.results h1{font-size:42px}.results>img{width:200px;height:200px;object-fit:contain}.result-row{display:flex;justify-content:space-between;padding:14px;border-bottom:1px solid #60738e}.results button{margin-top:28px}.notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:18px 28px;border:2px solid #ffd37e;border-radius:16px;background:#26344f;z-index:10;max-width:90vw;box-shadow:0 10px 40px #0006}body>footer{max-width:1360px;margin:auto;padding:22px 5%;border-top:1px solid #52647d;display:flex;justify-content:space-between;font-size:11px;color:#b5c9e0}[hidden]{display:none!important}@media(max-width:850px){.welcome{grid-template-columns:1fr;gap:30px}.join-panel{justify-self:start;max-width:none}.intro h1{max-width:550px}.lobby-bottom{grid-template-columns:1fr;gap:20px}.lobby-actions{flex-direction:row;flex-wrap:wrap}.seats{grid-template-columns:repeat(2,1fr)}.header-tools{gap:10px}.header-tools label>span{display:none}.features{margin-top:18px}.section-heading h1{font-size:30px}.game-footer{flex-wrap:wrap;gap:5px 14px}.touch-controls{display:flex}.scoreboard{grid-template-columns:repeat(2,1fr)}}@media(max-width:480px){header{padding-top:18px}.header-tools{flex-direction:column;align-items:flex-end;gap:6px}main{margin-top:14px}.join-panel{padding:24px}.intro p{font-size:15px}.section-heading{align-items:flex-start}.section-heading h1{font-size:26px}.section-heading button{padding:8px}.seats{gap:10px}.seat{padding:15px 8px}.seat .portrait{width:120px;height:120px}.arenas{grid-template-columns:repeat(3,1fr)}.rule-row{flex-wrap:wrap;gap:8px}.results{padding:24px 16px}.results h1{font-size:30px}body>footer{gap:20px}.game-footer p{text-align:center}.touch-controls>div:last-child{display:flex;gap:6px;flex-direction:column}.features{gap:12px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

.roster-panel{margin-top:28px}.roster-panel h2{font-size:20px;margin-bottom:16px}.pet-roster{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.pet-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 6px;min-width:0;border-color:transparent}.pet-option img{width:76px;height:76px;object-fit:contain}.pet-option span{font-size:12px;overflow-wrap:anywhere}.pet-option.selected{border-color:#ffd37e;background:#425975;color:#ffd37e}@media(max-width:850px){.pet-roster{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:480px){.pet-roster{grid-template-columns:repeat(3,minmax(0,1fr))}}


.pet-option .pet-owner{font-size:10px;line-height:1.4;overflow-wrap:anywhere}.pet-option:disabled{opacity:.65}

/* Mobile play keeps the whole arena and touch controls in view. */
.touch-controls button{min-width:48px;min-height:48px;-webkit-user-select:none;-webkit-touch-callout:none}
.touch-controls button.pressed,.touch-controls button:active{background:#ffd37e;color:#26344f;transform:none}
@media(pointer:coarse),(max-width:850px){
 button,input,select{min-height:44px}
 input,select{font-size:16px}
 .pet-choice button{min-width:44px;flex-shrink:0}
 .touch-controls{display:flex}
 .touch-controls button:hover{transform:none}
}
@media(max-width:480px){
 .seat .pet-choice{flex-wrap:wrap}
 .seat .pet-choice .pet-name{flex:1 0 100%;order:-1}
 .section-heading{gap:10px}.section-heading h1{letter-spacing:-1px}
 .section-heading #share{max-width:44%;flex-shrink:0}
 .result-row{gap:12px;font-size:12px}.result-row span{min-width:0;overflow-wrap:anywhere}
 .lobby-actions button{flex:1 1 130px}
}
@media(max-width:850px){
 body[data-view="match"]>header{padding:6px 3%;gap:8px}
 body[data-view="match"]>header img{width:90px}
 body[data-view="match"] .header-tools{flex-direction:row;gap:8px}
 body[data-view="match"] .header-tools select{max-width:155px;padding:6px;font-size:11px}
 body[data-view="match"] main{margin:0 auto 12px;padding:0 3%}
 body[data-view="match"]>footer{display:none}
 #match .match-heading{margin:4px 0 6px;font-size:10px;gap:6px}
 #match #timer{font-size:24px}
 #match .scoreboard{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-bottom:6px}
 #match .score{padding:6px 4px;font-size:10px;border-left-width:3px}
 #match .score small{font-size:9px;margin-top:2px;white-space:nowrap}
 #match .arena-wrap{width:min(100%,calc((100dvh - 350px - env(safe-area-inset-bottom,0px))*var(--arena-ratio,1.18)));border-width:3px;border-radius:12px}
 #match .banner{padding:12px 18px}
 #match .game-footer{gap:4px 10px;margin:4px 0}
 #match .game-footer p{display:none}
 #match .game-footer button{min-height:40px;padding:6px 12px}
 #match .touch-controls{gap:12px;margin-top:4px;padding-bottom:env(safe-area-inset-bottom,0px);min-width:0}
 #match .dpad{grid-template-columns:repeat(3,48px);gap:4px;flex-shrink:0}
 #match .dpad button{padding:4px}
 #match .touch-controls>div:last-child{display:flex;flex-direction:column;gap:6px;min-width:0}
 #match .touch-controls>div:last-child button{padding:8px 14px;font-size:12px;overflow-wrap:anywhere}
}
@media(max-height:500px) and (orientation:landscape) and (max-width:1000px){
 body[data-view="match"]>header,body[data-view="match"]>footer{display:none}
 body[data-view="match"] main{margin:0;padding:4px max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left));max-width:none}
 #match{display:grid;grid-template-columns:minmax(0,1fr) 160px;grid-template-areas:"heading heading" "scores scores" "arena controls" "footer footer";gap:4px 12px}
 #match .match-heading{grid-area:heading;margin:0}#match .scoreboard{grid-area:scores;margin:0}
 #match .arena-wrap{grid-area:arena;width:min(100%,calc((100dvh - 130px)*var(--arena-ratio,1.18)));margin:auto}
 #match .touch-controls{display:flex;grid-area:controls;flex-direction:column;justify-content:center;gap:8px;margin:0;padding:0}
 #match .touch-controls>div:last-child{flex-direction:row;gap:6px;width:100%}
 #match .touch-controls>div:last-child button{padding:6px;font-size:10px;flex:1;min-width:0}
 #match .game-footer{grid-area:footer;margin:0}
}

@media(max-width:480px){body[data-view="match"]>header img{width:80px}body[data-view="match"] .header-tools{gap:4px}body[data-view="match"] .header-tools select{max-width:138px}body[data-view="match"] #connection{font-size:9px}}

.music-controls{display:flex;align-items:center;gap:10px}.music-controls button{font-size:11px;padding:8px 10px;white-space:nowrap}.music-controls .music-volume-label{display:flex;align-items:center;gap:8px}.music-volume-label span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.music-controls input{width:85px;min-width:55px;padding:0;accent-color:#ffd37e}@media(max-width:850px){.header-tools{flex-wrap:wrap;justify-content:flex-end}.music-controls{gap:6px}.music-controls input{width:65px}}

@media(max-width:480px){.seat .portrait{width:88px;height:88px}.seat h3{font-size:12px;min-height:32px}.seat .status{margin-top:8px;font-size:10px}.seat .pet-name{font-size:12px}.seat{padding:12px 8px}}
/* Keep the audio controls compatible with narrow headers. */
@media(max-width:480px){
 header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
 .header-tools{display:contents}
 #connection{grid-column:2;grid-row:1;justify-self:end}
 .music-controls{grid-column:1;grid-row:2;min-width:0}
 .music-controls button{font-size:0;min-width:44px;padding:8px}
 .music-controls button::before{content:'♫';font-size:18px}
 .music-controls button[aria-pressed="false"]::before{opacity:.45}
 .music-controls input{width:55px;min-width:40px}
 .header-tools>label{grid-column:2;grid-row:2}
 .header-tools>label select{max-width:145px}
 body[data-view="match"]>header{display:flex}
 body[data-view="match"]>header>a{display:none}
 body[data-view="match"] .header-tools{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%}
 body[data-view="match"] .music-volume-label{display:none}
}

/* Large named previews above an image-only roster. Dots identify the selected seats. */
.seat .portrait{width:230px;height:230px;margin:8px 0 12px}.pet-option img{width:100px;height:100px;max-width:100%}.pet-option.assigned{border-color:var(--pet-seat);background:#3a4e6b}.pet-option.selected{box-shadow:0 0 0 2px var(--pet-seat,#ffd37e)}.pet-option:disabled{opacity:.85}.pet-selection-marks{display:flex;justify-content:center;align-items:center;gap:5px;height:10px}.pet-selection-dot{width:9px;height:9px;border-radius:50%;box-shadow:0 0 0 1px #fff6}@media(max-width:480px){.seat .portrait{width:145px;height:145px}.pet-option img{width:85px;height:85px}}

.player-color-picker{display:flex;justify-content:center;gap:9px;margin:12px 0}.player-color-picker button{width:27px;height:27px;min-width:27px;padding:0;border:2px solid #ffffff50;border-radius:50%;box-shadow:0 2px 4px #0005}.player-color-picker button[aria-pressed=true]{outline:2px solid #fff;outline-offset:3px}.player-color-picker button:disabled{opacity:.2;cursor:not-allowed}

/* Toy medal power-ups: a readable silhouette and a distinct color for each ability. */
.score-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.score-wins{color:#ffd37e;white-space:nowrap}.player-powerups{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.powerup-stat{display:inline-flex;align-items:center;gap:2px;min-width:45px;padding:2px 6px 2px 2px;border-radius:10px;background:#17283e;border:1px solid #61728b}.powerup-stat img{width:32px;height:35px;object-fit:contain}.powerup-stat strong{font-size:14px;color:#fff2ce}.player-abilities{display:flex;gap:4px;margin-left:auto}.player-abilities .powerup-stat{padding:1px;min-width:0;border-color:transparent;background:transparent}.player-abilities img{width:28px;height:30px}.powerup-stat.inactive{opacity:.3;filter:grayscale(1)}
@media(max-width:850px){#match .score-heading{gap:3px;margin-bottom:5px}#match .score-wins{font-size:9px}#match .player-powerups{gap:3px}#match .powerup-stat{min-width:0;padding:1px 3px 1px 0;gap:0;border-radius:6px}#match .powerup-stat img{width:21px;height:23px}#match .powerup-stat strong{font-size:10px}#match .player-abilities{flex-basis:100%;justify-content:flex-start;margin-left:0;gap:2px}#match .player-abilities .powerup-stat{padding:0}#match .player-abilities img{width:19px;height:21px}body[data-view="match"] .header-tools{flex-wrap:wrap}.score-heading .score-name{font-size:10px}}
