*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#192226;color:#fff;font-family:Arial,Helvetica,sans-serif}button,a{font:inherit}button{cursor:pointer}#scene{position:fixed;inset:0}canvas{display:block;width:100%;height:100%}.topbar{position:fixed;top:max(20px,env(safe-area-inset-top));left:24px;right:24px;display:flex;align-items:center;justify-content:space-between;gap:16px;pointer-events:none}.brand{font-size:22px;font-weight:bold;font-style:italic;text-shadow:0 2px 8px #0008}.brand span{color:#ffc26a}.brand small{display:block;font-size:11px;letter-spacing:3px;font-style:normal;margin-top:5px;font-weight:normal}.actions{display:flex;gap:8px;pointer-events:auto}.actions button,.actions a{border:1px solid #ffffff40;border-radius:5px;background:#182326df;color:#fff;padding:12px 15px;font-size:14px;text-decoration:none}.actions button:hover,.actions a:hover{background:#334348}.speed{position:fixed;right:26px;bottom:26px;background:#172328e8;border:1px solid #ffffff30;border-radius:8px;padding:15px 22px;min-width:145px}.speed strong{font-size:46px;font-weight:500;font-variant-numeric:tabular-nums}.speed span{font-size:13px;color:#c2cece;margin-left:7px}.speed small{display:block;font-size:12px;color:#f3bd72;margin-top:5px}.status{position:fixed;bottom:28px;left:25px;font-size:13px;line-height:1.8;text-shadow:0 2px 4px #000;background:#182326cf;border-radius:6px;padding:12px 16px;color:#d7e0e0}.status b{display:block;color:#ffca80;font-size:12px;letter-spacing:2px}.modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#12202670;backdrop-filter:blur(3px);padding:20px}.modal[hidden]{display:none}.card{max-width:480px;width:100%;padding:36px;background:#172124f2;border:1px solid #81908c70;border-radius:12px;box-shadow:0 25px 80px #0005}.eyebrow{color:#f2b765;font-size:12px;letter-spacing:2px}h1{font-weight:500;letter-spacing:-1.5px;font-size:42px;line-height:1.1;margin:16px 0}.card p{color:#c2cdcf;font-size:16px;line-height:1.6}.card .controls{font-size:14px;line-height:1.9;border-top:1px solid #ffffff24;padding-top:18px}.card button{background:#efb867;border:0;color:#192226;font-weight:bold;width:100%;border-radius:6px;padding:17px;font-size:16px;margin-top:12px}.card small{display:block;color:#a6b8b8;font-size:12px;margin-top:16px;line-height:1.5}button:focus-visible,a:focus-visible{outline:3px solid #ffd38f;outline-offset:3px}.touch{position:fixed;bottom:max(20px,env(safe-area-inset-bottom));display:none;gap:12px;touch-action:none;user-select:none}.touch.left{left:18px}.touch.right{right:18px}.touch button{height:76px;width:76px;border:1px solid #ffffff6a;border-radius:14px;background:#1c292cc4;color:#fff;font-size:32px;touch-action:none;-webkit-user-select:none;user-select:none}.touch button.pressed{background:#f0b969;color:#192226;transform:scale(.96)}.touch #gas{background:#deb16bbf;color:#182326;font-size:14px;font-weight:bold}.touch #brake{font-size:14px;font-weight:bold}#debug{position:fixed;top:96px;left:24px;padding:12px;background:#10191ed9;font-size:12px;color:#e0eeee;white-space:pre;pointer-events:none}#debug[hidden]{display:none}.error{background:#4a2828}.loading{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);padding:20px;background:#182326}.loading[hidden]{display:none}@media(pointer:coarse),(max-width:700px){.touch{display:flex}.status{display:none}.speed{bottom:115px;right:18px;padding:9px 14px;min-width:110px}.speed strong{font-size:30px}.topbar{left:16px;right:16px;top:16px}.brand{font-size:18px}.actions{gap:6px}.actions button,.actions a{font-size:12px;padding:10px}.brand small{font-size:10px}.card{padding:26px}h1{font-size:34px}.card p{font-size:14px}.touch button{width:66px;height:66px}}@media(max-height:500px){.card{max-width:620px;padding:20px 28px}.card h1{font-size:28px;margin:10px 0}.card p{margin:8px 0}.card .controls{padding-top:8px}.card small{margin-top:8px}.card button{padding:12px;margin-top:4px}.speed{bottom:102px}.touch button{height:62px;width:70px}}
@media(max-width:700px){.speed{top:94px;bottom:auto;right:16px}.brand{font-size:16px;white-space:nowrap}.brand small{letter-spacing:1px;font-size:10px}.actions button,.actions a{white-space:nowrap;padding:10px 8px}.topbar{gap:8px}}

