/* S3-membership-security-management-v1: guest surfaces only, not project modules. */
.membership-shell {
    --member-ink: #1d293d;
    --member-muted: #667085;
    --member-line: #e1e6ef;
    --member-brand: #4338ca;
    color-scheme: light;
    margin: 0;
    background: #f5f7fb;
    color: var(--member-ink);
    font: 16px/1.65 system-ui, "Microsoft JhengHei", sans-serif;
}
.membership-shell *, .membership-shell *::before, .membership-shell *::after { box-sizing: border-box; }
.membership-shell a { color: var(--member-brand); text-decoration: none; }
.membership-shell a:hover { text-decoration: underline; }
.membership-shell a, .membership-shell button, .membership-shell input, .membership-shell summary { outline-offset: 4px; }
.membership-shell :focus-visible { outline: 2px solid var(--member-brand); }
.membership-shell button, .membership-shell input { font: inherit; }
.membership-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 20px 32px; background: white; border-bottom: 1px solid var(--member-line); }
.membership-home-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.membership-shell .membership-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 750; letter-spacing: .03em; color: var(--member-ink); }
.membership-logo { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: var(--member-brand); color: white; }
.membership-wrap { max-width: 1120px; margin: 0 auto; padding: 38px 28px 64px; }
.membership-login-layout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 70px; align-items: center; padding-top: 45px; }
.membership-card { min-width: 0; padding: 28px; border: 1px solid var(--member-line); border-radius: 16px; background: white; box-shadow: 0 4px 20px #18233b04; }
.membership-narrow { max-width: 640px; margin: auto; }
.membership-shell h1 { margin: 8px 0 12px; font-size: 30px; font-weight: 700; line-height: 1.35; }
.membership-shell h2 { margin: 0 0 10px; font-size: 20px; font-weight: 700; line-height: 1.4; }
.membership-intro h2 { max-width: 470px; margin: 8px 0 12px; font-size: 40px; line-height: 1.35; }
.membership-shell p { margin: 0 0 16px; }
.membership-shell p:last-child { margin-bottom: 0; }
.membership-eyebrow { color: var(--member-brand); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.membership-muted, .membership-shell small { color: var(--member-muted); }
.membership-shell small { font-size: 13px; }
.membership-steps { border-left: 2px solid #d7dcf0; margin-top: 32px; padding-left: 22px; }
.membership-steps p { margin-bottom: 22px; }
.membership-steps b { display: block; }
.membership-form { margin-top: 24px; }
.membership-field { margin-bottom: 18px; }
.membership-shell label { display: block; color: var(--member-ink); font-size: 14px; font-weight: 650; }
.membership-shell input:not([type=hidden]):not([type=checkbox]) { display: block; margin-top: 7px; width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #cbd2df; border-radius: 8px; background: white; color: var(--member-ink); box-shadow: none; }
.membership-shell input::placeholder { color: var(--member-muted); opacity: 1; }
.membership-shell .membership-button, .membership-card button[type=submit] { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--member-brand); border-radius: 9px; background: var(--member-brand); color: white; font-size: 16px; font-weight: 650; line-height: 1.65; text-transform: none; letter-spacing: normal; cursor: pointer; }
.membership-card button[type=submit]:hover { background: #3730a3; }
.membership-card button:disabled { cursor: wait; opacity: .65; }
.membership-full { width: 100%; }
.membership-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; margin-top: 24px; font-size: 14px; }
.membership-links a, .membership-links summary { display: inline-flex; align-items: center; min-height: 40px; }
.membership-shell .membership-link-button { display: inline-flex; align-items: center; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--member-brand); font-size: 14px; text-decoration: none; cursor: pointer; }
.membership-shell .membership-link-button:hover { text-decoration: underline; }
.google-auth-option { margin-top: 20px; }
.google-auth-divider { display: flex; align-items: center; gap: 12px; color: #64748b; font-size: 14px; margin-bottom: 14px; }
.google-auth-divider::before, .google-auth-divider::after { content: ""; height: 1px; flex: 1; background: #dbe2ea; }
.membership-shell a.google-auth-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 16px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; color: #1f2937; font-size: 16px; font-weight: 600; text-decoration: none; }
.membership-shell a.google-auth-button:hover { background: #f8fafc; border-color: #94a3b8; }
.google-auth-mark { width: 20px; height: 20px; flex: 0 0 20px; }
.membership-shell hr { margin: 24px 0; border: 0; border-top: 1px solid var(--member-line); }
.membership-notice { padding: 17px 20px; border-radius: 10px; background: #eef2ff; font-size: 14px; margin: 18px 0; overflow-wrap: anywhere; }
.membership-error { border: 1px solid #f9ccc6; background: #fff1f0; color: #9a271d; }
.membership-help { flex-basis: 100%; }
.membership-help summary { color: var(--member-brand); cursor: pointer; }
.membership-help summary:hover { text-decoration: underline; }
.membership-help p { margin-top: 10px; color: var(--member-muted); }
.membership-secret { overflow-wrap: anywhere; font-family: monospace; }
.membership-qr { display: flex; justify-content: center; margin: 20px 0; }
.membership-qr img { display: block; width: 288px; max-width: 100%; height: auto; background: white; }
.membership-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.membership-codes code { padding: 8px; background: #fff8e8; border-radius: 6px; overflow-wrap: anywhere; }
@media (max-width: 880px) {
    .membership-login-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; padding-top: 0; }
    .membership-intro h2 { font-size: 28px; }
}
@media (max-width: 720px) {
    .membership-top { padding: 16px; }
    .membership-wrap { padding: 26px 16px 40px; }
    .membership-card { padding: 22px; }
    .membership-shell h1 { font-size: 26px; }
}
@media (max-width: 680px) {
    .membership-login-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .membership-intro { display: none; }
}

/* S2 confirmation/profile correction only; other guest/module surfaces retain
   their existing layout. The wrapper is a product page, never a preview picker. */
.membership-shell:has(.account-mail-journey) {
    --member-ink: #26394c;
    --member-muted: #65778a;
    --member-line: #e0e7ee;
    --member-brand: #315d8a;
    background: #f3f6f9;
}
.membership-shell:has(.account-mail-journey) .membership-top { min-height: 76px; padding: 16px max(24px, calc((100vw - 1080px) / 2)); }
.membership-shell:has(.account-mail-journey) .membership-logo { width: 34px; height: 34px; flex-basis: 34px; border-radius: 8px; }
.membership-shell:has(.account-mail-journey) .membership-wrap { max-width: 1000px; padding: 24px 24px 60px; }
.membership-shell:has(.account-mail-journey) .membership-narrow { max-width: 520px; padding: 34px; border-radius: 12px; box-shadow: 0 10px 30px rgba(33, 54, 78, .055); }
.account-mail-journey h1 { margin: 0 0 16px; font-size: 26px; letter-spacing: -.02em; }
.account-mail-journey .membership-eyebrow { display: block; margin-bottom: 10px; color: #607b96; font-size: 12px; letter-spacing: normal; }
.account-mail-journey .membership-muted { font-size: 14px; }
.account-mail-journey .membership-field { margin-bottom: 18px; }
.membership-shell:has(.account-mail-journey) input:not([type=hidden]):not([type=checkbox]) { min-height: 46px; border-color: #cbd6e0; border-radius: 7px; }
.membership-shell:has(.account-mail-journey) input[readonly] { background: #f7f9fb; }
.membership-shell:has(.account-mail-journey) .membership-button { min-height: 46px; border-radius: 7px; }
.membership-shell:has(.account-mail-journey) .membership-card button[type=submit]:hover { background: #284e74; }
.membership-shell:has(.account-mail-journey) .membership-button-secondary,
.membership-shell:has(.account-mail-journey) .membership-button-secondary:hover { border-color: #cbd6e0; background: #fff; color: #36536f; }
.membership-shell:has(.account-mail-journey) .membership-link-button,
.membership-shell:has(.account-mail-journey) .membership-link-button:hover { min-height: 40px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--member-brand); font-size: 14px; }
.account-mail-journey .membership-notice { margin: 16px 0; padding: 12px 14px; border: 1px solid #dce7f1; border-radius: 7px; background: #f3f7fb; color: #2e567a; }
.account-mail-journey .membership-pending { border-color: #e0e7ee; background: #f7f9fb; color: #485f76; }
.account-mail-journey .membership-error { border-color: #efdcd8; background: #fff8f7; color: #8c3d34; }
.account-mail-field-error { margin-top: 8px !important; color: #8c3d34; font-size: 14px; }
.account-mail-help { margin-top: 10px !important; }
.account-mail-footer { margin-top: 22px; padding-top: 16px; border-top: 1px solid #e8edf2; color: var(--member-muted); font-size: 13px; }
@media (max-width: 680px) {
    .membership-shell:has(.account-mail-journey) .membership-top { min-height: 66px; padding: 16px; }
    .membership-shell:has(.account-mail-journey) .membership-wrap { padding: 20px 16px 40px; }
    .membership-shell:has(.account-mail-journey) .membership-narrow { padding: 24px 22px; border-radius: 10px; }
    .account-mail-journey h1 { font-size: 24px; }
}
