#view-drive{--drive-blue:#176e9b;--drive-ink:#163f58;--drive-muted:#53778b}.drive-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:22px}.drive-heading h1{font-size:clamp(33px,4vw,49px);letter-spacing:-.055em;margin:0 0 10px}.drive-heading p{font-size:13px;margin:0;color:var(--drive-muted);line-height:1.6;max-width:52ch}.drive-progress-button{white-space:nowrap;font-size:12px;border-color:#a5c4d6;background:#f7fcff}.drive-stage{position:relative;height:min(72vh,760px);min-height:540px;overflow:hidden;border-radius:24px;border:1px solid #a6c1ce;background:#b7d1de;isolation:isolate;box-shadow:0 18px 65px #173f5820}.drive-canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;outline:0}.drive-canvas:focus-visible{outline:3px solid #329ac9;outline-offset:-3px}.drive-glass{background:#f3fbfff0;border:1px solid #fff9;backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);box-shadow:0 6px 24px #23495b19;color:var(--drive-ink)}.drive-target{position:absolute;top:18px;left:18px;max-width:330px;padding:14px 16px;border-radius:16px;display:flex;align-items:center;gap:12px;pointer-events:none}.drive-target-icon{width:38px;height:38px;border-radius:12px;background:#d8edf9;color:#1671a0;display:grid;place-items:center;font-size:22px;flex:none}.drive-target small{font-size:10px;letter-spacing:.04em;color:#587e92;display:block;margin:0 0 4px}.drive-target strong{font-weight:600;font-size:13px;display:block}.drive-target p{font-size:11px;margin:4px 0 0;line-height:1.4;color:#567c92}.drive-tools{position:absolute;right:18px;top:18px;display:flex;gap:7px}.drive-tools button{height:42px;min-height:42px;padding:0 13px;border-radius:13px;font-size:12px}.drive-tools .drive-help-button{width:42px;padding:0;font-size:17px}.drive-map{position:absolute;right:18px;bottom:18px;width:188px;height:202px;padding:9px 10px 5px;border-radius:18px;pointer-events:none}.drive-map canvas{width:166px;height:166px;display:block}.drive-map-label{display:flex;justify-content:space-between;font-size:9px;color:#51758a;padding:3px 2px}.drive-map-label span:first-child{font-weight:700}.drive-telemetry{position:absolute;bottom:20px;left:20px;display:flex;align-items:end;gap:17px;pointer-events:none}.drive-speed{width:92px;height:92px;border-radius:22px;padding:11px 15px;background:#f6fcfff2;display:flex;flex-direction:column;justify-content:center;box-shadow:0 5px 25px #173e5933}.drive-speed b{font-size:35px;line-height:1.1;font-weight:500;letter-spacing:-.06em;font-variant-numeric:tabular-nums}.drive-speed small{font-size:10px;color:#58788b;margin-top:3px}.drive-keyboard{background:#f6fcffdf;padding:11px 15px;border-radius:13px;font-size:10px;color:#3b6278;line-height:1.8}.drive-keyboard kbd{font:inherit;font-weight:700;color:#173f5a}.drive-hint{position:absolute;left:50%;bottom:32px;transform:translateX(-50%);max-width:420px;width:max-content;text-align:center;background:#183e56e8;color:white;border-radius:12px;padding:10px 15px;font-size:11px;pointer-events:none;line-height:1.5}.drive-overlay{position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;padding:24px;background:#20405f40;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.drive-start,.drive-pause-card{max-width:440px;width:100%;padding:30px;border-radius:22px;background:#f4fbfff5;box-shadow:0 18px 80px #173f5830;border:1px solid #fff}.drive-start h2,.drive-pause-card h2{font-size:29px;letter-spacing:-.045em;margin:0 0 13px}.drive-start p,.drive-pause-card p{font-size:13px;color:#54778b;line-height:1.7;margin-bottom:20px}.drive-start-controls{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:17px 0 23px;border-top:1px solid #c8dfe9;font-size:11px;color:#466c81}.drive-start-controls strong{display:block;color:#193f57;margin-bottom:5px;font-size:12px}.drive-start .primary,.drive-pause-card .primary{width:100%;background:#176e9b;border-color:#176e9b}.drive-task-dialog{position:absolute;z-index:12;left:50%;bottom:20px;transform:translateX(-50%);width:min(520px,calc(100% - 36px));max-height:calc(100% - 110px);overflow:auto;padding:23px;background:#f7fcfff5;border:1px solid #fff;border-radius:22px;box-shadow:0 14px 70px #163e5659;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}.drive-task-dialog .drive-task-kicker{display:flex;justify-content:space-between;gap:16px;color:#55798e;font-size:10px;margin-bottom:10px}.drive-task-dialog h2{font-size:22px;margin:0 0 10px;letter-spacing:-.035em}.drive-task-dialog p{font-size:12px;line-height:1.7;margin-bottom:15px;color:#436b82}.drive-options{display:grid;gap:8px}.drive-options button{text-align:left;border-radius:12px;background:#fff;border-color:#c1d9e6;font-size:12px;line-height:1.5;padding:12px 14px;display:flex;gap:10px;align-items:start;min-height:46px}.drive-options b{font-weight:500;font-size:10px;border-radius:6px;background:#e7f1f7;color:#57829a;line-height:19px;width:19px;text-align:center;flex:none}.drive-feedback-tag{font-size:11px;font-weight:700;color:#2a765e;margin-bottom:10px}.drive-feedback-tag.wrong{color:#a14936}.drive-task-dialog .drive-source{font-size:10px;display:inline-block;color:#588399;margin-bottom:17px}.drive-task-dialog>.primary{display:block;width:100%;background:#176e9b;border-color:#176e9b;font-size:12px}.drive-task-dialog>.primary:disabled{opacity:.65}.drive-task-dialog.is-feedback{width:min(450px,calc(100% - 36px));left:20px;transform:none;bottom:20px}.drive-list{position:absolute;z-index:15;inset:0 0 0 auto;width:min(365px,100%);padding:22px;background:#f4fbfff5;overflow:auto;backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);box-shadow:-12px 0 50px #173e5633}.drive-list-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.drive-list-head h2{font-size:23px;margin:0}.drive-list-head button{width:40px;height:40px;min-height:40px;padding:0;font-size:23px;background:transparent}.drive-list p{font-size:11px;color:#5b7f94;line-height:1.6;margin-bottom:18px}.drive-mission-choice{display:flex;width:100%;align-items:center;gap:11px;text-align:left;border-radius:13px;padding:12px;margin:0 0 8px;background:#fff;border-color:#d1e3ed}.drive-mission-choice[aria-pressed=true]{border-color:#3a8eb7;background:#e6f4fc}.drive-mission-choice>span{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:10px;background:#deeff8;color:#23799e;font-size:11px}.drive-mission-choice strong{display:block;font-size:12px;font-weight:600}.drive-mission-choice small{font-size:10px;display:block;margin-top:5px;color:#628399}.drive-touch{position:absolute;inset:0;pointer-events:none;display:none}.drive-joystick{position:absolute;left:22px;bottom:25px;width:116px;height:116px;border:1px solid #ffffffa6;background:#effaff69;border-radius:50%;pointer-events:auto;touch-action:none;user-select:none;box-shadow:0 8px 30px #173f5824}.drive-joystick::before{content:'РУЛЬ';position:absolute;left:0;right:0;text-align:center;top:11px;font-size:8px;letter-spacing:.08em;color:#486c80}.drive-joystick span{position:absolute;top:32px;left:32px;width:50px;height:50px;border-radius:50%;background:#f2fbfff0;border:1px solid #fff;box-shadow:0 3px 15px #24557133;pointer-events:none}.drive-pedals{position:absolute;right:22px;bottom:24px;display:flex;align-items:end;gap:10px;pointer-events:auto}.drive-pedal{width:67px;height:90px;min-height:0;padding:0;border-radius:17px;touch-action:none;user-select:none;background:#ecf8ffde;border-color:#fff;font-size:10px;box-shadow:0 6px 24px #173e5626}.drive-pedal[data-pedal=gas]{height:109px;background:#2178a5e8;border-color:#91cbe2;color:white}.drive-pedal[data-held=true]{background:#b8e0f1}.drive-pedal[data-pedal=gas][data-held=true]{background:#0b5a83}.drive-reverse{position:absolute;right:24px;bottom:145px;pointer-events:auto;min-height:36px;padding:7px 12px;font-size:10px;background:#edf8ffed;border-radius:11px;touch-action:none}.drive-touch-instruction{display:none}.drive-reduced-note{font-size:10px;color:#648497;margin:11px 2px 0}.drive-unavailable{padding:40px;background:#eff8fc;border-radius:20px}.drive-unavailable p{font-size:13px}
@media(hover:hover) and (pointer:fine){.drive-tools button:enabled:hover,.drive-progress-button:enabled:hover{background:#fff}.drive-mission-choice:enabled:hover:not([aria-pressed=true]){background:#edf7fd}.drive-options button:enabled:hover{border-color:#468eaf;background:#f0faff}}
@media(max-width:900px){.drive-keyboard{display:none}.drive-hint{max-width:250px;font-size:10px}.drive-stage{height:72vh}}
@media(pointer:coarse),(max-width:700px){.drive-touch{display:block}.drive-keyboard,.drive-desktop-instruction{display:none}.drive-touch-instruction{display:inline}.drive-heading{align-items:center;margin-bottom:15px}.drive-heading h1{font-size:32px;margin-bottom:8px}.drive-heading p{font-size:11px;max-width:30ch}.drive-progress-button{font-size:10px;padding:10px 13px;min-height:40px}.drive-stage{height:calc(100svh - 220px);min-height:560px;border-radius:20px}.drive-target{left:12px;top:12px;padding:11px;gap:8px;max-width:calc(100% - 143px);min-height:70px}.drive-target-icon{width:28px;height:34px;font-size:18px}.drive-target small{font-size:8px}.drive-target strong{font-size:11px}.drive-target p{font-size:9px}.drive-tools{top:12px;right:12px;gap:5px}.drive-tools button{padding:0 10px;min-height:36px;height:36px;font-size:10px}.drive-tools .drive-help-button{display:none}.drive-map{top:60px;bottom:auto;right:12px;width:118px;height:130px;padding:5px;border-radius:13px}.drive-map canvas{width:108px;height:108px}.drive-map-label{font-size:7px;padding:2px 3px}.drive-telemetry{bottom:175px;left:24px}.drive-speed{width:69px;height:64px;border-radius:15px;padding:8px 12px}.drive-speed b{font-size:27px}.drive-speed small{font-size:8px}.drive-hint{bottom:157px;max-width:calc(100% - 135px);font-size:9px;padding:8px 10px;left:auto;right:12px;transform:none}.drive-task-dialog{bottom:12px;max-height:calc(100% - 100px);padding:18px;width:calc(100% - 24px)}.drive-task-dialog h2{font-size:20px}.drive-task-dialog p{font-size:11px;margin-bottom:12px}.drive-options button{font-size:11px;padding:11px 12px}.drive-task-dialog.is-feedback{left:12px;bottom:12px;width:calc(100% - 24px)}.drive-start,.drive-pause-card{padding:23px}.drive-start h2,.drive-pause-card h2{font-size:26px}.drive-start p{font-size:12px}.drive-overlay{padding:16px}.drive-reduced-note{font-size:9px}.drive-joystick{left:18px;bottom:22px}.drive-pedals{right:18px;bottom:22px}.drive-reverse{right:20px;bottom:144px}}
@media(max-width:420px){.drive-heading p{max-width:24ch}.drive-target-icon{display:none}.drive-target{max-width:calc(100% - 137px)}.drive-joystick{width:104px;height:104px}.drive-joystick span{top:27px;left:27px}.drive-pedal{width:60px}.drive-pedals{gap:8px}.drive-target strong{font-size:10px}.drive-target p{font-size:8px}.drive-hint{max-width:calc(100% - 120px)}}
@media(max-height:600px) and (orientation:landscape){.drive-heading{display:none}.drive-stage{height:calc(100svh - 120px);min-height:350px}.drive-target{max-width:280px}.drive-map{display:none}.drive-joystick{width:98px;height:98px;left:18px;bottom:16px}.drive-joystick span{left:24px;top:24px}.drive-telemetry{bottom:20px;left:135px}.drive-pedal{height:70px}.drive-pedal[data-pedal=gas]{height:83px}.drive-reverse{bottom:112px}.drive-hint{bottom:14px;right:180px;max-width:240px}.drive-task-dialog{max-height:calc(100% - 25px);bottom:12px;width:450px}.drive-target{font-size:10px}.drive-task-dialog.is-feedback{width:390px;max-height:calc(100% - 25px)}}
@media(prefers-reduced-transparency:reduce){.drive-glass,.drive-task-dialog,.drive-list,.drive-start,.drive-pause-card{background:#f4fbff;backdrop-filter:none;-webkit-backdrop-filter:none}.drive-overlay{backdrop-filter:none;-webkit-backdrop-filter:none}}
/* The city is a playable workspace: keep the complete viewport above the fold. */
body[data-view=drive] main{max-width:none;padding:0 16px 16px;min-height:0}body[data-view=drive] .drive-heading{height:40px;margin:0 4px 10px;align-items:center}body[data-view=drive] .drive-heading h1{font-size:24px;line-height:1.1;letter-spacing:-.04em;margin:0}body[data-view=drive] .drive-heading p,body[data-view=drive] .drive-reduced-note{display:none}body[data-view=drive] .drive-stage{height:calc(100svh - 140px);height:calc(100dvh - 140px);min-height:360px;max-height:none}body[data-view=drive] .drive-progress-button{min-height:36px;font-size:11px;padding:8px 14px}
@media(max-width:850px){body[data-view=drive] main{padding:0 10px 10px}body[data-view=drive] .drive-heading{height:38px;margin:0 4px 8px}body[data-view=drive] .drive-stage{height:calc(100svh - 164px);height:calc(100dvh - 164px);min-height:360px;border-radius:18px}}
@media(max-width:420px){body[data-view=drive] .drive-heading h1{font-size:23px}body[data-view=drive] .drive-stage{height:calc(100svh - 157px);height:calc(100dvh - 157px);min-height:360px}}
@media(max-height:650px) and (max-width:700px){body[data-view=drive] .drive-target{padding:8px;min-height:56px}body[data-view=drive] .drive-target p{display:none}body[data-view=drive] .drive-map{top:55px;width:95px;height:105px;padding:4px}body[data-view=drive] .drive-map canvas{width:85px;height:85px}body[data-view=drive] .drive-joystick{width:94px;height:94px;bottom:15px;left:13px}body[data-view=drive] .drive-joystick span{width:44px;height:44px;left:25px;top:25px}body[data-view=drive] .drive-pedals{right:13px;bottom:15px;gap:7px}body[data-view=drive] .drive-pedal{width:55px;height:70px}body[data-view=drive] .drive-pedal[data-pedal=gas]{height:86px}body[data-view=drive] .drive-reverse{right:14px;bottom:111px;min-height:31px;padding:6px 9px;font-size:9px}body[data-view=drive] .drive-telemetry{left:16px;bottom:122px}body[data-view=drive] .drive-speed{width:61px;height:53px;padding:7px 10px}body[data-view=drive] .drive-speed b{font-size:23px}body[data-view=drive] .drive-hint{bottom:145px;right:12px;font-size:8px;padding:6px 8px;max-width:calc(100% - 105px)}body[data-view=drive] .drive-start{padding:17px}body[data-view=drive] .drive-start h2{font-size:23px;margin-bottom:9px}body[data-view=drive] .drive-start p{font-size:10px;line-height:1.6;margin-bottom:11px}body[data-view=drive] .drive-start-controls{font-size:9px;padding:11px 0 14px;gap:10px}body[data-view=drive] .drive-start-controls strong{font-size:10px}body[data-view=drive] .drive-task-dialog{max-height:calc(100% - 20px);bottom:10px;padding:15px}body[data-view=drive] .drive-task-dialog h2{font-size:18px}body[data-view=drive] .drive-task-dialog p{font-size:10px;line-height:1.6}body[data-view=drive] .drive-options button{font-size:10px;padding:9px 10px;min-height:42px}}
@media(max-height:600px) and (orientation:landscape){body[data-view=drive] .drive-heading{display:none}body[data-view=drive] .drive-stage{height:calc(100svh - 73px);height:calc(100dvh - 73px);min-height:300px}}
/* Run penalties belong to this drive; saved learning achievements remain separate. */
.drive-run-status{position:absolute;left:19px;top:113px;display:flex;gap:16px;padding:9px 13px;border-radius:12px;pointer-events:none;font-size:10px;color:#56798e}.drive-run-status span{display:flex;gap:7px;align-items:center}.drive-run-status b{font-size:12px;color:#204a62;font-weight:600;font-variant-numeric:tabular-nums}.drive-start .drive-fine-note{font-size:10px;line-height:1.5;color:#668393;margin:-5px 0 17px}.drive-accepted-choice{padding:8px 11px;background:#e9f3f8;border-radius:10px;font-size:10px!important;color:#4b7288!important;margin-bottom:12px!important}.drive-list-restart{width:100%;margin-top:13px;font-size:11px;background:#e9f3f9;border-color:#a8c9da}.drive-mission-choice:disabled{opacity:.67;cursor:default}.drive-gameover{z-index:20;background:#18394770;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.drive-gameover-card{width:min(440px,100%);max-height:100%;overflow:auto;border-radius:22px;background:#fbfaf6f7;border:1px solid #fff;padding:28px;color:#294958;box-shadow:0 15px 75px #142f4d55}.drive-gameover-kicker{display:block;color:#a35e4d;font-weight:700;font-size:10px;letter-spacing:.12em;margin-bottom:12px}.drive-gameover-card h2{font-size:29px;margin:0 0 14px;letter-spacing:-.04em}.drive-gameover-card p{font-size:12px;line-height:1.75;color:#586f7b;margin-bottom:17px}.drive-run-results{display:flex;justify-content:space-between;gap:15px;padding:16px 0;margin-bottom:14px;border-top:1px solid #d7dfe0;border-bottom:1px solid #d7dfe0}.drive-run-results span{font-size:10px;color:#6d7f87}.drive-run-results b{display:block;font-size:25px;color:#304e60;font-weight:500;margin-top:7px;letter-spacing:-.04em}.drive-gameover-card .primary{display:block;width:100%;background:#285f7b;border-color:#285f7b}.drive-gameover-card .drive-source{display:block;font-size:10px;margin-bottom:16px;color:#657e8e}.drive-gameover-card>small{display:block;font-size:9px;line-height:1.6;margin-top:13px;color:#788b93}.drive-stage.is-game-over{border-color:#bd998a}
@media(pointer:coarse),(max-width:700px){.drive-run-status{left:12px;top:94px;gap:11px;padding:8px 10px;font-size:8px}.drive-run-status b{font-size:10px}.drive-gameover-card{padding:23px}.drive-gameover-card h2{font-size:26px}.drive-gameover-card p{font-size:11px}.drive-start .drive-fine-note{font-size:9px;margin-bottom:14px}.drive-run-results{padding:12px 0}.drive-run-results b{font-size:23px}}
@media(max-height:650px) and (max-width:700px){.drive-run-status{top:79px;padding:7px 9px;gap:9px;font-size:7px}.drive-run-status span{gap:5px}.drive-run-status b{font-size:9px}.drive-start .drive-fine-note{font-size:8px;margin:0 0 11px}.drive-gameover-card{padding:18px}.drive-gameover-kicker{font-size:9px;margin-bottom:8px}.drive-gameover-card h2{font-size:23px;margin-bottom:10px}.drive-gameover-card p{font-size:10px;line-height:1.6;margin-bottom:12px}.drive-run-results{padding:10px 0;margin-bottom:11px}.drive-run-results b{font-size:21px;margin-top:4px}.drive-gameover-card>small{font-size:8px;margin-top:9px}}
@media(max-height:600px) and (orientation:landscape){.drive-run-status{left:19px;top:95px}.drive-gameover-card{max-width:430px;padding:19px}.drive-gameover-card h2{font-size:24px}.drive-gameover-card p{font-size:10px;line-height:1.55;margin-bottom:10px}.drive-run-results{padding:8px 0;margin-bottom:8px}}
@media(max-height:520px) and (orientation:landscape){body[data-view=drive] main{padding:0 10px 8px}body[data-view=drive] .drive-heading{display:none}body[data-view=drive] .drive-stage{height:calc(100svh - 69px);height:calc(100dvh - 69px);min-height:240px}.drive-gameover-card{max-height:100%;overflow:auto}}
/* Leave the car visible while the accepted action is being demonstrated. */
.drive-stage:has(.drive-task-dialog.is-demonstrating:not([hidden])) .drive-hint{display:none}
@media(max-width:700px){.drive-task-dialog.is-demonstrating{top:195px;bottom:auto;left:12px;right:12px;max-height:105px;padding:13px 16px;pointer-events:none}.drive-task-dialog.is-demonstrating>p,.drive-task-dialog.is-demonstrating>a,.drive-task-dialog.is-demonstrating>button{display:none}.drive-task-dialog.is-demonstrating h2{font-size:19px;margin:7px 0 0}.drive-task-dialog.is-demonstrating .drive-feedback-tag{font-size:10px}.drive-stage:has(.drive-task-dialog.is-demonstrating:not([hidden])) .drive-map{visibility:hidden}}
@media(max-width:700px) and (max-height:650px){.drive-task-dialog.is-demonstrating{top:112px;padding:11px 14px;max-height:85px}}
