/* Shared Studio-style workspace navigation (welcome bar + pill nav) */

:root {
    --alysum-nav-sticky-offset: 45px;
}

.is-hidden {
    display: none !important;
}

.wd-welcome-bar {
    position: relative;
    z-index: 45;
    flex-shrink: 0;
    padding: 0 clamp(16px, 3vw, 32px);
    min-height: 88px;
    display: flex;
    align-items: center;
    overflow: visible;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(
        --theme-welcome-bar,
        var(
            --alysum-chrome-gradient,
            linear-gradient(
                135deg,
                rgba(76, 29, 149, 0.95) 0%,
                var(--theme-header-mid, #6d28d9) 38%,
                var(--theme-header-end, #db2777) 100%
            )
        )
    );
    background-size: cover;
    background-position: center;
    box-shadow:
        0 4px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.wd-welcome-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 50%, rgba(255, 255, 255, 0.14) 0%, transparent 42%),
        radial-gradient(circle at 88% 20%, rgba(251, 191, 36, 0.12) 0%, transparent 40%);
    pointer-events: none;
}

.wd-welcome-bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    pointer-events: none;
}

.wd-welcome-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.5vw, 20px);
}

.wd-pfp-menu {
    position: relative;
    flex-shrink: 0;
}

.wd-pfp-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
}

.wd-pfp-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.78);
    pointer-events: none;
    animation: wd-pfp-pulse 1.8s ease-out infinite;
}

.wd-pfp-menu.is-open .wd-pfp-btn::after {
    animation: none;
    opacity: 0;
}

.wd-pfp-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

@keyframes wd-pfp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.22);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wd-pfp-btn::after {
        animation: none;
        opacity: 0.55;
    }
}

.wd-pfp {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.28);
    border: 2px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.wd-pfp-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 50;
    min-width: 188px;
    padding: 8px;
    border-radius: 14px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--alysum-ui-panel, #111827) 88%, white),
        var(--alysum-ui-panel, #111827)
    );
    color: var(--text, #fff);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.wd-pfp-dropdown[hidden] {
    display: none;
}

