/**
 * DropX Prime Content Canvas
 * A single theme-aware translucent surface from the global notice through
 * the main page and footer. The fixed gold profile rail and chat-head stack
 * are intentionally not descendants of this surface.
 */
:root {
    --dx-shell-frame-gutter: clamp(92px, 7.5vw, 120px);
    --dx-shell-frame-max: 1550px;
    --dx-canvas-radius: 14px;
    --dx-canvas-bg: linear-gradient(180deg, rgba(9, 12, 16, .68), rgba(6, 8, 11, .76));
    --dx-canvas-border: rgba(190, 199, 209, .16);
    --dx-canvas-shadow: 0 24px 70px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.035);
    --dx-canvas-blur: 18px;
}

body.light-mode {
    --dx-canvas-bg: linear-gradient(180deg, rgba(247, 243, 235, .78), rgba(235, 229, 218, .82));
    --dx-canvas-border: rgba(105, 87, 61, .20);
    --dx-canvas-shadow: 0 20px 56px rgba(65, 51, 31, .10), inset 0 1px 0 rgba(255,255,255,.72);
}

@media (min-width: 1201px) {
    html body .sticky-header-wrapper,
    html body .app-container {
        width: min(calc(100vw - var(--dx-shell-frame-gutter) - var(--dx-shell-frame-gutter)), var(--dx-shell-frame-max));
        max-width: var(--dx-shell-frame-max);
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    html body .sticky-header-wrapper {
        margin-top: 0;
        border-top: 1px solid var(--dx-canvas-border);
        border-left: 1px solid var(--dx-canvas-border);
        border-right: 1px solid var(--dx-canvas-border);
        border-radius: var(--dx-canvas-radius) var(--dx-canvas-radius) 0 0;
        background: var(--dx-canvas-bg);
        box-shadow: 0 8px 26px rgba(0,0,0,.16);
    }

    html body .app-container {
        display: flex;
        flex-direction: column;
        min-width: 0;
        margin-top: 0;
        margin-bottom: 28px;
        padding: 0;
        border: 1px solid var(--dx-canvas-border);
        border-top: 0;
        border-radius: 0 0 var(--dx-canvas-radius) var(--dx-canvas-radius);
        background: var(--dx-canvas-bg);
        background-clip: padding-box;
        -webkit-backdrop-filter: blur(var(--dx-canvas-blur));
        backdrop-filter: blur(var(--dx-canvas-blur));
        box-shadow: var(--dx-canvas-shadow);
        overflow: visible;
    }

    /* All direct content layers share the canvas width; no second gutter is
       added here. The canvas itself provides equal outer left/right margins. */
    html body .app-container > .dx-forum-global-pin,
    html body .app-container > .dx-forum-global-banner,
    html body .app-container > #main-content,
    html body .app-container > .site-footer {
        width: 100%;
        max-width: none;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
        align-self: stretch;
    }

    html body .app-container > .dx-forum-global-pin,
    html body .app-container > .dx-forum-global-banner {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    html body .app-container > #main-content {
        flex: 1 0 auto;
        background: transparent;
    }

    html body .app-container > .site-footer {
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 0 0 var(--dx-canvas-radius) var(--dx-canvas-radius);
        background: rgba(5, 7, 10, .20);
    }

    body.light-mode .app-container > .site-footer {
        background: rgba(255, 255, 255, .20);
    }
}

@media (min-width: 1201px) {
    /* Older page modules had conservative max-widths. Let the shared canvas
       supply the page width while keeping each page's own grid proportions. */
    html body .app-container > #main-content .dx-forum-shell,
    html body .app-container > #main-content .groups-hub-layout,
    html body .app-container > #main-content #profile.profile-page,
    html body .app-container > #main-content .profile-media-page {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    html body .app-container > .dx-forum-global-banner {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }
}
