/* Scoped to customer tools; inherit the site's bilingual type system. */
.ff-member-form, .ff-payment-notice, .ff-customer-dialog {
    --ff-tools-paper: var(--ff-cream, #f9f6f1);
    --ff-tools-ink: var(--ff-ink, #24241f);
    --ff-tools-line: var(--ff-line, #d9d0c2);
    --ff-tools-focus: var(--ff-gold, #7c623b);
    color: var(--ff-tools-ink);
    font-family: var(--ff-sans, 'Jost', 'Noto Sans TC', sans-serif);
    font-size: 16px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.ff-member-registration-page .entry-header { display: none; }
.ff-member-registration-page .ast-article-single { padding: 0; }
.ff-member-registration-page #content > .ast-container { max-width: 1240px; padding-inline: 32px; }
.ff-member-registration-page #primary { margin-block: 0; }
.ff-member-form { margin: 64px auto 80px; }
.ff-member-layout { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 64px; align-items: start; }
.ff-member-intro h1, .ff-customer-dialog h2 {
    font-family: var(--ff-serif, 'Cormorant Garamond', 'Noto Serif TC', serif);
    font-size: 38px; font-weight: 400; line-height: 1.3; margin: 0 0 24px;
}
.ff-member-form .ff-member-intro h1 { font-size: 48px; }
.ff-member-intro h1 span, .ff-customer-dialog h2 span { display: block; }
.ff-member-form p, .ff-customer-dialog p { margin: 0 0 12px; }
.ff-member-photo { margin: 32px 0; }
.ff-member-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1.15; object-fit: cover; }
.ff-member-help { border-top: 1px solid var(--ff-tools-line); padding-top: 24px; }
.ff-member-form .ff-member-help h2 { font: 400 20px/1.6 var(--ff-sans, 'Jost', 'Noto Sans TC', sans-serif); margin: 0 0 12px; }
.ff-member-help h2 span { display: block; font-size: 16px; }
.ff-member-body { min-width: 0; }
.ff-member-form .ff-member-required-note { font-size: 14px; color: var(--ff-tools-focus); margin: 0 0 24px; }
.ff-member-form form { margin: 0; }
.ff-member-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.ff-member-section + .ff-member-section { margin-top: 32px; }
.ff-member-section legend { display: block; width: 100%; padding: 0; margin: 0 0 16px; color: var(--ff-tools-ink); font: 500 20px/1.5 var(--ff-sans, 'Jost', 'Noto Sans TC', sans-serif); }
.ff-member-section + .ff-member-section legend { border-top: 1px solid var(--ff-tools-line); padding-top: 32px; }
.ff-member-section legend > span { margin-inline-start: 8px; font-size: 16px; font-weight: 400; }
.ff-member-optional { display: inline-block; margin-inline-start: 8px; color: var(--ff-tools-focus); font-size: 14px; }
.ff-member-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 24px; margin-top: 24px; }
.ff-member-field, .ff-member-form .form-row { min-width: 0; width: 100%; margin: 0; padding: 0; float: none; }
.ff-member-field--wide { grid-column: 1 / -1; }
.ff-member-registration-page .ff-member-form .ff-member-field label { display: block; color: var(--ff-tools-ink); font: 400 14px/1.6 var(--ff-sans, 'Jost', 'Noto Sans TC', sans-serif); margin-bottom: 8px; }
.ff-member-field label > span:not(.optional) { color: var(--ff-tools-focus); }
.ff-member-field .optional { display: none; }
.ff-member-form input:not([type=hidden]), .ff-member-form select, .ff-member-form .select2-selection--single {
    box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px;
    padding: 12px; border: 1px solid var(--ff-tools-line); border-radius: 0;
    background: var(--ff-tools-paper); color: var(--ff-tools-ink); font: inherit;
}
.ff-member-form select { padding-inline-end: 32px; }
.ff-member-form .select2-container { min-width: 0; max-width: 100%; }
.ff-member-form .select2-selection--single { height: auto; }
.ff-member-form .select2-selection__rendered { padding: 0; line-height: 1.5; }
.ff-member-form .select2-selection__arrow { height: 46px; }
.ff-member-form [aria-invalid=true] { border-color: #9b302a; }
.ff-member-errors { border-block: 1px solid #9b302a; padding: 16px 0; margin-bottom: 24px; scroll-margin-top: 104px; }
.ff-member-form .ff-member-errors h2 { font: 500 16px/1.6 var(--ff-sans, 'Jost', 'Noto Sans TC', sans-serif); margin: 0 0 8px; }
.ff-member-errors ul { margin: 0; padding-inline-start: 24px; }
.ff-member-form .ff-member-error, .ff-member-field .description { display: block; color: #9b302a; font-size: 14px; margin-top: 8px; }
.ff-member-hint { display: block; margin-top: 8px; color: var(--ff-muted, #686257); font-size: 14px; line-height: 1.6; }
.ff-member-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ff-member-submit { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--ff-tools-line); }
.ff-member-form .ff-member-privacy { font-size: 14px; margin-bottom: 24px; }
.ff-member-form .ff-member-signin { margin-top: 24px; font-size: 14px; }
.ff-member-form .ff-customer-primary { width: 100%; gap: 20px; }
.ff-member-success { border-block: 1px solid var(--ff-tools-line); padding-block: 32px; }
.ff-member-form .ff-member-success h2 { font: 400 32px/1.4 var(--ff-serif, 'Cormorant Garamond', 'Noto Serif TC', serif); margin-bottom: 24px; }
.ff-member-success h2 span { display: block; }
.ff-member-form--signed-in { max-width: 720px; }
.ff-customer-dialog {
    box-sizing: border-box; width: min(640px, calc(100% - 32px));
    max-height: calc(100dvh - 32px); margin: auto; padding: 32px;
    border: 1px solid var(--ff-tools-line); background: var(--ff-tools-paper);
    overscroll-behavior: contain;
}
.ff-customer-dialog::backdrop { background: rgb(36 36 31 / 60%); }
.ff-customer-dialog ul, .ff-payment-notice ul { padding-inline-start: 24px; margin: 0 0 24px; }
.ff-customer-dialog li + li { margin-top: 24px; }
.ff-customer-dialog__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ff-member-form .ff-customer-primary, .ff-customer-dialog :is(.ff-customer-primary,.ff-customer-secondary) {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 12px 20px; border: 1px solid var(--ff-tools-ink); border-radius: 0;
    font: 400 16px/1.5 var(--ff-sans, 'Jost', 'Noto Sans TC', sans-serif);
    white-space: normal; text-transform: none; letter-spacing: normal; cursor: pointer;
    background: var(--ff-tools-ink); color: var(--ff-tools-paper);
}
.ff-customer-dialog .ff-customer-secondary { background: transparent; color: var(--ff-tools-ink); }
.ff-customer-dialog__actions button { flex: 1 1 220px; }
.ff-member-form :is(a,input,select,button):focus-visible, .ff-customer-dialog :is(a,button):focus-visible, .ff-payment-notice :is(button,input):focus-visible { outline: 2px solid var(--ff-tools-focus); outline-offset: 3px; }
.ff-member-form a, .ff-customer-dialog a { color: var(--ff-tools-focus); text-decoration: underline; text-underline-offset: 4px; }
.ff-payment-notice { margin-block: 16px; }
.ff-payment-notice--enhanced .ff-payment-notice__fallback { display: none; }
.ff-payment-notice .ff-payment-notice__review { background: transparent; color: var(--ff-tools-ink); border: 0; padding: 8px 0; min-height: 44px; font: inherit; text-decoration: underline; text-underline-offset: 4px; }
.ff-payment-notice [hidden] { display: none; }
@media(max-width: 1000px) {
    .ff-member-layout { grid-template-columns: minmax(0,1fr); gap: 32px; max-width: 680px; margin-inline: auto; }
    .ff-member-photo { display: none; }
    .ff-member-help { margin-top: 24px; }
    .ff-member-form .ff-member-intro h1 { font-size: 40px; }
    .ff-member-form { margin-block: 40px 64px; }
}
@media(max-width: 600px) {
    .ff-member-registration-page #content > .ast-container { padding-inline: 20px; }
    .ff-member-form { margin-block: 24px 48px; }
    .ff-member-form .ff-member-intro h1 { font-size: 32px; margin-bottom: 16px; }
    .ff-member-help { display: none; }
    .ff-member-fields { grid-template-columns: minmax(0,1fr); gap: 20px; }
    .ff-member-section legend > span { display: block; margin-inline-start: 0; }
    .ff-member-layout { gap: 24px; }
    .ff-customer-dialog { padding: 24px 20px; }
    .ff-customer-dialog h2 { font-size: 28px; }
    .ff-customer-dialog__actions button { flex-basis: 100%; }
}

.ff-member-password { position: relative; }
.ff-member-password input { padding-inline-end: 100px !important; }
.ff-member-form .ff-member-password-toggle { position: absolute; inset-inline-end: 4px; top: 4px; min-height: 44px; padding: 8px; border: 0; border-radius: 0; background: transparent; color: var(--ff-tools-ink); font: 400 14px/1.5 var(--ff-sans, 'Jost', 'Noto Sans TC', sans-serif); cursor: pointer; }
.ff-member-form .ff-member-password-toggle[hidden] { display: none; }
.ff-member-form #ff-password-strength { min-height: 24px; margin-top: 12px; }
