.md-site-viewport {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    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;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    display: block;
    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):not(.md-site-tabbar) { display: none !important; }
html.md-site-framed body > .md-site-tabbar { z-index: 2147482500 !important; }
.md-site-tabbar[hidden] { display: none !important; }
.md-mobile-tabbar[data-md-site-child-tabbar] { visibility: hidden !important; pointer-events: none; }

.md-site-preview-tabbar { z-index: 2147482500 !important; }

.md-site-my-preview {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: auto;
    background: var(--md-mobile-bg, #111113);
    color: var(--md-mobile-text, #e7e7e7);
    font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.md-site-my-preview-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    max-width: var(--md-h5-width, 540px);
    margin: 0 auto;
    padding: calc(24px + env(safe-area-inset-top, 0px)) clamp(12px, 4vw, 24px) 7px;
    background: radial-gradient(ellipse at 0 0, #2c211b 0, transparent 74%);
}

.md-site-my-preview-avatar {
    display: grid;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    place-items: center;
    box-sizing: border-box;
    border: 2px solid #f8c68d46;
    border-radius: 50%;
    background: var(--md-mobile-surface, #1c1d21);
    color: var(--md-mobile-accent, #ffd09b);
    font-size: 25px;
}

.md-site-my-preview h1 { margin: 0; font-size: 22px; line-height: 1.23; }
.md-site-my-preview p { margin: 6px 0 0; font-size: 12px; color: var(--md-mobile-muted, #a4a5ad); }

.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;
}
