/**
 * Page Layout Metrics — Theme-based skabelon for all pages
 * Standard: header-to-main spacing, no misdirection, consistent offsets.
 * Use on every page that uses the fixed nav-toolbar.
 * Add class="layout-standard" to body to opt in.
 */
:root {
    --header-height: 64px;
    --main-offset-top: 24px;
    --page-top-padding: calc(var(--header-height) + var(--main-offset-top));
    --page-bottom-padding: 48px;
    --page-side-padding: 24px;
    --content-max-width: 1400px;
}

body.layout-standard {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
}

/* Apply to main content container. Nav is fixed; this reserves space. */
body.layout-standard .page-main,
body.layout-standard .page-main-wrap,
body.layout-standard .trophies-container,
body.layout-standard .shop-page,
body.layout-standard .gallery-page,
body.layout-standard .profile-page,
body.layout-standard .profile-container,
body.layout-standard .dashboard-container,
body.layout-standard .generator-container,
body.layout-standard .generator-page,
body.layout-standard .debugger-main,
body.layout-standard .battle-page,
body.layout-standard .battle-arena,
body.layout-standard .social-page,
body.layout-standard .unified-dashboard,
body.layout-standard .lab-page,
[data-page-layout="standard"] {
    padding-top: var(--page-top-padding) !important;
    padding-bottom: var(--page-bottom-padding) !important;
    padding-left: var(--page-side-padding) !important;
    padding-right: var(--page-side-padding) !important;
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* Debugger: extra space between header line and main to avoid overlap */
.debugger-main .container,
.debugger .container,
.container[data-page="debugger"] {
    margin-top: var(--main-offset-top);
}

.container[data-page="debugger"] {
    padding-top: var(--main-offset-top);
}

/* Narrow main-offset for dense layouts (optional) */
.page-layout-dense {
    --main-offset-top: 12px;
}
