/* Auth modal — dark card (Mytruffl hustle), blurred gray backdrop */

.auth-modal {
    --auth-modal-bg: #15151e;
    --auth-modal-canvas: #0a0a0f;
    --auth-modal-border: #2a2a3a;
    --auth-modal-input-bg: #1a1a24;
    --auth-modal-text: #ffffff;
    --auth-modal-muted: #a1a1aa;
    --auth-modal-accent: #2b8cff;
    --auth-modal-accent-hover: #1f77ea;
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.auth-modal[hidden] {
    display: none !important;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--auth-modal-canvas) 58%, rgba(120, 120, 130, 0.35));
    backdrop-filter: blur(10px) saturate(0.92);
    -webkit-backdrop-filter: blur(10px) saturate(0.92);
    animation: auth-modal-fade-in 0.22s ease-out;
}

.auth-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 30rem;
    background: var(--auth-modal-bg);
    border: 1px solid var(--auth-modal-border);
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 24px 48px rgba(0, 0, 0, 0.55);
    padding: 1.35rem 1.65rem 1.2rem;
    box-sizing: border-box;
    color: var(--auth-modal-text);
    font-family: var(--font);
    animation: auth-modal-scale-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-modal-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-modal-close:hover {
    background: var(--auth-modal-input-bg);
    color: var(--auth-modal-text);
}

.auth-modal-close:focus-visible {
    outline: 2px solid var(--auth-modal-accent);
    outline-offset: 2px;
}

.auth-modal-close svg {
    width: 0.95rem;
    height: 0.95rem;
}

.auth-modal-head {
    padding-right: 1.5rem;
    margin-bottom: 1rem;
}

.auth-modal-title {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: var(--auth-modal-text);
}

.auth-modal-subtitle {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--auth-modal-muted);
}

.auth-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 40px;
    padding: 0 0.85rem;
    border: 1px solid var(--auth-modal-border);
    border-radius: 10px;
    background: var(--auth-modal-input-bg);
    color: var(--auth-modal-text);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-modal-btn:hover {
    background: #1f1f2a;
    border-color: rgba(33, 138, 253, 0.35);
}

.auth-modal-btn:active {
    background: #181822;
}

.auth-modal-btn:focus-visible {
    outline: 2px solid var(--auth-modal-accent);
    outline-offset: 2px;
}

.auth-modal-btn svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.auth-modal-legal {
    margin: 0.85rem 0 0;
    font-size: 0.625rem;
    line-height: 1.45;
    color: #71717a;
    text-align: center;
}

.auth-modal-legal a {
    color: #218afd;
    text-decoration: none;
}

.auth-modal-legal a:hover {
    color: #1874e6;
    text-decoration: none;
}

.auth-modal-step[hidden] {
    display: none !important;
}

.auth-modal-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--auth-modal-muted);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}

.auth-modal-back-link:hover {
    color: var(--auth-modal-text);
}

.auth-modal-error {
    display: none;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.auth-modal-error[data-visible="1"] {
    display: block;
}

.auth-modal-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.auth-modal-field label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-modal-text);
}

.auth-modal-field input {
    width: 100%;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--auth-modal-border);
    border-radius: 10px;
    background: var(--auth-modal-input-bg);
    color: var(--auth-modal-text);
    font: inherit;
    font-size: 0.875rem;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-modal-field input::placeholder {
    color: #71717a;
}

.auth-modal-field input:focus {
    outline: none;
    border-color: var(--auth-modal-accent);
    box-shadow: 0 0 0 3px rgba(33, 138, 253, 0.22);
}

.auth-modal-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.15rem 0 0.75rem;
}

.auth-modal-terms input {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    accent-color: var(--auth-modal-accent);
    flex-shrink: 0;
}

.auth-modal-terms label {
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--auth-modal-muted);
    cursor: pointer;
}

.auth-modal-terms label a {
    color: #218afd;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-modal-terms-error {
    display: none;
    margin: -0.4rem 0 0.65rem;
    font-size: 0.75rem;
    color: #fca5a5;
}

.auth-modal-terms-error[data-visible="1"] {
    display: block;
}

.auth-modal-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 0 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: var(--auth-modal-accent);
    color: #ffffff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.auth-modal-submit:hover {
    background: var(--auth-modal-accent-hover);
}

.auth-modal-submit:active {
    transform: translateY(1px);
}

.auth-modal-signin-line {
    margin: 0.85rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--auth-modal-muted);
}

.auth-modal-signin-line a {
    color: #bfdbfe;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-modal-signin-line a:hover {
    color: #eff6ff;
}

