/* Shared Summer artwork; each chapter has a distinct scenery composition. */
.level-map {
    background: #78ab48 url('/assets/maps/summer/ground-43.png') repeat;
    background-size: 128px 128px;
    border-color: #618c39;
    box-shadow: none;
    padding-block: 170px 130px;
    row-gap: 140px;
    isolation: isolate;
}
.level-map .level-map-path { border-radius: 14px; overflow: hidden; }
.level-map .level-caption {
    color: #23351d;
    background: #f5f8e9;
    border-radius: 6px;
    padding: 3px 5px;
    line-height: 1.3;
}
.level-map .level-caption.is-vocabulary {font-size: 11px; line-height: 1.4; overflow-wrap: normal;}
.level-caption.is-vocabulary span {white-space: nowrap;}
.level-map .level-node .level-caption {
    position: absolute; top: calc(100% + 12px); left: 0; z-index: 10;
    width: 240px; max-width: none !important; max-height: min(220px, 40dvh); box-sizing: border-box;
    margin: 0 !important; padding: 12px 14px; overflow: auto; border: 1px solid #c6b68b;
    border-radius: 12px; background: #fff9eb; color: #303d2c; font-size: 13px; line-height: 1.5;
    font-weight: 700; box-shadow: 0 4px 12px rgb(48 61 44 / 14%);
    visibility: hidden; opacity: 0; pointer-events: none; cursor: pointer;
}
.level-map .level-row.has-word-preview {z-index: 12;}
.level-row.has-word-preview .level-caption {
    visibility: visible; opacity: 1; pointer-events: auto;
    animation: lesson-word-float 2.8s ease-in-out infinite;
}
.level-caption .level-word-action {display: block; width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: center; cursor: pointer;}
.level-map .word-preview-above .level-caption {top: auto; bottom: calc(100% + 12px);}
@keyframes lesson-word-float {0%,100% {transform: translateY(0);} 50% {transform: translateY(-3px);}}
@media (prefers-reduced-motion: reduce) {.level-row.has-word-preview .level-caption {animation: none;}}
@media (max-width: 768px) {
    .level-map { row-gap: 108px; padding: 122px 18px 100px; }
    .level-map .level-caption { max-width: calc(100% - 6px); }
}

.level-map > .summer-scenery { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: 14px; }
.level-map > .summer-scenery img { position: absolute; display: block; object-fit: contain; max-width: none; }

/* Keep all chapter tracks present while the HTML stream is being parsed. */
.course-map-column {grid-template-rows:repeat(var(--course-chapters,18),minmax(calc(1491.8px + clamp(23px,2.3vw,30px)*1.35),max-content));}
@media(max-width:768px){
    .adventure-site .course-map .map-header h1 {display:flex;flex-direction:column;gap:0;align-items:flex-start;}
    .course-map-column {grid-template-rows:repeat(var(--course-chapters,18),minmax(1334.2px,max-content));}
}

/* Source order loads both side columns before the long map stream. */
.level-map[data-map-initial-render]:not([data-map-ready="true"]),
.map-shell > .map-progress-rail:not([data-sidebar-ready]) {visibility:hidden}
.map-shell > .crp-column-stack,.map-shell .learning-nav-column {order:1}
.map-shell > .course-map-column {order:2}
.map-shell > .map-progress-rail {order:3}
@media(min-width:1101px){
    .map-shell > .crp-column-stack {grid-column:1;grid-row:1}
    .map-shell > .course-map-column {grid-column:2;grid-row:1}
    .map-shell > .map-progress-rail {grid-column:3;grid-row:1}
}
@media(max-width:1100px){
    .map-shell:not(:has(> .course-map-column)) > .map-progress-rail {visibility:hidden}
}
/* UI headings use the installed UI font; catalog-font downloads belong to study glyphs. */
body.exercise-adventure #mapView .map-header h1 [lang^="zh"],
body.exercise-adventure #exercisesTitle [lang^="zh"] {font-family:inherit!important}
