/* VK50 stage 2: existing model courses, M01/M02/M03 and MC01-MC12. */
body[data-map-visual="vk50-stage2"] .traffic-route polyline {
 fill:none; stroke:#c7e5d4; stroke-width:.035; stroke-dasharray:.09 .10;
 stroke-linecap:round; stroke-linejoin:round; opacity:.65;
}
body[data-map-visual="vk50-stage2"] .traffic-route.danger polyline {
 stroke:#e49b86; stroke-width:.05; opacity:.9;
}
body[data-map-visual="vk50-stage2"] .traffic-meter {
 height:3px; border-radius:3px; background:#e4d09c; box-shadow:0 0 0 1px #06242b;
}
body[data-map-visual="vk50-stage2"] .fx-boat:not(.river-danger) { filter:drop-shadow(0 2px 2px #03161d99); }
body[data-map-visual="vk50-stage2"] .fx-boat.river-danger { filter:drop-shadow(0 0 4px #da9c81); }
body[data-map-visual="vk50-stage2"] .ocean-frame .fx-boat .ship-wake {
 stroke:#8ac5bb; stroke-dasharray:none; opacity:.45; animation:none!important;
}
/* The WAAPI transform/duration and CSS hit regions remain owned by the old renderer. */
body[data-map-visual="vk50-stage2"] #map-sheet {
 width:min(1200px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 24px);
 padding:26px; overflow-y:auto; overscroll-behavior:contain;
 background:#0b2530; border:1px solid #91a188; border-radius:14px; color:#eee3cd;
}
body[data-map-visual="vk50-stage2"] #map-card > .section-heading { padding-right:44px; gap:12px; }
body[data-map-visual="vk50-stage2"] #map-card { width:100%; min-width:0; max-width:none; }
body[data-map-visual="vk50-stage2"] #map-card h2 { font:400 32px/1.2 Georgia,serif; }
body[data-map-visual="vk50-stage2"] .vk50-map-chapters {
 margin:16px 0; padding:0; border:1px solid #688475; border-radius:10px;
 background:#102c34 url('assets/vk50/map.webp') center/cover no-repeat;
}
body[data-map-visual="vk50-stage2"] .vk50-map-chapters > summary {
 padding:14px 16px; min-height:48px; color:#eaddc1; cursor:pointer;
 font:16px/1.5 "Segoe UI",system-ui,sans-serif; background:#102c34eb;
}
body[data-map-visual="vk50-stage2"] #chapter-tabs {
 display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px;
 padding:14px; margin:0; width:auto; max-width:none; overflow:visible;
}
body[data-map-visual="vk50-stage2"] #chapter-tabs button {
 display:flex; align-items:start; gap:12px; text-align:left;
 width:auto; min-width:0; max-width:none; height:auto; min-height:126px; max-height:none; padding:15px;
 white-space:normal; overflow-wrap:anywhere; aspect-ratio:auto;
 background:#0b2931ed; color:#f0e5ce; border:1px solid #53726b; border-radius:9px;
}
body[data-map-visual="vk50-stage2"] #chapter-tabs button.selected { border-color:#d3be8d; background:#1c4142f5; }
body[data-map-visual="vk50-stage2"] #chapter-tabs button > b { flex:0 0 auto; font:21px/1.3 Georgia,serif; color:#d9ba82; }
body[data-map-visual="vk50-stage2"] .vk50-chapter-copy { min-width:0; display:grid; gap:8px; }
body[data-map-visual="vk50-stage2"] .vk50-chapter-copy strong { font:400 21px/1.25 Georgia,serif; }
body[data-map-visual="vk50-stage2"] .vk50-chapter-copy > span { font:14px/1.5 "Segoe UI",system-ui,sans-serif; color:#c1d3c7; }
body[data-map-visual="vk50-stage2"] .vk50-chapter-copy small { font:13px/1.4 "Segoe UI",system-ui,sans-serif; color:#dfcfaa; }
body[data-map-visual="vk50-stage2"] #map-scene {
 min-height:184px; height:auto; border:1px solid #607e70; border-radius:10px;
 overflow:hidden; background:#102c34; margin:16px 0;
}
body[data-map-visual="vk50-stage2"] #map-scene .map-overview-copy {
 padding:22px; color:#eee3cd; background:linear-gradient(90deg,#0a2630f5,#0a263088);
}
body[data-map-visual="vk50-stage2"] #map-scene .map-overview-copy h3 { font:400 30px/1.25 Georgia,serif; }
body[data-map-visual="vk50-stage2"] #map-scene .map-overview-copy p { color:#c6d8cb; font-size:15px; }
body[data-map-visual="vk50-stage2"] #chapter-hint { color:#c7d8ca; font:15px/1.6 "Segoe UI",system-ui,sans-serif; }
body[data-map-visual="vk50-stage2"] #route-map {
 display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px;
 width:auto; height:auto; min-height:0; margin:18px 0; padding:0; background:none;
}
body[data-map-visual="vk50-stage2"] #route-map::before,
body[data-map-visual="vk50-stage2"] #route-map::after { content:none; }
body[data-map-visual="vk50-stage2"] #route-map .route-node {
 position:static!important; inset:auto!important; transform:none!important; float:none;
 display:flex; flex-direction:column; align-items:stretch; gap:8px;
 width:auto!important; min-width:0; height:auto!important; min-height:158px;
 margin:0; padding:14px 12px 10px; aspect-ratio:auto; text-align:left;
 color:#e9e0c7; background:#102c34; border:1px solid #657e6b; border-radius:10px;
 box-shadow:none; opacity:1; overflow-wrap:anywhere; white-space:normal; max-width:none; max-height:none;
}
body[data-map-visual="vk50-stage2"] #route-map .route-node > :is(b,small,span) {
 position:static; inset:auto; transform:none; width:auto; max-width:100%; white-space:normal;
}
body[data-map-visual="vk50-stage2"] #route-map .route-node > b { font:400 34px/1.1 Georgia,serif; }
body[data-map-visual="vk50-stage2"] #route-map .route-node > small { color:#dbc285; font:14px/1.3 "Segoe UI",system-ui,sans-serif; }
body[data-map-visual="vk50-stage2"] #route-map .route-node.completed { background:#173c3f; border-color:#b4aa7b; }
body[data-map-visual="vk50-stage2"] #route-map .route-node.current { border-color:#d8bf85; }
body[data-map-visual="vk50-stage2"] #route-map .route-node:disabled { color:#aebfb5; background:#10272f; border-color:#3e5f59; }
body[data-map-visual="vk50-stage2"] #route-map .route-node:disabled > small { color:#b6c7ba; }
body[data-map-visual="vk50-stage2"] .vk50-route-name { color:#c2d3c7; font:14px/1.4 "Segoe UI",system-ui,sans-serif; }
body[data-map-visual="vk50-stage2"] .vk50-route-action {
 display:block; margin-top:auto; padding:10px 6px; border:1px solid #758c78;
 border-radius:7px; background:#15363e; text-align:center; font:14px/1.3 "Segoe UI",system-ui,sans-serif;
}
body[data-map-visual="vk50-stage2"] .next-route:not(:disabled) .vk50-route-action { color:#f7e5cd; background:#7e3837; border-color:#c59b78; }
body[data-map-visual="vk50-stage2"] .route-node:disabled .vk50-route-action { color:#a5b8ac; border-color:#46675e; background:transparent; }
body[data-map-visual="vk50-stage2"] #map-summary { color:#c5d5c8; font:14px/1.6 "Segoe UI",system-ui,sans-serif; }
@media(max-width:800px) {
 body[data-map-visual="vk50-stage2"] #chapter-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
 body[data-map-visual="vk50-stage2"] #map-sheet { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); padding:18px 12px; }
 body[data-map-visual="vk50-stage2"] #map-card h2 { font-size:28px; }
 body[data-map-visual="vk50-stage2"] #chapter-tabs { grid-template-columns:minmax(0,1fr); padding:10px; gap:10px; }
 body[data-map-visual="vk50-stage2"] #chapter-tabs button { min-height:96px; padding:12px; }
 body[data-map-visual="vk50-stage2"] #map-scene .map-overview-copy { padding:18px 14px; }
 body[data-map-visual="vk50-stage2"] #map-scene .map-overview-copy h3 { font-size:25px; }
 body[data-map-visual="vk50-stage2"] #route-map { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
 body[data-map-visual="vk50-stage2"] #route-map .route-node { min-height:158px; padding:12px 8px 8px; }
 body[data-map-visual="vk50-stage2"] #route-map .route-node > b { font-size:30px; }
 body[data-map-visual="vk50-stage2"] .vk50-route-name { font-size:13px; }
}
