/* MedExPrep Webinars — Watch-page styles (Phase 4)
 *
 * Full-bleed immersive player. Dark shell, slide stage on top, thumbnail
 * strip on the side, polished audio controls below.
 *
 * Depends on slides.css being loaded first (for .mxpwbn-slide).
 */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #0b1324;
    color: #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

.mxpwbn-watch-body {
    /* The tint vars come from the inline style on this element. */
}

/* ─── Shell layout ──────────────────────────────────────────────────────── */

.mxpwbn-watch-shell {
    display: grid;
    grid-template-columns: 1fr 288px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "top    top"
        "stage  thumbs"
        "ctrl   ctrl";
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(1200px 800px at 80% -10%,
            color-mix(in oklab, var(--mxpwbn-tint-from, #0891b2) 20%, transparent),
            transparent 55%),
        radial-gradient(1000px 700px at -10% 110%,
            color-mix(in oklab, var(--mxpwbn-tint-to,   #0ea5e9) 18%, transparent),
            transparent 60%),
        #0b1324;
}

.mxpwbn-watch-shell[data-thumbs-hidden="1"] {
    grid-template-columns: 1fr 0;
}
.mxpwbn-watch-shell[data-thumbs-hidden="1"] .mxpwbn-watch-thumbs {
    display: none;
}

@media (max-width: 900px) {
    .mxpwbn-watch-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr) auto auto;
        grid-template-areas:
            "top"
            "stage"
            "thumbs"
            "ctrl";
    }
}

/* ─── Topbar ───────────────────────────────────────────────────────────── */

.mxpwbn-watch-topbar {
    grid-area: top;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: rgba(7, 11, 25, .7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.mxpwbn-watch-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.mxpwbn-watch-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}
.mxpwbn-watch-brand-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.mxpwbn-watch-brand-txt strong {
    font-size: 15px;
    letter-spacing: -0.01em;
    color: #fff;
    font-weight: 700;
    max-width: 60ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mxpwbn-watch-eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 10px;
    font-weight: 700;
    color: color-mix(in oklab, var(--mxpwbn-tint-from, #0891b2) 80%, white);
}

.mxpwbn-watch-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ─── Viewer-count chips (Phase 16) ───────────────────────────────────── */
/* Zoom-style "N watching" pill, shown on the right of the topbar. */
.mxpwbn-watch-viewers {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px 6px 10px;
    height: 28px;
    border-radius: 999px;
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .35);
    color: #fee2e2;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .01em;
    user-select: none;
    /* fade in once JS populates a value so we don't flash "—" */
    opacity: 0;
    transition: opacity .35s ease, transform .25s ease;
}
.mxpwbn-watch-viewers[data-ready="1"] { opacity: 1; }
.mxpwbn-watch-viewers[data-bump="1"]  { transform: scale(1.04); }
.mxpwbn-watch-viewers-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, .55);
    animation: mxpwbn-watch-pulse 2.1s ease-out infinite;
}
@keyframes mxpwbn-watch-pulse {
    0%   { box-shadow: 0 0 0 0    rgba(239, 68, 68, .55); }
    70%  { box-shadow: 0 0 0 7px  rgba(239, 68, 68, 0);   }
    100% { box-shadow: 0 0 0 0    rgba(239, 68, 68, 0);   }
}
.mxpwbn-watch-viewers-num {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #ffffff;
}
.mxpwbn-watch-viewers-lbl {
    font-weight: 500;
    color: rgba(255,255,255,.78);
}
/* Admin variant — amber tint + LIVE badge so admins can tell which is which. */
.mxpwbn-watch-viewers--admin {
    background: rgba(245, 158, 11, .14);
    border-color: rgba(245, 158, 11, .45);
    color: #fde68a;
}
.mxpwbn-watch-viewers-dot--admin {
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, .55);
    animation-name: mxpwbn-watch-pulse-admin;
}
@keyframes mxpwbn-watch-pulse-admin {
    0%   { box-shadow: 0 0 0 0    rgba(245, 158, 11, .55); }
    70%  { box-shadow: 0 0 0 7px  rgba(245, 158, 11, 0);   }
    100% { box-shadow: 0 0 0 0    rgba(245, 158, 11, 0);   }
}
.mxpwbn-watch-viewers-badge {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .14em;
    padding: 2px 5px;
    border-radius: 3px;
    background: #f59e0b;
    color: #0b1b2d;
    line-height: 1;
}
/* Small-screen tidy-up — keep only the dot + number, drop the "watching" label. */
@media (max-width: 720px) {
    .mxpwbn-watch-viewers-lbl { display: none; }
    .mxpwbn-watch-viewers { padding: 6px 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .mxpwbn-watch-viewers-dot,
    .mxpwbn-watch-viewers-dot--admin { animation: none; }
}

.mxpwbn-watch-iconbtn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,.08);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.mxpwbn-watch-iconbtn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.15); }
.mxpwbn-watch-iconbtn[aria-pressed="false"] { opacity: .55; }
.mxpwbn-watch-iconbtn--close { font-size: 16px; color: #cbd5e1; }

/* ─── Stage ────────────────────────────────────────────────────────────── */

.mxpwbn-watch-main {
    grid-area: stage;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 1.8vh, 24px) clamp(16px, 2vw, 40px);
    overflow: hidden;
    min-height: 0;
    min-width: 0;
}