.wd-pfp-dropdown a,
.wd-pfp-dropdown button {
    display: block;
    width: 100%;
    flex: none;
    margin: 0 0 4px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--alysum-ui-raised, #2a2a2a);
    color: var(--text, #fff);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.wd-pfp-dropdown a:last-child,
.wd-pfp-dropdown button:last-child {
    margin-bottom: 0;
}

.wd-pfp-dropdown a:hover,
.wd-pfp-dropdown button:hover {
    color: var(--text, #fff);
    background: color-mix(in srgb, var(--alysum-ui-raised, #2a2a2a) 82%, white);
}

.wd-pfp-dropdown .settings-nav-logout,
.wd-pfp-dropdown button.settings-nav-logout {
    margin-top: 4px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.35);
    border-color: rgba(248, 113, 113, 0.35);
}

.wd-pfp img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wd-pfp-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
}

.wd-pfp-initial.is-hidden { display: none; }

.wd-welcome-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.wd-welcome-title {
    margin: 0;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
    color: var(--alysum-display-mid, var(--chrome-text, #fff));
    text-shadow:
        0 1px 3px var(--alysum-display-shadow, rgba(0, 0, 0, 0.25)),
        0 0 18px var(--alysum-display-glow, transparent);
}

.wd-welcome-bar[data-chrome-ink="black"] .wd-welcome-title,
.wd-welcome-bar[data-chrome-ink="grey"] .wd-welcome-title {
    text-shadow:
        0 1px 3px var(--alysum-display-shadow, transparent),
        0 0 18px var(--alysum-display-glow, transparent);
}

.wd-welcome-title .wd-name {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: var(--alysum-display-highlight, var(--alysum-display-mid, #fff));
    -webkit-text-fill-color: currentColor;
}

.wd-welcome-sub {
    display: none !important;
}

.wd-nav-wrap {
    position: sticky;
    top: 0;
    z-index: 40;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--theme-header-mid, #7c3aed) 55%, transparent) transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.5)),
        var(
            --theme-nav-bar,
            var(
                --alysum-chrome-gradient,
                linear-gradient(135deg, var(--purple-dark, #5b21b6), var(--theme-header-mid, #6d28d9), var(--theme-header-end, #db2777))
            )
        );
    background-size: cover;
    background-position: center;
}

.wd-nav-wrap::-webkit-scrollbar {
    height: 4px;
}

.wd-nav-wrap::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--theme-header-mid, #7c3aed) 55%, transparent);
    border-radius: 999px;
}

.wd-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px 6px;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 10px clamp(12px, 2vw, 24px);
    box-sizing: border-box;
}

.wd-nav > a,
.wd-nav > button {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px clamp(10px, 0.9vw, 14px);
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--chrome-text, var(--ui-text, var(--text, #fff)));
    font-family: inherit;
    font-size: clamp(12px, 0.85vw, 13px);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.wd-nav > a:hover,
.wd-nav > button:hover {
    color: var(--chrome-text, var(--text, #fff));
    background: rgba(255, 255, 255, 0.06);
}

.wd-nav > a.is-active,
.wd-nav > button.is-active {
    color: var(--chrome-text, var(--text, #fff));
    border-color: rgba(255, 255, 255, 0.38);
    background: var(
        --theme-nav-bar,
        var(
            --alysum-chrome-gradient,
            linear-gradient(
                135deg,
                var(--purple-dark, #5b21b6),
                var(--theme-header-mid, #6d28d9),
                var(--theme-header-end, #db2777)
            )
        )
    );
    background-size: cover;
    background-position: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.wd-nav > a.is-active[data-chrome-ink="black"],
.wd-nav > a.is-active[data-chrome-ink="grey"],
.wd-nav > button.is-active[data-chrome-ink="black"],
.wd-nav > button.is-active[data-chrome-ink="grey"] {
    text-shadow: none;
}

.wd-nav > a.is-hidden,
.wd-nav > button.is-hidden { display: none; }

.account-mode-toggle {
    position: relative;
    margin-left: auto;
    flex: 0 0 auto;
    z-index: 6;
}

.account-mode-switch {
    appearance: none;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.95);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
}

.account-mode-switch-caret {
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
}

.account-mode-toggle.is-open .account-mode-switch-caret {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.account-mode-switch:hover {
    background: rgba(0, 0, 0, 0.34);
    border-color: rgba(255, 255, 255, 0.36);
}

.account-mode-switch:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

.account-mode-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 148px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--alysum-ui-panel, #111827) 88%, white),
            var(--alysum-ui-panel, #111827)
        );
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.account-mode-menu[hidden] {
    display: none;
}

.account-mode-menu a,
.account-mode-menu button {
    appearance: none;
    display: block;
    width: 100%;
    margin: 0 0 4px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--alysum-ui-raised, #2a2a2a);
    color: var(--text, #fff);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.account-mode-menu a:last-child,
.account-mode-menu button:last-child {
    margin-bottom: 0;
}

.account-mode-menu a:hover,
.account-mode-menu button:hover {
    background: color-mix(in srgb, var(--alysum-ui-raised, #2a2a2a) 82%, white);
}

.account-mode-menu a[aria-current="true"],
.account-mode-menu button[aria-current="true"] {
    border-color: color-mix(in srgb, var(--purple-bright, #9333ea) 55%, transparent);
    background: color-mix(in srgb, var(--purple, #6d28d9) 28%, transparent);
}

.account-mode-toggle + .wd-loadout-menu,
.account-mode-toggle + #notification-bell {
    margin-left: 8px;
}

.wd-loadout-menu {
    position: relative;
    margin-left: auto;
    flex: 0 0 auto;
}

.account-mode-toggle ~ .wd-loadout-menu {
    margin-left: 8px;
}

#notification-bell {
    flex: 0 0 auto;
}

.account-mode-toggle ~ #notification-bell {
    margin-left: 8px;
}

.wd-loadout-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px clamp(10px, 0.9vw, 14px);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.22);
    color: var(--chrome-text, var(--text, #fff));
    font-family: inherit;
    font-size: clamp(12px, 0.85vw, 13px);
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.wd-loadout-btn::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
}

.wd-loadout-menu.is-open .wd-loadout-btn {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.1);
}

.wd-loadout-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    min-width: 198px;
    padding: 8px;
    border-radius: 14px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--alysum-ui-panel, #111827) 88%, white),
        var(--alysum-ui-panel, #111827)
    );
    color: var(--text, #fff);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.wd-loadout-dropdown[hidden] {
    display: none;
}

/* Saved themes expand inside the account menu instead of the navigation row. */
.wd-pfp-dropdown {
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
}

.wd-pfp-dropdown .wd-loadout-menu {
    width: 100%;
    margin: 0 0 4px;
}

.wd-pfp-dropdown .wd-loadout-btn {
    display: flex;
    justify-content: space-between;
}

.wd-pfp-dropdown .wd-loadout-dropdown {
    position: static;
    min-width: 0;
    width: 100%;
    max-height: min(40vh, 280px);
    overflow-y: auto;
    padding: 4px 0 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.wd-pfp-dropdown .wd-loadout-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 18px;
}

.wd-loadout-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 4px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--alysum-ui-raised, #2a2a2a);
    color: var(--text, #fff);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.wd-loadout-item:last-child {
    margin-bottom: 0;
}

.wd-loadout-item:hover {
    background: color-mix(in srgb, var(--alysum-ui-raised, #2a2a2a) 82%, white);
}

.wd-loadout-swatch {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: #27272a;
}

.wd-loadout-empty {
    margin: 0;
    padding: 10px 12px;
    color: var(--muted, #94a3b8);
    font-size: 13px;
    font-weight: 700;
}

html[data-gradient-theme="blanc"] .wd-loadout-btn {
    border-color: rgba(24, 24, 27, 0.2);
    background: rgba(255, 255, 255, 0.45);
}

.wd-nav-logout { color: #fca5a5; }

.wd-nav-logout:hover {
    color: #fecaca;
    background: rgba(248, 113, 113, 0.12);
}

.wd-nav-discord {
    color: #fff;
    background: #5865f2;
    border-color: rgba(255, 255, 255, 0.18);
}

.wd-nav-discord:hover {
    color: #fff;
    background: #4752c4;
    border-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 1200px) {
    .wd-nav-divider { display: none; }
}

.wd-nav-divider {
    flex-shrink: 0;
    width: 1px;
    height: 22px;
    margin: 0 2px;
    background: rgba(255, 255, 255, 0.12);
}

.wd-nav-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
}

.wd-nav-badge.is-hidden { display: none; }

/* "New!" feature badges — distinct from red notification counts */
.wd-nav-new,
.fh-target-new,
.fh-page-new {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    margin-left: 2px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #1c1917;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 0.04em;
    line-height: 1.35;
    text-transform: uppercase;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.wd-nav-new.is-hidden,
.fh-target-new.is-hidden,
.fh-page-new.is-hidden { display: none; }

#tab-profile.fh-has-new-badge,
.settings-nav button.fh-has-new-badge {
    position: relative;
}

.settings-nav button.fh-has-new-badge .fh-page-new {
    position: absolute;
    top: 4px;
    right: 6px;
    margin-left: 0;
    z-index: 1;
}

#author-bio.fh-section-spotlight,
#author-support.fh-section-spotlight,
.fh-section-spotlight {
    outline: 2px solid rgba(251, 191, 36, 0.85);
    outline-offset: 4px;
    border-radius: 16px;
    animation: fhSectionPulse 1.4s ease-in-out 2;
}

@keyframes fhSectionPulse {
    0%, 100% { outline-color: rgba(251, 191, 36, 0.85); }
    50% { outline-color: rgba(249, 115, 22, 0.95); }
}

.fh-spotlight-where {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.22);
    color: #fde68a;
    font-size: 13px;
    line-height: 1.45;
}

.fh-spotlight-where-label {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 10px;
    color: #fcd34d;
    margin-right: 6px;
}

.fh-has-new-badge { position: relative; }

button.fh-has-new-badge .fh-target-new,
.pill-btn.fh-has-new-badge .fh-target-new {
    position: absolute;
    top: -7px;
    right: -4px;
    margin-left: 0;
    z-index: 1;
}

.topbar-tip.fh-has-new-badge .fh-target-new {
    position: absolute;
    top: -4px;
    right: -6px;
    margin-left: 0;
    z-index: 2;
}

.topbar-tip.fh-has-new-badge { position: relative; }

/* Returning-user spotlight */
.fh-spotlight-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
}

.fh-spotlight-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: min(86vh, 720px);
    overflow: auto;
    padding: 24px 24px 20px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.28), transparent 42%),
        linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    color: #f9fafb;
}

.fh-spotlight-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.fh-spotlight-close:hover { background: rgba(255, 255, 255, 0.14); }

.fh-spotlight-kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fcd34d;
}

.fh-spotlight-panel h2 {
    margin: 6px 0 0;
    font-size: clamp(24px, 4vw, 30px);
    font-weight: 900;
    line-height: 1.15;
}

.fh-spotlight-lead {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.55;
}

.fh-spotlight-list {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.fh-spotlight-item {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.fh-spotlight-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fh-spotlight-new {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #1c1917;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fh-spotlight-item p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.55;
}

.fh-spotlight-cta {
    display: inline-flex;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.22);
    border: 1px solid rgba(167, 139, 250, 0.35);
    color: #ede9fe;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.fh-spotlight-cta:hover {
    background: rgba(124, 58, 237, 0.34);
    color: #fff;
}

.fh-spotlight-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.fh-spotlight-dismiss {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.fh-spotlight-dismiss:hover { filter: brightness(1.06); }

@media (max-width: 900px) {
    .wd-nav-wrap {
        display: block;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        scrollbar-width: none;
    }
    .wd-nav-wrap::-webkit-scrollbar { display: none; }

    /* Keep tab labels roomy; scroll sideways instead of squeezing. */
    .wd-nav-wrap > .wd-nav {
        display: flex;
        flex: 0 0 auto;
        width: max-content;
        min-width: 100%;
        max-width: none;
        overflow: visible;
        justify-content: flex-start;
        gap: 10px;
        padding: 10px 16px;
        box-sizing: border-box;
    }

    .wd-welcome-bar {
        min-height: 0;
        padding: 12px 14px;
        align-items: stretch;
    }
    .wd-welcome-inner {
        gap: 10px 12px;
        align-items: center;
    }
    .wd-pfp-btn { width: 52px; height: 52px; }
    .wd-pfp { width: 44px; height: 44px; }
    .wd-welcome-copy {
        flex: 1 1 0;
        min-width: 0;
    }
    .wd-welcome-title {
        font-size: clamp(18px, 5vw, 22px);
        line-height: 1.28;
        padding-right: 2px;
    }
    .wd-welcome-sub {
        margin-top: 6px;
        font-size: 12px;
        line-height: 1.4;
        font-weight: 600;
    }
    .wd-welcome-inner > .account-mode-toggle {
        margin-left: 0;
        flex: 0 0 auto;
        align-self: center;
    }
    .wd-welcome-inner > .notification-bell,
    .wd-welcome-inner > .wd-loadout-menu {
        margin-left: 0 !important;
        flex: 0 0 auto;
        align-self: center;
    }
    .wd-welcome-bar .account-mode-switch {
        max-width: 92px;
        padding: 7px 10px;
        font-size: 11px;
        gap: 6px;
    }
    .wd-welcome-bar .account-mode-switch [data-mode-current] {
        display: inline-block;
        max-width: 58px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
    }

    .wd-nav > a,
    .wd-nav > button {
        flex: 0 0 auto;
        font-size: 13px;
        padding: 10px 16px;
        min-height: 42px;
    }
}

/* Full-viewport tools: workspace nav stacks above the tool UI */
body.alysum-with-workspace-nav {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

body.alysum-with-workspace-nav > .wd-welcome-bar,
body.alysum-with-workspace-nav > .wd-nav-wrap {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
}

body.alysum-with-workspace-nav > .alysum-tool-root,
body.alysum-with-workspace-nav > .pw-app,
body.alysum-with-workspace-nav > .ng-app,
body.alysum-with-workspace-nav > .shell,
body.alysum-with-workspace-nav > #root {
    flex: 1;
    min-height: 0;
    height: auto !important;
    overflow: hidden;
}

body.alysum-with-workspace-nav.alysum-tool-editor > .alysum-tool-root {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

@media (max-width: 760px) {
    body.alysum-with-workspace-nav.alysum-tool-editor > .alysum-tool-root {
        isolation: isolate;
    }

    body.alysum-with-workspace-nav.alysum-tool-editor .sidebar {
        height: 100% !important;
        max-height: none;
    }
}

body.alysum-with-workspace-nav.alysum-tool-editor .sidebar,
body.alysum-with-workspace-nav.alysum-tool-editor .main {
    height: 100% !important;
}

/* Scrollable tool pages (publish, exporter, story bible) */
body.alysum-with-workspace-nav.alysum-tool-scroll {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: auto;
}

body.alysum-with-workspace-nav.alysum-tool-scroll > .wd-nav-wrap {
    position: sticky;
    top: 0;
}
