/* Auth modal + launcher — themed for win98 + neon. */

.auth-launcher {
    position: fixed;
    right: clamp(0.7rem, 1.8vw, 1.35rem);
    top: clamp(4.75rem, 10vh, 7rem);
    z-index: 9210;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 10.6rem;
    max-width: calc(100vw - 1.4rem);
    min-width: 0;
    height: var(--ui-control-height, 38px);
    min-height: var(--ui-control-height, 38px);
    padding: 0 var(--ui-control-pad-x, 14px);
    font-family: var(--ui-font-display, inherit);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    border: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    -webkit-tap-highlight-color: transparent;
}

.auth-launcher:hover { filter: brightness(1.12); }
.auth-launcher:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.auth-launcher-icon {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #888;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
    font-size: 0;
}

.auth-launcher.is-authed .auth-launcher-icon { background: #2ecc71; }
.auth-launcher.is-authed.is-admin .auth-launcher-icon { background: #ff5e5e; }

/* Dock-mounted launcher: locked to classic Win98 button look, theme-independent.
   Matches size + shape of SFX/STYLE/WIN98 dock buttons under win98 theme. */
.auth-launcher.auth-launcher-dock,
html[data-site-theme] .auth-launcher.auth-launcher-dock {
    position: static !important;
    right: auto !important;
    top: auto !important;
    z-index: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: auto !important;
    max-width: none !important;
    min-width: 7.9rem !important;
    height: auto !important;
    min-height: 2.35rem !important;
    padding: 0.55rem 0.9rem !important;
    background: #c0c0c0 !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    border-radius: 0 !important;
    box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf !important;
    text-shadow: none !important;
    font-family: Tahoma, "MS Sans Serif", sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: none !important;
    filter: none !important;
}
.auth-launcher.auth-launcher-dock:hover,
.auth-launcher.auth-launcher-dock:focus-visible,
html[data-site-theme] .auth-launcher.auth-launcher-dock:hover,
html[data-site-theme] .auth-launcher.auth-launcher-dock:focus-visible {
    background: #c0c0c0 !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf !important;
    transform: none !important;
    filter: none !important;
    outline: none !important;
}
.auth-launcher.auth-launcher-dock:active,
html[data-site-theme] .auth-launcher.auth-launcher-dock:active {
    border-color: #808080 #ffffff #ffffff #808080 !important;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf !important;
    transform: none !important;
}
.auth-launcher.auth-launcher-dock .auth-launcher-icon,
html[data-site-theme] .auth-launcher.auth-launcher-dock .auth-launcher-icon {
    width: 9px !important;
    height: 9px !important;
    border-radius: 50% !important;
    background: #808080 !important;
    box-shadow: 0 0 0 1px #000 !important;
}
.auth-launcher.auth-launcher-dock.is-authed .auth-launcher-icon { background: #2ecc71 !important; }
.auth-launcher.auth-launcher-dock.is-authed.is-admin .auth-launcher-icon { background: #c00 !important; }
.auth-launcher.auth-launcher-dock .auth-launcher-label,
.auth-launcher.auth-launcher-dock .theme-toggle-value,
html[data-site-theme] .auth-launcher.auth-launcher-dock .auth-launcher-label,
html[data-site-theme] .auth-launcher.auth-launcher-dock .theme-toggle-value {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    font-family: Tahoma, "MS Sans Serif", sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-shadow: none !important;
    text-transform: uppercase !important;
}

/* Neon theme — hot pink/magenta accent */
html[data-site-theme="neon"] .auth-launcher {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    color: #ffffff;
    text-shadow: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

html[data-site-theme="neon"] .auth-launcher:hover,
html[data-site-theme="neon"] .auth-launcher:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
    filter: none;
}

/* Vaporwave theme — match dock buttons */
html[data-site-theme="vaporwave"] .auth-launcher {
    border: 2px solid var(--vapor-cyan, #00eaff) !important;
    border-radius: 7px !important;
    background: linear-gradient(180deg, rgba(38, 0, 70, 0.6), rgba(9, 0, 31, 0.65)) !important;
    color: #fff7ff !important;
    -webkit-text-fill-color: #fff7ff !important;
    text-shadow: none !important;
    letter-spacing: 0.14em;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.22),
        inset -2px -2px 0 rgba(0, 0, 0, 0.5),
        5px 5px 0 rgba(255, 43, 214, 0.5),
        0 0 24px rgba(0, 234, 255, 0.22) !important;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

html[data-site-theme="vaporwave"] .auth-launcher:hover,
html[data-site-theme="vaporwave"] .auth-launcher:focus-visible {
    transform: translate(-2px, -2px) !important;
    border-color: var(--vapor-gold, #fff38a) !important;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.4),
        inset -2px -2px 0 rgba(0, 0, 0, 0.55),
        5px 5px 0 rgba(0, 234, 255, 0.42),
        0 0 24px rgba(255, 43, 214, 0.36) !important;
    filter: none;
}

html[data-site-theme="vaporwave"] .auth-launcher:active {
    transform: translate(0, 0) !important;
}

html[data-site-theme="vaporwave"] .auth-launcher .auth-launcher-icon {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4) !important;
}

/* Win98 theme — top-right pill matches dock button chrome */
html[data-site-theme="win98"] .auth-launcher {
    top: clamp(0.7rem, 1.6vh, 1.1rem) !important;
    right: clamp(0.7rem, 1.8vw, 1.35rem) !important;
    width: 10.6rem !important;
    height: auto !important;
    min-height: 2.35rem !important;
    padding: 0.55rem 0.9rem !important;
    background: #c0c0c0 !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    border-radius: 0 !important;
    box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf !important;
    text-shadow: none !important;
    font-family: Tahoma, "MS Sans Serif", sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    transition: none !important;
    filter: none !important;
}

html[data-site-theme="win98"] .auth-launcher:hover,
html[data-site-theme="win98"] .auth-launcher:focus-visible {
    background: #c0c0c0 !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf !important;
    transform: none !important;
    filter: none !important;
    outline: none !important;
}

html[data-site-theme="win98"] .auth-launcher:active {
    border-color: #808080 #ffffff #ffffff #808080 !important;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf !important;
    transform: none !important;
}

html[data-site-theme="win98"] .auth-launcher .auth-launcher-label {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    font-family: Tahoma, "MS Sans Serif", sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-shadow: none !important;
    text-transform: uppercase !important;
}

html[data-site-theme="win98"] .auth-launcher .auth-launcher-icon {
    width: 9px !important;
    height: 9px !important;
    border-radius: 50% !important;
    background: #808080 !important;
    box-shadow: 0 0 0 1px #000 !important;
}

html[data-site-theme="win98"] .auth-launcher.is-authed .auth-launcher-icon { background: #2ecc71 !important; }
html[data-site-theme="win98"] .auth-launcher.is-authed.is-admin .auth-launcher-icon { background: #c00 !important; }

/* Win98 theme — modal launcher in overlay */
.auth-overlay .auth-launcher {
    background: var(--win98-panel-bg, #c0c0c0);
    color: var(--win98-text, #000000);
    -webkit-text-fill-color: var(--win98-text, #000000);
    border-radius: 0;
    border: 2px solid;
    border-color: #fff #404040 #404040 #fff;
    box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080, 2px 2px 0 rgba(0, 0, 0, 0.3);
    text-shadow: none;
    padding: 0.55rem 0.9rem;
    font-family: var(--ui-font-body, 'MS Sans Serif', Tahoma, sans-serif);
    letter-spacing: 0;
}

.auth-overlay .auth-launcher:active {
    border-color: #404040 #fff #fff #404040;
    box-shadow: inset 1px 1px 0 #808080;
}

/* Overlay */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 100200;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.12s ease-out;
}

.auth-overlay.is-open { opacity: 1; }

.auth-window {
    width: min(420px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    position: relative;
    z-index: 1;
    background: #fff;
    color: #111;
    border-radius: var(--ui-panel-radius, 10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    font-family: var(--ui-font-body, 'Inter', system-ui, sans-serif);
    display: flex;
    flex-direction: column;
}

.auth-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #111;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.auth-title-text { font-size: 13px; text-transform: uppercase; }

.auth-close {
    background: transparent;
    color: #fff;
    border: 0;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.auth-close:hover { background: rgba(255, 255, 255, 0.18); }

.auth-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-tab {
    flex: 1 1 auto;
    background: transparent;
    border: 0;
    padding: 10px 12px;
    font: inherit;
    font-weight: 600;
    font-size: var(--ui-text-sm, 13px);
    color: #555;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.auth-tab.is-active { color: #111; border-bottom-color: #111; }
.auth-tab:focus-visible { outline: 2px solid #111; outline-offset: -3px; }

.auth-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }

.auth-form { display: none; flex-direction: column; gap: 10px; }
.auth-form.is-active { display: flex; }

.auth-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--ui-text-sm, 13px); }
.auth-field span { font-weight: 600; color: #333; }

.auth-field input {
    font: inherit;
    padding: 8px 10px;
    border-radius: var(--ui-control-radius, 6px);
    border: 1px solid #bbb;
    background: #fff;
    color: #111;
}

.auth-field input:focus { outline: 2px solid #111; outline-offset: 1px; }

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    user-select: none;
}

.auth-check input { width: 16px; height: 16px; }

.auth-submit {
    margin-top: 4px;
    padding: 10px 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: #111;
    color: #fff;
    border: 0;
    border-radius: var(--ui-control-radius, 6px);
}

.auth-submit:hover { filter: brightness(1.15); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-link-button {
    align-self: flex-start;
    background: transparent;
    border: 0;
    padding: 4px 0;
    font: inherit;
    font-size: 12px;
    color: #1f5fff;
    cursor: pointer;
    text-decoration: underline;
}
html[data-site-theme="neon"] .auth-link-button { color: rgba(255, 255, 255, 0.78); }
.auth-overlay .auth-link-button { color: #0000a0; }

.auth-error {
    display: none;
    background: #ffe5e5;
    color: #9a1a1a;
    border: 1px solid #f0a0a0;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
}
.auth-error.is-visible { display: block; }

/* Modal pinned to classic Win98 default look. User palette vars + theme overrides
   are shadowed so admin color customizations and active site theme don't bleed in. */
.auth-overlay {
    --win98-panel-bg: #c0c0c0;
    --win98-text: #000000;
    --win98-sub-bg: #ffffff;
    --win98-sub-text: #000000;
    --win98-title-bg-local: linear-gradient(90deg, #000080, #1084d0);
    --win98-title-bg: linear-gradient(90deg, #000080, #1084d0);
    --win98-title-start: #000080;
    --win98-title-end: #1084d0;
    --win98-title-text: #ffffff;
    --win98-link: #000080;
}

/* Classic Win98 modal — applied regardless of active site theme */
.auth-overlay .auth-window {
    width: min(420px, calc(100vw - 24px));
    background: var(--win98-panel-bg, #c0c0c0);
    color: var(--win98-text, #000000);
    -webkit-text-fill-color: var(--win98-text, #000000);
    border-radius: 0;
    border: 2px solid;
    border-color: #fff #404040 #404040 #fff;
    box-shadow: 2px 2px 0 #000, inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
    font-family: var(--ui-font-body, 'MS Sans Serif', Tahoma, sans-serif);
    font-size: 11px;
    font-weight: 400;
    overflow: hidden;
}

.auth-overlay .auth-window :is(label, span, p, input, button, .auth-field, .auth-check):not(.auth-title-text) {
    font-weight: 400;
}

.auth-overlay .auth-window .auth-title-text {
    font-weight: 700;
}

.auth-overlay .auth-titlebar {
    background: var(--win98-title-bg-local, var(--win98-title-bg, linear-gradient(90deg, var(--win98-title-start, #000080), var(--win98-title-end, #1084d0))));
    color: var(--win98-title-text, #ffffff);
    -webkit-text-fill-color: var(--win98-title-text, #ffffff);
    border-radius: 0;
    min-height: 18px;
    padding: 2px 4px;
    text-shadow: none;
    box-sizing: border-box;
}


.auth-overlay .auth-title-text {
    font-size: 11px;
    line-height: 14px;
    text-transform: none;
    font-weight: 700;
}

/* Unified Win98 close button: classic bevel with the Windows close glyph. */
.auth-overlay .auth-close {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 16px;
    min-width: 16px;
    height: 14px;
    padding: 0;
    margin: 0;
    border: 1px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    border-radius: 0;
    background: var(--win98-panel-bg, #c0c0c0);
    box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 0;
    line-height: 0;
    text-shadow: none;
    box-sizing: border-box;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.auth-overlay .auth-close::before {
    content: "r";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: Marlett, "MS Sans Serif", Tahoma, sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    color: #000000;
    -webkit-text-fill-color: #000000;
    text-shadow: none;
    pointer-events: none;
}

.auth-overlay .auth-close:hover,
.auth-overlay .auth-close:focus-visible {
    background: var(--win98-panel-bg, #c0c0c0);
    outline: none;
}

.auth-overlay .auth-close:active {
    border-color: #404040 #ffffff #ffffff #404040;
    box-shadow: inset 1px 1px 0 #808080;
    transform: none;
}

.auth-overlay .auth-close:active::before {
    transform: translate(calc(-50% + 1px), calc(-50% + 1px));
}

.auth-overlay .auth-tabs {
    background: transparent;
    border-bottom: 0;
    padding: 7px 10px 0;
    gap: 0;
    align-items: flex-end;
    position: relative;
    z-index: 1;
}

.auth-overlay .auth-tab {
    flex: 0 0 auto;
    background: var(--win98-panel-bg, #c0c0c0);
    color: var(--win98-text, #000000);
    -webkit-text-fill-color: var(--win98-text, #000000);
    border: 2px solid;
    border-color: #ffffff #404040 var(--win98-panel-bg, #c0c0c0) #ffffff;
    border-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 3px 13px 4px;
    font-size: 11px;
    line-height: 13px;
    position: relative;
    top: 2px;
    z-index: 0;
    min-width: 62px;
    text-align: center;
    text-shadow: none;
}

.auth-overlay .auth-tab.is-active {
    background: var(--win98-panel-bg, #c0c0c0);
    border-color: #ffffff #404040 var(--win98-panel-bg, #c0c0c0) #ffffff;
    box-shadow: none;
    border-bottom: 0;
    padding: 5px 14px 5px;
    top: 0;
    z-index: 2;
}

.auth-overlay .auth-body {
    position: relative;
    z-index: 1;
    margin: -2px 8px 8px;
    padding: 12px 10px 10px;
    gap: 8px;
    background: var(--win98-panel-bg, #c0c0c0);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset 1px 1px 0 #dfdfdf;
}

.auth-overlay .auth-form {
    gap: 8px;
}

.auth-overlay .auth-field {
    gap: 3px;
    font-size: 11px;
}

.auth-overlay .auth-field span,
.auth-overlay .auth-check {
    color: var(--win98-text, #202020);
    -webkit-text-fill-color: var(--win98-text, #202020);
    font-size: 11px;
}

.auth-overlay .auth-field input,
.auth-overlay .auth-submit,
.auth-overlay .auth-error {
    border-radius: 0;
}

.auth-overlay .auth-field input {
    background: var(--win98-sub-bg, #ffffff);
    color: var(--win98-sub-text, #000000);
    -webkit-text-fill-color: var(--win98-sub-text, #000000);
    border: 2px solid;
    border-color: #404040 #ffffff #ffffff #404040;
    box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #dfdfdf;
    height: 22px;
    padding: 2px 4px;
    font: 11px Tahoma, "MS Sans Serif", sans-serif;
    box-sizing: border-box;
}

.auth-overlay .auth-field input:focus {
    outline: 1px dotted #000000;
    outline-offset: -4px;
}

.auth-overlay .auth-check {
    gap: 6px;
    min-height: 18px;
}

.auth-overlay .auth-check input {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: #ffffff;
}

.auth-overlay .auth-submit {
    align-self: flex-start;
    min-width: 122px;
    height: 24px;
    background: var(--win98-panel-bg, #c0c0c0);
    color: var(--win98-text, #000000);
    -webkit-text-fill-color: var(--win98-text, #000000);
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
    padding: 2px 16px;
    text-shadow: none;
    font: 11px Tahoma, "MS Sans Serif", sans-serif;
    font-weight: 400;
}

.auth-overlay .auth-submit:hover {
    filter: none;
}

.auth-overlay .auth-submit:focus-visible {
    outline: 1px dotted #000000;
    outline-offset: -5px;
}

.auth-overlay .auth-submit:active {
    border-color: #404040 #ffffff #ffffff #404040;
    box-shadow: inset 1px 1px 0 #808080;
    padding: 3px 15px 1px 17px;
}

.auth-overlay .auth-link-button {
    color: var(--win98-link, #000080);
    -webkit-text-fill-color: var(--win98-link, #000080);
    font-size: 11px;
    padding: 2px 0;
}

.auth-overlay .auth-error {
    background: var(--win98-sub-bg, #ffffff);
    color: var(--win98-sub-text, #000000);
    -webkit-text-fill-color: var(--win98-sub-text, #000000);
    border: 2px solid;
    border-color: #404040 #ffffff #ffffff #404040;
    box-shadow: inset 1px 1px 0 #808080;
    padding: 5px 6px;
    font-size: 11px;
}

/* ─── Neon theme auth modal — replaces Win98 chrome with neon panel ─── */
html[data-site-theme="neon"] .auth-overlay {
    background: rgba(4, 0, 16, 0.72);
}
html[data-site-theme="neon"] .auth-overlay .auth-window {
    background: linear-gradient(160deg, #0a0420 0%, #160940 60%, #08001a 100%);
    color: #f4f7ff;
    -webkit-text-fill-color: #f4f7ff;
    border: 1px solid rgba(255, 62, 108, 0.55);
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 26px rgba(255, 62, 108, 0.45),
        0 30px 80px rgba(0, 0, 0, 0.7);
    font-family: var(--ui-font-body, 'Inter', system-ui, sans-serif);
    font-weight: 400;
    overflow: hidden;
}
html[data-site-theme="neon"] .auth-overlay .auth-titlebar {
    background: linear-gradient(90deg, rgba(255, 62, 108, 0.85), rgba(125, 44, 255, 0.85));
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    padding: 9px 14px;
    text-shadow: 0 0 10px rgba(255, 62, 108, 0.55);
}
html[data-site-theme="neon"] .auth-overlay .auth-title-text {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 900;
}
html[data-site-theme="neon"] .auth-overlay .auth-close {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    box-shadow: none;
    font-size: 14px;
}
html[data-site-theme="neon"] .auth-overlay .auth-close::before {
    content: "\00d7";
    font-family: inherit;
    font-size: 14px;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}
html[data-site-theme="neon"] .auth-overlay .auth-close:hover {
    background: rgba(255, 62, 108, 0.32);
    border-color: rgba(255, 62, 108, 0.6);
}
html[data-site-theme="neon"] .auth-overlay .auth-tabs {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    gap: 0;
    align-items: stretch;
    top: 0;
}
html[data-site-theme="neon"] .auth-overlay .auth-tab {
    flex: 1 1 0;
    background: transparent;
    color: rgba(244, 247, 255, 0.6);
    -webkit-text-fill-color: rgba(244, 247, 255, 0.6);
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 10px 12px;
    box-shadow: none;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    top: 0;
    min-width: 0;
}
html[data-site-theme="neon"] .auth-overlay .auth-tab.is-active {
    background: transparent;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    border-color: transparent transparent #ff3e6c transparent;
    box-shadow: 0 -2px 0 rgba(255, 62, 108, 0.18) inset;
    top: 0;
    padding: 10px 12px;
}
html[data-site-theme="neon"] .auth-overlay .auth-body {
    margin: 0;
    padding: 16px 18px 18px;
    background: transparent;
    border: 0;
    box-shadow: none;
    gap: 12px;
}
html[data-site-theme="neon"] .auth-overlay .auth-field {
    gap: 6px;
    font-size: 13px;
}
html[data-site-theme="neon"] .auth-overlay .auth-field span,
html[data-site-theme="neon"] .auth-overlay .auth-check {
    color: rgba(244, 247, 255, 0.8);
    -webkit-text-fill-color: rgba(244, 247, 255, 0.8);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
}
html[data-site-theme="neon"] .auth-overlay .auth-field input {
    background: rgba(0, 0, 30, 0.5);
    color: #e8feff;
    -webkit-text-fill-color: #e8feff;
    border: 1px solid rgba(0, 255, 200, 0.32);
    border-radius: 6px;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
    height: auto;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
}
html[data-site-theme="neon"] .auth-overlay .auth-field input:focus {
    outline: none;
    border-color: rgba(255, 62, 108, 0.7);
    box-shadow: 0 0 12px rgba(255, 62, 108, 0.4);
}
html[data-site-theme="neon"] .auth-overlay .auth-submit {
    align-self: stretch;
    background: linear-gradient(90deg, #ff3e6c 0%, #7c2cff 100%);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 0 18px rgba(255, 62, 108, 0.45);
    padding: 10px 14px;
    font: inherit;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    min-width: 0;
    height: auto;
}
html[data-site-theme="neon"] .auth-overlay .auth-submit:hover { filter: brightness(1.1); }
html[data-site-theme="neon"] .auth-overlay .auth-submit:active { transform: translateY(1px); padding: 10px 14px; box-shadow: 0 0 10px rgba(255, 62, 108, 0.3); }
html[data-site-theme="neon"] .auth-overlay .auth-link-button {
    color: rgba(0, 255, 200, 0.85);
    -webkit-text-fill-color: rgba(0, 255, 200, 0.85);
    font-size: 12px;
}
html[data-site-theme="neon"] .auth-overlay .auth-error {
    background: rgba(255, 62, 108, 0.12);
    border: 1px solid rgba(255, 62, 108, 0.55);
    box-shadow: 0 0 12px rgba(255, 62, 108, 0.25);
    color: #ffb1bf;
    -webkit-text-fill-color: #ffb1bf;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
}

/* ─── Vaporwave theme auth modal — replaces Win98 chrome with vapor panel ─── */
html[data-site-theme="vaporwave"] .auth-overlay {
    background: rgba(9, 0, 31, 0.78);
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-window {
    background: linear-gradient(180deg, rgba(38, 0, 70, 0.92), rgba(9, 0, 31, 0.96));
    color: #fff7ff;
    -webkit-text-fill-color: #fff7ff;
    border: 2px solid #00eaff;
    border-radius: 9px;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.22),
        inset -2px -2px 0 rgba(0, 0, 0, 0.55),
        6px 6px 0 rgba(255, 43, 214, 0.55),
        0 0 32px rgba(0, 234, 255, 0.36);
    font-family: var(--ui-font-body, 'Inter', system-ui, sans-serif);
    font-weight: 400;
    overflow: hidden;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-titlebar {
    background: linear-gradient(90deg, rgba(0, 234, 255, 0.92), rgba(255, 43, 214, 0.92));
    color: #1a0030;
    -webkit-text-fill-color: #1a0030;
    border-bottom: 2px solid rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-title-text {
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-weight: 900;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-close {
    width: 22px;
    height: 22px;
    border: 2px solid #00eaff;
    border-radius: 5px;
    background: rgba(38, 0, 70, 0.7);
    color: #fff7ff;
    -webkit-text-fill-color: #fff7ff;
    box-shadow: 2px 2px 0 rgba(255, 43, 214, 0.55);
    font-size: 14px;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-close::before {
    content: "\00d7";
    font-family: inherit;
    font-size: 14px;
    color: #fff7ff;
    -webkit-text-fill-color: #fff7ff;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-close:hover {
    border-color: var(--vapor-gold, #fff38a);
    box-shadow: 2px 2px 0 rgba(0, 234, 255, 0.5);
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-tabs {
    background: transparent;
    border-bottom: 1px solid rgba(0, 234, 255, 0.35);
    padding: 0;
    gap: 0;
    align-items: stretch;
    top: 0;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-tab {
    flex: 1 1 0;
    background: transparent;
    color: rgba(255, 247, 255, 0.55);
    -webkit-text-fill-color: rgba(255, 247, 255, 0.55);
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 10px 12px;
    box-shadow: none;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 800;
    top: 0;
    min-width: 0;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-tab.is-active {
    background: transparent;
    color: #fff7ff;
    -webkit-text-fill-color: #fff7ff;
    border-color: transparent transparent #ff2bd6 transparent;
    box-shadow: 0 -2px 0 rgba(255, 43, 214, 0.22) inset;
    top: 0;
    padding: 10px 12px;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-body {
    margin: 0;
    padding: 18px 20px 20px;
    background: transparent;
    border: 0;
    box-shadow: none;
    gap: 12px;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-field {
    gap: 6px;
    font-size: 13px;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-field span,
html[data-site-theme="vaporwave"] .auth-overlay .auth-check {
    color: rgba(255, 247, 255, 0.86);
    -webkit-text-fill-color: rgba(255, 247, 255, 0.86);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 800;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-field input {
    background: rgba(9, 0, 31, 0.65);
    color: #fff7ff;
    -webkit-text-fill-color: #fff7ff;
    border: 2px solid #00eaff;
    border-radius: 6px;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.12), 2px 2px 0 rgba(255, 43, 214, 0.4);
    height: auto;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-field input:focus {
    outline: none;
    border-color: var(--vapor-gold, #fff38a);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.18), 2px 2px 0 rgba(0, 234, 255, 0.5);
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-submit {
    align-self: stretch;
    background: linear-gradient(90deg, #00eaff 0%, #ff2bd6 100%);
    color: #1a0030;
    -webkit-text-fill-color: #1a0030;
    border: 2px solid #00eaff;
    border-radius: 7px;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.28), 5px 5px 0 rgba(255, 43, 214, 0.55), 0 0 22px rgba(0, 234, 255, 0.36);
    padding: 10px 14px;
    font: inherit;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    min-width: 0;
    height: auto;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-submit:hover {
    filter: none;
    transform: translate(-2px, -2px);
    border-color: var(--vapor-gold, #fff38a);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.4), 7px 7px 0 rgba(255, 43, 214, 0.6), 0 0 26px rgba(255, 43, 214, 0.36);
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-submit:active {
    transform: translate(0, 0);
    padding: 10px 14px;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.2), 3px 3px 0 rgba(255, 43, 214, 0.55);
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-link-button {
    color: var(--vapor-cyan, #00eaff);
    -webkit-text-fill-color: var(--vapor-cyan, #00eaff);
    font-size: 12px;
}
html[data-site-theme="vaporwave"] .auth-overlay .auth-error {
    background: rgba(255, 43, 214, 0.15);
    border: 2px solid var(--vapor-magenta, #ff2bd6);
    box-shadow: 2px 2px 0 rgba(0, 234, 255, 0.32);
    color: #ffd8f3;
    -webkit-text-fill-color: #ffd8f3;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
}

@media (max-width: 480px) {
    .auth-launcher .auth-launcher-label { display: none; }
    .auth-launcher { width: auto; min-width: 0; padding: 8px; }
    .auth-window { max-width: 100%; }
}

/* Visitor log badges */
.site-guestbook-name {
    display: inline-block;
    font-weight: 800;
    font-size: 1.45em;
    line-height: 1.15;
    letter-spacing: 0.02em;
    margin-right: 6px;
    vertical-align: middle;
}

.site-guestbook-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 3px;
    vertical-align: middle;
    line-height: 1.4;
}

.site-guestbook-badge-admin { background: #ff3e6c; color: #fff; box-shadow: 0 0 8px rgba(255, 62, 108, 0.55); }
.site-guestbook-badge-user { background: #2c8aff; color: #fff; }
.site-guestbook-badge-guest { background: #777; color: #fff; }

html[data-site-theme="win98"] .site-guestbook-badge {
    border: 1px solid #000;
    box-shadow: none;
    border-radius: 0;
    padding: 0 4px;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
}
html[data-site-theme="win98"] .site-guestbook-badge-admin { background: #c00; }
html[data-site-theme="win98"] .site-guestbook-badge-user { background: #006; }
html[data-site-theme="win98"] .site-guestbook-badge-guest { background: #555; }

/* Auth notice in guestbook form */
.site-guestbook-auth-notice {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    color: inherit;
    font-size: 13px;
    line-height: 1.25;
}
.site-guestbook-auth-notice.is-signin {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.site-guestbook-auth-signin {
    flex: 0 0 auto;
    margin-left: 0;
    padding: 6px 14px;
    font: inherit;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 999px;
}
html[data-site-theme="win98"] .site-guestbook-auth-notice {
    display: block;
    background: #ffffe1;
    color: #000;
    border: 1px solid #000;
    border-radius: 0;
}
html[data-site-theme="win98"] .site-guestbook-auth-signin {
    background: #c0c0c0;
    color: #000;
    border-radius: 0;
    border: 2px solid;
    border-color: #fff #404040 #404040 #fff;
    padding: 2px 8px;
}
html[data-site-theme="neon"] .site-guestbook-auth-notice {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 12%, transparent), rgba(0, 0, 0, 0.38));
    border: 1px solid color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 62%, rgba(255, 255, 255, 0.14));
    color: color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 32%, #ffffff);
    box-shadow:
        inset 0 0 14px color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 10%, transparent),
        0 0 12px color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 14%, transparent);
    text-shadow: 0 0 8px color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 30%, transparent);
}
html[data-site-theme="neon"] .site-guestbook-auth-signin {
    border: 1px solid color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 76%, rgba(255, 255, 255, 0.16));
    border-radius: 8px;
    background: color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 14%, rgba(0, 0, 0, 0.82));
    color: color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 78%, #ffffff) !important;
    -webkit-text-fill-color: color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 78%, #ffffff) !important;
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 18%, transparent);
    text-shadow: none;
    transition:
        transform 180ms ease,
        color 180ms ease,
        -webkit-text-fill-color 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease,
        filter 180ms ease,
        text-shadow 180ms ease;
}
html[data-site-theme="neon"] .site-guestbook-auth-signin:hover,
html[data-site-theme="neon"] .site-guestbook-auth-signin:focus-visible {
    transform: translateY(-2px) scale(1.02);
    border-color: color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 92%, #ffffff);
    background: color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 24%, rgba(0, 0, 0, 0.78));
    color: color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 36%, #ffffff) !important;
    -webkit-text-fill-color: color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 36%, #ffffff) !important;
    filter: none;
    box-shadow:
        inset 0 0 18px color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 18%, transparent),
        0 0 24px color-mix(in srgb, var(--site-guestbook-accent, #00ffc8) 34%, transparent);
    text-shadow: none;
    outline: none;
}
html[data-site-theme="neon"] .site-guestbook-auth-signin:active {
    transform: translate(1px, 1px);
}

@media (max-width: 520px) {
    .site-guestbook-auth-notice {
        display: grid;
        justify-items: start;
    }
}

/* Admin user management */
.users-admin { margin-top: 24px; }
.users-admin-hint { font-size: 12px; opacity: 0.75; margin-bottom: 8px; }
.users-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.users-admin-actions input[type="search"] {
    flex: 1 1 200px;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #555;
    background: rgba(0, 0, 0, 0.3);
    color: inherit;
    font: inherit;
}
.users-admin-list { display: flex; flex-direction: column; gap: 10px; }
.users-admin-row {
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.users-admin-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.users-admin-row-meta { font-size: 12px; opacity: 0.7; margin-bottom: 6px; }
.users-admin-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.users-admin-row-actions button {
    padding: 4px 10px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    border: 0;
    border-radius: 4px;
    background: #333;
    color: #fff;
}
.users-admin-empty { padding: 12px; opacity: 0.6; text-align: center; }
#users-admin-status.is-error { color: #ff8a8a; }
#users-admin-status.is-ok { color: #8aff9c; }
#users-admin-status { font-size: 12px; margin-top: 8px; min-height: 1.2em; }

html[data-site-theme="win98"] .users-admin-row {
    background: #fff;
    color: #000;
    border: 2px solid;
    border-color: #404040 #fff #fff #404040;
    box-shadow: inset 1px 1px 0 #808080;
    border-radius: 0;
}
html[data-site-theme="win98"] .users-admin-row-actions button,
html[data-site-theme="win98"] #users-admin-refresh {
    background: #c0c0c0;
    color: #000;
    border-radius: 0;
    border: 2px solid;
    border-color: #fff #404040 #404040 #fff;
    box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
}
html[data-site-theme="win98"] .users-admin-actions input[type="search"] {
    background: #fff;
    color: #000;
    border: 2px solid;
    border-color: #404040 #fff #fff #404040;
    border-radius: 0;
    box-shadow: inset 1px 1px 0 #808080;
}
