/* A shared tour layer: the highlighted application controls keep receiving input. */
.vh-tutorial-launcher {
    position: fixed; left: max(12px, env(safe-area-inset-left));
    bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 2600;
    display: inline-flex; align-items: center; gap: 7px; min-height: 36px;
    padding: 7px 12px; border: 1px solid rgba(0,251,255,.4); border-radius: 20px;
    background: #1c252b; color: #c8faff; box-shadow: 0 2px 12px #0004;
    font: 600 12px/1.2 system-ui, sans-serif; cursor: pointer;
}
.vh-tutorial-launcher span { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid currentColor; border-radius: 50%; font-size: 12px; }
.vh-tutorial-launcher:hover { background: #263840; border-color: #00fbff; }
.vh-tutorial-launcher:focus-visible, #vhTutorial button:focus-visible { outline: 2px solid #00fbff; outline-offset: 3px; }
body.modal-open .vh-tutorial-launcher, body.live-overlay-open .vh-tutorial-launcher,
body.mobile-controls-open .vh-tutorial-launcher, body.tactical-view-open .vh-tutorial-launcher,
body.vh-tour-open .vh-tutorial-launcher { display: none; }
body.vh-tour-open .vh-agent-fab { visibility: hidden; }
#vhTutorial { position: fixed; inset: 0; z-index: 200000; pointer-events: none; font: 14px/1.45 system-ui, sans-serif; color: #f5f7fa; }
#vhTutorial, #vhTutorial * { box-sizing: border-box; }
#vhTutorial [hidden] { display: none !important; }
.vh-tour-shade { position: absolute; background: rgba(0,0,0,.68); pointer-events: auto; touch-action: none; }
.vh-tour-spotlight { position: absolute; border: 2px solid #00fbff; border-radius: 9px; box-shadow: 0 0 0 3px #00fbff20; pointer-events: none; }
.vh-tour-card { position: absolute; display: flex; flex-direction: column; width: 360px; padding: 16px; border: 1px solid #465056; border-radius: 14px; background: #1c2028; box-shadow: 0 10px 35px #0008; pointer-events: auto; overflow-y: auto; overscroll-behavior: contain; text-align: left; }
.vh-tour-top { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.vh-tour-progress { color: #70e6ea; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
#vhTutorial .vh-tour-close { flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 8px; background: #ffffff0a; color: #f5f7fa; font: 24px/1 system-ui; cursor: pointer; }
.vh-tour-title { font-size: 18px; line-height: 1.2; margin: 6px 0 0; color: #fff; font-weight: 700; }
.vh-tour-copy { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin: 0; color: #d0d6df; font-size: 13px; line-height: 1.5; }
.vh-tour-hint { display: block; margin-top: 8px; color: #87f1f2; font-size: 11px; }
.vh-tour-hint:empty { display: none; }
.vh-tour-actions { display: grid; flex: 0 0 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 6px; margin-top: 14px; }
#vhTutorial .vh-tour-btn { min-height: 36px; padding: 7px 12px; border: 1px solid #56616b; border-radius: 8px; background: #ffffff08; color: #e6ecf2; font: 600 12px/1.2 system-ui; cursor: pointer; text-transform: none; }
#vhTutorial .vh-tour-btn.primary { border-color: #00fbff; color: #07151b; background: #00e2e8; }
#vhTutorial .vh-tour-btn:disabled { opacity: .35; cursor: default; }
#vhTutorial .vh-tour-paths { display: grid; gap: 8px; min-height: 0; overflow-y: auto; margin-top: 16px; }
#vhTutorial .vh-tour-path { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px; border: 1px solid #414952; border-radius: 10px; background: #ffffff04; color: #f5f7fa; text-align: left; cursor: pointer; font: inherit; text-transform: none; }
#vhTutorial .vh-tour-path:hover { border-color: #00e2e8; background: #00fbff08; }
.vh-tour-path-icon { flex: 0 0 30px; font-size: 21px; text-align: center; }
.vh-tour-path strong { display: block; font-size: 13px; }
.vh-tour-path small { display: block; margin-top: 3px; color: #b4bfca; font-size: 11px; line-height: 1.4; }
.vh-tour-path-arrow { margin-left: auto; color: #00e2e8; }
.vh-tour-card.is-editing .vh-tour-copy, .vh-tour-card.is-editing .vh-tour-hint { display: none; }
.vh-tour-card.is-editing .vh-tour-top { margin-bottom: 0; }
.vh-tour-card.is-editing .vh-tour-title { font-size: 14px; margin: 0; }
.vh-tour-card.is-editing .vh-tour-actions { margin-top: 8px; }
.vh-tour-card.is-compact .vh-tour-hint { display: none; }
.vh-tour-card.is-compact .vh-tour-title { font-size: 14px; margin-top: 3px; }
.vh-tour-card.is-compact .vh-tour-top { margin-bottom: 4px; }
.vh-tour-card.is-compact .vh-tour-actions { margin-top: 8px; }
@media (max-width: 600px) {
    .vh-tutorial-launcher { min-height: 38px; padding: 8px 11px; }
    .vh-tour-card { padding: 12px; border-radius: 12px; }
    .vh-tour-title { font-size: 16px; }
    #vhTutorial .vh-tour-btn, #vhTutorial .vh-tour-close { min-height: 40px; }
    #vhTutorial .vh-tour-close { height: 40px; flex-basis: 40px; }
}
@media (max-height: 440px) {
    /* Leave room to reveal a complete control when the keyboard shrinks the viewport. */
    body.vh-tour-open #uiPanel.is-open { max-height: calc(100dvh - 8px); }
    .vh-tour-card { padding: 10px 12px; }
    .vh-tour-top { margin-bottom: 0; }
    .vh-tour-title { font-size: 15px; margin-bottom: 4px; }
    .vh-tour-copy { font-size: 12px; line-height: 1.35; }
    .vh-tour-hint { display: none; }
    .vh-tour-actions { margin-top: 8px; }
    #vhTutorial .vh-tour-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
    #vhTutorial .vh-tour-path { padding: 8px; min-height: 62px; gap: 6px; }
    .vh-tour-path-icon { flex-basis: 22px; font-size: 17px; }
    .vh-tour-path-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { #vhTutorial * { scroll-behavior: auto !important; } }
