*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{font-family:var(--sp-font-body);background:#c7e7eb;color:#263b3b;touch-action:manipulation;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}button,select,input{font:inherit}button{color:inherit;font-weight:800;min-width:48px;min-height:48px;padding:10px 16px;border:1px solid #d4ddd7;border-radius:12px;background:#fff8e9;box-shadow:0 3px 0 #24413a26;cursor:pointer;touch-action:manipulation}button:active,button.held{transform:translateY(2px);box-shadow:none;background:#dfeede}button[aria-pressed=true]{border:2px solid #267560;background:#e3f1da}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #f4b854;outline-offset:3px}.primary,#boost{background:#23745f;color:#fff;border-color:#235b4b}.primary:active,#boost:active{background:#1f5d4b}#app,#view{position:absolute;inset:0}#view canvas{display:block;width:100%;height:100%;touch-action:none}[hidden]{display:none!important}.lobby{position:absolute;inset:0;background:linear-gradient(90deg,#fff8e9 28%,#fff8e9eb 40%,#fff8e940 64%,transparent);overflow-y:auto}.garage{width:min(570px,49%);padding:24px 4vw;min-height:100%;display:flex;flex-direction:column;justify-content:center;gap:12px}.home{color:#456452;text-decoration:none;font-size:13px;min-height:48px;display:flex;align-items:center;align-self:flex-start}.eyebrow{font:800 11px var(--sp-font-num);letter-spacing:.24em;color:#597259}h1{font:clamp(34px,4vw,58px)/1.15 var(--sp-font-display);margin:0;color:#2f624e;letter-spacing:-.025em}h1 span{display:block;color:#bd6348}.intro{font-size:15px;margin:0 0 6px}.tabs{display:flex;gap:8px}.tabs button{flex:1}#selection{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}#selection button{font-size:13px;padding:8px 3px;min-height:65px}#selection .emoji{display:block;font-size:28px;line-height:1.3}#details{min-height:40px;font-size:12px;line-height:1.7;color:#506953}#details b{font-size:14px;color:#324f41}#paint{display:flex;gap:8px}#paint button{width:48px;height:48px;padding:6px}#paint span{width:27px;height:27px;border-radius:50%;display:block;margin:auto;border:2px solid #fff;box-shadow:0 0 0 1px #0002}.setup{display:grid;grid-template-columns:1fr 1fr;gap:10px}label{font-size:12px;font-weight:800;display:block}select,input{display:block;width:100%;min-height:48px;border:1px solid #bfcfbf;background:#fffdf6;color:#263b3b;border-radius:10px;padding:8px;font-size:14px;margin-top:4px}.garage>.primary{font-size:17px;min-height:54px}.friend-buttons{display:flex;gap:8px}.friend-buttons button{flex:1;padding:10px 6px;font-size:13px}.garage-footer{display:flex;align-items:center;gap:10px;font-size:11px;color:#5c7159}.garage-footer button{box-shadow:none;border:0;background:none;font-size:12px;padding:0;text-decoration:underline}.showcase-caption{position:absolute;right:50px;bottom:50px;display:grid;text-align:right;gap:6px;color:#fff;text-shadow:0 2px 8px #245047}.showcase-caption b{font:30px var(--sp-font-display)}.showcase-caption span{font-size:13px}#race-ui{position:absolute;inset:0;pointer-events:none}#race-ui button{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none}.race-hud{display:flex;align-items:center;gap:20px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;background:#fff8e9;border-bottom:2px solid #d9e2d2;height:calc(82px + env(safe-area-inset-top))}.race-hud button{font-size:22px;padding:8px}.rank b{font:800 40px var(--sp-font-num);color:#a15536}.rank span{font:700 16px var(--sp-font-num)}.lap,.timer{display:flex;flex-direction:column;gap:2px}.race-hud small{font:800 10px var(--sp-font-num);letter-spacing:.08em;color:#597057}.lap b,.timer b{font:800 21px var(--sp-font-num)}.track-label{flex:1;text-align:right;display:grid;gap:4px}.track-label b{font-size:16px}.track-label small{font:12px var(--sp-font-body);letter-spacing:0}#banner{position:absolute;top:24%;left:50%;transform:translateX(-50%);font:clamp(28px,6vw,80px) var(--sp-font-display);color:#fff8e9;text-shadow:0 4px 0 #294f48,0 0 25px #294f4850;text-align:center;pointer-events:none}#standings{position:absolute;top:100px;left:16px;display:grid;gap:5px;font-size:12px;color:#29453a}#standings span{display:block;padding:5px 9px;background:#fff8e9d9;border-radius:5px}#standings .me{background:#e6efca;font-weight:800}#map{position:absolute;top:100px;right:16px;background:#fff8e9d9;border-radius:14px;width:150px;height:120px}.speed{position:absolute;bottom:104px;left:50%;transform:translateX(-50%);color:#fff8e9;text-shadow:0 2px 6px #173e43;display:flex;align-items:baseline;gap:6px}.speed b{font:800 42px var(--sp-font-num)}.speed span{font-size:12px}.speed small{display:block;font:800 18px var(--sp-font-num);color:#ffe6a2}.boost-meter{position:absolute;bottom:66px;left:50%;transform:translateX(-50%);width:190px;color:#fff8e9;text-shadow:0 1px 3px #284942;font-size:12px}.boost-meter>div{height:12px;background:#e1e2cf;border-radius:6px;margin-top:6px;overflow:hidden;border:1px solid #fff8e9}.boost-meter i{display:block;height:100%;background:#ffc77b;width:0;transition:width .1s}.drive-controls{position:absolute;inset:0;pointer-events:none}.steering{position:absolute;bottom:calc(26px + env(safe-area-inset-bottom));left:24px;display:grid;grid-template-columns:76px 76px;gap:10px}.steering button{font-size:28px;height:72px;padding:0;background:#fff8e9ed}.steering .brake{grid-column:1/3;font-size:13px;height:48px;min-height:48px}.power{position:absolute;bottom:calc(26px + env(safe-area-inset-bottom));right:24px;display:grid;grid-template-columns:100px 100px;gap:10px}.power button{height:64px;font-size:15px;padding:8px;background:#fff8e9ed}.power #item{grid-column:1/3;height:54px;background:#d67c50;color:#fff;border-color:#bd6243}.power #item.empty{background:#fff8e9;color:#63705b}.power #boost{background:#23745f}.power #drift{background:#e8edcd}#finish-hint{position:absolute;left:50%;top:35%;transform:translateX(-50%);background:#fff8e9;padding:14px 20px;border-radius:14px;text-align:center;font-size:16px;width:max-content;max-width:90%}dialog{background:#fff8e9;color:#263b3b;width:min(620px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow-y:auto;border:0;border-radius:20px;padding:20px;box-shadow:0 18px 80px #0c364850}dialog::backdrop{background:#1c394985}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.panel-head h2{font:27px var(--sp-font-display);margin:0}.panel-head button{padding:0;width:48px}#panel-body p{font-size:14px;line-height:1.8}.row{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.row button{flex:1}.code{font:800 42px var(--sp-font-num);letter-spacing:.15em;text-align:center;background:#e4efda;border-radius:12px;padding:12px;color:#326749}.error{color:#a84031;font-size:14px;min-height:24px}.notice{background:#e8eedb;border-radius:10px;padding:12px;font-size:13px;line-height:1.7}.room-player{display:flex;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #d5dfcf;font-size:14px}.room-player span{flex:1}.room-player small{font-size:11px}.room-player button{font-size:12px;padding:8px}.result-row{display:flex;gap:12px;align-items:center;padding:12px 8px;border-bottom:1px solid #d7dfcd}.result-row strong{font:800 25px var(--sp-font-num);width:28px}.result-row span{flex:1;font-size:15px}.result-row b{font:800 17px var(--sp-font-num)}.result-row.me{background:#e7efce;border-radius:8px}.result-title{font:32px var(--sp-font-display);text-align:center;margin:12px 0;color:#28735a}#fatal{position:absolute;inset:0;display:grid;place-content:center;background:#fff8e9;padding:30px;text-align:center;line-height:1.8}
@media(max-width:700px){.lobby{background:#fff8e9e8}.garage{width:100%;max-width:480px;padding:16px 24px;margin:auto;gap:10px}.home{min-height:48px}h1{font-size:36px}h1 span{display:inline}.intro{font-size:13px}.showcase-caption{display:none}#selection button{min-height:62px}.race-hud{height:calc(70px + env(safe-area-inset-top));padding:calc(7px + env(safe-area-inset-top)) 8px 7px;gap:12px}.race-hud button{min-width:48px}.rank b{font-size:32px}.rank span{font-size:11px}.lap b,.timer b{font-size:16px}.track-label b{display:none}.track-label small{font-size:10px}#standings{left:10px;top:86px;gap:3px;font-size:10px}#standings span{padding:4px 7px}#map{width:100px;height:80px;right:10px;top:86px}.steering{left:12px;bottom:calc(16px + env(safe-area-inset-bottom));grid-template-columns:62px 62px;gap:8px}.steering button{height:64px}.power{right:12px;bottom:calc(16px + env(safe-area-inset-bottom));grid-template-columns:74px 74px;gap:8px}.power button{height:64px;font-size:12px;padding:6px}.power #item{height:48px}.speed{bottom:166px}.speed b{font-size:32px}.boost-meter{bottom:141px;width:130px;font-size:10px}.boost-meter>div{height:9px;margin-top:3px}dialog{padding:16px}.room-player{font-size:12px}.room-player button{padding:6px;font-size:11px}}
@media(max-height:520px) and (min-width:600px){.garage{padding:12px 24px;width:440px;gap:8px}.home{min-height:32px}h1{font-size:32px}h1 span{display:inline}#selection button{min-height:48px;padding:4px}#selection .emoji{font-size:22px}#details{min-height:24px}.setup{gap:6px}.setup select{min-height:48px}.garage>.primary{min-height:48px}.race-hud{height:64px;padding:6px 14px}.steering{grid-template-columns:60px 60px;bottom:14px;left:16px}.steering button{height:52px}.power{bottom:14px;right:16px;grid-template-columns:96px 96px}.power button{height:52px}.power #item{height:48px}.speed{bottom:76px}.boost-meter{bottom:40px}#standings{top:76px;font-size:10px;gap:2px}#standings span{padding:3px 7px}#map{top:76px;width:100px;height:80px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
h1 span{display:inline}#paint{overflow-x:auto;max-width:100%;padding-bottom:4px}#paint button{flex-shrink:0}
.lobby{background:linear-gradient(90deg,#f5f6ed 29%,#f5f6edf2 39%,#f5f6ed30 53%,transparent 64%)}.garage{width:min(535px,42%);padding:20px 32px;gap:10px;background:#fffdf5d9;border-right:1px solid #fff9}.garage h1{font-size:clamp(30px,3.2vw,46px);color:#284e6b}.garage h1 span{color:#c66070}.garage .eyebrow{color:#547593}.garage .tabs button{background:#edf3f6;color:#34536c;box-shadow:none}.garage .tabs button[aria-pressed=true]{background:#345a79;color:#fff;border-color:#345a79}#selection button{background:#fff;border-color:#dbe4e9;box-shadow:0 3px 0 #d6e1e6}#selection button[aria-pressed=true]{border-color:#369298;background:#e3f4ef}.garage>.primary{background:#284e6b;border-color:#284e6b}.showcase-caption{right:9%;bottom:9%;padding:16px 24px;border-radius:18px;background:#244867d9;text-shadow:none}.showcase-caption b{font-size:28px}.race-hud{background:#203c58f2;border:0;color:#fff9e6;box-shadow:0 4px 18px #243b5930}.race-hud small{color:#c0dfe9}.rank b{color:#ffd67e}.race-hud button{background:#ffffff12;border:1px solid #ffffff40;color:#fff9e6;box-shadow:none}#standings span{background:#213d58db;color:#e6f4ff;border-radius:7px}#standings .me{background:#ffd789;color:#314962}#map{background:#edf5fad9;border:2px solid #ffffffa0;box-shadow:0 4px 12px #203c5820}.drive-controls button{border:2px solid #ffffffa0;box-shadow:0 4px 0 #234d7250;backdrop-filter:blur(8px)}.steering button{background:#edf7fce8;color:#2a4e70}.steering .brake{background:#334f70df;color:#fff}.power #drift{background:#5c6bacdf;color:#fff}.power #boost{background:#248a9adf;color:#fff}.power #item{background:#dc8066ef}.power button.held,.steering button.held{background:#ffdd8d;color:#28466b;border-color:#ffeab8}.speed{background:#244660c9;border:1px solid #ffffff55;border-radius:14px;padding:5px 14px;text-shadow:none}.speed b{font-size:36px}.boost-meter{background:#254963d9;padding:8px 10px;border-radius:10px;width:190px}.boost-meter>div{background:#3c6278;border:0}.boost-meter i{background:linear-gradient(90deg,#64ddd3,#ffdd89)}#race-ui.is-bumping .speed{border:3px solid #ffd67e;box-shadow:0 0 0 5px #ffd67e30}
@media(max-width:700px){.lobby{background:linear-gradient(0deg,#f5f6ed 0%,#f5f6ed 65%,transparent 78%)}.garage{width:100%;max-width:480px;padding:240px 18px 18px;justify-content:flex-start;background:transparent;border:0;gap:10px}.garage .home{position:absolute;top:8px;left:16px;background:#fffdf5d9;border-radius:12px;padding:8px 12px}.garage .eyebrow{display:none}.garage h1{font-size:30px}.showcase-caption{display:block;top:178px;bottom:auto;right:16px;left:16px;text-align:center;padding:8px;font-size:11px;pointer-events:none}.showcase-caption b{font-size:18px}.showcase-caption span{display:none}.speed{bottom:168px;padding:4px 10px}.speed b{font-size:29px}.boost-meter{bottom:120px;width:150px;padding:6px 9px}.boost-meter>div{height:8px}}
@media(max-height:520px) and (min-width:600px){.garage{width:400px;padding:12px 24px}.showcase-caption{bottom:24px;right:24px;padding:10px}.showcase-caption b{font-size:19px}.speed{bottom:98px}.boost-meter{bottom:46px}.race-hud{height:64px}}