.mxpwbn-watch-stage {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1280px;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.mxpwbn-watch-stage-slot {
    display: none;
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    /* Phase 14.7 — become a size container so the frame can size from both
     * cqw AND cqh. Without this the frame could only size from one axis
     * and aspect-ratio got overridden by flex stretch. */
    container-type: size;
}
.mxpwbn-watch-stage-slot.is-active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mxpwbnWatchFade .3s ease;
}
/* Phase 14.7 — truly fit-within-both-axes 16:9 box. The frame's width is the
 * smaller of the full slot width and the height-bound width (100cqh × 16/9),
 * so whichever axis is more constraining drives the size. aspect-ratio then
 * fills in the other dimension. */
.mxpwbn-watch-stage-slot .mxpwbn-slide-frame {
    aspect-ratio: 16 / 9;
    width: min(100cqw, calc(100cqh * 16 / 9));
    height: auto;
    max-width: 100%;
    max-height: 100%;
}
/* Fallback path (no container-query support): clip overflow instead of scroll. */
@supports not (container-type: size) {
    .mxpwbn-watch-stage-slot .mxpwbn-slide-frame { overflow: hidden; }
}

@keyframes mxpwbnWatchFade {
    from { opacity: 0; transform: translateY(8px) scale(.996); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mxpwbn-watch-empty {
    text-align: center;
    color: #cbd5e1;
    padding: 60px 24px;
}
.mxpwbn-watch-empty h2 {
    color: #fff;
    font-size: clamp(22px, 3vw, 34px);
    margin: 0 0 8px;
}

/* ─── Resume prompt ────────────────────────────────────────────────────── */

.mxpwbn-watch-resume {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
.mxpwbn-watch-resume-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 16px;
    background: rgba(7, 11, 25, .92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    color: #e5e7eb;
    box-shadow: 0 8px 24px -8px rgba(0,0,0,.5);
}
.mxpwbn-watch-resume p { margin: 0; font-size: 13px; font-weight: 600; }

/* ─── Completion overlay ───────────────────────────────────────────────── */

.mxpwbn-watch-completion {
    /* Phase 16.2 — make the overlay scrollable so the badge + heading never
       get clipped on short viewports (certificate copy + 4 related cards can
       easily overflow the stage on a laptop). `align-items: flex-start`
       keeps the top of the inner stuck to the top of the overlay, and
       `padding` gives a comfortable gutter on all sides. */
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(20px, 4vw, 44px) clamp(12px, 3vw, 32px) clamp(28px, 5vh, 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: radial-gradient(closest-side, rgba(7, 11, 25, .88), rgba(7, 11, 25, .97));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 20;
}
.mxpwbn-watch-completion[hidden] {
    display: none !important;
}
.mxpwbn-watch-completion-inner {
    /* Phase 16.2 — widen so a 4-up related row fits on desktop without
       wrapping. Clamps back down on phones via the responsive rules below. */
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    color: #f8fafc;
    animation: mxpwbnWatchFade .35s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.mxpwbn-watch-completion-inner h3 {
    font-size: clamp(22px, 3.5vw, 32px);
    margin: 14px 0 14px;
    color: #fff;
    letter-spacing: -0.01em;
}
.mxpwbn-watch-completion-badge {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mxpwbn-tint-from, #0891b2), var(--mxpwbn-tint-to, #0ea5e9));
    color: #fff;
    font-size: 34px;
    font-weight: 800;
    box-shadow: 0 12px 30px -6px rgba(0,0,0,.5);
    flex-shrink: 0;
}
/* Phase 16.3 — completion actions arranged as a tidy grid. All buttons share
   the same width so the row doesn't look like an inverted pyramid. On wider
   screens, up to three fit side-by-side; collapses to a single column at
   narrow widths. */
.mxpwbn-watch-completion-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 640px;
    margin: 18px auto 6px;
}
.mxpwbn-watch-completion-actions .mxpwbn-watch-btn {
    width: 100%;
    margin: 0;
    justify-content: center;
    text-align: center;
}
/* If only one button is visible, center it at a natural width rather than
   stretching across the full row. */
.mxpwbn-watch-completion-actions:has(> .mxpwbn-watch-btn:only-child) {
    grid-template-columns: minmax(240px, 360px);
    justify-content: center;
}
.mxpwbn-watch-cert {
    width: 100%;
    max-width: 560px;
    margin: 2px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.mxpwbn-watch-cert[hidden] { display: none !important; }
.mxpwbn-watch-cert-msg {
    font-size: .95rem;
    line-height: 1.45;
    margin: 0;
    color: rgba(255,255,255,.82);
}
/* Hidden cert buttons (controlled by watch.js) still take no grid cell. */
.mxpwbn-watch-completion-actions > [hidden] { display: none !important; }

/* ─── Buttons (generic) ────────────────────────────────────────────────── */

.mxpwbn-watch-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,.12);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .16s ease, transform .16s ease, border-color .16s ease;
}
.mxpwbn-watch-btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); }
.mxpwbn-watch-btn--primary {
    background: linear-gradient(135deg, var(--mxpwbn-tint-from, #0891b2), var(--mxpwbn-tint-to, #0ea5e9));
    border-color: transparent;
    color: #fff;
}
.mxpwbn-watch-btn--primary:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 10px 24px -10px rgba(14,165,233,.55); }
.mxpwbn-watch-btn--lg { padding: 14px 22px; font-size: 15px; min-height: 52px; }
.mxpwbn-watch-btn--ghost {
    background: transparent;
    border-color: rgba(255,255,255,.18);
}
.mxpwbn-watch-btn--ghost:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.32); }

