html {
    background: var(--bg, #f4f6fb);
    color: var(--text, #172033);
    font-family: Arial, sans-serif;
}

#app {
    min-height: 100vh;
}

@media (min-width: 901px) {
    html:has(#app .console-panel:not(.expanded)) {
        overflow-y: clip;
    }
}

.app-loading {
    margin: 0;
    padding: 24px;
}

.site-guide {
    width: min(860px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 48px);
    margin: auto;
    box-sizing: border-box;
    padding: 24px;
    overflow-y: auto;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.site-guide::backdrop {
    background: rgba(10, 20, 40, 0.5);
}

.guide-close {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: flex-end;
}

.guide-close button {
    padding: 6px 12px;
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    background: var(--btn-bg);
    color: var(--btn-text);
    cursor: pointer;
}

.site-guide h2,
.site-guide h3 {
    line-height: 1.3;
}

.site-guide h3 {
    margin-top: 32px;
}

.site-guide a {
    color: var(--accent, #2563eb);
    text-underline-offset: 3px;
}

:root[data-theme="dark"] .site-guide a {
    color: #93c5fd;
}

.site-guide nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.site-guide pre {
    padding: 16px;
    overflow-x: auto;
    background: var(--panel-bg, #ffffff);
    border: 1px solid var(--panel-border, #dce1ec);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
}
