/* Shared guest sign-in dialog and no-JavaScript fallback. */
.welcome-signin-dialog *,
.welcome-signin { box-sizing: border-box; }
.welcome-signin { display: none; width: 100%; max-width: 440px; margin: 24px auto; padding: 28px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.welcome-signin:target,
.welcome-signin.is-signin-fallback-open,
.welcome-signin-dialog .welcome-signin { display: block; }
.welcome-signin [hidden] { display: none !important; }
.welcome-signin h3 { margin: 0 0 10px; color: var(--heading); font-size: 24px; line-height: 1.3; }
.welcome-signin > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.welcome-signin label { display: block; margin: 18px 0 8px; font-size: 13px; font-weight: 600; }
.welcome-signin input:not([type=hidden]) { display: block; box-sizing: border-box; width: 100%; max-width: 100%; height: 44px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 0; background: var(--stripe); color: var(--text); font: inherit; font-size: 16px; box-shadow: none; }
.welcome-password-control { position: relative; }
.welcome-password-control input { padding-right: 50px !important; }
.welcome-password-toggle { position: absolute; top: 1px; right: 1px; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.welcome-password-toggle:hover { background: var(--hover); color: var(--hover-text); }
.welcome-password-toggle svg,
.welcome-signin-close svg,
.welcome-signin-submit svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.welcome-password-slash { display: none; }
.welcome-password-toggle[aria-pressed=true] .welcome-password-slash { display: block; }
.welcome-signin form .welcome-signin-submit.ui-state-default { display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; width: 100%; min-height: 44px; margin-top: 20px; padding: 10px 14px; border: 1px solid #52628f; border-radius: 0; background: #1e2751 url('../img/background2.jpg') center center / cover no-repeat; color: #ffffff; font: inherit; font-size: 14px; box-shadow: none; cursor: pointer; }
.welcome-signin form .welcome-signin-submit.ui-state-default:hover { border-color: #8294c5; background: #1e2751 url('../img/background2.jpg') center center / cover no-repeat; color: #ffffff; filter: brightness(1.12); }
[data-theme="dark"][data-dark-palette="graphite"] .welcome-signin form .welcome-signin-submit.ui-state-default {
    border-color: #71717a;
    background-color: #34343a;
    background-blend-mode: luminosity;
    color: #fafafa;
}
[data-theme="dark"][data-dark-palette="graphite"] .welcome-signin form .welcome-signin-submit.ui-state-default:hover {
    border-color: #a1a1aa;
    background-color: #48484f;
    color: #ffffff;
    filter: none;
}
.welcome-signin-secondary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 18px; }
.welcome-signin-secondary a { color: var(--link); text-decoration: none; }
.welcome-signin-secondary a:hover { text-decoration: underline; }
.welcome-notice { margin-bottom: 18px; padding: 12px; border: 1px solid var(--warning-border); border-radius: 6px; background: var(--warning-bg); color: var(--text); line-height: 1.6; overflow-wrap: anywhere; }
.welcome-signin-dialog { position: fixed; box-sizing: border-box; width: min(440px,calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; box-shadow: none; }
.welcome-signin-dialog::backdrop { background: rgba(0,0,0,.55); }
.welcome-signin-dialog-body { max-height: calc(100dvh - 34px); overflow: auto; }
.welcome-signin-dialog .welcome-signin { max-width: none; margin: 0; border: 0; border-radius: 0; }
.welcome-signin-dialog h3 { padding-right: 44px; }
.welcome-signin-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; }
.welcome-signin-close:hover { background: var(--stripe); color: var(--text); }
.welcome-signin-dialog :focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
body.welcome-signin-open,
.welcome-signin-open .content2b { overflow: hidden; }

@media (max-width: 600px) {
    .welcome-signin-dialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
    .welcome-signin-dialog-body { max-height: calc(100dvh - 26px); }
    .welcome-signin { padding: 20px; }
}