/* ─── Thumbnail rail ───────────────────────────────────────────────────── */

.mxpwbn-watch-thumbs {
    grid-area: thumbs;
    background: rgba(7, 11, 25, .6);
    border-left: 1px solid rgba(255,255,255,.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.mxpwbn-watch-thumbs-scroller {
    flex: 1;
    overflow-y: auto;
    padding: 14px 10px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-gutter: stable;
}

.mxpwbn-watch-thumb {
    appearance: none;
    position: relative;
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: start;
    gap: 10px;
    padding: 10px 12px 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    color: #cbd5e1;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.mxpwbn-watch-thumb:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.mxpwbn-watch-thumb.is-active {
    background: color-mix(in oklab, var(--mxpwbn-tint-from, #0891b2) 22%, #0b1324);
    border-color: color-mix(in oklab, var(--mxpwbn-tint-from, #0891b2) 60%, white);
    color: #fff;
}
.mxpwbn-watch-thumb.is-complete .mxpwbn-watch-thumb-num { opacity: 1; color: #a7f3d0; }

.mxpwbn-watch-thumb-num {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: 14px;
    color: color-mix(in oklab, var(--mxpwbn-tint-from, #0891b2) 80%, white);
    padding-top: 2px;
}
.mxpwbn-watch-thumb-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mxpwbn-watch-thumb-eye {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: 9px;
    font-weight: 700;
    color: color-mix(in oklab, var(--mxpwbn-tint-from, #0891b2) 80%, white);
}
.mxpwbn-watch-thumb-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.mxpwbn-watch-thumb-layout {
    font-size: 10px;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}
.mxpwbn-watch-thumb-progress {
    position: absolute;
    inset: auto 0 0 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--mxpwbn-tint-from, #0891b2), var(--mxpwbn-tint-to, #0ea5e9));
    transition: width .3s ease;
}

@media (max-width: 900px) {
    .mxpwbn-watch-thumbs { max-height: 160px; }
    .mxpwbn-watch-thumbs-scroller {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        padding: 10px 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .mxpwbn-watch-thumb {
        flex-shrink: 0;
        width: 224px;
        min-height: 76px;     /* Apple HIG + WCAG 2.5.5 — at least 44px, comfortable at 72-84 */
        padding: 12px 14px;
        scroll-snap-align: start;
    }
    .mxpwbn-watch-thumb-title {
        font-size: 14px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    .mxpwbn-watch-thumb-num {
        font-size: 15px;
    }
}

/* Chapter / time markers on thumbnails */
.mxpwbn-watch-thumb-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.mxpwbn-watch-thumb-time {
    font-variant-numeric: tabular-nums;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.55);
    letter-spacing: .04em;
}
.mxpwbn-watch-thumb-dot {
    font-size: 11px;
    color: rgba(255,255,255,.3);
    line-height: 1;
}
.mxpwbn-watch-thumb.is-active .mxpwbn-watch-thumb-time,
.mxpwbn-watch-thumb.is-complete .mxpwbn-watch-thumb-time {
    color: rgba(255,255,255,.85);
}

/* ─── Controls footer ──────────────────────────────────────────────────── */

.mxpwbn-watch-controls {
    grid-area: ctrl;
    padding: 10px 20px 8px;
    background: rgba(7, 11, 25, .85);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.mxpwbn-watch-controls-row {
    display: grid;
    grid-template-columns: auto auto auto auto 1fr auto;
    align-items: center;
    gap: 14px;
}

@media (max-width: 900px) {
    .mxpwbn-watch-controls-row {
        grid-template-columns: repeat(3, auto) 1fr;
        row-gap: 10px;
    }
    .mxpwbn-watch-controls-right {
        grid-column: 1 / -1;
        justify-content: space-between;
    }
}

/* Phase 14.48 — ultra-narrow viewports (<400px): tighten the control bar.
   Hide the speed control (viewers can still use keyboard <,> if needed),
   collapse the time display to show only current time, and squeeze gaps so
   the nav/play/auto-advance cluster fits one row without wrapping. */
@media (max-width: 399px) {
    .mxpwbn-watch-controls {
        padding: 8px 12px 6px;
    }
    .mxpwbn-watch-controls-row {
        gap: 8px;
        column-gap: 8px;
    }
    .mxpwbn-watch-speed { display: none; }
    .mxpwbn-watch-times {
        min-width: 0;
        font-size: 12px;
    }
    .mxpwbn-watch-times .mxpwbn-watch-time-sep,
    .mxpwbn-watch-times .mxpwbn-watch-time[data-mxpwbn-dur] {
        display: none;
    }
    .mxpwbn-watch-navbtn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    .mxpwbn-watch-playbtn {
        width: 48px;
        height: 48px;
    }
    .mxpwbn-watch-autoplay {
        padding: 4px 8px;
        font-size: 11px;
    }
    .mxpwbn-watch-vol input[type="range"] { width: 60px; }
}

/* Nav buttons */
.mxpwbn-watch-navbtn {
    appearance: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: #e5e7eb;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}
.mxpwbn-watch-navbtn:hover:not(:disabled) { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.mxpwbn-watch-navbtn:disabled { opacity: .35; cursor: not-allowed; }

/* Main play/pause button */
.mxpwbn-watch-playbtn {
    appearance: none;
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mxpwbn-tint-from, #0891b2), var(--mxpwbn-tint-to, #0ea5e9));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px -6px rgba(0,0,0,.4);
    transition: transform .18s ease;
}
.mxpwbn-watch-playbtn:hover { transform: scale(1.05); }
.mxpwbn-watch-play-icon { display: none; }
.mxpwbn-watch-playbtn[data-state="paused"] .mxpwbn-watch-play-icon.is-play,
.mxpwbn-watch-playbtn[data-state="idle"]   .mxpwbn-watch-play-icon.is-play,
.mxpwbn-watch-playbtn:not([data-state])    .mxpwbn-watch-play-icon.is-play  { display: block; }
.mxpwbn-watch-playbtn[data-state="playing"] .mxpwbn-watch-play-icon.is-pause { display: block; }
.mxpwbn-watch-playbtn[data-state="loading"]::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    animation: mxpwbnSpin .9s linear infinite;
}
.mxpwbn-watch-playbtn[data-state="loading"] .mxpwbn-watch-play-icon { display: none; }
@keyframes mxpwbnSpin { to { transform: rotate(360deg); } }

.mxpwbn-watch-play-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid color-mix(in oklab, var(--mxpwbn-tint-from, #0891b2) 55%, transparent);
    opacity: 0;
    pointer-events: none;
}
.mxpwbn-watch-playbtn[data-state="playing"] .mxpwbn-watch-play-ring {
    animation: mxpwbnPulse 1.8s ease-out infinite;
}
@keyframes mxpwbnPulse {
    0%   { opacity: .7; transform: scale(1); }
    100% { opacity: 0;  transform: scale(1.35); }
}

/* Times */
.mxpwbn-watch-times {
    display: flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    color: #cbd5e1;
    font-weight: 600;
    min-width: 78px;
}
.mxpwbn-watch-time-sep { opacity: .4; }

/* Scrub bar */
.mxpwbn-watch-scrub {
    position: relative;
    height: 6px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    overflow: hidden;
}
.mxpwbn-watch-scrub input[type="range"] {
    position: absolute;
    inset: -8px 0;
    width: 100%;
    height: calc(100% + 16px);
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}
.mxpwbn-watch-scrub-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: linear-gradient(90deg, var(--mxpwbn-tint-from, #0891b2), var(--mxpwbn-tint-to, #0ea5e9));
    border-radius: 999px;
    transition: width .15s linear;
}

/* Right cluster */
.mxpwbn-watch-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Auto-advance toggle */
.mxpwbn-watch-autoplay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
}
.mxpwbn-watch-autoplay input { display: none; }
.mxpwbn-watch-autoplay-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #475569;
    transition: background .16s ease, box-shadow .16s ease;
}
.mxpwbn-watch-autoplay input:checked + .mxpwbn-watch-autoplay-dot {
    background: #10b981;
    box-shadow: 0 0 0 3px color-mix(in oklab, #10b981 30%, transparent);
}

/* Speed */
.mxpwbn-watch-speed { position: relative; }
.mxpwbn-watch-speed > button {
    appearance: none;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    min-width: 44px;
}
.mxpwbn-watch-speed-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 6px;
    padding: 6px;
    list-style: none;
    background: #0f1a30;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    display: none;
    min-width: 68px;
    box-shadow: 0 12px 28px -8px rgba(0,0,0,.5);
    z-index: 5;
}
.mxpwbn-watch-speed-menu.is-open { display: block; }
.mxpwbn-watch-speed-menu button {
    appearance: none;
    display: block;
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px;
    text-align: left;
}
.mxpwbn-watch-speed-menu button:hover { background: rgba(255,255,255,.08); }
.mxpwbn-watch-speed-menu button.is-active {
    background: linear-gradient(135deg, var(--mxpwbn-tint-from, #0891b2), var(--mxpwbn-tint-to, #0ea5e9));
    color: #fff;
}

/* Volume */
.mxpwbn-watch-vol {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mxpwbn-watch-vol input[type="range"] {
    width: 80px;
    accent-color: var(--mxpwbn-tint-from, #0891b2);
}
.mxpwbn-watch-vol .is-off { display: none; }
.mxpwbn-watch-vol[data-muted="1"] .is-on  { display: none; }
.mxpwbn-watch-vol[data-muted="1"] .is-off { display: inline-block; }

/* Overall progress */
.mxpwbn-watch-overall { display: flex; flex-direction: column; gap: 4px; }
.mxpwbn-watch-overall-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255,255,255,.55);
    font-weight: 600;
    letter-spacing: .02em;
}
.mxpwbn-watch-overall-label strong { color: #fff; }
.mxpwbn-watch-overall-status:not(:empty) {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
}
.mxpwbn-watch-overall-track {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    /* Phase 14.57 — chapters need to render tooltips above the bar; the
       fill is border-radius-clipped on its own, so we can drop overflow. */
    overflow: visible;
}
.mxpwbn-watch-overall-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--mxpwbn-tint-from, #0891b2), var(--mxpwbn-tint-to, #0ea5e9));
    border-radius: 999px;
    transition: width .3s ease;
    z-index: 1;
}

/* ── Phase 14.57: chapter scrubber ───────────────────────────────────────
   Clickable segments overlaid on the overall track. Each chapter = one
   <li> with an absolute left/width position. Hover/focus reveals a small
   tooltip (slide N + title + MM:SS) and enlarges the marker. */
.mxpwbn-watch-chapters {
    position: absolute;
    inset: -8px 0 -8px 0; /* grow hit area above/below the 4px bar */
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 3;
    pointer-events: none; /* children re-enable */
}
.mxpwbn-watch-chapter {
    position: absolute;
    top: 0;
    bottom: 0;
    pointer-events: auto;
}
.mxpwbn-watch-chapter-btn {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
}
/* vertical tick line at the start of each chapter (skip the first one) */
.mxpwbn-watch-chapter-tick {
    position: absolute;
    top: 50%;
    left: 0;
    width: 2px;
    height: 10px;
    margin-top: -5px;
    background: rgba(255,255,255,.55);
    border-radius: 2px;
    transition: height .18s ease, background .18s ease;
}
.mxpwbn-watch-chapter:first-child .mxpwbn-watch-chapter-tick { display: none; }
.mxpwbn-watch-chapter-btn:hover .mxpwbn-watch-chapter-tick,
.mxpwbn-watch-chapter-btn:focus-visible .mxpwbn-watch-chapter-tick {
    height: 16px;
    margin-top: -8px;
    background: #fff;
}
.mxpwbn-watch-chapter.is-active .mxpwbn-watch-chapter-tick {
    height: 14px;
    margin-top: -7px;
    background: var(--mxpwbn-tint-to, #0ea5e9);
    box-shadow: 0 0 0 2px rgba(255,255,255,.18);
}
.mxpwbn-watch-chapter.is-visited .mxpwbn-watch-chapter-tick {
    background: var(--mxpwbn-tint-from, #0891b2);
}
/* a thin hover halo over the current chapter segment */
.mxpwbn-watch-chapter-btn::after {
    content: "";
    position: absolute;
    top: calc(50% - 2px);
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,.14);
    border-radius: 999px;
    opacity: 0;
    transition: opacity .15s ease;
    pointer-events: none;
}
.mxpwbn-watch-chapter-btn:hover::after,
.mxpwbn-watch-chapter-btn:focus-visible::after { opacity: 1; }

/* hover/focus tooltip above the tick */
.mxpwbn-watch-chapter-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    transform: translateX(-6px);
    display: none;
    gap: 4px;
    align-items: baseline;
    white-space: nowrap;
    max-width: 320px;
    padding: 6px 10px;
    background: rgba(10, 16, 28, .96);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    box-shadow: 0 12px 28px -12px rgba(0,0,0,.8);
    font-size: 11px;
    line-height: 1.3;
    color: #e2e8f0;
    pointer-events: none;
    z-index: 4;
}
.mxpwbn-watch-chapter-btn:hover .mxpwbn-watch-chapter-tip,
.mxpwbn-watch-chapter-btn:focus-visible .mxpwbn-watch-chapter-tip { display: inline-flex; }
.mxpwbn-watch-chapter-tip-n { color: rgba(255,255,255,.5); font-weight: 700; }
.mxpwbn-watch-chapter-tip-title {
    color: #fff;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}
.mxpwbn-watch-chapter-tip-time {
    color: var(--mxpwbn-tint-to, #0ea5e9);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-left: 2px;
}
/* right-edge tooltips: flip so they don't get cut off */
.mxpwbn-watch-chapter:nth-last-child(-n+2) .mxpwbn-watch-chapter-tip {
    left: auto;
    right: 0;
    transform: translateX(6px);
}
/* reduced motion: drop transitions */
@media (prefers-reduced-motion: reduce) {
    .mxpwbn-watch-chapter-tick,
    .mxpwbn-watch-chapter-btn::after,
    .mxpwbn-watch-overall-fill { transition: none !important; }
}

/* Keyboard hints */
.mxpwbn-watch-kbd {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    color: rgba(255,255,255,.45);
    font-size: 11px;
    padding: 4px 0 4px;
}
.mxpwbn-watch-kbd kbd {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    color: #e5e7eb;
    margin-right: 2px;
}
@media (max-width: 700px) { .mxpwbn-watch-kbd { display: none; } }

/* Screen-reader live region */
.mxpwbn-watch-sr {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Fullscreen tweaks */
.mxpwbn-watch-body:fullscreen .mxpwbn-watch-shell { height: 100vh; }

/* ─── Motion reduce ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .mxpwbn-watch,
    .mxpwbn-watch *,
    .mxpwbn-watch *::before,
    .mxpwbn-watch *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   Phase 16.2 — Related-webinars rail on the completion screen.
   Up to 4 cards in a single row on desktop. Drops to 2×2 on tablet and
   1-column on phone. Thumbnails reuse the archive card's slide-1 fallback
   system so every card feels on-brand even without a hero image.
   ═══════════════════════════════════════════════════════════════════════ */
.mxpwbn-watch-related {
    width: 100%;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.12);
    text-align: left;
}
.mxpwbn-watch-related h4 {
    margin: 0 0 14px;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: rgba(255,255,255,.82);
    text-align: center;
}
.mxpwbn-watch-related-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 960px;
}
/* When fewer than 4 cards are present, center them tightly instead of
   stretching each one to a quarter of the viewport. */
.mxpwbn-watch-related[data-mxpwbn-related-count="1"] .mxpwbn-watch-related-list { grid-template-columns: minmax(0, 240px); justify-content: center; }
.mxpwbn-watch-related[data-mxpwbn-related-count="2"] .mxpwbn-watch-related-list { grid-template-columns: repeat(2, minmax(0, 240px)); justify-content: center; }
.mxpwbn-watch-related[data-mxpwbn-related-count="3"] .mxpwbn-watch-related-list { grid-template-columns: repeat(3, minmax(0, 240px)); justify-content: center; }

.mxpwbn-watch-related-card {
    margin: 0;
    min-width: 0;
}
.mxpwbn-watch-related-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    overflow: hidden;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
    height: 100%;
    box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
}
.mxpwbn-watch-related-link:hover,
.mxpwbn-watch-related-link:focus-visible {
    background: rgba(255,255,255,.085);
    border-color: rgba(255,255,255,.22);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -14px rgba(0,0,0,.6);
    outline: none;
}

/* Thumbnail frame — matches .mxpwbn-arch-card-thumb's 16:9 + tint treatment. */
.mxpwbn-watch-related-thumb {
    position: relative;
    margin: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        linear-gradient(135deg,
            color-mix(in oklab, var(--mxpwbn-card-tint-from, var(--mxpwbn-tint-from, #0891b2)) 22%, #0b1121),
            color-mix(in oklab, var(--mxpwbn-card-tint-to,   var(--mxpwbn-tint-to,   #0ea5e9)) 22%, #0b1121));
}
.mxpwbn-watch-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.mxpwbn-watch-related-link:hover .mxpwbn-watch-related-thumb img { transform: scale(1.05); }

/* Slide-1 fallback thumbnail — mirrors .mxpwbn-arch-card-slide1. */
.mxpwbn-watch-related-thumb--slide1 {
    background:
        radial-gradient(120% 80% at 90% -10%,
            color-mix(in oklab, var(--mxpwbn-card-tint-to, var(--mxpwbn-tint-to, #0891b2)) 45%, #fff) 0%,
            transparent 55%),
        linear-gradient(140deg,
            color-mix(in oklab, var(--mxpwbn-card-tint-from, var(--mxpwbn-tint-from, #0b4a6f)) 92%, #000) 0%,
            color-mix(in oklab, var(--mxpwbn-card-tint-to,   var(--mxpwbn-tint-to,   #0891b2)) 85%, #000) 100%);
}
.mxpwbn-watch-related-slide1 {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px 14px;
    color: #fff;
    text-align: left;
    overflow: hidden;
    box-shadow: inset 0 -60% 80px -40px rgba(0,0,0,.55);
}
.mxpwbn-watch-related-slide1::before {
    content: "";
    position: absolute;
    top: -28px;
    right: -28px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    filter: blur(2px);
    pointer-events: none;
}
.mxpwbn-watch-related-slide1-eyebrow {
    position: absolute;
    top: 10px;
    left: 14px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,255,255,.82);
    padding: 2px 7px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.mxpwbn-watch-related-slide1-title {
    font-size: clamp(13px, 1.3vw, 16px);
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    margin: 0 0 3px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.mxpwbn-watch-related-slide1-subtitle {
    font-size: 11px;
    line-height: 1.35;
    font-weight: 500;
    color: rgba(255,255,255,.82);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.mxpwbn-watch-related-slide1-rule {
    display: block;
    width: 28px;
    height: 2px;
    margin: 6px 0 5px 0;
    background: linear-gradient(90deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.15) 100%);
    border-radius: 2px;
}
.mxpwbn-watch-related-slide1-brand {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.72);
}

/* Duration chip + play glyph on the thumb — keep them readable on any bg. */
.mxpwbn-watch-related-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    color: #fff;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
}
.mxpwbn-watch-related-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.9);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 2;
}
.mxpwbn-watch-related-link:hover .mxpwbn-watch-related-play,
.mxpwbn-watch-related-link:focus-visible .mxpwbn-watch-related-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.mxpwbn-watch-related-play svg { margin-left: 2px; }

.mxpwbn-watch-related-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px 12px;
    flex: 1 1 auto;
}
.mxpwbn-watch-related-title {
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mxpwbn-watch-related-hook {
    font-size: .78rem;
    line-height: 1.4;
    color: rgba(255,255,255,.58);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tablet: 2×2 grid */
@media (max-width: 920px) {
    .mxpwbn-watch-related-list,
    .mxpwbn-watch-related[data-mxpwbn-related-count="3"] .mxpwbn-watch-related-list,
    .mxpwbn-watch-related[data-mxpwbn-related-count="4"] .mxpwbn-watch-related-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 560px;
    }
}
/* Phone: 1-column stack */
@media (max-width: 560px) {
    .mxpwbn-watch-related-list,
    .mxpwbn-watch-related[data-mxpwbn-related-count="2"] .mxpwbn-watch-related-list,
    .mxpwbn-watch-related[data-mxpwbn-related-count="3"] .mxpwbn-watch-related-list,
    .mxpwbn-watch-related[data-mxpwbn-related-count="4"] .mxpwbn-watch-related-list {
        grid-template-columns: 1fr;
        max-width: 360px;
        gap: 12px;
    }
    .mxpwbn-watch-related-thumb { aspect-ratio: 16 / 10; }
}

/* Phase 16.2 — compact the completion overlay on phones: smaller gutter,
   tighter button row, slightly smaller certificate CTAs. */
@media (max-width: 560px) {
    .mxpwbn-watch-completion {
        padding: 18px 12px 28px;
    }
    .mxpwbn-watch-completion-inner {
        max-width: 100%;
    }
    .mxpwbn-watch-completion-inner h3 {
        margin: 10px 0 12px;
    }
    .mxpwbn-watch-completion-badge {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    .mxpwbn-watch-completion-inner .mxpwbn-watch-btn {
        width: auto;
        min-width: 0;
    }
    .mxpwbn-watch-btn--lg {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   Phase 14.47 — Mobile polish: fix title clipping, guard horizontal
   overflow, and reshape the resume prompt so the buttons are proper pills.
   ═══════════════════════════════════════════════════════════════════════ */

/* Guard the outermost shell against horizontal bleed on narrow screens.
   The slide frame uses container queries and can briefly push out before
   its aspect-ratio box resolves; clamping the shell width + clipping the
   X-axis keeps the page from visually splitting on the right. */
@media (max-width: 900px) {
    .mxpwbn-watch-body,
    .mxpwbn-watch-shell {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .mxpwbn-watch-main,
    .mxpwbn-watch-stage,
    .mxpwbn-watch-stage-slot {
        max-width: 100%;
        min-width: 0;
    }
    .mxpwbn-watch-stage-slot .mxpwbn-slide-frame {
        max-width: 100%;
    }
}

/* Topbar title: on desktop we nowrap + ellipsize. On mobile that ellipsis
   never fires because max-width: 60ch is wider than the viewport, so the
   text overflows the right edge. Let it wrap to 2 lines with a hard clamp
   and tighten the padding so the action icons don't hug the edge. */
@media (max-width: 640px) {
    .mxpwbn-watch-topbar {
        padding: 10px 14px;
        gap: 10px;
    }
    .mxpwbn-watch-brand {
        flex: 1 1 auto;
        min-width: 0;
    }
    .mxpwbn-watch-topbar-actions {
        flex: 0 0 auto;
    }
    .mxpwbn-watch-brand-txt strong {
        white-space: normal;
        max-width: 100%;
        font-size: 14px;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mxpwbn-watch-eyebrow {
        font-size: 9px;
    }
}

/* Resume prompt: on desktop the layout is a single horizontal row (text +
   Resume + Start over). On any viewport narrow enough that the row would
   squeeze either the text or the buttons — which in practice means anything
   under the 900px shell breakpoint, not just phones — stack the text above
   and put the two buttons on a full-width row below, each as an equal-width
   pill with `white-space: nowrap` so the labels never wrap inside a pill. */
@media (max-width: 900px) {
    .mxpwbn-watch-resume {
        top: 10px;
        left: 12px;
        right: 12px;
        transform: none;
        max-width: none;
    }
    .mxpwbn-watch-resume-inner {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 8px;
        padding: 10px 14px;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }
    .mxpwbn-watch-resume-inner > p {
        flex: 1 1 100%;
        margin: 0 0 2px;
        text-align: center;
        font-size: 13px;
        line-height: 1.35;
    }
    .mxpwbn-watch-resume-inner > .mxpwbn-watch-btn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 10px 16px;
        white-space: nowrap;
        min-height: 40px;
    }
}

/* Tightest phones: drop the inner padding a hair and shrink the font one
   step so the prompt text fits on 2 lines instead of 3. */
@media (max-width: 400px) {
    .mxpwbn-watch-resume-inner > p { font-size: 12px; }
    .mxpwbn-watch-resume-inner > .mxpwbn-watch-btn { padding: 9px 12px; font-size: 13px; }
}
