/* Three distinct forms: brackets select, arrows show course, triangle warns. */
.r51-selection-brackets{display:none}.boat.r51-selected .r51-selection-brackets{display:block}.boat.r51-selected{outline:none!important;filter:none!important;background:transparent!important;box-shadow:none!important}.boat.r51-selected::before,.boat.r51-selected::after{display:none!important}.r51-bow-course{filter:drop-shadow(0 1px 1px #03151d)}#hint-path .r51-course-vector{stroke:#fff3da!important;stroke-width:.027!important;stroke-dasharray:none!important;opacity:1!important;filter:drop-shadow(0 1px 1px #001018)}#hint-path [data-signal=threat]{opacity:1!important}#hint-path{pointer-events:none}.r51-signal-key{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;padding:5px 8px;color:#e7e4d2;font:12px/1.5 system-ui}.r51-signal-key svg{width:21px;height:18px;vertical-align:middle}.r51-signal-key span{white-space:nowrap}.r51-contact-burst{position:absolute;width:clamp(44px,9vw,80px);height:clamp(44px,9vw,80px);transform:translate(-50%,-50%);pointer-events:none;z-index:9}.r51-contact-burst svg{width:100%;height:100%}.r51-contact-burst::before{content:none!important}.r51-selected .hull-glow{opacity:0}.r51-signal-readout{min-height:1.5em;font:13px/1.5 system-ui;color:#f4e4c4;margin:3px 0 0;text-align:center}
/* Full viewport map. The artwork contains no text, pins or buttons. */
#map-sheet{position:fixed!important;inset:0!important;margin:0!important;padding:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;border:0!important;border-radius:0!important;overflow:hidden!important;background:#071d26!important;color:#f2e5c8;box-sizing:border-box}#map-sheet::backdrop{background:#031119}#map-sheet .map-card{position:relative!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;overflow:hidden!important;border:0!important;border-radius:0!important;background:linear-gradient(#03141c66,#03141c00 35%,#03141c11),url('assets/vk50/map.webp') center/100% 100% no-repeat #08262f!important;box-shadow:none!important}#map-sheet>.modal-close{position:absolute;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:6;min-width:48px;min-height:48px;background:#08232ef0!important;border:1px solid #d4b377;border-radius:8px;color:#ffefcb}#map-sheet button{min-width:44px;min-height:44px;touch-action:manipulation}#map-sheet button:focus-visible{outline:3px solid #fff5c7!important;outline-offset:3px!important}#map-sheet .r51-map-header{position:absolute;inset:0 0 auto;z-index:3;height:76px;display:flex;gap:18px;align-items:center;padding:10px 80px 10px 20px;background:linear-gradient(#03151ef2,#03151eb0 75%,transparent)}#map-sheet .r51-map-header h2{margin:0;font:clamp(21px,2.4vw,32px)/1.1 Georgia;color:#fff0cf}#map-sheet .r51-map-header p{margin:5px 0 0;font:13px/1.4 system-ui;color:#dddbc5}#map-sheet .r51-map-header>button{flex:none;padding:8px 13px;background:#082630ed;border:1px solid #c8a973;border-radius:7px;color:#f6e5bd}#r51-map-world{position:absolute;inset:0}#map-sheet #vk50-map-chapters{position:absolute;inset:0;display:block!important;border:0!important;padding:0!important;background:none!important}#map-sheet #vk50-map-picker{display:none!important}#map-sheet #chapter-tabs{position:absolute!important;inset:0!important;display:block!important;padding:0!important;margin:0!important;overflow:visible!important;background:none!important}#map-sheet #chapter-tabs .r51-map-pin{position:absolute!important;transform:translate(-50%,-50%);display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:0!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;padding:1px!important;border:2px solid #c3b58c!important;border-radius:50% 50% 45% 10%!important;box-shadow:0 3px 8px #001018;background:#102c31ed!important;color:#f4ebcd!important;font-family:Georgia!important;line-height:1!important}#map-sheet #chapter-tabs .r51-map-pin b{font:25px/1 Georgia!important;letter-spacing:0!important;color:inherit!important}#map-sheet #chapter-tabs .r51-map-pin span{font:12px/1 system-ui!important;line-height:1!important;color:inherit!important}#map-sheet #chapter-tabs .r51-map-pin.locked{background:#15282de8!important;border-style:dashed!important;color:#d7d4c7!important}#map-sheet #chapter-tabs .r51-map-pin[aria-pressed=true]{border-color:#fff3cb!important;background:#80561fec!important;outline:2px solid #fff5d2;outline-offset:3px}#r51-map-selected{position:absolute;z-index:3;right:20px;bottom:16px;width:min(360px,calc(100% - 32px));height:156px;padding:14px 16px;background:#06232af0;border:1px solid #c1a473;border-radius:10px;box-sizing:border-box}#r51-map-selected h3{font:24px/1.2 Georgia;margin:0 0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#r51-map-selected p{font:13px/1.5 system-ui;margin:0 0 10px;color:#dddcc7}#r51-map-selected>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}#r51-map-selected button{padding:7px;font:14px/1.3 system-ui;border-radius:7px}#map-sheet .r51-map-routes{position:absolute;inset:76px 0 0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;padding:12px 24px 18px;background:#041b26c9;gap:10px}#map-sheet #chapter-hint{margin:0;max-width:1100px;justify-self:center;font:14px/1.5 system-ui;color:#e0ddc5}#map-sheet .r51-route-scroll{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:5px 7px}#map-sheet #route-map{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-auto-rows:minmax(100px,1fr)!important;gap:12px!important;max-width:1100px!important;width:100%!important;margin:auto!important;padding:0!important;min-width:0!important;overflow:visible!important}#map-sheet #route-map .r51-route{position:relative!important;display:flex!important;flex-direction:column!important;align-items:center;justify-content:center;gap:6px;min-width:0!important;min-height:100px!important;padding:10px 7px!important;background:#0b303bec!important;border:1px solid #7e9b91!important;border-radius:9px!important;box-shadow:none!important;white-space:normal!important;color:#eee7cd!important}#map-sheet #route-map .r51-route b{font:27px/1 Georgia!important;color:inherit!important}#map-sheet #route-map .r51-route .r51-route-title{display:block;font:13px/1.3 system-ui;max-width:100%;overflow-wrap:anywhere;color:inherit}#map-sheet #route-map .r51-route small{font:12px/1.2 system-ui;color:#e1c690}#map-sheet #route-map .r51-route:disabled{background:#122d36ee!important;color:#b9c8c1!important;border-style:dashed!important;opacity:1!important}#map-sheet #route-map .r51-route.current{outline:2px solid #f9dfac;outline-offset:2px}#map-sheet #map-summary{margin:0!important;text-align:center;font:14px/1.5 system-ui;color:#e9e1c8}#map-sheet [hidden]{display:none!important}#map-sheet[data-map-view=world] #old-map-button{display:none}#map-sheet[data-map-view=routes] .map-card{background-image:linear-gradient(#03151eaa,#03151eaa),url('assets/vk50/map.webp')!important}#map-sheet #map-scene{display:none!important}
@media(max-width:700px){#map-sheet .map-card{background-image:linear-gradient(#03141c66,#03141c00 35%,#03141c11),url('assets/vk50/map.webp')!important}#map-sheet .r51-map-header{height:88px;padding:8px 67px 8px 9px;gap:9px;align-items:center}#map-sheet .r51-map-header h2{font-size:20px}#map-sheet .r51-map-header p{font-size:11px}#map-sheet .r51-map-header>button{font-size:12px;padding:7px}#r51-map-selected{left:12px;right:12px;bottom:10px;width:auto;height:146px;padding:10px 12px}#r51-map-selected h3{font-size:21px;margin-bottom:4px}#r51-map-selected p{font-size:12px;margin-bottom:8px}#r51-map-selected button{font-size:13px}#map-sheet .r51-map-routes{inset:88px 0 0;padding:7px 8px 12px;gap:6px}#map-sheet #route-map{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:minmax(65px,1fr)!important;gap:8px!important}#map-sheet #route-map .r51-route{min-height:65px!important;gap:3px;padding:6px 4px!important}#map-sheet #route-map .r51-route b{font-size:23px!important}#map-sheet #route-map .r51-route .r51-route-title{font-size:11px;line-height:1.2;max-height:2.4em;overflow:hidden}#map-sheet #route-map .r51-route small{font-size:10px}#map-sheet #chapter-hint{font-size:12px}#map-sheet #map-summary{font-size:11px}#map-sheet #old-map-button{font-size:11px;max-width:92px}#map-sheet[data-map-view=routes] .map-card{background-image:linear-gradient(#03151eaa,#03151eaa),url('assets/vk50/map.webp')!important}}
@media(max-width:700px) and (max-height:699px){#r51-map-selected{height:126px}#r51-map-selected h3{font-size:19px}#r51-map-selected p{font-size:11px;margin-bottom:5px}#r51-map-selected button{font-size:12px}}
@media(prefers-reduced-motion:reduce){.r51-contact-burst{animation:none!important}}

.fx-boat.r51-selected .r51-selection-brackets{display:block}.boat.hinted{filter:none!important;outline:none!important;box-shadow:none!important}.boat.hinted::before,.boat.hinted::after{display:none!important}.fx-boat.river-danger{filter:none!important}.river-course.danger{stroke:#fff3da!important;stroke-dasharray:none!important}#hint-path [data-signal=threat] path:first-child{fill:#061b24!important;stroke:#ffcc75!important;stroke-width:.035!important;stroke-dasharray:none!important}#hint-path [data-signal=threat] path:nth-child(2){fill:none!important;stroke:#fff4db!important;stroke-width:.035!important;stroke-dasharray:none!important}#hint-path [data-signal=threat] circle{fill:#fff4db!important}#hint-path marker path{fill:none!important;stroke:#fff3da!important;stroke-width:1.7!important;stroke-dasharray:none!important}

/* R51.1: compact details remain outside the river, without changing controls. */
.r51-mission-head{display:flex;gap:8px;align-items:center;min-width:0}.r51-mission-head h1{flex:1;min-width:0}.r51-mission-head>button{flex:0 0 auto;min-width:44px;min-height:44px;padding:6px 9px;font:12px/1.3 system-ui;color:#eee3c6;border:1px solid #8a9a81;border-radius:7px;background:#102f36}.r51-signal-key span{display:inline-flex;align-items:center;gap:5px}.r51-signal-key svg{width:24px;height:24px}.traffic-route polyline,.traffic-route.danger polyline{stroke:#fff3da!important;stroke-width:.025!important;stroke-dasharray:none!important;opacity:.8!important;filter:none!important}.boat.r51-selected:focus-visible,.fx-boat.r51-selected:focus-visible{outline:none!important;box-shadow:none!important}body[data-compact51=true] :is(#r51-signal-key,#how-line,.mission-count){display:none!important}body[data-compact51=true] .mission-divider{display:none!important}
@media(max-width:700px){
 body[data-panel=play] main.wrap{padding-top:8px}body[data-panel=play] #play-panel{height:auto!important;min-height:0!important;display:flex!important;flex-direction:column;gap:8px}body[data-panel=play] #play-panel .play-layout{display:flex!important;flex-direction:column!important;height:auto!important;gap:8px!important}#play-panel .mission-card{width:100%!important;min-height:0!important;overflow:visible!important;align-self:stretch!important;padding:10px!important;gap:6px!important}.r51-mission-head{grid-column:1/-1}.r51-mission-head h1{font-size:22px!important;margin:0!important}.r51-mission-head>button{max-width:100px}#play-panel .game-column{display:flex!important;flex-direction:column!important;min-height:0!important;gap:5px!important}#play-panel .board-slot{position:relative!important;flex:none!important;width:100%!important;height:auto!important;aspect-ratio:1!important;min-height:0!important;max-height:none!important;padding:0!important}#play-panel .board-caption{position:static!important;inset:auto!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:0!important;padding:0!important;min-height:0!important}#play-panel .board-caption #feedback{grid-column:1/-1!important;margin:0!important;min-height:1.5em;font:13px/1.5 system-ui!important}#play-panel .board-caption button{position:static!important;min-width:0!important;min-height:48px!important;white-space:normal;padding:6px!important;font-size:13px!important}#play-panel .board-caption #cancel-power:not([hidden]){grid-column:1/-1}#play-panel .harbor-column{display:none!important}#play-panel .tools-drawer-r48{position:static!important;width:100%!important;margin:0!important}#play-panel .tools-drawer-r48>summary{min-height:48px;display:flex;align-items:center;padding:8px 12px;box-sizing:border-box}#play-panel .r51-signal-readout{order:initial;font-size:13px;margin:0}#play-panel .r51-signal-key{font-size:11px;gap:8px;padding:2px}#play-panel .how-line{margin:0;font-size:12px}#map-sheet .r51-map-header{box-sizing:border-box;min-width:0}#map-sheet .r51-map-header>div{min-width:0}#map-sheet .r51-map-header h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#map-sheet .r51-map-header p{max-height:2.8em;overflow:hidden}#map-sheet[data-map-view=routes] .r51-map-header{display:grid;grid-template-columns:90px minmax(0,1fr);grid-template-rows:44px 44px;gap:2px 8px;height:96px;padding:3px 68px 3px 8px}#map-sheet[data-map-view=routes] .r51-map-header>div{grid-column:2;grid-row:1/-1}#map-sheet[data-map-view=routes] #r51-map-back{grid-column:1;grid-row:1;font-size:11px;min-height:44px;padding:3px}#map-sheet[data-map-view=routes] #old-map-button{grid-column:1;grid-row:2;min-height:44px;padding:3px;font-size:10px}
}
@media(min-width:701px){body[data-compact51=true] .mission-card #race-hud{font-size:12px;padding:8px}.r51-mission-head{flex-direction:column;align-items:stretch}.r51-mission-head>button{align-self:flex-start}}

@media(max-width:700px){#map-sheet .r51-map-routes{inset:96px 0 0}}
@media(min-width:520px) and (max-height:500px) and (orientation:landscape){#map-sheet[data-map-view=world] .r51-map-header{height:76px}#r51-map-selected{left:auto!important;right:12px!important;bottom:12px!important;width:224px!important;height:126px!important;padding:9px!important}#r51-map-selected h3{font-size:19px!important}#r51-map-selected p{font-size:11px!important;margin-bottom:5px!important}#r51-map-selected button{font-size:12px!important}}
#map-sheet .r51-map-header,#map-sheet #chapter-tabs .r51-map-pin{box-sizing:border-box!important}
@media(max-width:700px){#play-panel .mission-card{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:auto!important}#play-panel .mission-card #level-label{grid-column:1/-1!important;grid-row:1!important}#play-panel .r51-mission-head{grid-column:1/-1!important;grid-row:2!important}#play-panel .mission-card #hearts{grid-column:1!important;grid-row:3!important;flex-direction:row!important;align-items:center!important}#play-panel .mission-card #cargo-status{grid-column:2!important;grid-row:3!important}#play-panel .mission-card #race-hud{grid-column:1/-1!important;grid-row:4!important}#play-panel .mission-card .mission-count{grid-column:1/-1!important;grid-row:5!important}#play-panel .mission-card>.map-button{grid-column:1/-1!important;grid-row:6!important}#play-panel .mission-card .mission-divider{display:none!important}}

/* R51.2: one explicit course belongs to the selected boat. Native travel and wake remain unchanged. */
.traffic-route{display:none!important}

#r51-map-selected [data-action=map-resume]{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}#map-sheet .r51-map-header p{font-variant-numeric:tabular-nums}
.r51-selected.r53-long-course .r51-bow-course{display:none}
