.md-site-viewport {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    pointer-events: none;
}
.md-site-viewport[hidden], .md-site-error[hidden], .md-site-error [hidden] {
    display: none !important;
}
.md-site-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    margin: 0;
    visibility: hidden;
    pointer-events: none;
    background: #101010;
}
.md-site-frame.is-active {
    visibility: visible;
    pointer-events: auto;
}
html.md-site-framed, html.md-site-framed body { overflow: hidden !important; }
html.md-site-framed body > :not(.md-site-viewport):not(.md-site-error) { display: none !important; }

.md-site-route-shell {
    position: fixed;
    inset: 0;
    z-index: 2147481000;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0 16px 24px;
    background: #101012;
    color: #eee;
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.md-site-route-shell h2 {
    margin: 0;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}
.md-site-route-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 10px;
    max-width: 1180px;
    margin: 8px auto;
}
.md-site-route-cards span::before, .md-site-route-cards span::after {
    content: "";
    display: block;
    border-radius: 5px;
    background: #212125;
}
.md-site-route-cards span::before { aspect-ratio: 16 / 9; }
.md-site-route-cards span::after { width: 65%; height: 10px; margin-top: 9px; }
.el-tabs__nav[data-md-route-pending] .el-tabs__active-bar { visibility: hidden; }
@media (min-width: 800px) {
    .md-site-route-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Only errors expose recovery actions. The address and current contents still work. */
.md-site-error {
    position: fixed;
    z-index: 2147483000;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: max-content;
    max-width: calc(100% - 40px);
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #242424;
    color: #fff;
    font: 14px/1.4 system-ui, sans-serif;
}
.md-site-error button, .md-site-error a {
    padding: 5px;
    border: 0;
    background: transparent;
    color: #ffd544;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}
