:root{--paper:#f5f5ed;--white:#fffef9;--ink:#283d34;--muted:#879087;--line:#dfe3d8;--mint:#d9edcf;--mint-strong:#bbd9b1;--green:#2e5747;--peach:#f2ddc7;--radius:24px;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.46}button,a,input,summary{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid #487c60}button{color:inherit}a{color:inherit;text-decoration:none}button,summary{touch-action:manipulation}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}button svg{display:block}[hidden]{display:none!important}.page-shell{max-width:1512px;margin:auto;padding:0 54px}.site-header{height:104px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;font-size:25px;font-weight:800;letter-spacing:-1.2px}.brand-icon{background:var(--green);width:38px;height:38px;border-radius:11px;display:flex;align-items:center;justify-content:center;gap:4px;transform:rotate(-7deg)}.brand-icon i{height:23px;width:8px;background:var(--mint);transform:skew(-23deg)}.brand-icon i+i{height:16px;margin-top:7px}.brand-divider{font-weight:300;color:#b4bcaf;margin:0 12px}.brand-sub{font-size:17px;letter-spacing:-.5px;font-weight:400}.header-right{display:flex;gap:24px;align-items:center}.edition{font-size:10px;letter-spacing:1.8px;color:#7b877b}.connection-badge{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:30px;padding:9px 13px;font-size:11px;white-space:nowrap}.connection-badge i{width:6px;height:6px;background:#b3b8ac;border-radius:50%}.connection-badge.connected i{background:#55905a;box-shadow:0 0 0 3px #55905a17}.connection-badge.connecting i{background:#d0a45c;animation:pulse 1s infinite}.intro{display:flex;align-items:center;justify-content:space-between;padding:38px 0 31px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;margin:0 0 12px;color:#748372}h1{font-weight:500;letter-spacing:-2.8px;font-size:48px;line-height:1.13;margin:0}h1 span{color:#739270}.intro-copy{margin:14px 0 0;font-size:13px;line-height:1.5;color:#7c877a}.mobile-break{display:none}.race-stamp{display:flex;gap:11px;align-items:center;transform:rotate(8deg);margin-right:16px;color:#87a27c}.race-stamp svg{width:50px;height:50px;stroke:none}.race-stamp span{font-size:10px;line-height:1.55;letter-spacing:2px}.race-stamp strong{font-size:12px}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;align-items:start}.drive-section{min-width:0}.game-frame{position:relative;width:100%;height:570px;border-radius:var(--radius);overflow:hidden;background:#c9dfd2;isolation:isolate;box-shadow:0 2px 0 #ffffff inset}.game-frame:fullscreen{border-radius:0;height:100%;width:100%}#raceCanvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}#raceCanvas:active{cursor:grabbing}.game-topline{position:absolute;top:21px;left:22px;right:20px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.track-label{display:flex;align-items:center;gap:8px;color:#415d50;font-size:9px;letter-spacing:1.4px;font-weight:700;padding:9px 11px;background:#faffee9c;backdrop-filter:blur(8px);border:1px solid #faffee91;border-radius:8px}.live-dot{width:5px;height:5px;background:#6b8671;border-radius:50%}.game-tools{display:flex;gap:5px;pointer-events:auto}.icon-button{display:grid;place-items:center;width:32px;height:32px;background:#faffee9c;backdrop-filter:blur(8px);border:1px solid #faffee70;border-radius:9px}.icon-button:hover{background:#fffef2}.icon-button svg{width:17px;height:17px}.race-hud{position:absolute;top:74px;left:22px;display:flex;gap:22px;pointer-events:none;opacity:0;transition:opacity .2s}.is-connected .race-hud{opacity:1}.race-hud>div>span{display:block;font-size:8px;letter-spacing:1.2px;margin-bottom:5px;color:#4f675a;font-weight:700}.race-hud strong{font-size:25px;line-height:1;font-variant-numeric:tabular-nums;font-weight:500;letter-spacing:-1px}.race-hud small{font-size:12px;color:#597263;letter-spacing:0}.minimap{position:absolute;right:21px;top:75px;width:132px;height:114px;border-radius:15px;background:#f7f9efc7;border:1px solid #fcffefad;backdrop-filter:blur(10px);display:flex;flex-direction:column;align-items:center;pointer-events:none}.minimap canvas{width:122px;height:91px}.minimap>span{font-size:7px;letter-spacing:1.7px;color:#667e68;font-weight:700}.scene-caption{position:absolute;left:35px;top:100px;pointer-events:none}.scene-caption .tag{font-size:8px;letter-spacing:1.3px;border-bottom:1px solid #799d7c88;padding-bottom:7px;color:#68816a}.scene-caption h2{font-weight:400;font-size:41px;line-height:1.08;letter-spacing:-1.8px;margin:22px 0 13px}.scene-caption p{font-size:11px;line-height:1.65;color:#6c806e}.is-connected .scene-caption{display:none}.view-hint{position:absolute;bottom:145px;left:50%;transform:translateX(-50%);font-size:9px;white-space:nowrap;color:#eaf1df;background:#283c3596;padding:8px 12px;border-radius:20px;pointer-events:none}.view-hint span{font-size:14px;margin-right:5px}.is-racing .view-hint{opacity:0}.drive-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--line);background:#fafbf4;border-radius:16px;margin-top:12px;padding:14px 17px}.keyboard-guide{display:flex;align-items:center;gap:14px}.keyboard-guide>div{display:flex;flex-direction:column;gap:5px}.keyboard-guide strong{font-size:11px;font-weight:600}.keyboard-guide>div>span{font-size:9px;color:#8c9688}.key-cluster{display:flex;flex-direction:column;align-items:center;gap:3px}.key-cluster>span{display:flex;gap:3px}kbd{font-family:inherit;font-size:8px;width:15px;height:15px;border:1px solid #c9d1c1;display:inline-grid;place-items:center;box-shadow:0 1px 0 #dbe0d2;border-radius:3px;color:#6b7862}.action-buttons{display:flex;gap:8px}.action-button{border:1px solid #d9dfcf;border-radius:10px;background:#f2f5e9;display:flex;align-items:center;gap:8px;padding:9px 11px;min-height:43px}.action-button:first-child{background:#e5efd9;border-color:#d9e4cc}.action-button>span:not(.action-icon){display:flex;flex-direction:column;gap:4px;align-items:flex-start}.action-button strong{font-size:10px;font-weight:500}.action-button b{display:inline-block;font-weight:700;font-size:9px;margin-left:5px}.action-button small{font-size:7px;letter-spacing:.8px;color:#829076}.action-icon{font-size:29px;line-height:20px}.action-button svg{width:19px;height:19px}.action-button:not(:disabled):active{transform:translateY(1px);background:#bfd59e}.track-meta{display:flex;gap:12px;align-items:center;margin-top:19px;color:#8a9385;font-size:9px;padding:0 2px}.track-meta>span:first-child{display:flex;align-items:center;gap:6px;color:#5b7056;font-weight:600}.track-meta i{font-style:normal;margin:0 5px;color:#b6bcb0}.mini-dot{width:5px;height:5px;background:#91b282;border-radius:50%}.track-meta button{font-size:9px;margin-left:auto;padding:0;border:0;background:none;color:#63775c}.track-meta button span{margin-left:7px}.lobby-panel{background:var(--white);border:1px solid #e2e5da;border-radius:var(--radius);padding:24px;box-shadow:0 3px 20px #42533004}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:23px}.panel-heading .eyebrow{font-size:8px;letter-spacing:1.7px;margin-bottom:8px}.panel-heading h2{font-size:27px;letter-spacing:-1px;font-weight:500;line-height:1.1;margin:0}.seat-counter{font-size:14px;background:#edf3e4;padding:8px 10px;border-radius:9px}.seat-counter span{font-size:10px;color:#8c9d82}label,legend{display:block;font-size:10px;color:#6a7865;margin:0 0 9px;font-weight:500}input:not([type=range]){width:100%;height:40px;border-radius:9px;border:1px solid #e0e5d8;background:#fbfcf6;color:var(--ink);padding:0 12px;font-size:12px;transition:border-color .15s}input::placeholder{color:#a2ac98;font-size:11px}input:focus{border-color:#99b88a;outline:none;box-shadow:0 0 0 3px #bcdbaf26}.color-picker{border:0;padding:0;margin:17px 0}.color-picker legend{padding:0;margin-bottom:10px}#colorOptions{display:flex;gap:9px}.color-option{width:24px;height:24px;border:3px solid var(--white);background:var(--color);border-radius:50%;position:relative;outline:1px solid transparent;outline-offset:2px}.color-option.selected{outline-color:var(--color)}.color-option.selected:after{content:'✓';font-size:10px;font-weight:700;color:#fff;position:absolute;inset:0;display:grid;place-items:center}.room-label{display:flex;justify-content:space-between;align-items:center}.room-label span{font-size:8px;color:#a1a997}#roomInput{text-transform:uppercase;letter-spacing:2px;font-size:14px}#roomInput::placeholder{text-transform:none;letter-spacing:0}.primary-button,.secondary-button{width:100%;display:flex;justify-content:center;align-items:center;gap:10px;min-height:43px;padding:12px 15px;font-size:11px;font-weight:600;border-radius:10px;border:1px solid var(--green);background:var(--green);color:#f5f7eb;transition:background .15s,transform .15s}.primary-button:hover:not(:disabled){background:#3a6653}.primary-button>span{font-size:17px;line-height:10px;margin-left:auto}.primary-button:active:not(:disabled){transform:translateY(1px)}#joinButton{margin-top:13px}.form-note{font-size:8px;line-height:1.5;color:#a0a994;margin:9px 0 0;text-align:center}.players-heading{display:flex;align-items:center;justify-content:space-between;margin-top:24px;margin-bottom:11px}.players-heading>span:first-child{font-size:8px;font-weight:700;letter-spacing:1px;color:#7e8c76}.players-heading>span+span{font-size:8px;color:#a1aa99}.players-list{display:grid;grid-template-columns:1fr 1fr;gap:6px}.player-seat{display:flex;gap:6px;align-items:center;min-width:0;border:1px dashed #e2e6d8;border-radius:8px;min-height:33px;padding:7px;font-size:9px;color:#afb6a7}.seat-number{font-variant-numeric:tabular-nums;font-size:8px;color:#b7bfae;flex-shrink:0}.player-seat.occupied{border-style:solid;border-color:#e3e8db;background:#fafbf5;color:#4b6149}.car-dot{width:7px;height:11px;background:var(--car-color);border:1px solid #00000015;border-radius:2px;flex-shrink:0;position:relative}.car-dot:after{content:'';position:absolute;left:1px;right:1px;top:2px;height:3px;background:#ffffff70;border-radius:1px}.player-seat .player-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1}.player-seat .player-mark{font-size:8px;flex-shrink:0;color:#5d8e59}.player-seat .host-mark{color:#a68c55}.player-seat.is-me{background:#edf4e5;border-color:#c8d9bd}.player-seat.is-offline{opacity:.5}.players-list.ranking{display:flex;flex-direction:column;gap:5px}.ranking .player-seat{min-height:36px;gap:10px;font-size:11px}.ranking .seat-number{font-size:12px;width:15px;color:#687a60}.ranking .player-mark{font-variant-numeric:tabular-nums;font-size:9px}.room-share{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border:1px solid #dce7d3;border-radius:10px;background:#f1f6e9}.room-share>div>span{display:block;font-size:7px;letter-spacing:1.5px;color:#8c9c7f;margin-bottom:6px}.room-share strong{font-size:21px;letter-spacing:4px;font-weight:500}.subtle-button{padding:8px;background:#fffef888;border:1px solid #dce5d2;border-radius:8px}.subtle-button svg{width:15px;height:15px}.room-note{font-size:9px;color:#8d9b81;line-height:1.6;margin:9px 0 0}.lobby-actions{margin-top:17px;display:flex;flex-direction:column;gap:8px}.secondary-button{background:#e5efdc;color:#45613b;border-color:#d6e4ca}.secondary-button.is-ready{background:#d6e8ca;color:#3c6335}.text-button{background:none;border:0;font-size:9px;color:#95a08a;padding:7px}.server-warning{display:flex;gap:8px;margin-top:20px;padding:11px 10px;border-radius:9px;background:#f7f0e1;border:1px solid #efe5cf;color:#8f805c}.warning-icon{width:13px;height:13px;flex-shrink:0;margin-top:1px;border:1px solid #ae9c74;border-radius:50%;font:italic 9px Georgia;display:grid;place-items:center}.server-warning strong{font-size:9px;font-weight:600}.server-warning p{font-size:8px;line-height:1.55;margin:4px 0 0;color:#a09270}.server-settings{border-top:1px solid #e8ebdf;margin-top:16px;padding-top:14px}.server-settings summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;font-size:9px;color:#93a087}.server-settings summary::-webkit-details-marker{display:none}.server-settings[open] summary{margin-bottom:14px}.server-settings label{font-size:8px}.server-settings input:not([type=range]){font-size:9px;height:33px;padding:0 8px}.server-settings input::placeholder{font-size:8px}.server-settings p{font-size:8px;color:#9aa68e;line-height:1.5;margin:8px 0 13px}.volume-label{display:flex;justify-content:space-between;margin:10px 0 4px}.server-settings input[type=range]{width:100%;accent-color:#7e9c68;height:15px}.bottom-note{display:flex;align-items:center;gap:15px;border-top:1px solid var(--line);margin-top:31px;padding:23px 0}.note-symbol{font-size:27px;font-weight:300;color:#94ab83}.bottom-note p{font-size:10px;color:#97a08e;line-height:1.6;margin:0}.bottom-note strong{font-weight:500;color:#6b7d60}.note-number{margin-left:auto;white-space:nowrap;font-size:8px;color:#9baa8e;letter-spacing:2px}footer{display:flex;justify-content:space-between;padding:0 0 26px;font-size:8px;color:#a2ab99}footer strong{font-weight:700;color:#7b8d6c;margin-left:4px}.countdown-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#e3efdc20;pointer-events:none}.countdown-overlay>span{font-size:11px;letter-spacing:3px;color:#244a3a;text-shadow:0 1px 10px #fff}.countdown-overlay>strong{font-size:128px;font-weight:600;line-height:1.2;color:#f8fff0;text-shadow:0 4px 0 #3e614999,0 10px 40px #25463250}.finish-overlay{position:absolute;inset:0;background:#182a2366;backdrop-filter:blur(8px);display:grid;place-items:center;padding:20px;z-index:5}.finish-panel{background:#fffef3f2;border:1px solid #ffffffc0;border-radius:22px;padding:26px;text-align:center;width:min(340px,100%);box-shadow:0 15px 50px #162f3120}.finish-panel .eyebrow{font-size:8px}.finish-panel h2{font-size:37px;font-weight:500;letter-spacing:-1.5px;margin:8px 0}.finish-panel>p{font-size:11px;color:#85947b;line-height:1.5}.finish-panel ol{list-style:none;padding:0;margin:18px 0;text-align:left}.finish-panel li{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #e4e9dc;font-size:11px}.finish-panel li>span:last-child{margin-left:auto;color:#7c8b73;font-size:10px}.finish-panel li>b{font-size:13px;width:17px;font-weight:500}.small{font-size:9px!important}.muted{color:#899680}.slip-indicator{position:absolute;top:42%;left:50%;transform:translate(-50%,-50%);padding:9px 14px;background:#f8dbadf0;color:#7e582b;font-size:12px;border-radius:25px;pointer-events:none}.touch-controls{display:none;justify-content:space-between;margin:10px 0;gap:10px}.touch-controls>div{display:flex;gap:8px}.touch-controls button{width:61px;height:50px;border-radius:12px;border:1px solid #d3deca;background:#e9efdf;font-size:24px;touch-action:none;user-select:none;-webkit-user-select:none}.touch-controls button.brake,.touch-controls button.accelerate{width:82px;font-size:9px;letter-spacing:1px}.touch-controls button.accelerate{background:#ccdfbc;border-color:#bed3ac}.touch-controls button.pressed{background:#9fbc8b;border-color:#7f9f6b;transform:translateY(1px)}dialog{width:min(490px,calc(100% - 32px));border:1px solid #e0e7d4;border-radius:24px;padding:32px;background:#fffef5;color:#344a37;box-shadow:0 30px 100px #142b3640}dialog::backdrop{background:#1c312a66;backdrop-filter:blur(4px)}dialog h2{font-size:30px;font-weight:500;letter-spacing:-1px;margin:12px 0}dialog>p{font-size:12px;line-height:1.7;color:#829176}.dialog-close{position:absolute;right:17px;top:13px;background:none;border:0;font-size:25px;color:#86937b}.rules-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:24px 0}.rules-grid>div{display:flex;flex-direction:column;gap:5px}.rules-grid strong{font-size:11px;font-weight:600}.rules-grid span{font-size:10px;color:#8a987e}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:13px 20px;max-width:calc(100% - 30px);border-radius:12px;background:#2c493df2;color:#f5f7ea;font-size:12px;line-height:1.5;box-shadow:0 5px 25px #20392e30;z-index:20;text-align:center}body.race-active .intro{padding-top:24px;padding-bottom:24px}body.race-active h1{font-size:38px}@keyframes pulse{50%{opacity:.4}}@media(min-width:1550px){.game-frame{height:620px}}@media(max-width:1200px){.page-shell{padding:0 28px}.game-layout{grid-template-columns:minmax(0,1fr) 280px;gap:18px}.lobby-panel{padding:20px}.game-frame{height:570px}.keyboard-guide>div>span{max-width:120px;line-height:1.5}.action-button{padding:9px 8px}.action-button strong{font-size:9px}.scene-caption{left:27px}.scene-caption h2{font-size:34px}.edition{display:none}h1{font-size:43px}.track-meta{font-size:8px}}@media(max-width:960px){.page-shell{padding:0 22px}.game-layout{grid-template-columns:minmax(0,1fr) 255px;gap:14px}.lobby-panel{padding:17px}.game-frame{height:520px}.scene-caption{top:104px;left:23px}.scene-caption h2{font-size:28px}.scene-caption p{font-size:9px}.minimap{width:106px;height:99px;right:16px}.minimap canvas{width:99px;height:79px}.minimap>span{font-size:6px}.keyboard-guide{display:none}.drive-controls{justify-content:center;padding:11px}.action-buttons{width:100%}.action-button{flex:1;justify-content:center}.track-meta>span:nth-child(2){display:none}.race-hud{gap:15px;left:17px}.race-hud strong{font-size:21px}.game-topline{left:17px;right:16px}.track-label{font-size:7px}.game-tools{gap:4px}.icon-button{width:28px;height:28px}.race-stamp{display:none}.intro{padding:30px 0 26px}h1{font-size:39px;letter-spacing:-2px}.intro-copy{font-size:12px}.header-right{gap:12px}.brand-sub{font-size:14px}.bottom-note p{font-size:9px}}@media(max-width:760px){.page-shell{padding:0 18px}.site-header{height:78px}.brand{font-size:23px;gap:10px}.brand-icon{width:32px;height:32px;border-radius:9px}.brand-icon i{height:20px;width:7px}.brand-icon i+i{height:13px}.brand-divider{margin:0 8px}.brand-sub{font-size:13px}.connection-badge{font-size:9px;padding:8px 10px}.intro{padding:26px 0 24px}.eyebrow{font-size:8px;letter-spacing:1.7px;margin-bottom:10px}h1{font-size:38px;letter-spacing:-2px}.intro-copy{font-size:11px;margin-top:11px}.game-layout{grid-template-columns:1fr;gap:22px}.game-frame{height:470px;border-radius:20px}.scene-caption{top:105px;left:27px}.scene-caption h2{font-size:35px}.scene-caption p{font-size:11px}.minimap{width:120px;height:105px;right:20px}.minimap canvas{width:113px;height:85px}.minimap>span{font-size:7px}.game-topline{left:20px;right:20px}.track-label{font-size:8px}.icon-button{width:31px;height:31px}.race-hud{left:22px;gap:23px;top:76px}.race-hud strong{font-size:26px}.keyboard-guide{display:flex}.keyboard-guide>div>span{max-width:none}.action-buttons{width:auto}.action-button{flex:none;padding:9px 12px}.drive-controls{justify-content:space-between}.lobby-panel{padding:24px}.panel-heading{margin-bottom:22px}.panel-heading h2{font-size:30px}.players-list{grid-template-columns:repeat(5,1fr)}.player-seat{padding:8px 6px;min-height:37px}.player-seat .seat-number{font-size:7px}.player-seat{font-size:8px}.players-list.ranking{display:grid;grid-template-columns:1fr 1fr}.ranking .player-seat{font-size:10px}.players-heading{margin-top:22px}.server-warning strong{font-size:10px}.server-warning p{font-size:9px}#joinForm{display:grid;grid-template-columns:1fr 1fr;gap:0 17px}#joinForm>label:first-child{grid-column:1;grid-row:1}#nameInput{grid-column:1;grid-row:2}.color-picker{grid-column:2;grid-row:1 / span 2;margin:0;align-self:start}.color-picker legend{margin-bottom:13px}#colorOptions{gap:7px}.color-option{width:24px;height:24px}.room-label{grid-column:1;grid-row:3;margin-top:18px}#roomInput{grid-column:1;grid-row:4}#joinButton{grid-column:2;grid-row:4;margin:0;min-height:40px}.form-note{grid-column:1 / -1}.server-settings{margin-top:13px}.server-settings summary{font-size:10px}.track-meta>span:nth-child(2){display:block}.track-meta{font-size:9px}.track-meta button{font-size:9px}.bottom-note{margin-top:25px;padding:19px 0}.bottom-note p{font-size:10px}.note-number{display:none}footer{font-size:8px;gap:20px;line-height:1.6}body.race-active h1{font-size:32px}body.race-active .intro-copy{display:none}body.race-active .intro{padding:19px 0}.view-hint{bottom:126px}.is-racing .view-hint{display:none}}
@media(max-width:520px){.page-shell{padding:0 14px}.brand-sub,.brand-divider{display:none}.brand{font-size:24px}.site-header{height:70px}h1{font-size:36px;line-height:1.12;letter-spacing:-1.8px}.mobile-break{display:block}.intro-copy{max-width:280px;line-height:1.65}.game-frame{height:430px}.scene-caption{left:22px;top:103px}.scene-caption h2{font-size:29px}.scene-caption p{font-size:10px}.minimap{top:72px;right:16px;width:100px;height:91px}.minimap canvas{width:95px;height:72px}.minimap>span{font-size:6px}.game-topline{left:15px;right:14px;top:16px}.game-tools{gap:4px}.icon-button{width:28px;height:28px}.track-label{font-size:7px;letter-spacing:1px;padding:8px 9px}.race-hud{left:17px;top:65px;gap:17px}.race-hud strong{font-size:23px}.race-hud>div>span{font-size:6px}.race-hud small{font-size:10px}.keyboard-guide{display:none}.action-buttons{width:100%;gap:8px}.action-button{flex:1;padding:9px;min-height:43px}.action-button strong{font-size:10px}.drive-controls{padding:9px}.touch-controls{display:flex}.track-meta{margin-top:15px;font-size:8px;gap:6px}.track-meta i{margin:0 3px}.track-meta button{font-size:8px}.track-meta>span:nth-child(2){font-size:7px}.lobby-panel{padding:21px}.players-list{grid-template-columns:repeat(2,1fr)}.player-seat{font-size:10px;min-height:34px;padding:8px 10px}.player-seat .seat-number{font-size:8px}#joinForm{display:block}.color-picker{margin:16px 0}.color-picker legend{margin-bottom:10px}#colorOptions{gap:13px}.color-option{width:26px;height:26px}.room-label{margin-top:0}#joinButton{margin-top:12px}.bottom-note{gap:10px}.bottom-note p{font-size:9px}.bottom-note strong{display:block}footer>span:last-child{max-width:120px;text-align:right}.view-hint{font-size:8px;bottom:113px}.finish-panel{padding:22px}.finish-panel h2{font-size:32px}dialog{padding:27px}.rules-grid{gap:16px 12px}body.race-active h1{font-size:30px}body.race-active .intro h1 br{display:none}body.race-active .intro h1 span{display:none}body.race-active .intro .eyebrow{margin-bottom:6px}body.race-active .intro{padding:17px 0}}
@media(pointer:coarse){.touch-controls{display:flex}.keyboard-guide>div>span{font-size:0}.keyboard-guide>div>span:after{content:'Управление кнопками под трассой';font-size:9px}.key-cluster{display:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

#soloButton{margin-top:14px;background:#e5efdb;border-color:#d3e1c8;color:#48643e;grid-column:1 / -1}#colorOptions{flex-wrap:wrap}.color-option{flex-shrink:0;padding:0}.touch-controls>div{min-width:0}.touch-controls button{flex-shrink:1;min-width:0}.touch-controls button.brake,.touch-controls button.accelerate{max-width:82px}.touch-controls>div:first-child{flex:1}.touch-controls>div:last-child{flex:1.25}.touch-controls button{width:50%;max-width:61px}.touch-controls>div:last-child button{width:50%}.game-frame:fullscreen .view-hint{display:none}@media(max-height:520px) and (orientation:landscape){body.race-active .site-header,body.race-active .intro,body.race-active .track-meta,body.race-active .bottom-note,body.race-active footer{display:none}body.race-active .page-shell{padding:8px}body.race-active .game-layout{grid-template-columns:minmax(0,1fr) 240px;gap:10px}body.race-active .game-frame{height:calc(100dvh - 125px);min-height:190px}body.race-active .game-topline{top:8px}body.race-active .race-hud{top:46px}body.race-active .minimap{top:46px;height:80px}body.race-active .minimap canvas{height:62px}body.race-active .drive-controls{position:absolute;right:265px;bottom:60px;padding:4px;background:#f6faedf0;z-index:2}body.race-active .action-button{min-height:30px;padding:5px 8px}body.race-active .action-button small{display:none}body.race-active .keyboard-guide{display:none}body.race-active .touch-controls{display:flex;margin:8px 0}body.race-active .lobby-panel{max-height:calc(100dvh - 16px);overflow:auto;padding:15px}body.race-active .view-hint{display:none}}

.drive-section:fullscreen{display:flex;flex-direction:column;height:100dvh;width:100%;padding:12px;background:var(--paper);gap:0}.drive-section:fullscreen .game-frame{height:auto;flex:1;min-height:150px}.drive-section:fullscreen .drive-controls{position:static;flex-shrink:0;margin-top:8px}.drive-section:fullscreen .touch-controls{flex-shrink:0;margin-bottom:0}.drive-section:fullscreen .track-meta{display:none}.drive-section:fullscreen .view-hint{display:none}.drive-section:fullscreen .action-buttons{width:auto}.drive-section:fullscreen .game-frame .race-hud{top:67px}.drive-section:fullscreen .minimap{top:67px}

.scene-play-button{pointer-events:auto;background:#345746;color:#f5f8e9;border:1px solid #456950;font-size:10px;padding:11px 14px;border-radius:9px;display:flex;gap:22px;align-items:center;margin-top:17px;box-shadow:0 3px 12px #3655431a}.scene-play-button:hover{background:#446953}.scene-play-button span{font-size:15px}.scene-caption{max-width:65%}@media(max-width:520px){.scene-play-button{font-size:9px;padding:9px 12px;margin-top:13px}.scene-caption h2{margin-top:19px;margin-bottom:11px}}

/* v2: authoritative driving effects, readable without covering the road. */
.hazard-statuses{position:absolute;top:130px;left:22px;display:flex;flex-direction:column;gap:6px;pointer-events:none;z-index:3;max-width:calc(100% - 170px)}.hazard-chip{display:flex;align-items:center;gap:7px;border:1px solid #ffffff70;border-radius:9px;padding:8px 10px;font-size:9px;box-shadow:0 2px 10px #243c2910;backdrop-filter:blur(7px)}.hazard-chip>span{font-size:14px;line-height:1}.hazard-chip strong{font-weight:500}.hazard-chip b{font-variant-numeric:tabular-nums;font-size:10px;margin-left:5px;white-space:nowrap}.damage-chip{color:#744932;background:#f2d5bfe8}.damage-chip>span{color:#584f43;font-size:9px}.water-chip{color:#375c66;background:#c7e5e8e8}.flight-chip{color:#596d35;background:#e0edbce8}.game-frame.is-damaged:after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 40px #aa553226;pointer-events:none;z-index:2}.game-frame.is-in-water:before{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 -25px 35px -22px #9ad6e4bb;pointer-events:none;z-index:2}.hazard-rules{border-top:1px solid #e1e7d6;padding-top:8px;margin-top:20px}.hazard-rules p{font-size:10px;color:#86957a;line-height:1.65}.hazard-rules strong{color:#536e49;font-weight:600;margin-right:5px}.rule-symbol{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:6px;margin-right:7px;font-size:14px}.ramp-symbol{background:#e4edc7;color:#7e974c}.water-symbol{background:#d6e9e9;color:#648b92}.damage-symbol{background:#eedbc8;color:#9d7b5b;font-size:8px}#rulesDialog{max-height:calc(100dvh - 28px);overflow-y:auto}@media(max-width:520px){.hazard-statuses{top:110px;left:16px;max-width:calc(100% - 135px);gap:4px}.hazard-chip{padding:6px 7px;font-size:7px;gap:5px}.hazard-chip b{font-size:8px;margin-left:0}.hazard-chip>span{font-size:11px}.damage-chip strong{max-width:98px}.hazard-chip.damage-chip>span{font-size:7px}}@media(max-height:520px) and (orientation:landscape){.hazard-statuses{top:90px;left:16px;gap:3px}.hazard-chip{padding:5px 8px;font-size:8px}.hazard-chip b{font-size:8px}}

/* v3 comfort and recovery states. */
.flip-chip{background:#e8ddd0ed;color:#765943}.drift-chip{background:#e7e7cbed;color:#6f7446}.motion-setting{display:flex;align-items:center;gap:9px;margin:16px 0 0;padding-top:12px;border-top:1px solid #e1e7d8;cursor:pointer}.motion-setting input[type=checkbox]{width:15px;height:15px;flex-shrink:0;accent-color:#65865c}.motion-setting>span{font-size:10px;color:#6a7d60;line-height:1.5}.motion-setting small{display:block;font-size:8px;color:#97a38d}.game-frame.is-flipping:after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 70px #65544233;pointer-events:none;z-index:2}@media(max-width:520px){.flip-chip strong{max-width:112px}.hazard-statuses{max-width:calc(100% - 130px)}.hazard-chip{padding:5px 7px}.flip-chip b{font-size:7px}}

/* V4 record tables: each source is intentionally separate. */
.records-section{margin:34px 0 0;padding:28px;border:1px solid var(--line,#dce1d3);border-radius:22px;background:#f9f9f1}.records-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.records-heading h2{font-size:27px;letter-spacing:-1px;margin:6px 0}.records-version,.records-source-note,.records-footnote{font-size:12px;line-height:1.6;color:#738477}.records-source{display:flex;gap:4px;padding:4px;border-radius:11px;background:#e9eddf;flex-shrink:0}.records-source button{border:0;padding:10px 13px;border-radius:8px;background:transparent;color:#62776a;font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}.records-source button.selected{background:#355a48;color:#f7faec}.records-source-note{max-width:800px;margin:15px 0}.records-storage-note{font-size:12px;line-height:1.6;background:#f5ead2;border:1px solid #e8d8b7;padding:10px 13px;border-radius:10px;color:#806a3f}.records-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}.records-card{min-width:0;background:#fffef6;border:1px solid #dfe5d7;border-radius:14px;overflow:hidden}.records-card>div:first-child{display:flex;align-items:center;gap:12px;padding:17px 18px;border-bottom:1px solid #e6eadd}.records-card h3{font-size:16px;margin:0}.records-card>div>span{font-size:12px;color:#89a080}.records-card small{margin-left:auto;color:#7b8a79;font-size:9px;letter-spacing:1px}.records-scroll{overflow:auto;max-height:370px}.records-card table{width:100%;border-collapse:collapse;min-width:470px;text-align:left;font-size:11px}.records-card th{font-weight:500;font-size:10px;color:#85917e;background:#f5f7ed;position:sticky;top:0}.records-card th,.records-card td{padding:11px 12px;border-bottom:1px solid #edf0e5;white-space:nowrap}.records-card td:nth-child(2){max-width:130px;overflow:hidden;text-overflow:ellipsis}.records-card td:nth-child(3){font-variant-numeric:tabular-nums;color:#315a42;font-weight:700}.records-card td:nth-child(4),.records-card td:nth-child(5){color:#80907d;font-size:10px}.records-card .records-empty{padding:27px 18px;white-space:normal;color:#86947f}.records-footnote{margin:13px 0 0;font-size:10px}@media(max-width:900px){.records-grid{grid-template-columns:1fr}.records-heading{align-items:flex-start}.records-section{padding:20px}}@media(max-width:560px){.records-section{padding:16px;margin-top:22px}.records-heading{flex-direction:column;gap:10px}.records-source{width:100%}.records-source button{flex:1;font-size:11px;padding:10px 7px}.records-heading h2{font-size:24px}.records-card table{min-width:450px}}

.camera-mode-button{position:absolute;right:14px;bottom:13px;z-index:4;max-width:270px;padding:7px 9px;border:1px solid #e8f0da55;border-radius:7px;background:#2d453de6;color:#eaf3de;font-size:8px;line-height:1.4;text-align:right;backdrop-filter:blur(5px)}.camera-mode-button[aria-pressed=true]{background:#eff4dce8;color:#526749;border-color:#a6b89b}@media(max-width:520px){.camera-mode-button{max-width:184px;right:9px;bottom:9px;font-size:7px;padding:5px 7px}}

/* V5 warnings use explicit text and a symbol, with no flashing. */
.roll-warning-chip{background:#a92b34f2;border-color:#ffd7c2;color:#fff8ed;box-shadow:0 2px 14px #70252d28;align-items:flex-start}.roll-warning-chip>span{font-size:19px}.roll-warning-chip strong{display:block;font-size:9px;font-weight:800;letter-spacing:.2px}.roll-warning-chip small{display:block;font-size:8px;line-height:1.5;margin-top:4px;color:#ffe0cf}.roll-warning-chip b{padding-top:2px;font-size:11px}.game-frame.has-roll-warning:after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 45px #a5273433;pointer-events:none;z-index:2}.slip-indicator{display:flex;align-items:center;gap:10px}.slip-indicator b{font-variant-numeric:tabular-nums;color:#fff1bf}.oil-symbol{background:#d4ddce;color:#526450}@media(max-width:520px){.roll-warning-chip strong{font-size:7px;max-width:110px}.roll-warning-chip small{font-size:6px;max-width:100px}.roll-warning-chip>span{font-size:13px}.roll-warning-chip b{font-size:8px}.action-button small{font-size:7px}}

@media(max-width:520px){.roll-warning-chip{flex-wrap:wrap;gap:4px}.roll-warning-chip>div{flex:1;min-width:0}.roll-warning-chip strong{font-size:7px;max-width:none;overflow-wrap:anywhere}.roll-warning-chip b{margin-left:17px;flex-basis:100%;padding-top:0}}

.track-picker{padding:15px 0 18px;margin-bottom:18px;border-top:1px solid #e1e7d8;border-bottom:1px solid #e1e7d8}.track-picker label{display:block;font-size:10px;color:#5c735f;font-weight:600;margin-bottom:8px}.track-picker select{display:block;width:100%;min-width:0;padding:12px 10px;background:#fafbf0;color:#355642;border:1px solid #cdd9c6;border-radius:9px;font:inherit;font-size:12px}.track-picker select:disabled{opacity:.65}.track-picker p{font-size:10px;line-height:1.55;color:#7a8c74;margin:10px 0 6px}.track-picker small{display:block;font-size:8px;line-height:1.5;color:#98a28c}.track-attribution{font-size:9px;line-height:1.6;color:#80917e;margin:12px 2px 0;overflow-wrap:anywhere}.drive-section:fullscreen .track-attribution{display:none}

.track-attribution a{text-decoration:underline;text-underline-offset:2px;color:#56776b}.track-attribution a:hover{color:#234e3d}

.bus-warning-chip{background:#f6dfaeed;color:#674827;border-color:#fff2d0}.bus-warning-chip strong{font-weight:700;letter-spacing:.03em}.bus-warning-chip small{display:block;margin-top:3px;font-size:8px;line-height:1.3}.bus-symbol{background:#f4dfb4;color:#88632c}@media(max-width:520px){.bus-warning-chip small{font-size:7px}.bus-warning-chip b{font-size:7px}}

.graphics-error{border:1px solid #d9b9a0;background:#fff2df;color:#724f3b;border-radius:12px;padding:15px 18px;margin-bottom:12px;line-height:1.55}.graphics-error strong{display:block;font-size:13px}.graphics-error p{margin:5px 0 0;font-size:11px}.drive-section:fullscreen .graphics-error{flex:none;margin:8px 12px 0;max-width:900px}@media(max-width:520px){.graphics-error{padding:12px}.graphics-error strong{font-size:11px}.graphics-error p{font-size:10px}}

/* v8: a single, bounded warm blast pulse, never a strobe. */
.explosion-flash{position:absolute;inset:0;background:#ffe2a5;z-index:8;pointer-events:none;border-radius:inherit;opacity:0}.tunnel-chip{background:#d8e8dfed;color:#38574a}.bomb-chip{background:#f2d5b8ed;color:#6a4834}.action-buttons{min-width:0}.action-button{min-width:0}.action-button>span{min-width:0}.bomb-button{background:#eee4d0}@media(max-width:520px){.action-buttons{gap:5px}.action-button{padding:8px 5px;gap:5px}.action-button strong{font-size:9px}.action-button small{font-size:6px;letter-spacing:0;white-space:nowrap}.action-button .action-icon,.action-button svg{width:17px;font-size:21px;flex-shrink:0}.drive-section:fullscreen .action-buttons{width:100%}}
