/* Mobile controls sit above the same game engine; desktop layout is unchanged. */
.touch-zone{position:relative;touch-action:none}.split-touch-zone{width:100%;display:flex;flex-direction:column;align-items:center}.curling-touch-zone{width:100%}
.touch-pad-hint,.mobile-player-bar{display:none}.virtual-pointer-overlay{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:5;stroke:none}.virtual-pointer-overlay[hidden]{display:none}.virtual-tether{stroke:#bceaff;stroke-opacity:.3;stroke-width:1;stroke-dasharray:3 4}.virtual-cutter{fill:#e7faff;stroke:#007cb9;stroke-width:1.5;filter:drop-shadow(0 0 3px #38cfff)}
.cutter-settings{border:0;border-top:1px solid var(--border);padding:18px 0 0;margin:18px 0 0}.cutter-settings legend{padding:0 0 12px;font-size:15px}.cutter-settings>div{display:flex;gap:10px;flex-wrap:wrap}.cutter-settings label{display:flex;align-items:center;gap:7px;min-height:44px;padding:5px 10px;background:#0a263b;border:1px solid var(--border);border-radius:10px;font-size:14px}.cutter-settings input{accent-color:var(--cyan);width:18px;height:18px}.cutter-settings p{font-size:12px}.cutter-settings .text-button{min-height:44px;font-size:14px}
.mobile-sheet{width:min(460px,100%);max-height:85dvh;overflow:auto;padding:18px 24px max(24px,env(safe-area-inset-bottom));background:#0b263b;border:1px solid #2b617f;border-radius:24px 24px 0 0;color:var(--text);margin:auto auto 0;box-shadow:0 -10px 40px #0003}.mobile-sheet::backdrop{background:#00101bb3}.sheet-handle{width:36px;height:4px;border-radius:4px;background:#58809c;margin:0 auto 18px}.mobile-sheet header{display:flex;align-items:center;justify-content:space-between;gap:12px}.mobile-sheet h2{font-size:23px;margin:0 0 12px}.mobile-sheet p{color:var(--muted);font-size:16px;line-height:1.5}.mobile-sheet .primary{width:100%;min-height:50px;font-size:17px;margin-top:12px}.mobile-sheet .icon-button{width:44px;height:44px;font-size:28px}.mobile-sheet ol{padding:0;margin:0;list-style:none}.mobile-sheet li{display:flex;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border)}.mobile-sheet li>span{width:24px}.mobile-sheet li strong{flex:1;font-size:16px;overflow-wrap:anywhere}.mobile-sheet li small{color:var(--muted);font-size:13px}.cutter-demo{height:138px;position:relative;width:150px;margin:0 auto 20px}.cutter-demo i{position:absolute;top:8px;left:68px;width:13px;height:13px;border-radius:50%;background:#dcf8ff;border:2px solid var(--cyan);box-shadow:0 0 12px #25c7ff66}.cutter-demo span{position:absolute;top:29px;left:74px;height:52px;border-left:1px dashed #8ac9eaaa}.cutter-demo b{position:absolute;left:51px;top:78px;font-size:42px;font-weight:400;line-height:1}.cutter-help p:last-of-type{font-size:14px}
@media(pointer:coarse){.touch-zone{touch-action:none;-webkit-user-select:none;user-select:none}.split-pointer-note{display:none}.cutter-settings{display:block}}
@media(max-width:600px), (max-width:1000px) and (pointer:coarse){
  :root{--mobile-field:min(calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)),calc(100svh - 300px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));}
  body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
  .topbar{height:calc(60px + env(safe-area-inset-top));padding:calc(8px + env(safe-area-inset-top)) 14px 8px;gap:12px}.topbar .wordmark.compact{width:90px;min-width:90px}.topbar .wordmark.compact b{font-size:24px}.topbar .wordmark.compact>span{font-size:24px}.topbar .brand-note{display:none}.topbar nav{gap:5px;margin-left:auto}.topbar .icon-button{min-width:44px;width:44px;height:44px}.topbar #exit{min-height:44px;height:44px;padding:9px 11px;font-size:12px}.topbar #exit svg{width:18px;height:18px}.topbar svg{width:23px;height:23px}
  .primary,.secondary{min-height:48px}.icon-button,.text-button{min-height:44px}.icon-button{min-width:44px}input,select{font-size:16px!important}footer{padding-bottom:calc(20px + env(safe-area-inset-bottom))}.mobile-game-screen>footer{display:none}
  .mobile-player-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:52px;border:1px solid #24536f;border-radius:13px;background:#071f31;color:var(--text);padding:8px 13px;text-align:left;font:inherit;cursor:pointer}.mobile-player-copy{min-width:0;flex:1}.mobile-player-copy strong{display:block;font-size:16px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-player-copy small{display:block;font-size:12px;color:var(--muted);margin-top:2px}.mobile-player-dots{display:flex;gap:4px;flex-wrap:wrap;max-width:66px}.mobile-player-dots i{width:6px;height:6px;border-radius:50%;background:#345670}.mobile-player-dots .done{background:#25bce9}.mobile-player-dots .current{background:#effbff;box-shadow:0 0 0 2px #20b9ff33}.mobile-player-chevron{font-size:19px;color:var(--muted)}
  .split-game{position:relative;display:grid;grid-template-columns:1fr;padding:4px 12px calc(12px + env(safe-area-inset-bottom));gap:8px;max-width:600px;width:100%;margin:0 auto;animation:none}.split-left{display:contents}.split-left>.eyebrow,#split-players{display:none!important}.split-center{grid-row:2;width:100%;display:flex;flex-direction:column}.split-field-heading{display:none}.split-touch-zone{width:var(--mobile-field);max-width:100%;padding-bottom:70px;touch-action:none}.split-touch-zone .split-field{width:100%;height:auto;border-radius:18px}.touch-pad-hint{display:block;position:absolute;bottom:22px;left:12px;right:12px;text-align:center;font-size:11px;color:#729bb7;pointer-events:none}.split-game[data-phase=RESULT] .touch-pad-hint{visibility:hidden}.split-turn{display:none}.split-center>.primary{width:100%;min-width:0;min-height:50px;font-size:17px;margin-top:3px;order:3}.split-right{grid-row:3;display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:60px;width:100%;padding-right:67px}.split-right .split-scale,.split-no-timer,.split-pointer-note,#split-area,.split-result>.eyebrow,.split-percentages{display:none}.split-right .panel{background:none;border:0;padding:0!important;box-shadow:none}.split-clock{gap:8px;margin:0;font-size:12px;flex:1 0 100%;justify-content:flex-start}.split-clock strong{font-size:23px;line-height:1}.split-clock>span{font-size:12px}.split-instructions{order:0;margin:0}.split-instructions .eyebrow,.split-instructions h2{display:none}.split-right .split-instructions p{font-size:13px;line-height:1.4;margin:0}.split-result{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}.split-result>strong{font-size:30px;margin:0;line-height:1}.split-result h2{font-size:14px;margin:0}.split-game[data-phase=RESULT] .split-right{grid-row:3}.split-game[data-phase=RESULT] .split-clock{display:none}.split-game[data-phase=RESULT] .split-center>.primary{position:relative}.split-game[data-phase=RESULT] .split-touch-zone{padding-bottom:0;margin-bottom:6px}.split-game[data-phase=RESULT] .split-right{min-height:64px}
  #split-pix{position:absolute;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));width:65px;height:70px;margin:0;pointer-events:none;z-index:0}#split-pix .pix-image-wrap{width:100%;height:100%}.split-game[data-phase=CUTTING] #split-pix{opacity:.35;transform:scale(.8)}.split-game[data-phase=RESULT] #split-pix{width:78px;height:84px;opacity:1}
  .split-source{filter:none}.split-part-label{stroke-width:2px}.split-final{gap:18px;margin:8px auto 20px;padding:0 16px calc(20px + env(safe-area-inset-bottom));max-width:600px}.split-final h1{font-size:27px;margin:12px 0}.split-final .split-field{width:min(100%,350px);margin:0 auto}.split-final-details h2{font-size:21px}.split-final-details>p{font-size:13px}.split-result-player{min-height:44px;padding:8px 0}.split-final .ranking li{gap:10px;padding:8px 0}
  .game-screen{position:relative;display:flex;flex-direction:column;gap:8px;padding:4px 12px calc(15px + env(safe-area-inset-bottom));max-width:600px;margin:0 auto}.game-screen>.mobile-player-bar{order:-2}.game-screen .left-rail{display:contents}.game-screen #players,.game-screen #players-heading{display:none}.game-screen .arena-column{width:100%;order:0}.game-screen .arena-shell{width:var(--mobile-field);max-width:100%;margin:auto}.curling-touch-zone{padding-bottom:70px;touch-action:none}.game-screen .arena{width:100%;aspect-ratio:1}.game-screen .right-rail{order:1;width:100%;padding-right:64px}.game-screen .timer-panel{border:0;background:none;padding:0;gap:4px}.game-screen .timer-panel h2{font-size:13px}.game-screen .timer{font-size:27px}.game-screen #hint{font-size:12px;line-height:1.4;margin:4px 0 0}.game-screen .legend,.game-screen #game-training{display:none}.game-screen .attempt-controls{min-height:0}.game-screen .attempt-controls p{font-size:13px;margin:3px 0 8px}.game-screen .attempt-controls>.primary{width:100%;min-height:50px;font-size:17px}.game-screen #game-pix-companion{position:absolute;right:8px;bottom:12px;width:65px;height:80px;pointer-events:none;margin:0;display:flex}.game-screen #game-pix-companion .pix-image-wrap{width:100%;height:100%}.game-screen #game-pix{width:100%;height:100%;object-fit:contain}.game-screen[data-phase=PLAYING] #game-pix-companion{opacity:.35}.game-screen[data-phase=ATTEMPT_RESULT] .curling-touch-zone{padding-bottom:0}.game-screen .result-panel{padding:6px 0;background:none;border:0}.game-screen .result-panel h2{font-size:28px}.game-screen .result-panel p{font-size:13px}.game-screen .progress{height:5px}.game-screen #training-result{min-height:48px}
  .game-hub{padding:0 16px 24px}.hub-games{grid-template-columns:1fr}.hub-heading img{width:70px}.hub-open .topbar{height:calc(56px + env(safe-area-inset-top))}.game-choice{padding:18px 22px}.hub-play{min-height:48px;font-size:15px}.hub-art{height:135px}.hub-meta{font-size:12px}.hub-open footer{line-height:1.7}
  .setup-content{width:100%}.centered-screen{padding:16px 16px calc(24px + env(safe-area-inset-bottom));margin:0 auto}.setup-intro{margin-bottom:18px}.setup-heading h1{font-size:28px!important}.setup-heading .muted{font-size:14px}#setup-pix{width:70px;height:90px}.setup-player{padding:14px;gap:12px}.setup-player .player-badge{width:38px;height:42px}.setup-start{position:relative;margin-top:14px;min-height:52px}.setup-content input{scroll-margin-top:85px;scroll-margin-bottom:120px}#name-fields{gap:10px}.setup-save-note{padding:12px 0}.setup-save-note p{font-size:12px}.setup-back{margin-top:12px}
  .menu-screen{min-height:0;padding-bottom:22px}.menu-controls>.primary,.menu-controls .secondary{min-height:48px}.menu-controls .player-select{min-height:48px}.menu-copy{max-width:400px}.menu-art{pointer-events:none}.statistics-screen{padding:12px 16px}.statistics-hero h1{font-size:29px}.statistics-screen .players-table-wrap{max-width:100%}.statistics-screen .text-button{min-height:44px}.statistics-screen .players-table th button{min-height:44px}.stat-metrics{gap:10px}.final-screen{padding-bottom:calc(22px + env(safe-area-inset-bottom))}dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px - env(safe-area-inset-top));overflow-y:auto}.mobile-sheet{max-width:100vw}.settings-dialog{padding-bottom:env(safe-area-inset-bottom)}
}
@media(max-width:1000px) and (max-height:600px) and (pointer:coarse) and (orientation:landscape){
  :root{--mobile-field:min(calc(100svh - 145px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),calc(60vw - 60px));}
  .topbar{height:calc(52px + env(safe-area-inset-top));padding-top:calc(4px + env(safe-area-inset-top));padding-bottom:4px}.split-game{max-width:100%;grid-template-columns:minmax(0,1.3fr) minmax(220px,1fr);gap:10px 20px;padding:4px 20px calc(8px + env(safe-area-inset-bottom))}.split-game>.mobile-player-bar{grid-column:2;grid-row:1;align-self:start}.split-center{grid-column:1;grid-row:1/4!important}.split-right{grid-column:2;grid-row:2!important;align-self:start;padding-right:65px;min-height:80px}.split-touch-zone{padding-bottom:62px}.split-center>.primary{min-height:46px;width:100%;margin-top:0}.split-game[data-phase=RESULT] .split-touch-zone{padding-bottom:0}#split-pix{right:24px;bottom:30px}.split-final{display:grid;grid-template-columns:1fr 1fr;max-width:900px}.split-final .split-field{max-width:220px}.game-screen{max-width:100%;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(220px,1fr);gap:10px 20px;padding:4px 20px}.game-screen>.mobile-player-bar{grid-column:2;grid-row:1}.game-screen .arena-column{grid-column:1;grid-row:1/4}.game-screen .right-rail{grid-column:2;grid-row:2}.game-screen .curling-touch-zone{padding-bottom:60px}.game-screen #game-pix-companion{right:20px;bottom:15px}.game-screen .attempt-controls p{display:none}
}
@media(max-width:600px), (max-width:1000px) and (pointer:coarse){
  .split-center{display:contents}.split-touch-zone{grid-row:2;justify-self:center}#split-next{grid-row:4;min-height:50px;width:100%;font-size:17px}#split-pix{position:relative;right:auto;bottom:auto;grid-row:3;grid-column:1;justify-self:end;align-self:center}.split-game[data-phase=RESULT] #split-pix{height:76px;width:70px}
}
@media(max-width:1000px) and (max-height:600px) and (pointer:coarse) and (orientation:landscape){.split-center{display:flex}#split-pix{grid-row:2;grid-column:2}.split-touch-zone{max-width:100%}}
@media(max-width:600px), (max-width:1000px) and (pointer:coarse){
 .online-screen{padding:8px 12px calc(18px + env(safe-area-inset-bottom))}.online-in-game>.mobile-player-bar{display:flex;margin-bottom:10px}.online-screen:not(.online-in-game)>.mobile-player-bar{display:none}.online-in-game .online-heading{display:none}.online-in-game .online-room-bar{margin:5px 0;padding:8px 12px;gap:8px}.online-in-game .online-room-bar input{display:none}.online-in-game .online-role{font-size:16px;margin:10px 0}.online-in-game .online-roster{background:none;border:0;padding:0}.online-in-game .online-roster h2,.online-in-game #online-players{display:none}.online-in-game .online-roster:has(#online-start[hidden]){display:none}.online-layout{display:flex;flex-direction:column;gap:8px}.online-stage-bar{min-height:0;margin-bottom:10px}.online-stage-bar span{font-size:12px}.online-stage-bar strong{font-size:23px}.online-touch-zone{width:var(--mobile-field);max-width:100%;padding-bottom:70px;touch-action:none}.online-in-game:has(#online-outcome:not([hidden])) .online-touch-zone{padding-bottom:0}.online-stage>button{width:100%;min-height:50px}.online-message{font-size:13px;margin:4px 0}.online-final{margin-top:12px}.online-back{margin-top:12px}
}
@media(max-width:1000px) and (max-height:600px) and (pointer:coarse) and (orientation:landscape){.online-touch-zone{width:var(--mobile-field);padding-bottom:60px}.online-in-game .online-room-bar{display:none}.online-stage{display:grid;grid-template-columns:1fr 1fr;gap:10px}.online-touch-zone{grid-column:1;grid-row:1/4;justify-self:center}.online-stage-bar{grid-column:2;grid-row:1;flex-direction:column}.online-stage>button,.online-stage>strong{grid-column:2}}
@media(max-width:600px), (max-width:1000px) and (pointer:coarse){.split-game{grid-template-columns:minmax(0,1fr)}.split-game>.mobile-player-bar,.split-touch-zone,.split-right,#split-next{grid-column:1}.split-right{min-width:0}}
@media(max-width:1000px) and (max-height:600px) and (pointer:coarse) and (orientation:landscape){.split-game{grid-template-columns:minmax(0,1.3fr) minmax(220px,1fr)}.split-game>.mobile-player-bar,.split-right{grid-column:2}}

.mobile-sheet::backdrop{backdrop-filter:none}
@media(max-width:600px), (max-width:1000px) and (pointer:coarse){.game-screen[data-phase=ATTEMPT_RESULT] .timer-panel{display:none}.game-screen[data-phase=ATTEMPT_RESULT] #game-pix-companion{opacity:1}.game-screen[data-phase=ATTEMPT_RESULT] .result-panel>.eyebrow{display:none}}
@media(max-width:600px), (max-width:1000px) and (pointer:coarse){.online-in-game .online-room-bar{display:none}}
@media(max-width:600px), (max-width:1000px) and (pointer:coarse){.player-option{min-height:44px}.clear-player{width:44px;height:44px;right:2px}.setup-player input{padding-right:48px}.inline-name-suggestions button,.name-suggestions button{min-width:44px;min-height:44px}.stats-info summary{min-width:44px;min-height:44px;display:flex;align-items:center}}
