:root{font-family:Arial,Helvetica,sans-serif;color-scheme:dark;--bg:#f3efe5;--panel:#f3efe5;--line:#fffaf0;--text:#27251f;--muted:#786d5c;--mint:#c64230;--orange:#f6b184}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:var(--bg);color:var(--text)}body{overflow:hidden}button{font:inherit;color:inherit;border:0;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible,canvas:focus-visible{outline:3px solid var(--mint);outline-offset:4px}button:disabled{opacity:.45;cursor:default}button,canvas{-webkit-user-select:none;user-select:none}svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}[hidden]{display:none!important}.shell{height:100%;height:100dvh;max-width:1600px;margin:auto;display:flex;flex-direction:column;padding:0 32px;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}.header{min-height:78px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);gap:16px}.brand,.header-actions{display:flex;align-items:center;gap:14px}.brand img,.menu-brand img,.loading img{object-fit:contain;background:none;border:0;filter:none;box-shadow:none}.overline{font-size:8px;letter-spacing:1.7px;color:var(--muted);font-weight:700}h1{margin:3px 0 0;font-size:23px;letter-spacing:-1px}h1 span{color:var(--mint)}.level-label{font-size:9px;letter-spacing:1px;color:var(--mint)}.quiet{background:none;font-size:11px;color:var(--muted);min-height:40px;padding:8px}.pause{display:flex;align-items:center;gap:7px;border:1px solid var(--line);background:var(--panel);padding:10px 13px;border-radius:8px;font-size:11px}.pause:hover,.secondary:hover{border-color:var(--mint)}.matchbar{max-width:1100px;width:100%;margin:0 auto;display:flex;align-items:center;justify-content:center;gap:45px;min-height:91px}.score-side{display:flex;align-items:center;gap:20px}.score-side span{font-size:10px;letter-spacing:1.8px;font-weight:700}.you{color:var(--mint)}.cpu{color:var(--orange)}.score-side strong{font-size:43px;font-weight:700;letter-spacing:-2px;font-variant-numeric:tabular-nums;line-height:1}.match-label{text-align:center;min-width:160px;display:grid;gap:8px}.match-label span{font-size:8px;letter-spacing:2px;color:var(--muted)}.match-label strong{font-size:10px;letter-spacing:1px}.play-area{flex:1;min-height:0;position:relative;display:flex;justify-content:center;align-items:center;padding:12px 0}.stage{position:relative;aspect-ratio:16/9;width:100%;max-width:1120px;flex-shrink:0}.stage canvas{width:100%;height:100%;display:block;touch-action:none;cursor:ns-resize;border-radius:12px}.toast{position:absolute;left:50%;top:16px;transform:translateX(-50%) translateY(-5px);background:#27251f;color:#c64230;font-size:11px;font-weight:700;letter-spacing:.5px;border-radius:30px;padding:10px 20px;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s;white-space:nowrap}.toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}.overlay{position:absolute;inset:0;z-index:2;display:flex;align-items:flex-start;justify-content:center;background:#f3efe5f7;overflow:auto;overscroll-behavior:contain}.menu{margin:auto;flex-shrink:0;max-width:1120px;width:100%;display:grid;grid-template-columns:1.05fr 1fr;align-items:center;gap:40px;padding:24px 40px}.menu-copy{max-width:480px}.menu-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}.menu h2{font-size:clamp(36px,4.4vw,65px);line-height:.95;letter-spacing:-3px;margin:0 0 17px}.menu h2 em{font-style:normal;color:var(--mint)}.menu-copy>p{font-size:12px;line-height:1.7;color:var(--muted);margin:0 0 20px;max-width:410px}.difficulty{border:0;margin:23px 0 8px;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.difficulty legend{font-size:8px;letter-spacing:1.7px;color:var(--muted);margin-bottom:12px;font-weight:700}.difficulty button{min-height:94px;text-align:left;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--panel);display:flex;flex-direction:column;gap:6px}.difficulty small{font-size:9px;color:var(--muted)}.difficulty strong{font-size:15px}.difficulty button span{font-size:8px;color:var(--muted)}.difficulty button[aria-pressed=true]{border-color:var(--mint);background:#c6423012}.difficulty button[aria-pressed=true] strong{color:var(--mint)}.menu-copy .difficulty-note{font-size:10px;min-height:30px;margin-bottom:14px}.menu-actions{display:flex;align-items:center;gap:10px}.primary{min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:35px;background:var(--mint);border-radius:8px;padding:12px 17px;color:#c64230;font-size:12px;font-weight:700}.primary:hover{background:#c64230}.secondary{padding:12px;border:1px solid var(--line);border-radius:8px;background:none;font-size:11px}.menu-copy .how-to{font-size:9px;line-height:1.8;margin:17px 0 12px}.menu-copy .record{font-size:8px;letter-spacing:.8px;margin:0;color:#c64230}.menu-art{min-width:0;position:relative;transform:rotate(-3deg)}.menu-art img{width:100%;display:block;filter:none;pointer-events:none}.menu-art>span{font-size:8px;letter-spacing:2px;display:block;text-align:center;color:var(--muted);margin-top:15px}.results{display:flex;gap:26px;margin:24px 0}.results>div{display:grid;gap:10px}.results span{font-size:8px;letter-spacing:1px;color:var(--muted)}.results strong{font-size:25px;letter-spacing:-1px;font-variant-numeric:tabular-nums}.controls{width:100%;max-width:1120px;margin:0 auto;min-height:88px;display:flex;align-items:center;gap:24px;border-top:1px solid var(--line)}.control-note{display:grid;gap:7px;margin-right:auto}.control-note strong{font-size:9px;color:var(--mint);letter-spacing:1px}.control-note span{font-size:10px;color:var(--muted)}.control-note i{font-style:normal;color:#786d5c;margin:0 5px}.move-buttons{display:flex;gap:8px}.move-buttons button{height:50px;min-width:80px;border:1px solid var(--line);background:var(--panel);border-radius:9px;display:flex;align-items:center;justify-content:center;gap:8px;touch-action:none;font-size:11px}.move-buttons button:active{background:#c6423022;border-color:var(--mint)}.run-stat{display:grid;gap:6px;text-align:right;min-width:95px}.run-stat span{font-size:8px;letter-spacing:1px;color:var(--muted)}.run-stat strong{font-size:19px;color:var(--text);font-variant-numeric:tabular-nums}footer{display:flex;justify-content:space-between;gap:10px;color:#786d5c;font-size:8px;padding:13px 0;border-top:1px solid var(--line)}footer strong{font-weight:400;color:#c64230}.loading{position:fixed;inset:0;z-index:10;background:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:19px}.loading>span{font-size:12px;letter-spacing:7px;color:var(--text);margin-left:7px}.loading small{position:absolute;bottom:35px;font-size:9px;letter-spacing:.6px;color:var(--muted)}.loading-line{width:70px;height:2px;background:#fffaf0;overflow:hidden}.loading-line:after{content:'';display:block;width:35px;height:100%;background:var(--mint);animation:load 1s ease-in-out infinite}.no-script{position:fixed;inset:0;z-index:20;background:var(--bg);padding:40px;color:var(--text)}@keyframes load{0%,100%{transform:translateX(-35px)}50%{transform:translateX(70px)}}
@media(max-width:760px){.shell{padding-left:18px;padding-right:18px}.header{min-height:65px}.brand{gap:10px}.level-label{display:none}.menu{padding:20px 10px;gap:20px;grid-template-columns:1fr}.menu-copy{width:100%;max-width:480px;margin:auto}.menu-art{display:none}.menu h2{font-size:42px;letter-spacing:-2px}.menu-brand{margin-bottom:14px}.menu-copy>p{margin-bottom:15px;font-size:11px}.difficulty{margin-top:16px}.difficulty button{min-height:82px}.matchbar{min-height:78px;gap:20px}.score-side{gap:12px}.score-side strong{font-size:36px}.match-label{min-width:132px}.match-label strong{font-size:8px}.score-side span{font-size:8px}.control-note span{font-size:9px}.control-note i{margin:0 2px}.controls{gap:10px;min-height:78px}.run-stat{display:none}.move-buttons button{min-width:57px;height:48px}.move-buttons button span{display:none}.how-to{max-width:370px}.menu-copy .record{font-size:7px}.primary{min-height:46px}footer{font-size:7px}footer>span:last-child{display:none}}
@media(max-height:560px) and (min-width:640px){.header{min-height:48px}.brand img{width:28px;height:34px}.brand .overline{display:none}h1{font-size:19px}.matchbar{min-height:51px}.score-side strong{font-size:28px}.match-label{gap:4px}.controls{min-height:60px}.move-buttons button{height:42px}.control-note{gap:4px}footer{padding:6px 0;font-size:7px}.menu{padding:14px 30px;gap:32px;grid-template-columns:1.3fr .7fr}.menu h2{font-size:35px;margin-bottom:10px}.menu h2 br{display:none}.menu-brand{margin-bottom:8px}.menu-brand img{width:23px;height:28px}.menu-copy>p{font-size:10px;line-height:1.5;margin-bottom:10px}.difficulty{margin-top:9px;gap:7px}.difficulty legend{margin-bottom:7px}.difficulty button{min-height:64px;padding:8px;gap:4px}.difficulty button span{font-size:7px}.difficulty strong{font-size:12px}.difficulty-note{display:none}.menu-actions{margin-top:10px}.primary{min-height:39px;font-size:11px;padding:9px 14px}.menu-copy .how-to{display:none}.menu-copy .record{margin-top:10px}.menu-art{display:block}.results{margin:16px 0}.results strong{font-size:23px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.menu-art{transform:none}}

.shell[data-mode=menu] .matchbar,.shell[data-mode=menu] .controls,.shell[data-mode=over] .matchbar,.shell[data-mode=over] .controls,.shell[data-mode=paused] .controls{display:none}
@media(max-width:760px){.menu{padding:16px 8px}.menu-brand{display:none}.menu h2{font-size:38px;margin-bottom:12px}.menu-copy .difficulty-note{display:none}.difficulty button{min-height:75px;padding:10px}.difficulty{margin-top:12px}.menu-copy .how-to{margin-top:14px}.menu-copy .record{margin-top:10px}}

/* Phone playfields fill the available viewport; canvas cameras preserve artwork proportions. */
@media(pointer:coarse) and (max-width:1000px){
.shell{width:100%;max-width:none;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
.header{min-height:42px;padding-left:10px;padding-right:10px}.brand img{width:25px;height:30px}.brand .overline{display:none}.brand h1{font-size:16px;margin-top:0}.header-actions{gap:4px}.header .quiet,.header .pause{min-height:36px}
.play-area{margin:0;padding:0}.stage{max-width:none;border:0;border-radius:0;box-shadow:none;aspect-ratio:auto}.stage canvas{border-radius:0}
.controls{padding:8px 10px;margin:0;min-height:64px;flex-shrink:0}.keyboard-note{display:none}footer{display:none}
}
@media(pointer:coarse) and (max-width:1000px){.matchbar{min-height:52px;gap:20px}.score-side strong{font-size:30px}.match-label{gap:5px}.control-note strong{font-size:8px}.control-note span{font-size:8px}.move-buttons button{min-width:56px;height:44px}.shell[data-portrait=true] .move-buttons svg{transform:rotate(-90deg)}.matchbar{flex-shrink:0}.stage canvas{border-radius:0}}

/* rally: independent visual identity, shared studio only. */
:root{color-scheme:light;--bg:#f3efe5;--panel:#fffaf0;--line:#c7bba5;--muted:#786d5c;--text:#27251f;--mint:#c64230;--gold:#c64230;--peach:#c64230;--cyan:#c64230;--accent:#c64230;--light:#fffaf0;--dark:#c7bba5}
body{background:#f3efe5;color:#27251f;font-family:Arial, sans-serif}
h1,h2,h3{font-family:Arial, sans-serif}
button{border-radius:2px}
.overlay,.veil{background:#f3efe5ed;color:#27251f;backdrop-filter:none}
.menu,.menu-card,.card,.panel{color:#27251f}
.primary,.primary-button,.launch{background:#c64230;color:#c64230;border-color:#c64230}
.primary:hover,.primary-button:hover,.launch:hover{background:#c64230;filter:brightness(1.1)}
button[aria-pressed=true]{border-color:#c64230}
h1,h2{font-weight:900;text-transform:uppercase;font-style:italic;letter-spacing:-1.5px}.arena,.stage{border-radius:0!important;border:3px solid #27251f}
:root{--honey:#c64230;--amber:#c64230}
h2 em,h2>span,.chapter-select button strong,.control-button strong{color:#c64230}

:root{--honey:#c64230;--amber:#c64230}
h2 em,h2>span,.chapter-select button strong,.control-button strong{color:#c64230}
.primary,.primary-button,.launch{color:#ffffff!important}
