.hex-viewer-figure figcaption,
.motion-replay-figure figcaption,
.packet-inspector-figure figcaption,
.video-figure figcaption {
    max-width: none;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.4;
}

.motion-replay-download {
    display: block;
    margin-top: 4px;
}

.post-content .hex-viewer-figure iframe {
    margin-bottom: 10px;
}

.video-figure video {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--blog-ink);
    background: #000;
}

.motion-replay-title {
    margin-bottom: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.post-content .motion-replay-figure iframe {
    height: 620px;
    margin: 0;
}

.motion-replay-player {
    position: relative;
}

.replay-expand {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--blog-ink);
    background: var(--blog-paper, #fcfaf3);
    color: var(--blog-ink, #171813);
    cursor: pointer;
}

.replay-expand[hidden],
.replay-expand .collapse-icon,
.replay-expand[aria-expanded="true"] .expand-icon {
    display: none;
}

.replay-expand[aria-expanded="true"] .collapse-icon {
    display: block;
}

.replay-expand:focus-visible {
    outline: 3px solid var(--blog-blue);
    outline-offset: 3px;
}

.motion-replay-player.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 10000;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: var(--blog-paper, #fcfaf3);
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
}

.post-content .motion-replay-player.is-expanded iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
}
