/* Invitation registration owns its layout without changing the shared auth theme. */
.register-auth-shell {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
}
.register-auth-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.register-auth-shell .register-auth-topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(100%, 1440px);
    min-height: 84px;
    margin: auto;
    padding: 16px 40px;
    border-bottom: 1px solid rgba(169, 112, 28, .15);
}
.register-page-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.register-page-brand-logo { width: 42px; height: 42px; }
.register-page-brand strong { display: block; font-size: 21px; font-weight: 800; line-height: 1.3; }
.register-page-brand em { display: block; margin-top: 3px; font-size: 10px; font-style: normal; letter-spacing: .28em; }
.register-nav-wrap, .register-page-nav { display: flex; align-items: center; gap: 24px; }
.register-page-nav a { font-size: 14px; font-weight: 600; white-space: nowrap; }
.register-nav-divider { height: 18px; width: 1px; background: #dfd3c1; }
.register-auth-shell .register-login-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 18px; border: 1px solid; border-radius: 6px; font-size: 14px; }
.register-auth-shell .register-auth-wrap,
.register-auth-shell .register-auth-wrap.is-register-step-two {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: clamp(32px, 5vw, 72px);
    width: min(100%, 1360px);
    min-height: calc(100svh - 84px);
    margin: 0 auto;
    padding: 40px;
}
.register-auth-shell .register-auth-copy,
.register-auth-shell .is-register-step-two .register-auth-copy { display: block; position: sticky; top: 36px; padding-top: 30px; min-width: 0; }
.register-eyebrow { margin: 0 0 18px; color: #986320; font-size: 13px; font-weight: 700; letter-spacing: .14em; }
.register-auth-shell .register-auth-title { margin: 0; color: #12345b !important; font-size: clamp(28px, 2.7vw, 40px); font-weight: 800; line-height: 1.5; letter-spacing: .015em; text-wrap: balance; }
.register-title-rule { display: block; width: 48px; height: 3px; margin-top: 24px; border-radius: 3px; }
.register-auth-subtitle { max-width: 430px; margin: 24px 0 0; font-size: 15px; line-height: 1.9; }
.register-auth-shell .register-auth-summary { margin-top: 32px; border: 1px solid; border-radius: 8px; padding: 20px; }
.register-auth-summary-title { display: flex; align-items: center; gap: 8px; color: #12345b; font-size: 14px; font-weight: 700; }
.register-auth-summary-grid { display: grid; gap: 18px; margin-top: 22px; }
.register-auth-summary-item { display: flex; align-items: start; gap: 12px; }
.register-auth-summary-item > span { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; height: 32px; border-radius: 6px; }
.register-auth-summary-item p { display: grid; gap: 4px; margin: 0; }
.register-auth-summary-item strong { font-size: 14px; color: #12345b; }
.register-auth-summary-item em { font-size: 12px; font-style: normal; line-height: 1.7; }
.register-auth-shell .register-auth-panel,
.register-auth-shell .is-register-step-two .register-auth-panel {
    min-width: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 26px;
    border: 1px solid;
    border-radius: 10px;
}
.register-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.register-auth-shell .register-panel-head h2 { margin: 0; color: #12345b !important; font-size: 25px; font-weight: 800; line-height: 1.4; }
.register-panel-head p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }
.register-step-badge, .register-mini-badge { flex: 0 0 auto; border: 1px solid; border-radius: 5px; padding: 6px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.register-step-badge span { display: block; margin-top: 3px; font-size: 10px; }
.register-step-panel { border: 1px solid; border-radius: 6px; padding: 16px; }
.register-auth-shell .register-step-panel h3 { margin: 2px 0 0; font-size: 17px; line-height: 1.5; }
.register-verified-invitation { margin: 10px 0 0; font-size: 12px; color: #5f7080; line-height: 1.6; overflow-wrap: anywhere; }
.register-auth-shell #stepTwoPanel > .register-step-panel { margin-bottom: 20px; }
.register-auth-shell .register-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.register-form-grid > * { min-width: 0; }
.register-form-wide { grid-column: 1 / -1; }
.register-auth-shell .register-auth-panel label { font-size: 13px; line-height: 1.5; }
.register-auth-shell .register-auth-panel .guest-auth-field { width: 100%; min-width: 0; height: 42px; min-height: 42px; padding: 9px 12px; border: 1px solid; border-radius: 6px; color: #12345b; font-size: 14px; font-weight: 400; line-height: 1.5; transform: none; }
.register-auth-shell .register-auth-panel .guest-auth-field::placeholder { color: #8a94a2; }
.register-auth-shell .register-auth-panel .guest-auth-field.pr-11 { padding-right: 42px; }
.register-auth-shell .register-auth-panel .relative > button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; right: 1px; }
.register-auth-shell .register-inline-action,
.register-auth-shell .register-auth-panel .guest-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #12345b !important;
    border-radius: 6px;
    background: #12345b !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.register-auth-shell .register-inline-action:hover:not(:disabled),
.register-auth-shell .guest-auth-submit:hover:not(:disabled) { background: #1f4775 !important; }
.register-auth-shell button:disabled { opacity: .55; cursor: not-allowed; }
.register-auth-shell button:focus-visible, .register-auth-shell a:focus-visible { outline: 3px solid #c58a27; outline-offset: 3px; }
.register-auth-shell .register-phone-verification { min-width: 0; margin: 0; padding: 10px 14px 14px; border: 1px solid #e6dccb; border-radius: 6px; background: #fffcf6; }
.register-phone-verification legend { padding: 0 6px; color: #12345b; font-size: 13px; font-weight: 600; }
.register-phone-verification > div + div { margin-top: 14px; }
.register-captcha-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.register-captcha-image { width: 130px; height: 42px; border: 1px solid #e6dccb; border-radius: 6px; background: white; }
.register-sms-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.register-channel-unavailable { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #f4c68b; border-radius: 5px; background: #fff4e4; color: #8a5110; font-size: 12px; line-height: 1.7; }
.register-channel-unavailable a { text-decoration: underline; }
.register-password-strength { margin-top: 10px; }
.register-password-strength .h-2 { height: 4px; margin-top: 8px; }
.register-password-strength .text-sm { font-size: 12px; }
.register-auth-shell .register-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 0; }
.register-form-actions #backToStepOne { min-height: 42px; padding: 9px 14px; border-radius: 6px; font-size: 13px; }
.register-form-actions #registerSubmitButton { min-width: 150px; }
.register-auth-shell .register-auth-panel > p:last-child { margin-top: 20px; font-size: 13px; }
.register-invitation-feedback { margin-top: 14px; padding: 12px; border: 1px solid #fda4af; border-left: 3px solid #be123c; border-radius: 6px; background: #fff1f2; color: #881337; outline-offset: 3px; }
.register-invitation-feedback[hidden] { display: none; }
#invitationResultTitle { margin: 0; font-size: 14px; font-weight: 700; }
#invitationResultMessage { margin: 6px 0 0; font-size: 13px; line-height: 1.7; }
.register-invitation-feedback[data-state="pending"], .register-invitation-feedback[data-state="success"] { border-color: #a7d9c3; background: #f0fcf6; color: #146744; }
.register-invitation-feedback[data-state="warning"] { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
#invitation_code_input[aria-invalid="true"] { border-color: #be123c !important; box-shadow: 0 0 0 2px #ffe4e6 !important; }
@media (max-width: 1199px) and (min-width: 1024px) {
    .register-auth-shell .register-auth-wrap, .register-auth-shell .register-auth-wrap.is-register-step-two { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 28px; padding: 30px 24px; }
    .register-auth-shell .register-auth-topbar { padding-inline: 24px; }
    .register-nav-wrap, .register-page-nav { gap: 16px; }
}
@media (max-width: 1023px) {
    .register-auth-shell .register-auth-topbar { min-height: 60px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; gap: 12px; }
    .register-page-brand-logo { width: 32px; height: 32px; }
    .register-page-brand strong { font-size: 17px; }
    .register-auth-shell .register-auth-wrap, .register-auth-shell .register-auth-wrap.is-register-step-two { display: block; min-height: 0; max-width: 700px; padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
    .register-auth-shell .register-auth-copy, .register-auth-shell .is-register-step-two .register-auth-copy { display: none; }
    .register-auth-shell .register-auth-panel, .register-auth-shell .is-register-step-two .register-auth-panel { max-width: none; padding: 24px; }
    .register-auth-shell .register-auth-panel .guest-auth-field { height: 46px; min-height: 46px; font-size: 16px; }
    .register-auth-shell .register-inline-action, .register-auth-shell .register-auth-panel .guest-auth-submit, .register-form-actions #backToStepOne { min-height: 46px; }
    .register-captcha-image { height: 46px; }
    .register-auth-shell .register-auth-panel .relative > button { height: 44px; width: 42px; }
}
@media (max-width: 599px) {
    .register-auth-shell .register-auth-wrap, .register-auth-shell .register-auth-wrap.is-register-step-two { padding: 14px 10px calc(20px + env(safe-area-inset-bottom, 0px)); }
    .register-auth-shell .register-auth-panel, .register-auth-shell .is-register-step-two .register-auth-panel { padding: 18px 14px; border-radius: 7px; }
    .register-auth-shell .register-panel-head h2 { font-size: 22px; }
    .register-auth-shell .register-form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .register-captcha-row { grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
    .register-captcha-image { width: 110px; }
    .register-captcha-row #refreshRegistrationSmsCaptcha { grid-column: 1 / -1; justify-self: start; min-height: 32px; padding: 4px 0; border: 0 !important; background: transparent !important; color: #275e91 !important; }
    .register-auth-shell .register-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .register-form-actions #registerSubmitButton { width: 100%; }
    .register-auth-shell .register-phone-verification { padding-inline: 10px; }
}

/* Keep the directed form compact while inheriting the shared auth theme. */
.register-auth-shell.register-auth-directed {
    --invite-context-bg: #f6eddf;
    --invite-section-bg: #fffcf6;
    --invite-line: rgba(169, 112, 28, .24);
    --invite-muted: var(--auth-muted);
    --invite-link: var(--auth-gold-deep);
}
.register-auth-directed .register-auth-wrap.is-register-step-two {
    display: block;
    width: min(100%, 696px);
    min-height: 0;
    padding: 28px 16px calc(32px + env(safe-area-inset-bottom, 0px));
}
.register-auth-directed .is-register-step-two .register-auth-panel {
    padding: clamp(16px, 3vw, 26px);
}
.register-auth-directed .register-panel-head { margin-bottom: 14px; }
.register-auth-directed .register-panel-head h1 { margin: 0; color: #12345b; font-size: clamp(22px, 3vw, 28px); font-weight: 800; line-height: 1.3; }
.register-auth-directed .register-panel-head p { color: var(--invite-muted) !important; }
.register-auth-directed .register-auth-panel > [role="alert"] { margin-bottom: 12px; }
.register-invite-context { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 16px; margin-bottom: 16px; padding: 11px 14px; border-radius: 8px; background: var(--invite-context-bg); }
.register-invite-context > div { min-width: 0; }
.register-invite-context .register-context-label { display: block; margin-bottom: 3px; color: var(--invite-muted); font-size: 12px; }
.register-context-label span { margin-left: 3px; color: var(--invite-muted); font-size: 11px; }
.register-invite-context strong { display: block; overflow-wrap: anywhere; }
.register-invite-context strong, .register-context-phone { color: #12345b; font-size: 15px; font-weight: 700; line-height: 1.5; }
.register-context-phone { display: block; width: 100%; padding: 0; border: 0; background: transparent; box-shadow: none; }
.register-context-phone:focus-visible { outline: 2px solid var(--invite-link); outline-offset: 2px; }
.register-auth-directed .register-form-grid { gap: 13px 14px; }
.register-auth-directed .register-phone-verification { background: var(--invite-section-bg); border-color: var(--invite-line); }
.register-auth-directed .register-phone-verification > div + div { margin-top: 10px; }
.register-auth-directed .register-captcha-row { grid-template-columns: auto minmax(0, 1fr); }
.register-captcha-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.register-captcha-heading label { font-weight: 650; }
.register-captcha-heading button { min-height: 30px; padding: 2px 4px; color: var(--invite-link); font-size: 13px; }
.register-captcha-heading button:hover { text-decoration: underline; }
.register-optional-email { border-block: 1px solid var(--invite-line); padding: 9px 0; }
.register-optional-email summary { color: var(--invite-link); cursor: pointer; font-size: 13px; font-weight: 650; }
.register-optional-email summary span { margin-left: 5px; color: var(--invite-muted); font-size: 12px; font-weight: 400; }
.register-optional-email input { margin-top: 9px; }
.register-auth-directed .register-form-actions #registerSubmitButton { width: 100%; }
@media (max-width: 1023px) {
    .register-auth-shell.register-auth-directed {
        --invite-context-bg: #edf3fa;
        --invite-section-bg: #f6f8fb;
        --invite-line: var(--mobile-auth-line);
        --invite-muted: var(--mobile-auth-muted);
        --invite-link: var(--mobile-auth-primary);
    }
    .register-auth-directed .register-auth-topbar {
        width: min(100%, 696px);
        min-height: 62px;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
        border: 0;
    }
    .register-auth-directed .register-auth-wrap.is-register-step-two { padding-block: 8px calc(28px + env(safe-area-inset-bottom, 0px)); }
    .register-auth-shell.register-auth-directed .register-inline-action,
    .register-auth-shell.register-auth-directed .register-auth-panel .guest-auth-submit {
        border-color: var(--mobile-auth-primary) !important;
        background: var(--mobile-auth-primary) !important;
    }
}
@media (max-width: 360px) {
    .register-auth-directed .register-auth-wrap.is-register-step-two { padding-inline: 10px; }
    .register-invite-context { grid-template-columns: minmax(0, 1fr); }
}