.minimap{position:fixed;top:92px;left:24px;width:210px;padding:12px;background:#152329e8;border:1px solid #ffffff35;border-radius:8px;pointer-events:none;z-index:2}.minimap span{display:block;font-size:12px;letter-spacing:1px;color:#f1c48b;margin-bottom:8px}.minimap svg{display:block;width:100%;height:auto;overflow:visible}.modal{z-index:10}.topbar{z-index:3}#debug{top:310px;z-index:3}#slip:empty{display:none}#slip{color:#ffda90;font-size:12px}.speed{z-index:2}.touch{z-index:3}@media(max-width:700px){.minimap{top:86px;left:16px;width:142px;padding:9px}.minimap span{font-size:10px;letter-spacing:0}.speed{top:86px;max-width:180px}.speed small{font-size:10px}#debug{top:250px;left:16px}}@media(max-height:500px){.minimap{top:76px;width:130px;padding:8px}.minimap span{font-size:10px;letter-spacing:0}.speed{top:76px;bottom:auto;padding:8px 12px}.speed strong{font-size:28px}#debug{top:220px}}

.play-control{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);z-index:4;border:0;border-radius:7px;padding:14px 22px;background:#ffc064;color:#162427;font-weight:bold;box-shadow:0 3px 16px #0005}.minimap{width:250px}@media(max-width:700px){.play-control{bottom:108px;padding:10px 16px;font-size:14px}.minimap{width:170px}.speed{max-width:160px}}@media(max-height:500px){.minimap{width:150px}.play-control{bottom:18px}}.card{max-height:calc(100dvh - 32px);overflow:auto}
@media(max-width:360px){.minimap{width:135px}.speed{max-width:135px;padding:8px}.speed strong{font-size:26px}}
.arcade-hud{position:fixed;z-index:4;right:24px;top:175px;background:#172328e8;padding:10px 14px;border-radius:8px;display:grid;gap:6px;font-size:14px}.arcade-hud[hidden]{display:none}.arcade-hud strong{color:#ffca80}.arcade-hud small{color:#dfd9ca}@media(max-width:700px){.arcade-hud{top:255px;right:16px;left:16px;font-size:12px;padding:8px}.arcade-hud span{font-size:12px}}
@media(max-width:700px){.arcade-hud{right:auto;left:16px;width:calc(50% - 24px);font-size:12px}.arcade-hud span,.arcade-hud small{font-size:11px;line-height:1.4}}

/* RinconMotor: trackside numbers, orange stripe and compact instrument layout. */
:root{--motor:#fa8b24;--ink:#14212ae8;--paper:#fff7e9}
.brand{font-size:30px;font-weight:950;letter-spacing:-1.4px;line-height:.9;filter:drop-shadow(0 2px 2px #172129)}.brand span{color:var(--motor)}.brand:after{content:'';display:block;width:94%;height:3px;background:linear-gradient(100deg,var(--motor) 0 77%,transparent 77% 80%,#fff 80% 87%,transparent 87% 90%,#fff 90%);transform:skewX(-20deg);margin-top:9px}.brand small{font-size:12px;letter-spacing:4px;font-weight:800;margin-top:8px}.brand small i{display:block;font-size:8px;font-style:normal;letter-spacing:2.5px;margin-top:6px;font-weight:500}
.actions button,.actions a{border-radius:2px;background:#17232cd9;border:0;border-bottom:2px solid #ffffff50;padding:10px 12px}.actions button:hover,.actions a:hover{border-bottom-color:var(--motor)}
.minimap{top:94px;left:auto;right:24px;width:206px;padding:10px 13px;background:linear-gradient(140deg,#192936e0,#14212aaa);border:0;border-top:3px solid #ff972b;border-radius:0 0 18px 0;box-shadow:0 8px 22px #0002}.minimap span{color:#fff3df;font-size:10px;font-weight:700;letter-spacing:1.2px}
.speed,.racing .speed{right:auto;left:50%;transform:translateX(-50%);top:auto;bottom:24px;min-width:190px;text-align:center;padding:15px 24px 10px;border:0;border-radius:4px 4px 20px 4px;background:linear-gradient(115deg,#17222bd4,#17222b80);box-shadow:0 8px 20px #0002}.speed:before{content:'';position:absolute;left:10px;right:10px;top:0;height:6px;transform:skewX(-22deg);background:linear-gradient(to right,#fff0cf 0%,#ffac41 78%,#ed4935 94%);clip-path:polygon(0 0,var(--rpm,0%) 0,var(--rpm,0%) 100%,0 100%)}.speed strong{font-size:53px;font-style:italic;font-weight:850;line-height:1}.speed span{font-size:12px;color:#fff}.speed small{font-size:9px;letter-spacing:.6px;color:#d8d9d6;margin-top:4px}.speed #slip{font-size:10px;color:#ffc65b}
.arcade-hud{top:222px;left:24px;right:auto;width:230px;background:linear-gradient(105deg,#14212aee,#14212ab0);border-left:4px solid var(--motor);border-radius:0 0 20px 0;padding:11px 14px;gap:8px}.arcade-hud>strong{display:flex;align-items:baseline;gap:5px;color:#fff;font-size:25px;line-height:1}.arcade-hud strong em{font-size:10px;letter-spacing:1px;font-style:normal;align-self:center;margin-right:auto}.arcade-hud strong b{font-size:45px;font-style:italic}.arcade-hud strong i{font-size:20px;color:#e8b474;font-style:normal}.arcade-hud>span{font-size:11px;font-weight:700;color:#ffd49a;border-top:1px solid #ffffff30;padding-top:8px;line-height:1.5}.arcade-hud>small{font-size:11px;line-height:1.45;color:#fff4df}
.status{padding:9px 12px;border-radius:0;background:#14212ab8;font-size:10px;border-left:2px solid #ec933e;max-width:260px}.status b{color:#fff0d2;font-size:10px}
.modal{background:linear-gradient(90deg,#111c2be6,#111c2b25 80%);backdrop-filter:none;justify-content:flex-start;padding-left:7vw}.card{background:linear-gradient(135deg,#16232df2,#1e2d36ed);border:0;border-left:5px solid var(--motor);border-radius:0 0 38px 0;box-shadow:0 20px 80px #0005;padding:30px;max-width:440px}.card .eyebrow{color:#ffb869;font-size:10px;letter-spacing:1.5px;font-weight:700}h1{font-weight:900;font-style:italic;font-size:54px;text-transform:uppercase;letter-spacing:-2px;line-height:.95;margin:20px 0}.card p{font-size:15px;line-height:1.6;color:#e0e4e4}.card .controls{font-size:12px;line-height:1.8;padding-top:12px}.card button{background:linear-gradient(100deg,#ffb340,#fb8a20);border-radius:1px 1px 14px 1px;text-transform:uppercase;letter-spacing:1px;font-size:14px}.card small{font-size:10px;color:#bdc6c8;line-height:1.5}.play-control{border-radius:0 0 12px 0;background:#ffac3e;bottom:145px;padding:10px 18px;font-size:12px}
.touch button{border-radius:50%;background:#1a242b86;backdrop-filter:blur(2px);border:2px solid #fff8;box-shadow:inset 0 0 15px #ffffff0a}.touch.right button{border-radius:14px 14px 22px 5px;font-size:10px!important;position:relative;padding-top:27px;min-width:64px}.touch.right button:before{content:'⠿';position:absolute;top:5px;left:0;right:0;font-size:28px;color:#fff}.touch #gas{background:#c37c3299;color:#fff;height:90px;margin-top:-14px}.touch button.pressed{background:#fba23c;color:#192226}#audio-controls{border-radius:0 0 10px 0!important;border:0!important;border-left:2px solid #fa8b24!important;bottom:106px!important;left:24px!important}#debug{top:auto;bottom:130px;left:auto;right:24px;font-size:10px}
@media(max-width:700px){.topbar{left:14px;right:14px;top:14px}.brand{font-size:22px;letter-spacing:-.8px}.brand small{font-size:10px;letter-spacing:2px}.brand small i{font-size:6px;letter-spacing:1.5px}.actions button,.actions a{font-size:10px;padding:8px 6px}.actions a{display:none}.minimap{top:84px;right:14px;left:auto;width:145px;padding:8px}.minimap span{font-size:8px}.arcade-hud{top:199px;left:14px;right:auto;width:157px;padding:8px 10px}.arcade-hud strong b{font-size:31px}.arcade-hud strong em{font-size:8px}.arcade-hud strong i{font-size:16px}.arcade-hud>span,.arcade-hud>small{font-size:9px}.speed,.racing .speed{top:auto;bottom:112px;left:50%;right:auto;min-width:146px;max-width:170px;padding:13px 12px 8px}.speed strong{font-size:39px}.speed small{font-size:8px}.touch{bottom:max(20px,env(safe-area-inset-bottom));gap:8px}.touch.left{left:14px}.touch.right{right:14px}.touch button{width:62px;height:70px}.touch #gas{height:84px}.card{padding:24px;max-width:410px}.modal{padding:16px;justify-content:center}h1{font-size:43px}.card p{font-size:14px}#audio-controls{left:14px!important;bottom:106px!important;font-size:10px!important;max-width:172px!important}#audio-controls:not([open]){max-width:90px!important}.play-control{bottom:217px;font-size:10px;padding:8px 12px}#debug{bottom:240px;right:14px;font-size:9px}}
@media(max-height:520px) and (min-width:701px){.brand{font-size:24px}.minimap{top:73px;width:156px}.arcade-hud{top:174px;width:206px;padding:7px 10px}.arcade-hud strong b{font-size:31px}.arcade-hud>span,.arcade-hud>small{font-size:9px}.speed,.racing .speed{bottom:16px;min-width:170px}.speed strong{font-size:38px}.touch button{width:58px;height:62px}.touch #gas{height:76px}.status{display:none}.card{padding:18px 24px;max-width:570px}h1{font-size:34px;margin:10px 0}.card .controls{padding-top:7px;font-size:11px}.card p{margin:8px 0;font-size:13px}.card small{font-size:9px;margin-top:8px}.card button{padding:10px;margin-top:5px}#audio-controls{bottom:100px!important}.play-control{bottom:110px}}
@media(max-width:360px){.brand{font-size:19px}.minimap{width:133px}.arcade-hud{width:145px}.touch button{width:57px}.touch.right button{min-width:56px}.speed,.racing .speed{bottom:112px}.card{padding:20px}.card h1{font-size:37px}}
