/**
 * EMU Platform Theme Shell.
 * Scoped to .emu-platform-shell. No module-specific styling.
 */

.emu-platform-shell,
.emu-platform-shell * {
    box-sizing: border-box;
}

.emu-platform-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% -10%, color-mix(in srgb, var(--emu-primary, #029b9b) 22%, transparent), transparent 30rem),
        var(--emu-bg, #161b1d);
    color: var(--emu-text, #f2f4f4);
    font-family: var(--emu-shell-font, var(--emu-font, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif));
    line-height: 1.55;
}

.emu-platform-shell a {
    color: var(--emu-primary, #029b9b);
    text-decoration-thickness: .08em;
    text-underline-offset: .18em;
}

.emu-shell-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--emu-bg, #161b1d) 86%, transparent);
    border-bottom: 1px solid var(--emu-border, rgba(255,255,255,.12));
}

.emu-shell-header__inner,
.emu-shell-footer__inner,
.emu-shell-container {
    width: min(100% - calc(var(--emu-page-padding-mobile, 16px) * 2), var(--emu-layout-content, 1180px));
    margin-inline: auto;
}

.emu-shell-container--narrow {
    max-width: var(--emu-layout-narrow, 760px);
}

.emu-shell-container--wide {
    width: min(100% - calc(var(--emu-page-padding-mobile, 16px) * 2), var(--emu-layout-wide, 1440px));
}

.emu-shell-header__inner {
    min-height: var(--emu-header-height, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.emu-shell-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--emu-text, #f2f4f4);
    text-decoration: none;
    font-weight: 750;
    letter-spacing: .02em;
}

.emu-shell-brand img {
    max-height: 46px;
    width: auto;
}

.emu-shell-brand__mark {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--emu-primary, #029b9b);
    border-radius: 999px;
    color: var(--emu-primary, #029b9b);
}

.emu-shell-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.emu-shell-nav a {
    display: inline-flex;
    min-height: var(--emu-touch-target, 44px);
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--emu-text-muted, #b8c2c4);
    text-decoration: none;
}

.emu-shell-nav a:hover,
.emu-shell-nav a:focus-visible {
    color: var(--emu-text, #f2f4f4);
    background: color-mix(in srgb, var(--emu-primary, #029b9b) 18%, transparent);
    outline: none;
}

.emu-shell-nav--desktop {
    display: none;
}

.emu-shell-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: var(--emu-touch-target, 44px);
    height: var(--emu-touch-target, 44px);
    border: 1px solid var(--emu-border, rgba(255,255,255,.12));
    border-radius: 12px;
    color: var(--emu-text, #f2f4f4);
    background: var(--emu-menu-panel-bg, var(--emu-card, #22282b));
    cursor: pointer;
}

.emu-shell-nav--mobile {
    border-top: 1px solid var(--emu-border, rgba(255,255,255,.12));
    padding: 8px var(--emu-page-padding-mobile, 16px) 14px;
}

.emu-shell-nav--mobile ul {
    flex-direction: column;
}

.emu-shell-main {
    min-height: 70vh;
}

.emu-shell-section {
    padding-block: clamp(var(--emu-section-spacing-mobile, 28px), 6vw, var(--emu-section-spacing-desktop, 72px));
}

.emu-shell-card,
.emu-shell-entry:not(.emu-shell-entry--landing) {
    border: 1px solid var(--emu-border, rgba(255,255,255,.12));
    border-radius: var(--emu-radius, 18px);
    background: color-mix(in srgb, var(--emu-card, #22282b) 88%, transparent);
    box-shadow: 0 18px 54px rgba(0,0,0,.22);
}

.emu-shell-entry {
    overflow-wrap: anywhere;
}

.emu-shell-entry:not(.emu-shell-entry--landing) {
    padding: clamp(18px, 4vw, 40px);
}

.emu-shell-title {
    margin: 0 0 1rem;
    color: var(--emu-text, #f2f4f4);
    font-size: clamp(2rem, 8vw, 4.5rem);
    line-height: 1.04;
    letter-spacing: -.04em;
}

.emu-shell-entry__content > *:first-child {
    margin-top: 0;
}

.emu-shell-entry__content > *:last-child {
    margin-bottom: 0;
}

.emu-shell-entry__content img,
.emu-shell-entry__content video,
.emu-shell-entry__content iframe {
    max-width: 100%;
}

.emu-shell-entry__content :where(button, .button, input[type="submit"], input[type="button"]) {
    min-height: 44px;
}

.emu-shell-footer {
    border-top: 1px solid var(--emu-border, rgba(255,255,255,.12));
    background: color-mix(in srgb, var(--emu-bg, #161b1d) 92%, var(--emu-card, #22282b));
}

.emu-shell-footer__inner {
    display: grid;
    gap: 16px;
    padding-block: var(--emu-footer-spacing, 28px);
}

.emu-shell-footer__brand {
    color: var(--emu-text-muted, #b8c2c4);
}

.emu-shell-footer__nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 0;
    margin: 0;
}

/* Layout modes */
.emu-platform-shell--focus {
    display: grid;
    place-items: center;
    padding: var(--emu-page-padding-mobile, 16px);
}

.emu-platform-shell--focus .emu-shell-main {
    width: min(100%, var(--emu-layout-narrow, 760px));
}

.emu-platform-shell--landing .emu-shell-entry {
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* WordPress alignment compatibility within shell only. */
.emu-platform-shell .alignwide {
    max-width: var(--emu-layout-wide, 1440px);
}

.emu-platform-shell .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

@media (min-width: 782px) {
    .emu-shell-header__inner,
    .emu-shell-footer__inner,
    .emu-shell-container {
        width: min(100% - calc(var(--emu-page-padding-tablet, 24px) * 2), var(--emu-layout-content, 1180px));
    }

    .emu-shell-container--wide {
        width: min(100% - calc(var(--emu-page-padding-tablet, 24px) * 2), var(--emu-layout-wide, 1440px));
    }
}

@media (min-width: 1180px) {
    .emu-shell-nav--desktop {
        display: block;
    }

    /*
     * Keep the account/side-menu trigger available on desktop.
     * v0.1.9 hid both the trigger and the offcanvas drawer above the desktop
     * breakpoint, so the menu could not expand cleanly on wide screens.
     */
    .emu-shell-menu-toggle {
        display: inline-grid;
    }

    .emu-shell-offcanvas {
        display: block;
    }

    .emu-shell-header__inner,
    .emu-shell-footer__inner,
    .emu-shell-container {
        width: min(100% - calc(var(--emu-page-padding-desktop, 32px) * 2), var(--emu-layout-content, 1180px));
    }

    .emu-shell-container--wide {
        width: min(100% - calc(var(--emu-page-padding-desktop, 32px) * 2), var(--emu-layout-wide, 1440px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .emu-platform-shell *,
    .emu-platform-shell *::before,
    .emu-platform-shell *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}


.emu-shell-header__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Keep the account/avatar menu trigger clickable above app content and module hero overlays. */
.emu-platform-app-header__actions,
.emu-shell-header__actions {
    position: relative;
    z-index: 5;
}

.emu-platform-app-header .emu-shell-menu-toggle,
.emu-shell-header .emu-shell-menu-toggle {
    position: relative;
    z-index: 6;
    pointer-events: auto;
}

.emu-shell-menu-toggle--avatar {
    overflow: hidden;
    padding: 2px;
    border-radius: 999px;
}

.emu-shell-menu-toggle--avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.emu-shell-menu-toggle__hamburger {
    line-height: 1;
}


/* Mobile / tablet offcanvas navigation. Theme shell only. */
.emu-shell-offcanvas[hidden] {
    display: none;
}

.emu-shell-offcanvas {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.emu-shell-offcanvas__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: color-mix(in srgb, var(--emu-bg, #050607) 62%, transparent);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.emu-shell-offcanvas__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(86vw, 420px);
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--emu-menu-panel-bg, var(--emu-card, #22282b));
    color: var(--emu-text, #f2f4f4);
    border-left: 1px solid var(--emu-border, rgba(255,255,255,.12));
    box-shadow: -28px 0 70px rgba(0,0,0,.38);
    transform: translateX(100%);
    transition: transform .22s ease;
}

.emu-shell-offcanvas.is-open .emu-shell-offcanvas__panel {
    transform: translateX(0);
}

.emu-shell-offcanvas__head {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: color-mix(in srgb, var(--emu-menu-panel-bg, var(--emu-bg, #050607)) 94%, transparent);
    border-bottom: 1px solid var(--emu-border, rgba(255,255,255,.12));
}

.emu-shell-offcanvas__head strong {
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: .02em;
}

.emu-shell-offcanvas__close {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: var(--emu-text, #f2f4f4);
    font: inherit;
    font-size: .78rem;
    font-weight: 650;
    letter-spacing: .02em;
    cursor: pointer;
    text-transform: uppercase;
}

.emu-shell-offcanvas__user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px;
    border-bottom: 1px solid var(--emu-border, rgba(255,255,255,.12));
}

.emu-shell-offcanvas__avatar-link,
.emu-shell-offcanvas__user-name,
.emu-shell-offcanvas__user-edit {
    color: inherit;
    text-decoration: none;
}

.emu-shell-offcanvas__avatar-link {
    display: inline-flex;
    flex: 0 0 auto;
    border-radius: 999px;
}

.emu-shell-offcanvas__avatar {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    object-fit: cover;
    background: var(--emu-surface, #15191b);
}

.emu-shell-offcanvas__user-text {
    display: grid;
    gap: 2px;
}

.emu-shell-offcanvas__user-text strong {
    color: var(--emu-text, #f2f4f4);
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.2;
}

.emu-shell-offcanvas__user-edit {
    color: var(--emu-text-muted, #b8c2c4);
    font-size: .92rem;
}

.emu-shell-offcanvas__avatar-link:hover,
.emu-shell-offcanvas__avatar-link:focus-visible,
.emu-shell-offcanvas__user-name:hover,
.emu-shell-offcanvas__user-name:focus-visible,
.emu-shell-offcanvas__user-edit:hover,
.emu-shell-offcanvas__user-edit:focus-visible {
    color: var(--emu-text, #f2f4f4);
    outline: none;
}

.emu-shell-offcanvas .emu-shell-nav--mobile {
    display: block;
    border-top: 0;
    padding: 18px 22px;
    border-bottom: 1px solid var(--emu-border, rgba(255,255,255,.12));
}

.emu-shell-offcanvas .emu-shell-nav--mobile ul {
    display: grid;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.emu-shell-offcanvas .emu-shell-nav--mobile li {
    margin: 0;
}

.emu-shell-offcanvas .emu-shell-nav--mobile a {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--emu-text, #f2f4f4);
    text-decoration: none;
}

.emu-shell-offcanvas .emu-shell-nav--mobile a:hover,
.emu-shell-offcanvas .emu-shell-nav--mobile a:focus-visible {
    color: var(--emu-text, #f2f4f4);
    background: color-mix(in srgb, var(--emu-primary, #029b9b) 16%, transparent);
    outline: none;
}

.emu-shell-offcanvas .emu-shell-nav--mobile .sub-menu {
    margin: 2px 0 10px 14px;
    padding-left: 10px;
    border-left: 1px solid var(--emu-border, rgba(255,255,255,.12));
}

.emu-shell-offcanvas .emu-shell-nav--mobile .sub-menu a {
    min-height: 38px;
    color: var(--emu-text-muted, #b8c2c4);
    font-size: .94rem;
}

.emu-shell-offcanvas__account {
    display: grid;
    gap: 4px;
    padding: 18px 22px 24px;
}

.emu-shell-offcanvas__account a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--emu-text, #f2f4f4);
    text-decoration: none;
}

.emu-shell-offcanvas__account a:hover,
.emu-shell-offcanvas__account a:focus-visible {
    background: color-mix(in srgb, var(--emu-primary, #029b9b) 16%, transparent);
    outline: none;
}

body.emu-shell-menu-open {
    overflow: hidden;
}

@media (max-width: 420px) {
    .emu-shell-offcanvas__panel {
        width: min(92vw, 380px);
    }

    .emu-shell-offcanvas__head,
    .emu-shell-offcanvas__user,
    .emu-shell-offcanvas .emu-shell-nav--mobile,
    .emu-shell-offcanvas__account {
        padding-left: 18px;
        padding-right: 18px;
    }
}



/* Desktop side drawer refinement. */
@media (min-width: 1180px) {
    .emu-shell-offcanvas__panel {
        width: min(420px, calc(100vw - 48px));
    }

    .emu-shell-offcanvas__backdrop {
        backdrop-filter: blur(5px);
    }
}

/**
 * Floating scroll-to-top button.
 * Visual behavior ported from the reference app-shell button.
 */
.emu-platform-scroll-top {
    --emu-scroll-progress: 0deg;
    --emu-scroll-ring: .75px;
    --emu-safe-right: env(safe-area-inset-right, 0px);
    --emu-safe-bottom: env(safe-area-inset-bottom, 0px);
    --emu-radius-pill: 999px;
    --emu-primary: #00e5ff;
    --emu-border-strong: rgba(0, 229, 255, .42);
    position: fixed;
    right: max(18px, calc(var(--emu-safe-right) + 18px));
    bottom: max(22px, calc(var(--emu-safe-bottom) + 22px));
    z-index: 90;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: var(--emu-radius-pill);
    color: var(--emu-primary);
    background: rgba(7, 10, 19, .78);
    box-shadow:
        0 0 0 1px rgba(0, 229, 255, .08),
        0 0 22px rgba(0, 229, 255, .24),
        0 18px 42px rgba(0, 0, 0, .34);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    backdrop-filter: blur(14px);
    transition: transform .18s ease, opacity .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.emu-platform-scroll-top::before,
.emu-platform-scroll-top::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.emu-platform-scroll-top::before {
    border: 1px solid var(--emu-border-strong);
    opacity: .58;
}

.emu-platform-scroll-top::after {
    background: conic-gradient(var(--emu-primary) var(--emu-scroll-progress), transparent 0);
    opacity: .96;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--emu-scroll-ring)), #000 calc(100% - var(--emu-scroll-ring)));
    mask: radial-gradient(farthest-side, transparent calc(100% - var(--emu-scroll-ring)), #000 calc(100% - var(--emu-scroll-ring)));
    transition: background .08s linear, -webkit-mask .08s linear, mask .08s linear;
}

.emu-platform-scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.emu-platform-scroll-top:hover,
.emu-platform-scroll-top:focus {
    box-shadow:
        0 0 0 1px rgba(0, 229, 255, .18),
        0 0 28px rgba(0, 229, 255, .38),
        0 18px 42px rgba(0, 0, 0, .34);
    outline: none;
    transform: translateY(-2px);
}

.emu-platform-scroll-top span {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    border-top: 3px solid currentColor;
    border-left: 3px solid currentColor;
    transform: translateY(3px) rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
    .emu-platform-scroll-top::after {
        transition: none;
    }
}

body.emu-shell-menu-open .emu-platform-scroll-top {
    opacity: 0;
    pointer-events: none;
}


/**
 * EMU App Shell.
 * Reference-aligned template layer, EMU-scoped tokens and Design Center variables.
 * No module-specific selectors.
 */
.emu-platform-shell {
    --emu-bg: var(--emu-shell-bg, #03050a);
    --emu-bg-soft: var(--emu-shell-bg-soft, #070914);
    --emu-surface: var(--emu-shell-surface, #10131f);
    --emu-surface-2: var(--emu-shell-surface-2, #161a27);
    --emu-card: var(--emu-shell-card, rgba(18, 21, 33, .9));
    --emu-card-strong: var(--emu-shell-card-strong, rgba(7, 9, 20, .96));
    --emu-text: var(--emu-shell-text, #f8fbff);
    --emu-text-soft: var(--emu-shell-text-soft, #d9e1ef);
    --emu-muted: var(--emu-shell-muted, #aeb8ca);
    --emu-border: var(--emu-shell-border, rgba(255, 255, 255, .12));
    --emu-border-strong: var(--emu-shell-border-strong, rgba(0, 229, 255, .42));
    --emu-primary: var(--emu-shell-primary, #00e5ff);
    --emu-accent-2: var(--emu-shell-accent-2, #a84dff);
    --emu-accent-3: var(--emu-shell-accent-3, #ff4fd8);
    --emu-live: var(--emu-shell-live, #34f5c5);
    --emu-warning: var(--emu-shell-warning, #ffcc66);
    --emu-error: var(--emu-shell-error, #ff7185);
    --emu-radius-card: var(--emu-shell-radius-card, 12px);
    --emu-radius-panel: var(--emu-shell-radius-panel, 16px);
    --emu-radius-pill: var(--emu-shell-radius-pill, 999px);
    --emu-shadow: var(--emu-shell-shadow, 0 24px 80px rgba(0, 0, 0, .38));
    --emu-glow: var(--emu-shell-glow, 0 0 calc(var(--emu-app-glow-strength, 20) * 1px) rgba(0, 229, 255, .2));
    --emu-safe-top: env(safe-area-inset-top, 0px);
    --emu-safe-right: env(safe-area-inset-right, 0px);
    --emu-safe-bottom: env(safe-area-inset-bottom, 0px);
    --emu-safe-left: env(safe-area-inset-left, 0px);
}

body.emu-platform-app-page,
body.emu-platform-blank-page,
body.emu-layout-landing {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at 50% -10%, color-mix(in srgb, var(--emu-primary, #00e5ff) 14%, transparent), transparent 34rem),
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--emu-accent-2, #a84dff) 12%, transparent), transparent 30rem),
        var(--emu-bg, #03050a);
    color: var(--emu-text, #f8fbff);
}

.emu-platform-skip {
    position: fixed;
    left: max(12px, var(--emu-safe-left, 0px));
    top: max(12px, var(--emu-safe-top, 0px));
    z-index: 100000;
    transform: translateY(-140%);
    padding: 10px 12px;
    border-radius: var(--emu-radius-pill, 999px);
    color: #001018;
    background: var(--emu-primary, #00e5ff);
    font-weight: 800;
    text-decoration: none;
}

.emu-platform-skip:focus {
    transform: translateY(0);
}

.emu-platform-app-shell {
    min-height: 100vh;
    max-width: var(--emu-app-max-width, 920px);
    margin-inline: auto;
    color: var(--emu-text, #f8fbff);
    background:
        radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--emu-primary, #00e5ff) 15%, transparent), transparent 24rem),
        radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--emu-accent-2, #a84dff) 12%, transparent), transparent 24rem),
        linear-gradient(180deg, color-mix(in srgb, var(--emu-bg-soft, #070914) 78%, transparent), var(--emu-bg, #03050a));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--emu-border, rgba(255,255,255,.12)) 85%, transparent);
}

.emu-platform-app-header {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: var(--emu-app-header-height, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding:
        calc(10px + var(--emu-safe-top, 0px))
        max(var(--emu-page-padding-mobile, 16px), var(--emu-safe-right, 0px))
        10px
        max(var(--emu-page-padding-mobile, 16px), var(--emu-safe-left, 0px));
    border-bottom: 1px solid var(--emu-border, rgba(255,255,255,.12));
    background: color-mix(in srgb, var(--emu-app-header-bg, var(--emu-bg, #03050a)) 82%, transparent);
    backdrop-filter: blur(18px);
}

.emu-platform-app-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--emu-text, #f8fbff);
    font-weight: 850;
    letter-spacing: .02em;
    text-decoration: none;
}

.emu-platform-app-brand img {
    width: auto;
    max-height: 42px;
}

.emu-platform-app-brand__mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--emu-border-strong, rgba(0,229,255,.42));
    border-radius: var(--emu-radius-pill, 999px);
    color: var(--emu-primary, #00e5ff);
    background: color-mix(in srgb, var(--emu-card, rgba(18,21,33,.9)) 84%, transparent);
    box-shadow: var(--emu-glow, 0 0 24px rgba(0,229,255,.2));
}

.emu-platform-app-brand__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emu-platform-app-header__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.emu-platform-app-content {
    width: min(100% - calc(var(--emu-page-padding-mobile, 16px) * 2), var(--emu-app-max-width, 920px));
    min-height: calc(100vh - var(--emu-app-header-height, 64px));
    margin-inline: auto;
    padding: clamp(18px, 5vw, 34px) 0 calc(var(--emu-app-nav-height, 74px) + var(--emu-safe-bottom, 0px) + 28px);
}

.emu-platform-app-entry,
.emu-platform-blank-entry,
.emu-platform-landing-entry {
    overflow-wrap: anywhere;
}

.emu-platform-blank-content {
    min-height: 100vh;
    display: grid;
    align-content: start;
    width: min(100% - calc(var(--emu-page-padding-mobile, 16px) * 2), var(--emu-layout-wide, 1440px));
    margin-inline: auto;
    padding: calc(24px + var(--emu-safe-top, 0px)) 0 calc(24px + var(--emu-safe-bottom, 0px));
    color: var(--emu-text, #f8fbff);
}

.emu-platform-landing-content {
    padding-block: clamp(28px, 7vw, 72px);
}

.emu-platform-card,
.emu-platform-glow-card,
.emu-platform-app-entry > .wp-block-group,
.emu-platform-landing-entry > .wp-block-group {
    border: 1px solid var(--emu-border, rgba(255,255,255,.12));
    border-radius: var(--emu-radius-panel, 16px);
    background: color-mix(in srgb, var(--emu-card, rgba(18,21,33,.9)) 92%, transparent);
    box-shadow: var(--emu-shadow, 0 24px 80px rgba(0,0,0,.38));
}

.emu-platform-glow-card {
    border-color: var(--emu-border-strong, rgba(0,229,255,.42));
    box-shadow: var(--emu-shadow, 0 24px 80px rgba(0,0,0,.38)), var(--emu-glow, 0 0 24px rgba(0,229,255,.2));
}

.emu-platform-app-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    padding:
        8px
        max(10px, var(--emu-safe-right, 0px))
        calc(8px + var(--emu-safe-bottom, 0px))
        max(10px, var(--emu-safe-left, 0px));
    border-top: 1px solid var(--emu-border, rgba(255,255,255,.12));
    background: color-mix(in srgb, var(--emu-app-nav-bg, var(--emu-bg, #03050a)) 78%, transparent);
    backdrop-filter: blur(18px);
}

.emu-platform-app-nav__inner {
    width: min(100%, var(--emu-app-max-width, 920px));
    margin-inline: auto;
}

.emu-platform-app-nav__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.emu-platform-app-nav__slot,
.emu-platform-app-nav .menu-item {
    min-width: 0;
}

.emu-platform-app-nav__item,
.emu-platform-app-nav .menu-item > a {
    min-height: var(--emu-touch-target, 44px);
    display: grid;
    place-items: center;
    gap: 3px;
    padding: 6px 4px;
    border-radius: var(--emu-radius-card, 12px);
    color: var(--emu-muted, #aeb8ca);
    text-decoration: none;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.1;
}

.emu-platform-app-nav__icon,
.emu-platform-app-nav .menu-item > a > .emu-platform-app-nav__icon {
    min-width: 20px;
    min-height: 20px;
    display: inline-grid;
    place-items: center;
    color: inherit;
    font-size: 18px;
}

.emu-platform-app-nav .menu-item > a > .emu-platform-app-nav__icon:empty::before {
    content: "●";
    font-size: 10px;
}

.emu-platform-app-nav__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emu-platform-app-nav__item:hover,
.emu-platform-app-nav__item:focus-visible,
.emu-platform-app-nav__item.is-active,
.emu-platform-app-nav .current-menu-item > a,
.emu-platform-app-nav .current_page_item > a,
.emu-platform-app-nav .menu-item > a:hover,
.emu-platform-app-nav .menu-item > a:focus-visible {
    color: var(--emu-text, #f8fbff);
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--emu-app-nav-active-bg, var(--emu-primary, #00e5ff)) 24%, transparent),
            color-mix(in srgb, var(--emu-accent-2, #a84dff) 16%, transparent));
    box-shadow: inset 0 0 0 1px var(--emu-border-strong, rgba(0,229,255,.42));
    outline: none;
}

@media (min-width: 782px) {
    .emu-platform-app-shell {
        min-height: 100vh;
        border-inline: 1px solid var(--emu-border, rgba(255,255,255,.12));
    }

    .emu-platform-app-content,
    .emu-platform-blank-content {
        width: min(100% - calc(var(--emu-page-padding-tablet, 24px) * 2), var(--emu-app-max-width, 920px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .emu-platform-skip,
    .emu-platform-app-nav__item,
    .emu-platform-app-nav .menu-item > a {
        transition: none;
    }
}


/* v2.1.0: desktop navigation is available again at the configured desktop breakpoint. */

.emu-shell-header__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    position: relative;
    z-index: 50;
}

.emu-shell-header .emu-shell-menu-toggle,
.emu-platform-app-header .emu-shell-menu-toggle {
    display: inline-grid !important;
    position: relative;
    z-index: 60;
    pointer-events: auto;
}

/* Minimal header notification styling for non-community pages where community module header action is rendered. */
.emu-shell-header .emu-community-header-notifications,
.emu-platform-app-header .emu-community-header-notifications {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.emu-shell-header .emu-community-header-notifications__toggle,
.emu-platform-app-header .emu-community-header-notifications__toggle {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--emu-notification-icon-color, var(--emu-muted, #8a9499));
    cursor: pointer;
    padding: 0;
}

.emu-shell-header .emu-community-header-notifications__icon,
.emu-platform-app-header .emu-community-header-notifications__icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.emu-shell-header .emu-community-header-notifications__svg,
.emu-platform-app-header .emu-community-header-notifications__svg {
    display: block;
    width: 30px;
    height: 30px;
    color: currentColor;
    fill: currentColor;
}

.emu-shell-header .emu-community-header-notifications__badge,
.emu-platform-app-header .emu-community-header-notifications__badge {
    position: absolute;
    right: -2px;
    top: -1px;
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--emu-notification-badge-bg, var(--emu-danger, var(--emu-primary, #00e5ff)));
    color: var(--emu-on-primary, #fff);
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    border: 2px solid var(--emu-app-header-bg, var(--emu-bg, #0d1418));
}

.emu-shell-header .emu-community-header-notifications__panel,
.emu-platform-app-header .emu-community-header-notifications__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 9000;
    width: min(88vw, 340px);
    padding: 10px;
    border: 1px solid var(--emu-border, rgba(255,255,255,.14));
    border-radius: var(--emu-radius, 18px);
    background: var(--emu-notification-panel-bg, linear-gradient(180deg, rgba(18,24,36,.98), rgba(14,20,31,.98)));
    background-color: var(--emu-notification-panel-bg, #121824);
    color: var(--emu-text, #f2f4f4);
    box-shadow: 0 18px 60px rgba(0,0,0,.38);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.emu-shell-header .emu-community-header-notifications__head,
.emu-platform-app-header .emu-community-header-notifications__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 6px 10px;
    color: var(--emu-text, #f2f4f4);
    font-weight: 750;
}

.emu-shell-header .emu-community-header-notifications__mark-read,
.emu-platform-app-header .emu-community-header-notifications__mark-read {
    margin: 0;
}

.emu-shell-header .emu-community-header-notifications__mark-read button,
.emu-platform-app-header .emu-community-header-notifications__mark-read button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--emu-muted, #a9b4bc);
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    padding: 2px 0;
    cursor: pointer;
}

.emu-shell-header .emu-community-header-notifications__empty,
.emu-platform-app-header .emu-community-header-notifications__empty {
    margin: 0;
    padding: 10px 6px;
    color: var(--emu-muted, #a9b4bc);
    font-size: 14px;
}

.emu-shell-header .emu-community-header-notifications__list,
.emu-platform-app-header .emu-community-header-notifications__list {
    display: grid;
    gap: 6px;
}

.emu-shell-header .emu-community-header-notifications__item,
.emu-platform-app-header .emu-community-header-notifications__item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 9px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    color: var(--emu-text, #f2f4f4);
    text-decoration: none;
}

.emu-shell-header .emu-community-header-notifications__avatar,
.emu-platform-app-header .emu-community-header-notifications__avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    overflow: hidden;
    background: color-mix(in srgb, var(--emu-primary, #00e5ff) 18%, var(--emu-card, #111923));
    color: var(--emu-text, #f2f4f4);
    font-size: 13px;
    font-weight: 700;
}

.emu-shell-header .emu-community-header-notifications__avatar img,
.emu-platform-app-header .emu-community-header-notifications__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.emu-shell-header .emu-community-header-notifications__message,
.emu-platform-app-header .emu-community-header-notifications__message {
    min-width: 0;
    color: var(--emu-text, #f2f4f4);
    font-size: 13px;
    line-height: 1.35;
}

.emu-shell-nav__fallback {
    list-style: none;
    margin: 0;
    padding: 0;
}


/* v2.1.0 navigation consolidation */
body.emu-has-bottom-nav .emu-shell-main {
    padding-bottom: calc(var(--emu-app-nav-height, 74px) + env(safe-area-inset-bottom, 0px) + 18px);
}

/* Keep the Language module switcher visually aligned with the theme navigation. */
.emu-shell-nav .emu-language-switcher-dropdown {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    color: inherit;
}
.emu-shell-nav .emu-language-switcher-dropdown > summary {
    min-height: var(--emu-touch-target, 44px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--emu-text-muted, #b8c2c4);
    font: inherit;
    font-weight: inherit;
    line-height: 1.2;
    cursor: pointer;
    list-style: none;
}
.emu-shell-nav .emu-language-switcher-dropdown > summary::-webkit-details-marker { display:none; }
.emu-shell-nav .emu-language-switcher-dropdown > summary:hover,
.emu-shell-nav .emu-language-switcher-dropdown > summary:focus-visible,
.emu-shell-nav .emu-language-switcher-dropdown[open] > summary {
    color: var(--emu-text, #f2f4f4);
    background: color-mix(in srgb, var(--emu-primary, #029b9b) 18%, transparent);
    outline: none;
}
.emu-shell-nav .emu-language-switcher-current-code {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    font-size: 16px;
    line-height: 1;
}
.emu-shell-nav .emu-language-switcher-current-name { display:inline; }
.emu-shell-nav .emu-language-switcher-menu {
    position: absolute;
    z-index: 99999;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--emu-border, rgba(255,255,255,.12));
    border-radius: var(--emu-radius-card, 12px);
    background: var(--emu-menu-panel-bg, var(--emu-card, #10131f));
    color: var(--emu-menu-panel-text, var(--emu-text, #f8fbff));
    box-shadow: var(--emu-shadow, 0 18px 54px rgba(0,0,0,.32));
}
.emu-shell-nav .emu-language-switcher-menu .emu-language-switcher-link {
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    min-height:40px;
    padding:8px 10px;
    border:0;
    border-radius:9px;
    color:inherit;
    background:transparent;
    text-decoration:none;
    white-space:nowrap;
}
.emu-shell-nav .emu-language-switcher-menu .emu-language-switcher-link:hover,
.emu-shell-nav .emu-language-switcher-menu .emu-language-switcher-link:focus-visible,
.emu-shell-nav .emu-language-switcher-menu .emu-language-switcher-link.is-active {
    background: color-mix(in srgb, var(--emu-primary, #00e5ff) 14%, transparent);
    outline:none;
}
.emu-shell-nav .emu-language-switcher-menu .emu-language-switcher-code { min-width:24px; font-weight:800; }
