/* MineSTEM content viewer: content opens in a modal on the page, never a new tab. */
html.msv-open, html.msv-open body { overflow: hidden !important; }
.msv-overlay { position: fixed; inset: 0; z-index: 2147483000; background: rgba(15, 23, 42, .62); display: flex; align-items: center; justify-content: center; padding: 24px; }
.msv-overlay[hidden] { display: none; }
.msv-box { width: min(1100px, 100%); height: min(92vh, 100%); background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; overflow: hidden; }
.msv-kind-image .msv-box, .msv-kind-audio .msv-box { height: auto; max-height: 92vh; }
.msv-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid #e5e9ee; background: #fff; }
.msv-title { flex: 1; min-width: 0; font: 700 15px/1.3 Inter, system-ui, -apple-system, sans-serif; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; }
.msv-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.msv-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; border: 1px solid #cddce3; border-radius: 8px; background: #fff; color: #1f4a4d; font: 700 13px/1 Inter, system-ui, -apple-system, sans-serif; text-decoration: none; cursor: pointer; }
.msv-btn:hover { border-color: #2b7681; color: #2b7681; text-decoration: none; }
.msv-btn[hidden] { display: none; }
.msv-close { width: 36px; padding: 0; font-size: 22px; font-weight: 400; }
.msv-body { flex: 1; min-height: 0; overflow: auto; background: #f1f4f7; display: flex; }
.msv-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #fff; }
.msv-img { display: block; max-width: 100%; max-height: calc(92vh - 60px); margin: auto; object-fit: contain; }
.msv-media { display: block; width: 100%; max-height: calc(92vh - 60px); margin: auto; background: #000; }
.msv-audio { width: 100%; margin: 24px; }
.msv-pages { width: 100%; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.msv-page { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.msv-note { margin: auto; padding: 32px 20px; text-align: center; color: #5f6b79; font: 500 15px/1.5 Inter, system-ui, sans-serif; }
.msv-note p { margin: 0 0 14px; }
@media (max-width: 700px) {
    .msv-overlay { padding: 0; }
    .msv-box { width: 100%; height: 100%; max-height: none; border-radius: 0; }
    .msv-kind-image .msv-box, .msv-kind-audio .msv-box { height: 100%; }
    .msv-bar { padding-top: max(10px, env(safe-area-inset-top)); }
}
/* "Loading…" shows behind a document frame until the document paints over it */
.msv-kind-pdf .msv-body, .msv-kind-page .msv-body, .msv-kind-embed .msv-body, .msv-kind-office .msv-body { position: relative; }
.msv-kind-pdf .msv-body::before, .msv-kind-page .msv-body::before, .msv-kind-embed .msv-body::before, .msv-kind-office .msv-body::before { content: "Loading…"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #5f6b79; font: 600 15px Inter, system-ui, sans-serif; z-index: 0; }
.msv-kind-pdf .msv-frame, .msv-kind-page .msv-frame, .msv-kind-embed .msv-frame, .msv-kind-office .msv-frame { position: relative; z-index: 1; background: transparent; }
.msv-pages { position: relative; z-index: 1; background: #f1f4f7; }
