/* Mobile adaptation keeps the 1200 x 675 world and desktop layout intact. */
button{min-height:44px}input,select{min-height:44px}input,select,button{max-width:100%}
.stage>canvas{touch-action:auto}.stage>canvas.input-active{touch-action:none}
.controls-dialog label{display:grid;gap:10px;margin:20px 0;font-size:13px;font-weight:700}
.controls-dialog p{font-size:13px;line-height:1.7}
.controls-dialog{width:min(560px,94vw)}
#touch-controls{position:absolute;inset:0;pointer-events:none;line-height:normal;z-index:3}
#touch-controls>*{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.tap-hint{position:absolute;right:8px;top:8px;background:#173f32ad;color:#fff9df;border-radius:4px;padding:7px;font-size:9px;letter-spacing:1px;pointer-events:none!important}
.joystick{position:fixed;left:max(8px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));width:96px;height:96px;border-radius:50%;background:#173f321c;border:2px solid #173f3266;display:grid;place-items:center}
.joystick-arrows{text-align:center;font-size:16px;line-height:1.5;color:#173f3288}
.joystick-stick{position:absolute;left:29px;top:29px;width:34px;height:34px;border-radius:50%;background:#173f3299;border:2px solid #fcf6d0;pointer-events:none}
.joystick.pressed{background:#173f322f}.joystick.pressed .joystick-stick{background:#173f32}
.touch-button{position:fixed;bottom:max(25px,env(safe-area-inset-bottom));border:2px solid #173f32a6;border-radius:50%;width:80px;height:80px;background:#efd253dc;color:#173f32;font-weight:800;font-size:13px;letter-spacing:1px;box-shadow:0 3px 0 #173f3240;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.touch-button>span{font-size:23px}.touch-right{right:max(14px,env(safe-area-inset-right))}
.touch-button.pressed,.touch-reload.pressed{background:#173f32;color:#fff3b2;box-shadow:none}
.touch-reload{position:fixed;left:max(8px,env(safe-area-inset-left));bottom:max(25px,env(safe-area-inset-bottom));width:96px;min-height:64px;border:1px solid #173f3266;border-radius:5px;background:#f5f2e7e8;color:var(--green);font-size:11px;font-weight:700}
.rotate-prompt{position:fixed;inset:0;z-index:20;background:#f5f2e7;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));line-height:1.7}
.rotate-prompt svg{width:100px;height:100px;color:var(--green)}.rotate-prompt h2{font:900 42px/1 'Barlow Condensed',Impact,sans-serif;margin:20px 0 10px}.rotate-prompt p{max-width:340px;font-size:14px}.rotate-prompt button{padding:12px 24px}
.touch-game,.touch-game body{overflow:hidden;overscroll-behavior:none}
.touch-landscape .masthead,.touch-landscape .rules,.touch-landscape footer{display:none}
.touch-landscape .arena{position:fixed;inset:0;width:100%;min-width:0;height:var(--view-height,100dvh);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);display:flex;flex-direction:column;background:#e6ebd7}
.touch-landscape .room-toolbar{min-height:44px;height:44px;margin:0;padding:0 10px;gap:12px;flex-wrap:nowrap;flex-shrink:0}
.touch-landscape .room-badge{gap:8px}.touch-landscape #room-mode{max-width:155px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:0;font-size:9px}
.touch-landscape #copy-code{font-size:14px;letter-spacing:2px}.touch-landscape #copy-link,.touch-landscape .connection-status{display:none}
.touch-landscape #room-sound{margin-left:auto}.touch-landscape .room-toolbar .quiet-button{font-size:9px;letter-spacing:.4px;white-space:nowrap}
.touch-landscape .game-frame{border:0;box-shadow:none;border-radius:0;overflow:visible;display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px}
.touch-landscape .hud{width:100%;min-height:40px;height:40px;flex-shrink:0;flex-wrap:nowrap;padding:4px 12px;gap:8px}
.touch-landscape .role-block{min-width:100px;flex:0}.touch-landscape .role-block .eyebrow{font-size:9px;margin:0}.touch-landscape .role-block strong{display:none}
.touch-landscape .scoreboard{order:0;width:auto;min-width:0;border:0;padding:0;gap:8px}.touch-landscape .scoreboard>span{max-width:100px;font-size:10px}.touch-landscape .scoreboard strong{font-size:26px;gap:6px}
.touch-landscape .round-block{min-width:95px}.touch-landscape .round-block>span{font-size:7px;letter-spacing:.4px}.touch-landscape .round-block>strong{font-size:22px;display:inline;margin-left:8px}
.touch-landscape .stage{width:min(calc(100% - 216px),calc((var(--view-height,100dvh) - 108px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*1.777778));flex-shrink:0;margin:auto 0;}
.touch-landscape .game-bottom{padding:0;background:none;font-size:9px;min-height:16px;flex-shrink:0}.touch-landscape #controls{display:none}.touch-landscape #game-hint{margin:0}
.touch-landscape #room-message,.touch-landscape #match-record-status{display:none}
.touch-landscape .cover-status,.touch-landscape .ammo-bar{pointer-events:none;bottom:5px;padding:6px;font-size:7px}.touch-landscape .cover-status{left:5px;letter-spacing:.3px}.touch-landscape .ammo-bar{right:5px}.touch-landscape .shell{height:13px;width:6px;border-bottom-width:4px}.touch-landscape #reload-label{font-size:7px;min-width:65px}
.touch-landscape .overlay-card{max-width:96%;max-height:100%;overflow:auto;padding:10px 16px;box-shadow:3px 3px 0 #173f3233}.touch-landscape .overlay-card h2{font-size:30px;margin-bottom:7px}.touch-landscape .overlay-card .eyebrow{font-size:8px;margin-bottom:6px}.touch-landscape .overlay-card p:not(.eyebrow){font-size:11px;line-height:1.4}
.touch-landscape .stage-overlay.countdown .overlay-card{width:145px;height:145px;padding:16px}.touch-landscape .stage-overlay.countdown h2{font-size:64px}
@media(max-width:700px){
  .page{padding-inline:max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right))}
  .masthead{height:auto;min-height:100px;flex-wrap:wrap;gap:0;padding-top:8px}.wordmark{font-size:30px}.header-actions{width:100%;justify-content:space-between;gap:5px}.header-actions .quiet-button{font-size:9px;letter-spacing:.7px}
  .home{padding-top:24px}h1{font-size:clamp(65px,20vw,84px)}.intro-copy{font-size:14px}.create-form label,.join-form label{font-size:10px}.create-form label span{float:none;display:block;margin-top:5px}.join-row{gap:8px}.join-row input{width:49%;letter-spacing:2px}
  input,select{font-size:16px;min-width:0}.primary-button{letter-spacing:1px;min-height:48px}.rules{grid-template-columns:1fr;gap:22px}.rules p{font-size:12px}
  .arena{min-width:0;width:100%;padding-top:12px}.room-toolbar{gap:4px 12px}.room-badge{flex-wrap:wrap}.room-toolbar .quiet-button{font-size:9px}.room-toolbar #room-mode{width:100%;letter-spacing:.5px}
  .game-bottom p{overflow-wrap:anywhere}.game-bottom kbd{padding-inline:4px;margin-right:3px}.game-bottom p>span{margin:0 4px}
  .account-dialog{padding:16px;width:calc(100% - 24px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto}.account-heading{gap:8px;align-items:flex-start}.account-heading h2{font-size:36px;overflow-wrap:anywhere}.account-heading .quiet-button{flex-shrink:0}.account-stats dl{display:block}.account-actions{gap:12px;flex-wrap:wrap}.history-row,.competitive-copy{overflow-wrap:anywhere}
  .leaderboard-table{font-size:12px}.leaderboard-table th,.leaderboard-table td{padding:10px 6px}.table-scroll{max-width:100%}
  .overlay-card{overflow-wrap:anywhere}.overlay-card p:not(.eyebrow){font-size:13px}.overlay-card .primary-button{font-size:11px}
  .arena[data-phase=waiting] .stage>canvas,.arena[data-phase=ready] .stage>canvas,.arena[data-phase=matchOver] .stage>canvas{display:none}
  .arena[data-phase=waiting] .stage-overlay,.arena[data-phase=ready] .stage-overlay,.arena[data-phase=matchOver] .stage-overlay{position:relative;padding:20px 10px;min-height:260px}
  .arena[data-phase=waiting] .overlay-card,.arena[data-phase=ready] .overlay-card,.arena[data-phase=matchOver] .overlay-card{max-width:100%;width:100%}
  .touch-landscape .room-toolbar #room-mode{width:auto;max-width:95px}.touch-landscape .scoreboard>span{max-width:70px}
}
@media(pointer:coarse){input,select{font-size:16px}}
@media(max-width:600px){
 .leaderboard-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .leaderboard-table tbody{display:block}.leaderboard-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:10px 0;border-bottom:1px solid #173f3240}
 .leaderboard-table td{white-space:normal;overflow-wrap:anywhere;border:0;min-width:0;padding:6px}.leaderboard-table td::before{content:attr(data-label);display:block;font-size:9px;font-weight:700;letter-spacing:1px;margin-bottom:4px;color:#69766a}
}
.touch-landscape .room-badge{flex-wrap:nowrap}.touch-landscape .role-block .eyebrow{white-space:nowrap;font-size:8px}
.touch-landscape .stage-overlay.countdown .overlay-card{width:170px;height:170px;overflow:hidden}.touch-landscape .stage-overlay.countdown p:not(.eyebrow){font-size:9px}
.touch-reload[aria-disabled=true]{opacity:.65;cursor:default}.touch-landscape #ammo-label{font-size:9px}

/* Active field styling is shared with desktop in polish.css. */
.game-menu{display:none}

.quick-play{margin-top:20px}.quick-play-note{font-size:11px;line-height:1.7;color:#637360;margin:10px 0 24px}
.queue-panel{max-width:640px;margin:40px auto;padding:32px;border:1px solid #b7c5aa;border-radius:8px;background:#eef0df;text-align:center}
.queue-panel h2{font:900 clamp(32px,6vw,52px)/1.1 'Barlow Condensed',Impact,sans-serif;margin:12px 0 20px}
.queue-panel p{font-size:14px;line-height:1.6}.queue-panel dl{display:flex;justify-content:center;gap:40px;margin:24px 0}
.queue-panel dt{font-size:11px;color:#637360}.queue-panel dd{font-size:24px;font-weight:700;margin:6px 0}
.queue-panel .primary-button{max-width:320px;margin:24px auto 0;justify-content:center;min-height:48px}
#queue-opponents h3{font-size:22px;overflow-wrap:anywhere;margin:20px 0 6px}#queue-opponents small{display:block;margin:22px 0;color:#637360;font-weight:700}
.arena[data-origin=matchmaking] #copy-code,.arena[data-origin=matchmaking] #copy-link{display:none}
@media(max-width:700px){.queue-panel{padding:22px 16px;margin:24px auto}.arena[data-awaiting-ready=true] .stage>canvas{display:none}.arena[data-awaiting-ready=true] .stage-overlay{position:relative;padding:20px 10px;min-height:260px}}
