.video-help-open { overflow: hidden; }

.video-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
             max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: rgba(10, 16, 34, 0.94);
    overflow: auto;
    overscroll-behavior: contain;
}

.video-help-panel {
    width: min(100%, 1040px);
    max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #172033;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.video-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    color: #fff;
    background: linear-gradient(135deg, #536fe9, #6e4eb4);
}

.video-help-header h2 { margin: 0; font-size: clamp(1.25rem, 4vw, 1.8rem); }
.video-help-body { padding: 18px; overflow: auto; -webkit-overflow-scrolling: touch; }
.video-help-notice, .video-help-issue-title { margin: 4px 0 18px; line-height: 1.45; }
.video-help-issue-title { font-weight: 700; color: #3f55bd; }

.video-help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.video-help-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dfe4f4;
    border-radius: 14px;
    background: #f8f9ff;
    box-shadow: 0 5px 18px rgba(36, 50, 98, 0.1);
}

.video-help-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-help-card-content { padding: 14px; }
.video-help-card h3 { margin: 0 0 7px; font-size: 1rem; line-height: 1.35; }
.video-help-channel { margin: 0 0 8px; color: #5b6476; font-size: 0.88rem; }
.video-help-relevance { margin: 0 0 13px; color: #364052; font-size: 0.9rem; line-height: 1.4; }
.video-help-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.video-help-primary, .video-help-secondary, .video-help-close, .video-help-issue-choice {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 0;
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
}

.video-help-primary { color: #fff; background: #526ce2; }
.video-help-secondary { display: inline-flex; align-items: center; justify-content: center; color: #3449a7; background: #e9edff; }
.video-help-close { color: #2e3f94; background: #fff; }
.video-help-issue-list { display: grid; gap: 12px; }
.video-help-issue-choice { width: 100%; color: #283875; background: #eef1ff; border: 2px solid #cfd7ff; text-align: left; }

.video-help-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.video-help-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-help-player-title { margin: 18px 0 0; line-height: 1.35; }
.video-help-embed-fallback, .video-help-fallback { margin: 16px 0 0; padding: 13px; border-radius: 10px; background: #f0f2fa; line-height: 1.4; }
.video-help-embed-error { background: #fff0f0; }
.video-help-link { color: #4058cc; font-weight: 700; }

@media (max-width: 800px) {
    .video-help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
    .video-help-overlay { align-items: stretch; padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
    .video-help-panel { width: 100%; max-height: 100dvh; border-radius: 12px; }
    .video-help-header { padding: 12px; align-items: stretch; flex-direction: column; }
    .video-help-close { width: 100%; }
    .video-help-body { padding: 12px; }
    .video-help-grid { grid-template-columns: minmax(0, 1fr); }
    .video-help-actions { flex-direction: column; }
    .video-help-primary, .video-help-secondary { width: 100%; }
    .video-help-launch-controls {
        width: calc(100% - 16px) !important;
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        gap: 8px !important;
    }
    .video-help-launch-button {
        min-width: 0 !important;
        flex: 1 1 0 !important;
        padding: 12px 8px !important;
        font-size: 15px !important;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .video-help-overlay { align-items: flex-start; }
    .video-help-panel { max-height: calc(100dvh - 12px); }
    .video-help-header { position: sticky; top: 0; z-index: 2; }
}
