.training-v2-shade {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px 12px calc(18px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    background: rgba(3, 7, 19, .82);
    overflow-y: auto;
}

.training-v2-dialogue {
    width: min(100%, 420px);
    max-height: min(90vh, 680px);
    overflow-y: auto;
    padding: 14px;
    box-sizing: border-box;
    border: 1px solid #b99457;
    border-radius: 18px;
    background: linear-gradient(160deg, #19263d, #090f20 72%);
    box-shadow: 0 18px 48px #000b, inset 0 1px 0 #fff2;
}

.training-v2-line {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    margin-bottom: 11px;
    animation: training-v2-appear .36s ease-out both;
    animation-delay: calc(var(--training-line) * .7s);
}

.training-v2-line:nth-child(even) { flex-direction: row-reverse; }
.training-v2-line img {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    object-fit: contain;
    border: 1px solid #b99457;
    border-radius: 50%;
    background: #202b3c;
}
.training-v2-bubble {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #6c7894;
    border-radius: 13px;
    background: #e8edf9;
    color: #20273a;
    text-shadow: none;
    text-align: left;
    line-height: 1.35;
    font-size: 14px;
}
.training-v2-bubble b { color: #855b18; font-size: 13px; }
.training-v2-bubble p { margin: 4px 0 0; }
.training-v2-continue {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 13px;
    padding: 11px 16px;
    border: 1px solid #ffe2a1;
    border-radius: 10px;
    background: linear-gradient(#dcb669, #94601f);
    color: #17151d !important;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    text-shadow: none;
    animation: training-v2-appear .36s ease-out both;
    animation-delay: calc(var(--training-lines, 3) * .7s);
}
.training-v2-hint {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top));
    left: 50%;
    z-index: 9998;
    transform: translateX(-50%);
    width: min(calc(100% - 20px), 410px);
    padding: 9px 12px;
    box-sizing: border-box;
    border: 1px solid #ab8751;
    border-radius: 12px;
    background: #0c142be8;
    color: #fff1ce;
    text-align: center;
    text-shadow: 0 1px 2px #000;
    box-shadow: 0 6px 16px #0008;
    font-size: 13px;
}
.location-map-cell.training-v2-path::after {
    content: '';
    position: absolute;
    top: 43%; left: 43%;
    width: 14%; height: 14%;
    border-radius: 50%;
    background: #ffe084;
    box-shadow: 0 0 8px 3px #ffc331;
    pointer-events: none;
}
.location-map-cell.training-v2-path:not(.training-v2-goal)::after {
    animation: training-v2-route-runway 1.8s linear infinite;
    animation-delay: var(--training-route-delay, 0s);
}
.location-map-cell.training-v2-goal::after {
    width: 30%; height: 30%;
    top: 35%; left: 35%;
    background: #7de9ff;
    box-shadow: 0 0 10px 4px #4adaff;
}
.training-v2-destination { position: relative; border-color: #8adcf1 !important; box-shadow: 0 0 8px #4adaff80; }
.quest-route-destination, .quest-route-destination:hover { border: 2px solid #ffe084 !important; box-shadow: 0 0 8px #ffc331 !important; }
.location-teleport-modal-open .js-location-teleport-open .training_cursor { display: none !important; }
.training-v2-destination::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
    background: url('/images/cursor.gif') center / contain no-repeat;
    pointer-events: none;
}
.btn_small.training-v2-quest-finish,
.btn_small.training-v2-quest-finish:hover {
    border: 2px solid #e7bf65;
    box-shadow: 0 0 0 1px #ffdc9b99, 0 0 10px #d9ac5f80;
}
@keyframes training-v2-route-runway {
    0%, 34%, 100% {
        opacity: .18;
        transform: scale(.72);
        background: #d7a237;
        box-shadow: 0 0 2px #ffc33166;
    }
    10% {
        opacity: 1;
        transform: scale(1.35);
        background: #fffce6;
        box-shadow: 0 0 5px 2px #fff4a8, 0 0 14px 5px #ffbf20;
    }
    20% {
        opacity: .8;
        transform: scale(1.08);
        background: #ffe084;
        box-shadow: 0 0 8px 2px #ffc331;
    }
}
@keyframes training-v2-appear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 700px) {
    .training-v2-shade { align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
    .training-v2-line, .training-v2-continue { animation: none; }
}

/* Voice playback identifies the current speaker without hiding other lines. */
.training-v2-dialogue[data-training-step] .training-v2-line,
.training-v2-dialogue[data-training-step] .training-v2-continue { animation-delay: 0s; }
.training-v2-line .training-v2-bubble,
.training-v2-line img { transition: border-color .18s, box-shadow .18s, background-color .18s; }
.training-v2-line.is-current .training-v2-bubble {
    border-color: #d6a948;
    background: #fff4d9;
    box-shadow: 0 0 0 1px #d6a94866;
}
.training-v2-line.is-current img { border-color: #ffe084; box-shadow: 0 0 0 2px #ffe08455; }
.training-v2-line.is-current .training-v2-bubble b::after { content: ' •'; color: #a36d15; }
.training-v2-voice-retry {
    display: block;
    margin: 4px auto 0;
    padding: 5px 9px;
    border: 1px solid #b99457;
    border-radius: 7px;
    background: #202b3c;
    color: #fff1ce;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.training-v2-voice-retry[hidden] { display: none; }
.training-v2-voice-retry:focus-visible { outline: 2px solid #ffe084; outline-offset: 3px; }
