/* Authentication extends the landing archive palette; app styles stay scoped out. */
#authOverlay {
    --primary-color: #503449;
    --text-primary: #402c3d;
    --text-secondary: #655260;
    --text-light: #756270;
    --border-color: #d5cdd2;
    --bg-color: #f4f2f0;
    background: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Noto Sans TC', sans-serif;
    overflow-y: auto;
    overscroll-behavior: contain;
    align-items: flex-start;
    padding: 40px 24px;
    scrollbar-color: #aa97a5 #f4f2f0;
    transition: opacity 180ms ease, visibility 180ms;
}
#authOverlay::selection { background: #c4b1c0; color: #402c3d; }
#authOverlay .auth-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: 1040px;
    padding: 0;
    margin: auto;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    background: #fcfbfa;
}
#authOverlay .auth-brand {
    position: relative;
    background: #c4b1c0;
    min-height: 680px;
    overflow: hidden;
    isolation: isolate;
}
#authOverlay .auth-brand-copy { position: relative; z-index: 1; padding: 44px 40px 0; }
#authOverlay .auth-brand-title {
    font-family: 'Noto Serif TC', serif;
    font-weight: 600;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.5;
    letter-spacing: -0.025em;
    margin: 0 0 16px;
}
#authOverlay .auth-brand-copy > p:last-child { font-size: 14px; line-height: 1.9; }
#authOverlay .auth-portrait {
    position: absolute;
    width: 100%;
    height: 440px;
    bottom: 48px;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
}
#authOverlay .auth-brand-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 32px;
    border-top: 1px solid #aa97a5;
    font-size: 13px;
    background: #c4b1c0;
}
#authOverlay .auth-card { padding: 32px 48px 40px; border-radius: 0; box-shadow: none; background: #fcfbfa; min-width: 0; }
#authOverlay .auth-home-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 28px; }
#authOverlay a { color: #503449; text-underline-offset: 4px; }
#authOverlay a:hover { text-decoration: underline; }
#authOverlay .auth-logo { text-align: left; margin-bottom: 28px; }
#authOverlay .auth-logo img { display: none; }
#authOverlay .auth-logo h1 { font-family: 'Noto Serif TC', serif; font-size: 32px; font-weight: 700; }
#authOverlay .auth-logo p { font-size: 14px; margin-top: 8px; }
#authOverlay .auth-tabs { gap: 0; padding: 0; border-radius: 0; background: transparent; border-bottom: 1px solid var(--border-color); margin-bottom: 24px; }
#authOverlay .auth-tab { font: inherit; font-size: 14px; min-height: 46px; border-radius: 8px 8px 0 0; transition: background-color 150ms ease; }
#authOverlay .auth-tab.active { background: #e8e0e5; color: #402c3d; box-shadow: inset 0 -2px #503449; font-weight: 700; }
#authOverlay .auth-tab:hover { background: #eee8ec; }
#authOverlay .input-group { margin-bottom: 18px; }
#authOverlay .input-group label { color: #402c3d; font-size: 14px; margin-bottom: 8px; }
#authOverlay .input-group input {
    background: #fcfbfa;
    color: #402c3d;
    border: 1px solid #b9aab5;
    border-radius: 5px;
    min-height: 48px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 16px;
    caret-color: #503449;
    box-shadow: none;
}
#authOverlay .input-group input::placeholder { color: #756270; opacity: 1; }
#authOverlay :is(input, button, a):focus-visible { outline: 2px solid #503449; outline-offset: 3px; box-shadow: none; }
#authOverlay .btn { min-height: 48px; font-family: inherit; border-radius: 5px; font-size: 14px; box-shadow: none; transform: none; transition: background-color 150ms ease; }
#authOverlay .btn-primary { background: #503449; color: #fff; border: 1px solid #503449; }
#authOverlay .btn-primary:hover { background: #392234; }
#authOverlay .btn-secondary { background: transparent; color: #503449; border: 1px solid #b9aab5; }
#authOverlay .btn-secondary:hover { background: #eee8ec; }
#authOverlay .btn:disabled { opacity: .6; cursor: wait; }
#authOverlay .auth-divider { margin: 20px 0; }
#authOverlay .vip-login-hint { color: #655260; line-height: 1.8; }
#authOverlay .auth-error { background: #f9e9e6; color: #912f28; border-radius: 5px; line-height: 1.65; }
@media (max-width: 760px) {
    #authOverlay { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
    #authOverlay .auth-container { display: block; max-width: 460px; }
    #authOverlay .auth-brand { display: none; }
    #authOverlay .auth-card { padding: 24px; border-top: 5px solid #c4b1c0; }
    #authOverlay .auth-home-link { margin-bottom: 24px; min-height: 32px; }
    #authOverlay .auth-logo { position: relative; padding-right: 66px; }
    #authOverlay .auth-logo img { display: block; position: absolute; right: 0; top: 4px; width: 52px; height: 52px; border-radius: 6px; object-fit: cover; }
    #authOverlay .auth-logo h1 { font-size: 28px; }
}
@media (max-width: 360px) {
    #authOverlay { padding: 12px 8px; }
    #authOverlay .auth-card { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    #authOverlay, #authOverlay * { transition: none; }
}
