.custom-scenario[hidden]{display:none!important}
.custom-scenario{--custom-border:rgba(255,255,255,.2);position:fixed;inset:0;z-index:180;color:#fff;pointer-events:none;font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif;font-size:13px;text-shadow:none}
.custom-scenario *{box-sizing:border-box}
.custom-scenario button,.custom-scenario input,.custom-scenario select{font:inherit;color:inherit;border:1px solid var(--custom-border);border-radius:0;background:#111315;box-shadow:none}
.custom-scenario button{padding:10px 12px;cursor:pointer;line-height:1.3;transition:background .15s,border-color .15s}
.custom-scenario button:hover:not(:disabled){background:#292b2d;border-color:#fff}
.custom-scenario button:focus-visible,.custom-scenario input:focus-visible,.custom-scenario select:focus-visible,.custom-scenario summary:focus-visible{outline:2px solid #fff;outline-offset:3px}
.custom-scenario button:disabled{opacity:.4;cursor:default}
.custom-scenario input,.custom-scenario select{width:100%;min-width:0;padding:10px;min-height:38px}
.custom-scenario select{color-scheme:dark}
.custom-scenario option{background:#111315;color:#fff}
.custom-scenario label{display:block;min-width:0}
.custom-scenario label>span{display:block;color:#b5b7ba;font-size:11px;margin-bottom:7px;line-height:1.3}
.custom-scenario h1,.custom-scenario h2,.custom-scenario p{margin:0}
.custom-scenario small{display:block;color:#a6aaae;font-size:11px;line-height:1.6}
.custom-scenario-header{position:absolute;left:0;top:0;right:0;display:flex;align-items:center;justify-content:space-between;padding:22px 32px;background:linear-gradient(#080a0cee, #080a0cc9);border-bottom:1px solid var(--custom-border);pointer-events:auto}
.custom-scenario-header>div>span{font-size:10px;letter-spacing:3px;color:#a5a8ac}
.custom-scenario-header h1{font-size:26px;line-height:1.3;margin:6px 0}
.custom-scenario-header p{font-size:12px;color:#b9bec3}
.custom-scenario-header button{align-self:flex-start;min-width:72px}
.custom-scenario-preview-note{position:absolute;left:32px;top:142px;max-width:calc(100vw - 470px);padding:12px 16px;background:#080a0c99;border-left:2px solid #fff}
.custom-scenario-preview-note b{font-size:11px;letter-spacing:1.3px}
.custom-scenario-preview-note small{margin-top:7px}
.custom-scenario-controls{pointer-events:auto;position:absolute;right:24px;top:139px;bottom:24px;width:370px;display:flex;flex-direction:column;border:1px solid var(--custom-border);background:rgba(10,12,14,.95);box-shadow:0 16px 60px #0004}
.custom-scenario-fields{overflow:auto;min-height:0;overscroll-behavior:contain;padding:0 20px 16px;scrollbar-width:thin;scrollbar-color:#555 #15171a}
.custom-scenario-fields section{padding:19px 0;border-bottom:1px solid var(--custom-border)}
.custom-scenario h2{font-size:12px;font-weight:600;letter-spacing:.7px;margin-bottom:14px}
.custom-scenario-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.custom-scenario-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.custom-scenario-number{display:flex;align-items:center;position:relative}
.custom-scenario-number input{padding-right:33px;font-variant-numeric:tabular-nums}
.custom-scenario-number input::-webkit-inner-spin-button{appearance:none}
.custom-scenario-number em{position:absolute;right:8px;font-style:normal;color:#818990;font-size:10px;pointer-events:none}
.custom-scenario input.custom-scenario-altitude{height:22px;min-height:0;padding:0;margin:13px 0 7px;accent-color:#fff;background:transparent;border:0}
.custom-scenario-clearance{display:flex;justify-content:space-between;font-size:11px;color:#a6aaae;margin-bottom:10px}
.custom-scenario-clearance output{color:#fff;font-variant-numeric:tabular-nums}
.custom-scenario-templates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.custom-scenario-templates button{font-size:12px;padding:10px 7px;text-align:left}
.custom-scenario-templates button.active{background:#fff;color:#090b0d;border-color:#fff}
.custom-scenario-templates button.active:hover:not(:disabled){background:#e5e5e5}
.custom-scenario details{border-bottom:1px solid var(--custom-border)}
.custom-scenario details section{border-bottom:0;padding:8px 0 18px}
.custom-scenario summary{padding:18px 0;cursor:pointer;font-size:12px;font-weight:600;list-style:none;display:flex;justify-content:space-between}
.custom-scenario summary::after{content:"+";font-weight:400;font-size:16px}
.custom-scenario details[open]>summary::after{content:"−"}
.custom-scenario summary::-webkit-details-marker{display:none}
.custom-scenario-attitudes{display:flex;gap:5px;margin:12px 0 9px}
.custom-scenario-attitudes button{flex:1;padding:8px 5px;font-size:11px}
.custom-scenario-grid+small{margin-top:10px}
.custom-scenario-route-label{margin-top:13px}
.custom-scenario-toggle{display:flex!important;align-items:center;gap:9px;margin:15px 0 6px}
.custom-scenario-toggle input{width:16px;height:16px;min-height:0;accent-color:#fff;margin:0}
.custom-scenario-toggle span{color:#fff!important;margin:0!important;font-size:12px!important}
.custom-scenario-preset-actions{display:flex;gap:6px;margin:8px 0 16px}
.custom-scenario-presets>[data-action="save"]{width:100%;margin-top:8px}
.custom-scenario-save-status{margin:8px 0}
.custom-scenario-footer{flex-shrink:0;border-top:1px solid var(--custom-border);padding:14px 20px;background:#0d0f11}
.custom-scenario-footer .custom-scenario-start{width:100%;padding:14px;background:#fff;color:#080a0c;font-size:14px;font-weight:600;border-color:#fff}
.custom-scenario-footer .custom-scenario-start:hover:not(:disabled){background:#e5e5e5}
.custom-scenario-footer>small{margin-top:8px;font-size:10px}
.custom-scenario-validation{max-height:112px;overflow:auto;margin-bottom:10px;font-size:11px;color:#a7bcb5;line-height:1.5}
.custom-scenario-validation p+p{margin-top:5px}
.custom-scenario-validation .warning{color:#e8c79e}
.custom-scenario-validation .error{color:#ffa997}
.custom-scenario-map-panel{pointer-events:auto;position:absolute;left:32px;bottom:28px;width:min(520px,calc(100vw - 460px));border:1px solid var(--custom-border);background:#0b0e11e8;padding:12px}
.custom-scenario-map-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.custom-scenario-map-title strong{font-size:11px;white-space:nowrap}
.custom-scenario-map-title>div{display:flex;gap:4px}
.custom-scenario-map-title button{padding:6px 7px;font-size:10px;min-width:27px}
.custom-scenario-map{display:block;width:100%;height:240px;touch-action:none;cursor:crosshair;border:1px solid #ffffff12}
.custom-scenario-map-key{display:flex;align-items:center;gap:15px;font-size:10px;margin:8px 0}
.custom-scenario-map-key span::before{content:"↗";margin-right:4px}
.custom-scenario-motion{color:#8be0d1}
.custom-scenario-scale{margin-left:auto;color:#a6aaae;font-variant-numeric:tabular-nums}
.custom-scenario-map-panel>small{font-size:10px}
.custom-scenario-countdown{position:absolute;left:calc((100% - 394px)/2);top:43%;transform:translate(-50%,-50%);min-width:180px;padding:24px;background:#080a0cd9;text-align:center;border:1px solid var(--custom-border)}
.custom-scenario-countdown[hidden]{display:none}
.custom-scenario-countdown span{display:block;font-size:12px;letter-spacing:2px;color:#abb2b8}
.custom-scenario-countdown b{display:block;font-size:70px;line-height:1.4;font-weight:500;font-variant-numeric:tabular-nums}
.custom-scenario.is-counting .custom-scenario-map-panel,.custom-scenario.is-counting .custom-scenario-fields{opacity:.45}
body.custom-scenario-open>.topbar,body.custom-scenario-open #hud,body.custom-scenario-open #menu,body.custom-scenario-open #victory,body.custom-scenario-open .failure-replay,body.custom-scenario-open #toast{visibility:hidden!important}
@media(max-height:760px){.custom-scenario-header{padding:14px 24px}.custom-scenario-header h1{font-size:22px}.custom-scenario-header p{display:none}.custom-scenario-controls{top:105px;bottom:14px}.custom-scenario-preview-note{top:105px;left:24px}.custom-scenario-map-panel{left:24px;bottom:14px}.custom-scenario-map{height:185px}.custom-scenario-fields section{padding:14px 0}}
@media(max-width:1000px){.custom-scenario-controls{right:15px;width:330px}.custom-scenario-fields{padding:0 14px 12px}.custom-scenario-footer{padding:12px 14px}.custom-scenario-map-panel{left:15px;width:calc(100vw - 375px)}.custom-scenario-preview-note{left:15px;max-width:calc(100vw - 375px)}.custom-scenario-map-title{align-items:flex-start;flex-direction:column}.custom-scenario-countdown{left:calc((100% - 345px)/2)}}
@media(max-width:690px){.custom-scenario-header{padding:12px 15px}.custom-scenario-header>div>span{font-size:8px}.custom-scenario-header h1{font-size:20px}.custom-scenario-header p{display:none}.custom-scenario-controls{top:93px;bottom:10px;right:10px;width:280px}.custom-scenario-map-panel{left:10px;width:calc(100vw - 310px);padding:7px}.custom-scenario-map{height:170px}.custom-scenario-map-title strong,.custom-scenario-map-title [data-action="fit-route"],.custom-scenario-map-panel>small,.custom-scenario-map-key>span,.custom-scenario-preview-note{display:none}.custom-scenario-map-title>div{flex-wrap:wrap}.custom-scenario-scale{margin:0}.custom-scenario-grid{gap:8px}.custom-scenario-countdown{left:calc((100% - 290px)/2);min-width:0;padding:14px}.custom-scenario-countdown b{font-size:44px}.custom-scenario-countdown span{font-size:9px}}

body.custom-scenario-editing>.topbar,body.custom-scenario-editing #hud,body.custom-scenario-editing #menu,body.custom-scenario-editing #victory,body.custom-scenario-editing #toast{visibility:hidden!important}

.custom-scenario .custom-scenario-weather{padding:19px 0}
.custom-scenario .custom-scenario-weather>.weather-controls{padding:0;border:0}
.custom-scenario .weather-controls label>span.weather-number{margin:0}