body.auth-modal-open {
    overflow: hidden;
}

@keyframes auth-modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes auth-modal-scale-in {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 480px) {
    .auth-modal {
        padding: 0.75rem;
        align-items: center;
    }
    .auth-modal-panel {
        max-width: min(30rem, calc(100vw - 1.25rem));
        border-radius: 16px;
        padding: 1.2rem 1.35rem 1.05rem;
    }
    .auth-modal-title {
        font-size: 1.0625rem;
    }
    .auth-modal-backdrop {
        backdrop-filter: blur(8px) saturate(0.9);
        -webkit-backdrop-filter: blur(8px) saturate(0.9);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-modal-backdrop,
    .auth-modal-panel {
        animation: none;
    }
}

/* home2 — choice step card: hero bloom mist (same language as .hero-section--bloom) */

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-panel,
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #0a0a0f;
    background-image: linear-gradient( 180deg, color-mix(in srgb, var(--hero-bloom-glow, #2b8cff) 14%, transparent) 0%, color-mix(in srgb, var(--hero-bloom-glow, #2b8cff) 6%, transparent) 38%, rgba(10, 10, 15, 0) 62%, transparent 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 24px 48px rgba(0, 0, 0, 0.45);
    font-family: var(--font);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-panel {
    width: 100%;
    max-width: 24rem;
    padding: 1rem;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-panel::before,
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -42%);
    width: 130%;
    height: 11rem;
    pointer-events: none;
    z-index: 0;
    opacity: 0.14;
    background: radial-gradient( ellipse 78% 62% at 50% 50%, color-mix(in srgb, var(--hero-bloom-glow, #2b8cff) 24%, transparent) 0%, color-mix(in srgb, var(--hero-bloom-glow, #2b8cff) 9%, transparent) 44%, transparent 72%);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-panel::after,
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -0.5rem;
    transform: translate(-50%, 0);
    width: 88%;
    height: 7rem;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient( circle, color-mix(in srgb, var(--hero-bloom-glow, #2b8cff) 16%, transparent) 0%, color-mix(in srgb, var(--hero-bloom-glow, #2b8cff) 5%, transparent) 48%, transparent 74%);
    filter: blur(52px);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-panel>*:not(.auth-modal-close),
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__surface,
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__spotlight {
    position: relative;
    z-index: 1;
}

/* home2 — overlay: blur the homepage behind, no hero treatment on the backdrop */

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal .auth-modal-backdrop {
    overflow: hidden;
    background: rgba(10, 10, 15, 0.42);
    backdrop-filter: blur(14px) saturate(1.05);
    -webkit-backdrop-filter: blur(14px) saturate(1.05);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal .auth-modal-backdrop::before,
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal .auth-modal-backdrop::after {
    display: none;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-actions {
    position: relative;
    z-index: 2;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    color: #a1a1aa;
    z-index: 3;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fafafa;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: #fafafa;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-subtitle {
    font-size: 0.875rem;
    color: #a1a1aa;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-btn {
    min-height: 2.25rem;
    border: 1px solid #2a2a3a;
    border-radius: 0.375rem;
    background: transparent;
    color: #fafafa;
    font-size: 0.875rem;
    font-weight: 400;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #52525b;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal:not(.auth-modal--credentials) .auth-modal-btn:active {
    background: rgba(255, 255, 255, 0.04);
}

/* home2 — Magic Card credentials step (Magic UI + shadcn Card layout) */

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-panel {
    width: 100%;
    max-width: 24rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-family: var(--font);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-close {
    top: 0.65rem;
    right: 0.65rem;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    color: #a1a1aa;
    z-index: 2;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fafafa;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card {
    --magic-border: rgba(255, 255, 255, 0.1);
    --magic-surface: transparent;
    position: relative;
    width: 100%;
    border-radius: 0.75rem;
    padding: 0;
    overflow: hidden;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__spotlight {
    display: none;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__surface {
    position: relative;
    z-index: 1;
    border-radius: calc(0.75rem - 1px);
    background: transparent;
    overflow: hidden;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-credentials-nav {
    display: flex;
    align-items: center;
    margin: 0 0 0.875rem;
    padding-right: 2rem;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-back-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #fafafa;
    cursor: pointer;
    transition: background 0.15s ease;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-back-icon:hover {
    background: rgba(255, 255, 255, 0.06);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: #fafafa;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__description {
    margin: 0.375rem 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #a1a1aa;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-tabs {
    display: flex;
    gap: 0.25rem;
    margin: 1rem 0 0;
    padding: 0.1875rem;
    border-radius: 0.5rem;
    background: #262626;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-tab {
    flex: 1;
    min-height: 2rem;
    padding: 0 0.625rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #a1a1aa;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-tab.is-active {
    background: #171717;
    color: #fafafa;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-tab:focus-visible {
    outline: 2px solid rgba(43, 140, 255, 0.55);
    outline-offset: 2px;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__content {
    padding: 1rem;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-error {
    margin-bottom: 1rem;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field {
    gap: 0.5rem;
    margin-bottom: 1rem;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field:last-child {
    margin-bottom: 0;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field label {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    color: #fafafa;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field input {
    height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--magic-border);
    border-radius: 0.375rem;
    background: transparent;
    color: #fafafa;
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field input::placeholder {
    color: #71717a;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field input:focus {
    border-color: #52525b;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
    outline: none;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field--password {
    margin-bottom: 0;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-forgot {
    align-self: flex-start;
    margin: 0.375rem 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d4d4d8;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-forgot:hover {
    color: #fafafa;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field-hint {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #71717a;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field--name[hidden],
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-terms,
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-terms-error,
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-field-hint[hidden],
:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-forgot[hidden] {
    display: none !important;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__footer {
    padding: 1rem;
    border-top: 1px solid var(--magic-border);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-submit {
    width: 100%;
    min-height: 2.25rem;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-submit:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.92);
}

:is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-submit:focus-visible {
    outline: 2px solid rgba(43, 140, 255, 0.55);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    :is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal.auth-modal--credentials .auth-modal-panel {
        max-width: min(24rem, calc(100vw - 1.25rem));
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(html[data-truffl-page="home2"], html[data-truffl-auth-ui="bloom"]) .auth-modal-magic-card__spotlight {
        display: none;
    }
}

/* Standalone /niche — same card + option buttons as home2 auth choice step */

html.niche-page,
html.niche-page body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #0a0a0f;
    color: #fafafa;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.niche-page body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

html.niche-page .niche-page-shell {
    width: 100%;
    max-width: 24rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

html.niche-page .niche-page-logo {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
}

html.niche-page .niche-page-card {
    width: 100%;
    padding: 1rem;
    border: 1px solid #2a2a3a;
    border-radius: 0.75rem;
    background: #171717;
    box-sizing: border-box;
    contain: layout style;
}

html.niche-page .auth-modal-btn,
html.niche-page .auth-modal-submit,
html.niche-page .niche-page-skip {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

html.niche-page .auth-modal-btn {
    transition: background 0.12s ease, border-color 0.12s ease;
}

html.niche-page .auth-modal-head {
    padding-right: 0;
    margin-bottom: 1rem;
}

html.niche-page .auth-modal-title {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: #fafafa;
}

html.niche-page .auth-modal-subtitle {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #a1a1aa;
}

html.niche-page .auth-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

html.niche-page .auth-modal-btn {
    min-height: 2.25rem;
    border: 1px solid #2a2a3a;
    border-radius: 0.375rem;
    background: transparent;
    color: #fafafa;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    justify-content: flex-start;
    padding: 0 0.85rem;
}

html.niche-page .auth-modal-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #52525b;
}

html.niche-page .auth-modal-btn:active {
    background: rgba(255, 255, 255, 0.04);
}

html.niche-page .auth-modal-btn.is-selected {
    background: rgba(255, 255, 255, 0.06);
    border-color: #52525b;
}

html.niche-page .auth-modal-btn svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: #a1a1aa;
}

html.niche-page .auth-modal-btn.is-selected svg {
    color: #fafafa;
}

html.niche-page .niche-page-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #2a2a3a;
}

html.niche-page .auth-modal-submit {
    width: 100%;
    min-height: 2.25rem;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

html.niche-page .auth-modal-submit:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

html.niche-page .auth-modal-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

html.niche-page .auth-modal-submit:focus-visible {
    outline: 2px solid rgba(43, 140, 255, 0.55);
    outline-offset: 2px;
}

html.niche-page .niche-page-skip {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0;
    border: 0;
    background: none;
    color: #71717a;
    font-family: inherit;
    font-size: 0.8125rem;
    line-height: 1.45;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

html.niche-page .niche-page-skip:hover {
    color: #a1a1aa;
}

@media (max-width: 480px) {
    html.niche-page body {
        padding: 0.75rem;
    }
    html.niche-page .niche-page-shell,
    html.niche-page .niche-page-card {
        max-width: min(24rem, calc(100vw - 1.25rem));
    }
}
